## net.sf.saxon
Class Configuration

    java.lang.Object
      |
      +--net.sf.saxon.Configuration

All Implemented Interfaces:
  java.io.Serializable

public class Configuration
extends java.lang.Object
implements java.io.Serializable

This class holds details of user-selected configuration options for a transformation or query

See Also:
  Serialized Form

Field Summary
`static int` `DO_NOT_RECOVER` Constant indicating that when a recoverable error occurs, the processor should not attempt to take the defined recovery action, but should terminate with an error.
`protected javax.xml.transform.ErrorListener` `listener`
`protected Optimizer` `optimizer`
`static int` `RECOVER_SILENTLY` Constant indicating that the processor should take the recovery action when a recoverable error occurs, with no warning message.
`static int` `RECOVER_WITH_WARNINGS` Constant indicating that the processor should produce a warning when a recoverable error occurs, and should then take the recovery action and continue.
`protected VendorFunctionLibrary` `vendorFunctionLibrary`
`static int` `XML_SCHEMA` Constant indicating that the "host language" is XML Schema
`static int` `XQUERY` Constant indicating that the host language is XQuery
`static int` `XSLT` Constant indicating that the host language is XSLT

Constructor Summary
`Configuration()` Create a configuration object with default settings for all options

Method Summary
`void` `addSchema(SchemaMarker schema)` Add a schema to the cache
`void` `addSchema(javax.xml.transform.Source schemaSource)` Load a schema, which will be available for use by all subsequent operations using this Configuration.
`void` `displayLicenseMessage()` Display a message about the license status
`SchemaDeclaration` `getAttributeDeclaration(int fingerprint)` Get a global attribute declaration
`Debugger` `getDebugger()` Get the debugger in use.
`Receiver` `getDocumentValidator(Receiver receiver, java.lang.String systemId, NamePool namePool, int validationMode)` Get a document-level validator to add to a Receiver pipeline
`SchemaDeclaration` `getElementDeclaration(int fingerprint)` Get a global element declaration
`Receiver` `getElementValidator(Receiver receiver, int nameCode, int locationId, SchemaType schemaType, int validation, NamePool pool)` Get a Receiver that can be used to validate an element, and that passes the validated element on to a target receiver.
`javax.xml.transform.ErrorListener` `getErrorListener()` Get the ErrorListener used in this configuration.
`FunctionLibrary` `getExtensionBinder()` Get the FunctionLibrary used to bind calls on extension functions
`ExtensionFunctionFactory` `getExtensionFunctionFactory()` Get an ExtensionFunctionFactory.
`int` `getHostLanguage()` Get the host language used in this configuration.
`static java.util.Locale` `getLocale(java.lang.String lang)` Get a locale given a language code in XML format
`java.lang.String` `getMessageEmitterClass()` Get the name of the class that will be instantiated to create a MessageEmitter, to process the output of xsl:message instructions.
`NamePool` `getNamePool()` Get the target namepool to be used for stylesheets/queries and for source documents.
`Optimizer` `getOptimizer()` Factory method to get an Optimizer
`OutputURIResolver` `getOutputURIResolver()` Get the OutputURIResolver that will be used to resolve URIs used in the href attribute of the xsl:result-document instruction.
`java.lang.String` `getProductTitle()` Get a message used to identify this product when a transformation is run using the -t option
`int` `getRecoveryPolicy()` Determine how recoverable run-time errors are to be handled.
`SchemaMarker` `getSchema(java.lang.String namespace)` Get a schema from the cache.
`SchemaType` `getSchemaType(int fingerprint)` Get the top-level schema type with a given fingerprint.
`org.xml.sax.XMLReader` `getSourceParser()` Get the parser for source documents
`java.lang.String` `getSourceParserClass()` Get the name of the class that will be instantiated to create an XML parser for parsing source documents (for example, documents loaded using the document() or doc() functions).
`org.xml.sax.XMLReader` `getStyleParser()` Get the parser for stylesheet documents
`java.lang.String` `getStyleParserClass()` Get the name of the class that will be instantiated to create an XML parser for parsing stylesheet modules.
`TraceListener` `getTraceListener()` Get the TraceListener used for run-time tracing of instruction execution.
`int` `getTreeModel()` Get the Tree Model used by this Configuration.
`javax.xml.transform.URIResolver` `getURIResolver()` Get the URIResolver used in this configuration
`VendorFunctionLibrary` `getVendorFunctionLibrary()` Get the FunctionLibrary used to bind calls on Saxon-defined extension functions
`boolean` `isAllowExternalFunctions()` Determine whether calls to external Java functions are permitted.
`boolean` `isLineNumbering()` Determine whether source documents will maintain line numbers, for the benefit of the saxon:line-number() extension function as well as run-time tracing.
`boolean` `isRetainDTDAttributeTypes()` Determine whether attribute types obtained from a DTD are to be used to set type annotations on the resulting nodes
`boolean` `isSchemaAware(int language)` Determine if the configuration is schema-aware, for the given host language
`boolean` `isSchemaValidation()` Determine whether source documents (supplied as a StreamSource or SAXSource) should be subjected to schema validation
`boolean` `isStripsAllWhiteSpace()` Determine whether whitespace-only text nodes are to be stripped unconditionally from source documents.
`boolean` `isTiming()` Determine whether brief progress messages and timing information will be output to System.err
`boolean` `isTraceExternalFunctions()` Determine whether calls on external functions are to be traced for diagnostic purposes.
`boolean` `isValidation()` Determine whether the XML parser for source documents will be asked to perform DTD validation of source documents
`boolean` `isValidationWarnings()` Determine whether validation failures on result documents are to be treated as fatal errors or as warnings.
`static org.xml.sax.XMLReader` `makeParser(java.lang.String className)` Create a new SAX XMLReader object using the class name provided.
`SlotManager` `makeSlotManager()` Factory method to create a SlotManager
`NodeTest` `makeSubstitutionGroupTest(SchemaDeclaration elementDecl)` Make a test for elements corresponding to a give element declaration
`java.lang.String` `readSchema(java.lang.String baseURI, java.lang.String schemaLocation, java.lang.String expected)` Read a schema from a given schema location
`void` `reportValidationError(ValidationException err, boolean isOutput)` Report a validation error.
`void` `setAllowExternalFunctions(boolean allowExternalFunctions)` Determine whether calls to external Java functions are permitted.
`void` `setDebugger(Debugger debugger)` Set the debugger to be used
`void` `setErrorListener(javax.xml.transform.ErrorListener listener)` Set the ErrorListener to be used in this configuration.
`void` `setExtensionBinder(FunctionLibrary binder)` Set the FunctionLibrary used to bind calls on extension functions.
`void` `setExtensionFunctionFactory(ExtensionFunctionFactory factory)` Set an ExtensionFunctionFactory.
`void` `setHostLanguage(int hostLanguage)` Set the host language used in this configuration.
`void` `setLineNumbering(boolean lineNumbering)` Determine whether source documents will maintain line numbers, for the benefit of the saxon:line-number() extension function as well as run-time tracing.
`void` `setMessageEmitterClass(java.lang.String messageEmitterClass)` Set the name of the class that will be instantiated to create a MessageEmitter, to process the output of xsl:message instructions.
`void` `setNamePool(NamePool targetNamePool)` Set the NamePool to be used for stylesheets/queries and for source documents.
`void` `setOutputURIResolver(OutputURIResolver outputURIResolver)` Set the OutputURIResolver that will be used to resolve URIs used in the href attribute of the xsl:result-document instruction.
`void` `setRecoveryPolicy(int recoveryPolicy)` Determine how recoverable run-time errors are to be handled.
`void` `setRetainDTDAttributeTypes(boolean useTypes)` Determine whether attribute types obtained from a DTD are to be used to set type annotations on the resulting nodes
`void` `setSchemaValidation(boolean validate)` Indicate whether source documents (supplied as a StreamSource or SAXSource) should be subjected to schema validation
`void` `setSourceParserClass(java.lang.String sourceParserClass)` Set the name of the class that will be instantiated to create an XML parser for parsing source documents (for example, documents loaded using the document() or doc() functions).
`void` `setStripsAllWhiteSpace(boolean stripsAllWhiteSpace)` Determine whether whitespace-only text nodes are to be stripped unconditionally from source documents.
`void` `setStyleParserClass(java.lang.String styleParserClass)` Set the name of the class that will be instantiated to create an XML parser for parsing stylesheet modules.
`void` `setTiming(boolean timing)` Determine whether brief progress messages and timing information will be output to System.err
`void` `setTraceExternalFunctions(boolean traceExternalFunctions)` Determine whether calls on external functions are to be traced for diagnostic purposes.
`void` `setTraceListener(TraceListener traceListener)` Set the TraceListener to be used for run-time tracing of instruction execution.
`void` `setTreeModel(int treeModel)` Set the Tree Model used by this Configuration.
`void` `setURIResolver(javax.xml.transform.URIResolver resolver)` Set the URIResolver to be used in this configuration.
`void` `setValidation(boolean validation)` Determine whether the XML parser for source documents will be asked to perform DTD validation of source documents
`void` `setValidationWarnings(boolean warn)` Indicate whether validation failures on result documents are to be treated as fatal errors or as warnings
`long` `validateAttribute(int nameCode, java.lang.CharSequence value, int validation)` Validate an attribute value

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### listener

    protected transient javax.xml.transform.ErrorListener listener

