- tree.c: fixed a gross mistake in base computation, xml:base is
not completely correct yet (need cascade).
- xpath.[ch]: added the few things needed to find a function name
and URI from the XPath context when it is called.
Daniel
diff --git a/tree.c b/tree.c
index f90c3d4..4b32f92 100644
--- a/tree.c
+++ b/tree.c
@@ -3267,9 +3267,13 @@
xmlEntityPtr ent = (xmlEntityPtr) cur;
return(xmlStrdup(ent->URI));
}
- base = xmlGetProp(cur, BAD_CAST "xml:base");
- if (base != NULL)
- return(base);
+ if (cur->type == XML_ELEMENT_NODE) {
+ base = xmlGetProp(cur, BAD_CAST "xml:base");
+ if (base != NULL) {
+ /* TODO : apply cascade in the base resolution ! */
+ return(base);
+ }
+ }
cur = cur->parent;
}
if ((doc != NULL) && (doc->URL != NULL))