Class EnterpriseConfiguration

All Implemented Interfaces:
SourceResolver

public final class EnterpriseConfiguration extends ProfessionalConfiguration
A subclass of Configuration that defines a processor with Saxon-EE capabilities. This contains helper methods invoked both at compile time and at run-time to perform operations that are allowed only in a schema-aware processor; the superclass Configuration contains the dummy versions of these methods used in a non-schema-aware processor. The interface is designed so that the calling classes contain no references to classes that are available only in the schema-aware product.

Applications should avoid using this class directly, and should instead access all the necessary functionality through its superclass, Configuration.

  • Constructor Details

    • EnterpriseConfiguration

      public EnterpriseConfiguration()
      Create an EnterpriseConfiguration
  • Method Details

    • makeStaticQueryContext

      protected StaticQueryContext makeStaticQueryContext(boolean copyFromDefault)
      Description copied from class: Configuration
      Make a new static query context object using the factory registered with this configuration
      Overrides:
      makeStaticQueryContext in class Configuration
      Parameters:
      copyFromDefault - true if the new static query context is to copy the properties of the default static query context held in the configuration
      Returns:
      the new static query context object
    • getEditionCode

      public String getEditionCode()
      Get the edition code identifying this configuration: "HE", "PE" or "EE"
      Overrides:
      getEditionCode in class ProfessionalConfiguration
      Returns:
      the code identifying the Saxon edition associated with this configuration
    • setFeature

      protected void setFeature(FeatureData feature, Object value)
      Set a property of the configuration. This method underpins the setAttribute() method of the TransformerFactory implementation, and is provided to enable setting of Configuration properties using URIs without instantiating a TransformerFactory: specifically, this may be useful when running XQuery, and it is also used by the Validator API
      Overrides:
      setFeature in class ProfessionalConfiguration
      Parameters:
      feature - the property to be set. See the class Feature for constants representing the properties that can be set.
      value - the value of the property
      Throws:
      IllegalArgumentException - if the property name is not recognized or if the value is not a valid value for the named property
    • getFeature

      protected Object getFeature(FeatureData feature)
      Get a property of the configuration
      Overrides:
      getFeature in class Configuration
      Parameters:
      feature - the required property. See the class Feature for constants representing the property names that can be requested.
      Returns:
      the value of the property
      Throws:
      IllegalArgumentException - thrown if the property is not one that Saxon recognizes.
    • checkLicensedFeature

      public void checkLicensedFeature(int feature, String name, int localLicenseId) throws LicenseException
      Check whether a particular feature is licensed, with a fatal error if it is not
      Overrides:
      checkLicensedFeature in class ProfessionalConfiguration
      Parameters:
      feature - the feature in question, identified by a constant in class Configuration.LicenseFeature
      name - the name of the required feature, for use in diagnostics
      localLicenseId - identifies a license key embedded in the SEF file
      Throws:
      LicenseException - if the feature is not licensed
    • setLicensedFeatures

      protected void setLicensedFeatures()
      Overrides:
      setLicensedFeatures in class ProfessionalConfiguration
    • testFeature

      protected boolean testFeature(int feature)
      Determine if a particular feature is licensed. Note, this method should only be called if it is known that the license file has been loaded. If it is not known whether the license file has been loaded, use the method Configuration.isLicensedFeature(int) which will load the license when necessary.
      Overrides:
      testFeature in class ProfessionalConfiguration
      Parameters:
      feature - the feature in question, identified by a constant in class Configuration.LicenseFeature
      Returns:
      true if the feature is available, otherwise false
    • needEnterpriseEdition

      protected void needEnterpriseEdition()
      Throw an error indicating that a request cannot be satisfied because it requires the enterprise edition of Saxon. If we get this far, we've got Saxon-EE loaded, and an EnterpriseConfiguration; the problem must therefore be with the license file.
      Overrides:
      needEnterpriseEdition in class Configuration
    • makeStyleNodeFactory

      public StyleNodeFactory makeStyleNodeFactory(Compilation compilation)
      Factory method to make a StyleNodeFactory, used for constructing elements in a stylesheet document
      Overrides:
      makeStyleNodeFactory in class ProfessionalConfiguration
      Parameters:
      compilation - the compilation episode (compiling one XSLT package)
      Returns:
      the StyleNodeFactory used in this Configuration
    • makeStylesheetPackage

      public StylesheetPackage makeStylesheetPackage()
      Factory method to make a StylesheetPackage
      Overrides:
      makeStylesheetPackage in class Configuration
      Returns:
      a StylesheetPackage suitable for use in this Configuration
    • makeAccumulatorRegistry

      public AccumulatorRegistry makeAccumulatorRegistry()
      Factory method to make the AccumulatorManager, used for static information about the accumulators used in a particular package
      Overrides:
      makeAccumulatorRegistry in class Configuration
      Returns:
      a new AccumulatorManager appropriate to this Configuration
    • getVendorFunctionSet

      public BuiltInFunctionSet getVendorFunctionSet()
      Create a function library for Saxon-defined extension functions available in Enterprise Edition
      Overrides:
      getVendorFunctionSet in class ProfessionalConfiguration
      Returns:
      the new function library
    • newUserFunction

      public UserFunction newUserFunction(boolean memoFunction, FunctionStreamability streamability)
      Make a UserFunction object. This method is for internal use.
      Overrides:
      newUserFunction in class Configuration
      Parameters:
      memoFunction - true if the function is to be a memo function, This option is ignored in Saxon-HE.
      streamability - the declared streamability of the function
      Returns:
      the newly created user-defined function
    • setSchemaURIResolver

      public void setSchemaURIResolver(SchemaURIResolver resolver)
      Set a user-defined SchemaURIResolver for resolving URIs used in "import schema" declarations. This acts as a default for any XsdCompiler created from this point on.
      Parameters:
      resolver - the URI resolver used for import schema declarations
    • createValidityReporter

      public InvalidityReportGeneratorEE createValidityReporter()
      Description copied from class: Configuration
      Register a report generator for reporting invalidities detected in the course of schema validation
      Overrides:
      createValidityReporter in class Configuration
      Returns:
      a report generator.
    • makePackageLoader

      public PackageLoaderEE makePackageLoader()
      Description copied from class: Configuration
      Create a package loader, for reloading SEF files, appropriate to the Saxon edition being used
      Overrides:
      makePackageLoader in class ProfessionalConfiguration
      Returns:
      a package loader
    • newSchemaCompiler

      public SchemaCompiler newSchemaCompiler()
      Make a SchemaCompiler which can be used to compile schema documents. The initial settings of the SchemaCompiler are a snapshot of the settings in the EnterpriseConfiguration. Other methods in EnterpriseConfiguration provided for the purpose of compiling schemas are retained for compatibility reasons.
      Returns:
      a new SchemaCompiler object
      Since:
      8.9
    • setOccurrenceLimits

      public void setOccurrenceLimits(int minimum, int maximum)
      Set the occurrence limits to be used when compiling a finite state automaton.
      Parameters:
      minimum - The highest value of minOccurs that will be strictly enforced. If the actual value of minOccurs in a schema is higher than this value, it will be treated as if this value had been specified. The default is 100.
      maximum - The highest value of maxOccurs that will be strictly enforced. If the actual value of maxOccurs in a schema is higher than this value, it will be treated as if "unbounded" had been specified. The default is 250.
    • getOccurrenceLimits

      public int[] getOccurrenceLimits()
      Get the occurrence limits previously set using setOccurrenceLimits (or the default)
      Returns:
      an array of two integers, the minimum occurrence limit and the maximum occurrence limit
    • getSchemaURIResolver

      public SchemaURIResolver getSchemaURIResolver()
      Get the user-defined SchemaURIResolver for resolving URIs used in "import schema" declarations; if none has been explicitly set, returns the standard schema URI resolver. This returns the default setting used when creating a new XsdCompiler; it is not affected by subsequent calls to XsdCompiler.setSchemaURIResolver(SchemaURIResolver).
      Returns:
      the user-defined SchemaURIResolver if there is one; otherwise the standard schema URI resolver.
    • loadSchema

      public Schema loadSchema(String absoluteURI) throws SchemaException
      Simple interface to load a schema document. This method has no effect on the state of the Configuration.
      Overrides:
      loadSchema in class Configuration
      Parameters:
      absoluteURI - the absolute URI of the location of the schema document
      Returns:
      the compiled schema
      Throws:
      SchemaException - if the schema document at the given location cannot be read or is invalid
    • addSchemaSource

      public void addSchemaSource(Source schemaSource, ErrorReporter errorReporter) throws SchemaException
      Load a schema, which will be available for use by all subsequent operations using this EnterpriseConfiguration.
      Overrides:
      addSchemaSource in class Configuration
      Parameters:
      schemaSource - the JAXP Source object identifying the schema document to be loaded. This may be either a source schema document in XSD format, or a compiled schema in Saxon's SCM format
      errorReporter - the ErrorReporter to be notified of any errors in the schema. If null, the configuration's ErrorReporter is used
      Throws:
      SchemaException - if the schema cannot be read or parsed or if it is invalid
    • getSchemaForBuiltInNamespace

      public Schema getSchemaForBuiltInNamespace(NamespaceUri namespace)
      Add a built-in schema for a given namespace. This is a no-op if the configuration is not schema-aware
      Overrides:
      getSchemaForBuiltInNamespace in class Configuration
      Parameters:
      namespace - the namespace. Currently built-in schemas are available for the XML and FN namespaces
    • addSchemaSource

      public void addSchemaSource(Source schemaSource, ErrorReporter errorReporter, SchemaCompiler compiler) throws SchemaException
      Load a schema, which will be available for use by all subsequent operations using this EnterpriseConfiguration.
      Parameters:
      schemaSource - the JAXP Source object identifying the schema document to be loaded. This may be either a source schema document in XSD format, or a compiled schema in Saxon's SCM format
      errorReporter - the ErrorListener to be notified of any errors in the schema. If null, the configuration's errorListener is used
      compiler - the schema compiler to be used. This allows a cache of schema documents (retained by the schema compiler) to be reused when compiling multiple schema documents. See bug #4982.
      Throws:
      SchemaException - if the schema cannot be read or parsed or if it is invalid
    • getNamespaceStatus

      public int getNamespaceStatus(NamespaceUri namespace)
      Get the status of a particular schema namespace.
      Parameters:
      namespace - the Namespace URI whose status is required (supply "" for the non-namespace)
      Returns:
      one of PreparedSchema.NAMESPACE_KNOWN, PreparedSchema.NAMESPACE_UNKNOWN, PreparedSchema.NAMESPACE_UNDER_CONSTRUCTION
    • setNamespaceStatus

      public void setNamespaceStatus(NamespaceUri namespace, int status)
      Set the status of a particular schema namespace.
      Parameters:
      namespace - the Namespace URI whose status is required (supply "" for the non-namespace)
      status - one of PreparedSchema.NAMESPACE_KNOWN, PreparedSchema.NAMESPACE_UNKNOWN, PreparedSchema.NAMESPACE_UNDER_CONSTRUCTION
    • isSchemaAvailable

      public boolean isSchemaAvailable(NamespaceUri targetNamespace)
      Determine whether the Configuration contains a cached schema for a given target namespace
      Overrides:
      isSchemaAvailable in class Configuration
      Parameters:
      targetNamespace - the target namespace of the schema being sought (supply "" for the unnamed namespace)
      Returns:
      true if the schema for this namespace is available, false if not.
    • getCachedSchema

      public PreparedSchema getCachedSchema(NamespaceUri namespace)
      Get a cached schema. Note, this is currently used only for built-in schemas for namespaces such as FN, XML, XSI
      Parameters:
      namespace - the target namespace
      Returns:
      the schema for the namespace if available
    • setCachedSchema

      public void setCachedSchema(NamespaceUri namespace, PreparedSchema schema)
      Set a cached schema. Note, this is currently used only for built-in schemas for namespaces such as FN, XML, XSI
      Parameters:
      namespace - the target namespace
    • integrateSchema

      public PreparedSchema integrateSchema(PreparedSchema newSchema) throws SchemaException
      Integrate a new schema. The new schema is compared with existing schemas known to the configuration. If it exactly matches an existing schema, that schema is returned, so we avoid having multiple instances of the same schema. If it conflicts with an existing schema (for example, if we have a conflicting definition of the same named type), we throw an exception. If there is no overlap, we return the supplied schema unchanged, having registered it for comparison with future schemas.
      Parameters:
      newSchema - the new schema to be integrated
      Returns:
      the supplied schema if there are no conflicts, or an existing schema if it is an exact duplicate
      Throws:
      SchemaException - if the schema conflicts with an existing schema.
    • getSchemaForUuid

      public PreparedSchema getSchemaForUuid(String uuid)
    • getDeclaredSchemaParameters

      public Collection<GlobalParam> getDeclaredSchemaParameters()
      Get the set of saxon:param schema parameters declared in the schema held by this Configuration.
      Overrides:
      getDeclaredSchemaParameters in class Configuration
      Returns:
      the set of parameters. May return null if none have been declared.
    • getSchemaForXmlNamespace

      public PreparedSchema getSchemaForXmlNamespace()
      Get the built-in schema for the XML namespace
      Returns:
      the built-in schema for the XML namespace
    • getSchemaForXsiNamespace

      public PreparedSchema getSchemaForXsiNamespace()
      Get the built-in schema for the XSI namespace
      Returns:
      the built-in schema for the XSI namespace
    • getSchemaForFnNamespace

      public PreparedSchema getSchemaForFnNamespace()
      Get the built-in schema for the FN namespace
      Returns:
      the built-in schema for the XSI namespace
    • getXsdValidatorFunction

      public SystemFunction getXsdValidatorFunction(BuiltInFunctionSet.Entry details, int arity)
      Overrides:
      getXsdValidatorFunction in class Configuration
    • addValidatorToPipeline

      public Receiver addValidatorToPipeline(ParseOptions options, String systemId, Receiver destination) throws XPathException
      Description copied from class: Configuration
      Method to add a schema validator to a pipeline. Non-trivial implementation appears in EnterpriseConfiguration class
      Overrides:
      addValidatorToPipeline in class Configuration
      Parameters:
      options - the parser options
      systemId - used as base URI
      destination - the destination of the pipeline
      Returns:
      in this implementation, the destination unchanged
      Throws:
      XPathException - if the attempt to get a schema validator fails
    • loadStubFunctionLibrary

      public FunctionLibrary loadStubFunctionLibrary(StreamSource jsonSignatures) throws XPathException
      Overrides:
      loadStubFunctionLibrary in class Configuration
      Throws:
      XPathException
    • makeUserUnionType

      public UserUnionType makeUserUnionType(List<AtomicType> memberTypes)
      Make a union type with a given list of member types
      Overrides:
      makeUserUnionType in class Configuration
      Parameters:
      memberTypes - the member types
      Returns:
      the union type with these member types
    • checkTypeDerivationIsOK

      public void checkTypeDerivationIsOK(SchemaType derived, SchemaType base, int block) throws SchemaException
      Check that a type is validly derived from another type, following the rules for the Schema Component Constraint "Is Type Derivation OK (Simple)" (3.14.6) or "Is Type Derivation OK (Complex)" (3.4.6) as appropriate.
      Overrides:
      checkTypeDerivationIsOK in class Configuration
      Parameters:
      derived - the derived type
      base - the base type; the algorithm tests whether derivation from this type is permitted
      block - the derivations that are blocked by the relevant element declaration
      Throws:
      SchemaException - if the derivation is not allowed
    • prepareValidationReporting

      public void prepareValidationReporting(XPathContext context, ParseOptions options)
      Set validation reporting options. Called by instructions that invoke validation to set up an appropriate invalidity handler
      Overrides:
      prepareValidationReporting in class Configuration
      Parameters:
      context - the XPath evaluation context
      options - the parser options, to be updated
    • getAnnotationStripper

      public Receiver getAnnotationStripper(Receiver destination)
      Add to a pipeline a receiver that strips all type annotations. This has a null implementation in the Saxon-HE product, because type annotations can never arise.
      Overrides:
      getAnnotationStripper in class Configuration
      Parameters:
      destination - the destination for events after stripping type annotations
      Returns:
      the type-stripping receiver
    • newExpressionParser

      public XPathParser newExpressionParser(String language, boolean updating, StaticContext env) throws XPathException
      Make an expression Parser for a specified version of XPath or XQuery
      Overrides:
      newExpressionParser in class ProfessionalConfiguration
      Parameters:
      language - set to "XP" (XPath) or "XQ" (XQuery) or "PATTERN" (XSLT Patterns)
      updating - indicates whether or not XQuery update syntax may be used. Note that XQuery Update is supported only in Saxon-EE
      env -
      Returns:
      the QueryParser
      Throws:
      XPathException - if this version of Saxon does not support the requested options
    • newExpressionExporter

      public ExpressionPresenter newExpressionExporter(String target, OutputStream destination, StylesheetPackage rootPackage) throws XPathException
      Get a new ExpressionPresenter capable of exporting a compiled stylesheet
      Overrides:
      newExpressionExporter in class Configuration
      Parameters:
      target - the target environment, e.g. EE, JS. For export to SaxonJS the values JS2 and JS3 are recognised to distinguish the target version
      destination - the destination for the output file
      rootPackage - the compiled stylesheet package
      Returns:
      a suitable Expression Presenter
      Throws:
      XPathException - if none is available (e.g. because this is not Saxon-EE)
    • newPendingUpdateList

      public PendingUpdateList newPendingUpdateList(Schema schema)
      Get a new Pending Update List
      Overrides:
      newPendingUpdateList in class Configuration
      Returns:
      the new Pending Update List
    • makeSchemaURIResolver

      public SchemaURIResolver makeSchemaURIResolver(ResourceResolver resolver)
      Make a SchemaURIResolver that wraps a supplied URIResolver
      Overrides:
      makeSchemaURIResolver in class Configuration
      Parameters:
      resolver - the resolver to be used
      Returns:
      a new SchemaURIResolver (or null if this is not an EnterpriseConfiguration)
      Since:
      10.0
    • getFocusTrackerFactory

      public Function<SequenceIterator,FocusTrackingIterator> getFocusTrackerFactory(Executable exec, boolean multithreaded)
      Get a factory function that can be used to wrap a SequenceIterator in a FocusTrackingIterator. This is called by the Controller to get a default factory function; the value can be overridden by the application using Controller.setFocusTrackerFactory(java.util.function.Function). The FocusTrackingIterator that is created by the factory must be thread-safe if it is to be used for iterating over a sequence where the items might be processed asynchronously using xsl:result-document; for this reason this method is overridden for a Saxon-EE configuration.
      Overrides:
      getFocusTrackerFactory in class Configuration
      Parameters:
      exec - the executable; supplied so that the factory can be sensitive to whether calls on xsl:result-document are possible
      multithreaded - set to true to get a factory suitable for creating focus tracking iterators for a multi-threaded xsl:for-each instruction
      Returns:
      a suitable factory function
    • setStreamabilityEnabled

      public void setStreamabilityEnabled(boolean enabled)
      Set the streamability rules to be applied. Requires an EET license.
      Parameters:
      enabled - set to true if streamability checking (using W3C standard rules) is enabled for this configuration. Must be false under Saxon-HE
      Since:
      9.6. Changed in 9.8 to drop support for streamability="extended". Simplified and renamed (from setStreamability) in 10.0
    • isStreamabilityEnabled

      public boolean isStreamabilityEnabled()
      Ask whether streamability checking is enabled for this configuration
      Overrides:
      isStreamabilityEnabled in class Configuration
      Returns:
      always false for Saxon-HE; for Saxon-EE, true if an appropriate license is installed
    • makeStreamingTransformer

      public Receiver makeStreamingTransformer(Mode mode, ParameterSet ordinaryParams, ParameterSet tunnelParams, Outputter out, XPathContext context) throws XPathException
      Create a streaming transformer
      Overrides:
      makeStreamingTransformer in class Configuration
      Parameters:
      mode - the initial mode, which must be a streaming mode
      ordinaryParams - the parameters that are not tunnel parameters
      tunnelParams - the tunnel parameters
      out - the destination for the transformed document
      context - the initial XPath context
      Returns:
      a Receiver to which the streamed input document will be pushed
      Throws:
      XPathException - if a streaming transformer cannot be created (which is always the case in Saxon-HE and Saxon-PE)
    • makeStreamInstruction

      public Expression makeStreamInstruction(Expression hrefExp, Expression body, boolean streaming, ParseOptions options, PackageData packageData, Location location, RetainedStaticContext rsc) throws XPathException
      Overrides:
      makeStreamInstruction in class Configuration
      Throws:
      XPathException
    • checkStrictStreamability

      public void checkStrictStreamability(XSLTemplate template, Expression body) throws XPathException
      Check the streamability of a template rule
      Overrides:
      checkStrictStreamability in class Configuration
      Parameters:
      template - the xsl:template element in the stylesheet tree
      body - of the compiled body of the template rule
      Throws:
      XPathException - if streamability problems are found
    • isStreamedNode

      public boolean isStreamedNode(NodeInfo node)
      Ask whether a given node is a streamed node
      Overrides:
      isStreamedNode in class Configuration
      Parameters:
      node - the node in question
      Returns:
      true if the node is a node in a streamed document
    • getOptimizerOptions

      public OptimizerOptions getOptimizerOptions()
      Get the optimization options in use
      Overrides:
      getOptimizerOptions in class Configuration
      Returns:
      the configured optimization options
    • getPermittedOptimizerOptions

      public OptimizerOptions getPermittedOptimizerOptions()
      Get the optimization options permitted in this configuration
      Overrides:
      getPermittedOptimizerOptions in class Configuration
      Returns:
      the permitted optimization options
    • obtainOptimizer

      public Optimizer obtainOptimizer()
      Factory method to get an Optimizer
      Overrides:
      obtainOptimizer in class Configuration
      Returns:
      the optimizer used in this configuration, which is created if necessary
    • obtainOptimizer

      public Optimizer obtainOptimizer(OptimizerOptions options)
      Factory method to get an Optimizer with specified optimizer options.

      This method is intended for internal use only.

      Overrides:
      obtainOptimizer in class Configuration
      Parameters:
      options - the optimizer options
      Returns:
      a new optimizer with the specified options set (provided the optimizations are available in this Saxon configuration)
    • isJITEnabled

      public boolean isJITEnabled()
      Description copied from class: Configuration
      Ask whether just-in-time compilation of XSLT template rules is in force
      Overrides:
      isJITEnabled in class Configuration
      Returns:
      true if just-in-time compilation is enabled (this is the default in Saxon-EE and not available in other configurations)
    • makeXQueryExpression

      public XQueryExpression makeXQueryExpression(Expression exp, QueryModule mainModule, boolean streaming) throws XPathException
      Factory method to make an XQueryExpression
      Overrides:
      makeXQueryExpression in class Configuration
      Parameters:
      exp - the expression forming the body of the query
      mainModule - the query module containing the expression
      streaming - true if streamed execution is requested
      Returns:
      the XQueryExpression
      Throws:
      XPathException - if an error occurs
    • compileRegularExpression

      public RegularExpression compileRegularExpression(UnicodeString regex, String flags, String hostLanguage, List<String> warnings) throws XPathException
      Description copied from class: Configuration
      Compile a regular expression (or, in some configurations, get a compiled regular expression from a cache
      Overrides:
      compileRegularExpression in class Configuration
      Parameters:
      regex - the regular expression as a string
      flags - the value of the flags attribute
      hostLanguage - one of "XSD10", "XSD11", XP20", "XP30", "XP40". Also allow combinations, e.g. "XP20/XSD11".
      warnings - if non-null, any warnings from the regular expression compiler will be added to this list. If null, the warnings are ignored.
      Returns:
      the compiled regular expression
      Throws:
      XPathException - if the regular expression or the flags are invalid
    • makeSlotManager

      public SlotManager makeSlotManager()
      Description copied from class: Configuration
      Factory method to create a SlotManager.

      This method is provided for advanced users only, and is subject to change.

      Overrides:
      makeSlotManager in class Configuration
      Returns:
      a SlotManager (which is a skeletal stack frame representing the mapping of variable names to slots on the stack frame)
    • getResultDocumentThreadsLimit

      public int getResultDocumentThreadsLimit()
      Get the number of threads to be used for xsl:result-document instructions
      Returns:
      the concurrency of asynchronous xsl:result-document threads, defaulting to the number of (hardware) processors/CPUs available
    • processResultDocument

      public void processResultDocument(ResultDocument instruction, PushEvaluator content, XPathContext context) throws XPathException
      Process an xsl:result-document instruction. The Saxon-HE version of this method simply executes the instruction. The Saxon-EE submits the instruction for execution asynchronously in an ExecutorService.
      Overrides:
      processResultDocument in class Configuration
      Parameters:
      instruction - the instruction to be executed
      content - the expression that defines the content of the new result document
      context - the evaluation context
      Throws:
      XPathException - if any dynamic error occurs
    • getMultithreadingFactory

      public MultithreadingFactory getMultithreadingFactory()
      Get the factory class used to handle creation of objects that support multithreaded execution.
      Returns:
      a MultithreadingFactory, which might be subclassed by advanced applications
    • setMultithreadingFactory

      public void setMultithreadingFactory(MultithreadingFactory factory)
      Set a factory class to handle creation of objects that support multithreaded execution.
      Parameters:
      factory - a MultithreadingFactory, which can be subclassed by advanced applications
    • getMultithreadedItemMappingIterator

      public SequenceIterator getMultithreadedItemMappingIterator(SequenceIterator base, ItemMappingFunction action) throws XPathException
      Get an item mapping iterator suitable for multi-threaded execution, if this is permitted
      Overrides:
      getMultithreadedItemMappingIterator in class Configuration
      Parameters:
      base - iterator over the input sequence
      action - mapping function to be applied to each item in the input sequence.
      Returns:
      an iterator over the result sequence
      Throws:
      XPathException - if (for example) a dynamic error occurs while priming the queue
    • makeSequenceExtent

      public GroundedValue makeSequenceExtent(Expression expression, int ref, XPathContext context) throws XPathException
      Make a SequenceExtent, given the expected reference count
      Overrides:
      makeSequenceExtent in class Configuration
      Parameters:
      expression - the expression to be evaluated
      ref - the (nominal) number of times the value of the expression is required
      context - the XPath dynamic evaluation context
      Returns:
      the constructed Closure
      Throws:
      XPathException - if evaluation of the expression fails
    • declareBuiltInExtensionElementNamespaces

      public void declareBuiltInExtensionElementNamespaces()
      Declare the built-in XSLT extension element namespaces
      Overrides:
      declareBuiltInExtensionElementNamespaces in class ProfessionalConfiguration
    • makeContextItemStaticInfo

      public ContextItemStaticInfo makeContextItemStaticInfo(ItemType itemType, Optionality optionality)
      Factory method to make a ContextItemStaticInfo
      Overrides:
      makeContextItemStaticInfo in class Configuration
      Parameters:
      itemType - the item type of the context item. If the context item is absent, set this to ErrorType.getInstance().
      optionality - indicates whether the context item is present, absent, or optional
      Returns:
      the ContextItemStaticInfo
    • makeContextItemStaticInfo

      public ContextItemStaticInfo makeContextItemStaticInfo(SequenceType seqType, Optionality optionality)
      Overrides:
      makeContextItemStaticInfo in class Configuration
    • makeContextItemStaticInfo

      public ContextItemStaticInfo makeContextItemStaticInfo(ItemType itemType)
      Overrides:
      makeContextItemStaticInfo in class Configuration
    • makeContextItemStaticInfo

      public ContextItemStaticInfo makeContextItemStaticInfo(SequenceType sequenceType)
      Overrides:
      makeContextItemStaticInfo in class Configuration
    • getDefaultContextItemStaticInfo

      public ContextItemStaticInfo getDefaultContextItemStaticInfo()
      Get a default ContextItemStaticInfo, indication no information is available about the context item type
      Overrides:
      getDefaultContextItemStaticInfo in class Configuration
      Returns:
      the default ContextItemStaticInfo
    • makeMode

      public SimpleMode makeMode(StructuredQName modeName, CompilerInfo compilerInfo)
      Make a new Mode - this can be overridden in subclasses to produce optimized variants
      Overrides:
      makeMode in class ProfessionalConfiguration
      Parameters:
      modeName - the name of the mode
      compilerInfo - information on the compiler, that can alter rule optimization
      Returns:
      an instantiated Mode
    • makeTemplateRule

      public TemplateRuleEE makeTemplateRule()
      Factory method to create a Template Rule
      Overrides:
      makeTemplateRule in class Configuration
      Returns:
      a new TemplateRule appropriate to this Configuration
    • makeThreadManager

      public XPathContextMajor.ThreadManager makeThreadManager()
      Make a ThreadManager for asynchronous xsl:result-document instructions
      Overrides:
      makeThreadManager in class Configuration
      Returns:
      a new ThreadManager (or null in the case of Saxon-HE, or if multithreading is disabled)
    • makeXsdCompiler

      public XsdCompiler makeXsdCompiler(Processor proc)
      Description copied from class: Configuration
      Create an XsdCompiler. This method throws an exception if called on a non-schema-aware configuration.
      Overrides:
      makeXsdCompiler in class Configuration
      Parameters:
      proc - the s9api processor
      Returns:
      an XsdCompiler, if the Configuration is a licensed Saxon-EE configuration