### vendorFunctionLibrary

    protected VendorFunctionLibrary vendorFunctionLibrary

### optimizer

    protected Optimizer optimizer

### RECOVER_SILENTLY

    public static final int RECOVER_SILENTLY

  Constant indicating that the processor should take the recovery action when a recoverable error occurs, with no warning message.

  See Also:
    Constant Field Values

### RECOVER_WITH_WARNINGS

    public static final int RECOVER_WITH_WARNINGS

  Constant indicating that the processor should produce a warning when a recoverable error occurs, and should then take the recovery action and continue.

  See Also:
    Constant Field Values

### DO_NOT_RECOVER

    public static final int DO_NOT_RECOVER

  Constant indicating that when a recoverable error occurs, the processor should not attempt to take the defined recovery action, but should terminate with an error.

  See Also:
    Constant Field Values

### XSLT

    public static final int XSLT

  Constant indicating that the host language is XSLT

  See Also:
    Constant Field Values

### XQUERY

    public static final int XQUERY

  Constant indicating that the host language is XQuery

  See Also:
    Constant Field Values

### XML_SCHEMA

    public static final int XML_SCHEMA

  Constant indicating that the "host language" is XML Schema

  See Also:
    Constant Field Values

Constructor Detail

### Configuration

    public Configuration()

  Create a configuration object with default settings for all options

