Permalink
Browse files

Patch to fix for issue #86, make sure the base URI is preserved

  • Loading branch information...
ndw committed Mar 8, 2013
1 parent b20a80b commit 1f0d90a95e283beb32f27eb8d6f60d058f4eff54
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/com/xmlcalabash/util/S9apiUtils.java
@@ -198,7 +198,11 @@ public static InputSource xdmToInputSource(XProcRuntime runtime, XdmNode node) t
Serializer serializer = new Serializer();
serializer.setOutputStream(out);
serialize(runtime, node, serializer);
- return new InputSource(new ByteArrayInputStream(out.toByteArray()));
+ InputSource isource = new InputSource(new ByteArrayInputStream(out.toByteArray()));
+ if (node.getBaseURI() != null) {
+ isource.setSystemId(node.getBaseURI().toASCIIString());
+ }
+ return isource;
}
public static HashSet<String> excludeInlinePrefixes(XdmNode node, String prefixList) {

0 comments on commit 1f0d90a

Please sign in to comment.