<?xml version='1.0'?>
<?xml-stylesheet type='text/xsl' href='scdspec.xsl'?>
<!DOCTYPE spec PUBLIC
     "-//W3C//DTD Specification V2.2//EN"
     "xmlspec.dtd"
[
   <!ENTITY % versionEntities SYSTEM "versionInfo.ent">
   %versionEntities; <!-- get path and date entities -->

   <!ENTITY doc.date "&draft.day; &draft.month; &draft.year;">
   <!ENTITY w3c.doc.date "&draft.day;-&draft.month;-&draft.year;">
   <!ENTITY iso.doc.date "&draft.YY;&draft.MM;&draft.DD;">

   <!ENTITY % local.ednote.class "|var">
   <!ENTITY % local.emph.class "|code|var">
]>
<!--     "http://www.w3.org/XML/1998/06/xmlspec-v22.dtd" -->
<spec w3c-doctype="wd">
 <header>
   <title>XML Schema: Component Designators</title>
   <w3c-designation>&WD-SCDS;-&iso.doc.date;</w3c-designation>
   <w3c-doctype>W3C Working Draft</w3c-doctype>
    <pubdate>
      <day>&draft.day;</day>
      <month>&draft.month;</month>
      <year>&draft.year;</year>
    </pubdate>
   <publoc>
     <loc href="&SCDS.base;/" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">&SCDS.base;/</loc>
   </publoc>
   <altlocs>
    <loc href="scds.xml">XML</loc>
   </altlocs>
   <latestloc>
     <loc href="http://www.w3.org/TR/xmlschema-ref/" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">http://www.w3.org/TR/xmlschema-ref/</loc>
   </latestloc>
   <prevlocs>
     <loc href="http://www.w3.org/TR/2004/WD-xmlschema-ref-20040309/" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">http://www.w3.org/TR/2004/WD-xmlschema-ref-20040309/</loc>
     <loc href="http://www.w3.org/TR/2003/WD-xmlschema-ref-20030109/" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">http://www.w3.org/TR/2003/WD-xmlschema-ref-20030109/</loc>
   </prevlocs>
   <authlist>
    <author>
     <name>Mary Holstege</name>
     <affiliation>Mark Logic, Inc.</affiliation>
    </author>
    <author>
     <name>Asir S. Vedamuthu</name>
     <affiliation>webMethods</affiliation>
    </author>
   </authlist>

   <abstract>
<p>XML Schema: Component Designators defines a scheme for identifying XML
Schema components as specified by
<loc href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">XML Schema Part 1: Structures</loc> and
<loc href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">XML Schema Part 2: Datatypes</loc>.
</p>
   </abstract>
   <status>

<p><em>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 <loc href="http://www.w3.org/TR/">W3C technical reports index</loc> at
http://www.w3.org/TR/.</em></p>

<p>This is a W3C Working Draft of the XML Schema: Component Designators 
document for review by members and other interested parties. It has been
produced by the <loc href="http://www.w3.org/XML/Schema"
xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
xlink:show="replace" xlink:actuate="onRequest">W3C XML Schema Working
Group</loc> (WG) as part of the <loc href="http://www.w3.org/XML/Activity" 
xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
xlink:show="replace" xlink:actuate="onRequest">XML Activity</loc>.
It has been reviewed by the working group and the working group has agreed to
publication.
Publication as a Working Draft 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.
</p> 

<p>Comments on this document are welcome. Send them to <loc 
href="mailto:www-xml-schema-comments@w3.org" 
xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" 
xlink:show="replace"
xlink:actuate="onRequest">www-xml-schema-comments@w3.org</loc> mailing list
(archived at <loc
href="http://lists.w3.org/Archives/Public/www-xml-schema-comments/" 
xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" 
xlink:show="replace"
xlink:actuate="onRequest">http://lists.w3.org/Archives/Public/www-xml-schema
-comments/</loc>). Commenters are requested to put the string
&quot;[XSCD]&quot; at the beginning of the subject field of email
messages. Note that all  
outstanding issues against this document are documented in the Working Group
<loc href="http://www.w3.org/XML/2004/06/scds-pre-lc-issues/" 
xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" 
xlink:show="replace" xlink:actuate="onRequest">running issues 
list</loc>.</p>

<p>The following changes were made since the last working draft:</p>
<ulist>
<item>The sections were substantially reorganized to consolidate information
about schema component paths into one part, and information about schema
component designators in another.</item>
<item>Made various changes and additions to the syntax:
  <ulist>
  <item>Changed facet syntax to facet(name).</item>
  <item>Removed * syntax as abbreviation for wildcard components.</item>
  <item>Added wildcarding to paths using * syntax.</item>
  <item>Added support for optionally eliding intermediate steps.</item>
  <item>Made clear that / refers to the schema-as-a-whole component.</item>
  </ulist>
</item>
<item>Expanded allowable traversals to include &quot;upwards&quot; traversal
through {scope}, {base type definition}, and {primitive type definition}.</item>
<item>Fleshed out canonical path rules to account for:
  <ulist>
  <item>Expanded traversals</item>
  <item>Resolution of issues with respect to derivation with facets and particles</item>
  <item>Resolution of issues with respect to named attribute and model groups</item>
  </ulist>
</item>
<item>Made various clean-ups and fixes to EBNF.</item>
<item>Fixed annotation to annotations and changed semantics of annotations()
accordingly to refer to a whole set of annotations.</item>
<item>Added more examples; made extended example more accessible.</item>
<item>Added conformance section.</item>
<item>Added placeholder glossary section.</item>
<item>Removed non-normative member-only references and the historical backtrail
that went with them.</item>
<item>Clarified normative versus non-normative sections and split non-normative
references into separate section.</item>
<item>Fixed miscellaneous typos, clarifications, and other bugs.</item>
<item>Syntax, use cases, and requirements now have consensus of WG.</item>
</ulist>

<p>
This document was produced under the 
<loc href="http://www.w3.org/Consortium/Patent-Policy-20040205/"
xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" 
xlink:show="replace" xlink:actuate="onRequest">5 February 2004 W3C
Patent Policy</loc>. The Working Group maintains a 
<loc href="http://www.w3.org/2002/11/xml-schema-IPR-statements.html" 
xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" 
xlink:show="replace" xlink:actuate="onRequest" rel="disclosure">
public list of patent disclosures</loc> 
relevant to this document;
that page also includes instructions for disclosing [and excluding] a
patent. An individual who has actual knowledge of a patent which the individual
believes contains Essential Claim(s) with respect to this specification should
disclose the information in accordance with 
<loc href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure"
xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" 
xlink:show="replace" xlink:actuate="onRequest" rel="disclosure">section
6 of the W3C Patent Policy</loc>. 
</p>

   </status>
   <langusage>
     <language id="en">English</language>
   </langusage>
	<revisiondesc>
	  <p>Last Modified: $Date: 2004/07/13 22:53:01 $</p>
   </revisiondesc>
 </header>
 <body>
  <div1 id="section-introduction">
    <head>Introduction (Non-Normative)</head>
<p>This document defines a system for designating XML Schema components. Part 1
of the W3C XML Schema recommendation <bibref ref="xsd1"/> defines these
schema components. Section 2.2 lays out the inventory of schema components into
three classes:
</p>
<ulist>
<item><p>Primary components: simple and complex type definitions, attribute
declarations, and element declarations</p></item>
<item><p>Secondary components: attribute and model group definitions,
identity-constraint definitions, and notation declarations</p></item>
<item><p>"Helper" components: annotations, model groups, particles, wildcards, and
attribute uses</p></item>
</ulist>
<p>In addition there is a master schema component, the schema component
representing the schema as a whole.
</p>
<p>Finally, there are schema components for the facets defined in Part 2 of the
W3C XML Schema recommendation <bibref ref="xsd2"/>:</p>
<ulist>
<item><p>Fundamental Facets: ordered, bounded, cardinality, numeric</p></item>
<item><p>Constraining Facets: whiteSpace, minInclusive, maxInclusive, minExclusive,
    maxExclusive, totalDigits, fractionDigits, length, minLength, maxLength,
    pattern, enumeration
</p></item>
</ulist>

<p>At first blush, a QName (prefix:localname) may seem sufficient to the
task of designating any schema component. This is incorrect for various
reasons:
</p>
<olist>
<item><p>A QName is only meaningful in the context of particular namespace bindings
so that the QName can be resolved to a particular extended name, or {namespace
name, local name} pair.
</p></item>
<item><p>The same extended 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.
</p></item>
<item><p>Locally scoped element and attribute declarations cannot be uniquely named
by an extended name.
</p></item>
<item><p>Anonymous type definitions have no extended name, or they have an extended
name that is dependent upon the particular schema processor interpreting the
schema.
</p></item>
<item><p>Certain schema components (annotation,
particle, wildcard) are purely subordinate to some other schema component, and
have no name of their own.</p></item>
<item><p>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).
</p></item>
<item><p>The schema-as-a-whole schema component has no name at all.</p></item>
<item><p>The redefinition schema composition feature creates the situation where
there are two variants of the 'same' schema component, both with the same name,
one of which is derived from the other. If it is necessary to be able to name
the base component, the same name cannot be used for both.</p></item>
</olist>

<p>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:
</p>
<olist>
<item><p>Designators must either include full extended names, or define
namespace bindings.</p></item>
<item><p>Designators must distinguish named components in
different symbol spaces from one another.</p></item>
<item><p>Designators must provide a means of distinguishing locally scoped
element and attribute declarations with the same name.</p></item>
<item><p>Designators must provide for any designatable unnamed components, such
as anonymous type definitions, wildcards, and the schema-as-a-whole
component.</p></item>
<item><p>Designators must function in the face of redefinitions.</p></item>
</olist>