Method Detail

### getProductTitle

    public java.lang.String getProductTitle()

  Get a message used to identify this product when a transformation is run using the -t option

  Returns:
    A string containing both the product name and the product version

### isSchemaAware

    public boolean isSchemaAware(int language)

  Determine if the configuration is schema-aware, for the given host language

  Parameters:
    `language` - the required host language: XSLT, XQUERY, or XML_SCHEMA

### displayLicenseMessage

    public void displayLicenseMessage()

  Display a message about the license status

### getHostLanguage

    public int getHostLanguage()

  Get the host language used in this configuration. The possible values are XSLT and XQUERY.

  Returns:
    Configuration.XSLT or Configuration.XQUERY

### setHostLanguage

    public void setHostLanguage(int hostLanguage)

  Set the host language used in this configuration. The possible values are XSLT and XQUERY.

  Parameters:
    `hostLanguage` - Configuration.XSLT or Configuration.XQUERY

### getURIResolver

    public javax.xml.transform.URIResolver getURIResolver()

  Get the URIResolver used in this configuration

  Returns:
    the URIResolver. If no URIResolver has been set explicitly, the default URIResolver is used.

### setURIResolver

    public void setURIResolver(javax.xml.transform.URIResolver resolver)

  Set the URIResolver to be used in this configuration. This will be used to resolve the URIs used statically (e.g. by xsl:include) and also the URIs used dynamically by functions such as document() and doc(). Note that the URIResolver does not resolve the URI in the sense of RFC 2396 (which is also the sense in which the resolve-uri() function uses the term): rather it dereferences an absolute URI to obtain an actual resource, which is returned as a Source object.

  Parameters:
    `resolver` - The URIResolver to be used.

