fix xml generation

Sun, 20 Oct 2019 10:35:02 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 20 Oct 2019 10:35:02 +0200
changeset 666
97061483d06e
parent 665
ec8c9201a974
child 667
6cdcd3e4e368

fix xml generation

libidav/xml.c file | annotate | diff | comparison | revisions
--- a/libidav/xml.c	Sun Oct 20 08:30:11 2019 +0200
+++ b/libidav/xml.c	Sun Oct 20 10:35:02 2019 +0200
@@ -169,8 +169,9 @@
             if(node->namespace) {
                 prefix = ucx_map_cstr_get(nsmap, node->namespace);
                 if(!prefix) {
-                    sstr_t newpre = ucx_sprintf("x%d", (int)nsmap->count);
-                    ucx_map_cstr_put(nsmap, node->namespace, newpre.ptr);
+                    sstr_t newpre = ucx_sprintf("x%d", (int)nsmap->count+1);
+                    // TODO: fix namespace declaration
+                    //ucx_map_cstr_put(nsmap, node->namespace, newpre.ptr);
                     prefix = newpre.ptr;
                     ucx_fprintf(
                             stream,

mercurial