This document is also available in these non-normative formats: XML.
Copyright © 2010 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.
XML Schema: Component Designators defines a scheme for identifying XML Schema components as specified by XML Schema Part 1: Structures and XML Schema Part 2: Datatypes.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.
This W3C Candidate Recommendation specified W3C XML Schema Definition Language (XSD) Component Designators. It is here made available for review by W3C members and the public. It has been produced by the W3C XML Schema Working Group (WG) as part of the XML Activity. It incorporates all Working Group decisions through 2008-10-31. It has been reviewed by the Working Group and the Working Group has agreed to publication as a Last Call Working Draft.
The Candidate Recommendation review period for this document extends until 1 March 2010. Comments on this document should be made in W3C's public installation of Bugzilla, specifying "XML Schema" as the product. Instructions can be found at http://www.w3.org/XML/2006/01/public-bugzilla. If access to Bugzilla is not feasible, please send your comments to the W3C XML Schema comments mailing list, www-xml-schema-comments@w3.org (archive). Each Bugzilla entry and email message should contain only one comment.
Any feature mentioned as a "feature at risk" may be retained as is or dropped, depending on the feedback received from readers, schema authors, schema users, and implementors. The only feature at risk is support for axes and components that are dependent on the XML Schema 1.1 component model rather than the XML Schema 1.0 component model.
Publication as a Candidate Recommendation does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
The W3C XML Schema Working Group intends to request advancement of this specification and publication as a Proposed Recommendation (possibly with editorial changes, and possibly removing features identified as being at risk) as soon after 1 March 2010 as the exit criteria for the current phase have been met.
This specification does not define any criteria for conformance and relies on other specifications to specify criteria for conformance of implementations. Nevertheless a test suite is under development that identifies the set of canonical schema component paths that should be generated for particular test schemas, and that relates certain non-canonical component paths to the corresponding canonical schema component paths.
The W3C XML Schema Working Group has agreed on the following specific CR exit criteria:
A test suite is available which provides cases for each axis and component type, both for the XML Schema 1.0 component model and the XML Schema 1.1 component model.
Generation or interpretation of canonical schema component paths have been implemented successfully by at least two independent implementations.
Generation or interpretation of each axis and component for non-canonical schema component paths has been implemented successfully by at least two independent implementations.
The Working Group has responded formally to all issues raised against this document during the Candidate Recommendation period.
At the time this Candidate Recommendation was published, no interoperability or implementation report had yet been prepared.
This document has been produced by the W3C XML Schema Working Group as part of the W3C XML Activity. The authors of this document are the members of the XML Schema Working Group.
The following changes were made since the last public Working Draft:
As resolution for issue 6450: make EBNF for Predicate more precise.
As resolution for issue 6451: clarify that predicate counting starts at 1.
As resolution for issue 6452: Make the rules such that unprefixed axis names are in no null namespace and are reserved, that the component kinds are part of a the namespace "http://www.w3.org/2009/xmlschema-ref", and redefine component-kind() to be returning expanded names.
This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.
1 Introduction (Non-Normative)
2 Goals and Use Cases (Non-Normative)
2.1 Requirements
2.2 Use Cases
3 Schema Component Designators
3.1 Schema Component Designator Syntax
3.2 Canonical Schema Component Designators
3.3 Equality of Schema Component Designators
4 Schema Component Paths
4.1 Schema Component Graph Traversal
4.2 Schema Component Path Syntax
4.3 Interpretation of Schema Component Paths
4.4 Schema Component Path Axes
4.5 Accessors
4.6 Canonical Schema Component Paths
4.7 Equality of Schema Component Paths
5 Conformance
5.1 Schema Component Path Conformance
5.2 Schema Component Designator Conformance
5.3 Extensibility
6 Examples (Non-Normative)
6.1 Extended Primer Example
6.2 Additional Examples
6.3 Examples with component and elided-component Axes (Non-Normative)
A Schema Component Properties (Non-Normative)
B Summary of Component Axes (Non-Normative)
C Glossary (Non-Normative)
D References
D.1 Normative References
D.2 Non-normative Informational References
This document defines a system for designating XML Schema components. Part 1 of the W3C XML Schema Definition Language (XSD) recommendation [XSD1] defines these schema components. Section 2.2 lays out the inventory of schema components into three classes:
Primary components: simple and complex type definitions, attribute declarations, and element declarations
Secondary components: attribute and model group definitions, identity-constraint definitions, and notation declarations
"Helper" components: annotations, model groups, particles, wildcards, and attribute uses
In addition there is a master schema component, the schema component representing the schema as a whole. This component will be referred to as the schema description component in this specification.
Finally, there are schema components for the facets defined in Part 2 of the W3C XML Schema Definition Language (XSD) recommendation [XSD2]:
Fundamental Facets: ordered, bounded, cardinality, numeric
Constraining Facets: whiteSpace, minInclusive, maxInclusive, minExclusive, maxExclusive, totalDigits, fractionDigits, length, minLength, maxLength, pattern, enumeration
Version 1.1 of the W3C XML Schema Definition Language (XSD) recommendation [XSD11_1][XSD11_2] adds additional components and makes modifications to existing components, as well as introducing the notion of "property records" to capture more complex structured values.
At first blush, a QName (prefix:localname) may seem sufficient to the task of designating any schema component. This is not the case for various reasons:
A QName is only meaningful in the context of particular namespace bindings so that the QName can be resolved to a particular expanded name, i.e. a {namespace name, local name} pair.
The same expanded name can be used in a particular schema to refer to an element declaration, an attribute declaration, a complex type or simple type definition, a model group definition, an attribute group definition, an identity constraint definition, and a notation declaration.
Locally scoped element and attribute declarations cannot necessarily be uniquely named by an expanded name.
Anonymous type definitions have no expanded name, or they have an expanded name that may vary with the particular schema processor interpreting the schema.
Certain schema components (annotation, particle, wildcard) are invariably subordinate to some other schema component, and have no name of their own.
Certain schema components (attribute use and model group) are subordinate to some other schema component, and any name they might be construed to have is a reference to some other schema component (attribute declaration and model group definition, respectively).
The schema description schema component has no name at all.
A key technical challenge to obtaining a useful system of naming XML Schema components is to address these issues or decide that certain cases need not be addressed. In particular:
Designators must either include full expanded name, or define namespace bindings.
Designators must distinguish named components in different symbol spaces from one another.
Designators must provide a means of distinguishing locally scoped element and attribute declarations with the same name.
Designators must provide for any designatable unnamed components, such as anonymous type definitions, wildcards, and the schema description component.
Designators must function in the face of redefinitions.
The schema description schema component may represent the amalgamation of several distinct schema documents, or none at all. It may be associated with any number of target namespaces, including none at all. It may have been obtained for a particular schema assessment episode by de-referencing URIs given in schemaLocation attributes, or by an association with the target namespace or by some other application-specific means. In short, there are substantial technical challenges to defining a reliable designator for the schema description, particularly if that designator is expected to serve as a starting point for the other components encompassed by that schema.
This specification divides the problem of constructing schema component designators into two parts: defining a designator for an assembled schema, and defining a designator for a particular schema component or schema components, understood relative to a designated schema. The first task is discussed in 3 Schema Component Designators, although this specification does not define a specific rule for how to construct a single URI for an assembled schema. The second task is addressed in detail in 4 Schema Component Paths.
Each component should have at least one unambiguous designator that designates that component and no other. However, certain abbreviation and wildcarding constructs may designate collections of components.
It should be possible to designate any schema component within a schema. However, some exceptions will be made for certain of the helper components.
Designators should provide (or assure) a URI for the unique identification of a schema.
If there is more than one designator for a construct, there should be exactly one canonical form of the designator.
Designators should be usable for either the XML Schema 1.0 or the XML Schema 1.1 component model
Designators should be human-readable.
Given a designator, it should be possible to get the expanded name for the designated component, if one exists for that component.
It should be possible to generate the canonical designator for each component algorithmically and consistently, either against an assembled schema or as the schema is assembled.
Designators should be parsable with compositional semantics (or, in other words, they should have expressive notation).
There should be a formal specification of what constitutes a legal designator.
Designators should be URI references.
Designators should work well in a RDDL environment.
It is not a requirement to designate particle components as distinct from terms.
It is not a requirement that it be possible to construct designators to refer to arbitrary schema components without any knowledge of schema internals.
It is not a requirement to be able to tell, from a schema component designator for an element declaration, whether instances of that element declaration must appear in document instances with qualified or unqualified names.
It is not a requirement that it be possible to uniquely assign schema component designators (element, attribute, and type designators) to information items in a document instance given only a set of schema component designators.
In general Schema Component Designators can be used to provide references to arbitrary types, whether they are named global types or local or anonymous types. These use cases all benefit from being able to refer to any type declaration.
Describing the type of an expression, where the type might be an anonymous or local type and a QName is therefore inadequate. There are a number of examples where this could be valuable in type-aware languages that operate on schema-validated XML:
Naming the type of something that has been selected.
For use wherever types are named, for example to specify a type in a query expression.
Enabling interfaces like those described in [DOM3] to expose anonymous types.
Identifying types for casting, specifically wrt anonymous and local types.
Identifying types for function signatures.
These use cases benefit from being able to refer to any element declaration.
Referring to a local element declaration, with or without knowledge of the names of the scoping types and elements.
Schema component designators can be used to refer to specific parts of a schema to provide an out-of-band annotation capability, for commentary, error reporting, or the association of layered semantics with schema components.
Writing error messages. There are two classes of error messages in view: errors in an instance and errors in the schema. For example, if an instance has a quantity which violates the constraints of a particular type, such as a range constraint, it is valuable for the error message to be able to name and refer to the specific type whose constraints were violated, even if that is the anonymous type of a local element declaration. An example of a schema error would be that one type is not a valid restriction of another type. This use case benefits from being able to name and refer to type, element, and attribute declarations, as well as element and attribute uses, groups, and possibly facets and particles. It is unclear whether being able to refer separately to particles versus groups is important. Being able to refer separately to attribute and element uses versus attribute and element declarations may be important.
Schema documentation. The transfer syntax for W3C XML Schema allows for documentation to be attached to components in-line. In many cases it may be preferable to keep the documentation separate from the active definitions, to save bandwidth, to provide for alternative documentation for different communities, and so on. Being able to refer to any schema component that can support an annotation (all but annotation itself) supports this use case.
Commentary on schemas, such as best practices documents, reviews and comparisons of particular schemas, and so on.
Associating an additional layer of semantics with schema components, for example, providing information to programming language or application environments to identify code to execute. For example, certain XML data binding frameworks today reference complex types and elements using their own path syntax for the purpose.
Having a simple textual way to refer to the abstract components of a schema enables certain kinds of text-based schema-related processing.
A tool that creates interlinked HTML pages describing a schema.
String-based tests of type equivalence. Such tests can be used for comparing serialized PSVIs to provide for interoperable tests of type equivalence and processor comparisons.
String-based comparisons of processors generally, making it possible, for example, to ask and answer the question "Did two validations of the same document on different machines use the same type for a given element?"
input/output
user reports
glue/interfaces
Simple selection queries, such as "the type that is the base type of X" without knowledge of its name.
Creation or initial drafting of a new schema or schema document by selecting components from existing schema.
Using XSD simple types as the datatype of RDF literals.
Describing XSD Components within RDF, including the use of XSD simple types as RDF classes.
Formal description requires unique identifier for each declaration and definition component used within the context of the validation episode.
Enumerating dependencies among schema components. For example, where one complex type restricts another, the local elements in one depend on the local elements of the other.
Schema component designators rely on a layered model of schema component reference. Schema component paths designate components in the context of a particular schema assembly and depend on a namespace binding context. Full blown schema designators consist of two parts: a URI without a fragment identifier part, which identifies the schema, and a fragment identifier which encapsulates a schema component path to designate a set of components in the context of that schema. Schema component paths may be used in contexts other than schema component designators, given appropriate specification of the namespace binding context and the target schema.
This section describes schema component designators as a whole. The details of schema component paths are described in 4 Schema Component Paths.
[Definition: A schema designator is a single URI for a resource representing an assembled schema.]
Many possible conventions for obtaining a single URI to refer to a schema are possible. In the simplest case, where there is one root schema document, the URI of that document suffices. In other cases a schema may have been assembled from multiple schema documents, or from components obtained via other representations, and some representation of that collection or of the assembled results will be required.
We expect that it will be highly desirable for the community to evolve one convention for referring to an assembled schema to ensure consistency of global schema component designators. This specification declines to specify what that one way should be.
Note:
Like any resource, the schema denoted by a URI may be represented in a variety of forms, with different media types. When a URI is dereferenced, the form and resolution of any fragment identifier depend (as specified by [RFC 3986]) on the media type of the representation obtained. The representation of a resource obtained by dereferencing a schema URI must therefore allow for the fragment identifier syntax defined here in order for schema component designators to successfully resolve to components. Whatever representation of a schema is used, the media type should allow for the fragment identifier syntax defined here. This will be true for any XML representation of the schema, since the XPointer framework [XPTR] is defined for all XML media types. Other media types must explicitly specify a compatible fragment identifier syntax.
The schema component reference core defines reference to a schema component in the context of an assembled XML Schema. 4 Schema Component Paths defines this relationship between an assemblage of schema components and component paths. Schema assembly is described in Section 4 of XML Schema Part 1: Structures.
For the purposes of component paths, a missing component (see Section 5.3 of XML Schema Part 1: Structures) cannot be used to construct a valid path; nor can a schema component be successfully referenced through a path that references a missing component.
[Definition: An absolute schema component designator identifies a particular schema component; it consists of two parts: a designator for the assembled schema (a schema designator), and a designator for a particular schema component or schema components relative (a relative schema component designator) to that assembled schema.]
Syntactically, the first part is a URI without a fragment identifier, and the second part is an XPointer fragment identifier. An absolute schema component designator therefore is a URI reference. For example: http://example.org/schemas/po.xsd#xscd(/type::purchaseOrderType)
Note that a schema component designator may contain Unicode characters that are not allowed in URIs. Any such characters must be encoded and escaped to obtain a URI suitable for retrieval, if retrieval is required.
[Definition: A
relative schema component designator
identifies a particular schema component relative to
some current assembled schema; it
is expressed as an XPointer scheme
xscd()
that uses a schema component path
as the scheme data.] This
XPointer scheme may be used in combination with the
XPointer
xmlns()
scheme
[XPTR XMLNS].
It is not
designed to be used in
combination with other XPointer schemes.
The construction and syntax of schema component paths are described in
4 Schema Component Paths.
[1] | SchemaComponentDesignator | ::= | AbsoluteSchemaComponentDesignator |
RelativeSchemaComponentDesignator | |
[2] | AbsoluteSchemaComponentDesignator | ::= | SchemaDesignator '#'
RelativeSchemaComponentDesignator | |
[3] | SchemaDesignator | ::= | AnyURI | |
[4] | AnyURI | ::= | Char* | /* IRI reference: no fragment identifier */ |
[5] | RelativeSchemaComponentDesignator | ::= | XmlnsPointerPart*
XscdPointerPart
| |
[6] | XmlnsPointerPart | ::= |
'xmlns' '(' XmlnsSchemeData ')'
| |
[7] | XscdPointerPart | ::= | 'xscd' '(' SchemaComponentPath ')'
|
[Definition:
A canonical schema component designator
is an absolute schema component designator that is a URI
that has been mapped from a LEIRI to an IRI in accordance
with the rules given in [LEIRI], mapped from an IRI to a URI in
accordance with
the rules given in RFC 3987[RFC 3987], and
normalized according to the rules of
syntax-based normalization given there;
and where the relative schema component designator consists of an
xmlns
XPointer pointer part (if required) followed
by a canonicalized xscd
XPointer pointer part.
]
[Definition:
A canonicalized xscd
XPointer pointer part is
an xscd
XPointer pointer part whose
pointer data is a canonical schema
component path.
]
Many use cases for schema component designators call for them to be compared for equality. A simple string comparison may fail to correctly recognize equivalent designators with this scheme because namespace prefixes may vary. However, comparison is still straightforward.
[Definition: Two schema component designators are equal if they are absolute and their URIs are equal or if they are relative to the same schema, and their schema component paths are equal.]
An assembled schema forms a rooted graph of schema components and property records, where certain schema component and property record properties contain other schema components and property records as their values (or part of their values). The graph arcs are directed and labelled. The graph may have cycles in it. Schema component paths can be regarded as being constructed step-by-step by traversing the schema component properties, starting at the schema description schema component. Within this graph there may be more than one path to a particular schema component. This section describes how paths are interpreted, and then defines which paths are the canonical ones.
For the purposes of schema component paths, presume the existence of an {identity constraint definitions} property of the schema description component whose value is the union of all identity constraint components in the assembled schema. The XML Schema 1.1 specification defines this property.
An assembled schema consists of a graph of schema components. Schema property records and helper components are included in the graph, but a schema component path never refers to them. Traversal in the graph passes through property records. A schema component property that has other schema components as its value or as part of its value creates links in the graph which may be traversed through one of the defined axes to construct a schema component path.
[Definition: A traversal from one component to another takes place across some particular component property. This property is the arc of traversal. ]
[Definition: A default arc is a privileged arc of traversal. ] The default arcs are:
{type definition}
{content type}
{particle}
{simple type definition}
{attribute declaration}
{attribute uses}
{model group}
{particles}
{term}
{element declarations}
{facets}
A Schema Component Properties (Non-Normative) includes a summary of which arcs act as defaults and when.
The schema component axes defined in this document are considered to be names in no namespace. They are always unprefixed and their names are considered reserved. That is: no extension axis is permitted to have the same expanded name as any of the component axes specifically enumerated in Axis production.
The schema component kinds defined in this document are contained in the
namespace with the URI http://www.w3.org/2009/xmlschema-ref
,
which for the purposes of this specification is taken to be bound to the
prefix xscd
.
[8] | SchemaComponentPath | ::= | ( SchemaStep |
StepSepator
RelativeSchemaComponentPath ) ('/' ExtensionAccessor)?
|
[9] | SchemaStep | ::= | '/' |
[10] | RelativeSchemaComponentPath | ::= | Step |
Step
StepSeparator
RelativeSchemaComponentPath
|
[11] | StepSeparator | ::= | '/' |
ComponentAxisSeparator
|
[12] | ComponentAxisSeparator | ::= | '//' |
[13] | Step | ::= | Axis
NameTest
Predicate? |
AbbrevStep
|
[14] | AbbrevStep | ::= | AbbrevAttributeStep |
AbbrevElementStep |
AbbrevTypeStep |
AbbrevCurrentComponentStep |
|
[15] | AbbrevAttributeStep | ::= | '@' NameTest
Predicate?
|
[16] | AbbrevElementStep | ::= | NameTest
Predicate?
|
[17] | AbbrevTypeStep | ::= | '~' NameTest
Predicate?
|
[18] | AbbrevCurrentComponentStep | ::= | '.' Predicate? |
[19] | Axis | ::= |
'schemaAttribute' '::' | 'schemaElement' '::' |
'type' '::' |
'attributeGroup' '::' | 'group' '::' |
'identityConstraint' '::' |
'assertion' '::' | 'alternative' '::' |
'notation' '::' |
'model' '::' |
'anyAttribute' '::' | 'any' '::' |
'facet' '::' |
'scope' '::' | 'context' '::' |
'substitutionGroup' '::' |
'baseType' '::' | 'itemType' '::' | 'memberType' '::' | 'primitiveType' '::' |
'key' '::' |
'annotation' '::' |
'component' '::' | 'currentComponent' '::' |
'attributeUse' '::' | 'particle' '::' |
ExtensionAxis
|
[20] | NameTest | ::= | QName |
WildcardNameTest | '0'
|
[21] | WildcardNameTest | ::= | '*' |
[22] | ExtensionAccessor | ::= | QName '(' ')' |
[23] | ExtensionAxis | ::= | QName '::' |
[24] | Predicate | ::= | '[' [0]*[1-9][0-9]* ']' |
Note:
The EBNF above defines a syntax for invoking an accessor after the last step of the path and for using extension axes. This syntax is included for extensibility. A specification that wishes to make use of these extensions must define the detailed syntax and semantics (see 5 Conformance).
The following examples assume the namespace prefixes have been properly bound.
A schema component path referring to the type (either simple or complex)
whose local name is title
and which is in the namespace denoted by
the prefix my
:
/type::my:title
A schema component path referring to the globally declared element whose
local name is title
and which is in the namespace denoted by the
prefix my
:
/schemaElement::my:title
A schema component path referring to the globally declared attribute whose
local name is title
and which is in the namespace denoted by the
prefix my
:
/schemaAttribute::my:title
A schema component path referring to the globally declared attribute group
whose local name is title
and which is in the namespace denoted by
the prefix my
:
/attributeGroup::my:title
A schema component path referring to the pattern facet of the globally
declared simple type whose local name is title
which is in the
namespace denoted by my
:
/type::my:title/facet::pattern
Given this schema fragment for a schema whose target namespace is denoted by
the prefix my
:
<xs:complexType name="articleType"> <xs:sequence> <xs:element ref="my:section"/> <xs:element name="appendix" type="my:sectionType"/> </xs:sequence> </xs:complexType> <xs:element name="chapter"> <xs:complexType> <xs:sequence> <xs:element ref="my:title" minOccurs="0" maxOccurs="unbounded"/> <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="name" type="xs:string"/> <xs:anyAttribute namespace="##other" use="optional"/> </xs:complexType> </xs:element>
The following schema component path refers to the first element of the named complex type:
/type::my:articleType/model::sequence/schemaElement::my:section
And the following schema component path refers to the second:
/type::my:articleType/model::sequence/schemaElement::my:appendix
A schema component path referring to the (anonymous) complex type of the globally defined element:
/schemaElement::my:chapter/type::0
A schema component path that refers to the wildcard in the globally defined element:
/schemaElement::my:chapter/type::0/model::sequence/any::*
A schema component path that refers to the attribute of the globally defined element:
/schemaElement::my:chapter/type::0/schemaAttribute::name
[Definition: A
schema component path selects a sequence of
schema components in the context of an assembled schema; it is a series
of steps separated by
'/
' or '//
'. Complete schema component paths always
start with either '/
' or '//
'.
]
[Definition: A step consists of a schema component axis and a schema component name test and an optional positional predicate. It selects a sequence of schema components that are linked to a source component through an arc that matches the axis, pass the name test, and are selected by the positional predicate, if any. ] Schema component axes are described in 4.4 Schema Component Path Axes.
In general the syntax of a step of the schema component path has the following form:
The predicate is optional and there are abbreviated forms for some steps.
[Definition: A
schema component name
test is a condition on name of the components selected by the schema
component path step.] A schema component name test
either gives a localname, possibly with a namespace prefix, or consists of a
just the wildcard character ('*
'), or just the character zero
('0
').
A schema component name test of this form is true if the QName formed from the namespace name and local name specified in the the schema component name test is equal to the value of the component-name() accessor of the schema component. For more information on namespace binding for QName interpretation see 4.3.2 Namespaces.
A schema component name test of this form is true for anonymous type definitions. An anonymous type definition's component-name() accessor returns "0". This name cannot have any conflict with any possible named component, as 0 is not a valid name start character.
A schema component name test of this form is true for all linked components matching the given axis.
[Definition: A schema component positional predicate is a condition on the relative position of the component in the sequence of matching components from the schema component path step.] A schema component position predicate is true if the position of the target component in the sequence of components selected by the axis and name test is equal to the positive integer given in the predicate. Counting starts at 1.
A path consisting of just '/
' selects the schema description
component.
A path of the form /S1
selects
components linked to the schema description component in accordance with the
step S1
.
A path of the form S1/S2
is interpreted
by gathering the sequence of source components and then selecting any
schema component that is linked to one of the source components in accordance
with the step S2
. The sequence of source components
consists of the sequence of components selected by S1
followed by the components selected by the elided-component
axis on those components.
A path of the form S1//S2
is also
interpreted by gathering the sequence of source components and then selecting
any schema component that is linked to one of the source components in
accordance with the step S2
. In this case the
sequence of source components consists of the sequence of components selected
by S1
followed by the application of
the component axis on members of that sequence.
A path of the form S1
selects all schema components
linked to the initial source component in accordance with the step
S1
.
Implementations will have to exercise care to properly handle circularities in the component graph in determining the set of components matched by a path.
Incomplete schema component paths may be constructed starting at some specific source component following the construction rules given here. Such paths will not start with a leading slash. Correct interpretation of such incomplete (relative) paths depends on the initial source component. External specifications sanctioning relative schema component paths must therefore define the initial source component to use to interpret the schema component path. In this specification, "schema component path" always refers to a complete schema component path starting at the root schema description component, unless explicitly stated otherwise.
To emphasize the incompleteness of such paths, the current component step
syntax may be used (.
) for the head step. For example, if
the initial source component is a complex type, the following paths are
equivalent and
designate the element declaration with the QName my:section
within the sequence model group of that type:
model::sequence/schemaElement::my:section
./model::sequence/schemaElement::my:section
Schema component paths use QNames to refer to schema components.
Interpretation of these QNames therefore depends on namespace bindings.
When schema component paths are used in the context of schema component
designators (3 Schema Component Designators), the xmlns()
XPointer
scheme defines those namespace bindings. In the context of an XML document the
namespace prefixes will be bound in the conventional way (using the [in-scope namespaces] property of the element information item). Other host languages and
some XML applications will define their own namespace binding rules.
While the xmlns()
scheme does not provide for defining a
default namespace, other mechanisms may do so. In such contexts, schema
component paths allow and apply the default namespace.
Note also that the form
(and elementFormDefault
and attributeFormDefault
) values apply as well. Since, for example,
a local attribute declaration component with the form unqualified
will have an empty {target namespace}
, the QName for that
declaration will have no prefix.
For example, consider the path:
//quantity
This path
designates global or local element declarations whose local
name is quantity
and which are either in no
namespace, are local elements whose form is unqualified
,
or are in the default namespace (assuming there is a such a namespace
binding).
For types, form is not relevant.
/~Items//quantity
This path designates global or local element declarations whose local name
is quantity
, where these declarations
are in the subgraph represented by the global complex type component whose
local name is Items
. As in the previous
example, the element declaration may either be in schema with no target
namespace, in the default namespace, or a local element declaration with the
form unqualified
. The complex type Items
must be in
the default namespace or in a schema with no target namespace.
This path designates global or local attribute
declarations whose local name is partNum
where these declarations
are in the subgraph represented by the global complex type component whose
local name is Items
. Again, the complex type is either in the
default namespace or in a schema with no target namespace, and the attribute
declaration must be global attributes in a schema with no target namespace, in
the default namespace, or be local declarations with the form
unqualified
.
/~Items//@partNum
[Definition: A schema component path axis contains specific components linked to the current context component through certain kinds of arcs. Unless otherwise indicated, an axis applied to a component that has no arc of the required kind designates no components. ]
[Definition: The
currentComponent
axis contains the current component.
]
[25] | CurrentComponentAxis | ::= | 'currentComponent' ':: |
[18] | AbbrevCurrentComponentStep | ::= | '.' Predicate? |
[Definition: The
annotation
axis contains annotation
components linked to the current component through {annotation} or
{annotations} arcs, which are the components returned
by the annotations() accessor.
]
[26] | AnnotationAxis | ::= | 'annotation' '::' |
[Definition: The
schemaAttribute
axis contains attribute
declaration components linked to the current component through
{attribute declaration} or {attribute declarations} arcs,
which are those components returned by the component-linked() accessor whose
component-kind() is equal to xscd:attribute-declaration
.
]
[27] | SchemaAttributeAxis | ::= | 'schemaAttribute' '::' |
[15] | AbbrevAttributeStep | ::= | '@' NameTest
Predicate?
|
[Definition: The
schemaElement
axis contains element
declaration components linked to the current component through
{element declarations}, {term}, {particle},
{particles}, or {content type}, which are the components returned by the
term() accessor whose component-kind() is equal to
xscd:element-declaration
, together with {element declarations}.
]
[28] | SchemaElementAxis | ::= | 'schemaElement' '::' |
[16] | AbbrevElementStep | ::= | NameTest
Predicate?
|
[Definition: The type
axis contains simple type definition
and complex type definition components linked to the current component through
{type definition}, {type definitions}, {content type},
or {simple type definition} arcs, which are the components
returned by the component-children() accessor whose
component-kind() is equal to either
xscd:complex-type-definition
or
xscd:simple-type-definition
.]
[29] | TypeAxis | ::= | 'type' '::' |
[17] | AbbrevTypeStep | ::= | '~' NameTest
Predicate?
|
[Definition: The
attributeGroup
axis contains
attribute group definition components linked to the current component through
{attribute group definitions} arcs, which are those components
returned by the component-linked() accessor whose component-kind() is equal to
xscd:attribute-group-definition
.]
[30] | AttributeGroupAxis | ::= | 'attributeGroup' '::' |
[Definition: The
group
axis contains
model group definition components linked to the current component through
{model group definitions} arcs, which are those components returned
by the component-linked() accessor whose component-kind() is equal to
xscd:model-group-definition
.
]
[31] | GroupAxis | ::= | 'group' '::' |
[Definition: The
identityConstraint
axis contains
identity constraint definition components linked to the current component
through {identity constraint definitions} arcs, which are those
components returned by the component-linked() accessor whose component-kind()
is equal to xscd:identity-constraint-definition
.
]
[32] | IdentityConstraintAxis | ::= | 'identityConstraint' '::' |
[Definition: The
assertion
axis contains
assertion components linked to the current component
through {assertions}, {value}, or {facets} arcs, which are those components
returned by the assertions() accessor.]
[33] | AssertionAxis | ::= | 'assertion' '::' |
[Definition: The
alternative
axis
contains
type alternative components linked to the current component
through {alternatives}, {default type definition}, or {type table} arcs,
which are those components
returned by the component-linked() accessor whose component-kind() is
equal to xscd:type-alternative
.
]
Note:
The {default type definition} of the type alternatives table of an element declaration is actually a type alternative component and will be selected by the alternative axis.
[34] | AlternativeAxis | ::= | 'alternative' '::' |
[Definition: The
notation
axis contains
notation declaration components linked to the current component
through {notation declarations}
arcs, which are the components returned by the component-linked() accessor
whose component-kind() is equal to xscd:notation-declaration
.]
[35] | NotationAxis | ::= | 'notation' '::' |
[Definition: The
model
axis contains
model group components linked to the current component
through {model group}, {term}, {particle}, {particles}, or {content type}
arcs, which are the components returned by the term() accessor
whose component-kind() is equal to xscd:model-group
.
]
[36] | ModelAxis | ::= | 'model' '::' |
[Definition: The
anyAttribute
axis contains
wildcard components linked to the current component
through {attribute wildcard} arcs.]
[37] | AnyAttributeAxis | ::= | 'anyAttribute' '::' |
[Definition: The any
axis contains
wildcard components linked to the current component
through {wildcard}, {term}, {particle}, {particles}, {content type}, or
{open content} arcs, which is the components returned by the
term() accessor whose component-kind() is equal to
xscd:wildcard
. ]
[38] | AnyAxis | ::= | 'any' '::' |
[Definition: The
facet
axis contains
facet components linked to the current component
through {facets} or {fundamental facets} arcs, which is the components returned
by component-linked() whose component-kind() is equal
to xscd:facet
.
]
[39] | FacetAxis | ::= | 'facet' '::' |
[Definition: The
scope
axis contains
complex type definition, attribute group definition, or
model group definition components linked to the current component
through {scope} and {parent} arcs, which are the components returned from
the component-scope() accessor.
]
[40] | ScopeAxis | ::= | 'scope' '::' |
[Definition: The
context
axis contains
complex type definition, attribute declaration, or
element declaration components linked to the current component
through {context} arcs.
]
[41] | ContextAxis | ::= | 'context' '::' |
[Definition: The
substitutionGroup
axis contains
element declaration components linked to the current component
through {substitution group affiliation} and {substitution group affiliations}
arcs.
]
[42] | SubstitutionGroupAxis | ::= | 'substitutionGroup' '::' |
[Definition: The
baseType
axis contains
simple type definition and complex type definition components linked to the
current component through {base type definition} arcs.
]
[43] | BaseTypeAxis | ::= | 'baseType' '::' |
[Definition: The
itemType
axis contains
simple type definition components linked to the
current component through {item type definition} arcs.
]
[44] | ItemTypeAxis | ::= | 'itemType' '::' |
[Definition: The
memberType
axis contains
simple type definition components linked to the
current component through {member type definitions}
arcs. ]
[45] | MemberTypeAxis | ::= | 'memberType' '::' |
[Definition: The
primitiveType
axis contains
simple type definition components linked to the
current component through {primitive type definition}
arcs.]
[46] | PrimitiveTypeAxis | ::= | 'primitiveType' '::' |
[Definition: The key
axis contains
identity constraint definition components linked to the
current component through {referenced key}
arcs.]
[47] | KeyAxis | ::= | 'key' '::' |
[Definition: The
attributeUse
axis contains attribute use components
linked to the current component through {attribute uses}.
]
[48] | AttributeUseAxis | ::= | 'attributeUse' ':: |
[Definition: The
particle
axis contains particle components
linked to the current component through {particles}.
]
[49] | ParticleAxis | ::= | 'particle' ':: |
[Definition: The
component
axis contains the transitive closure of
schema
components that are either linked to the schema description component or that
are linked to current component through default arcs. That is, it contains
the transitive
closure of the component-children() accessor, as well as
component-linked()
accessor if the schema description is the current component.
]
[50] | ComponentAxis | ::= | 'component' '::' |
[12] | ComponentAxisSeparator | ::= | '//' |
[Definition: The
elided-component
axis contains complex type
definitions
linked to the current component through the {type definition} arc and the
transitive closure of all model group components linked to the current
component. That is, it contains the transitive closure of components returned
from the term() accessor whose component-kind() is equal to
xscd:model-group
, as well as components linked to the current component
through the {type definition} arc.
]
There is no syntax for this axis: it is used to define the semantics of certain paths.
A set of accessors is defined on schema components. For consistency, each accessor is defined for every kind of schema component, although several accessors return a constant empty value on some kinds of schema components.
Where accessors return sequences, the order of components accessed on one arc is as defined by the schema component model. Components accessed through default arcs precede components accessed through non-default arcs. Components are otherwise ordered as if arcs were accessed in the following order:
{type definitions}
{type definition}
{base type definition}
{item type definition}
{member type definitions}
{primitive type definition}
{type table}
{alternatives}
{default type definition}
{simple type definition}
{element declarations}
{substitution group affiliations}
{substitution group affiliation}
{attribute declarations}
{attribute declaration}
{model group definitions}
{attribute group definitions}
{scope}
{parent}
{context}
{content type}
{particles}
{particle}
{term}
{model group}
{attribute uses}
{open content}
{wildcard}
{attribute wildcard}
{identity constraint definitions}
{referenced key}
{assertions}
{notation declarations}
{facets}
{fundamental facets}
{annotation}
{annotations}
The component-kind accessor returns an expanded name identifying the kind of the schema component.
Component | Result of component-kind() |
---|---|
Attribute Declaration | xscd:attribute-declaration |
Element Declaration | xscd:element-declaration |
Complex Type Definition | xscd:complex-type-definition |
Attribute Use | xscd:attribute-use |
Attribute Group Definition | xscd:attribute-group-definition |
Model Group Definition | xscd:model-group-definition |
Model Group | xscd:model-group |
Particle | xscd:particle |
Wildcard | xscd:wildcard |
Identity‑Constraint Definition | xscd:identity-constraint-definition |
Type Alternative | xscd:type-alternative |
Assertion | xscd:assertion |
Notation Declaration | xscd:notation-declaration |
Annotation | xscd:annotation |
Schema | xscd:schema |
Simple Type Definition | xscd:simple-type-definition |
Constraining Facet | xscd:facet |
Fundamental Facet | xscd:facet |
The component-name accessor returns zero or one xs:QName values giving the name of the component.
Component | Result of component-name() |
---|---|
Attribute Declaration | the xs:QName formed from the {name} and {target namespace} properties |
Element Declaration | the xs:QName formed from the {name} and {target namespace} properties |
Complex Type Definition | the xs:QName formed from the {name} and {target namespace} properties; "0", if {name} is absent |
Attribute Use | empty |
Attribute Group Definition | the xs:QName formed from the {name} and {target namespace} properties |
Model Group Definition | the xs:QName formed from the {name} and {target namespace} properties |
Model Group | the xs:QName formed from an empty namespace name and the value of the component-variety() accessor as the local name |
Particle | empty |
Wildcard | empty |
Identity‑Constraint Definition | the xs:QName formed from the {name} and {target namespace} properties |
Assertion | empty |
Type Alternative | empty |
Notation Declaration | empty |
Annotation | empty |
Schema | empty |
Simple Type Definition | the xs:QName formed from the {name} and {target namespace} properties; "0", if {name} is absent |
Constraining Facet | the xs:QName formed with an empty namespace name and the value of the component-variety() accessor as the local name |
Fundamental Facet | the xs:QName formed with an empty namespace name and the value of the component-variety() accessor as the local name |
The component-variety accessor returns zero or one strings identifying the specific variety of that component kind.
Component | Result of component-variety() |
---|---|
Attribute Declaration | "global" if {scope} is "global" or if the value of the {variety} property of {scope} is "global" (1.1); "local" otherwise |
Element Declaration | "global" if {scope} is "global" or if the value of the {variety} property of {scope} is "global" (1.1); "local" otherwise |
Complex Type Definition | the value of the {variety} property of the {content type} (1.1). Under the XML Schema 1.0 component model, there is no such property; instead returns "empty" if the {content type} property has the value "empty", "simple" if the {content type} property has a simple type declaration as its value, "element-only" or "mixed" if the {content type} has a pair as a value and that string is a member of the pair |
Attribute Use | empty |
Attribute Group Definition | empty |
Model Group Definition | empty |
Model Group | the value of the {compositor} property, one of "sequence", "choice", and "all" |
Particle | empty |
Wildcard | the value of the {process contents} property, one of "strict", "lax", and "skip" |
Identity‑Constraint Definition | the value of the {identity-constraint category} property, one of "key", "keyref", and "unique" |
Type Alternative | empty |
Assertion | empty |
Notation Declaration | empty |
Annotation | empty |
Schema | empty |
Simple Type Definition | the value of the {variety} property, one of "atomic", "union", and "list" |
Constraining Facet | the facet variety, e.g. "minLength" for the minLength facet, and so on |
Fundamental Facet | the facet variety, e.g. "numeric" for the numeric facet, and so on |
The component-children accessor returns a sequence of schema components consisting of all the components immediately accessible through default axes, skipping minor components that produce no steps in the schema component path.
Component | Result of component-children() |
---|---|
Attribute Declaration | the value of {type definition} |
Element Declaration | the value of {type definition} |
Complex Type Definition | the value of {attribute uses} and; if the value of the component-variety() accessor is "empty" then empty, if the value of the component-variety() accessor is "simple" then the value of {simple type definition} (1.1) or the value of {content type} (1.0); otherwise the value of the term() accessor |
Attribute Use | the value of {attribute declaration} |
Attribute Group Definition | the value {attribute declaration} for each Attribute Use in {attribute uses} |
Model Group Definition | the value of {model group} |
Model Group | the value of the {term} of each Particle in {particles} |
Particle | the value of {term} |
Wildcard | empty |
Identity‑Constraint Definition | empty |
Type Alternative | the value of {type definition} |
Assertion | empty |
Notation Declaration | empty |
Annotation | empty |
Schema | the value of {element declarations} |
Simple Type Definition | the value of {facets} |
Constraining Facet | empty |
Fundamental Facet | empty |
The component-linked accessor returns a sequence of schema components immediately accessible using any axis, skipping minor components that produce no steps in the schema component path.
Component | Result of component-linked() |
---|---|
Attribute Declaration | the value of the component-children() and annotations() accessors, together with the {scope} (1.0) or the {parent} of {scope} (1.1) |
Element Declaration | the value of the component-children() and annotations() accessors, together with the value of {scope} and {substitution group affiliation} (1.0) or the value of {substitution group affiliations}, the value of the {parent} of {scope}, the value of the {alternatives} and {default type definition} of {type table} (1.1), along with the value of {identity constraint definitions} |
Complex Type Definition | the value of component-children() and annotations() accessors, together with the value of {base type definition}, {context}, {attribute wildcard}, and {assertions} and the value of {wildcard} of {open content} of {content type} |
Attribute Use | the value of the component-children() and annotations() accessors |
Attribute Group Definition | the value of the component-children() and annotations() accessors, as well as the value of {attribute wildcard} |
Model Group Definition | the value of the component-children() and annotations() accessors |
Model Group | the value of the component-children() and annotations() accessors |
Particle | the value of the component-children() accessor |
Wildcard | the value of the annotations() accessor |
Identity‑Constraint Definition | the value of the annotations() accessor, together with the value of {referenced key} |
Type Alternative | the value of the component-childrenl() and annotations() accessors |
Assertion | the value of the annotations() accessor |
Notation Declaration | the value of the annotations() accessor |
Annotation | empty |
Schema | the value of the component-children() and annotations() accessors, as well as the value of {type definitions}, {attribute declarations}, {attribute group definitions}, {model group definitions}, {notation declarations}, and {identity-constraint definitions} |
Simple Type Definition | the value of the component-children() and annotations() accessors, together with the value of {context}, {base type definition}, {fundamental facets}, {primitive type definition}, {item type definition}, and {member type definitions} |
Constraining Facet | the value of the annotations() accessor, together with the value of {value} in the case that the facet is the "assertions" facet |
Fundamental Facet | empty |
The term accessor returns term components linked through the {model group} or {term} arcs, possibly via {particle}, {particles}, or {content type} arcs.
Component | Result of term() |
---|---|
Attribute Declaration | empty |
Element Declaration | empty |
Complex Type Definition | the value of {term} of {particle} of {content type} (1.1) or the value of {term} of {content type} (1.0), together with the value of {wildcard} of {open content} of {content type} |
Attribute Use | empty |
Attribute Group Definition | empty |
Model Group Definition | value of {model group} |
Model Group | empty |
Particle | the value of {term} |
Wildcard | empty |
Identity‑Constraint Definition | empty |
Type Alternative | empty |
Assertion | empty |
Notation Declaration | empty |
Annotation | empty |
Schema | empty |
Simple Type Definition | empty |
Constraining Facet | empty |
Fundamental Facet | empty |
The component-scope accessor returns components linked through the {scope} possibly via {parent} arcs.
Component | Result of component-context() |
---|---|
Attribute Declaration | if component-variety() is "global" then empty; otherwise the value of {parent} of {scope} (1.1) or the value of {scope} (1.0) |
Element Declaration | if component-variety() is "global" then empty; otherwise the value of {parent} of {scope} (1.1) or the value of {scope} (1.0) |
Complex Type Definition | empty |
Attribute Use | empty |
Attribute Group Definition | empty |
Model Group Definition | empty |
Model Group | empty |
Particle | empty |
Wildcard | empty |
Identity‑Constraint Definition | empty |
Type Alternative | empty |
Assertion | empty |
Notation Declaration | empty |
Annotation | empty |
Schema | empty |
Simple Type Definition | empty |
Constraining Facet | empty |
Fundamental Facet | empty |
The assertions accessor returns assertions components linked through the {assertions} or {value} arcs. The assertions accessor is always empty for the 1.0 schema component model.
Component | Result of assertions() |
---|---|
Attribute Declaration | empty |
Element Declaration | empty |
Complex Type Definition | the value of {assertions} |
Attribute Use | empty |
Attribute Group Definition | empty |
Model Group Definition | empty |
Model Group | empty |
Particle | empty |
Wildcard | empty |
Identity‑Constraint Definition | empty |
Type Alternative | empty |
Assertion | empty |
Notation Declaration | empty |
Annotation | empty |
Schema | empty |
Simple Type Definition | empty |
Constraining Facet | empty |
Fundamental Facet | empty unless the facet name is "assertions"; the value of {value} otherwise |
The annotations accessor returns annotations components linked through the {annotation} or {annotations} arc.
Component | Result of annotations() |
---|---|
Attribute Declaration | the value of {annotation} (1.0) or {annotations} (1.1) |
Element Declaration | the value of {annotation} (1.0) or {annotations} (1.1) |
Complex Type Definition | the value of {annotations} |
Attribute Use | the value of {annotations} |
Attribute Group Definition | the value of {annotation} (1.0) or {annotations} (1.1) |
Model Group Definition | the value of {annotation} (1.0) or {annotations} (1.1) |
Model Group | the value of {annotation} (1.0) or {annotations} (1.1) |
Particle | the value of {annotations} |
Wildcard | the value of {annotation} (1.0) or {annotations} (1.1) |
Identity‑Constraint Definition | the value of {annotation} (1.0) or {annotations} (1.1) |
Type Alternative | the value of {annotations} |
Assertion | the value of {annotations} |
Notation Declaration | the value of {annotation} (1.0) or {annotations} (1.1) |
Annotation | empty |
Schema | the value of {annotations} |
Simple Type Definition | the value of {annotation} (1.0) or {annotations} (1.1) |
Constraining Facet | the value of {annotation} (1.0) or {annotations} (1.1) |
Fundamental Facet | empty |
[Definition: The canonical schema component path of a component is a distinguished valid component path that uniquely identifies that particular component, that has as few steps as possible, and that can be deterministically constructed starting from the schema description component, and that contains no extension axes or accessors. ]
The remainder of this section consists of a constructive definition of canonical schema component paths: a path produced by this construction will be the canonical one.
[Definition: The current schema component is a schema component for which there is a valid canonical path through the schema component graph.]
[Definition: The target schema component is a schema component linked to the current schema component via one of the schema component properties defined previously.]
[Definition: The component relationship is the name of the schema component property on the current schema component which references the target schema component. ]
[Definition: The ancestor set of the target schema component is the set of schema components on the valid canonical path to the current schema component together with the current schema component.]
[Definition: The base type set of a schema component is the set consisting of the {base type definition} of that schema component and the {base type definition} of every member of the set. ]
Constructively, this set can be computed by adding the {base type definition} to the set, and iterating on that type component, until you see a component whose {target namespace} property is "http://www.w3.org/2001/XMLSchema" and whose {name} property is "anyType".
[Definition: The extended base type set of a schema component is the set consisting of the {base type definition} of that schema component if its {derivation} method is "extension" and the {base type definition} of every member of the set whose {derivation} method is "extension". ]
[Definition: The base facet set of a schema component is the set consisting of all members of the {facets} property of members of the base type set of that schema component.]
[Definition: Two facets are the same if they are the same kind of component (e.g. both are length facets) and their {value} properties have identical values.]
[Definition: The base attribute use set of a schema component is the set consisting of all members of the {attribute uses} property of members of the base type set of that schema component.]
[Definition: Two attribute uses are the same if the {name} and {target namespace} of their {attribute declaration} properties are equal. ]
(Note that this is not equality which requires checking the {type definition} as well. However, the rules for component consistency will ensure that checking the {name} and {target namespace} suffices for our purposes here.)
[Definition: The particle set of a schema component is the set consisting of the {content type} of that schema component with the members of the {particles} property of the {term} of any member of the set.]
[Definition: The base particle set of a schema component is the union of all particle sets of all the members of the extended base type set of that schema component.]
[Definition: Two particles are the same if the implementation reports them as the same.] Informally, implementations will report particles that are "inherited" from base types as "the same" as the corresponding particle in the base type. Future revisions of the XML Schema recommendation will specify more precisely the conditions under which particles should be regarded as "the same".
Traversal where the current schema component is the schema description component to any target schema component is always permitted in the construction of a canonical path. If the current schema component is not the schema description schema component, then traversal from the current schema component to the target schema component is forbidden in the construction of a canonical path if any of the following conditions is met:
the target schema component is an identity constraint definition
the target schema component is a simple or complex type definition whose {name} property is not absent
the target schema component is an element or attribute declaration
whose {scope} property is global
the target schema component has a {scope} property whose value is a schema component and that schema component is not a member of the ancestor set of the target schema component
the component relationship is {scope}, {substitution group affiliation}, {primitive type definition}, or {referenced key}
the component relationship is {base type definition} and target schema component's {name} property is not absent
the target schema component is a facet and there exists some facet in its base facet set of the target schema component that is the same as the facet
the current schema component is a complex type, the target schema component is the {attribute declaration} of an attribute use component and there exists some attribute use in the base attribute use set of the current schema component that is the same as the attribute use whose {attribute declaration} is the target schema component
the target schema component is the {term} of a particle and there exists some particle in the base particle set of the current schema component that is the same as the target schema component
Informally, the first two conditions ensure that the canonical path to an identity constraint or a named type is the one that flows directly from the schema description component, the third condition ensures that the canonical path to element and attribute declarations is likewise the global one (if there is one), the fourth condition accounts for element and attribute declarations stemming from named model groups and attribute groups, the fifth and sixth ensure that the canonical path doesn't follow "backwards" paths (while accounting for redefined types), and the final three conditions ensure the canonical path to "inherited" components goes through their component of origin.
Because the 1.0 component model provides no reliable ordering of annotations, selection of a specific annotation using a numerical predicate is forbidden in canonical paths against a 1.0 schema. For 1.1 schemas, an individual annotation component is selected using a numerical predicate.
In general, it is not possible to obtain the canonical path for a schema component without access to the schema component graph. In particular, canonicalizing some non-canonical path, or determining whether a schema component path is canonical cannot be performed without such access.
For example, consider the path
/type::x:foo/schemaElement::x:bar
.
For this schema fragment, this represents a canonical path to the local
element bar
:
<complexType name="foo"> <sequence> <element name="bar" type="x:barType"/> </sequence> </complexType>
But for the following schema fragment,
the same path
represents a non-canonical path. The
canonical path would instead be /group::x:barGroup/schemaElement::x:bar
.
<group name="barGroup"> <sequence> <element name="bar" type="x:barType"/> </sequence> </group> <complexType name="foo"> <sequence> <group ref="x:barGroup"/> </sequence> </complexType>
The concrete syntax allows certain abbreviations, such as
eliding the positional predicate where it is
unnecessary to distinguish components,
wildcarded schema component name tests
(*
), and abbreviated steps
(e.g. @name
)
.
Canonical path syntax forbids all these abbreviations. In addition, the
canonical path syntax fixes the namespace prefix, if any, to
p
. Since at most one namespace can be involved in a
canonical schema component path, one prefix suffices.
Finally, use of the current component, component, and
elided-component axes are disallowed in the canonical path
syntax, and the use of the particle and attributeUse axes are
disallowed except in the last step of the path.
[Definition: Two schema component paths are equal if they have the same number of steps, and each step in one path is equal to the corresponding step in the other. Steps are equal if they have the same axis, name test (namespace and local name, or wildcard), and predicate. .]
Note: This definition of equality neither relies on the notion of 'the same component' nor defines component equivalence. A schema component may have multiple schema component paths. Although these schema component paths address 'the same component', they are not equal. It is true, however, that two canonical paths to the same component will be equal.
Schema component paths may be used by other specifications. For such usage, this specification does not define any criteria for conformance and relies on other specifications to specify criteria for conformance of implementations.
Such specifications must define:
How the target schema is identified.
How namespace binding applies to schema component paths, in particular how or whether the default namespace applies.
Whether only canonical schema component paths are permitted.
Whether only complete schema component paths are permitted.
If incomplete schema component paths are permitted, how the initial source component is determined.
Whether any extension axes are defined, together with their syntax and semantics.
Whether any extension accessors are defined, together with their syntax and semantics.
This specification normatively depends on the XPointer Framework [XPTR].
Conforming XPointer processors claiming to support the
xscd()
scheme must
identify schema components as
defined in this specification and
conform to the XPointer xmlns()
scheme
specification.
Schema component paths and designators navigate the XML Schema component model and are wholly dependent on that model to define the set of allowable axes and referenced components. Therefore, as the schema component model changes, this specification may add additional axes, mapping rules, and accessors as required to support those changes. The EBNF defines syntax for extension accessors after the last step in a path and for extension axes.
This section walks through an example XML Schema Document from the XML Schema Part 0: Primer[XSD0] and enumerates the abbreviated and canonical schema component designators for schema components.
All schema constructs in this section are considered to be in the following
schema document and its URI is schema-URI
:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <!-- elided... see below ... --> </xsd:schema>
Since this schema has no target namespace, no namespace
binding is required and there is no xmlns()
pointer part for any
of the schema component designators for this schema.
The canonical schema component designator for this schema description
component is schema-URI#xscd(/)
.
<xsd:annotation> <xsd:documentation xml:lang="en"> Purchase order schema for Example.com. Copyright 2000 Example.com. All rights reserved. </xsd:documentation> </xsd:annotation>
The canonical schema component designator for this annotation schema component
is schema-URI#xscd(/annotation::*)
.
The following is a global element declaration:
<xsd:element name="purchaseOrder" type="PurchaseOrderType"/>
The abbreviated schema component designator for this element declaration component
is schema-URI#xscd(/purchaseOrder)
and the canonical is
schema-URI#xscd(/schemaElement::purchaseOrder)
.
The following is another global element declaration,
<xsd:element name="comment" type="xsd:string"/>
The abbreviated schema component designator for this element declaration
component is schema-URI#xscd(/comment)
and the canonical is
schema-URI#xscd(/schemaElement::comment)
.
This following is a global complex type definition component:
<xsd:complexType name="PurchaseOrderType"> <xsd:sequence> <xsd:element name="shipTo" type="USAddress"/> <xsd:element name="billTo" type="USAddress"/> <xsd:element ref="comment" minOccurs="0"/> <xsd:element name="items" type="Items"/> </xsd:sequence> <xsd:attribute name="orderDate" type="xsd:date"/> </xsd:complexType>
The abbreviated schema component designator for this complex type definition and its element and attribute declaration components are:
schema-URI#xscd(/~purchaseOrderType) schema-URI#xscd(/~purchaseOrderType/shipTo) schema-URI#xscd(/~purchaseOrderType/billTo) schema-URI#xscd(/comment) schema-URI#xscd(/~purchaseOrderType/items) schema-URI#xscd(/~purchaseOrderType/@orderDate)
The canonical schema component designator for this complex type definition and its element and attribute declaration components are:
schema-URI#xscd(/type::purchaseOrderType) schema-URI#xscd(/type::purchaseOrderType/model::sequence/schemaElement::shipTo) schema-URI#xscd(/type::purchaseOrderType/model::sequence/schemaElement::billTo) schema-URI#xscd(/schemaElement::comment) schema-URI#xscd(/type::purchaseOrderType/model::sequence/schemaElement::items) schema-URI#xscd(/type::purchaseOrderType/schemaAttribute::orderDate)
The following is another global complex type definition component:
<xsd:complexType name="USAddress"> <xsd:sequence> <xsd:element name="name" type="xsd:string"/> <xsd:element name="street" type="xsd:string"/> <xsd:element name="city" type="xsd:string"/> <xsd:element name="state" type="xsd:string"/> <xsd:element name="zip" type="xsd:decimal"/> </xsd:sequence> <xsd:attribute name="country" type="xsd:NMTOKEN" fixed="US"/> </xsd:complexType>
The abbreviated schema component designator for this complex type definition and its element and attribute declaration components are:
schema-URI#xscd(/~USAddress) schema-URI#xscd(/~USAddress/name) schema-URI#xscd(/~USAddress/street) schema-URI#xscd(/~USAddress/city) schema-URI#xscd(/~USAddress/state) schema-URI#xscd(/~USAddress/zip) schema-URI#xscd(/~USAddress/@country)
The canonical schema component designator for this complex type definition and its element and attribute declaration components are:
schema-URI#xscd(/type::USAddress) schema-URI#xscd(/type::USAddress/model::sequence/schemaElement::name) schema-URI#xscd(/type::USAddress/model::sequence/schemaElement::street) schema-URI#xscd(/type::USAddress/model::sequence/schemaElement::city) schema-URI#xscd(/type::USAddress/model::sequence/schemaElement::state) schema-URI#xscd(/type::USAddress/model::sequence/schemaElement::zip) schema-URI#xscd(/type::USAddress/schemaAttribute::country)
The following is a global complex type definition with anonymous complex type and simple type definition components:
<xsd:complexType name="Items"> <xsd:sequence> <xsd:element name="item" minOccurs="0" maxOccurs="unbounded"> <xsd:complexType> <xsd:sequence> <xsd:element name="productName" type="xsd:string"/> <xsd:element name="quantity"> <xsd:simpleType> <xsd:restriction base="xsd:positiveInteger"> <xsd:maxExclusive value="100"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="USPrice" type="xsd:decimal"/> <xsd:element ref="comment" minOccurs="0"/> <xsd:element name="shipDate" type="xsd:date" minOccurs="0"/> </xsd:sequence> <xsd:attribute name="partNum" type="SKU" use="required"/> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType>
The abbreviated schema component designator for this complex type definition and its element and attribute declaration, simple type definition, and facet components are:
schema-URI#xscd(/~Items) schema-URI#xscd(/~Items/item) schema-URI#xscd(/~Items/item/~0)) schema-URI#xscd(/~Items/item/productName) schema-URI#xscd(/~Items/item/quantity) schema-URI#xscd(/~Items/item/quantity/~0) schema-URI#xscd(/~Items/item/quantity/~0/facet::maxExclusive) schema-URI#xscd(/~Items/item/USPrice) schema-URI#xscd(/comment) schema-URI#xscd(/~Items/item/shipDate) schema-URI#xscd(/~Items/item/@partNum)
The canonical schema component designator for this complex type definition and its element and attribute declaration, simple type definition, and facet components are (paths broken across lines for readability):
schema-URI#xscd(/type::Items) schema-URI#xscd(/type::Items/model::sequence/schemaElement::item) schema-URI#xscd(/type::Items/model::sequence/schemaElement::item/type::0) schema-URI#xscd(/type::Items/model::sequence/schemaElement::item/type::0/ model::sequence/schemaElement::productName) schema-URI#xscd(/type::Items/model::sequence/schemaElement::item/type::0/ model::sequence/schemaElement::quantity) schema-URI#xscd(/type::Items/model::sequence/schemaElement::item/type::0/ model::sequence/schemaElement::quantity/type::0) schema-URI#xscd(/type::Items/model::sequence/schemaElement::item/type::0/ model::sequence/schemaElement::quantity/type::0/ facet::maxExclusive) schema-URI#xscd(/type::Items/model::sequence/schemaElement::item/type::0/ model::sequence/schemaElement::USPrice) schema-URI#xscd(/schemaElement::comment) schema-URI#xscd(/type::Items/model::sequence/schemaElement::item/type::0/ model::sequence/schemaElement::shipDate) schema-URI#xscd(/type::Items/model::sequence/schemaElement::item/type::0/ schemaAttribute::partNum)
The following is a global simple type definition component:
<!-- Stock Keeping Unit, a code for identifying products --> <xsd:simpleType name="SKU"> <xsd:restriction base="xsd:string"> <xsd:pattern value="\d{3}-[A-Z]{2}"/> </xsd:restriction> </xsd:simpleType>
The canonical schema component designator for this simple type definition and its facet component are:
schema-URI#xscd(/type::SKU) schema-URI#xscd(/type::SKU/facet::pattern)
The schema for the examples in the previous section had no
target namespace. If we change the schema so that the target namespace is
"http://example.com/schema/po"
, then the schema
component designators need to take namespace bindings into account.
For example, the abbreviated schema component designator for the
complex type definition USAddress
and its element and attribute
declaration components are:
schema-URI#xmlns(p=http://example.com/schema/po)xscd(/~p:USAddress) schema-URI#xmlns(p=http://example.com/schema/po)xscd(/~p:USAddress/p:name) schema-URI#xmlns(p=http://example.com/schema/po)xscd(/~p:USAddress/p:street) schema-URI#xmlns(p=http://example.com/schema/po)xscd(/~p:USAddress/p:city) schema-URI#xmlns(p=http://example.com/schema/po)xscd(/~p:USAddress/p:state) schema-URI#xmlns(p=http://example.com/schema/po)xscd(/~p:USAddress/p:zip) schema-URI#xmlns(p=http://example.com/schema/po)xscd(/~p:USAddress/@country)
Note that since the attributeFormDefault
for the
schema is unqualified
(the default value), no namespace prefix is
used with the country
attribute.
The canonical schema component designator for this complex type definition and its element and attribute declaration components are (paths broken across lines for readability):
schema-URI#xmlns(p=http://example.com/schema/po)xscd(/type::p:USAddress) schema-URI#xmlns(p=http://example.com/schema/po)xscd(/type::p:USAddress/ model::sequence/schemaElement::p:name) schema-URI#xmlns(p=http://example.com/schema/po)xscd(/type::p:USAddress/ model::sequence/schemaElement::p:street) schema-URI#xmlns(p=http://example.com/schema/po)xscd(/type::p:USAddress/ model::sequence/schemaElement::p:city) schema-URI#xmlns(p=http://example.com/schema/po)xscd(/type::p:USAddress/ model::sequence/schemaElement::p:state) schema-URI#xmlns(p=http://example.com/schema/po)xscd(/type::p:USAddress/ model::sequence/schemaElement::p:zip) schema-URI#xmlns(p=http://example.com/schema/po)xscd(/type::p:USAddress/ schemaAttribute::country)
Schema component paths may also be used in other contexts that provide namespace binding contexts. For example, an XML representation may apply normal namespace binding rules to apply to embedded schema component paths:
<xsx:ui xmlns:err="http://example.com/extension/ui" xmlns:p="http://example.com/schema/po"> <xsx:component> <xsx:path>/~p:USAddress/p:state</xsx:path> <xsx:prompt>State</xsx:prompt> <xsx:display>selector</xsx:display> <xsx:choices>http://example.com/state-menu.xml</xsx:choices> <xsx:tab>Address</xsx:tab> </xsx:component> </xsx:ui>
Another possible means of binding namespaces is to use the namespace URI as the schema designator with the convention that it is the default namespace. This could be useful combined with the use of just the schema component paths in the fragment identifier to obtain terse identifiers for global schema types in single-namespace schemas:
http://www.w3.org/2001/XMLSchema#/~gMonth
Note:
This specification does not define such a fragment identifier scheme for namespace documents. Neither does it rule out such a usage.
The following examples assume that the namespace prefixes
r
and ipo
are appropriately bound.
Here is a path that designates an attribute declaration whose local name is
period
in the namespace denoted by
r
in an anonymous complex type:
/r:purchaseReport/type::0/@period
Using the elided-component axis to select the attribute declaration directly from the element declaration, this path reduces to:
/r:purchaseReport/@period
Here is a path that designates an
element
declaration whose local name is
name
in the namespace denoted by
ipo
in a globally defined type:
/type::ipo:USAddress/model::sequence/model::sequence[1]/name
Using the elided-component axis to select the element declaration directly from the complex type definition, this path reduces to:
/type::ipo:USAddress/name
This path designates an element declaration whose local name is
regions
in the namespace denoted by
r
in an anonymous complex type:
/r:purchaseReport/type::0/model::sequence/r:regions
Using the elided-component axis to select the element declaration r:regions directly from the element declaration r:purchaseReport, this path reduces to:
/r:purchaseReport/r:regions
This path
designates global or local element declarations whose local
name is quantity
in the namespace denoted by r
:
//r:quantity
This path designates global or local element declarations whose
local name is quantity
in the namespace denoted
by r
, where these declarations
are in the subgraph represented by the global complex type component whose
local name is Items
in the namespace denoted by
r
:
/~r:Items//r:quantity
This path designates global or local attribute
declarations whose local name is partNum
in the
namespace denoted by r
where these declarations are in the subgraph represented by the global complex
type component whose
local name is Items
in the namespace denoted by r
:
/~r:Items//@partNum
This extended example works against the following schema fragment for a schema with no target namespace:
<xs:element name="example" type="aType"/> <xs:complexType name="aType"> <xs:sequence> <xs:element name="foo"/> <xs:group ref="aGroup"/> </xs:sequence> </xs:complexType> <xs:group name="aGroup"> <xs:sequence> <xs:element name="bar"> <xs:complexType> <xs:sequence> <xs:element ref="foo"/> <xs:element ref="a"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:group> <xs:element name="foo"/>
Which of the following paths can be shortened to //foo
using the
component and elided-component axes?
Path | Shortened to //foo ? |
---|---|
/group::aGroup/model::sequence/bar/~0/model::sequence/foo | No |
/~aType/model::sequence/foo | Yes |
/~aType/model::sequence/model::sequence/bar/~0/foo | No |
/root/~aType/model::sequence/foo | Yes |
/root/~aType/model::sequence/model::sequence/bar/~0/foo | No |
The "no" answers are all because bar
is not selected
by either the component axis or the elided-component axis and must therefore
appear in the path.
Schema component paths rely on the schema component graph implicit in the assembled collection of schema components and their properties. The following table details which properties are used for defining schema component paths, and whether they are used to define links in the graph (traversed) or just referenced for some other purpose. Traversals marked with a star (*) are the default axis of traversal.
Component or Property Record | Property | Use |
---|---|---|
Attribute Declaration | ||
{type definition} | traversed * | |
{annotation} | traversed (special) | |
{annotations} | traversed (special) | |
{name} | referenced | |
{target namespace} | referenced | |
{scope} | traversed | |
{value constraint} | none | |
Scope Property Record | ||
{variety} | referenced | |
{parent} | traversed | |
Element Declaration | ||
{type definition} | traversed * | |
{identity-constraint definitions} | traversed | |
{annotation} | traversed (special) | |
{annotations} | traversed (special) | |
{name} | referenced | |
{target namespace} | referenced | |
{type table} | traversed | |
{scope} | traversed | |
{value constraint} | none | |
{nillable} | none | |
{substitution group affiliation} | traversed | |
{substitution group affiliations} | traversed | |
{substitution group exclusions} | none | |
{disallowed substitutions} | none | |
{abstract} | none | |
Type Table Property Record | ||
{alternatives} | traversed | |
{default type definition} | traversed | |
Complex Type Definition | ||
{base type definition} | traversed | |
{attribute uses} | traversed | |
{attribute wildcard} | traversed | |
{content type} | traversed * | |
{annotations} | traversed (special) | |
{name} | referenced | |
{target namespace} | referenced | |
{context} | traversed | |
{derivation method} | none | |
{final} | none | |
{abstract} | none | |
{prohibited substitutions} | none | |
{assertions} | traversed | |
Content Type Property Record | ||
{variety} | referenced | |
{particle} | traversed * | |
{simple type definition} | traversed | |
{open content} | traversed | |
Open Content Property Record | ||
{mode} | none | |
{wildcard} | traversed * | |
Attribute Use | ||
{attribute declaration} | traversed * | |
{value constraint} | none | |
{required} | none | |
{annotations} | traversed (special) | |
Attribute Group Definition | ||
{attribute uses} | traversed * | |
{attribute wildcard} | traversed | |
{annotation} | traversed (special) | |
{annotations} | traversed (special) | |
{name} | referenced | |
{target namespace} | referenced | |
Model Group Definition | ||
{model group} | traversed * | |
{annotation} | traversed (special) | |
{annotations} | traversed (special) | |
{name} | referenced | |
{target namespace} | referenced | |
Model Group | ||
{particles} | traversed * | |
{annotation} | traversed (special) | |
{annotations} | traversed (special) | |
{compositor} | referenced | |
Particle | ||
{term} | traversed * | |
{min occurs} | none | |
{max occurs} | none | |
{annotations} | traversed (special) | |
Wildcard | ||
{annotation} | traversed (special) | |
{annotations} | traversed (special) | |
{namespace constraint} | none | |
{process contents} | none | |
Identity-constraint Definition | ||
{annotation} | traversed (special) | |
{annotations} | traversed (special) | |
{name} | referenced | |
{target namespace} | referenced | |
{identity-constraint category} | none | |
{selector} | none | |
{fields} | none | |
{referenced key} | traversed | |
Type Alternative | ||
{annotations} | traversed (special) | |
{test} | none | |
{type definition} | traversed * | |
Assertion | ||
{annotations} | traversed (special) | |
{test} | none | |
Notation Declaration | ||
{annotation} | traversed (special) | |
{annotations} | traversed (special) | |
{name} | referenced | |
{target namespace} | referenced | |
{public identifier} | none | |
{system identifier} | none | |
Annotation | ||
{application information} | none | |
{user information} | none | |
{attributes} | none | |
Schema | ||
{type definitions} | traversed | |
{attribute declarations} | traversed | |
{element declarations} | traversed * | |
{attribute group definitions} | traversed | |
{model group definitions} | traversed | |
{notation declarations} | traversed | |
{identity constraint definitions} | traversed | |
{annotations} | traversed (special) | |
Simple Type Definition | ||
{base type definition} | traversed | |
{facets} | traversed * | |
{fundamental facets} | traversed | |
{item type definition} | traversed | |
{member type definitions} | traversed | |
{context} | traversed | |
{annotation} | traversed (special) | |
{annotations} | traversed (special) | |
{name} | referenced | |
{target namespace} | referenced | |
{variety} | referenced | |
{final} | none | |
{primitive type definition} | traversed | |
Facets | ||
{annotation} | traversed (special) | |
{annotations} | traversed (special) | |
{value} | traversed * (assertions only) | |
{fixed} | none |
The following table details all the axes, the source and target component kinds, a brief syntax summary, and indicates whether the axis is a default one.
Axis | Source Component | Target Component | Syntax | Default? |
---|---|---|---|---|
(root) | ||||
N/A | Schema | / | no | |
annotations | ||||
Attribute Declaration | Annotation | annotation::* | no | |
Attribute Group Definition | Annotation | annotation::* | no | |
Complex Type Definition | Annotation | annotation::* | no | |
Element Declaration | Annotation | annotation::* | no | |
Facet | Annotation | annotation::* | no | |
Model Group Definition | Annotation | annotation::* | no | |
Notation Declaration | Annotation | annotation::* | no | |
Schema | Annotation | annotation::* | no | |
Simple Type Definition | Annotation | annotation::* | no | |
Wildcard | Annotation | annotation::* | no | |
attribute declarations | ||||
Attribute Use | Attribute Declaration | schemaAttribute::qname | yes | |
Schema | Attribute Declaration | schemaAttribute::qname | no | |
attribute group definitions | ||||
Schema | Attribute Group Definition | attributeGroup::qname | no | |
attribute uses | ||||
Complex Type Definition | Attribute Use | N/A | no | |
Attribute Group Definition | Attribute Use | N/A | yes | |
attribute wildcard | ||||
Complex Type Definition | Attribute Wildcard | anyAttribute::* | no | |
Attribute Group Definition | Attribute Wildcard | anyAttribute::* | no | |
base type definition | ||||
Complex Type Definition | Simple Type Definition | baseType::qname | no | |
Complex Type Definition | baseType::qname | no | ||
Simple Type Definition | Simple Type Definition | baseType::qname | no | |
content type | ||||
Complex Type Definition | Complex Type Definition | type::qname | yes | |
element declarations | ||||
Schema | Element Declaration | schemaElement::qname | yes | |
facets | ||||
Simple Type Definition | Facet | facet::name | yes | |
fundamental facets | ||||
Simple Type Definition | Fundamental Facet | facet::name | no | |
identity constraint definitions | ||||
Element Declaration | Identity-constraint Definition | identityConstraint::qname | no | |
Schema | Identity-constraint Definition | identityConstraint::qname | no | |
item type definition | ||||
Simple Type Definition | Simple Type Definition | itemType::qname | no | |
member type definitions | ||||
Simple Type Definition | Simple Type Definition | memberType::qname [n] | no | |
model group | ||||
Model Group Definition | Model Group | model::compositor[n] | yes | |
model group definitions | ||||
Schema | Model Group Definition | group::qname | no | |
notation declarations | ||||
Schema | Notation Declaration | notation::qname | no | |
particles | ||||
Model Group | Particle | N/A | yes | |
primitive type definition | ||||
Simple Type Definition | Simple Type Definition | primitivetype::qname | no | |
referenced key | ||||
Identity-constraint Definition | Identity-constraint Definition | key::qname | no | |
scope | ||||
Attribute Declaration | Simple Type Definition | scope::qname | no | |
Complex Type Definition | scope::qname | no | ||
Attribute Group Definition | scope::qname | no | ||
Element Declaration | Simple Type Definition | scope::qname | no | |
Complex Type Definition | scope::qname | no | ||
Model Group Definition | scope::qname | no | ||
context | ||||
Complex Type Definition | Element Declaration | context::qname | no | |
Complex Type Definition | context::qname | no | ||
Simple Type Definition | Element Declaration | context::qname | no | |
Attribute Declaration | context::qname | no | ||
Complex Type Definition | context::qname | no | ||
Simple Type Definition | context::qname | no | ||
substitution group affiliation | ||||
Element Declaration | Element Declaration | substitutionGroup::qname | no | |
term | ||||
Particle | Element Declaration | schemaElement::qname[n] | yes | |
Model Group | model::compositor[n] | yes | ||
Wildcard | any::*[n] | yes | ||
type definitions | ||||
Attribute Declaration | Simple Type Definition | type::qname | yes | |
Complex Type Definition | type::qname | yes | ||
Element Declaration | Simple Type Definition | type::qname | yes | |
Complex Type Definition | type::qname | yes | ||
Schema | Simple Type Definition | type::qname | no | |
Complex Type Definition | type::qname | no | ||
assertions | ||||
Complex Type Definition | Assertion | assertion::*[n] | no | |
Facet | Assertion | assertion::*[n] | no | |
alternatives | ||||
Element Declaration | Type Alternative | alternative::*[n] | no |
The listing below is for the benefit of readers of a printed version of this document: it collects together all the definitions which appear in the document above.
alternative
axis
contains
type alternative components linked to the current component
through {alternatives}, {default type definition}, or {type table} arcs,
which are those components
returned by the component-linked() accessor whose component-kind() is
equal to xscd:type-alternative
.
annotation
axis contains annotation
components linked to the current component through {annotation} or
{annotations} arcs, which are the components returned
by the annotations() accessor.
anyAttribute
axis contains
wildcard components linked to the current component
through {attribute wildcard} arcs.any
axis contains
wildcard components linked to the current component
through {wildcard}, {term}, {particle}, {particles}, {content type}, or
{open content} arcs, which is the components returned by the
term() accessor whose component-kind() is equal to
xscd:wildcard
. assertion
axis contains
assertion components linked to the current component
through {assertions}, {value}, or {facets} arcs, which are those components
returned by the assertions() accessor.attributeGroup
axis contains
attribute group definition components linked to the current component through
{attribute group definitions} arcs, which are those components
returned by the component-linked() accessor whose component-kind() is equal to
xscd:attribute-group-definition
.attributeUse
axis contains attribute use components
linked to the current component through {attribute uses}.
baseType
axis contains
simple type definition and complex type definition components linked to the
current component through {base type definition} arcs.
xscd
XPointer pointer part is
an xscd
XPointer pointer part whose
pointer data is a canonical schema
component path.
xmlns
XPointer pointer part (if required) followed
by a canonicalized xscd
XPointer pointer part.
component
axis contains the transitive closure of
schema
components that are either linked to the schema description component or that
are linked to current component through default arcs. That is, it contains
the transitive
closure of the component-children() accessor, as well as
component-linked()
accessor if the schema description is the current component.
context
axis contains
complex type definition, attribute declaration, or
element declaration components linked to the current component
through {context} arcs.
currentComponent
axis contains the current component.
elided-component
axis contains complex type
definitions
linked to the current component through the {type definition} arc and the
transitive closure of all model group components linked to the current
component. That is, it contains the transitive closure of components returned
from the term() accessor whose component-kind() is equal to
xscd:model-group
, as well as components linked to the current component
through the {type definition} arc.
facet
axis contains
facet components linked to the current component
through {facets} or {fundamental facets} arcs, which is the components returned
by component-linked() whose component-kind() is equal
to xscd:facet
.
group
axis contains
model group definition components linked to the current component through
{model group definitions} arcs, which are those components returned
by the component-linked() accessor whose component-kind() is equal to
xscd:model-group-definition
.
identityConstraint
axis contains
identity constraint definition components linked to the current component
through {identity constraint definitions} arcs, which are those
components returned by the component-linked() accessor whose component-kind()
is equal to xscd:identity-constraint-definition
.
itemType
axis contains
simple type definition components linked to the
current component through {item type definition} arcs.
key
axis contains
identity constraint definition components linked to the
current component through {referenced key}
arcs.memberType
axis contains
simple type definition components linked to the
current component through {member type definitions}
arcs. model
axis contains
model group components linked to the current component
through {model group}, {term}, {particle}, {particles}, or {content type}
arcs, which are the components returned by the term() accessor
whose component-kind() is equal to xscd:model-group
.
notation
axis contains
notation declaration components linked to the current component
through {notation declarations}
arcs, which are the components returned by the component-linked() accessor
whose component-kind() is equal to xscd:notation-declaration
.particle
axis contains particle components
linked to the current component through {particles}.
primitiveType
axis contains
simple type definition components linked to the
current component through {primitive type definition}
arcs. xscd()
that uses a schema component path
as the scheme data.schemaAttribute
axis contains attribute
declaration components linked to the current component through
{attribute declaration} or {attribute declarations} arcs,
which are those components returned by the component-linked() accessor whose
component-kind() is equal to xscd:attribute-declaration
.
/
' or '//
'. Complete schema component paths always
start with either '/
' or '//
'.
schemaElement
axis contains element
declaration components linked to the current component through
{element declarations}, {term}, {particle},
{particles}, or {content type}, which are the components returned by the
term() accessor whose component-kind() is equal to
xscd:element-declaration
, together with {element declarations}.
scope
axis contains
complex type definition, attribute group definition, or
model group definition components linked to the current component
through {scope} and {parent} arcs, which are the components returned from
the component-scope() accessor.
substitutionGroup
axis contains
element declaration components linked to the current component
through {substitution group affiliation} and {substitution group affiliations}
arcs.
type
axis contains simple type definition
and complex type definition components linked to the current component through
{type definition}, {type definitions}, {content type},
or {simple type definition} arcs, which are the components
returned by the component-children() accessor whose
component-kind() is equal to either
xscd:complex-type-definition
or
xscd:simple-type-definition
.