Permalink
Browse files

Fix issue #175 by making sure that the base URI of a pipeline that co…

…mes from an input stream Input is specified (if the URI is known).
  • Loading branch information...
ndw committed Aug 25, 2014
1 parent a9439c1 commit 3fb5315ca50282cf19fa90e2370ba62120c323de
Showing with 11 additions and 2 deletions.
  1. +1 −1 src/com/xmlcalabash/core/XProcRuntime.java
  2. +10 −1 src/com/xmlcalabash/model/Parser.java
@@ -606,7 +606,7 @@ private XPipeline _load(Input pipelineInput) throws SaxonApiException, IOExcepti
break;
case INPUT_STREAM:
pipeline = parser.loadPipeline(pipelineInput.getInputStream());
pipeline = parser.loadPipeline(pipelineInput.getInputStream(), pipelineInput.getInputStreamUri());
break;
default:
@@ -76,8 +76,17 @@ public Parser(XProcRuntime runtime) {
declStack = new Stack<DeclareStep> ();
}
@Deprecated
public DeclareStep loadPipeline(InputStream inputStream) throws SaxonApiException, IOException {
XdmNode doc = runtime.parse(new InputSource(inputStream));
return loadPipeline(inputStream, null);
}
public DeclareStep loadPipeline(InputStream inputStream, String base) throws SaxonApiException, IOException {
InputSource is = new InputSource(inputStream);
if (base != null) {
is.setSystemId(base);
}
XdmNode doc = runtime.parse(is);
inputStream.close();
return loadPipeline(doc);
}

0 comments on commit 3fb5315

Please sign in to comment.