Package com.saxonica.ee.schema.sdoc
Class SchemaDocument
java.lang.Object
com.saxonica.ee.schema.sdoc.SchemaDocument
An XML document containing a module of an XML Schema. This object is a simple wrapper around the document
node of the tree representing the parsed XML schema document, and is used to provide type-safety and a level
of abstraction for the interfaces that use it.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the document wrapped by this SchemaDocumentGet the target namespace of the schema documentGet the xs:schema element within the schema documentboolean
Ask if this is a compiled (SCM) schema documentboolean
Ask if this is a source schema document
-
Constructor Details
-
SchemaDocument
Create a SchemaDocument from a given document. This document must have been built using the SchemaNodeFactory- Parameters:
doc
- the document containing the xs:schema element
-
-
Method Details
-
getDocument
Get the document wrapped by this SchemaDocument- Returns:
- the document
-
isSourceSchemaDocument
public boolean isSourceSchemaDocument()Ask if this is a source schema document- Returns:
- true if this schema document contains source XSD declarations
-
isCompiledSchemaDocument
public boolean isCompiledSchemaDocument()Ask if this is a compiled (SCM) schema document- Returns:
- true if this schema document contains compiled SCM declarations
-
getXSDSchema
Get the xs:schema element within the schema document- Returns:
- the XSDSchema object representing the xs:schema element, or null if the SchemaDocument does not contain an xs:schema element (for example if it contains a compiled schema)
-
getTargetNamespace
Get the target namespace of the schema document- Returns:
- the target namespace in the xs:schema element of the schema document
-