<p>The schema-as-a-whole 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-as-a-whole, particularly if that designator is expected to serve as a
starting point for the other components encompassed by that schema.
</p>
<p>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.</p>
  </div1>
  <div1 id="section-goals">
    <head>Goals and Use Cases (Non-Normative)</head>
    <div2 id="section-requirements">
      <head>Candidate Requirements</head>
<glist>
<gitem>
<label>Basic Functionality</label>
<def>
<olist>
  <item><p>
  Designators should be unambiguous, designating exactly one component
  within a schema. However, certain abbreviation and wildcarding constructs may
  designate collections of components. In any case, each component should have
  at least one unambiguous designator that designates that component and no
  other.</p></item>
  <item><p>It should be possible to designate any schema component within a
  schema. However, some exceptions will be made for certain of the helper
  components.
  </p></item>
  <item><p>Designators should provide (or assure) a URI for the unique identification of a schema.
  </p></item>
  <item><p>If there is more than one designator for a construct, there should be
  exactly one canonical form of the designator.</p></item>
</olist>
</def>
</gitem>
<gitem>
<label>Properties of the Designator</label>
<def>
<olist>
  <item><p>Designators should be human-readable.</p></item>
  <item><p>Given a designator, it should be possible to get the extended name for the
  designated component, if one exists for that component.
  </p></item>
  <item><p>It should be possible to algorithmically and consistently generate
  the canonical designator for each component, either against an assembled
  schema or as the schema is assembled.</p></item>
  <item><p>Designators should be parsable with compositional semantics (or, in
other words, they should have <emph>expressive notation</emph>).</p></item>
  <item><p>There should be a formal specification of what constitutes a legal designator.</p></item>
</olist>
</def>
</gitem>
<gitem>
<label>Compatibility</label>
<def>
<olist>
  <item><p>Designators should be URI references.</p></item>
  <item><p>Designators should work well in a RDDL environment.</p></item>
</olist>
</def>
</gitem>
<gitem>
<label>Non-goals</label>
<def>
<olist>
  <item><p>It is not a requirement to designate particle components as distinct
  from terms.</p>
  </item>
  <item><p>It is not a requirement to tie schema component validity to
  namespace validity.</p></item>
  <item><p>It is not a requirement that it be possible to
construct designators to refer to arbitrary schema components without any
knowledge of schema internals.</p></item>
  <item><p>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.</p></item>
  <item><p>It is not a requirement 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.
  </p></item>
</olist>
</def>
</gitem>
</glist>
    </div2>
    <div2 id="section-usecases">
      <head>Use Cases</head>

<glist>
<gitem><label>Type references</label>
<def>
<p>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.</p>
<ulist>
  <item><p>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:
  </p>
  <ulist>
  <item><p>Naming the type of something that has been selected, as in XQuery,
  XPath 2.0, or XSLT 2.0</p></item>
  <item><p>For use wherever types are named, for example to specify a type in
  an XPath 2.0 or XQuery expression. e,g. element-of(type-t)</p></item>
  <item><p>Enabling DOM3 to expose anonymous types</p></item>
  </ulist>
  </item>
  <item><p>Identifying types for TREAT AS (in Query) specifically wrt anonymous
  and local types.</p></item>
  <item><p>Identifying types for function signatures for XQuery, XSLT 2.0 and
  related specifications.
  </p></item>
</ulist>
</def>
</gitem>
<gitem><label>Element declaration references</label>
<def>
<p>These use cases benefit from being able to refer to any element declaration.
</p>
<ulist>
  <item><p>Naming an element declaration which is matched by an arbitrary
  expression. e.g. Given XPath /one/two/foo, naming that it only matches local
  element 'foo'.</p></item>
</ulist>
</def>
</gitem>
<gitem><label>Stand-off Schema Annotation</label>
<def>
<p>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.
</p>
<ulist>
  <item><p>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 a local element with an anonymous types. 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 separately
refer to particles versus groups is important. Being able to separately refer
to attribute and element uses versus attribute and element declarations may be
important.
</p></item>
  <item><p>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.
  </p></item>
  <item><p>Commentary on schemas, such as best practices documents, reviews and
  comparisons of particular schemas, and so on.
  </p></item>
  <item><p>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.
</p></item>
</ulist>
</def>
</gitem>
<gitem><label>Miscellaneous text-based uses within schema-based tools</label>
<def>
<p>Having a simple textual way to refer to the abstract components of a schema
enables certain kinds of text-based schema-related processing.</p>
<ulist>
  <item><p>A tool that creates interlinked HTML pages describing a schema.</p></item>
  <item><p>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.
  </p></item>
  <item><p>String-based comparisons of processors generally, making it
  possible, for example, to ask and
  answer the question &quot;Did two validations of the same document on
  different machines use the same type for a given element?&quot;
   </p></item>
      <item><p>input/output</p></item>
      <item><p>user reports</p></item>
      <item><p>glue/interfaces among</p></item>
</ulist>
</def>
</gitem>
<gitem><label>Other</label>
<def>
<ulist>
  <item><p>Simple selection queries, such as &quot;the type that is the base
  type of X&quot; without knowledge of its name.</p></item>
  <item><p>Creation or initial drafting of a new schema or schema document by
  selecting components from existing schema.
  </p></item>
  <item><p>RDF assertions about types, etc.</p></item>
  <item><p>
Formal description requires unique identifier for each declaration and
definition component used within the context of the validation episode.
  </p></item>
  <item><p>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.</p></item>
</ulist>
</def>
</gitem>
</glist>
    </div2>
  </div1>

  <div1 id="section-scds">
     <head>Schema Component Designators</head>

<p>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. Full blown schema designators build on this by
applying the schema component paths in the context of a URI reference, where
the URI identifies the schema, and the fragment part encapsulates a schema
component path to designate components in the context of that schema.
</p>
<p>This section describes schema component designators as a whole. The details
of schema component paths are described in <specref ref="section-path"/>.</p>
<p><termdef id="key-sd" term="schema designator">A <term>schema
designator</term> is a single URI for a resource representing an
assembled schema.</termdef>
</p>
<p>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.
</p>
<p>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.
</p>
<note>The representation of a resource obtained by dereferencing a schema URI
must allow for the fragment identifier syntax defined here. The
representation of the resource either needs to be an XML encoding to fit with
the
<xspecref href="http://www.w3.org/TR/xptr-xmlns/#NT-XmlnsSchemeData">XPointer
</xspecref> framework, or its definition needs to explicitly entail a
compatible fragment identifier syntax.
</note>
<p>The schema component reference core defines reference to a schema component
in the context of an assembled XML Schema. <specref ref="section-path"/>
defines this
relationship between an assemblage of schema components and component paths.
Schema assembly is described in
<xspecref href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#composition">Section
4 of XML Schema Part 1: Structures</xspecref>.
</p>
<p>For the purposes of component paths, a missing component cannot be used to
construct a valid path; nor can a schema component be successfully referenced
through a path that references a missing component.
</p>

<p><termdef id="key-scd" term="absolute schema component designator">An
<term>absolute schema component designator</term> consists of two parts: a designator
for the assembled schema (a <termref def="key-sd">schema designator</termref>), and a designator for a
particular schema component or schema components relative (a <termref def="key-relative-scd">relative
schema component designator</termref>) to that assembled schema.</termdef>
</p>
<p>Syntactically, the first part is a URI, and the second part
is an XPointer fragment identifier. An absolute schema component designator
therefore is a URI reference.
</p>
<p><termdef id="key-relative-scd" term="relative schema component designator">The
    <term>relative schema component designator</term> is an <xspecref
    href="http://www.w3.org/TR/xptr-framework/#scheme">XPointer scheme</xspecref>
    <code> xscd()</code> that uses a <termref def="key-scp">schema component path</termref>
    as the <xspecref
    href="http://www.w3.org/TR/xptr-framework/#NT-SchemeData">scheme data</xspecref>.</termdef>  This
    XPointer scheme may be used in combination with the
    <xspecref href="http://www.w3.org/TR/xptr-xmlns/#NT-XmlnsSchemeData">XPointer
    <code>xmlns()</code> scheme</xspecref>. It must not be used in
    combination with other XPointer schemes.
 The construction and syntax of schema component paths are described in
    <specref ref="section-path"/>.
 </p>

<div2 id="section-scd-syntax">
      <head>Schema Component Designator Syntax</head>
<scrap lang="ebnf">
<head>EBNF</head>

<prod id="NT-SchemaComponentDesignator">
    <lhs>SchemaComponentDesignator</lhs>
    <rhs><nt def="NT-AbsoluteSchemaComponentDesignator">AbsoluteSchemaComponentDesignator</nt> |
        <nt def="NT-RelativeSchemaComponentDesignator">
            RelativeSchemaComponentDesignator</nt></rhs>
</prod>

<prod id="NT-AbsoluteSchemaComponentDesignator">
    <lhs>AbsoluteSchemaComponentDesignator</lhs>
    <rhs><nt def="NT-SchemaDesignator">SchemaDesignator</nt> '#'
        <nt def="NT-RelativeSchemaComponentDesignator">
            RelativeSchemaComponentDesignator</nt></rhs>
</prod>

<prod id="NT-SchemaDesignator">
    <lhs>SchemaDesignator</lhs>
    <rhs><xnt href="http://www.ietf.org/rfc/rfc2396.txt">URI</xnt></rhs>
</prod>

<prod id="NT-RelativeSchemaComponentDesignator">
   <lhs>RelativeSchemaComponentDesignator</lhs>
   <rhs><nt def="NT-XmlnsPointerPart">XmlnsPointerPart</nt>*
        <nt def="NT-XscdPointerPart">XscdPointerPart</nt>
   </rhs>
</prod>

<prod id="NT-XmlnsPointerPart">
    <lhs>XmlnsPointerPart</lhs>
    <rhs>
    'xmlns' '(' <xnt href="http://www.w3.org/TR/xptr-xmlns/#NT-XmlnsSchemeData">XmlnsSchemeData</xnt> ')'
    </rhs>
