Commit bd8fb0ad authored by Daniel Veillard's avatar Daniel Veillard
Browse files

applied patch from Rob Richards to fix a problem with

* xmlwriter.c: applied patch from Rob Richards to fix a problem with
  xmlTextWriterStartAttributeNS
Daniel
parent fa1f77f2
Mon Feb 21 14:48:27 CET 2005 Daniel Veillard <daniel@veillard.com>
* xmlwriter.c: applied patch from Rob Richards to fix a problem with
xmlTextWriterStartAttributeNS
Mon Feb 21 11:41:41 CET 2005 Daniel Veillard <daniel@veillard.com>
 
* pattern.c xpath.c: fixed remaining known bugs in the XPath streaming,
......
......@@ -1832,12 +1832,26 @@ xmlTextWriterEndAttribute(xmlTextWriterPtr writer)
sum += count;
while (!xmlListEmpty(writer->nsstack)) {
xmlChar *namespaceURI = NULL;
xmlChar *prefix = NULL;
lk = xmlListFront(writer->nsstack);
np = (xmlTextWriterNsStackEntry *) xmlLinkGetData(lk);
if (np != 0) {
namespaceURI = xmlStrdup(np->prefix);
prefix = xmlStrdup(np->uri);
}
xmlListPopFront(writer->nsstack);
if (np != 0) {
count =
xmlTextWriterWriteAttribute(writer, np->prefix,
np->uri);
xmlTextWriterWriteAttribute(writer, prefix,
namespaceURI);
xmlFree(namespaceURI);
xmlFree(prefix);
if (count < 0) {
xmlListDelete(writer->nsstack);
writer->nsstack = NULL;
......@@ -1845,8 +1859,6 @@ xmlTextWriterEndAttribute(xmlTextWriterPtr writer)
}
sum += count;
}
xmlListPopFront(writer->nsstack);
}
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment