From 0edacd171b38ddaeeeb29a9ede83cdf8def23970 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Fri, 12 Sep 2014 07:52:33 +0100 Subject: [PATCH] Fix bug in XInclude processing where blindly copying the xml:base attribute messes up the base URI --- src/com/xmlcalabash/library/XInclude.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/com/xmlcalabash/library/XInclude.java b/src/com/xmlcalabash/library/XInclude.java index 6eb212cc..9c0a3eb3 100644 --- a/src/com/xmlcalabash/library/XInclude.java +++ b/src/com/xmlcalabash/library/XInclude.java @@ -398,8 +398,10 @@ public boolean processStartElement(XdmNode node) throws SaxonApiException { XdmNode child = (XdmNode) iter.next(); boolean copy = !"".equals(child.getNodeName().getNamespaceURI()); // must be in a ns - copy = copy && !(XProcConstants.xml_base.equals(child.getNodeName()) && fixupBase); - copy = copy && !(XProcConstants.xml_lang.equals(child.getNodeName()) && fixupLang); + // Can't copy xml:base it'll get relative URIs wrong and it's controlled separately + copy = copy && !(XProcConstants.xml_base.equals(child.getNodeName())); + // Don't copy xml:lang, it's controlled separately + copy = copy && !(XProcConstants.xml_lang.equals(child.getNodeName())); if (copy) { copied.add(child.getNodeName());