Skip to content

Commit

Permalink
Fix bug in XInclude processing where blindly copying the xml:base att…
Browse files Browse the repository at this point in the history
…ribute messes up the base URI
  • Loading branch information
ndw committed Sep 12, 2014
1 parent c7e81e1 commit 0edacd1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/com/xmlcalabash/library/XInclude.java
Expand Up @@ -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());
Expand Down

0 comments on commit 0edacd1

Please sign in to comment.