1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-25 23:21:26 +03:00

XInclude xpointer support was broken with the new namespace. Fixes #129932

* xinclude.c result/XInclude/nodes2.*: XInclude xpointer support
  was broken with the new namespace. Fixes #129932
Daniel
This commit is contained in:
Daniel Veillard 2003-12-24 11:06:25 +00:00
parent b0f397e108
commit b98d082eef
4 changed files with 20 additions and 24 deletions

View File

@ -1,3 +1,8 @@
Wed Dec 24 12:04:35 CET 2003 Daniel Veillard <daniel@veillard.com>
* xinclude.c result/XInclude/nodes2.*: XInclude xpointer support
was broken with the new namespace. Fixes #129932
Wed Dec 24 00:29:30 CET 2003 Daniel Veillard <daniel@veillard.com>
* xmlschemas.c include/libxml/schemasInternals.h: types might be

View File

@ -1,9 +1,5 @@
<?xml version="1.0"?>
<x xmlns:xinclude="http://www.w3.org/2003/XInclude">
<!-- Simple test of including a set of nodes from an XML document -->
<doc xml:base="test/XInclude/ents/something.xml">
<p>something</p>
<p>really</p>
<p>simple</p>
</doc>
<p xml:base="test/XInclude/ents/something.xml">something</p><p xml:base="test/XInclude/ents/something.xml">really</p><p xml:base="test/XInclude/ents/something.xml">simple</p>
</x>

View File

@ -4,25 +4,15 @@
1 8 #comment 0 1 Simple test of including a set of nodes from an XML document
1 14 #text 0 1
1 1 doc 0 0
2 14 #text 0 1
2 1 p 0 0
3 3 #text 0 1 something
2 15 p 0 0
2 14 #text 0 1
2 1 p 0 0
3 3 #text 0 1 really
2 15 p 0 0
2 14 #text 0 1
2 1 p 0 0
3 3 #text 0 1 simple
2 15 p 0 0
2 14 #text 0 1
1 15 doc 0 0
1 1 p 0 0
2 3 #text 0 1 something
1 15 p 0 0
1 1 p 0 0
2 3 #text 0 1 really
1 15 p 0 0
1 1 p 0 0
2 3 #text 0 1 simple
1 15 p 0 0
1 14 #text 0 1
0 15 x 0 0

View File

@ -1334,6 +1334,11 @@ xmlXIncludeLoadDoc(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) {
fragment = (xmlChar *) uri->fragment;
uri->fragment = NULL;
}
if ((ctxt->incTab != NULL) && (ctxt->incTab[nr] != NULL) &&
(ctxt->incTab[nr]->fragment != NULL)) {
if (fragment != NULL) xmlFree(fragment);
fragment = xmlStrdup(ctxt->incTab[nr]->fragment);
}
URL = xmlSaveUri(uri);
xmlFreeURI(uri);
if (URL == NULL) {