public abstract class SchemaReader extends Object
Modifier and Type | Method and Description |
---|---|
static SchemaDocument |
buildSchemaDocument(Source source,
SchemaCompiler compiler,
PipelineConfiguration pipe,
SchemaElement referrer)
Build the tree representation of a schema document, without doing any processing or XSD-specific
validation of the content
|
static Source |
getSource(String baseURI,
String relativeURI,
PipelineConfiguration pipe,
String targetNamespace)
Resolve and dereference a URI to get a Source object representing a schema document
|
static Source[] |
getSources(String baseURI,
String[] relativeURIs,
PipelineConfiguration pipe,
String targetNamespace)
Resolve and dereference a set of URIs to get a set of Source objects representing schema documents
|
static SchemaDocument |
read(Source source,
SchemaCompiler compiler,
PipelineConfiguration pipe,
SchemaElement referrer)
Read the Schema from a source XML document and return the Schema
document.
|
public static Source getSource(String baseURI, String relativeURI, PipelineConfiguration pipe, String targetNamespace) throws SchemaException
baseURI
- the base URIrelativeURI
- the URI to be resolved relative to the base URIpipe
- the pipeline configuration (which may define a URIResolver to be used)targetNamespace
- the targetNamespace of the schema document required (this is set to
null when doing an include or redefine, because in those cases the targetNamespace cannot
be used to locate the schema document)SchemaException
- if any errors occurpublic static Source[] getSources(String baseURI, String[] relativeURIs, PipelineConfiguration pipe, String targetNamespace) throws SchemaException
baseURI
- the base URIrelativeURIs
- the URIs (location hints) to be resolved relative to the base URIpipe
- the pipeline configuration (which may define a URIResolver to be used)targetNamespace
- the targetNamespace of the schema document required (this is set to
null when doing an include or redefine, because in those cases the targetNamespace cannot
be used to locate the schema document)SchemaException
- if any errors occurpublic static SchemaDocument read(Source source, SchemaCompiler compiler, PipelineConfiguration pipe, SchemaElement referrer) throws SchemaException
SchemaCompiler.validate(com.saxonica.ee.schema.sdoc.SchemaDocument)
source
- the JAXP Source containing the schema documentcompiler
- used for tracking source documents read, and for error reportingpipe
- the pipeline configurationreferrer
- if the schema document is referenced from an xs:import, xs:include, or xs:redefined, this
parameter identifies that element; otherwise, null.SchemaException
- if the schema module can't be read or parsed,
or if the schema module is an invalid schemapublic static SchemaDocument buildSchemaDocument(Source source, SchemaCompiler compiler, PipelineConfiguration pipe, SchemaElement referrer) throws SchemaException
source
- the source of the modulecompiler
- the SchemaCompiler (holds configuration information and keeps track of errors)pipe
- the Pipeline Configurationreferrer
- the xs:import or xs:include element, etc, that requested processing of this moduleSchemaException
- if XML parsing or tree
construction failsCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.