public Sequence call(XPathContext xPathContext, Sequence[] sequences) throws XPathException { XProcRuntime runtime = registry.getRuntime(xdef); XProcData data = runtime.getXProcData(); XStep step = data.getStep(); // FIXME: this can't be the best way to do this... // step == null in use-when if (step != null && !(step instanceof XCompoundStep)) { throw XProcException.dynamicError(23); } return new Int64Value(runtime.getXProcData().getIterationPosition()); } }
public Sequence call(XPathContext xPathContext, Sequence[] sequences) throws XPathException { XProcRuntime runtime = registry.getRuntime(xdef); XStep step = runtime.getXProcData().getStep(); // FIXME: this can't be the best way to do this... // step == null in use-when if (step != null && !(step instanceof XCompoundStep)) { throw XProcException.dynamicError(23); } return new Int64Value(runtime.getXProcData().getIterationSize()); } }
public Sequence call(XPathContext xPathContext, Sequence[] sequences) throws XPathException { XProcRuntime runtime = registry.getRuntime(xdef); XStep step = runtime.getXProcData().getStep(); // FIXME: this can't be the best way to do this... // step == null in use-when if (step != null && !(step instanceof XCompoundStep)) { throw XProcException.dynamicError(23); } return new Int64Value(runtime.getXProcData().getIterationSize()); } }
public Sequence call(XPathContext xPathContext, Sequence[] sequences) throws XPathException { XProcRuntime runtime = registry.getRuntime(xdef); XProcData data = runtime.getXProcData(); XStep step = data.getStep(); // FIXME: this can't be the best way to do this... // step == null in use-when if (step != null && !(step instanceof XCompoundStep)) { throw XProcException.dynamicError(23); } return new Int64Value(runtime.getXProcData().getIterationPosition()); } }
public Sequence call(XPathContext xPathContext, Sequence[] sequences) throws XPathException { XProcRuntime runtime = registry.getRuntime(xdef); XStep step = runtime.getXProcData().getStep(); // FIXME: this can't be the best way to do this... // step == null in use-when if (step != null && !(step instanceof XCompoundStep)) { throw XProcException.dynamicError(23); } // In 0.9.20, I removed the trailing slash from cwd(). // The community didn't like that, so I put it back. String cwd = runtime.getStaticBaseURI().toASCIIString(); return new AnyURIValue(cwd); } }
public Sequence call(XPathContext xPathContext, Sequence[] sequences) throws XPathException { XProcRuntime runtime = registry.getRuntime(xdef); XStep step = runtime.getXProcData().getStep(); // FIXME: this can't be the best way to do this... // step == null in use-when if (step != null && !(step instanceof XCompoundStep)) { throw XProcException.dynamicError(23); } // In 0.9.20, I removed the trailing slash from cwd(). // The community didn't like that, so I put it back. String cwd = runtime.getStaticBaseURI().toASCIIString(); return new AnyURIValue(cwd); } }
public Sequence call(XPathContext xPathContext, Sequence[] sequences) throws XPathException { XProcRuntime runtime = registry.getRuntime(xdef); XStep step = runtime.getXProcData().getStep(); // FIXME: this can't be the best way to do this... // step == null in use-when if (step != null && !(step instanceof XCompoundStep)) { throw XProcException.dynamicError(23); } DoubleValue reqVer = (DoubleValue) sequences[0].head(); return reqVer.getDoubleValue() == 1.0 ? BooleanValue.TRUE : BooleanValue.FALSE; } }
public Sequence call(XPathContext xPathContext, Sequence[] sequences) throws XPathException { XProcRuntime runtime = registry.getRuntime(xdef); XStep step = runtime.getXProcData().getStep(); // FIXME: this can't be the best way to do this... // step == null in use-when if (step != null && !(step instanceof XCompoundStep)) { throw XProcException.dynamicError(23); } DoubleValue value = (DoubleValue) sequences[0].head(); double reqVer = value.getDoubleValue(); return (reqVer == 1.0 || reqVer == 2.0) ? BooleanValue.TRUE : BooleanValue.FALSE; } }
public Sequence call(XPathContext xPathContext, Sequence[] sequences) throws XPathException { XProcRuntime runtime = registry.getRuntime(xdef); XStep step = runtime.getXProcData().getStep(); // FIXME: this can't be the best way to do this... // step == null in use-when if (step != null && !(step instanceof XCompoundStep)) { throw XProcException.dynamicError(23); } DoubleValue reqVer = (DoubleValue) sequences[0].head(); return reqVer.getDoubleValue() == 1.0 ? BooleanValue.TRUE : BooleanValue.FALSE; } }
public Sequence call(XPathContext xPathContext, Sequence[] sequences) throws XPathException { XProcRuntime runtime = registry.getRuntime(xdef); XStep step = runtime.getXProcData().getStep(); // FIXME: this can't be the best way to do this... // step == null in use-when if (step != null && !(step instanceof XCompoundStep)) { throw XProcException.dynamicError(23); } DoubleValue value = (DoubleValue) sequences[0].head(); double reqVer = value.getDoubleValue(); return (reqVer == 1.0 || reqVer == 2.0) ? BooleanValue.TRUE : BooleanValue.FALSE; } }
public void run() throws SaxonApiException { logger.trace("Running p:viewport " + step.getName()); XProcData data = runtime.getXProcData(); data.openFrame(this); runtime.getXProcData().setIterationSize(sequenceLength);
public void run() throws SaxonApiException { QName infoName = XProcConstants.p_pipeline; /* if (!step.isAnonymous()) { infoName = step.getDeclaredType(); } */ logger.trace("Running " + infoName + " " + step.getName()); if (runtime.getAllowGeneralExpressions()) { logger.trace(MessageFormatter.nodeMessage(step.getNode(), "Running with the 'general-values' extension enabled.")); } XProcData data = runtime.getXProcData(); data.openFrame(this); runtime.start(this); try { doRun(); } catch (XProcException ex) { throw ex; } catch (SaxonApiException ex) { runtime.error(ex); throw ex; } finally { runtime.finish(this); data.closeFrame(); } }
public void run() throws SaxonApiException { QName infoName = XProcConstants.p_pipeline; /* if (!step.isAnonymous()) { infoName = step.getDeclaredType(); } */ logger.trace("Running " + infoName + " " + step.getName()); if (runtime.getAllowGeneralExpressions()) { logger.trace(MessageFormatter.nodeMessage(step.getNode(), "Running with the 'general-values' extension enabled.")); } XProcData data = runtime.getXProcData(); data.openFrame(this); runtime.start(this); try { doRun(); } catch (XProcException ex) { runtime.error(ex); throw ex; } catch (SaxonApiException ex) { runtime.error(ex); throw ex; } finally { runtime.finish(this); data.closeFrame(); } }
XStep step = runtime.getXProcData().getStep();
XStep step = runtime.getXProcData().getStep();
XStep step = runtime.getXProcData().getStep();
XStep step = runtime.getXProcData().getStep();
public Sequence call(XPathContext xPathContext, Sequence[] sequences) throws XPathException { String baseURI = null; XProcRuntime runtime = registry.getRuntime(xdef); XStep step = runtime.getXProcData().getStep(); // FIXME: this can't be the best way to do this... // step == null in use-when if (step != null && !(step instanceof XCompoundStep)) { throw XProcException.dynamicError(23); } if (sequences.length > 0) { NodeInfo item = (NodeInfo) sequences[0].head(); baseURI = item.getBaseURI(); } else { NodeInfo item = (NodeInfo) xPathContext.getContextItem(); baseURI = item.getBaseURI(); } if (baseURI == null) { return new AnyURIValue(""); } return new AnyURIValue(baseURI); } }
public Sequence call(XPathContext xPathContext, Sequence[] sequences) throws XPathException { String baseURI = null; XProcRuntime runtime = registry.getRuntime(xdef); XStep step = runtime.getXProcData().getStep(); // FIXME: this can't be the best way to do this... // step == null in use-when if (step != null && !(step instanceof XCompoundStep)) { throw XProcException.dynamicError(23); } if (sequences.length > 0) { NodeInfo item = (NodeInfo) sequences[0].head(); baseURI = item.getBaseURI(); } else { NodeInfo item = (NodeInfo) xPathContext.getContextItem(); baseURI = item.getBaseURI(); } if (baseURI == null) { return new AnyURIValue(""); } return new AnyURIValue(baseURI); } }
XStep step = runtime.getXProcData().getStep();