### getErrorListener

    public javax.xml.transform.ErrorListener getErrorListener()

  Get the ErrorListener used in this configuration. If no ErrorListener has been supplied explicitly, the default ErrorListener is used.

  Returns:
    the ErrorListener.

### setErrorListener

    public void setErrorListener(javax.xml.transform.ErrorListener listener)

  Set the ErrorListener to be used in this configuration. The ErrorListener is informed of all static and dynamic errors detected, and can decide whether run-time warnings are to be treated as fatal.

  Parameters:
    `listener` - the ErrorListener to be used

### getTreeModel

    public int getTreeModel()

  Get the Tree Model used by this Configuration. This is either Builder.STANDARD_TREE or Builder.TINY_TREE. The default (confusingly) is Builder.TINY_TREE.

  Returns:
    the selected Tree Model

### setTreeModel

    public void setTreeModel(int treeModel)

  Set the Tree Model used by this Configuration. This is either Builder.STANDARD_TREE or Builder.TINY_TREE. The default (confusingly) is Builder.TINY_TREE.

  Parameters:
    `treeModel` - the selected Tree Model

### isLineNumbering

    public boolean isLineNumbering()

  Determine whether source documents will maintain line numbers, for the benefit of the saxon:line-number() extension function as well as run-time tracing.

  Returns:
    true if line numbers are maintained in source documents

### setLineNumbering

    public void setLineNumbering(boolean lineNumbering)

  Determine whether source documents will maintain line numbers, for the benefit of the saxon:line-number() extension function as well as run-time tracing.

  Parameters:
    `lineNumbering` - true if line numbers are maintained in source documents

### getTraceListener

    public TraceListener getTraceListener()

  Get the TraceListener used for run-time tracing of instruction execution.

  Returns:
    the TraceListener, or null if none is in use.

### setTraceListener

    public void setTraceListener(TraceListener traceListener)

  Set the TraceListener to be used for run-time tracing of instruction execution.

  Parameters:
    `traceListener` - The TraceListener to be used.

### setExtensionBinder

    public void setExtensionBinder(FunctionLibrary binder)

  Set the FunctionLibrary used to bind calls on extension functions. This allows the rules for identifying extension functions to be customized (in principle, it would allow support for extension functions in other languages to be provided).

  Parameters:
    `binder` - The FunctionLibrary object used to locate implementations of extension functions, based on their name and arity
  See Also:
    `setExtensionFunctionFactory(net.sf.saxon.functions.ExtensionFunctionFactory)`

### getExtensionBinder

    public FunctionLibrary getExtensionBinder()

  Get the FunctionLibrary used to bind calls on extension functions

### getVendorFunctionLibrary

    public VendorFunctionLibrary getVendorFunctionLibrary()

  Get the FunctionLibrary used to bind calls on Saxon-defined extension functions

### getRecoveryPolicy

    public int getRecoveryPolicy()

  Determine how recoverable run-time errors are to be handled. This applies only if the standard ErrorListener is used. The options are RECOVER_SILENTLY, RECOVER_WITH_WARNINGS, or DO_NOT_RECOVER.

  Returns:
    the current recovery policy

### setRecoveryPolicy

    public void setRecoveryPolicy(int recoveryPolicy)

  Determine how recoverable run-time errors are to be handled. This applies only if the standard ErrorListener is used. The options are RECOVER_SILENTLY, RECOVER_WITH_WARNINGS, or DO_NOT_RECOVER.

  Parameters:
    `recoveryPolicy` - the recovery policy to be used.

### getMessageEmitterClass

    public java.lang.String getMessageEmitterClass()

  Get the name of the class that will be instantiated to create a MessageEmitter, to process the output of xsl:message instructions.

  Returns:
    the full class name of the message emitter class.

### setMessageEmitterClass

    public void setMessageEmitterClass(java.lang.String messageEmitterClass)

  Set the name of the class that will be instantiated to create a MessageEmitter, to process the output of xsl:message instructions.

  Parameters:
    `messageEmitterClass` - the full class name of the message emitter class. This must implement net.sf.saxon.event.Emitter.