</prod>

<prod id="NT-XscdPointerPart">
   <lhs>XscdPointerPart</lhs>
   <rhs>'xscd' '(' <nt def="NT-SchemaComponentPath">SchemaComponentPath</nt> ')'
   </rhs>
</prod>
</scrap>
    </div2>

<div2 id="section-canonical">
    <head>Canonical Schema Component Designators</head>
<p><termdef id="key-canonical-scd" term="canonical schema component designator">
A <term>canonical schema component designator</term>
is an absolute schema component designator that is a URI
that has been canonicalized according to the rules given in the
<loc href="http://gbiv.com/protocols/uri/rev-2002/rfc2396bis.html#canonical-form" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">update to RFC2396</loc>
and where the relative schema component designator consists of an <code>xmlns</code>
XPointer pointer part (if required) followed
by a <termref def="key-canonicalized-xscd">canonicalized <code>xscd</code> XPointer pointer part</termref>.
</termdef></p>
<p>
<termdef id="key-canonicalized-xscd">
A <term>canonicalized <code>xscd</code> XPointer pointer part</term> is
  an <code>xscd</code> XPointer pointer part where the pointer data is a canonical schema
component path.
</termdef>
</p>
</div2>
<div2 id="section-equality">
    <head>Equality of Schema Component Designators</head>
<p>Many use cases for schema component designators call for them to be compared
for equality. A simple string comparison cannot be used with this scheme
because namespace prefixes may vary. However, comparison is still
straightforward.
</p>
<p><termdef id="key-equal-scd" term="schema component designators are equal">Two
<term>schema component designators are equal</term> if they are absolute
and their URIs are equal or if they are relative to the
same schema, and their <termref def="key-equal-path">schema component paths are
equal</termref>.</termdef>
</p>
</div2>
  </div1>
  <div1 id="section-path">
    <head>Schema Component Paths</head>
<p>An assembled schema forms a graph of schema components, where certain schema
component properties contain other schema components as their values (or part
of their values). Schema component paths can be regarded as being
constructed step-by-step by traversing the schema component properties,
starting at the schema-as-a-whole schema component. Within this graph there may
be more than one path to a particular schema component. This section describes
the general procedure for traversing the graph and constructing paths, and then
defines which path is the canonical one.
</p>
<p>For the purposes of schema component paths, presume the
existence of an {identity constraint definitions} property of
the schema-as-a-whole component whose value is the union of all identity
constraint components in the assembled schema.
Future revisions of the XML Schema specification may define this property.
</p>

<p><termdef id="key-scp" term="schema component path">A
<term>schema component path</term> is a series of
<termref def="key-scp-step">[step]</termref> pieces, each of which corresponds to a particular schema
component along the path from the schema-as-a-whole schema component.</termdef>
Each step has a concrete syntactic representation, which is
described in <specref ref="section-path-syntax"/>.
</p>
<p>
<termdef id="key-scp-step" term="[step]">A <term>[step]</term> represents a schema
component along the path from the schema-as-a-whole schema component. Each [step] has a possibly empty [target namespace], a possibly
empty [name], and possible empty [predicate], and a [schema component
kind].</termdef> The values for these properties are defined for specific schema
components, below, but in general
the [target namespace] will have the same value as the {target
namespace} property of the schema component and the [name] will have the value
as the {name} property of the schema component. The value of [schema component
kind] is a label for the kind of schema component involved. The [predicate] is
used to select schema components that have no name to distinguish them
or where the name does not suffice to distinguish them, such as instances of
element declarations within a term.
</p>
    <div2 id="section-path-traversal">
      <head>Schema Component Graph Traversal</head>

<p>An assembled schema consists of a graph of schema components. The following
schema component properties have as their values (or a part of their values)
other schema components, thus creating the links in the graph which may be
traversed to construct a schema component path.
</p>
<p>Traversal through the schema component graph occurs through any of the
properties by taking a member of one of these lists as the basis for the next
[step]:
</p>
<slist>
   <sitem>{type definitions}</sitem>
   <sitem>{attribute declarations}</sitem>
   <sitem>{element declarations}</sitem>
   <sitem>{attribute group definitions}</sitem>
   <sitem>{model group definitions}</sitem>
   <sitem>{notation declarations}</sitem>
   <sitem>{identity constraint definitions}</sitem>
   <sitem>{facets}</sitem>
   <sitem>{fundamental facets}</sitem>
   <sitem>{member type definitions}</sitem>
   <sitem>{attribute uses}</sitem>
   <sitem>{particles}</sitem>
</slist>
<p>Traversal through the schema component graph occurs through any of the
following properties by taking that schema component as
the basis for the next [step].</p>
<slist>
   <sitem>{type definition}</sitem>
   <sitem>{item type definition}</sitem>
   <sitem>{attribute wildcard}</sitem>
   <sitem>{model group}</sitem>
   <sitem>{attribute declaration}</sitem>
   <sitem>{term}</sitem>
   <sitem>{base type definition}</sitem>
   <sitem>{primitive type definition}</sitem>
   <sitem>{substitution group affiliation}</sitem>
   <sitem>{referenced key}</sitem>
</slist>
<p>Traversal through the schema component graph occurs to the following
properties, but in a somewhat special way, as referring to a collection of
annotations as a group, rather than to an individual annotation component.
This is because we cannot distinguish between individual annotations.
</p>
<slist>
   <sitem>{annotations}</sitem>
   <sitem>{annotation}</sitem>
</slist>
<p>Traversal through the schema component graph occurs through the following
properties, but in different ways depending on what kind of value it has:
</p>
<slist>
   <sitem>{content type}</sitem>
   <sitem>{scope}</sitem>
</slist>
<p>Traversal will proceed through the particle of the {content type} property
if a content model is present, or through the {content type} property directly
if it is a simple type definition. Traversal will proceed through the {scope}
property unless it has the value &quot;global&quot;.
</p>
    </div2>
    <div2 id="section-path-syntax">
      <head>Schema Component Path Syntax</head>
<p>In general the syntax of a step of the schema component path has the
following form: </p>
<eg role="syntax"><code><var>[schema component kind]</var>([<var>ns-prefix</var>:<var>[name]</var>])[<var>[predicate]</var>]</code>
</eg>
<p>where <code><var>ns-prefix</var></code> is bound to <code><var>[target namespace]</var></code>.
In the context of schema component designators the namespace prefixes will
be bound via the <code>xmlns</code> XPointer scheme; in the context of an XML
document the namespace prefixes will be bound in the conventional way (using the
  [in-scope namespaces] of the element information item); other
host languages (such as XQuery) will define their own namespace binding rules.
</p>
<p>
The syntax provides various abbreviations as defined below.
</p>
<p>Steps in the path are separated by a slash:</p>
<eg role="syntax"><code>/</code></eg>
<p>except in the case of the schema-as-a-whole component, which is represented
by a bare slash already, so no additional separator is necessary.</p>
      <div3 id="schema-component">
        <head>Schema-as-a-whole Component</head>
<p>The [step] for the schema-as-a-whole schema component has the
properties:</p>
<table border="0" cellspacing="5" summary="Schema-as-a-whole Designator Model">
<tbody>
<tr><td valign="top">[target&nbsp;namespace]</td><td valign="top"></td></tr>
<tr><td valign="top">[name]</td><td valign="top"></td></tr>
<tr><td valign="top">[schema&nbsp;component&nbsp;kind]</td><td valign="top"><code>schema</code></td></tr>
<tr><td valign="top">[predicate]</td><td valign="top"></td></tr>
</tbody>
</table>

<eg role="syntax"><code>/</code></eg>
      </div3>
      <div3 id="attr-decl-component">
        <head>Attribute Declaration</head>
<p>The [step] for an attribute declaration schema component has
the properties:</p>

<table border="0" cellspacing="5" summary="Attribute declaration designator model">
<tbody>
<tr><td valign="top">[target&nbsp;namespace]</td><td valign="top">Value of {target namespace}</td></tr>
<tr><td valign="top">[name]</td><td valign="top">Value of {name}</td></tr>
<tr><td valign="top">[schema&nbsp;component&nbsp;kind]</td><td valign="top"><code>attribute</code></td></tr>
<tr><td valign="top">[predicate]</td><td valign="top"></td></tr>
</tbody>
</table>


<eg role="syntax"><code>attribute(<var>prefix:name</var>)</code> or <code>@<var>prefix:name</var></code></eg>
      </div3>
      <div3 id="elt-decl-component">
        <head>Element Declaration</head>

<p>The [step] for an element declaration schema component has
the properties:</p>

<table border="0" cellspacing="5" summary="Element declaration designator model">
<tbody>
<tr><td valign="top">[target&nbsp;namespace]</td><td valign="top">Value of {target namespace}</td></tr>
<tr><td valign="top">[name]</td><td valign="top">Value of {name}</td></tr>
<tr><td valign="top">[schema&nbsp;component&nbsp;kind]</td><td valign="top"><code>element</code></td></tr>
<tr><td valign="top">[predicate]</td><td valign="top">None if the {scope} is <code>global</code>. Otherwise, the
pair <code>{position,&nbsp;<var>n</var>}</code> where <code><var>n</var></code> is the position
of the element declaration among other element declarations with the same
{target namespace} and {name} property values among the {particles} in
the superordinate model group.</td></tr>
</tbody>
</table>


<eg role="syntax"><code>element(<var>prefix:name</var>)[<var>n</var>]</code> or
<code><var>prefix:name</var>[<var>n</var>]</code> where
the <code>[<var>n</var>]</code> will be absent if the {scope} of
the
element declaration is <code>global</code> and may be absent if the value of
<code><var>n</var></code> is 1.</eg>
      </div3>
      <div3 id="simple-type-def-component">
        <head>Simple Type Definition</head>

<p>The [step] for a simple type definition schema component has
the properties:</p>

