This module defines a set of objects and interfaces for accessing and querying the post-schema-validation infoset (PSVI) defined in Contributions to the post-schema-validation infoset ([XMLSchema Part 1], Appendix C.2). The interfaces defined in section 1.2 allow developers to access the XML Schema components ([XMLSchema Part 1], Section 3), which follow as a consequence of validation and/or assessment. Section 1.3 defines a set of interfaces for accessing the PSVI from an instance document. Section 1.4 defines a set of interfaces for loading XML Schema documents.
GenericString typeTo ensure interoperability, this specification defines the following:
A GenericString is a sequence of 16-bit units.
valuetype GenericString sequence<unsigned short>;
Applications must encode GenericString using UTF-16
(defined in [Unicode 3.0] and Amendment 1 of
[ISO/IEC 10646]).
The UTF-16 encoding was chosen because of its widespread use in industry.
For XML, the document character set
(and therefore the notation of numeric character references) is based on
UCS [ISO/IEC 10646]. A single numeric character reference in a
source document may therefore in some cases correspond to two 16-bit
units in a GenericString (a high surrogate and a low
surrogate).
Note: Even though this specification defines the name of the string type to be
GenericString, bindings may use different names. For
example for Java, GenericString is bound to the
String type because it also uses UTF-16 as its
encoding.
GenericObject typeTo ensure interoperability, this specification defines the following:
A GenericObject represents a reference to an
application object.
typedef Object GenericObject;
Note: Even though this specification uses the type GenericObject, bindings
may use different types. For example, in Java and ECMAScript
GenericObject is bound to the Object type.
This section defines the specialized collections framework to retrieve and/or query objects of the types defined in this module.
Objects implementing the XSNamedMap interface are
used to represent immutable collections of XML Schema components that can be
accessed by name. Note that XSNamedMap does not
inherit from XSObjectList. The XSObjects in XSNamedMaps
are not maintained in any particular order.
interface XSNamedMap { readonly attribute unsigned long length; XSObject item(in unsigned long index); XSObject itemByName(in GenericString namespace, in GenericString localName); };
length of type unsigned long, readonlyXSObjects in the XSObjectList.
The range of valid child object indices is 0 to length-1 inclusive.
itemindexth item in the collection or null
if index is greater than or equal to the number of objects in the
list. The index starts at 0.
index of type
unsigned long|
The |
itemByNameXSObject specified by local name and namespace URI.null
as the namespace parameter for methods if they wish to specify no
namespace.namespace of type
GenericStringXSObject to retrieve, or
null if the XSObject has no namespace.
localName of type
GenericStringXSObject to retrieve.
The XSObjectList interface provides the abstraction of an immutable ordered collection of
XSObjects, without defining or constraining how this collection is implemented.
interface XSObjectList { readonly attribute unsigned long length; XSObject item(in unsigned long index); };
itemindexth item in the collection or null
if index is greater than or equal to the number of objects in the
list. The index starts at 0.
index of type
unsigned long
The XSNamespaceItemList interface provides the
abstraction of an immutable ordered collection of XSNamespaceItems, without
defining or constraining how this collection is implemented.
interface XSNamespaceItemList { readonly attribute unsigned long length; XSNamespaceItem item(in unsigned long index); };
length of type unsigned long, readonlyXSNamespaceItems in the list. The range of valid child
object indices is 0 to length-1 inclusive.
itemindexth item in the collection or null
if index is greater than or equal to the number of objects in the
list. The index starts at 0.
index of type
unsigned long|
The |
The StringList is an immutable ordered collection of GenericString.
interface StringList { readonly attribute unsigned long length; boolean contains(in GenericString item); GenericString item(in unsigned long index); };
length of type unsigned long, readonlyGenericStrings in the list.
The range of valid child
object indices is 0 to length-1 inclusive.
containsGenericString item is a
member of this list.
item of type
GenericStringGenericString whose presence in this
list is to be tested.
|
True if this list contains the |
itemindexth item in the collection or null
if index is greater than or equal to the number of objects in the
list. The index starts at 0.
index of type
unsigned long|
The |
The LSInputList interface provides the abstraction of an ordered collection of
LSInputs, without defining or constraining how this collection is implemented.
interface LSInputList { readonly attribute unsigned long length; LSInput item(in unsigned long index); };
length of type unsigned long, readonlyLSInputs in the list. The range of valid child
object indices is 0 to length-1 inclusive.
itemindexth item in the collection or null
if index is greater than or equal to the number of objects in the
list. The index starts at 0.
index of type
unsigned long
|
The |
The ShortList is an immutable ordered collection of unsigned short.
interface ShortList { readonly attribute unsigned long length; boolean contains(in unsigned short item); unsigned short item(in unsigned long index) raises(XSException); };
length of type unsigned long, readonlyunsigned shorts in the list.
The range of valid child
object indices is 0 to length-1 inclusive.
containsunsigned short item is a
member of this list.
item of type
unsigned shortunsigned short whose presence in this
list is to be tested.
|
True if this list contains the |
itemindexth item in the collection. The index starts at 0.
index of type
unsigned long
|
The |
|
INDEX_SIZE_ERR: if |
The interfaces within this section describe the schema components of the XML Schema Recommendation. The description for most schema components is isomorphic to the components that they represent. Some properties or components might not be available if a schema contains errors.
The XML Schema API operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impossible to perform (either for logical reasons, because data is lost, or because the implementation has become unstable).
Implementations should raise other exceptions under other circumstances.
Some languages and object systems do not support the concept of exceptions. For such systems, error conditions may be indicated using native error reporting mechanisms. For some bindings, for example, methods may return error codes similar to those listed in the corresponding method descriptions.
exception XSException { unsigned short code; }; // ExceptionCode const unsigned short NOT_SUPPORTED_ERR = 1; const unsigned short INDEX_SIZE_ERR = 2;
An integer indicating the type of error generated.
INDEX_SIZE_ERRNOT_SUPPORTED_ERRThe XSObject is a base object for the XML Schema component model.
interface XSObject { readonly attribute unsigned short type; readonly attribute GenericString name; readonly attribute GenericString namespace; readonly attribute XSNamespaceItem namespaceItem; };
name of type GenericString, readonlyNCName, as defined in
XML Namespaces, of this declaration specified in the {name} property
of the component or null if the definition of
this component does not have a {name} property. For anonymous types,
the processor must construct and expose an anonymous type name that is distinct from the name of every named type and the name
of every other anonymous type.namespace of type GenericString, readonlynull if it is unspecified.
namespaceItem of type XSNamespaceItem, readonlynull otherwise.type of type unsigned short, readonlytype of this object, i.e. ELEMENT_DECLARATION.
This interface defines constants used by this specification.
interface XSConstants { // XML Schema Components const unsigned short ATTRIBUTE_DECLARATION = 1; const unsigned short ELEMENT_DECLARATION = 2; const unsigned short TYPE_DEFINITION = 3; const unsigned short ATTRIBUTE_USE = 4; const unsigned short ATTRIBUTE_GROUP = 5; const unsigned short MODEL_GROUP_DEFINITION = 6; const unsigned short MODEL_GROUP = 7; const unsigned short PARTICLE = 8; const unsigned short WILDCARD = 9; const unsigned short IDENTITY_CONSTRAINT = 10; const unsigned short NOTATION_DECLARATION = 11; const unsigned short ANNOTATION = 12; const unsigned short FACET = 13; const unsigned short MULTIVALUE_FACET = 14; // Derivation constants const unsigned short DERIVATION_NONE = 0; const unsigned short DERIVATION_EXTENSION = 1; const unsigned short DERIVATION_RESTRICTION = 2; const unsigned short DERIVATION_SUBSTITUTION = 4; const unsigned short DERIVATION_UNION = 8; const unsigned short DERIVATION_LIST = 16; // Scope const unsigned short SCOPE_ABSENT = 0; const unsigned short SCOPE_GLOBAL = 1; const unsigned short SCOPE_LOCAL = 2; // Value Constraint const unsigned short VC_NONE = 0; const unsigned short VC_DEFAULT = 1; const unsigned short VC_FIXED = 2; // Built-in types: primitive and derived const unsigned short ANYSIMPLETYPE_DT = 1; const unsigned short STRING_DT = 2; const unsigned short BOOLEAN_DT = 3; const unsigned short DECIMAL_DT = 4; const unsigned short FLOAT_DT = 5; const unsigned short DOUBLE_DT = 6; const unsigned short DURATION_DT = 7; const unsigned short DATETIME_DT = 8; const unsigned short TIME_DT = 9; const unsigned short DATE_DT = 10; const unsigned short GYEARMONTH_DT = 11; const unsigned short GYEAR_DT = 12; const unsigned short GMONTHDAY_DT = 13; const unsigned short GDAY_DT = 14; const unsigned short GMONTH_DT = 15; const unsigned short HEXBINARY_DT = 16; const unsigned short BASE64BINARY_DT = 17; const unsigned short ANYURI_DT = 18; const unsigned short QNAME_DT = 19; const unsigned short NOTATION_DT = 20; const unsigned short NORMALIZEDSTRING_DT = 21; const unsigned short TOKEN_DT = 22; const unsigned short LANGUAGE_DT = 23; const unsigned short NMTOKEN_DT = 24; const unsigned short NAME_DT = 25; const unsigned short NCNAME_DT = 26; const unsigned short ID_DT = 27; const unsigned short IDREF_DT = 28; const unsigned short ENTITY_DT = 29; const unsigned short INTEGER_DT = 30; const unsigned short NONPOSITIVEINTEGER_DT = 31; const unsigned short NEGATIVEINTEGER_DT = 32; const unsigned short LONG_DT = 33; const unsigned short INT_DT = 34; const unsigned short SHORT_DT = 35; const unsigned short BYTE_DT = 36; const unsigned short NONNEGATIVEINTEGER_DT = 37; const unsigned short UNSIGNEDLONG_DT = 38; const unsigned short UNSIGNEDINT_DT = 39; const unsigned short UNSIGNEDSHORT_DT = 40; const unsigned short UNSIGNEDBYTE_DT = 41; const unsigned short POSITIVEINTEGER_DT = 42; const unsigned short LISTOFUNION_DT = 43; const unsigned short LIST_DT = 44; const unsigned short UNAVAILABLE_DT = 45; };
Types of schema model components.
ANNOTATIONATTRIBUTE_DECLARATIONATTRIBUTE_GROUPATTRIBUTE_USEELEMENT_DECLARATIONFACETIDENTITY_CONSTRAINTMODEL_GROUPMODEL_GROUP_DEFINITIONMULTIVALUE_FACETNOTATION_DECLARATIONPARTICLETYPE_DEFINITIONWILDCARDThis group defines derivation constants for an element declaration and a type definition's final set.
DERIVATION_EXTENSIONXSTypeDefinition final set or
XSElementDeclaration disallowed substitution group.DERIVATION_LISTXSTypeDefinition final set.DERIVATION_NONEDERIVATION_RESTRICTIONXSTypeDefinition final set or
XSElementDeclaration disallowed substitution group.DERIVATION_SUBSTITUTIONXSTypeDefinition final set.DERIVATION_UNIONXSTypeDefinition final set.The constants that describe a scope.
SCOPE_ABSENTabsent.
The scope of such a declaration is determined when it is used in the construction of
complex type definitions.
SCOPE_GLOBALglobal identifies top-level declarations.
SCOPE_LOCALLocally scoped declarations are available for use only within the complex type.The constants that describe a value constraint.
VC_DEFAULTVC_FIXEDVC_NONEConstants for built-in XML Schema types [XMLSchema Part 2].
ANYSIMPLETYPE_DTANYURI_DTBASE64BINARY_DTBOOLEAN_DTBYTE_DTDATETIME_DTDATE_DTDECIMAL_DTDOUBLE_DTDURATION_DTENTITY_DTFLOAT_DTGDAY_DTGMONTHDAY_DTGMONTH_DTGYEARMONTH_DTGYEAR_DTHEXBINARY_DTIDREF_DTID_DTINTEGER_DTINT_DTLANGUAGE_DTLISTOFUNION_DTLIST_DTLONG_DTNAME_DTNCNAME_DTNEGATIVEINTEGER_DTNMTOKEN_DTNONNEGATIVEINTEGER_DTNONPOSITIVEINTEGER_DTNORMALIZEDSTRING_DTNOTATION_DTPOSITIVEINTEGER_DTQNAME_DTSHORT_DTSTRING_DTTIME_DTTOKEN_DTUNAVAILABLE_DTUNSIGNEDBYTE_DTUNSIGNEDINT_DTUNSIGNEDLONG_DTUNSIGNEDSHORT_DTThis interface represents an XML Schema.
interface XSModel { readonly attribute StringList namespaces; readonly attribute XSNamespaceItemList namespaceItems; XSNamedMap getComponents(in unsigned short objectType); XSNamedMap getComponentsByNamespace(in unsigned short objectType, in GenericString namespace); readonly attribute XSObjectList annotations; XSElementDeclaration getElementDeclaration(in GenericString namespace, in GenericString name); XSAttributeDeclaration getAttributeDeclaration(in GenericString namespace, in GenericString name); XSTypeDefinition getTypeDefinition(in GenericString namespace, in GenericString name); XSAttributeGroupDefinition getAttributeGroup(in GenericString namespace, in GenericString name); XSModelGroupDefinition getModelGroupDefinition(in GenericString namespace, in GenericString name); XSNotationDeclaration getNotationDeclaration(in GenericString namespace, in GenericString name); };
annotations of type XSObjectList, readonlyXSObjectList.
namespaceItems of type XSNamespaceItemList, readonlyXSNamespaceItem), one for each namespace name which appears as the
target namespace of any schema component in
the schema used for that assessment, and one for absent if any schema component in the schema had no
target namespace.
For more information see
schema information.
namespaces of type StringList, readonlynull is not a valid namespace name, but if
there are components that do not have a
target namespace, null is
included in this list.
getAttributeDeclarationnamespace of type
GenericStringnull.name of type
GenericString|
A top-level attribute declaration or |
getAttributeGroupnamespace of type
GenericStringnull.name of type
GenericString|
A top-level attribute group definition or |
getComponentsobjectType of type
unsigned shortELEMENT_DECLARATION.
Note that XSTypeDefinition.SIMPLE_TYPE and
XSTypeDefinition.COMPLEX_TYPE can also be used as the
objectType to retrieve only complex types or simple types,
instead of all types.|
A list of top-level definitions of the specified type in |
getComponentsByNamespaceobjectType of type
unsigned shortELEMENT_DECLARATION.namespace of type
GenericStringnull (for components with no
target namespace).|
A list of top-level definitions of the specified type in |
getElementDeclarationnamespace of type
GenericStringnull.name of type
GenericString|
A top-level element declaration or |
getModelGroupDefinitionnamespace of type
GenericStringnull.name of type
GenericString|
A top-level model group definition or |
getNotationDeclarationnamespace of type
GenericStringnull.name of type
GenericString|
A top-level notation declaration or |
getTypeDefinitionnamespace of type
GenericStringnull.name of type
GenericString|
An |
The interface represents the namespace schema information information item. Each namespace schema information information item corresponds to an XML Schema with a unique namespace name.
interface XSNamespaceItem { readonly attribute GenericString schemaNamespace; XSNamedMap getComponents(in unsigned short objectType); readonly attribute XSObjectList annotations; XSElementDeclaration getElementDeclaration(in GenericString name); XSAttributeDeclaration getAttributeDeclaration(in GenericString name); XSTypeDefinition getTypeDefinition(in GenericString name); XSAttributeGroupDefinition getAttributeGroup(in GenericString name); XSModelGroupDefinition getModelGroupDefinition(in GenericString name); XSNotationDeclaration getNotationDeclaration(in GenericString name); readonly attribute StringList documentLocations; };
annotations of type XSObjectList, readonlyXSObjectList.documentLocations of type StringList, readonlyXSModel.schemaNamespace of type GenericString, readonlynull if absent.getAttributeDeclarationname of type
GenericString|
A top-level attribute declaration or |
getAttributeGroupname of type
GenericString|
A top-level attribute group definition or |
getComponentsobjectType of type
unsigned shortELEMENT_DECLARATION. Note that XSTypeDefinition.SIMPLE_TYPE and
XSTypeDefinition.COMPLEX_TYPE can also be used as the
objectType to retrieve only complex types or simple types,
instead of all types.|
A list of top-level definition of the specified type in |
getElementDeclarationname of type
GenericString|
A top-level element declaration or |
getModelGroupDefinitionname of type
GenericString|
A top-level model group definition definition or |
getNotationDeclarationname of type
GenericString|
A top-level notation declaration or |
getTypeDefinitionname of type
GenericString|
An |
The interface represents the Attribute Declaration schema component.
interface XSAttributeDeclaration : XSObject { readonly attribute XSSimpleTypeDefinition typeDefinition; readonly attribute unsigned short scope; readonly attribute XSComplexTypeDefinition enclosingCTDefinition; readonly attribute unsigned short constraintType; readonly attribute GenericString constraintValue; readonly attribute GenericObject actualVC; // raises(XSException) on retrieval readonly attribute unsigned short actualVCType; // raises(XSException) on retrieval readonly attribute ShortList itemValueTypes; // raises(XSException) on retrieval readonly attribute XSAnnotation annotation; };
actualVC of type GenericObject, readonlynull if the value is in error or there is no value constraint.
|
NOT_SUPPORTED_ERR: Raised if the implementation does not support this method. |
actualVCType of type unsigned short, readonlySTRING_DT, SHORT_DT.
If the type definition of this value is a list type definition, this method returns LIST_DT.
If the type definition of this value is a list type definition whose item type is a union type definition, this method returns LISTOFUNION_DT.
To query the actual constraint value of the list or list of union type definitions use itemValueTypes.
If the actualValue is null, this method returns UNAVAILABLE_DT.
|
NOT_SUPPORTED_ERR: Raised if the implementation does not support this method. |
annotation of type XSAnnotation, readonlynull.
constraintType of type unsigned short, readonlyVC_NONE, VC_DEFAULT, VC_FIXED.
constraintValue of type GenericString, readonlynull.
enclosingCTDefinition of type XSComplexTypeDefinition, readonlyscope), otherwise null
if no such definition exists.
itemValueTypes of type ShortList, readonlyactualValueType
is LIST_DT, the returned array consists of one type kind which represents
the
itemType.
If the actual constraint value represents a list type definition whose item type is a union type definition, i.e. LISTOFUNION_DT,
for each actual constraint value in the list
the array contains the corresponding
memberType kind.
For examples, see ItemPSVI.itemValueTypes.
|
NOT_SUPPORTED_ERR: Raised if the implementation does not support this method. |
scope of type unsigned short, readonlySCOPE_GLOBAL, SCOPE_LOCAL, or SCOPE_ABSENT.
If the scope is local, then the enclosingCTDefinition is present.
typeDefinition of type XSSimpleTypeDefinition, readonlyThe interface represents the Element Declaration schema component.
interface XSElementDeclaration : XSTerm { readonly attribute XSTypeDefinition typeDefinition; readonly attribute unsigned short scope; readonly attribute XSComplexTypeDefinition enclosingCTDefinition; readonly attribute unsigned short constraintType; readonly attribute GenericString constraintValue; readonly attribute GenericObject actualVC; // raises(XSException) on retrieval readonly attribute unsigned short actualVCType; // raises(XSException) on retrieval readonly attribute ShortList itemValueTypes; // raises(XSException) on retrieval readonly attribute boolean nillable; readonly attribute XSNamedMap identityConstraints; readonly attribute XSElementDeclaration substitutionGroupAffiliation; boolean isSubstitutionGroupExclusion(in unsigned short exclusion); readonly attribute unsigned short substitutionGroupExclusions; boolean isDisallowedSubstitution(in unsigned short disallowed); readonly attribute unsigned short disallowedSubstitutions; readonly attribute boolean abstract; readonly attribute XSAnnotation annotation; };
abstract of type boolean, readonlyactualVC of type GenericObject, readonlynull if the value is in error or there is no value constraint.
|
NOT_SUPPORTED_ERR: Raised if the implementation does not support this method. |
actualVCType of type unsigned short, readonlySTRING_DT, SHORT_DT.
If the type definition of this value is a list type definition, this method returns LIST_DT.
If the type definition of this value is a list type definition whose item type is a union type definition, this method returns LISTOFUNION_DT.
To query the actual constraint value of the list or list of union type definitions use itemValueTypes.
If the actualNormalizedValue is null, this method returns UNAVAILABLE_DT.
|
NOT_SUPPORTED_ERR: Raised if the implementation does not support this method. |
annotation of type XSAnnotation, readonlynull.
constraintType of type unsigned short, readonlyVC_NONE, VC_DEFAULT, VC_FIXED.
constraintValue of type GenericString, readonlynull.
disallowedSubstitutions of type unsigned short, readonlyDERIVATION_SUBSTITUTION, DERIVATION_EXTENSION, DERIVATION_RESTRICTION} corresponding to substitutions disallowed by this XSElementDeclaration or DERIVATION_NONE.
enclosingCTDefinition of type XSComplexTypeDefinition, readonlyscope), otherwise null
if no such definition exists.
identityConstraints of type XSNamedMap, readonlyXSNamedMap.
itemValueTypes of type ShortList, readonlyactualValueType
is LIST_DT, the returned array consists of one type kind which represents
the
itemType.
If the actual constraint value represents a list type definition whose item type is a union type definition, i.e. LISTOFUNION_DT,
for each actual constraint value in the list
the array contains the corresponding
memberType kind.
For examples, see ItemPSVI.itemValueTypes.
|
NOT_SUPPORTED_ERR: Raised if the implementation does not support this method. |
nillable of type boolean, readonlynil from namespace
http://www.w3.org/2001/XMLSchema-instance and
value true (
xsi:nil)
even if it has no text or element content despite a
content type which would otherwise require content.
scope of type unsigned short, readonlySCOPE_GLOBAL, SCOPE_LOCAL,
or SCOPE_ABSENT.
If the scope is local, then the enclosingCTDefinition is present.
substitutionGroupAffiliation of type XSElementDeclaration, readonlynull.
substitutionGroupExclusions of type unsigned short, readonlyDERIVATION_EXTENSION, DERIVATION_RESTRICTION} or DERIVATION_NONE.
typeDefinition of type XSTypeDefinition, readonlyisDisallowedSubstitutiondisallowed is a disallowed substitution for this element declaration.
disallowed of type
unsigned shortDERIVATION_SUBSTITUTION, DERIVATION_EXTENSION, DERIVATION_RESTRICTION} or DERIVATION_NONE.
Represents a block set for the element.
|
True if |
isSubstitutionGroupExclusionexclusion is a substitution group exclusion for this element declaration.
exclusion of type
unsigned shortDERIVATION_EXTENSION, DERIVATION_RESTRICTION or DERIVATION_NONE.
Represents final set for the element.
|
True if |
This interface represents a complex or simple type definition.
interface XSTypeDefinition : XSObject { const unsigned short COMPLEX_TYPE = 15; const unsigned short SIMPLE_TYPE = 16; readonly attribute unsigned short typeCategory; readonly attribute XSTypeDefinition baseType; boolean isFinal(in unsigned short restriction); readonly attribute unsigned short final; readonly attribute boolean anonymous; boolean derivedFromType(in XSTypeDefinition ancestorType, in unsigned short derivationMethod); boolean derivedFrom(in GenericString namespace, in GenericString name, in unsigned short derivationMethod); };
anonymous of type boolean, readonlybaseType of type XSTypeDefinition, readonlyfinal of type unsigned short, readonlyDERIVATION_EXTENSION, DERIVATION_RESTRICTION} corresponding to final set of this type
or DERIVATION_NONE.
For simple types the returned value is a bit combination of the subset of {
DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST} corresponding to final set of this type or DERIVATION_NONE.
typeCategory of type unsigned short, readonlyderivedFromnamespace of type
GenericStringname of type
GenericStringderivationMethod of type
unsigned shortDERIVATION_RESTRICTION,
DERIVATION_EXTENSION,
DERIVATION_UNION,
DERIVATION_LIST}.
|
True if this type is derived from |
derivedFromTypeancestorType.
ancestorType of type
XSTypeDefinitionderivationMethod of type
unsigned shortDERIVATION_RESTRICTION,
DERIVATION_EXTENSION,
DERIVATION_UNION,
DERIVATION_LIST}.
|
True if this type is derived from |
isFinalrestriction of type
unsigned shortXSConstants).
|
True if |
This interface represents the Complex Type Definition schema component.
interface XSComplexTypeDefinition : XSTypeDefinition { // Content Model Types const unsigned short CONTENTTYPE_EMPTY = 0; const unsigned short CONTENTTYPE_SIMPLE = 1; const unsigned short CONTENTTYPE_ELEMENT = 2; const unsigned short CONTENTTYPE_MIXED = 3; readonly attribute unsigned short derivationMethod; readonly attribute boolean abstract; readonly attribute XSObjectList attributeUses; readonly attribute XSWildcard attributeWildcard; readonly attribute unsigned short contentType; readonly attribute XSSimpleTypeDefinition simpleType; readonly attribute XSParticle particle; boolean isProhibitedSubstitution(in unsigned short restriction); readonly attribute unsigned short prohibitedSubstitutions; readonly attribute XSObjectList annotations; };
A code representing the type of a content model.
CONTENTTYPE_ELEMENTCONTENTTYPE_EMPTYCONTENTTYPE_MIXEDCONTENTTYPE_SIMPLEabstract of type boolean, readonlyabstract is
true must not be used as the type definition for the validation of element information items.
annotations of type XSObjectList, readonlyXSObjectList.
attributeUses of type XSObjectList, readonlyXSObjectList.
attributeWildcard of type XSWildcard, readonlynull.
contentType of type unsigned short, readonlyCONTENTTYPE_EMPTY), a simple type definition
(CONTENTTYPE_SIMPLE), mixed (CONTENTTYPE_MIXED),
or element-only (CONTENTTYPE_ELEMENT).
derivationMethod of type unsigned short, readonlyDERIVATION_EXTENSION,
DERIVATION_RESTRICTION, or DERIVATION_NONE (see XSConstants).
particle of type XSParticle, readonlynull.
prohibitedSubstitutions of type unsigned short, readonlyDERIVATION_NONE represented as a bit flag (see XSConstants).
simpleType of type XSSimpleTypeDefinition, readonlynull.
isProhibitedSubstitutionrestriction of type
unsigned shortXSConstants).
|
True if |
This interface represents the
Simple Type Definition schema component.
This interface provides several query operations for facet components. Users can either
retrieve the defined facets as XML Schema components, using the facets
and the multiValueFacets attributes; or users can separately query a facet's
properties using methods such as getLexicalFacetValue,
isFixedFacet, etc.
interface XSSimpleTypeDefinition : XSTypeDefinition { // Variety definitions const unsigned short VARIETY_ABSENT = 0; const unsigned short VARIETY_ATOMIC = 1; const unsigned short VARIETY_LIST = 2; const unsigned short VARIETY_UNION = 3; // Facets const unsigned short FACET_NONE = 0; const unsigned short FACET_LENGTH = 1; const unsigned short FACET_MINLENGTH = 2; const unsigned short FACET_MAXLENGTH = 4; const unsigned short FACET_PATTERN = 8; const unsigned short FACET_WHITESPACE = 16; const unsigned short FACET_MAXINCLUSIVE = 32; const unsigned short FACET_MAXEXCLUSIVE = 64; const unsigned short FACET_MINEXCLUSIVE = 128; const unsigned short FACET_MININCLUSIVE = 256; const unsigned short FACET_TOTALDIGITS = 512; const unsigned short FACET_FRACTIONDIGITS = 1024; const unsigned short FACET_ENUMERATION = 2048; const unsigned short ORDERED_FALSE = 0; const unsigned short ORDERED_PARTIAL = 1; const unsigned short ORDERED_TOTAL = 2; readonly attribute unsigned short variety; readonly attribute XSSimpleTypeDefinition primitiveType; readonly attribute unsigned short builtInKind; readonly attribute XSSimpleTypeDefinition itemType; readonly attribute XSObjectList memberTypes; readonly attribute unsigned short definedFacets; boolean isDefinedFacet(in unsigned short facetName); readonly attribute unsigned short fixedFacets; boolean isFixedFacet(in unsigned short facetName); GenericString getLexicalFacetValue(in unsigned short facetName); readonly attribute StringList lexicalEnumeration; readonly attribute StringList lexicalPattern; readonly attribute unsigned short ordered; readonly attribute boolean finite; readonly attribute boolean bounded; readonly attribute boolean numeric; readonly attribute XSObjectList facets; readonly attribute XSObjectList multiValueFacets; readonly attribute XSObjectList annotations; };
Variety constants.
VARIETY_ABSENTVARIETY_ATOMICAtomic type.VARIETY_LISTList type.VARIETY_UNIONUnion type.The names of constraining facets 4.3 Constraining Facets and enumeration constants.
FACET_ENUMERATIONFACET_FRACTIONDIGITSFACET_LENGTHFACET_MAXEXCLUSIVEFACET_MAXINCLUSIVEFACET_MAXLENGTHFACET_MINEXCLUSIVEFACET_MININCLUSIVEFACET_MINLENGTHFACET_NONEFACET_PATTERNFACET_TOTALDIGITSFACET_WHITESPACEannotations of type XSObjectList, readonlyXSObjectList.
bounded of type boolean, readonlybuiltInKind of type unsigned short, readonlyINTEGER_DV is returned.definedFacets of type unsigned short, readonlyfacets of type XSObjectList, readonlyXSObjectList.
Note: This method must not be used to retrieve
values for enumeration and pattern facets.
finite of type boolean, readonlyfixedFacets of type unsigned short, readonlyitemType of type XSSimpleTypeDefinition, readonlylist the item type definition (an atomic or union simple type definition) is available, otherwise null.
lexicalEnumeration of type StringList, readonlyStringList.
lexicalPattern of type StringList, readonlyStringList.
memberTypes of type XSObjectList, readonlyunion the list of member type definitions (a non-empty sequence of simple type definitions) is available, otherwise an empty XSObjectList.
multiValueFacets of type XSObjectList, readonlyXSObjectList.
numeric of type boolean, readonlyordered of type unsigned short, readonlyprimitiveType of type XSSimpleTypeDefinition, readonlyatomic the primitive type definition (a built-in primitive datatype definition or the simple ur-type definition) is available, otherwise null.
variety of type unsigned short, readonlygetLexicalFacetValueenumeration and pattern facets.
facetName of type
unsigned shortFACET_LENGTH, FACET_TOTALDIGITS (see XSConstants). To retrieve the value for a pattern or an enumeration, see enumeration and pattern.|
A value of the facet specified in |
isDefinedFacetfacetName of type
unsigned short
|
True if the facet is defined, false otherwise. |
isFixedFacetfacetName of type
unsigned short
|
True if the facet is fixed, false otherwise. |
Describes a constraining facet. Enumeration and pattern facets are exposed
via XSMultiValueFacet interface.
interface XSFacet : XSObject { readonly attribute unsigned short facetKind; readonly attribute GenericString lexicalFacetValue; readonly attribute boolean fixed; readonly attribute XSAnnotation annotation; };
annotation of type XSAnnotation, readonlynull.
facetKind of type unsigned short, readonlyFACET_LENGTH, FACET_TOTALDIGITS
(see XSConstants).
fixed of type boolean, readonlylexicalFacetValue of type GenericString, readonlyDescribes a multi-value constraining facets: pattern and enumeration.
interface XSMultiValueFacet : XSObject { readonly attribute unsigned short facetKind; readonly attribute StringList lexicalFacetValues; readonly attribute XSObjectList annotations; };
annotations of type XSObjectList, readonlyXSObjectList.
facetKind of type unsigned short, readonlyFACET_ENUMERATION and FACET_PATTERN
(see XSConstants).
lexicalFacetValues of type StringList, readonlyThis interface represents the Particle schema component.
interface XSParticle : XSObject { readonly attribute unsigned long minOccurs; readonly attribute unsigned long maxOccurs; readonly attribute boolean maxOccursUnbounded; readonly attribute XSTerm term; };
maxOccurs of type unsigned long, readonlymaxOccursUnbounded.
When the value of maxOccursUnbounded is true, the value
of maxOccurs is unspecified.
maxOccursUnbounded of type boolean, readonlyminOccurs of type unsigned long, readonlyterm of type XSTerm, readonlyDescribes a term that can be one of a model group, a wildcard, or an element declaration.
Objects implementing XSElementDeclaration, XSModelGroup and
XSWildcard interfaces also implement this interface.
This interface represents the Model Group schema component.
interface XSModelGroup : XSTerm { // Content model compositors const unsigned short COMPOSITOR_SEQUENCE = 1; const unsigned short COMPOSITOR_CHOICE = 2; const unsigned short COMPOSITOR_ALL = 3; readonly attribute unsigned short compositor; readonly attribute XSObjectList particles; readonly attribute XSAnnotation annotation; };
List of content model compositors.
COMPOSITOR_ALLCOMPOSITOR_CHOICECOMPOSITOR_SEQUENCEannotation of type XSAnnotation, readonlynull.
compositor of type unsigned short, readonlyCOMPOSITOR_SEQUENCE, COMPOSITOR_CHOICE, COMPOSITOR_ALL.
particles of type XSObjectList, readonlyXSObjectList.
This interface represents the Model Group Definition schema component.
interface XSModelGroupDefinition : XSObject { readonly attribute XSModelGroup modelGroup; readonly attribute XSAnnotation annotation; };
annotation of type XSAnnotation, readonlynull.
modelGroup of type XSModelGroup, readonlyThis interface represents the Attribute Group Definition schema component.
interface XSAttributeGroupDefinition : XSObject { readonly attribute XSObjectList attributeUses; readonly attribute XSWildcard attributeWildcard; readonly attribute XSAnnotation annotation; };
annotation of type XSAnnotation, readonlynull.
attributeUses of type XSObjectList, readonlyXSObjectList.
attributeWildcard of type XSWildcard, readonlynull.
This interface represents the Attribute Use schema component.
interface XSAttributeUse : XSObject { readonly attribute boolean required; readonly attribute XSAttributeDeclaration attrDeclaration; readonly attribute unsigned short constraintType; readonly attribute GenericString constraintValue; readonly attribute GenericObject actualVC; // raises(XSException) on retrieval readonly attribute unsigned short actualVCType; // raises(XSException) on retrieval readonly attribute ShortList itemValueTypes; // raises(XSException) on retrieval };
actualVC of type GenericObject, readonlynull if the value is in error or there is no value constraint.
|
NOT_SUPPORTED_ERR: Raised if the implementation does not support this method. |
actualVCType of type unsigned short, readonlySTRING_DT, SHORT_DT.
If the type definition of this value is a list type definition, this method returns LIST_DT.
If the type definition of this value is a list type definition whose item type is a union type definition, this method returns LISTOFUNION_DT.
To query the actual constraint value of the list or list of union type definitions use itemValueTypes.
If the actualNormalizedValue is null, this method returns UNAVAILABLE_DT.
|
NOT_SUPPORTED_ERR: Raised if the implementation does not support this method. |
attrDeclaration of type XSAttributeDeclaration, readonlyconstraintType of type unsigned short, readonlyconstraintValue of type GenericString, readonlynull.
itemValueTypes of type ShortList, readonlyactualValueType
is LIST_DT, the returned array consists of one type kind which represents
the
itemType.
If the actual constraint value represents a list type definition whose item type is a union type definition, i.e. LISTOFUNION_DT,
for each actual constraint value in the list
the array contains the corresponding
memberType kind.
For examples, see ItemPSVI.itemValueTypes.
|
NOT_SUPPORTED_ERR: Raised if the implementation does not support this method. |
required of type boolean, readonlyThis interface represents the Wildcard schema component.
interface XSWildcard : XSTerm { // Namespace Constraint const unsigned short NSCONSTRAINT_ANY = 1; const unsigned short NSCONSTRAINT_NOT = 2; const unsigned short NSCONSTRAINT_LIST = 3; // Process contents const unsigned short PC_STRICT = 1; const unsigned short PC_SKIP = 2; const unsigned short PC_LAX = 3; readonly attribute unsigned short constraintType; readonly attribute StringList nsConstraintList; readonly attribute unsigned short processContents; readonly attribute XSAnnotation annotation; };
The constants that describe a type of namespace constraint.
NSCONSTRAINT_ANYNSCONSTRAINT_LISTNSCONSTRAINT_NOTPC_LAXPC_SKIPPC_STRICTannotation of type XSAnnotation, readonlynull.
constraintType of type unsigned short, readonlynsConstraintList of type StringList, readonlyconstraintType NSCONSTRAINT_LIST, the list contains
allowed namespaces. For constraintType NSCONSTRAINT_NOT,
the list contains disallowed namespaces. For constraintType
NSCONSTRAINT_ANY, the StringList is empty.
processContents of type unsigned short, readonlyPC_LAX, PC_SKIP and PC_STRICT.
This interface represents the Identity-constraint Definition schema component.
interface XSIDCDefinition : XSObject { // Identity Constraints const unsigned short IC_KEY = 1; const unsigned short IC_KEYREF = 2; const unsigned short IC_UNIQUE = 3; readonly attribute unsigned short category; readonly attribute GenericString selectorStr; readonly attribute StringList fieldStrs; readonly attribute XSIDCDefinition refKey; readonly attribute XSObjectList annotations; };
Identity-constraint category: one of key, keyref or unique.
IC_KEYkey in the
identity-constraint category.IC_KEYREFkeyref in the
identity-constraint category.IC_UNIQUEunique in the
identity-constraint category.annotations of type XSObjectList, readonlyXSObjectList.
category of type unsigned short, readonlyfieldStrs of type StringList, readonlyrefKey of type XSIDCDefinition, readonlynull otherwise.
An identity-constraint definition with [
identity-constraint category]
equal to key or unique.
selectorStr of type GenericString, readonlyThis interface represents the Notation Declaration schema component.
interface XSNotationDeclaration : XSObject { readonly attribute GenericString systemId; readonly attribute GenericString publicId; readonly attribute XSAnnotation annotation; };
annotation of type XSAnnotation, readonlynull.
publicId of type GenericString, readonlynull otherwise.
systemId of type GenericString, readonlynull otherwise.
This interface represents the Annotation schema component.
interface XSAnnotation : XSObject { // TargetType const unsigned short W3C_DOM_ELEMENT = 1; const unsigned short SAX_CONTENTHANDLER = 2; const unsigned short W3C_DOM_DOCUMENT = 3; boolean writeAnnotation(in GenericObject target, in unsigned short targetType); readonly attribute GenericString annotationString; };
An integer indicating the type of the target object.
Note: The codes between 1-10 are reserved by this specification. Other numeric codes could be added by implementations.
SAX_CONTENTHANDLERorg.xml.sax.ContentHandler.W3C_DOM_DOCUMENTorg.w3c.dom.Document.W3C_DOM_ELEMENTorg.w3c.dom.Element.annotationString of type GenericString, readonlywriteAnnotationtarget is a DOM object, in-scope namespace
declarations for annotation element are added as attribute nodes
of the serialized annotation, otherwise the corresponding events for all
in-scope namespace declarations are sent via the specified document handler.
target of type
GenericObjectorg.w3c.dom.Document, org.w3c.dom.Element, org.xml.sax.ContentHandler.
targetType of type
unsigned short
|
True if the |
A proposed set of interfaces for accessing the PSVI components. The API does not define the following optional PSVI contributions:
This section defines the post schema validation information items.
In an implementation that exposes element and attribute information items via some memory structures, objects that represent element information items should also implement ElementPSVI and objects that represent attribute information items should also implement AttributePSVI.
For example, to expose the PSVI via the W3C [DOM], the objects that implement dom.Element should also implement ElementPSVI. The objects that implement dom.Attr should also implement AttributePSVI.
To request a DOM implementation that supports the PSVI, users should use org.w3c.dom DOMImplementationRegistry.getImplementation method with the value
"psvi" for the features parameter and "1.0" for the version parameter. The DOMConfiguration should also recognize the "psvi" parameter (setting the value of this parameter to
true will augment the DOM tree with the PSVI information). By default, the value of the "psvi" parameter is false.
Represents an abstract PSVI item for an element or an attribute information item.
interface ItemPSVI { const unsigned short VALIDITY_NOTKNOWN = 0; const unsigned short VALIDITY_INVALID = 1; const unsigned short VALIDITY_VALID = 2; const unsigned short VALIDATION_NONE = 0; const unsigned short VALIDATION_PARTIAL = 1; const unsigned short VALIDATION_FULL = 2; readonly attribute GenericString validationContext; readonly attribute unsigned short validity; readonly attribute unsigned short validationAttempted; readonly attribute StringList errorCodes; readonly attribute GenericString schemaNormalizedValue; readonly attribute GenericObject actualNormalizedValue; // raises(XSException) on retrieval readonly attribute unsigned short actualNormalizedValueType; // raises(XSException) on retrieval readonly attribute ShortList itemValueTypes; // raises(XSException) on retrieval readonly attribute XSTypeDefinition typeDefinition; readonly attribute XSSimpleTypeDefinition memberTypeDefinition; readonly attribute GenericString schemaDefault; readonly attribute boolean isSchemaSpecified; };
actualNormalizedValue of type GenericObject, readonly[schema normalized value]: Binding specific actual value or null if the value is in error.
|
NOT_SUPPORTED_ERR: Raised if the implementation does not support this method. |
actualNormalizedValueType of type unsigned short, readonlySTRING_DT, SHORT_DT.
If the type definition of this value is a list type definition, this method returns LIST_DT.
If the type definition of this value is a list type definition whose item type is a union type definition, this method returns LISTOFUNION_DT.
To query the actual value of the list or list of union type definitions use itemValueTypes.
If the actualNormalizedValue is null, this method returns UNAVAILABLE_DT.
|
NOT_SUPPORTED_ERR: Raised if the implementation does not support this method. |
errorCodes of type StringList, readonly[schema error code]: a list of error codes generated from the validation attempt
or an empty StringList if no errors occurred during the validation attempt.
itemValueTypes of type ShortList, readonlyactualNormalizedValueType
is LIST_DT, the returned array consists of one type kind which represents
the
itemType. For example:
<simpleType name="listtype"> <list itemType="positiveInteger"/> </simpleType> <element name="list" type="listtype"/> ... <list>1 2 3</list>
schemaNormalizedValue value is "1 2 3", the
actualNormalizedValueType value is LIST_DT,
and the itemValueTypes is an array of size 1 with the value
POSITIVEINTEGER_DT.
LISTOFUNION_DT,
for each actual value in the list
the array contains the corresponding
memberType kind.
For example:
<simpleType name='union_type' memberTypes="integer string"/>
<simpleType name='listOfUnion'>
<list itemType='union_type'/>
</simpleType>
<element name="list" type="listOfUnion"/>
...
<list>1 2 foo</list>
schemaNormalizedValue value is "1 2 foo",
the actualNormalizedValueType is
LISTOFUNION_DT, and the itemValueTypes is an array of size 3 with the following
values: INTEGER_DT, INTEGER_DT, STRING_DT.
|
NOT_SUPPORTED_ERR: Raised if the implementation does not support this method. |
memberTypeDefinition of type XSSimpleTypeDefinition, readonly[member type definition]:
if and only if that type definition is a simple type definition
with {variety} union, or a complex type definition whose {content type}
is a simple type definition with {variety} union, then an item isomorphic
to that member of the union's {member type definitions} which actually
validated the schema item's normalized value.
schemaDefault of type GenericString, readonly[schema default]: the canonical lexical representation of the declaration's {value constraint} value. For more information refer to
element schema default and
attribute schema default.
schemaNormalizedValue of type GenericString, readonly[schema normalized value]: the normalized value of this item after validation.
isSchemaSpecified of type boolean, readonly[schema specified]: if true, the value was specified in the schema. If false,
the value comes from the infoset. For more information refer to
element specified
and
attribute specified.
typeDefinition of type XSTypeDefinition, readonly[type definition]: an item isomorphic to the type definition used to validate the schema item.
validationAttempted of type unsigned short, readonly[validation attempted]: determines the extent to which the schema item has been validated.
The value will be one of the constants: VALIDATION_NONE, VALIDATION_PARTIAL
or VALIDATION_FULL.
validationContext of type GenericString, readonly[schema information] property
(or this element item itself if it has such a property). For more information refer to
element validation context and
attribute validation context .
validity of type unsigned short, readonly[validity]: determines the validity of the schema item with respect to the validation
being attempted. The value will be one of the constants: VALIDITY_NOTKNOWN, VALIDITY_INVALID
or VALIDITY_VALID.
Represents a PSVI item for one element information item.
interface ElementPSVI : ItemPSVI { readonly attribute XSElementDeclaration elementDeclaration; readonly attribute XSNotationDeclaration notation; readonly attribute boolean nil; readonly attribute XSModel schemaInformation; };
elementDeclaration of type XSElementDeclaration, readonlynil of type boolean, readonlynotation of type XSNotationDeclaration, readonlyschemaInformation of type XSModel, readonlynull otherwise.
Represents a PSVI item for one attribute information item.
interface AttributePSVI : ItemPSVI { readonly attribute XSAttributeDeclaration attributeDeclaration; };
attributeDeclaration of type XSAttributeDeclaration, readonlyThis section defines a PSVI provider for streaming models.
This interface provides access to the post schema validation infoset for an API that provides a streaming document infoset, such as [SAX], XNI, and others.
For implementations that would like to provide access to the
PSVI in a streaming model, a parser object should also implement
the PSVIProvider interface.
Within the scope of the methods handling the start and end of an element,
applications may use the PSVIProvider to retrieve the PSVI
related to the element and its attributes.
interface PSVIProvider { ElementPSVI getElementPSVI(); AttributePSVI getAttributePSVI(in unsigned long index); AttributePSVI getAttributePSVIByName(in GenericString uri, in GenericString localname); };
getAttributePSVIAttributePSVI given the index of an
attribute
information item in the current element's attribute list.
The method must be called by an application while in the scope of the methods
which report the start and end of an element at a point where the attribute
list is available. For example, for SAX the method must be called while in
the scope of the document handler's startElement call. If the method is
called outside of the specified scope, the return value is undefined.index of type
unsigned long|
The post schema validation properties of the attribute. |
getAttributePSVIByNameAttributePSVI given the namespace name and the local
name of an
attribute
information item in the current element's attribute list.
The method must be called by an application while in the scope of the methods
which report the start and end of an element at a point where the attribute
list is available. For example, for SAX the method must be called while in
the scope of the document handler's startElement call. If the method is
called outside of the specified scope, the return value is undefined.uri of type
GenericStringlocalname of type
GenericString|
The post schema validation properties of the attribute. |
getElementPSVIstartElement or endElement
call. If the method is called outside of the specified scope, the return
value is undefined.
|
The post schema validation infoset for the current element.
|
This section defines a set of optional interfaces to allow users to load XML Schema documents.
This section defines the XSImplementation interface that provides a method to create an XSLoader
using the DOM Level 3 Bootstrapping mechanism. An application can find implementations of the XSLoader
using getDOMImplementation method on the DOMImplementationRegistry
object with the feature string "XS-Loader"
and version "1.0".
This interface allows one to retrieve an instance of XSLoader. This interface should be
implemented on the same object that implements DOMImplementation.
interface XSImplementation { readonly attribute StringList recognizedVersions; XSLoader createXSLoader(in StringList versions) raises(XSException); };
recognizedVersions of type StringListXSImplementation.createXSLoaderversions of type
StringListXSLoader or null to permit XML Schema documents of any recognized
version to be loaded by the XSLoader.
|
An XML Schema loader. |
|
NOT_SUPPORTED_ERR: Raised if the implementation does not support one of the specified versions. |
This section defines the XSLoader interface that defines methods to load
XML Schema documents.
An interface that provides a method to load XML Schema documents. This interface uses the DOM Level 3 Core and Load and Save interfaces.
interface XSLoader { readonly attribute DOMConfiguration config; XSModel loadURIList(in StringList uriList); XSModel loadInputList(in LSInputList is); XSModel loadURI(in GenericString uri); XSModel load(in LSInput is); };
config of type DOMConfiguration, readonlyDOMConfiguration interface:
error-handler (DOMErrorHandler) and
resource-resolver (LSResourceResolver).
"validate"truefalseloadLSInput
.
is of type
LSInputLSInputSource
from which the source document is to be read.
|
An XSModel representing this schema. |
loadInputListLSInputs.
is of type
LSInputListLSInputs
from which the XML Schema documents are to be read.
|
An XSModel representing the schema documents. |
loadURIuri of type
GenericString|
An XSModel representing this schema. |
loadURIListuriList of type
StringList|
An XSModel representing the schema documents. |