Package net.sf.saxon.event

## Class PipelineConfiguration

- java.lang.Object
- - net.sf.saxon.event.PipelineConfiguration

-     public class PipelineConfiguration
      extends java.lang.Object

  A PipelineConfiguration sets options that apply to all the operations in a pipeline. Unlike the global Configuration, these options are always local to a process.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `PipelineConfiguration​(Configuration config)` | Create a PipelineConfiguration.
    `PipelineConfiguration​(PipelineConfiguration p)` | Create a PipelineConfiguration as a copy of an existing PipelineConfiguration

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.Object` | `getComponent​(java.lang.String name)` | Get a named component of the pipeline
    `Configuration` | `getConfiguration()` | Get the Saxon Configuration object
    `Controller` | `getController()` | Get the controller associated with this pipelineConfiguration
    `ErrorReporter` | `getErrorReporter()` | Get an ErrorListener for reporting errors in processing this pipeline; this will be the ErrorListener set locally in the PipelineConfiguration if there is one, or the ErrorListener from the Configuration otherwise.
    `HostLanguage` | `getHostLanguage()` | Get the host language in use
    `ParseOptions` | `getParseOptions()` | Get the document parsing and building options to be used on this pipeline return the options to be used
    `SchemaURIResolver` | `getSchemaURIResolver()` | Get the user-defined SchemaURIResolver for resolving URIs used in "import schema" declarations; returns null if none has been explicitly set.
    `javax.xml.transform.URIResolver` | `getURIResolver()` | Get the URIResolver used for processing URIs encountered on this pipeline
    `XPathContext` | `getXPathContext()` | Get the XPathContext.
    `boolean` | `isRecoverFromValidationErrors()` | Ask if this pipeline recovers from validation errors
    `boolean` | `isXSLT()` | Ask if the host language is XSLT
    `void` | `setComponent​(java.lang.String name, java.lang.Object value)` | Set a named component of the pipeline
    `void` | `setConfiguration​(Configuration config)` | Set the Saxon Configuration object
    `void` | `setController​(Controller controller)` | Set the Controller associated with this pipelineConfiguration
    `void` | `setErrorReporter​(ErrorReporter errorReporter)` | Set the ErrorListener used for reporting errors in processing this pipeline
    `void` | `setExpandAttributeDefaults​(boolean expand)` | Set whether attribute defaults defined in a schema or DTD are to be expanded or not (by default, fixed and default attribute values are expanded, that is, they are inserted into the document during validation as if they were present in the instance being validated)
    `void` | `setHostLanguage​(HostLanguage language)` | Set the host language in use
    `void` | `setParseOptions​(ParseOptions options)` | Set the document parsing and building options to be used on this pipeline
    `void` | `setRecoverFromValidationErrors​(boolean recover)` | Say whether validation errors encountered on this pipeline should be treated as fatal or as recoverable.
    `void` | `setSchemaURIResolver​(SchemaURIResolver resolver)` | Set a user-defined SchemaURIResolver for resolving URIs used in "import schema" declarations.
    `void` | `setURIResolver​(javax.xml.transform.URIResolver uriResolver)` | Set the URIResolver used for processing URIs encountered on this pipeline
    `void` | `setUseXsiSchemaLocation​(boolean recognize)` | Say whether xsi:schemaLocation and xsi:noNamespaceSchemaLocation attributes should be recognized while validating an instance document
    `void` | `setXPathContext​(XPathContext context)` | Set the XPathContext.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PipelineConfiguration

          public PipelineConfiguration​(Configuration config)

      Create a PipelineConfiguration. Note: the normal way to create a PipelineConfiguration is via the factory methods in the Controller and Configuration classes
      Parameters:
        `config` - the Saxon configuration
      See Also:
        `Configuration.makePipelineConfiguration()`, `Controller.makePipelineConfiguration()`

    - #### PipelineConfiguration

          public PipelineConfiguration​(PipelineConfiguration p)

      Create a PipelineConfiguration as a copy of an existing PipelineConfiguration
      Parameters:
        `p` - the existing PipelineConfiguration

  - ### Method Detail

    - #### getConfiguration

          public Configuration getConfiguration()

      Get the Saxon Configuration object
      Returns:
        the Saxon Configuration

    - #### setConfiguration

          public void setConfiguration​(Configuration config)

      Set the Saxon Configuration object
      Parameters:
        `config` - the Saxon Configuration

    - #### getErrorReporter

          public ErrorReporter getErrorReporter()

      Get an ErrorListener for reporting errors in processing this pipeline; this will be the ErrorListener set locally in the PipelineConfiguration if there is one, or the ErrorListener from the Configuration otherwise.
      Returns:
        the ErrorListener to be used; never null

    - #### setErrorReporter

          public void setErrorReporter​(ErrorReporter errorReporter)

      Set the ErrorListener used for reporting errors in processing this pipeline
      Parameters:
        `errorReporter` - the ErrorListener

    - #### getURIResolver

          public javax.xml.transform.URIResolver getURIResolver()

      Get the URIResolver used for processing URIs encountered on this pipeline
      Returns:
        the URIResolver

    - #### setURIResolver

          public void setURIResolver​(javax.xml.transform.URIResolver uriResolver)

      Set the URIResolver used for processing URIs encountered on this pipeline
      Parameters:
        `uriResolver` - the URIResolver

    - #### getSchemaURIResolver

          public SchemaURIResolver getSchemaURIResolver()

      Get the user-defined SchemaURIResolver for resolving URIs used in "import schema" declarations; returns null if none has been explicitly set.
      Returns:
        the SchemaURIResolver

    - #### setParseOptions

          public void setParseOptions​(ParseOptions options)

      Set the document parsing and building options to be used on this pipeline
      Parameters:
        `options` - the options to be used

    - #### getParseOptions

          public ParseOptions getParseOptions()

      Get the document parsing and building options to be used on this pipeline return the options to be used
      Returns:
        the parser options for this pipeline

    - #### setUseXsiSchemaLocation

          public void setUseXsiSchemaLocation​(boolean recognize)

      Say whether xsi:schemaLocation and xsi:noNamespaceSchemaLocation attributes should be recognized while validating an instance document
      Parameters:
        `recognize` - true if these attributes should be recognized

    - #### setRecoverFromValidationErrors

          public void setRecoverFromValidationErrors​(boolean recover)

      Say whether validation errors encountered on this pipeline should be treated as fatal or as recoverable.

      Note this is a shortcut for `getParseOptions().setContinueAfterValidationErrors()`, retained for backwards compatibility.

      Parameters:
        `recover` - set to true if validation errors are to be treated as recoverable. If this option is set to true, such errors will be reported to the ErrorListener using the error() method, and validation will continue. If it is set to false, errors will be reported using the fatalError() method, and validation will be abandoned. The default depends on the circumstances: typically during standalone instance validation the default is true, but during XSLT and XQuery processing it is false.

    - #### isRecoverFromValidationErrors

          public boolean isRecoverFromValidationErrors()

      Ask if this pipeline recovers from validation errors

      Note this is a shortcut for `getParseOptions().isContinueAfterValidationErrors()`, retained for backwards compatibility.

      Returns:
        true if validation errors on this pipeline are treated as recoverable; false if they are treated as fatal

    - #### setSchemaURIResolver

          public void setSchemaURIResolver​(SchemaURIResolver resolver)

      Set a user-defined SchemaURIResolver for resolving URIs used in "import schema" declarations.
      Parameters:
        `resolver` - the SchemaURIResolver

    - #### getController

          public Controller getController()

      Get the controller associated with this pipelineConfiguration
      Returns:
        the controller if it is known; otherwise null.

    - #### setController

          public void setController​(Controller controller)

      Set the Controller associated with this pipelineConfiguration
      Parameters:
        `controller` - the Controller

    - #### getHostLanguage

          public HostLanguage getHostLanguage()

      Get the host language in use
      Returns:
        for example `HostLanguage.XSLT` or `HostLanguage.XQUERY`

    - #### isXSLT

          public boolean isXSLT()

      Ask if the host language is XSLT
      Returns:
        true if the host language is XSLT

    - #### setHostLanguage

          public void setHostLanguage​(HostLanguage language)

      Set the host language in use
      Parameters:
        `language` - for example `HostLanguage.XSLT` or `HostLanguage.XQUERY`

    - #### setExpandAttributeDefaults

          public void setExpandAttributeDefaults​(boolean expand)

      Set whether attribute defaults defined in a schema or DTD are to be expanded or not (by default, fixed and default attribute values are expanded, that is, they are inserted into the document during validation as if they were present in the instance being validated)
      Parameters:
        `expand` - true if defaults are to be expanded, false if not

    - #### setComponent

          public void setComponent​(java.lang.String name,
                                   java.lang.Object value)

      Set a named component of the pipeline
      Parameters:
        `name` - string the component name
        `value` - the component value

    - #### getComponent

          public java.lang.Object getComponent​(java.lang.String name)

      Get a named component of the pipeline
      Parameters:
        `name` - string the component name
      Returns:
        the component value, or null if absent

    - #### setXPathContext

          public void setXPathContext​(XPathContext context)

      Set the XPathContext. Used during validation, for diagnostics, to identify the source node that was being processed at the time a validation error in the result document was found
      Parameters:
        `context` - the XPath dynamic context.

    - #### getXPathContext

          public XPathContext getXPathContext()

      Get the XPathContext. Used during validation, for diagnostics, to identify the source node that was being processed at the time a validation error in the result document was found
      Returns:
        the XPath dynamic context.