<table border="0" cellspacing="5" summary="Simple type definition designator model">
<tbody>
<tr><td valign="top">[target&nbsp;namespace]</td><td valign="top">Value of {target namespace}</td></tr>
<tr><td valign="top">[name]</td><td valign="top">Value of {name}</td></tr>
<tr><td valign="top">[schema&nbsp;component&nbsp;kind]</td><td valign="top"><code>simpleType</code></td></tr>
<tr><td valign="top">[predicate]</td>
<td valign="top">If the superordinate component is a simple type schema component (call it S)
and  S's {variety} property is <code>union</code>, the pair
{position,&nbsp;<var>n</var>} where <code><var>n</var></code> is the
position of this simple type definition among S's {member type definitions}</td></tr>
</tbody>
</table>

<eg role="syntax"><code>type(<var>prefix:name</var>)[<var>n</var>]</code>
where <code><var>prefix:name</var></code> will be empty for anonymous types.
The <code>[<var>n</var>]</code> will be absent if the {variety} of the
S is not <code>union</code> and may be absent if the value of
<code><var>n</var></code> is 1.</eg>
      </div3>
      <div3 id="complex-type-def-component">
        <head>Complex Type Definition</head>


<p>The [step] for a complex type definition schema component has
the properties:</p>

<table border="0" cellspacing="5" summary="Complex type definition designator model">
<tbody>
<tr><td valign="top">[target&nbsp;namespace]</td><td valign="top">Value of {target namespace}</td></tr>
<tr><td valign="top">[name]</td><td valign="top">Value of {name}</td></tr>
<tr><td valign="top">[schema&nbsp;component&nbsp;kind]</td><td valign="top"><code>complexType</code></td></tr>
<tr><td valign="top">[predicate]</td><td valign="top"></td></tr>
</tbody>
</table>

<eg role="syntax"><code>type(<var>prefix:name</var>)</code> where
<code><var>prefix:name</var></code> will be empty for anonymous types.</eg>
      </div3>
      <div3 id="attr-group-def-component">
        <head>Attribute Group Definition</head>


<p>The [step] for an attribute group definition schema
component has the properties:</p>

<table border="0" cellspacing="5" summary="Attribute group definition
designator model">
<tbody>
<tr><td valign="top">[target&nbsp;namespace]</td><td valign="top">Value of {target namespace}</td></tr>
<tr><td valign="top">[name]</td><td valign="top">Value of {name}</td></tr>
<tr><td valign="top">[schema&nbsp;component&nbsp;kind]</td><td valign="top"><code>attributeGroup</code></td></tr>
<tr><td valign="top">[predicate]</td><td valign="top"></td></tr>
</tbody>
</table>

<eg role="syntax"><code>attributeGroup(<var>prefix:name</var>)</code></eg>
      </div3>
      <div3 id="model-group-def-component">
        <head>Model Group Definition</head>

<p>The [step] for a model group definition schema
component has the properties:</p>

<table border="0" cellspacing="5" summary="Model group definition designator model">
<tbody>
<tr><td valign="top">[target&nbsp;namespace]</td><td valign="top">Value of {target namespace}</td></tr>
<tr><td valign="top">[name]</td><td valign="top">Value of {name}</td></tr>
<tr><td valign="top">[schema&nbsp;component&nbsp;kind]</td><td valign="top"><code>group</code></td></tr>
<tr><td valign="top">[predicate]</td><td valign="top"></td></tr>
</tbody>
</table>

<eg role="syntax"><code>group(<var>prefix:name</var>)</code></eg>
      </div3>
      <div3 id="identity-constraint-def-component">
        <head>Identity-constraint definition</head>


<p>The [step] for an identity-constraint definition schema
component has the properties:</p>

<table border="0" cellspacing="5" summary="Identity-constraint definition designator model">
<tbody>
<tr><td valign="top">[target&nbsp;namespace]</td><td valign="top">Value of {target namespace}</td></tr>
<tr><td valign="top">[name]</td><td valign="top">Value of {name}</td></tr>
<tr><td valign="top">[schema&nbsp;component&nbsp;kind]</td><td valign="top"><code>identityConstraint</code></td></tr>
<tr><td valign="top">[predicate]</td><td valign="top"></td></tr>
</tbody>
</table>

<eg role="syntax"><code>identityConstraint(<var>prefix:name</var>)</code></eg>
      </div3>
      <div3 id="notation-decl-component">
        <head>Notation declaration</head>

<p>The [step] for a notation declaration schema
component has the properties:</p>

<table border="0" cellspacing="5" summary="Notation declaration designator model">
<tbody>
<tr><td valign="top">[target&nbsp;namespace]</td><td valign="top">Value of {target namespace}</td></tr>
<tr><td valign="top">[name]</td><td valign="top">Value of {name}</td></tr>
<tr><td valign="top">[schema&nbsp;component&nbsp;kind]</td><td valign="top"><code>notation</code></td></tr>
<tr><td valign="top">[predicate]</td><td valign="top"></td></tr>
</tbody>
</table>

<eg role="syntax"><code>notation(<var>prefix:name</var>)</code></eg>
      </div3>
      <div3 id="annotation-component">
        <head>Annotations</head>

<p>Annotation components are referenced as a collection. If the [step]
derives from an {annotations} property, the collection is the collection of all
the annotations given in that property. If the [step] derives from an
{annotation} property, the collection is the collection with just that
annotation in it.
</p>
<p>The [step] for an annotation schema
component has the properties:</p>

<table border="0" cellspacing="5" summary="Annotation designator model">
<tbody>
<tr><td valign="top">[target&nbsp;namespace]</td><td valign="top"></td></tr>
<tr><td valign="top">[name]</td><td valign="top"></td></tr>
<tr><td valign="top">[schema&nbsp;component&nbsp;kind]</td><td valign="top"><code>annotations</code></td></tr>
<tr><td valign="top">[predicate]</td><td valign="top">
</td></tr>
</tbody>
</table>

<eg role="syntax"><code>annotations()</code></eg>
      </div3>
      <div3 id="model-group-component">
        <head>Model Group</head>

<p>The [step] for a model group schema
component has the properties:</p>

<table border="0" cellspacing="5" summary="Model group designator model">
<tbody>
<tr><td valign="top">[target&nbsp;namespace]</td><td valign="top"></td></tr>
<tr><td valign="top">[name]</td><td valign="top"></td></tr>
<tr><td valign="top">[schema&nbsp;component&nbsp;kind]</td><td valign="top">The value of the {compositor} property,
one of <code>sequence</code>, <code>choice</code>, or <code>all</code></td></tr>
<tr><td valign="top">[predicate]</td>
<td valign="top">The pair <code>{position,&nbsp;<var>n</var>}</code> where
<code><var>n</var></code> is the position of the model group with respect to other model
groups among {particles} with the same {compositor} property value if this
model group is one particle of a superordinate
model group.</td></tr>
</tbody>
</table>

<eg role="syntax"><code>sequence()[<var>n</var>]</code>
or <code>choice()[<var>n</var>]</code>
or <code>all()[<var>n</var>]</code>
where the <code>[<var>n</var>]</code> may be absent if the value of
<code><var>n</var></code> is 1 (as it always is for the <code>all</code> compositor).</eg>
      </div3>
      <div3 id="particle-component">
        <head>Particle</head>
<p>Particle schema components are skipped over in the traversal through the graph, do not contribute
a step, and have no reflection in the path syntax.
</p>
      </div3>
      <div3 id="wildcard-component">
        <head>Wildcard</head>

<p>The [step] for a wildcard schema
component has the properties:</p>

<table border="0" cellspacing="5" summary="Wildcard designator model">
<tbody>
<tr><td valign="top">[target&nbsp;namespace]</td><td valign="top"></td></tr>
<tr><td valign="top">[name]</td><td valign="top"></td></tr>
<tr><td valign="top">[schema&nbsp;component&nbsp;kind]</td><td valign="top">If the wildcard is the {term} of some
particle, then <code>any</code>, otherwise <code>anyAttribute</code></td></tr>
<tr><td valign="top">[predicate]</td><td valign="top">If the [schema&nbsp;component&nbsp;kind] is <code>any</code>,
the pair <code>{position,&nbsp;<var>n</var>}</code> where
<code><var>n</var></code> is the position of the wildcard with respect to other wildcards
among {particles} of the superordinate model group.
</td></tr>
</tbody>
</table>

<eg role="syntax"><code>any()[<var>n</var>]</code>
or <code>anyAttribute()</code>
where the <code>[<var>n</var>]</code> may be absent if the value of
<code><var>n</var></code> is 1.</eg>
      </div3>
      <div3 id="attr-use-component">
        <head>Attribute Use</head>

<p>Attribute use schema components are skipped over in the traversal through the graph, do not contribute
a step, and have no reflection in the path syntax.
</p>
      </div3>
      <div3 id="fundamental-facet-components">
        <head>Fundamental Facets</head>
<p>The [step] for a fundamental facet schema
component has the properties:</p>

<table border="0" cellspacing="5" summary="Fundamental facet designator model">
<tbody>
<tr><td valign="top">[target&nbsp;namespace]</td><td valign="top"></td></tr>
<tr><td valign="top">[name]</td><td valign="top">The facet name, one of <code>ordered</code>,
<code>bounded</code>, <code>cardinality</code>, or <code>numeric</code></td></tr>
<tr><td valign="top">[schema&nbsp;component&nbsp;kind]</td><td valign="top"><code>facet</code></td></tr>
<tr><td valign="top">[predicate]</td><td valign="top"></td></tr>
</tbody>
</table>

<eg role="syntax"><code>facet(<var>name</var>)</code></eg>
      </div3>
      <div3 id="constraining-facet-components">
        <head>Constraining Facets</head>

<p>The [step] for a constraining facet schema
component has the properties:</p>

