libidav/xml.c

changeset 666
97061483d06e
parent 588
0cfe006fcad2
child 736
40be8db6fe45
--- 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