net.sf.saxon.s9api
Class SchemaManager
java.lang.Object
net.sf.saxon.s9api.SchemaManager
public class SchemaManager
extends java.lang.Object
void | exportComponents(Destination destination) - Export a precompiled Schema Component Model containing all the components (except built-in components)
that have been loaded into this Processor.
|
ErrorListener | getErrorListener() - Get the ErrorListener being used while loading and validating schema documents
|
SchemaURIResolver | getSchemaURIResolver() - Get the SchemaURIResolver to be used during schema loading.
|
void | importComponents(Source source) - Import a precompiled Schema Component Model from a given Source.
|
void | load(Source source) - Load a schema document from a given Source.
|
SchemaValidator | newSchemaValidator() - Create a SchemaValidator which can be used to validate instance documents against the schema held by this
SchemaManager
|
void | setErrorListener(ErrorListener listener) - Set the ErrorListener to be used while loading and validating schema documents
|
void | setSchemaURIResolver(SchemaURIResolver resolver) - Set the SchemaURIResolver to be used during schema loading.
|
exportComponents
public void exportComponents(Destination destination)
throws SaxonApiException
Export a precompiled Schema Component Model containing all the components (except built-in components)
that have been loaded into this Processor.
destination
- the destination to recieve the precompiled Schema Component Model in the form of an
XML document
getErrorListener
public ErrorListener getErrorListener()
Get the ErrorListener being used while loading and validating schema documents
- listener The error listener in use. This is notified of all errors detected during the
compilation. Returns null if no user-supplied ErrorListener has been set.
getSchemaURIResolver
public SchemaURIResolver getSchemaURIResolver()
Get the SchemaURIResolver to be used during schema loading.
- the URIResolver used during stylesheet compilation. Returns null if no user-supplied
URIResolver has been set.
importComponents
public void importComponents(Source source)
throws SaxonApiException
Import a precompiled Schema Component Model from a given Source. The schema components derived from this schema
document are added to the cache of schema components maintained by this SchemaManager
load
public void load(Source source)
throws SaxonApiException
Load a schema document from a given Source. The schema components derived from this schema
document are added to the cache of schema components maintained by this SchemaManager
source
- the document containing the schema. The getSystemId() method applied to this Source
must return a base URI suitable for resolving xs:include
and xs:import
directives.
SaxonApiException
- if the schema document is not valid, or if its contents are inconsistent
with the schema components already held by this SchemaManager.
newSchemaValidator
public SchemaValidator newSchemaValidator()
Create a SchemaValidator which can be used to validate instance documents against the schema held by this
SchemaManager
setErrorListener
public void setErrorListener(ErrorListener listener)
Set the ErrorListener to be used while loading and validating schema documents
listener
- The error listener to be used. This is notified of all errors detected during the
compilation.
setSchemaURIResolver
public void setSchemaURIResolver(SchemaURIResolver resolver)
Set the SchemaURIResolver to be used during schema loading. This SchemaURIResolver, despite its name,
is
not used for resolving relative URIs against a base URI; it is used for dereferencing
an absolute URI (after resolution) to return a
javax.xml.transform.Source
representing the
location where a schema document can be found.
This SchemaURIResolver is used to dereference the URIs appearing in
xs:import
,
xs:include
, and
xs:redefine
declarations.
resolver
- the SchemaURIResolver to be used during schema loading.