diff --git a/ChangeLog b/ChangeLog index fd8b9f8a..87f5da4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Aug 14 16:43:53 CEST 2002 Daniel Veillard + + * xinclude.c: oops I was missing the xml:base fixup too + * result/XInclude/*.xml: this adds xml:base attributes to most + results of the tests + Wed Aug 14 16:05:37 CEST 2002 Daniel Veillard * xinclude.c: quick but apparently working implementation of diff --git a/result/XInclude/docids.xml b/result/XInclude/docids.xml index a383e7fa..389a216d 100644 --- a/result/XInclude/docids.xml +++ b/result/XInclude/docids.xml @@ -11,7 +11,7 @@ - + diff --git a/result/XInclude/include.xml b/result/XInclude/include.xml index a0f6dc46..bee9da28 100644 --- a/result/XInclude/include.xml +++ b/result/XInclude/include.xml @@ -1,7 +1,7 @@ - +

something

really

simple

diff --git a/result/XInclude/nodes.xml b/result/XInclude/nodes.xml index 83ce6948..301b70d5 100644 --- a/result/XInclude/nodes.xml +++ b/result/XInclude/nodes.xml @@ -1,5 +1,5 @@ -

something

really

simple

+

something

really

simple

diff --git a/result/XInclude/recursive.xml b/result/XInclude/recursive.xml index df74d50f..c218c7d3 100644 --- a/result/XInclude/recursive.xml +++ b/result/XInclude/recursive.xml @@ -1,3 +1,3 @@ -is a test +is a test diff --git a/xinclude.c b/xinclude.c index 63cb5e9b..e2c4af05 100644 --- a/xinclude.c +++ b/xinclude.c @@ -892,6 +892,20 @@ loaded: xmlXPathFreeContext(xptrctxt); xmlFree(fragment); } + + /* + * Do the xml:base fixup if needed + */ + if ((doc != NULL) && (URL != NULL) && (xmlStrchr(URL, (xmlChar) '/'))) { + xmlNodePtr node; + + node = ctxt->repTab[nr]; + while (node != NULL) { + if (node->type == XML_ELEMENT_NODE) + xmlNodeSetBase(node, URL); + node = node->next; + } + } xmlFree(URL); return(0); }