Skip navigation links

Package com.saxonica.ee.schema

This package contains classes used to represent the information in a schema, that is, the schema components.

See: Description

Package com.saxonica.ee.schema Description

This package contains classes used to represent the information in a schema, that is, the schema components. The model is closely related to the schema component model defined in the XSD specifications, but not identical in every respect.

Representing the schema itself is the class PreparedSchema. All the schemas that have been imported into the application are linked from the Configuration object; they thus outlive a single transformation or query. Other important classes have intuitive names, for example ComplexType, SimpleType, ElementDecl, and AttributeDecl.

Schema components in Saxon are always built from schema documents, so the classes representing objects in the schema are constructed using the corresponding classes in the com.saxonica.schema.sdoc package. (There is an exception to this: schema components can also be exported to an SCM file, and subsequently re-imported from this file.)

The schema class obtained by the Configuration.getSuperSchema() method represents the collection of all loaded schemas. There can only be one active collection of schema components for any one namespace. This means it is not possible to use two unrelated no-namespace schemas concurrently, or two different versions of a schema for the same namespace.

Named types, element declarations, and attribute declarations are indexed directly from the NamePool. It is not necessary first to locate the schema in which they are contained, they can be found directly using the namePool fingerprint of their expanded QName.

The schema model retains nearly all the information in the source schema: the notable omission is annotations.

The API for this package is particular to Saxon, though it is influenced by the definition of schema components in the XSD specification. At some time in the future it is possible that it may be replaced by an API conforming to externally-defined standards.

Skip navigation links

Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.