public DefaultStep(XProcRuntime runtime, XAtomicStep step) { this.runtime = runtime; this.step = step; Class impl = runtime.getConfiguration().implementations.get(step.getType()); if (impl == null) { // We're headed for a world of hurt... logger = LoggerFactory.getLogger(DefaultStep.class); } else { logger = LoggerFactory.getLogger(impl); } }
public DefaultStep(XProcRuntime runtime, XAtomicStep step) { this.runtime = runtime; this.step = step; Class impl = runtime.getConfiguration().implementations.get(step.getType()); if (impl == null) { // We're headed for a world of hurt... logger = LoggerFactory.getLogger(DefaultStep.class); } else { logger = LoggerFactory.getLogger(impl); } }
public static void showVersion(XProcRuntime runtime) { System.out.println("XML Calabash version " + XProcConstants.XPROC_VERSION + ", an XProc processor."); if (runtime != null) { System.out.print("Running on Saxon version "); System.out.print(runtime.getConfiguration().getProcessor().getSaxonProductVersion()); System.out.print(", "); System.out.print(runtime.getConfiguration().getProcessor().getUnderlyingConfiguration().getEditionCode()); System.out.println(" edition."); } System.out.println("Copyright (c) 2007-2013 Norman Walsh"); System.out.println("See docs/notices/NOTICES in the distribution for licensing"); System.out.println("See also http://xmlcalabash.com/ for more information"); System.out.println(""); }
public static void showVersion(XProcRuntime runtime) { System.out.println("XML Calabash version " + XProcConstants.XPROC_VERSION + ", an XProc processor."); if (runtime != null) { System.out.print("Running on Saxon version "); System.out.print(runtime.getConfiguration().getProcessor().getSaxonProductVersion()); System.out.print(", "); System.out.print(runtime.getConfiguration().getProcessor().getUnderlyingConfiguration().getEditionCode()); System.out.println(" edition."); } System.out.println("Copyright (c) 2007-2013 Norman Walsh"); System.out.println("See docs/notices/NOTICES in the distribution for licensing"); System.out.println("See also http://xmlcalabash.com/ for more information"); System.out.println(""); }
public void run10(XdmNode stylesheet, XdmNode document) { try { InputSource is = S9apiUtils.xdmToInputSource(runtime, stylesheet); TransformerFactory tfactory = TransformerFactory.newInstance(); Transformer transformer = tfactory.newTransformer(new SAXSource(is)); transformer.setURIResolver(runtime.getResolver()); for (QName name : params.keySet()) { RuntimeValue v = params.get(name); transformer.setParameter(name.getClarkName(), v.getString()); } DOMResult result = new DOMResult(); is = S9apiUtils.xdmToInputSource(runtime, document); transformer.transform(new SAXSource(is), result); DocumentBuilder xdmBuilder = runtime.getConfiguration().getProcessor().newDocumentBuilder(); XdmNode xformed = xdmBuilder.build(new DOMSource(result.getNode())); // Can be null when nothing is written to the principle result tree... if (xformed != null) { // There used to be an attempt to set the system identifier of the xformed // document, but that's not allowed in Saxon 9.8. resultPipe.write(xformed); } } catch (SaxonApiException sae) { throw new XProcException(sae); } catch (TransformerConfigurationException tce) { throw new XProcException(tce); } catch (TransformerException te) { throw new XProcException(te); } }
return runtime.getHtmlSerializer() ? "true" : "false"; } else if ("saxon-version".equals(local)) { return runtime.getConfiguration().getProcessor().getSaxonProductVersion(); } else if ("saxon-edition".equals(local)) { return runtime.getConfiguration().saxonProcessor; } else { return null;
public void run10(XdmNode stylesheet, XdmNode document) { try { InputSource is = S9apiUtils.xdmToInputSource(runtime, stylesheet); TransformerFactory tfactory = TransformerFactory.newInstance(); Transformer transformer = tfactory.newTransformer(new SAXSource(is)); transformer.setURIResolver(runtime.getResolver()); for (QName name : params.keySet()) { RuntimeValue v = params.get(name); transformer.setParameter(name.getClarkName(), v.getString()); } DOMResult result = new DOMResult(); is = S9apiUtils.xdmToInputSource(runtime, document); transformer.transform(new SAXSource(is), result); DocumentBuilder xdmBuilder = runtime.getConfiguration().getProcessor().newDocumentBuilder(); XdmNode xformed = xdmBuilder.build(new DOMSource(result.getNode())); // Can be null when nothing is written to the principle result tree... if (xformed != null) { // There used to be an attempt to set the system identifier of the xformed // document, but that's not allowed in Saxon 9.8. resultPipe.write(xformed); } } catch (SaxonApiException sae) { throw new XProcException(sae); } catch (TransformerConfigurationException tce) { throw new XProcException(tce); } catch (TransformerException te) { throw new XProcException(te); } }
public PipeLogger(XProcRuntime xproc, Log log) { runtime = xproc; this.log = log; config = xproc.getConfiguration();
return runtime.getHtmlSerializer() ? "true" : "false"; } else if ("saxon-version".equals(local)) { return runtime.getConfiguration().getProcessor().getSaxonProductVersion(); } else if ("saxon-edition".equals(local)) { return runtime.getConfiguration().saxonProcessor; } else { return null;
public PipeLogger(XProcRuntime xproc, Log log) { runtime = xproc; this.log = log; config = xproc.getConfiguration();
if (runtime.getConfiguration().foProcessor != null) { foClasses.add(runtime.getConfiguration().foProcessor);
if (runtime.getConfiguration().foProcessor != null) { foClasses.add(runtime.getConfiguration().foProcessor);
public void run() throws SaxonApiException { super.run(); String cssClass = runtime.getConfiguration().cssProcessor; if (cssClass == null) { throw new XProcException("No CSS processor class defined");
public void run() throws SaxonApiException { XProcStep xstep = runtime.getConfiguration().newStep(runtime, this);
public void run() throws SaxonApiException { super.run(); String cssClass = runtime.getConfiguration().cssProcessor; if (cssClass == null) { throw new XProcException("No CSS processor class defined");
public void run() throws SaxonApiException { XProcStep xstep = runtime.getConfiguration().newStep(runtime, this);
public Serialization(XProcRuntime xproc, XdmNode node) { super(xproc,node); config = xproc.getConfiguration(); byteOrderMark = defValue("byte-order-mark", false); cdataSectionElements = null; // FIXME: support cdata-section-elements doctypePublic = defValue("doctype-public", (String) null); doctypeSystem = defValue("doctype-system", (String) null); encoding = defValue("encoding", (String) null); escapeURIAttributes = defValue("escape-uri-attributes", false); includeContentType = defValue("include-content-type", false); indent = defValue("indent", false); mediaType = defValue("media-type", (String) null); method = new QName("",defValue("method", "xml")); normalizationForm = defValue("normalization-form", (String) null); omitXMLDeclaration = defValue("omit-xml-declaration", true); standalone = defValue("standalone", "omit"); undeclarePrefixes = defValue("undeclare-prefixes", false); version = defValue("version", (String) null); }
public Serialization(XProcRuntime xproc, XdmNode node) { super(xproc,node); config = xproc.getConfiguration(); byteOrderMark = defValue("byte-order-mark", false); cdataSectionElements = null; // FIXME: support cdata-section-elements doctypePublic = defValue("doctype-public", (String) null); doctypeSystem = defValue("doctype-system", (String) null); encoding = defValue("encoding", (String) null); escapeURIAttributes = defValue("escape-uri-attributes", false); includeContentType = defValue("include-content-type", false); indent = defValue("indent", false); mediaType = defValue("media-type", (String) null); method = new QName("",defValue("method", "xml")); normalizationForm = defValue("normalization-form", (String) null); omitXMLDeclaration = defValue("omit-xml-declaration", true); standalone = defValue("standalone", "omit"); undeclarePrefixes = defValue("undeclare-prefixes", false); version = defValue("version", (String) null); }
value = runtime.getConfiguration().isStepAvailable(decl.getDeclaredType()); } else { value = true;
value = runtime.getConfiguration().isStepAvailable(decl.getDeclaredType()); } else { value = true;