Free Trial - Stylus Studio, The World's Best XML IDE!


Package com.saxonica.schema

The Schema Object Model package

See:
          Description

Interface Summary
CircularityChecker This interface represents an object that is capable of participating in a cycle.
Particle Represents a Particle as defined by XML Schema.
SchemaComponent A SchemaComponent is an object in a schema.
Selection A selection represents the restricted form of path expression permitted in XML Schema (both the selector and field variants)
Term Represents a Term in a content model as defined by XML Schema.
 

Class Summary
AbstractParticle An abstract class that represents an XML Schema Particle
AllCompositor An AllCompositor represents an xs:all element in the schema
AttributeDecl An XML Schema Attribute Declaration.
AttributeGroup An XML Schema Attribute Group Definition.
AttributeGroupDecl An XML Schema Attribute Group Declaration.
AttributeGroupReference An XML Schema Attribute Group Reference, corresponding to an xs:attributeGroup element with a 'ref' attribute.
AttributeWildcard This class represents an xs:anyAttribute element in the schema.
AutomatonState Defines a state of a finite state machine used when validating an instance against a complex type.
AutomatonState.Edge Internal class to represent the data associated with a transition: the element that triggers the transition, and the new state that results from the transition.
ChoiceCompositor A ChoiceCompositor represents an xs:choice element in the schema
Compositor An XML Schema Compositor: choice, sequence, or all.
DigitsFacet Represents either of the facets totalDigits or fractionDigits
ElementDecl The object represents an element declaration in the schema.
ElementWildcard This class represents an element in the schema.
EnumerationFacet Represents a single enumeration facet defined on a simple type.
EnumerationFacetSet Represents 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.
FacetCollectionImpl A collection of facets.
FacetListIterator A list for maintaining facets
Group An XML Schema Group
IdentityConstraint The base class for the XML Schema Identity Constraints (key, keyref, unique).
IdentityField A class which represents the field selector for an IdentityConstraint
IdentitySelector A class which represents the selector for an IdentityConstraint
Key A class that represents the XML Schema Identity Constraint: Key.
KeyRef A class that represents the XML Schema Identity Constraint: KeyRef.
LengthFacet Represents the length facet.
MaxLengthFacet Represents the minLength facet
MinLengthFacet Represents the minLength facet
PathSelection A PathSelection is a Selection that applies a NodeTest to each element between the context element and the node being tested, and returns true if they all match.
PatternFacet Represents a pattern facet on a schema-defined simple type
Schema A class representing a collection of schema components corresponding to a single target namespaces.
SchemaElement The base class for all XML Schema stuctures.
SchemaNames A class which holds the names for many of the Schema related components.
SequenceCompositor A SequenceCompositor represents an xs:sequence element in the schema
SuperSchema A class representing the collection of all known schema components, aggregated across all namespaces
UnionSelection A union selection is a selection consisting of several alternatives separated by "|"
UnionType A class that represents the XML Schema Union simple-type.
Unique A class that represents the XML Schema Identity Constraint: Unique.
UnknownDef This class is temporary until I finish the implementation [KV]
UserComplexType A user-defined complex type (that is, any complex type other than xs:anyType)
ValueRangeFacet Represents any of the facets minInclusive, maxInclusive, minExclusive, maxExclusive
WhitespaceFacet Represents a whitespace facet on a schema-defined simple type
Wildcard A class that represents an XML Schema Wildcard.
 

Package com.saxonica.schema Description

The Schema Object Model package

This package contains classes used to represent the information in a schema.

The code is derived from Castor, heavily modified (though retaining much of the original design). The classes representing objects in the schema are constructed using the corresponding classes in the Schema Importer package.

Representing the schema itself is the class net.sf.saxon.schema.Schema. 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.

The SuperSchema class 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. At some time in the future it is possible that it may be replaced by an API conforming to externally-defined standards.

In the original Castor version of this code, the schema object model was designed for use by arbitrary client applications. It therefore provided methods to remove objects as well as to create them, it validated all arguments, and it allowed multithreaded updates. The version of the code in Saxon is designed to allow creation of a schema only by direct use of the class SchemaReader. Unused methods for removing and renaming objects have therefore been deleted, and validation already performed by the importer classes is not repeated. Validation is done in the importer classes wherever possible because this gives better diagnostics and error recovery.



Stylus Studio features integrated development and debugging support for Saxon in the XQuery editor and XSLT editor.