W3C XML Schema Definition Language (XSD): Component Designators code { font-family: monospace; }
div.constraint, div.issue, div.note, div.notice { margin-left: 2em; }
li p { margin-top: 0.3em; margin-bottom: 0.3em; } div.issue {font-weight: bold; color: red} .out {text-decoration: line-through; background-color: #DB9;}
div.exampleInner pre { margin-left: 1em; margin-top: 0em; margin-bottom: 0em} div.exampleOuter {border: 4px double gray; margin: 0em; padding: 0em} div.exampleInner { background-color: #d5dee3; border-top-width: 4px; border-top-style: double; border-top-color: #d3d3d3; border-bottom-width: 4px; border-bottom-style: double; border-bottom-color: #d3d3d3; padding: 4px; margin: 0em } div.exampleWrapper { margin: 4px } div.exampleHeader { font-weight: bold; margin: 4px} This version: http://www.w3.org/TR/2010/CR-xmlschema-ref-20100119/ Latest version: http://www.w3.org/TR/xmlschema-ref/ Previous versions: http://www.w3.org/TR/2008/WD-xmlschema-ref-20081117/ http://www.w3.org/TR/2008/WD-xmlschema-ref-20080910/ http://www.w3.org/TR/2005/WD-xmlschema-ref-20050329/ http://www.w3.org/TR/2004/WD-xmlschema-ref-20040716/ http://www.w3.org/TR/2004/WD-xmlschema-ref-20040309/ http://www.w3.org/TR/2003/WD-xmlschema-ref-20030109/ Editors: Mary Holstege, Mark Logic Corporation Asir S. Vedamuthu, webMethods (until May 2005) This document is also available in these non-normative formats: XML Copyright W3C ® MIT ERCIM Keio liability trademark document use XML Schema: Component Designators defines a scheme for identifying XML Schema components as specified by XML Schema Part 1: Structures 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 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. W3C XML Schema Working Group XML Activity The Candidate Recommendation 1 March 2010 http://www.w3.org/XML/2006/01/public-bugzilla [email protected] archive 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 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 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 As resolution for issue 6451 As resolution for issue 6452 This document was produced by a group operating under the 5 February 2004 W3C Patent Policy public list of any patent disclosures Essential Claim(s) section 6 of the W3C Patent Policy 1 Introduction (Non-Normative) Goals and Use Cases (Non-Normative) Requirements Use Cases Schema Component Designators Schema Component Designator Syntax Canonical Schema Component Designators Equality of Schema Component Designators Schema Component Paths Schema Component Graph Traversal Schema Component Path Syntax Interpretation of Schema Component Paths Schema Component Path Axes Accessors Canonical Schema Component Paths Equality of Schema Component Paths Conformance Schema Component Path Conformance Schema Component Designator Conformance Extensibility Examples (Non-Normative) Extended Primer Example Additional Examples Examples with component and elided-component Axes (Non-Normative) A Schema Component Properties (Non-Normative) Summary of Component Axes (Non-Normative) Glossary (Non-Normative) References Normative References 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] Section 2.2 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 Constraining Facets Version 1.1 of the W3C XML Schema Definition Language (XSD) recommendation [XSD11_1] [XSD11_2] 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 The same expanded name Locally scoped element and attribute declarations cannot necessarily be uniquely named by an expanded name Anonymous type definitions have no expanded name expanded name 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 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 4 Schema Component Paths Basic Functionality 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 Properties of the Designator Designators should be human-readable. Given a designator, it should be possible to get the expanded name 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. Compatibility Designators should be URI references. Designators should work well in a RDDL environment. Non-goals 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. Type references 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] Identifying types for casting, specifically wrt anonymous and local types. Identifying types for function signatures. Element declaration references 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. Stand-off schema annotation 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. Miscellaneous text-based uses within schema-based tools 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 Other 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 schema designator 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] [XPTR] The schema component reference core defines reference to a schema component in the context of an assembled XML Schema. 4 Schema Component Paths 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 [ Definition absolute schema component designator schema designator relative schema component designator 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 relative schema component designator XPointer scheme xscd() schema component path scheme data XPointer xmlns() [XPTR XMLNS] 4 Schema Component Paths SchemaComponentDesignator ::= AbsoluteSchemaComponentDesignator RelativeSchemaComponentDesignator AbsoluteSchemaComponentDesignator ::= SchemaDesignator RelativeSchemaComponentDesignator SchemaDesignator ::= AnyURI AnyURI ::= Char /* IRI reference: no fragment identifier */ RelativeSchemaComponentDesignator ::= XmlnsPointerPart XscdPointerPart XmlnsPointerPart ::= 'xmlns' '(' XmlnsSchemeData XscdPointerPart ::= 'xscd' '(' SchemaComponentPath [ Definition canonical schema component designator [LEIRI] [RFC 3987] xmlns canonicalized xscd [ Definition canonicalized xscd xscd 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 schema component designators are equal 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 [ Definition arc [ Definition default arc {type definition} A Schema Component Properties (Non-Normative) 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 The schema component kinds defined in this document are contained in the namespace with the URI http://www.w3.org/2009/xmlschema-ref xscd SchemaComponentPath ::= ( SchemaStep StepSepator RelativeSchemaComponentPath ExtensionAccessor SchemaStep ::= '/' RelativeSchemaComponentPath ::= Step Step StepSeparator RelativeSchemaComponentPath StepSeparator ::= '/' | ComponentAxisSeparator ComponentAxisSeparator ::= '//' Step ::= Axis NameTest Predicate AbbrevStep AbbrevStep ::= AbbrevAttributeStep AbbrevElementStep AbbrevTypeStep AbbrevCurrentComponentStep AbbrevAttributeStep ::= '@' NameTest Predicate AbbrevElementStep ::= NameTest Predicate AbbrevTypeStep ::= '~' NameTest Predicate AbbrevCurrentComponentStep ::= '.' Predicate 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 NameTest ::= QName WildcardNameTest WildcardNameTest ::= '*' ExtensionAccessor ::= QName ExtensionAxis ::= QName 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 my /type::my:title A schema component path referring to the globally declared element whose local name is title my /schemaElement::my:title A schema component path referring to the globally declared attribute whose local name is title my /schemaAttribute::my:title A schema component path referring to the globally declared attribute group whose local name is title my /attributeGroup::my:title A schema component path referring to the pattern facet of the globally declared simple type whose local name is title 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 schema component path steps / // / // [ Definition step schema component axis schema component name test positional predicate 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 schema component name test * 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 schema component positional predicate Counting starts at 1. A path consisting of just ' / A path of the form / S1 S1 A path of the form S1 S2 S2 S1 A path of the form S1 S2 S2 S1 A path of the form S1 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 ( . my:section 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 xmlns() xmlns() Note also that the form elementFormDefault attributeFormDefault unqualified {target namespace} For example, consider the path: //quantity This path designates global or local element declarations whose local name is quantity unqualified For types, form is not relevant. /~Items//quantity This path designates global or local element declarations whose local name is quantity Items unqualified Items This path designates global or local attribute declarations whose local name is partNum Items unqualified /~Items//@partNum [ Definition axis [ Definition currentComponent CurrentComponentAxis ::= 'currentComponent' ':: [18] AbbrevCurrentComponentStep ::= '.' Predicate [ Definition annotation AnnotationAxis ::= 'annotation' '::' [ Definition schemaAttribute xscd: SchemaAttributeAxis ::= 'schemaAttribute' '::' [15] AbbrevAttributeStep ::= '@' NameTest Predicate [ Definition schemaElement xscd: SchemaElementAxis ::= 'schemaElement' '::' [16] AbbrevElementStep ::= NameTest Predicate [ Definition type xscd: xscd: TypeAxis ::= 'type' '::' [17] AbbrevTypeStep ::= '~' NameTest Predicate [ Definition attributeGroup xscd: AttributeGroupAxis ::= 'attributeGroup' '::' [ Definition group xscd: GroupAxis ::= 'group' '::' [ Definition identityConstraint xscd: IdentityConstraintAxis ::= 'identityConstraint' '::' [ Definition assertion AssertionAxis ::= 'assertion' '::' [ Definition alternative xscd: 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. AlternativeAxis ::= 'alternative' '::' [ Definition notation xscd: NotationAxis ::= 'notation' '::' [ Definition model xscd: ModelAxis ::= 'model' '::' [ Definition anyAttribute AnyAttributeAxis ::= 'anyAttribute' '::' [ Definition any xscd: AnyAxis ::= 'any' '::' [ Definition facet xscd: FacetAxis ::= 'facet' '::' [ Definition scope ScopeAxis ::= 'scope' '::' [ Definition context ContextAxis ::= 'context' '::' [ Definition substitutionGroup SubstitutionGroupAxis ::= 'substitutionGroup' '::' [ Definition baseType BaseTypeAxis ::= 'baseType' '::' [ Definition itemType ItemTypeAxis ::= 'itemType' '::' [ Definition memberType MemberTypeAxis ::= 'memberType' '::' [ Definition primitiveType PrimitiveTypeAxis ::= 'primitiveType' '::' [ Definition key KeyAxis ::= 'key' '::' [ Definition attributeUse AttributeUseAxis ::= 'attributeUse' ':: [ Definition particle ParticleAxis ::= 'particle' ':: [ Definition component ComponentAxis ::= 'component' '::' [12] ComponentAxisSeparator ::= '//' [ Definition elided-component xscd: 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 Component Result of component-kind() Attribute Declaration xscd: Element Declaration xscd: Complex Type Definition xscd: Attribute Use xscd: Attribute Group Definition xscd: Model Group Definition xscd: Model Group xscd: Particle xscd: Wildcard xscd: Identity‑Constraint Definition xscd: Type Alternative xscd: Assertion xscd: Notation Declaration xscd: Annotation xscd: Schema xscd: Simple Type Definition xscd: Constraining Facet xscd: Fundamental Facet xscd: 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 canonical schema component path 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 current schema component [ Definition target schema component [ Definition component relationship [ Definition ancestor set [ Definition base type 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 extended base type set [ Definition base facet set [ Definition the same [ Definition base attribute use set [ Definition the same (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 particle set [ Definition base particle set [ Definition 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 ( * @name p [ Definition schema component paths are equal 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() xmlns() 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] 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() 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) 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) 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" For example, the abbreviated schema component designator for the complex type definition USAddress 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 unqualified country 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 ipo Here is a path that designates an attribute declaration whose local name is period r /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 ipo /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 r /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 r //r:quantity This path designates global or local element declarations whose local name is quantity r Items r /~r:Items//r:quantity This path designates global or local attribute declarations whose local name is partNum r Items 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 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 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 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. absolute schema component designator An absolute schema component designator schema designator relative schema component designator alternative-axis The alternative xscd: ancestor set The ancestor set annotation axis The annotation anyAttribute axis The anyAttribute any axis The any xscd: arc A traversal from one component to another takes place across some particular component property. This property is the arc assertion axis The assertion attributeGroup axis The attributeGroup xscd: attributeUse axis The attributeUse axis A schema component path axis base attribute use set The base attribute use set base facet set The base facet set base particle set The base particle set baseType axis The baseType base type set The base type set canonicalized xscd XPointer pointer part A canonicalized xscd xscd canonical schema component designator A canonical schema component designator [LEIRI] [RFC 3987] xmlns canonicalized xscd canonical schema component path The canonical schema component path component axis The component component relationship The component relationship context axis The context currentComponent axis The currentComponent current schema component The current schema component default arc A default arc elided-component axis The elided-component xscd: extended base type set The extended base type set facet axis The facet xscd: group axis The group xscd: identityConstraint axis The identityConstraint xscd: itemType axis The itemType key axis The key memberType axis The memberType model axis The model xscd: notation axis The notation xscd: particle axis The particle particle set The particle set primitiveType axis The primitiveType relative schema component designator A relative schema component designator XPointer scheme xscd() schema component path scheme data same (attribute uses) Two attribute uses are the same same (facets) Two facets are the same same (particles) Two particles are the same schemaAttribute axis The schemaAttribute xscd: schema component designators are equal Two schema component designators are equal schema component paths are equal schema component name test A schema component name test schema component path A schema component path steps / // / // schema component paths are equal Two schema component paths are equal schema component positional predicate A schema component positional predicate schema designator A schema designator schemaElement axis The schemaElement xscd: scope axis The scope step A step schema component axis schema component name test positional predicate substitutionGroup axis The substitutionGroup target schema component The target schema component type axis The type xscd: xscd: Uniform Resource Identifier (URI): Generic Syntax http://www.ietf.org/rfc/rfc3986.txt XML Schema Part 2: Datatypes Second Edition http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/ http://www.w3.org/TR/xmlschema-2/ XPointer xmlns() Scheme http://www.w3.org/TR/2003/REC-xptr-xmlns-20030325/ http://www.w3.org/TR/xptr-xmlns/ Internationalized Resource Identifiers (IRIs) http://www.ietf.org/rfc/rfc3987.txt XML Schema Definition Language (XSD) 1.1 Part 1: Structures http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/ http://www.w3.org/TR/xmlschema11-1/ XPointer Framework http://www.w3.org/TR/2003/REC-xptr-framework-20030325/ http://www.w3.org/TR/xptr-framework/ XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/ http://www.w3.org/TR/xmlschema11-2/ XML Schema Part 1: Structures (Second Edition) http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/ http://www.w3.org/TR/xmlschema-1/ Legacy extended IRIs for XML resource identification http://www.w3.org/TR/2008/NOTE-leiri-20081103/ XML Schema Part 0: Primer (Second Edition) http://www.w3.org/TR/2004/REC-xmlschema-0-20041028/ http://www.w3.org/TR/xmlschema-0/ Document Object Model (DOM) Level 3 Core Specification, Version 1.0 http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ http://www.w3.org/TR/DOM-Level-3-Core/