### getSourceParserClass

    public java.lang.String getSourceParserClass()

  Get the name of the class that will be instantiated to create an XML parser for parsing source documents (for example, documents loaded using the document() or doc() functions).

  Returns:
    the fully qualified name of the XML parser class

### setSourceParserClass

    public void setSourceParserClass(java.lang.String sourceParserClass)

  Set the name of the class that will be instantiated to create an XML parser for parsing source documents (for example, documents loaded using the document() or doc() functions).

  Parameters:
    `sourceParserClass` - the fully qualified name of the XML parser class. This must implement the SAX2 XMLReader interface.

### getStyleParserClass

    public java.lang.String getStyleParserClass()

  Get the name of the class that will be instantiated to create an XML parser for parsing stylesheet modules.

  Returns:
    the fully qualified name of the XML parser class

### setStyleParserClass

    public void setStyleParserClass(java.lang.String styleParserClass)

  Set the name of the class that will be instantiated to create an XML parser for parsing stylesheet modules.

  Parameters:
    `styleParserClass` - the fully qualified name of the XML parser class

### getOutputURIResolver

    public OutputURIResolver getOutputURIResolver()

  Get the OutputURIResolver that will be used to resolve URIs used in the href attribute of the xsl:result-document instruction.

  Returns:
    the OutputURIResolver. If none has been supplied explicitly, the default OutputURIResolver is returned.

### setOutputURIResolver

    public void setOutputURIResolver(OutputURIResolver outputURIResolver)

  Set the OutputURIResolver that will be used to resolve URIs used in the href attribute of the xsl:result-document instruction.

  Parameters:
    `outputURIResolver` - the OutputURIResolver to be used.

### isTiming

    public boolean isTiming()

  Determine whether brief progress messages and timing information will be output to System.err

  Returns:
    true if these messages are to be output.

### setTiming

    public void setTiming(boolean timing)

  Determine whether brief progress messages and timing information will be output to System.err

  Parameters:
    `timing` - true if these messages are to be output.

### isAllowExternalFunctions

    public boolean isAllowExternalFunctions()

  Determine whether calls to external Java functions are permitted.

  Returns:
    true if such calls are permitted.

### setAllowExternalFunctions

    public void setAllowExternalFunctions(boolean allowExternalFunctions)

  Determine whether calls to external Java functions are permitted. Allowing external function calls is potentially a security risk if the stylesheet or Query is untrusted, as it allows arbitrary Java methods to be invoked, which can examine or modify the contents of filestore and other resources on the machine where the query/stylesheet is executed

  Parameters:
    `allowExternalFunctions` - true if external function calls are to be permitted.

### isTraceExternalFunctions

    public boolean isTraceExternalFunctions()

  Determine whether calls on external functions are to be traced for diagnostic purposes.

  Returns:
    true if tracing is enabled for calls to external Java functions

### setRetainDTDAttributeTypes

    public void setRetainDTDAttributeTypes(boolean useTypes)
                                    throws javax.xml.transform.TransformerFactoryConfigurationError

  Determine whether attribute types obtained from a DTD are to be used to set type annotations on the resulting nodes

    `javax.xml.transform.TransformerFactoryConfigurationError`

### isRetainDTDAttributeTypes

    public boolean isRetainDTDAttributeTypes()

  Determine whether attribute types obtained from a DTD are to be used to set type annotations on the resulting nodes

### setTraceExternalFunctions

    public void setTraceExternalFunctions(boolean traceExternalFunctions)

  Determine whether calls on external functions are to be traced for diagnostic purposes.

  Parameters:
    `traceExternalFunctions` - true if tracing is to be enabled for calls to external Java functions

### getExtensionFunctionFactory

    public ExtensionFunctionFactory getExtensionFunctionFactory()

  Get an ExtensionFunctionFactory. This is used at compile time for generating the code that calls Java extension functions. It is possible to supply a user-defined ExtensionFunctionFactory to customize the way extension functions are bound.

