Package net.sf.saxon.s9api
Class XsdSchema
java.lang.Object
net.sf.saxon.s9api.XsdSchema
- Direct Known Subclasses:
XsdSchemaImpl
This class represents an XSD Schema - that is, a set of schema components, typically resulting
from compiling a collection of one or more source schema documents.
The class exists in all Saxon editions as an abstract place-holder class, but concrete implementations exist only in Saxon-EE.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract XsdSchemaCombine this schema with another, to form a new combined schema.abstract voidexportComponents(Destination destination) Export a precompiled Schema Component Model containing all the components (except built-in components) in this schema.abstract SchemaGet the underlying implementation-level Schemaabstract ItemTypeFactoryCreate anItemTypeFactorywhich can be used to createItemTypeobjects based on the definitions in this schema.abstract SchemaValidatorCreate aSchemaValidatorwhich can be used to validate instance documents against this schema
-
Constructor Details
-
XsdSchema
public XsdSchema()
-
-
Method Details
-
newValidator
Create aSchemaValidatorwhich can be used to validate instance documents against this schema- Returns:
- a new
SchemaValidator - Since:
- 13.0
-
newItemTypeFactory
Create anItemTypeFactorywhich can be used to createItemTypeobjects based on the definitions in this schema.- Returns:
- an
ItemTypeFactorylinked to this schema.
-
combine
Combine this schema with another, to form a new combined schema.Note: in relatively unusual circumstances, a document that is valid against one of the two input schemas might not be valid against the combined schema. For example, if the first schema has a wildcard with
processContents="lax"then an element might be laxly validated when assessed using that schema, but strictly validated when assessed against the combined schema; and strict validation may fail while lax validation succeeded.- Parameters:
other- the other schema to combine with this one.- Returns:
- the combined schema, assuming the two schemas are compatible
- Throws:
SaxonApiException- if the two schemas cannot be combined, for example because they contain components with duplicated names- Since:
- 13.0
-
getUnderlyingSchema
Get the underlying implementation-level Schema -
exportComponents
Export a precompiled Schema Component Model containing all the components (except built-in components) in this schema.- Parameters:
destination- the destination to recieve the precompiled Schema Component Model in the form of an XML document- Throws:
SaxonApiException- if a failure occurs writing the schema components to the supplied destination
-