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()
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 Configuration
getConfiguration()
Get the Saxon Configuration objectController
getController()
Get the controller associated with this pipelineConfigurationjavax.xml.transform.ErrorListener
getErrorListener()
Get the ErrorListener used for reporting errors in processing this pipelineint
getHostLanguage()
Get the host language in useLocationProvider
getLocationProvider()
Get the LocationProvider for interpreting location ids passed down this pipelineSchemaURIResolver
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 pipelineboolean
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)boolean
isRecoverFromValidationErrors()
Ask if this pipeline recovers from validation errorsboolean
isSerializing()
Ask whether this pipeline is a serializing pipelineboolean
isUseXsiSchemaLocation()
Ask whether xsi:schemaLocation and xsi:noNamespaceSchemaLocation attributes should be recognized while validating an instance documentvoid
setConfiguration(Configuration config)
Set the Saxon Configuration objectvoid
setController(Controller controller)
Set the Controller associated with this pipelineConfigurationvoid
setErrorListener(javax.xml.transform.ErrorListener errorListener)
Set the ErrorListener used for reporting errors in processing this pipelinevoid
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(int language)
Set the host language in usevoid
setLocationProvider(LocationProvider locationProvider)
Set the LocationProvider for interpreting location ids passed down this pipelinevoid
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
setSerializing(boolean isSerializing)
Set whether this pipeline is a serializing pipelinevoid
setURIResolver(javax.xml.transform.URIResolver uriResolver)
Set the URIResolver used for processing URIs encountered on this pipelinevoid
setUseXsiSchemaLocation(boolean recognize)
Say whether xsi:schemaLocation and xsi:noNamespaceSchemaLocation attributes should be recognized while validating an instance document
-
-
-
Constructor Detail
-
PipelineConfiguration
public PipelineConfiguration()
Create a PipelineConfiguration. Note: the normal way to create a PipelineConfiguration is via the factory methods in the Controller and Configuration classes
-
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
-
getLocationProvider
public LocationProvider getLocationProvider()
Get the LocationProvider for interpreting location ids passed down this pipeline- Returns:
- the appropriate LocationProvider
-
setLocationProvider
public void setLocationProvider(LocationProvider locationProvider)
Set the LocationProvider for interpreting location ids passed down this pipeline- Parameters:
locationProvider
- the LocationProvider
-
getErrorListener
public javax.xml.transform.ErrorListener getErrorListener()
Get the ErrorListener used for reporting errors in processing this pipeline- Returns:
- the ErrorListener
-
setErrorListener
public void setErrorListener(javax.xml.transform.ErrorListener errorListener)
Set the ErrorListener used for reporting errors in processing this pipeline- Parameters:
errorListener
- 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
-
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
-
isUseXsiSchemaLocation
public boolean isUseXsiSchemaLocation()
Ask whether xsi:schemaLocation and xsi:noNamespaceSchemaLocation attributes should be recognized while validating an instance document- Returns:
- 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.- 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 (the default), errors will be reported using the fatalError() method, and validation will be abandoned.
-
isRecoverFromValidationErrors
public boolean isRecoverFromValidationErrors()
Ask if this pipeline recovers from validation errors- 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 int getHostLanguage()
Get the host language in use- Returns:
- for example
Configuration.XSLT
orConfiguration.XQUERY
-
setHostLanguage
public void setHostLanguage(int language)
Set the host language in use- Parameters:
language
- for exampleConfiguration.XSLT
orConfiguration.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
-
-