Permalink
Browse files

Fix bug in XInclude processing where blindly copying the xml:base att…

…ribute messes up the base URI
  • Loading branch information...
ndw committed Sep 12, 2014
1 parent c7e81e1 commit 0edacd171b38ddaeeeb29a9ede83cdf8def23970
Showing with 4 additions and 2 deletions.
  1. +4 −2 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());

0 comments on commit 0edacd1

Please sign in to comment.