From b98d082eefc0574c55e447eb593ca37ad6a2727b Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Wed, 24 Dec 2003 11:06:25 +0000 Subject: [PATCH] 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 --- ChangeLog | 5 +++++ result/XInclude/nodes2.xml | 6 +----- result/XInclude/nodes2.xml.rdr | 28 +++++++++------------------- xinclude.c | 5 +++++ 4 files changed, 20 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index 48222221..6513db52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Dec 24 12:04:35 CET 2003 Daniel Veillard + + * 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 * xmlschemas.c include/libxml/schemasInternals.h: types might be diff --git a/result/XInclude/nodes2.xml b/result/XInclude/nodes2.xml index a515a576..34ef5f05 100644 --- a/result/XInclude/nodes2.xml +++ b/result/XInclude/nodes2.xml @@ -1,9 +1,5 @@ - -

something

-

really

-

simple

-
+

something

really

simple

diff --git a/result/XInclude/nodes2.xml.rdr b/result/XInclude/nodes2.xml.rdr index b4978c04..0e538781 100644 --- a/result/XInclude/nodes2.xml.rdr +++ b/result/XInclude/nodes2.xml.rdr @@ -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 diff --git a/xinclude.c b/xinclude.c index b68c3081..3bee9ee2 100644 --- a/xinclude.c +++ b/xinclude.c @@ -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) {