public Source resolve(String href, String base) throws TransformerException { if ("iso_schematron_skeleton_for_saxon.xsl".equals(href)) { return new SAXSource(new InputSource(skeleton)); } else { throw new XProcException(step.getNode(), "Failed to resolve " + href + " from JAR file."); } } }
public Source resolve(String href, String base) throws TransformerException { if ("iso_schematron_skeleton_for_saxon.xsl".equals(href)) { return new SAXSource(new InputSource(skeleton)); } else { throw new XProcException(step.getNode(), "Failed to resolve " + href + " from JAR file."); } } }
public void store(OutputStream content) throws IOException { OutputStream out = new BufferedOutputStream(content); try { processor.format(source.read(),out,contentType); } catch (SaxonApiException e) { throw new XProcException(step.getNode(), "Failed to process FO document", e); } finally { out.close(); } } });
public void store(OutputStream content) throws IOException { OutputStream out = new BufferedOutputStream(content); try { processor.format(source.read(),out,contentType); } catch (SaxonApiException e) { throw new XProcException(step.getNode(), "Failed to process FO document", e); } finally { out.close(); } } });
private XdmNode expandXIncludes(XdmNode doc) { logger.trace(MessageFormatter.nodeMessage(doc, "Starting expandXIncludes")); ProcessMatch matcher = new ProcessMatch(runtime, this); matcherStack.push(matcher); matcher.match(doc, new RuntimeValue("/|*", step.getNode())); XdmNode result = matcher.getResult(); matcher = matcherStack.pop(); return result; }
private XdmNode expandXIncludes(XdmNode doc) { logger.trace(MessageFormatter.nodeMessage(doc, "Starting expandXIncludes")); ProcessMatch matcher = new ProcessMatch(runtime, this); matcherStack.push(matcher); matcher.match(doc, new RuntimeValue("/|*", step.getNode())); XdmNode result = matcher.getResult(); matcher = matcherStack.pop(); return result; }
public void setParameter(QName name, RuntimeValue value) { if (!"".equals(name.getNamespaceURI())) { throw new XProcException(step.getNode(), "The p:xsl-formatter parameters are in no namespace: " + name + " (" + name.getNamespaceURI() + ")"); } options.setProperty(name.getLocalName(), value.getString()); }
public void setParameter(QName name, RuntimeValue value) { if (!"".equals(name.getNamespaceURI())) { throw new XProcException(step.getNode(), "The p:xsl-formatter parameters are in no namespace: " + name + " (" + name.getNamespaceURI() + ")"); } options.setProperty(name.getLocalName(), value.getString()); }
public void setParameter(QName name, RuntimeValue value) { if (!"".equals(name.getNamespaceURI())) { throw new XProcException(step.getNode(), "The cx:css-formatter parameters are in no namespace: " + name + " (" + name.getNamespaceURI() + ")"); } options.setProperty(name.getLocalName(), value.getString()); }
public void setParameter(QName name, RuntimeValue value) { if (!"".equals(name.getNamespaceURI())) { throw new XProcException(step.getNode(), "The cx:css-formatter parameters are in no namespace: " + name + " (" + name.getNamespaceURI() + ")"); } options.setProperty(name.getLocalName(), value.getString()); }
@Override public void run() throws SaxonApiException { super.run(); try { XMLCalabashHelper.transform( new CssShiftStringSetTransformer(), sourcePipe, resultPipe, runtime); } catch (Exception e) { logger.error("css:shift-string-set failed", e); throw new XProcException(step.getNode(), e); } }
@Override public void run() throws SaxonApiException { super.run(); try { XMLCalabashHelper.transform( new ShiftObflMarkerTransform(), sourcePipe, resultPipe, runtime); } catch (Exception e) { logger.error("pxi:shift-obfl-marker failed", e); throw new XProcException(step.getNode(), e); } }
public XdmNode fixup(XdmNode node) { matcher = new ProcessMatch(runtime, this); matcher.match(node, new RuntimeValue("*", step.getNode())); XdmNode fixed = matcher.getResult(); return fixed; }
public XdmNode fixup(XdmNode node) { matcher = new ProcessMatch(runtime, this); matcher.match(node, new RuntimeValue("*", step.getNode())); XdmNode fixed = matcher.getResult(); return fixed; }
public void run() throws SaxonApiException { super.run(); HashSet<String> excludeUris = S9apiUtils.excludeInlinePrefixes(step.getNode(), getOption(_prefixes).getString()); while (source.moreDocuments()) { XdmNode doc = source.read(); logger.trace(MessageFormatter.nodeMessage(step.getNode(), "Namespace-delete step " + step.getName() + " read " + doc.getDocumentURI())); doc = S9apiUtils.removeNamespaces(runtime, doc, excludeUris, false); result.write(doc); } } }
public void run() throws SaxonApiException { super.run(); HashSet<String> excludeUris = S9apiUtils.excludeInlinePrefixes(step.getNode(), getOption(_prefixes).getString()); while (source.moreDocuments()) { XdmNode doc = source.read(); logger.trace(MessageFormatter.nodeMessage(step.getNode(), "Namespace-delete step " + step.getName() + " read " + doc.getDocumentURI())); doc = S9apiUtils.removeNamespaces(runtime, doc, excludeUris, false); result.write(doc); } } }
public void run() throws SaxonApiException { super.run(); String selectExpr = getOption(_select).getString(); Select input = new Select(runtime,source,selectExpr,step.getNode()); while (input.moreDocuments()) { XdmNode doc = input.read(); result.write(doc); } } }
public void run() throws SaxonApiException { super.run(); String selectExpr = getOption(_select).getString(); Select input = new Select(runtime,source,selectExpr,step.getNode()); while (input.moreDocuments()) { XdmNode doc = input.read(); result.write(doc); } } }
public void run() throws SaxonApiException { super.run(); all = getOption(_all, false); relative = getOption(_relative, true); if (all && relative) { throw XProcException.stepError(58); } matcher = new ProcessMatch(runtime, this); matcher.match(source.read(), new RuntimeValue("*", step.getNode())); XdmNode doc = matcher.getResult(); result.write(doc); }
public void run() throws SaxonApiException { super.run(); all = getOption(_all, false); relative = getOption(_relative, true); if (all && relative) { throw XProcException.stepError(58); } matcher = new ProcessMatch(runtime, this); matcher.match(source.read(), new RuntimeValue("*", step.getNode())); XdmNode doc = matcher.getResult(); result.write(doc); }