<table border="0" cellspacing="5" summary="Constraining facet designator model">
<tbody>
<tr><td valign="top">[target&nbsp;namespace]</td><td valign="top"></td></tr>
<tr><td valign="top">[name]</td><td valign="top">The facet name, one of <code>whiteSpace</code> or <code>minInclusive</code> or <code>maxInclusive</code> or <code>minExclusive</code> or <code>maxExclusive</code> or <code>totalDigits</code> or <code>fractionDigits</code> or <code>length</code> or <code>minLength</code> or <code>maxLength</code> or <code>pattern</code> or <code>enumeration</code></td></tr>
<tr><td valign="top">[schema&nbsp;component&nbsp;kind]</td><td valign="top"><code>facet</code></td>
</tr>
<tr><td valign="top">[predicate]</td><td valign="top"></td></tr>
</tbody>
</table>

<eg role="syntax">
<code>facet(<var>name</var>)</code></eg>
      </div3>
      <div3 id="section-path-examples">
         <head>Examples of Schema Component Paths (Non-Normative)</head>
<p>The following examples assume the namespace prefixes have been properly
bound.</p>

<p>A schema component path referring to the type (either simple or complex)
whose local name is <code>title</code> and which is in the namespace denoted by
the prefix <code>my</code>:</p>
<eg>/type(my:title)</eg>
<p>A schema component path referring to the globally declared element whose
local name is <code>title</code> and which is in the namespace denoted by the
prefix <code>my</code>:</p>
<eg>/element(my:title)</eg>
<p>A schema component path referring to the globally declared attribute whose
local name is <code>title</code> and which is in the namespace denoted by the
prefix <code>my</code>:</p>
<eg>/attribute(my:title)</eg>
<p>A schema component path referring to the globally declared attribute group
whose local name is <code>title</code> and which is in the namespace denoted by
the prefix <code>my</code>:</p>
<eg>/attributeGroup(my:title)</eg>
<p>A schema component path referring to the pattern facet of the globally
declared simple type whose local name is <code>title</code> which is in the
namespace denoted by <code>my</code>:
</p>
<eg>/type(my:title)/facet(pattern)</eg>
<p>Given this schema fragment for a schema whose target namespace is denoted by
the prefix <code>my</code>:</p>
<eg xml:space="preserve">
&lt;xs:complexType name="articleType">
   &lt;xs:sequence>
      &lt;xs:element ref="my:section"/>
      &lt;xs:element name="appendix" type="my:sectionType"/>
   &lt;/xs:sequence>
&lt;/xs:complexType>

&lt;xs:element name="chapter">
   &lt;xs:complexType>
      &lt;xs:sequence>
         &lt;xs:element ref="my:title" minOccurs="0" maxOccurs="unbounded"/>
         &lt;xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
      &lt;/xs:sequence>
      &lt;xs:attribute name="name" type="xs:string"/>
      &lt;xs:anyAttribute namespace="##other" use="optional"/>
   &lt;/xs:complexType>
&lt;/xs:element>
</eg>
<p>The following schema component path refers to the first element of the named
complex type:</p>
<eg>/type(my:articleType)/sequence()/element(my:section)</eg>
<p>And the following schema component path refers to the second:</p>
<eg>/type(my:articleType)/sequence()/element(my:appendix)</eg>
<p>A schema component path referring to the (anonymous) complex type of the
globally defined element:</p>
<eg>/element(my:chapter)/type()</eg>
<p>A schema component path that refers to the wildcard in the globally defined
element:</p>
<eg>/element(my:chapter)/type()/sequence()/any()</eg>
<p>A schema component path that refers to the attribute of the globally defined
element:</p>
<eg>/element(my:chapter)/type()/attribute(name)</eg>
      </div3>

<div3 id="optional-intermediate-steps">
 <head>Optional Intermediate Steps</head>
  <p>An intermediate step is a [step] piece that is neither the first step nor
  the last step in a schema component path. There are intermediate steps that correspond to
    complex type, model group and other components.</p>

  <p>The following three types of intermediate step sequences are optional in the
  schema component path syntax:</p>

  <olist>
  <item>An intermediate step that corresponds to a complex type component.</item>

  <item>A series of intermediate model group steps. This series begin and end with a
  model group step and contain all the consecutive model group steps. Where,
  model group step is a step that corresponds to model group component.</item>

  <item>A combination of the above two intermediate step sequences in that order.</item>
  </olist>
  <div4 id="examples-optional-intermediate-steps">
  <head>Examples of Optional Intermediate Steps (Non-Normative)</head>

<p><code>/r:purchaseReport/type()/@period</code> designates an
 attribute declaration whose local name is
  <code>period</code> in an anonymous complex type. Omitting its optional
  intermediate step sequence, this path reduces to
  <code>/r:purchaseReport/@period</code>.</p>

<p><code>/type(ipo:USAddress)/sequence()/sequence()[1]/name</code>
designates an attribute declaration whose local name is
 <code>name</code> in a globally defined type. Omitting its
 optional intermediate step sequence, this path reduces
 to <code>/type(ipo:USAddress)/name</code>.</p>

<p><code>/r:purchaseReport/type()/sequence()/r:regions</code> designates an element
  declaration whose local name is <code>regions</code> in an anonymous complex type.
  Omitting its optional intermediate step sequence, this path reduces to
  <code>/r:purchaseReport/r:regions</code></p>
  </div4>
</div3>
<div3 id="abbreviations">
<head>Abbreviations: <code>//</code> and <code>*</code></head>
<p><code>//</code> is an abbreviation for head steps or a sequence of intermediate steps
in a schema component path. <code>*</code> is an abbreviation for any step in a schema
component path. </p>

<p>An intermediate step is a [step] piece that is neither the first step nor
the last step in a schema component path. Head steps are a series of steps in
  a schema component path, begin with the
first step and end with any step that is not the last step in a schema
component path.</p>

<div4 id="examples-abbreviations">
<head>Examples of Abbreviations in Schema Component Path (Non-Normative)</head>

<p><code>//quantity</code> designates global or local element declarations whose local
name is <code>quantity</code>.</p>

<p><code>/type(Items)//quantity</code> designates global or local element declarations
whose local name is <code>quantity</code>, and these declarations are in the sub graph
represented by the global complex type component whose local name is <code>Items</code>.</p>

<p><code>/type(Items)//@partNum</code> designates global or local attribute
declarations whose local name is <code>partNum</code> and these declarations are in the sub
graph represented by the global complex type component whose local name is <code>Items</code>.</p>