### setExtensionFunctionFactory

    public void setExtensionFunctionFactory(ExtensionFunctionFactory factory)

  Set an ExtensionFunctionFactory. This is used at compile time for generating the code that calls Java extension functions. It is possible to supply a user-defined ExtensionFunctionFactory to customize the way extension functions are called. The ExtensionFunctionFactory determines how external methods are called, but is not involved in binding the external method corresponding to a given function name or URI.

  See Also:
    `setExtensionBinder(net.sf.saxon.functions.FunctionLibrary)`

### isValidation

    public boolean isValidation()

  Determine whether the XML parser for source documents will be asked to perform DTD validation of source documents

  Returns:
    true if DTD validation is requested.

### setValidation

    public void setValidation(boolean validation)

  Determine whether the XML parser for source documents will be asked to perform DTD validation of source documents

  Parameters:
    `validation` - true if DTD validation is to be requested.

### isSchemaValidation

    public boolean isSchemaValidation()

  Determine whether source documents (supplied as a StreamSource or SAXSource) should be subjected to schema validation

  Returns:
    true if source documents should be validated

### setSchemaValidation

    public void setSchemaValidation(boolean validate)

  Indicate whether source documents (supplied as a StreamSource or SAXSource) should be subjected to schema validation

  Parameters:
    `validate` - true if source documents should be validated

### setValidationWarnings

    public void setValidationWarnings(boolean warn)

  Indicate whether validation failures on result documents are to be treated as fatal errors or as warnings

### isValidationWarnings

    public boolean isValidationWarnings()

  Determine whether validation failures on result documents are to be treated as fatal errors or as warnings.

  Returns:
    true if validation errors are to be treated as warnings (that is, the validation failure is reported but processing continues as normal).

### reportValidationError

    public void reportValidationError(ValidationException err,
                                      boolean isOutput)
                               throws ValidationException

  Report a validation error. This will throw an exception if validation errors are being treated as fatal, but report a warning if they are being treated as warnings

    `ValidationException`

### getNamePool

    public NamePool getNamePool()

  Get the target namepool to be used for stylesheets/queries and for source documents.

  Returns:
    the target name pool. If no NamePool has been specified explicitly, the default NamePool is returned.

### setNamePool

    public void setNamePool(NamePool targetNamePool)

  Set the NamePool to be used for stylesheets/queries and for source documents.

  Parameters:
    `targetNamePool` - The NamePool to be used.

### isStripsAllWhiteSpace

    public boolean isStripsAllWhiteSpace()

  Determine whether whitespace-only text nodes are to be stripped unconditionally from source documents.

  Returns:
    true if all whitespace-only text nodes are stripped.

### setStripsAllWhiteSpace

    public void setStripsAllWhiteSpace(boolean stripsAllWhiteSpace)

  Determine whether whitespace-only text nodes are to be stripped unconditionally from source documents.

  Parameters:
    `stripsAllWhiteSpace` - if all whitespace-only text nodes are to be stripped.

### getSourceParser

    public org.xml.sax.XMLReader getSourceParser()
                                          throws javax.xml.transform.TransformerFactoryConfigurationError

  Get the parser for source documents

    `javax.xml.transform.TransformerFactoryConfigurationError`

### getStyleParser

    public org.xml.sax.XMLReader getStyleParser()
                                         throws javax.xml.transform.TransformerFactoryConfigurationError

  Get the parser for stylesheet documents

    `javax.xml.transform.TransformerFactoryConfigurationError`

### readSchema

    public java.lang.String readSchema(java.lang.String baseURI,
                                       java.lang.String schemaLocation,
                                       java.lang.String expected)
                                throws javax.xml.transform.TransformerConfigurationException

  Read a schema from a given schema location

  Returns:
    the target namespace of the schema
    `javax.xml.transform.TransformerConfigurationException`

### addSchema

    public void addSchema(javax.xml.transform.Source schemaSource)
                   throws SchemaException

  Load a schema, which will be available for use by all subsequent operations using this Configuration.

  Parameters:
    `schemaSource` - the JAXP Source object identifying the schema document to be loaded
  Throws:
    `SchemaException` - if the schema cannot be read or parsed or if it is invalid

### addSchema

    public void addSchema(SchemaMarker schema)
                   throws javax.xml.transform.TransformerConfigurationException

  Add a schema to the cache

    `javax.xml.transform.TransformerConfigurationException`

