Class PipelineConfiguration
java.lang.Object
net.sf.saxon.event.PipelineConfiguration
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
ConstructorsConstructorDescriptionPipelineConfiguration(Configuration config) Create a PipelineConfiguration.Create a PipelineConfiguration as a copy of an existing PipelineConfiguration -
Method Summary
Modifier and TypeMethodDescriptiongetComponent(String name) Get a named component of the pipelineGet the Saxon Configuration objectGet the controller associated with this pipelineConfigurationGet 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.intGet the host language in useGet the ErrorListener set as a property of this pipelineGet the LocationProvider for interpreting location ids passed down this pipelineGet the document parsing and building options to be used on this pipeline return the options to be usedGet the user-defined SchemaURIResolver for resolving URIs used in "import schema" declarations; returns null if none has been explicitly set.getSourceLocation(long locationId) Get a SourceLocator for a given locationId, using this location providerGet the URIResolver used for processing URIs encountered on this pipelinebooleanAsk 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)booleanAsk if this pipeline recovers from validation errorsbooleanAsk whether this pipeline is a serializing pipelinevoidsetComponent(String name, Object value) Set a named component of the pipelinevoidsetConfiguration(Configuration config) Set the Saxon Configuration objectvoidsetController(Controller controller) Set the Controller associated with this pipelineConfigurationvoidsetErrorListener(ErrorListener errorListener) Set the ErrorListener used for reporting errors in processing this pipelinevoidsetExpandAttributeDefaults(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)voidsetHostLanguage(int language) Set the host language in usevoidsetLocationProvider(LocationProvider locationProvider) Set the LocationProvider for interpreting location ids passed down this pipelinevoidsetParseOptions(ParseOptions options) Set the document parsing and building options to be used on this pipelinevoidsetRecoverFromValidationErrors(boolean recover) Say whether validation errors encountered on this pipeline should be treated as fatal or as recoverable.voidsetSchemaURIResolver(SchemaURIResolver resolver) Set a user-defined SchemaURIResolver for resolving URIs used in "import schema" declarations.voidsetSerializing(boolean isSerializing) Set whether this pipeline is a serializing pipelinevoidsetURIResolver(URIResolver uriResolver) Set the URIResolver used for processing URIs encountered on this pipelinevoidsetUseXsiSchemaLocation(boolean recognize) Say whether xsi:schemaLocation and xsi:noNamespaceSchemaLocation attributes should be recognized while validating an instance document
-
Constructor Details
-
PipelineConfiguration
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:
-
PipelineConfiguration
Create a PipelineConfiguration as a copy of an existing PipelineConfiguration- Parameters:
p- the existing PipelineConfiguration
-
-
Method Details
-
getConfiguration
Get the Saxon Configuration object- Returns:
- the Saxon Configuration
-
setConfiguration
Set the Saxon Configuration object- Parameters:
config- the Saxon Configuration
-
getLocationProvider
Get the LocationProvider for interpreting location ids passed down this pipeline- Returns:
- the appropriate LocationProvider
-
setLocationProvider
Set the LocationProvider for interpreting location ids passed down this pipeline- Parameters:
locationProvider- the LocationProvider
-
getSourceLocation
Get a SourceLocator for a given locationId, using this location provider- Parameters:
locationId- an integer identifier for a source location- Returns:
- an object holding location information
-
getLocalErrorListener
Get the ErrorListener set as a property of this pipeline- Returns:
- the ErrorListener; null if none has been set.
-
getErrorListener
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
-
setErrorListener
Set the ErrorListener used for reporting errors in processing this pipeline- Parameters:
errorListener- the ErrorListener
-
getURIResolver
Get the URIResolver used for processing URIs encountered on this pipeline- Returns:
- the URIResolver
-
setURIResolver
Set the URIResolver used for processing URIs encountered on this pipeline- Parameters:
uriResolver- the URIResolver
-
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
Set the document parsing and building options to be used on this pipeline- Parameters:
options- the options to be used
-
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 errorsNote 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
Set a user-defined SchemaURIResolver for resolving URIs used in "import schema" declarations.- Parameters:
resolver- the SchemaURIResolver
-
getController
Get the controller associated with this pipelineConfiguration- Returns:
- the controller if it is known; otherwise null.
-
setController
Set the Controller associated with this pipelineConfiguration- Parameters:
controller- the Controller
-
getHostLanguage
public int getHostLanguage()Get the host language in use- Returns:
- for example
Configuration.XSLTorConfiguration.XQUERY
-
setHostLanguage
public void setHostLanguage(int language) Set the host language in use- Parameters:
language- for exampleConfiguration.XSLTorConfiguration.XQUERY
-
isSerializing
public boolean isSerializing()Ask whether this pipeline is a serializing pipeline- Returns:
- true if this pipeline is producing serialized output
-
setSerializing
public void setSerializing(boolean isSerializing) Set whether this pipeline is a serializing pipeline- Parameters:
isSerializing- true if this pipeline is producing serialized output
-
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
-
isExpandAttributeDefaults
public boolean isExpandAttributeDefaults()Ask 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)- Returns:
- true if defaults are to be expanded, false if not
-
setComponent
-
getComponent
-