/** * Get the short name of the Saxon product edition, for example "EE". This represents the kind of configuration * that has been created, rather than the software that has been installed; for example it is possible to * instantiate an "HE" configuration even when using the "PE" or "EE" software. * @return the Saxon edition code: "EE", "PE", or "HE" */ public String getSaxonEdition() { return config.getEditionCode(); }
/** * Get the short name of the Saxon product edition, for example "EE". This represents the kind of configuration * that has been created, rather than the software that has been installed; for example it is possible to * instantiate an "HE" configuration even when using the "PE" or "EE" software. * @return the Saxon edition code: "EE", "PE", or "HE" */ public String getSaxonEdition() { return config.getEditionCode(); }
/** * Create a PackageData object * @param config the Saxon configuration */ public PackageData(Configuration config) { if (config == null) { throw new NullPointerException(); } this.config = config; targetEdition = config.getEditionCode(); }
/** * Create a PackageData object * @param config the Saxon configuration */ public PackageData(Configuration config) { if (config == null) { throw new NullPointerException(); } this.config = config; targetEdition = config.getEditionCode(); globalSlotManager = config.makeSlotManager(); }
/** * Create a Processor based on an existing Configuration. This constructor is useful for transition, * when new components of an application are to use s9api interfaces but existing components use lower-level * interfaces. * * @param config the Configuration to be used by this processor * @since 9.3 */ public Processor(/*@NotNull*/ Configuration config) { this.config = config; if (config.getEditionCode().equals("EE")) { schemaManager = makeSchemaManager(); } }
/** * Create a Processor based on an existing Configuration. This constructor is useful for transition, * when new components of an application are to use s9api interfaces but existing components use lower-level * interfaces. * * @param config the Configuration to be used by this processor * @since 9.3 */ public Processor(/*@NotNull*/ Configuration config) { this.config = config; if (config.getEditionCode().equals("EE")) { schemaManager = makeSchemaManager(); } }
private void applyProperty(Properties props, String propertyName, String featureKey) { String value = props.getProperty(propertyName); if (value != null) { try { config.setConfigurationProperty(featureKey, value); } catch (IllegalArgumentException e) { String message = e.getMessage(); if (message.startsWith(featureKey)) { message = message.replace(featureKey, "Value"); } if (message.startsWith("Unknown configuration property")) { message = "Property not available in Saxon-" + config.getEditionCode(); } error(props.getProperty("#element"), propertyName, value, message); } } }
private void applyProperty(Properties props, String propertyName, String featureKey) { String value = props.getProperty(propertyName); if (value != null) { try { config.setConfigurationProperty(featureKey, value); } catch (IllegalArgumentException e) { String message = e.getMessage(); if (message.startsWith(featureKey)) { message = message.replace(featureKey, "Value"); } if (message.startsWith("Unknown configuration property")) { message = "Property not available in Saxon-" + config.getEditionCode(); } error(props.getProperty("#element"), propertyName, value, message); } } }
/** * Get a message used to identify this product when a transformation is run using the -t option * * @return A string containing both the product name and the product * version * @since 8.4 */ public String getProductTitle() { return "Saxon-" + getEditionCode() + " " + Version.getProductVersion() + Version.platform.getPlatformSuffix() + " from Saxonica"; }
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 String getProductVersion() { String sver = processor.getSaxonProductVersion(); String sed = processor.getUnderlyingConfiguration().getEditionCode(); return XProcConstants.XPROC_VERSION + " (for Saxon " + sver + "/" + sed + ")"; }
public String getProductVersion() { String sver = processor.getSaxonProductVersion(); String sed = processor.getUnderlyingConfiguration().getEditionCode(); return XProcConstants.XPROC_VERSION + " (for Saxon " + sver + "/" + sed + ")"; }
/** * Get a message used to identify this product when a transformation is run using the -t option * * @return A string containing both the product name and the product * version * @since 8.4 */ public String getProductTitle() { return "Saxon-" + getEditionCode() + " " + Version.getProductVersion() + Version.platform.getPlatformSuffix() + " from Saxonica"; }
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(""); }
/** * Create a Processor * * @param licensedEdition indicates whether the Processor requires features of Saxon that need a license * file (that is, features not available in Saxon HE (Home Edition). If true, the method will create * a Configuration appropriate to the version of the software that is running: for example, if running * Saxon-EE, it will create an EnterpriseConfiguration. The method does not at this stage check that a license * is available, and in the absence of a license, it should run successfully provided no features that * require licensing are actually used. If the argument is set to false, a plain Home Edition Configuration * is created unconditionally. */ public Processor(boolean licensedEdition) { if (licensedEdition) { config = Configuration.newConfiguration(); if (config.getEditionCode().equals("EE")) { schemaManager = makeSchemaManager(); } } else { config = new Configuration(); } config.setProcessor(this); }
/** * Create a Processor * * @param licensedEdition indicates whether the Processor requires features of Saxon that need a license * file (that is, features not available in Saxon HE (Home Edition). If true, the method will create * a Configuration appropriate to the version of the software that is running: for example, if running * Saxon-EE, it will create an EnterpriseConfiguration. The method does not at this stage check that a license * is available, and in the absence of a license, it should run successfully provided no features that * require licensing are actually used. If the argument is set to false, a plain Home Edition Configuration * is created unconditionally. */ public Processor(boolean licensedEdition) { if (licensedEdition) { config = Configuration.newConfiguration(); if (config.getEditionCode().equals("EE")) { schemaManager = makeSchemaManager(); } } else { config = new Configuration(); } config.setProcessor(this); }
/** * Protected constructor. The public way to create an <tt>XsltCompiler</tt> is by using the factory method * {@link Processor#newXsltCompiler} . * * @param processor the Saxon processor */ protected XsltCompiler(Processor processor) { this.processor = processor; this.config = processor.getUnderlyingConfiguration(); compilerInfo = new CompilerInfo(config.getDefaultXsltCompilerInfo()); compilerInfo.setGenerateByteCode(config.isGenerateByteCode(Configuration.XSLT)); compilerInfo.setTargetEdition(config.getEditionCode()); compilerInfo.setJustInTimeCompilation(config.isJITEnabled()); }
/** * Protected constructor. The public way to create an <tt>XsltCompiler</tt> is by using the factory method * {@link Processor#newXsltCompiler} . * * @param processor the Saxon processor */ protected XsltCompiler(Processor processor) { this.processor = processor; this.config = processor.getUnderlyingConfiguration(); compilerInfo = new CompilerInfo(config.getDefaultXsltCompilerInfo()); compilerInfo.setGenerateByteCode(config.isGenerateByteCode(Configuration.XSLT)); compilerInfo.setTargetEdition(config.getEditionCode()); compilerInfo.setJustInTimeCompilation(config.isJITEnabled()); }
public void prepareAttributes() throws XPathException { AttributeCollection atts = getAttributeList(); String selectAtt = null; for (int a = 0; a < atts.getLength(); a++) { String f = atts.getQName(a); if (f.equals("select")) { selectAtt = atts.getValue(a); select = makeExpression(selectAtt, a); } else if (atts.getLocalName(a).equals("threads") && atts.getURI(a).equals(NamespaceConstant.SAXON)) { String threadsAtt = Whitespace.trim(atts.getValue(a)); threads = makeAttributeValueTemplate(threadsAtt, a); if (getCompilation().getCompilerInfo().isCompileWithTracing()) { compileWarning("saxon:threads - no multithreading takes place when compiling with trace enabled", SaxonErrorCode.SXWN9012); threads = new StringLiteral("0"); } else if (!"EE".equals(getConfiguration().getEditionCode())) { compileWarning("saxon:threads - ignored when not running Saxon-EE", SaxonErrorCode.SXWN9013); threads = new StringLiteral("0"); } } else { checkUnknownAttribute(atts.getNodeName(a)); } } if (selectAtt == null) { reportAbsence("select"); select = Literal.makeEmptySequence(); } }
public void prepareAttributes() throws XPathException { AttributeCollection atts = getAttributeList(); String selectAtt = null; for (int a = 0; a < atts.getLength(); a++) { String f = atts.getQName(a); if (f.equals("select")) { selectAtt = atts.getValue(a); select = makeExpression(selectAtt, a); } else if (atts.getLocalName(a).equals("threads") && atts.getURI(a).equals(NamespaceConstant.SAXON)) { String threadsAtt = Whitespace.trim(atts.getValue(a)); threads = makeAttributeValueTemplate(threadsAtt, a); if (getCompilation().getCompilerInfo().isCompileWithTracing()) { compileWarning("saxon:threads - no multithreading takes place when compiling with trace enabled", SaxonErrorCode.SXWN9012); threads = new StringLiteral("0"); } else if (!"EE".equals(getConfiguration().getEditionCode())) { compileWarning("saxon:threads - ignored when not running Saxon-EE", SaxonErrorCode.SXWN9013); threads = new StringLiteral("0"); } } else { checkUnknownAttribute(atts.getNodeName(a)); } } if (selectAtt == null) { reportAbsence("select"); select = Literal.makeEmptySequence(); } }