167 char *tagend = node->children ? ">" : " />"; |
167 char *tagend = node->children ? ">" : " />"; |
168 char *prefix = NULL; |
168 char *prefix = NULL; |
169 if(node->namespace) { |
169 if(node->namespace) { |
170 prefix = ucx_map_cstr_get(nsmap, node->namespace); |
170 prefix = ucx_map_cstr_get(nsmap, node->namespace); |
171 if(!prefix) { |
171 if(!prefix) { |
172 sstr_t newpre = ucx_sprintf("x%d", (int)nsmap->count); |
172 sstr_t newpre = ucx_sprintf("x%d", (int)nsmap->count+1); |
173 ucx_map_cstr_put(nsmap, node->namespace, newpre.ptr); |
173 // TODO: fix namespace declaration |
|
174 //ucx_map_cstr_put(nsmap, node->namespace, newpre.ptr); |
174 prefix = newpre.ptr; |
175 prefix = newpre.ptr; |
175 ucx_fprintf( |
176 ucx_fprintf( |
176 stream, |
177 stream, |
177 writef, |
178 writef, |
178 "<%s:%s xmlns:%s=\"%s\"", |
179 "<%s:%s xmlns:%s=\"%s\"", |