public class SchemaManager
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
SchemaManager(Configuration config) |
Modifier and Type | Method and Description |
---|---|
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.
|
javax.xml.transform.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(javax.xml.transform.Source source)
Import a precompiled Schema Component Model from a given Source.
|
void |
load(javax.xml.transform.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(javax.xml.transform.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.
|
protected SchemaManager(Configuration config)
public void setErrorListener(javax.xml.transform.ErrorListener listener)
listener
- The error listener to be used. This is notified of all errors detected during the
compilation.public javax.xml.transform.ErrorListener getErrorListener()
public void setSchemaURIResolver(SchemaURIResolver resolver)
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.public SchemaURIResolver getSchemaURIResolver()
public void load(javax.xml.transform.Source source) throws SaxonApiException
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.public void importComponents(javax.xml.transform.Source source) throws SaxonApiException
source
- the XML file containing the schema component model, as generated by a previous call on
exportComponents(net.sf.saxon.s9api.Destination)
SaxonApiException
public void exportComponents(Destination destination) throws SaxonApiException
destination
- the destination to recieve the precompiled Schema Component Model in the form of an
XML documentSaxonApiException
public SchemaValidator newSchemaValidator()