Skip to content
Permalink
Browse files

Don't attempt to set the base URI for pipelines that don't have one.

  • Loading branch information
ndw committed Oct 25, 2013
1 parent 00b04cd commit 0f6a10b47499718a50eb19b0e773aae610e5bc7d
Showing with 10 additions and 2 deletions.
  1. +6 −1 src/com/xmlcalabash/library/DefaultStep.java
  2. +4 −1 src/com/xmlcalabash/runtime/XAtomicStep.java
@@ -12,6 +12,7 @@
import net.sf.saxon.Configuration;
import net.sf.saxon.trans.XPathException;

import java.net.URI;
import java.util.Hashtable;
import java.util.Vector;
import java.util.Iterator;
@@ -266,7 +267,11 @@ public Serializer makeSerializer() {

try {
XPathCompiler xcomp = runtime.getProcessor().newXPathCompiler();
xcomp.setBaseURI(step.getNode().getBaseURI());
URI baseURI = step.getNode().getBaseURI();
if (!"".equals(baseURI.toASCIIString())) {
xcomp.setBaseURI(baseURI);
}

// Extension functions are not available here...

for (QName varname : globals.keySet()) {
@@ -785,7 +785,10 @@ protected RuntimeValue computeValue(ComputableValue var) {

try {
XPathCompiler xcomp = runtime.getProcessor().newXPathCompiler();
xcomp.setBaseURI(step.getNode().getBaseURI());
URI baseURI = step.getNode().getBaseURI();
if (!"".equals(baseURI.toASCIIString())) {
xcomp.setBaseURI(baseURI);
}

for (QName varname : boundOpts.keySet()) {
xcomp.declareVariable(varname);

0 comments on commit 0f6a10b

Please sign in to comment.
You can’t perform that action at this time.