net.sf.saxon.event

Class PipelineConfiguration

public class PipelineConfiguration extends 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
PipelineConfiguration()
Create a PipelineConfiguration.
PipelineConfiguration(PipelineConfiguration p)
Create a PipelineConfiguration as a copy of an existing PipelineConfiguration
Method Summary
ConfigurationgetConfiguration()
Get the Saxon Configuration object
ControllergetController()
Get the controller associated with this pipelineConfiguration
CopyInformeegetCopyInformee()
Get the CopyInformee to be notified of element nodes if the origin of the pipeline is copying elements.
ErrorListenergetErrorListener()
Get the ErrorListener used for reporting errors in processing this pipeline
intgetHostLanguage()
Get the host language in use
LocationProvidergetLocationProvider()
Get the LocationProvider for interpreting location ids passed down this pipeline
ParseOptionsgetParseOptions()
Get the document parsing and building options to be used on this pipeline return the options to be used
SchemaURIResolvergetSchemaURIResolver()
Get the user-defined SchemaURIResolver for resolving URIs used in "import schema" declarations; returns null if none has been explicitly set.
SourceLocatorgetSourceLocation(long locationId)
Get a SourceLocator for a given locationId, using this location provider
URIResolvergetURIResolver()
Get the URIResolver used for processing URIs encountered on this pipeline
booleanisExpandAttributeDefaults()
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)
booleanisRecoverFromValidationErrors()
Ask if this pipeline recovers from validation errors
booleanisSerializing()
Ask whether this pipeline is a serializing pipeline
booleanisShallowValidation()
Ask whether shallow validation has been requested
voidsetConfiguration(Configuration config)
Set the Saxon Configuration object
voidsetController(Controller controller)
Set the Controller associated with this pipelineConfiguration
voidsetCopyInformee(CopyInformee informee)
Set a CopyInformee to be notified of element nodes if the origin of the pipeline is copying elements.
voidsetErrorListener(ErrorListener errorListener)
Set the ErrorListener used for reporting errors in processing this pipeline
voidsetExpandAttributeDefaults(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 use
voidsetLocationProvider(LocationProvider locationProvider)
Set the LocationProvider for interpreting location ids passed down this pipeline
voidsetParseOptions(ParseOptions options)
Set the document parsing and building options to be used on this pipeline
voidsetRecoverFromValidationErrors(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 pipeline
voidsetShallowValidation(boolean shallow)
Say whether validation should be shallow.
voidsetURIResolver(URIResolver uriResolver)
Set the URIResolver used for processing URIs encountered on this pipeline
voidsetUseXsiSchemaLocation(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

See Also: Configuration Controller

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

getController

public Controller getController()
Get the controller associated with this pipelineConfiguration

Returns: the controller if it is known; otherwise null.

getCopyInformee

public CopyInformee getCopyInformee()
Get the CopyInformee to be notified of element nodes if the origin of the pipeline is copying elements.

Returns: the CopyInformee to be notified

getErrorListener

public ErrorListener getErrorListener()
Get the ErrorListener used for reporting errors in processing this pipeline

Returns: the ErrorListener

getHostLanguage

public int getHostLanguage()
Get the host language in use

Returns: for example XSLT or XQUERY

getLocationProvider

public LocationProvider getLocationProvider()
Get the LocationProvider for interpreting location ids passed down this pipeline

Returns: the appropriate LocationProvider

getParseOptions

public ParseOptions getParseOptions()
Get the document parsing and building options to be used on this pipeline return the options to be used

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

getSourceLocation

public SourceLocator getSourceLocation(long locationId)
Get a SourceLocator for a given locationId, using this location provider

getURIResolver

public URIResolver getURIResolver()
Get the URIResolver used for processing URIs encountered on this pipeline

Returns: the URIResolver

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

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

isSerializing

public boolean isSerializing()
Ask whether this pipeline is a serializing pipeline

Returns: true if this pipeline is producing serialized output

isShallowValidation

public boolean isShallowValidation()
Ask whether shallow validation has been requested

Returns: true if shallow validation has been requested

setConfiguration

public void setConfiguration(Configuration config)
Set the Saxon Configuration object

Parameters: config the Saxon Configuration

setController

public void setController(Controller controller)
Set the Controller associated with this pipelineConfiguration

Parameters: controller the Controller

setCopyInformee

public void setCopyInformee(CopyInformee informee)
Set a CopyInformee to be notified of element nodes if the origin of the pipeline is copying elements.

Parameters: informee the CopyInformee to be notified

setErrorListener

public void setErrorListener(ErrorListener errorListener)
Set the ErrorListener used for reporting errors in processing this pipeline

Parameters: errorListener the ErrorListener

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

setHostLanguage

public void setHostLanguage(int language)
Set the host language in use

Parameters: language for example XSLT or XQUERY

setLocationProvider

public void setLocationProvider(LocationProvider locationProvider)
Set the LocationProvider for interpreting location ids passed down this pipeline

Parameters: locationProvider the LocationProvider

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

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.

setSchemaURIResolver

public void setSchemaURIResolver(SchemaURIResolver resolver)
Set a user-defined SchemaURIResolver for resolving URIs used in "import schema" declarations.

Parameters: resolver the SchemaURIResolver

setSerializing

public void setSerializing(boolean isSerializing)
Set whether this pipeline is a serializing pipeline

Parameters: isSerializing true if this pipeline is producing serialized output

setShallowValidation

public void setShallowValidation(boolean shallow)
Say whether validation should be shallow. With shallow validation, the top-level sequence of elements is checked against the content model, but the children of these top-level elements are not provided to the validator and therefore cannot be checked. This mode is used during compile-time checking of a query or stylesheet.

Parameters: shallow set to true to request shallow validation

setURIResolver

public void setURIResolver(URIResolver uriResolver)
Set the URIResolver used for processing URIs encountered on this pipeline

Parameters: uriResolver the URIResolver

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