mirror of
https://github.com/GNOME/libxml2.git
synced 2025-02-17 18:19:32 +08:00
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:
parent
d12b69ddf5
commit
5dd2f0a6cd
@ -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
10
tree.c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user