208 // namespace required for all elements |
208 // namespace required for all elements |
209 if(node->type == XML_ELEMENT_NODE && node->ns) { |
209 if(node->type == XML_ELEMENT_NODE && node->ns) { |
210 // we create a list of unique prefix-href namespaces by putting |
210 // we create a list of unique prefix-href namespaces by putting |
211 // all namespaces in a map |
211 // all namespaces in a map |
212 CxHashKey nskey = xml_namespace_key(col->a, node->ns); |
212 CxHashKey nskey = xml_namespace_key(col->a, node->ns); |
213 if(!nskey.data.bytes) { |
213 if(!nskey.data) { |
214 col->error = 1; |
214 col->error = 1; |
215 return 1; |
215 return 1; |
216 } |
216 } |
217 if(cxMapPut(col->nsmap, nskey, node->ns)) { |
217 if(cxMapPut(col->nsmap, nskey, node->ns)) { |
218 col->error = 1; |
218 col->error = 1; |
279 // remove all namespace definitions from the map |
279 // remove all namespace definitions from the map |
280 // what we get is a map that contains all missing namespace definitions |
280 // what we get is a map that contains all missing namespace definitions |
281 WebdavNSList *def = col.def; |
281 WebdavNSList *def = col.def; |
282 while(def) { |
282 while(def) { |
283 CxHashKey nskey = xml_namespace_key(a, def->namespace); |
283 CxHashKey nskey = xml_namespace_key(a, def->namespace); |
284 if(!nskey.data.bytes) { |
284 if(!nskey.data) { |
285 if(error) *error = 1; |
285 if(error) *error = 1; |
286 break; |
286 break; |
287 } |
287 } |
288 (void)cxMapRemove(nsmap, nskey); |
288 cxMapRemove(nsmap, nskey); |
289 def = def->next; |
289 def = def->next; |
290 } |
290 } |
291 |
291 |
292 // convert nsmap to a list |
292 // convert nsmap to a list |
293 CxIterator i = cxMapIteratorValues(nsmap); |
293 CxIterator i = cxMapIteratorValues(nsmap); |