Package com.saxonica.ee.schema.sdoc


package com.saxonica.ee.schema.sdoc

Internal classes supporting the XDM tree representation of an XSD schema document. The various classes such as XSDAttributeGroup correspond to similarly-named elements in an XSD schema document, such as in this case xs:attribute-group. There are some differences, for example xs:restriction elements map to different classes depending on their parentage.

When importing a schema, the task is to read a schema provided as a source XML document, to validate that it conforms to all the XML representation rules defined in the W3C XML Schema specification, and to construct a representation of the schema using the classes in package com.saxonica.ee.schema. The classes in the importer package are transient, they are used only during the course of constructing the schema object model.

The process is analogous to the way stylesheets are built. Each schema document results in a Saxon tree. Each kind of element in the source schema is assigned to a specific class (a subclass of SchemaElement), which constructs the representation of the corresponding object in the schema object model.

Processing is in a number of phases:

  1. The tree is constructed (which performs XML validation and namespace validation)
  2. Attributes are processed and validated. At this stage the parent of a node is available but its siblings and children should not be accessed.
  3. Structural validation is performed by the validate() method. This is essentially responsible for checking that the schema document is structurally valid according to the schema for schemas.
  4. Semantic validation is carried out by the checkRepresentation() method. This is responsible for checking the rules in the XML Representation constraints.
  5. Schema components are constructed by the buildComponents() method.

There should be no need for user applications to use any of the classes in this package.

  • Classes
    Class
    Description
    An abstract superclass for schema elements whose only permitted content is an Annotation element
    This class is a SchemaURIResolver implemented as a wrapper around a JAXP LSResourceResolver
    This object represents a saxon:param element in a schema document.
    saxon:preprocess is an implementation-defined pre-lexical facet as permitted by XML Schema 1.1.
    An XML document containing a module of an XML Schema.
    Class that applies a standard transformation to a schema document: specifically, the chameleon transformation or the override transformation
    An element in an XML Schema document.
     
    Class SchemaNodeFactory.
    A class for reading XML Schema documents.
    This class parses the two XPath subsets defined in XML Schema for handling the "selector" and "field" attributes of the <unique>, <key>, and <keyref> elements.
    A simple type definition holds all the information about a simpleType during the course of schema processing.
    An unknown element in an XML Schema document.
    This is a filter inserted into the input pipeline for processing schema documents, whose task is to examine attributes such as vc:maxVersion and discard those parts of the schema document that are to be ignored because of those attributes.
    This module constructs synthetically (that is, without reading an XML schema document) the schema components for the XML namespace
    An xs:alternative element in a schema (see draft XML Schema 1.1 Part 1)
    An xs:annotation element in an XML Schema document
    An xs:any element in an XML Schema document
    An xs:anyAttribute element in an XML Schema document
    An xs:assert or xs:assertion element in a schema (see draft XML Schema 1.1 Part 1)
    Define a customized XPath evaluator which injects code into the XPath code generation; this has the effect for a complex-type XSDAssert of modifying the expression so that instead of returning a boolean, it returns a list of nodes that contribute to the invalidity of the assertion.
    An xs:attribute element in a schema document
    An xs:attributeGroup element in an XML Schema document
    An xs:complexContent element in an XML Schema Document
    An xs:restriction element that is a child of xs:complexContent within an XML Schema document
    An xs:complexType element in an XML Schema document
    An xs:sequence, xs:choice, or xs:all element in an XML Schema document
    An element in an XML Schema document defining the default open content
    An xs:documentation or xs:appinfo element in an XML Schema document
    An xs:element element in a schema document
    An xs:extension element in a schema document
    An element in an XML Schema document representing a facet, for example minLength or pattern or enumeration: any facet except assertion, which is represented by the XSDAssert class
    An xs:field or xs:selector element in an XML Schema document
    An xs:group element in an XML Schema document
    An xs:unique, xs:key, or xs:keyref element in an XML Schema document
    An xs:import element in an XML Schema document
    An xs:include element in an XML Schema document
    This class represents an xs:list element in a schema document.
    An element in an XML Schema document representing a notation declaration
    An element in an XML Schema document defining the default open content
    An xs:override element in an XML Schema Document
    An xs:redefine element in an XML Schema Document
    An xs:schema element in an XML Schema document
    An xs:simpleContent element in an XML Schema document
    An xs:restriction element in an XML Schema document that appears as a child of an xs:simpleContent element
    An xs:simple-type element in an XML Schema document
    An xs:restriction element in an XML Schema Document, whose parent element is an xs:simpleType
    An xs:union element in an XML Schema document
    This module constructs synthetically (that is, without reading an XML schema document) the schema components for the XML namespace