Well the bugs I was chasing on XSLT were ... in libxml ... grrrr:

- xpath.c: ouch don't free NULL, rare case fixed
- tree.c: don't coalesce text nodes if they don't have the
  same behaviour wrt escaping on output
Daniel
This commit is contained in:
Daniel Veillard 2001-02-12 17:36:05 +00:00
parent d12b69ddf5
commit 5dd2f0a6cd
3 changed files with 16 additions and 3 deletions

View File

@ -1,3 +1,9 @@
Mon Feb 12 18:33:20 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* xpath.c: ouch don't free NULL, rare case fixed
* tree.c: don't coalesce text nodes if they don't have the
same behaviour wrt escaping on output
Sun Feb 11 21:15:41 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* xpath.c: small fixup

10
tree.c
View File

@ -2074,7 +2074,8 @@ xmlAddChildList(xmlNodePtr parent, xmlNodePtr cur) {
* If cur and parent->last both are TEXT nodes, then merge them.
*/
if ((cur->type == XML_TEXT_NODE) &&
(parent->last->type == XML_TEXT_NODE)) {
(parent->last->type == XML_TEXT_NODE) &&
(cur->name == parent->last->name)) {
#ifndef XML_USE_BUFFER_CONTENT
xmlNodeAddContent(parent->last, cur->content);
#else
@ -2163,7 +2164,8 @@ xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) {
xmlFreeNode(cur);
return(parent);
}
if ((parent->last != NULL) && (parent->last->type == XML_TEXT_NODE)) {
if ((parent->last != NULL) && (parent->last->type == XML_TEXT_NODE) &&
(parent->last->name == cur->name)) {
#ifndef XML_USE_BUFFER_CONTENT
xmlNodeAddContent(parent->last, cur->content);
#else
@ -3146,6 +3148,8 @@ xmlNodeGetBase(xmlDocPtr doc, xmlNodePtr cur) {
return(base);
cur = cur->parent;
}
if ((doc != NULL) && (doc->URL != NULL))
return(xmlStrdup(doc->URL));
return(NULL);
}
@ -3522,6 +3526,8 @@ xmlTextMerge(xmlNodePtr first, xmlNodePtr second) {
if (second == NULL) return(first);
if (first->type != XML_TEXT_NODE) return(first);
if (second->type != XML_TEXT_NODE) return(first);
if (second->name != first->name)
return(first);
#ifndef XML_USE_BUFFER_CONTENT
xmlNodeAddContent(first, second->content);
#else

View File

@ -1918,7 +1918,8 @@ xmlXPathEqualNodeSetString(xmlXPathObjectPtr arg, const xmlChar *str) {
xmlFree(str2);
return(1);
}
xmlFree(str2);
if (str2 != NULL)
xmlFree(str2);
}
return(0);
}