### getSchema

    public SchemaMarker getSchema(java.lang.String namespace)

  Get a schema from the cache. Return null if not found.

### getElementDeclaration

    public SchemaDeclaration getElementDeclaration(int fingerprint)

  Get a global element declaration

  Returns:
    the element declaration whose name matches the given fingerprint, or null if no element declaration with this name has been registered.

### getAttributeDeclaration

    public SchemaDeclaration getAttributeDeclaration(int fingerprint)

  Get a global attribute declaration

  Returns:
    the attribute declaration whose name matches the given fingerprint, or null if no element declaration with this name has been registered.

### getSchemaType

    public SchemaType getSchemaType(int fingerprint)

  Get the top-level schema type with a given fingerprint.

  Parameters:
    `fingerprint` - the fingerprint of the schema type
  Returns:
    the schema type , or null if there is none with this name.

### getDocumentValidator

    public Receiver getDocumentValidator(Receiver receiver,
                                         java.lang.String systemId,
                                         NamePool namePool,
                                         int validationMode)

  Get a document-level validator to add to a Receiver pipeline

  Parameters:
    `receiver` - The receiver to which events should be sent after validation
    `systemId` - the base URI of the document being validated
    `namePool` - the namePool to be used by the validator
    `validationMode` - for example Validation.STRICT or Validation.STRIP. The integer may also have the bit Validation.VALIDATE_OUTPUT set, indicating that the strean being validated is to be treated as a final output stream (which means multiple errors can be reported)
  Returns:
    A Receiver to which events can be sent for validation

### getElementValidator

    public Receiver getElementValidator(Receiver receiver,
                                        int nameCode,
                                        int locationId,
                                        SchemaType schemaType,
                                        int validation,
                                        NamePool pool)
                                 throws XPathException

  Get a Receiver that can be used to validate an element, and that passes the validated element on to a target receiver. If validation is not supported, the returned receiver will be the target receiver.

  Parameters:
    `receiver` - the target receiver tp receive the validated element
    `nameCode` - the nameCode of the element to be validated. This must correspond to the name of an element declaration in a loaded schema
    `schemaType` - the schema type (typically a complex type) against which the element is to be validated
    `validation` - The validation mode, for example Validation.STRICT or Validation.LAX
    `pool` - The name pool
  Returns:
    The target receiver, indicating that with this configuration, no validation is performed.
    `XPathException`

### validateAttribute

    public long validateAttribute(int nameCode,
                                  java.lang.CharSequence value,
                                  int validation)
                           throws ValidationException

  Validate an attribute value

  Parameters:
    `nameCode` - the name of the attribute
    `value` - the value of the attribute as a string
    `validation` - STRICT or LAX
  Returns:
    the type annotation to apply to the attribute node
  Throws:
    `ValidationException` - if the value is invalid

### makeSubstitutionGroupTest

    public NodeTest makeSubstitutionGroupTest(SchemaDeclaration elementDecl)

  Make a test for elements corresponding to a give element declaration

### makeParser

    public static org.xml.sax.XMLReader makeParser(java.lang.String className)
                                            throws javax.xml.transform.TransformerFactoryConfigurationError

  Create a new SAX XMLReader object using the class name provided.
  The named class must exist and must implement the org.xml.sax.XMLReader or Parser interface.
  This method returns an instance of the parser named.

  Parameters:
    `className` - A string containing the name of the SAX parser class, for example "com.microstar.sax.LarkDriver"
  Returns:
    an instance of the Parser class named, or null if it is not loadable or is not a Parser.
    `javax.xml.transform.TransformerFactoryConfigurationError`

### getLocale

    public static java.util.Locale getLocale(java.lang.String lang)

  Get a locale given a language code in XML format

### setDebugger

    public void setDebugger(Debugger debugger)

  Set the debugger to be used

### getDebugger

    public Debugger getDebugger()

  Get the debugger in use. This will be null if no debugger has been registered.

### makeSlotManager

    public SlotManager makeSlotManager()

  Factory method to create a SlotManager

### getOptimizer

    public Optimizer getOptimizer()

  Factory method to get an Optimizer