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
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
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
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.
Interface Summary Interface Description ComponentReferenceA reference to a schema component. ComponentWithValueConstraintInterface for Element Declaration, Attribute Declaration and Attribute Use, created because they share common functionality for handling fixed and default values SerializableSchemaComponentA component that can be serialized by the SchemaSerializer. TermRepresents a Term in a content model as defined by XML Schema. UserSchemaComponentA SchemaComponent is an object in a schema.
Class Summary Class Description AllModelGroupAn AllModelGroup represents an xs:all element in the schema AssertionAn Assertion schema component (See XML Schema 1.1 Part 1) AssertionFacetRepresents an assertion facet on a schema-defined simple type. AttributeDeclAn XML Schema Attribute Declaration. AttributeGroupDeclAn XML Schema Attribute Group Declaration. AttributeGroupReferenceAn XML Schema Attribute Group Reference, corresponding to an xs:attributeGroup element with a 'ref' attribute. AttributeUseAn XML Schema Attribute Use: that is, a reference to an attribute declaration from within a complex type or attribute group. AttributeWildcardThis class represents an xs:anyAttribute element in the schema. ChoiceModelGroupA ChoiceCompositor represents an xs:choice element in the schema ContentTypeCorresponds to a Content Type Property Record as defined in the XML Schema 1.1 specification DigitsFacetRepresents either of the facets totalDigits or fractionDigits DistinctFacetThe saxon:distinct facet on a list type can be used to constrain the list to contain distinct values. ElementDeclThe object represents an element declaration in the schema. ElementParticleA reference to an element declaration within the content model of a complex type. ElementWildcardThis class represents an
<any>element in the schema.
EnumerationFacetRepresents a single enumeration facet defined on a simple type. EnumerationFacetSetRepresents the set of enumeration values defined on a single simple type, This is a "virtual" facet that combines all the enumeration facets in one simple type definition. ExplicitTimezoneFacetRepresents an explicitTimezone facet on a schema-defined simple type derived from date, time, dateTime, gYear, gYearMonth, gMonth, gMonthDay, or gDay FacetRepresents an XML Schema Facet. FieldOrSelectorThe selector of an IdentityConstraint FractionDigitsFacetRepresents the fraction-digits facet in a simple type restriction IdentityConstraintThe base class for the XML Schema Identity Constraints (key, keyref, unique). IdentityConstraintReferenceA reference to an identity constraint IdentityFieldThe field selector for an IdentityConstraint IdentitySelectorThe selector of an IdentityConstraint KeyA class that represents the XML Schema Identity Constraint: Key. KeyRefThis class represents an xs:keyRef identity constraint in a schema LengthFacetRepresents the length facet LengthRangeFacetAbstract class for the three facets length, minLength, and maxLength. MaxExclusiveFacetImplements the maxExclusive facet on a simple type MaxInclusiveFacetImplements the maxInclusive facet on a simple type MaxLengthFacetRepresents the minLength facet MinExclusiveFacetImplements the minExclusive facet on a simple type MinInclusiveFacetImplements the minInclusive facet on a simple type MinLengthFacetRepresents the minLength facet ModelGroupAn XML Schema Model Group. ModelGroupDefinitionA Model Group Definition: a schema component corresponding to a top-level (named) xs:group element in a schema document. ModelGroupParticleA reference within the content model of a complex type to a Model Group Definition. NotationA Notation Declaration Schema Component OrderFacetThe saxon:order facet on a list type can be used to constrain the list to be in ascending or descending order. ParticleRepresents a Particle as defined by XML Schema. PatternFacetRepresents a pattern facet on a schema-defined simple type PreparedSchemaA schema is a collection of schema components. PreprocessFacetRepresents the preprocess facet on a schema-defined simple type. SchemaCompilerA SchemaCompiler is capable of reading source schema documents and converting them into collections of schema components. SchemaModelLoaderThis class allows a compiled schema model in SCM format to be loaded into memory. SchemaModelSerializerThis class provides services enabling a compiled schema to be serialized to disk SchemaStructureThe base class for all XML Schema stuctures. SequenceModelGroupA SequenceCompositor represents an xs:sequence element in the schema SimpleComponentReferenceA reference to a named schema group within the content model of a complex type SingleNamespaceSchemaA schema (collection of schema components) that has an identifiable target namespace: typically the set of components derived from a single import or include. SymbolSpaceThis class holds constants used to identify the various symbol spaces defined in XML Schema: element declarations, attribute declarations, types, groups, and so on. TotalDigitsFacetEepresents the value of the totalDigits facet TypeAlternativeA TypeAlternative schema component (See XML Schema 1.1 Part 1 Working Draft) TypeReferenceA reference to a simple or complex type UniqueThis class represents an xs:unique identity constraint UserAtomicTypeAn object belonging to this class represents an atomic type: either a built-in atomic type, or a user-defined atomic type. UserComplexTypeA user-defined complex type (that is, any complex type other than xs:anyType) UserDefinedTypeThis class represents a user-defined simple type or complex type as defined in XML Schema. UserListTypeRepresents a SimpleType that is a list of a given SimpleType, known as its itemType. UserSimpleTypeThis class represents a used-defined simple type, as defined in the XML Schema specification. UserUnionTypeA class that represents the XML Schema simple-type with variety union. ValueConstraintA value constraint represents the default or fixed value of an element declaration, attribute declaration, or attribute use ValueRangeFacetRepresents any of the facets minInclusive, maxInclusive, minExclusive, maxExclusive WhitespaceFacetRepresents a whitespace facet on a schema-defined simple type WildcardA class that represents an XML Schema Wildcard.
Enum Summary Enum Description Optionality ValueConstraint.Variety
Exception Summary Exception Description MissingComponentExceptionImplThis exception occurs when an attempt is made to dereference a reference from one schema component to another, if the target of the reference cannot be found.