private XPipeline runPipelineLoader(Input pipeline, String loaderURI, boolean data) throws SaxonApiException { XdmNode pipeDoc = runLoader(pipeline, loaderURI, data); return use(pipeDoc); }
throw new XProcException(step.getNode(), "Step option can only be used when loading a p:library"); pipeline = innerRuntime.use(pipedoc); } else if (XProcConstants.p_library.equals(piperoot.getNodeName())) { XLibrary library = innerRuntime.useLibrary(piperoot);
private XPipeline runPipelineLoader(Input pipeline, String loaderURI, boolean data) throws SaxonApiException { XdmNode pipeDoc = runLoader(pipeline, loaderURI, data); return use(pipeDoc); }
throw new XProcException(step.getNode(), "Step option can only be used when loading a p:library"); pipeline = innerRuntime.use(pipedoc); } else if (XProcConstants.p_library.equals(piperoot.getNodeName())) { XLibrary library = innerRuntime.useLibrary(piperoot);
private void loadPipeline(String uri, String id, int seconds) { Calendar expires = GregorianCalendar.getInstance(); if (seconds >= 0) { long millis = seconds; long extime = expires.getTimeInMillis() + (millis*1000); expires.setTimeInMillis(extime); } else { expires.setTimeInMillis(Long.MAX_VALUE); } XProcRuntime runtime = new XProcRuntime(getConfiguration()); try { XdmNode doc = runtime.parse(uri, runtime.getStaticBaseURI().toASCIIString()); XPipeline pipeline = runtime.use(doc); getPipelines().put(id, new PipelineConfiguration(runtime, pipeline, expires)); } catch (Exception e) { throw new XProcException(e); } } }
private void loadPipeline(String uri, String id, int seconds) { Calendar expires = GregorianCalendar.getInstance(); if (seconds >= 0) { long millis = seconds; long extime = expires.getTimeInMillis() + (millis*1000); expires.setTimeInMillis(extime); } else { expires.setTimeInMillis(Long.MAX_VALUE); } XProcRuntime runtime = new XProcRuntime(getConfiguration()); try { XdmNode doc = runtime.parse(uri, runtime.getStaticBaseURI().toASCIIString()); XPipeline pipeline = runtime.use(doc); getPipelines().put(id, new PipelineConfiguration(runtime, pipeline, expires)); } catch (Exception e) { throw new XProcException(e); } } }
Hashtable<QName, String> options) throws SaxonApiException { XPipeline xpipeline = runtime.use(pipeline);
Hashtable<QName, String> options) throws SaxonApiException { XPipeline xpipeline = runtime.use(pipeline);
public void run() throws SaxonApiException { Processor saxon = new Processor(false); XProcConfiguration config = new XProcConfiguration(saxon); XProcRuntime runtime = new XProcRuntime(config); InputStream stream = new ByteArrayInputStream(pipeline_xml.getBytes()); DocumentBuilder builder = saxon.newDocumentBuilder(); XdmNode pipeline_doc = builder.build(new SAXSource(new InputSource(stream))); XPipeline pipeline = runtime.use(pipeline_doc); pipeline.run(); }
XPipeline pppipe = runtime.use(prettyPrint); pppipe.writeTo("source", tdoc); pppipe.run();
XPipeline pppipe = runtime.use(prettyPrint); pppipe.writeTo("source", tdoc); pppipe.run();
XPipeline pipeline = runtime.use(doc); getPipelines().put(id, new PipelineConfiguration(runtime, pipeline, expires)); } catch (Exception e) {
XPipeline pipeline = runtime.use(doc); getPipelines().put(id, new PipelineConfiguration(runtime, pipeline, expires)); } catch (Exception e) {