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

patch from Markus Henke, fix for recursive entities. Daniel

* tree.c: patch from Markus Henke, fix for recursive entities.
Daniel
parent 23b1f37b
Thu Apr 18 18:38:30 CEST 2002 Daniel Veillard <daniel@veillard.com>
* tree.c: patch from Markus Henke, fix for recursive entities.
Thu Apr 18 17:49:24 CEST 2002 Daniel Veillard <daniel@veillard.com>
* xpath.c: fix a problem with string() on a document node.
......
......@@ -658,6 +658,17 @@ xmlStringLenGetNodeList(xmlDocPtr doc, const xmlChar *value, int len) {
if (val != NULL) xmlFree(val);
return(ret);
}
else if ((ent != NULL) && (ent->children == NULL)) {
xmlNodePtr tmp;
ent->children =
xmlStringGetNodeList(doc, (const xmlChar*)node->content);
tmp = ent->children;
while (tmp) {
tmp->parent = (xmlNodePtr)ent;
tmp = tmp->next;
}
}
if (last == NULL)
last = ret = node;
else {
......@@ -819,6 +830,17 @@ xmlStringGetNodeList(xmlDocPtr doc, const xmlChar *value) {
if (val != NULL) xmlFree(val);
return(ret);
}
else if ((ent != NULL) && (ent->children == NULL)) {
xmlNodePtr temp;
ent->children = xmlStringGetNodeList(doc,
(const xmlChar*)node->content);
temp = ent->children;
while (temp) {
temp->parent = (xmlNodePtr)ent;
temp = temp->next;
}
}
if (last == NULL) {
last = ret = node;
} else {
......
Supports Markdown
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