<p><code>/type(Items)/item/*</code> designates schema components that are traversable
as next steps in the sub graph represented by the element declaration whose schema
component path is <code>/type(Items)/item</code>.</p>
</div4>
</div3>


      <div3 id="section-path-ebnf">
        <head>EBNF for Schema Component Path Syntax</head>
<scrap lang="ebnf">
<head>Path EBNF</head>
<prod id="NT-SchemaComponentPath">
   <lhs>SchemaComponentPath</lhs>
   <rhs><nt def="NT-SchemaStep">SchemaStep</nt> | 
<nt def="NT-StepSeparator">StepSepator</nt>
<nt def="NT-RelativeSchemaComponentPath">RelativeSchemaComponentPath</nt>
   </rhs>
</prod>

<prod id="NT-SchemaStep">
   <lhs>SchemaStep</lhs>
   <rhs>'/'</rhs>
</prod>

<prod id="NT-RelativeSchemaComponentPath">
   <lhs>RelativeSchemaComponentPath</lhs>
   <rhs><nt def="NT-Step">Step</nt> |
        <nt def="NT-Step">Step</nt> 
        <nt def="NT-StepSeparator">StepSeparator</nt>
        <nt def="NT-RelativeSchemaComponentPath">RelativeSchemaComponentPath</nt>
   </rhs>
</prod>

<prod id="NT-StepSeparator">
   <lhs>StepSeparator</lhs>
   <rhs>'/' | '//'</rhs>
</prod>

<prod id="NT-Step">
   <lhs>Step</lhs>
   <rhs><nt def="NT-AttributeStep">AttributeStep</nt> |
       <nt def="NT-ElementStep">ElementStep</nt> |
       <nt def="NT-SimpleTypeStep">SimpleTypeStep</nt> |
       <nt def="NT-ComplexTypeStep">ComplexTypeStep</nt> |
       <nt def="NT-AttributeGroupStep">AttributeGroupStep</nt> |
       <nt def="NT-GroupStep">GroupStep</nt> |
       <nt def="NT-IdentityConstraintStep">IdentityConstraintStep</nt> |
       <nt def="NT-NotationStep">NotationStep</nt> |
       <nt def="NT-AnnotationsStep">AnnotationsStep</nt> |
       <nt def="NT-ModelGroupStep">ModelGroupStep</nt> |
       <nt def="NT-WildcardStep">WildcardStep</nt> |
       <nt def="NT-FacetStep">FacetStep</nt> |
       <nt def="NT-AbbreviatedStep">AbbreviatedStep</nt>
   </rhs>
</prod>

<prod id="NT-AbbreviatedStep">
    <lhs>AbbreviatedStep</lhs>
    <rhs>'*'</rhs>
</prod>

<prod id="NT-AttributeStep">
   <lhs>AttributeStep</lhs>
   <rhs><nt def="NT-AttributeFullform">AttributeFullform</nt> |
       <nt def="NT-AttributeShortform">AttributeShortform</nt></rhs>
</prod>
<prod id="NT-AttributeFullform">
   <lhs>AttributeFullform</lhs>
   <rhs>'attribute' '(' <xnt href="http://www.w3.org/TR/REC-xml-names/#NT-QName">QName</xnt> ')' </rhs>
</prod>
<prod id="NT-AttributeShortform">
   <lhs>AttributeShortform</lhs>
   <rhs>'@' <xnt href="http://www.w3.org/TR/REC-xml-names/#NT-QName">QName</xnt>
   </rhs>
</prod>
<prod id="NT-ElementStep">
   <lhs>ElementStep</lhs>
   <rhs> ( <nt def="ElementFullform">ElementFullform</nt> |
       <nt def="NT-ElementShortform">ElementShortform</nt> )
       <nt def="NT-Predicate">Predicate</nt>? </rhs>
</prod>
<prod id="NT-ElementFullform">
   <lhs>ElementFullform</lhs>
   <rhs>'element' '(' <xnt href="http://www.w3.org/TR/REC-xml-names/#NT-QName">QName</xnt> ')' </rhs>
</prod>
<prod id="NT-ElementShortform">
   <lhs>ElementShortform</lhs>
   <rhs><xnt href="http://www.w3.org/TR/REC-xml-names/#NT-QName">QName</xnt>
   </rhs>
</prod>
<prod id="NT-SimpleTypeStep">
   <lhs>SimpleTypeStep</lhs>
   <rhs>'type' '(' <xnt href="http://www.w3.org/TR/REC-xml-names/#NT-QName">QName</xnt>? ')'
       <nt def="NT-Predicate">Predicate</nt>? </rhs>
</prod>
<prod id="NT-ComplexTypeStep">
   <lhs>ComplexTypeStep</lhs>
   <rhs>'type' '(' <xnt href="http://www.w3.org/TR/REC-xml-names/#NT-QName">QName</xnt>? ')' </rhs>
</prod>
<prod id="NT-AttributeGroupStep">
   <lhs>AttributeGroupStep</lhs>
   <rhs>'attributeGroup' '(' <xnt href="http://www.w3.org/TR/REC-xml-names/#NT-QName">QName</xnt> ')' </rhs>
</prod>
<prod id="NT-GroupStep">
   <lhs>GroupStep</lhs>
   <rhs>'group' '(' <xnt href="http://www.w3.org/TR/REC-xml-names/#NT-QName">QName</xnt> ')' </rhs>
</prod>
<prod id="NT-IdentityConstraintStep">
   <lhs>IdentityConstraintStep</lhs>
   <rhs>'identityConstraint' '(' <xnt href="http://www.w3.org/TR/REC-xml-names/#NT-QName">QName</xnt> ')' </rhs>
</prod>
<prod id="NT-NotationStep">
   <lhs>NotationStep</lhs>
   <rhs>'notation' '(' <xnt href="http://www.w3.org/TR/REC-xml-names/#NT-QName">QName</xnt> ')' </rhs>
</prod>
<prod id="NT-AnnotationsStep">
   <lhs>AnnotationsStep</lhs>
   <rhs>'annotations' '(' ')' </rhs>
</prod>
<prod id="NT-ModelGroupStep">
    <lhs>ModelGroupStep</lhs>
    <rhs>('sequence' | 'choice' | 'all') '(' ')' <nt def="NT-predicate">Predicate</nt>?</rhs>
</prod>
<prod id="NT-WildcardStep">
   <lhs>WildcardStep</lhs>
   <rhs> ( 'any' '(' ')' <nt def="NT-Predicate">Predicate</nt>? ) | ('anyAttribute' '(' ')')
        </rhs>
</prod>
<prod id="NT-FacetStep">
   <lhs>FacetStep</lhs>
   <rhs>'facet' '(' <nt def="NT-FacetName">FacetName</nt> ')'</rhs>
</prod>
<prod id="NT-FacetName">
   <lhs>FacetName</lhs>
   <rhs>'ordered' | 'bounded' | 'numeric' | 'cardinality' |
   'whiteSpace' | 'minInclusive' | 'maxInclusive' | 'minExclusive' |
   'maxExclusive' | 'totalDigits' | 'fractionDigits' | 'length' | 'minLength' |
   'maxLength' | 'pattern' | 'enumeration'
   </rhs>
</prod>
<prod id="NT-Predicate"><lhs>Predicate</lhs>
    <rhs>'[' [0-9]+ ']'</rhs>
 </prod>
</scrap>
<p></p>
<ednote><date>21-Jun2-2004</date>
<edtext>Do we want to allow things like type(*) and element(*)? 
</edtext>
</ednote>
<p></p>
      </div3>
    </div2>
<div2 id="section-canonical-path">
      <head>Canonical Schema Component Paths</head>
<p><termdef id="key-canonical-schema-component-path">The <term>canonical schema
component path</term> 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.
</termdef></p>
<p>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.</p>
<p><termdef id="key-current-component" term="current schema component">The
    <term>current schema component</term> is a schema component for which
    there is a valid canonical path through the schema component graph.</termdef></p>

<p><termdef id="key-target-component" term="target schema component">The
    <term>target schema component</term> is a schema component linked to the
    current schema component via one of the schema component properties
    defined previously.</termdef></p>

<p><termdef id="key-component-relationship" term="component relationship">The
    <term>component relationship</term> is the name of the schema component
    property on the current schema component which references the target schema
    component.
</termdef></p>

<p><termdef id="key-ancestor-set" term="ancestor set">The
    <term>ancestor set</term> 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.</termdef></p>
<p><termdef id="key-base-type-set" term="base type set">
The <term>base type set</term> 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.
</termdef></p>
<p>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".
</p>
<p><termdef id="key-extended-base-type-set">The <term>extended base type
set</term> 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".
</termdef>
</p>

<p><termdef id="key-base-facet-set">The <term>base facet set</term> 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.</termdef>
</p>
<p><termdef id="key-same-facet">Two facets are <term>the same</term> if they
are the same kind of component (e.g. both are length facets) and their {value}
properties have identical values.</termdef></p>
<p><termdef id="key-base-attribute-use-set">The <term>base attribute use
set</term> 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.</termdef>
</p>
<p><termdef id="key-same-attr-uses">Two attribute uses are <term>the
same</term> if the {name} and {target namespace} of their {attribute
declaration} properties are equal. </termdef>
</p>
<p>(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.)
</p>

<p><termdef id="key-particle-set">The <term>particle set</term> 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.</termdef>
</p>

<p><termdef id="key-base-particle-set">The <term>base particle set</term> 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.</termdef>
</p>

<p><termdef id="key-same-particle">Two particles are <term>the same</term> if
the implementation reports them as the same.</termdef> 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".
</p>

<p>Traversal where the current schema component
    is the schema-as-a-whole
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-as-a-whole
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:</p>
<olist>
<item><p>the target schema component is an identity constraint definition</p></item>
<item><p>the target schema component is a simple or complex type
definition whose {name} property is not absent</p></item>
<item><p>the target schema component is an element or attribute declaration
whose {scope} property is <code>global</code></p></item>
<item><p>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</p></item>
<item><p>the component relationship is {scope},
{substitution group affiliation}, {base type definition},
{primitive type definition}, or {referenced key}</p></item>
<item><p>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</p></item>
<item><p>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</p></item>
<item><p>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</p></item>
</olist>

<p>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-as-a-whole component, the third condition ensures that the canonical
path to element and attribute declarations is likewise the global one (if there
is one), the last
condition accounts for element and attribute declarations stemming from named
model groups and attribute groups, the fifth ensures that the canonical path
doesn't follow &quot;backwards&quot; paths, and the final three conditions
ensure the canonical path to &quot;inherited&quot; components goes through
their component of origin.</p>

<p>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.
</p>
<p>For example, consider the path
<code>/type(x:foo)/element(x:bar)</code>.
</p>
<p>For this schema fragment, this represents a canonical path to the local
element <code>bar</code>:</p>
<eg xml:space="preserve">
&lt;complexType name="foo">
  &lt;sequence>
     &lt;element name="bar" type="x:barType"/>
  &lt;/sequence>
&lt;/complexType>
</eg>
<p>But for this schema fragment, it represents a non-canonical path. The
canonical path would be <code>/group(x:barGroup)/element(x:bar)</code>.
</p>
<eg xml:space="preserve">
&lt;group name="barGroup">
  &lt;sequence>
     &lt;element name="bar" type="x:barType"/>
  &lt;/sequence>
&lt;/group>
&lt;complexType name="foo">
  &lt;sequence>
    &lt;group ref="x:barGroup"/>
  &lt;/sequence>
&lt;/complexType>
</eg>


      <div3 id="section-canonical-syntax">
        <head>Canonical Syntax</head>
        <p>The concrete syntax allows certain abbreviations, such as
        eliding the positional predicate when the position is 1, eliding 
        optional intermediate steps, abbreviations <code>//</code>
        and <code>*</code>, and using short
        forms for element and attribute declarations.
        Canonical path syntax forbids all these abbreviations.
        </p>
        <ednote><date>4-March-2004</date><edtext>Do we need to specify --A-- specific
        namespace prefix? Say, 'ns'.</edtext></ednote>
      </div3>
    </div2>
<div2 id="section-equality-path">
      <head>Equality of Schema Component Paths</head>
<p><termdef id="key-equal-path" term="schema component paths are equal" >Two <term>schema component paths are
equal</term> 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 all of their properties have
the same value.</termdef>
</p>
<p>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.</p>
    </div2>
  </div1>

 <div1 id="section-conformance">
    <head>Conformance</head>
<div2 id="scp-conformance">
<head>Schema Component Path Conformance</head>
<p>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.</p>

</div2>

<div2 id="scds-conformance">
<head>Schema Component Designator Conformance</head>
<p>Conforming XPointer processors claiming to support the
<code>xscd()</code> scheme must conform to the behavior defined
in this specification and XPointer <code>xmlns()</code> scheme specification.</p>
</div2>
  </div1>
  <div1 id="section-example">
      <head>Example (Non-Normative)</head>

<p>This section walks through an example XML Schema Document from the XML Schema Part 0: Primer and
  enumerates the abbreviated and canonical schema component designators for schema components.</p>

<p>All schema constructs in this section are considered to be in the following
  schema document and its URI is <code>schema-URI</code>,</p>

<eg xml:space="preserve">
&lt;xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
&lt;/xsd:schema>
</eg>

<p>The canonical schema component designator for this schema-as-a-whole
component is <code>schema-URI#xscd(/)</code>.</p>

<eg xml:space="preserve">
&lt;xsd:annotation>
 &lt;xsd:documentation xml:lang="en">
  Purchase order schema for Example.com.
  Copyright 2000 Example.com. All rights reserved.
 &lt;/xsd:documentation>
&lt;/xsd:annotation>
</eg>

<p>The canonical schema component designator for this annotation schema component
  is <code>schema-URI#xscd(/annotations())</code>.</p>

<p>The following is a global element declaration,</p>

<eg xml:space="preserve">
&lt;xsd:element name="purchaseOrder" type="PurchaseOrderType"/>
</eg>

<p>The abbreviated schema component designator for this element declaration component
  is <code>schema-URI#xscd(/purchaseOrder)</code> and the canonical is
  <code>schema-URI#xscd(/element(purchaseOrder))</code>.</p>

<p>The following is another global element declaration, </p>
<eg xml:space="preserve">
 &lt;xsd:element name="comment" type="xsd:string"/>
</eg>

<p>The abbreviated schema component designator for this element declaration
  component is <code>schema-URI#xscd(/comment)</code> and the canonical is
  <code>schema-URI#xscd(/element(comment))</code>.</p>

<p>This following is a global complex type definition component,</p>

<eg xml:space="preserve">
&lt;xsd:complexType name="PurchaseOrderType">
 &lt;xsd:sequence>
  &lt;xsd:element name="shipTo" type="USAddress"/>
  &lt;xsd:element name="billTo" type="USAddress"/>
  &lt;xsd:element ref="comment" minOccurs="0"/>
  &lt;xsd:element name="items"  type="Items"/>
 &lt;/xsd:sequence>
 &lt;xsd:attribute name="orderDate" type="xsd:date"/>
&lt;/xsd:complexType>
</eg>

<p>The abbreviated schema component designator for this complex type definition
  and its element and attribute declaration components are,</p>

<eg xml:space="preserve">
schema-URI#xscd(/type(purchaseOrderType))
schema-URI#xscd(/type(purchaseOrderType)/shipTo)
schema-URI#xscd(/type(purchaseOrderType)/billTo)
schema-URI#xscd(/comment)
schema-URI#xscd(/type(purchaseOrderType)/items)
schema-URI#xscd(/type(purchaseOrderType)/@orderDate)
</eg>

<p>The canonical schema component designator for this complex type definition and
  its element and attribute declaration components are,</p>

<eg xml:space="preserve">
schema-URI#xscd(/type(purchaseOrderType))
schema-URI#xscd(/type(purchaseOrderType)/sequence()/element(shipTo))
schema-URI#xscd(/type(purchaseOrderType)/sequence()/element(billTo))
schema-URI#xscd(/element(comment))
schema-URI#xscd(/type(purchaseOrderType)/sequence()/element(items))
schema-URI#xscd(/type(purchaseOrderType)/attribute(orderDate))
</eg>

<p>The following is another global complex type definition component,</p>

<eg xml:space="preserve">
&lt;xsd:complexType name="USAddress">
 &lt;xsd:sequence>
  &lt;xsd:element name="name"   type="xsd:string"/>
  &lt;xsd:element name="street" type="xsd:string"/>
  &lt;xsd:element name="city"   type="xsd:string"/>
  &lt;xsd:element name="state"  type="xsd:string"/>
  &lt;xsd:element name="zip"    type="xsd:decimal"/>
 &lt;/xsd:sequence>
 &lt;xsd:attribute name="country" type="xsd:NMTOKEN"
     fixed="US"/>
&lt;/xsd:complexType>
</eg>

<p>The abbreviated schema component designator for this complex type definition
  and its element and attribute declaration components are,</p>

<eg xml:space="preserve">
schema-URI#xscd(/type(USAddress))
schema-URI#xscd(/type(USAddress)/name)
schema-URI#xscd(/type(USAddress)/street)
schema-URI#xscd(/type(USAddress)/city)
schema-URI#xscd(/type(USAddress)/state)
schema-URI#xscd(/type(USAddress)/zip)
schema-URI#xscd(/type(USAddress)/@country)
</eg>

<p>The canonical schema component designator for this complex type definition and its
  element and attribute declaration components are,</p>

<eg xml:space="preserve">
schema-URI#xscd(/type(USAddress))
schema-URI#xscd(/type(USAddress)/sequence()/element(name))
schema-URI#xscd(/type(USAddress)/sequence()/element(street))
schema-URI#xscd(/type(USAddress)/sequence()/element(city))
schema-URI#xscd(/type(USAddress)/sequence()/element(state))
schema-URI#xscd(/type(USAddress)/sequence()/element(zip))
schema-URI#xscd(/type(USAddress)/attribute(country))
</eg>

<p>The following is a global complex type definition with anonymous complex type and
  simple type definition components,</p>

<eg xml:space="preserve">
&lt;xsd:complexType name="Items">
 &lt;xsd:sequence>
  &lt;xsd:element name="item" minOccurs="0" maxOccurs="unbounded">
   &lt;xsd:complexType>
    &lt;xsd:sequence>
     &lt;xsd:element name="productName" type="xsd:string"/>
     &lt;xsd:element name="quantity">
      &lt;xsd:simpleType>
       &lt;xsd:restriction base="xsd:positiveInteger">
        &lt;xsd:maxExclusive value="100"/>
       &lt;/xsd:restriction>
      &lt;/xsd:simpleType>
     &lt;/xsd:element>
     &lt;xsd:element name="USPrice"  type="xsd:decimal"/>
     &lt;xsd:element ref="comment"   minOccurs="0"/>
     &lt;xsd:element name="shipDate" type="xsd:date" minOccurs="0"/>
    &lt;/xsd:sequence>
    &lt;xsd:attribute name="partNum" type="SKU" use="required"/>
   &lt;/xsd:complexType>
  &lt;/xsd:element>
 &lt;/xsd:sequence>
&lt;/xsd:complexType>
</eg>

<p>The abbreviated schema component designator for this complex type definition
  and its element and attribute declaration, simple type definition, and facet
  components are,</p>

<eg xml:space="preserve">
schema-URI#xscd(/type(Items))
schema-URI#xscd(/type(Items)/item)
schema-URI#xscd(/type(Items)/item/type())
schema-URI#xscd(/type(Items)/item/productName)
schema-URI#xscd(/type(Items)/item/quantity)
schema-URI#xscd(/type(Items)/item/quantity/type())
schema-URI#xscd(/type(Items)/item/quantity/type()/facet(maxExclusive))
schema-URI#xscd(/type(Items)/item/USPrice)
schema-URI#xscd(/comment)
schema-URI#xscd(/type(Items)/item/shipDate)
schema-URI#xscd(/type(Items)/item/@partNum)
</eg>

<p>The canonical schema component designator for this complex type definition and its
  element and attribute declaration, simple type definition, and facet components are,</p>

<eg xml:space="preserve">
schema-URI#xscd(/type(Items))
schema-URI#xscd(/type(Items)/sequence()/element(item))
schema-URI#xscd(/type(Items)/sequence()/element(item)/type())
schema-URI#xscd(/type(Items)/sequence()/element(item)/type()/sequence()/element(productName))
schema-URI#xscd(/type(Items)/sequence()/element(item)/type()/sequence()/element(quantity))
schema-URI#xscd(/type(Items)/sequence()/element(item)/type()/sequence()/element(quantity)/type())
schema-URI#xscd(/type(Items)/sequence()/element(item)/type()/sequence()/element(quantity)/type()/facet(maxExclusive))
schema-URI#xscd(/type(Items)/sequence()/element(item)/type()/sequence()/element(USPrice))
schema-URI#xscd(/element(comment))
schema-URI#xscd(/type(Items)/sequence()/element(item)/type()/sequence()/element(shipDate))
schema-URI#xscd(/type(Items)/sequence()/element(item)/type()/attribute(partNum))
</eg>

<p>The following is a global simple type definition component,</p>

<eg xml:space="preserve" role="A Simple Type">
&lt;!-- Stock Keeping Unit, a code for identifying products -->
&lt;xsd:simpleType name="SKU">
 &lt;xsd:restriction base="xsd:string">
  &lt;xsd:pattern value="\d{3}-[A-Z]{2}"/>
 &lt;/xsd:restriction>
&lt;/xsd:simpleType>
</eg>

<p>The canonical schema component designator for this simple type definition
  and its facet component are,</p>

<eg xml:space="preserve">
schema-URI#xscd(/type(SKU))
schema-URI#xscd(/type(SKU)/facet(pattern))
</eg>
</div1>

 </body>
 <back>
<div1 id="properties">
<head>Schema Component Properties (Non-Normative)</head>
<p>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.
</p>
<table border="2" rules="rows" cellspacing="5" summary="Use of Schema Component Properties">
<thead>
<tr><th>Component</th><th>Property</th><th>Use</th></tr>
</thead>
<tbody>
<tr><th rowspan="7">Attribute Declaration</th></tr>
<tr><td>{type definition}</td><td>traversed</td></tr>
<tr><td>{annotation}</td><td>traversed (special)</td></tr>
<tr><td>{name}</td><td>referenced</td></tr>
<tr><td>{target namespace}</td><td>referenced</td></tr>
<tr><td>{scope}</td><td>traversed</td></tr>
<tr><td>{value constraint}</td><td>none</td></tr>
</tbody>
<tbody>
<tr><th rowspan="13">Element Declaration</th></tr>
<tr><td>{type definition}</td><td>traversed</td></tr>
<tr><td>{identity-constraint definitions}</td><td>traversed</td></tr>
<tr><td>{annotation}</td><td>traversed (special)</td></tr>
<tr><td>{name}</td><td>referenced</td></tr>
<tr><td>{target namespace}</td><td>referenced</td></tr>
<tr><td>{scope}</td><td>traversed</td></tr>
<tr><td>{value constraint}</td><td>none</td></tr>
<tr><td>{nillable}</td><td>none</td></tr>
<tr><td>{substitution group affiliation}</td><td>traversed</td></tr>
<tr><td>{substitution group exclusions}</td><td>none</td></tr>
<tr><td>{disallowed substitutions}</td><td>none</td></tr>
<tr><td>{abstract}</td><td>none</td></tr>
</tbody>
<tbody>
<tr><th rowspan="12">Complex Type Definition</th></tr>
<tr><td>{base type definition}</td><td>traversed</td></tr>
<tr><td>{attribute uses}</td><td>traversed</td></tr>
<tr><td>{attribute wildcard}</td><td>traversed</td></tr>
<tr><td>{content type}</td><td>traversed</td></tr>
<tr><td>{annotations}</td><td>traversed (special)</td></tr>
<tr><td>{name}</td><td>referenced</td></tr>
<tr><td>{target namespace}</td><td>referenced</td></tr>
<tr><td>{derivation method}</td><td>none</td></tr>
<tr><td>{final}</td><td>none</td></tr>
<tr><td>{abstract}</td><td>none</td></tr>
<tr><td>{prohibited substitutions}</td><td>none</td></tr>
</tbody>
<tbody>
<tr><th rowspan="4">Attribute Use</th></tr>
<tr><td>{attribute declaration}</td><td>traversed</td></tr>
<tr><td>{value constraint}</td><td>none</td></tr>
<tr><td>{required}</td><td>none</td></tr>
</tbody>
<tbody>
<tr><th rowspan="6">Attribute Group Definition</th></tr>
<tr><td>{attribute uses}</td><td>traversed</td></tr>
<tr><td>{attribute wildcard}</td><td>traversed</td></tr>
<tr><td>{annotation}</td><td>traversed (special)</td></tr>
<tr><td>{name}</td><td>referenced</td></tr>
<tr><td>{target namespace}</td><td>referenced</td></tr>
</tbody>
<tbody>
<tr><th rowspan="5">Model Group Definition</th></tr>
<tr><td>{model group}</td><td>traversed</td></tr>
<tr><td>{annotation}</td><td>traversed (special)</td></tr>
<tr><td>{name}</td><td>referenced</td></tr>
<tr><td>{target namespace}</td><td>referenced</td></tr>
</tbody>
<tbody>
<tr><th rowspan="4">Model Group</th></tr>
<tr><td>{particles}</td><td>traversed</td></tr>
<tr><td>{annotation}</td><td>traversed (special)</td></tr>
<tr><td>{compositor}</td><td>referenced</td></tr>
</tbody>
<tbody>
<tr><th rowspan="4">Particle</th></tr>
<tr><td>{term}</td><td>traversed</td></tr>
<tr><td>{min occurs}</td><td>none</td></tr>
<tr><td>{max occurs}</td><td>none</td></tr>
</tbody>
<tbody>
<tr><th rowspan="4">Wildcard</th></tr>
<tr><td>{annotation}</td><td>traversed (special)</td></tr>
<tr><td>{namespace constraint}</td><td>none</td></tr>
<tr><td>{process contents}</td><td>none</td></tr>
</tbody>
<tbody>
<tr><th rowspan="8">Identity-constraint Definition</th></tr>
<tr><td>{annotation}</td><td>traversed (special)</td></tr>
<tr><td>{name}</td><td>referenced</td></tr>
<tr><td>{target namespace}</td><td>referenced</td></tr>
<tr><td>{identity-constraint category}</td><td>none</td></tr>
<tr><td>{selector}</td><td>none</td></tr>
<tr><td>{fields}</td><td>none</td></tr>
<tr><td>{referenced key}</td><td>traversed</td></tr>
</tbody>
<tbody>
<tr><th rowspan="6">Notation Declaration</th></tr>
<tr><td>{annotation}</td><td>traversed (special)</td></tr>
<tr><td>{name}</td><td>referenced</td></tr>
<tr><td>{target namespace}</td><td>referenced</td></tr>
<tr><td>{public identifier}</td><td>none</td></tr>
<tr><td>{system identifier}</td><td>none</td></tr>
</tbody>
<tbody>
<tr><th rowspan="4">Annotation</th></tr>
<tr><td>{application information}</td><td>none</td></tr>
<tr><td>{user information}</td><td>none</td></tr>
<tr><td>{attributes}</td><td>none</td></tr>
</tbody>
<tbody>
<tr><th rowspan="8">Schema</th></tr>
<tr><td>{type definitions}</td><td>traversed</td></tr>
<tr><td>{attribute declarations}</td><td>traversed</td></tr>
<tr><td>{element declarations}</td><td>traversed</td></tr>
<tr><td>{attribute group definitions}</td><td>traversed</td></tr>
<tr><td>{model group definitions}</td><td>traversed</td></tr>
<tr><td>{identity constraint definitions}</td><td>traversed</td></tr>
<tr><td>{annotations}</td><td>traversed (special)</td></tr>
</tbody>
<tbody>
<tr><th rowspan="12">Simple Type Definition</th></tr>
<tr><td>{base type definition}</td><td>traversed</td></tr>
<tr><td>{facets}</td><td>traversed</td></tr>
<tr><td>{fundamental facets}</td><td>traversed</td></tr>
<tr><td>{item type definition}</td><td>traversed</td></tr>
<tr><td>{member type definitions}</td><td>traversed</td></tr>
<tr><td>{annotations}</td><td>traversed (special)</td></tr>
<tr><td>{name}</td><td>referenced</td></tr>
<tr><td>{target namespace}</td><td>referenced</td></tr>
<tr><td>{variety}</td><td>referenced</td></tr>
<tr><td>{final}</td><td>none</td></tr>
<tr><td>{primitive type definition}</td><td>traversed</td></tr>
</tbody>
<tbody>
<tr><th rowspan="4">Facets</th></tr>
<tr><td>{annotation}</td><td>traversed (special)</td></tr>
<tr><td>{value}</td><td>none</td></tr>
<tr><td>{fixed}</td><td>none</td></tr>
</tbody>
</table>
</div1>

<div1 id="normative-glossary">
<head>Glossary (Non-Normative)</head>
<p>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.</p>
<ednote role="glossary">
<edtext>An XSL macro is used to
collect definitions from throughout the spec and gather them here for easy
reference. Should talk to Henry for details.</edtext>
</ednote>

</div1>

  <div1 id="references">
  <head>References</head>
<div2>
<head>Normative References</head>
<blist>
<bibl id="rfc2396" key="RFC 2396"> Tim Berners-Lee et al, <emph>RFC 2396:
Uniform Resource Identifiers</emph>, Internet Engineering Task Force,
1995, available at
<loc href="http://www.ietf.org/rfc/rfc2396.txt"
xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
xlink:show="replace"
xlink:actuate="onRequest">http://www.ietf.org/rfc/rfc2396.txt</loc>
with an update available at
<loc href="http://gbiv.com/protocols/uri/rev-2002/rfc2396bis.html"
xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
xlink:show="replace"
xlink:actuate="onRequest">http://gbiv.com/protocols/uri/rev-2002/rfc2396bis.html</loc>.
</bibl>

<bibl id="xsd2" key="XSD2"> Paul V. Biron and Ashok Malhotra, <emph>XML Schema Part 2:
Datatypes</emph>, World Wide Web Consortium, 2001, available at <loc href="http://www.w3.org/TR/xmlschema-2/" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">http://www.w3.org/TR/xmlschema-2/</loc>
</bibl>

<bibl id="xml" key="XML"> Tim Bray and Jean Paoli and C. M. Sperberg-McQueen, <emph>Extensible
Markup Language (XML) 1.0</emph>, World Wide Web Consortium, 1998, available at <loc href="http://www.w3.org/TR/REC-xml/" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">http://www.w3.org/TR/REC-xml/</loc>
</bibl>

<bibl id="xptrxmlns" key="XPTR XMLNS"> Steven J. DeRose, Ron Daniel Jr., Eve
Maler, Jonathan Marsh, <emph>XPointer xmlns() Scheme</emph>, World Wide Web
Consortium, 2003, available at
<loc href="http://www.w3.org/TR/xptr-xmlns/"
xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
xlink:show="replace"
xlink:actuate="onRequest">http://www.w3.org/TR/xptr-xmlns/</loc>
</bibl>

<bibl id="xptrframework" key="XPTR"> Paul Grosso, Eve Maler,
Jonathan Marsh, Norman Walsh, <emph>XPointer Framework</emph>, World Wide Web
Consortium, 2003, available at
<loc href="http://www.w3.org/TR/xptr-framework/"
xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
xlink:show="replace"
xlink:actuate="onRequest">http://www.w3.org/TR/xptr-framework/</loc>
</bibl>

<bibl id="xsd1" key="XSD1"> Henry S. Thompson, David Beech, Murray Maloney and
Noah Mendelsohn, <emph>XML Schema Part 1: Structures</emph>, World Wide
Web Consortium, 2001, available at <loc href="http://www.w3.org/TR/xmlschema-1/" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">http://www.w3.org/TR/xmlschema-1/</loc>
</bibl>
</blist>
</div2>
<div2>
<head>Non-normative Informational References</head>
<blist>
<bibl id="xpath" key="XPath"> James Clark and Steve DeRose, <emph>XML path language
(XPath) version 1.0</emph>, World Wide Web Consortium, 1999, available at <loc href="http://www.w3.org/TR/xpath" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">http://www.w3.org/TR/xpath</loc> </bibl>

<bibl id="xsd0" key="XSD0"> David C. Fallside, <emph>XML Schema Part 0: Primer</emph>,
World Wide Web Consortium, 2001, available at <loc href="http://www.w3.org/TR/xmlschema-0/" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">http://www.w3.org/TR/xmlschema-0/</loc> </bibl>
</blist>
</div2>
  </div1>
 </back>
</spec>
