<?xml version="1.0" encoding="utf-8"?><!-- Id: structures.xml,v 1.6.2.455 2009/11/30 21:15:00 cmsmcq Exp  --><?xml-stylesheet type='text/xsl' href='xmlschema_diffs.xsl'?>
<!DOCTYPE spec
  SYSTEM "local.dgdf.dtd">
<spec dgdf="dg-statusquo-color-200904.xml" dgdf_desc="" xml:lang="en" w3c-doctype="wd" status="final" otherSpec="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html" schemaDump="./XMLSchema.diff-wd.xsd.dmp" schemaProper="./XMLSchema.diff-wd.xsd" datatypeDoc="../WD-xmlschema11-2-20091203/datatypes.diff-wd.xml" schemaExample="./example.xsd.dmp" docStatus="final" me="structures">
 <header>
  <title><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">W3C XML Schema Definition Language (XSD<!--*
* material suppressed here by diff group b5266 *
*-->) 1.1</phrase> Part 1: Structures<!--*
* material suppressed here by diff group x1011 *
*--></title>
  <w3c-designation>wd-20091203</w3c-designation>
  <!--* <w3c-doctype>W3C Working Draft</w3c-doctype> *-->
  <w3c-doctype>W3C Working Draft</w3c-doctype>
  <pubdate>
   <day>3</day>
   <month>December</month>
   <year>2009</year>
  </pubdate>
  <publoc> 
   <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/">http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/</loc> 
  </publoc>
  <altlocs><loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.xml">XML</loc>
   <!--*
   <loc href="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.diff-1.0.html">XHTML with changes since version 1.0 marked</loc>
   <loc href="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.diff-wd.html">XHTML with changes since previous Working Draft marked</loc>
   *-->
   <!--*
* material suppressed here by diff group x1011 *
*-->
   <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-1.0.html" dg="x1011">XHTML with changes since version 1.0 marked</loc>
   <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html" dg="x1011">XHTML with changes since previous Working Draft marked</loc>
   <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="./XMLSchema.xsd">Independent copy of the schema for schema documents</loc>
   <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="./XMLSchema.dtd">Independent copy of the DTD for schema documents</loc>
   <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="compDefs.xml" dg="x1011">Independent tabulation of components and microcomponents</loc>
   <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2003/03/Translations/byTechnology?technology=xmlschema">List of translations</loc>
  </altlocs>
  <latestloc>
   <!--*
* material suppressed here by diff group x1011 *
*-->
   <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xmlschema11-1/" dg="x1011">http://www.w3.org/TR/xmlschema11-1/</loc>
  </latestloc>
  <prevlocs>
   <!--*
* material suppressed here by diff group x1011 *
*-->
   <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/CR-xmlschema11-1-20090430/" dg="x1011">http://www.w3.org/TR/2009/CR-xmlschema11-1-20090430/</loc>
   <!--*
   <loc href="http://www.w3.org/TR/2009/WD-xmlschema11-1-20090130/">http://www.w3.org/TR/2009/WD-xmlschema11-1-20090130/</loc>
   <loc href="http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/">http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/</loc>
   <loc href="http://www.w3.org/TR/2007/WD-xmlschema11-1-20070830/">http://www.w3.org/TR/2007/WD-xmlschema11-1-20070830/</loc>
   <loc href="http://www.w3.org/TR/2006/WD-xmlschema11-1-20060831/">http://www.w3.org/TR/2006/WD-xmlschema11-1-20060831/</loc>
   <loc href="http://www.w3.org/TR/2006/WD-xmlschema11-1-20060330/">http://www.w3.org/TR/2006/WD-xmlschema11-1-20060330/</loc>
   <loc href="http://www.w3.org/TR/2005/WD-xmlschema11-1-20050224/">http://www.w3.org/TR/2005/WD-xmlschema11-1-20050224/</loc>
   <loc href="http://www.w3.org/TR/2004/WD-xmlschema11-1-20040716/">http://www.w3.org/TR/2004/WD-xmlschema11-1-20040716/</loc>
   *-->
  </prevlocs>
  <authlist> 
   <authlist role="1.1" dg="x1011">
    <author>
     <name>Shudi (Sandy) Gao 高殊镝</name>
     <affiliation>IBM</affiliation>
     <email xmlns:xlink="http://www.w3.org/1999/xlink" href="mailto:sandygao@ca.ibm.com">sandygao@ca.ibm.com</email>
    </author>

    <author><!--*  diff="add" dg="wgi20080613"> *-->
     <name>C. M. Sperberg-McQueen</name>
     <affiliation>Black Mesa Technologies LLC</affiliation>
     <email xmlns:xlink="http://www.w3.org/1999/xlink" href="mailto:cmsmcq@blackmesatech.com">cmsmcq@blackmesatech.com</email>
    </author>

    <author>
     <name>Henry S. Thompson</name>
     <affiliation>University of Edinburgh</affiliation>
     <email xmlns:xlink="http://www.w3.org/1999/xlink" href="mailto:ht@inf.ed.ac.uk">ht@inf.ed.ac.uk</email>
    </author>
   </authlist>

   <authlist role="1.0" dg="x1011">
    <author>
     <name>Henry S. Thompson</name>
     <affiliation>University of Edinburgh</affiliation>
     <email xmlns:xlink="http://www.w3.org/1999/xlink" href="mailto:ht@inf.ed.ac.uk">ht@inf.ed.ac.uk</email>
    </author>
    <author role="1.0" dg="x1011-silent">
     <!--* NM was moved up at some early point.  Mark this, so 2e can
         * reproduce the old order, but make it silent so 1.0 diff doesn't
         * call attention to it *-->
     <name>Noah Mendelsohn</name>
     <affiliation>IBM</affiliation>
     <email xmlns:xlink="http://www.w3.org/1999/xlink" href="mailto:noah_mendelsohn@us.ibm.com">noah_mendelsohn@us.ibm.com</email>
    </author>
    <author role="1.0">
     <name>David Beech</name>
     <affiliation>Oracle Corporation (retired)</affiliation>
     <email xmlns:xlink="http://www.w3.org/1999/xlink" href="mailto:davidbeech@earthlink.net">davidbeech@earthlink.net</email>
    </author>
    <author role="1.0">
     <name>Murray Maloney</name>
     <affiliation>Muzmo Communications</affiliation>
     <email xmlns:xlink="http://www.w3.org/1999/xlink" href="mailto:murray@muzmo.com">murray@muzmo.com</email>
    </author>
    <!--*
* material suppressed here by diff group x1011-silent *
*-->
   </authlist>
  </authlist>
<!--* old copy, for safekeeping 
  <authlist>
   <author diff="add">
    <name>Shudi (Sandy) Gao &#x9ad8;&#x6b8a;&#x955d;</name>
    <affiliation>IBM</affiliation>
    <email href="mailto:sandygao@ca.ibm.com">sandygao@ca.ibm.com</email>
   </author>
   <author>
    <name>Henry S. Thompson</name>
    <affiliation>University of Edinburgh</affiliation>
    <email diff="chg" href="mailto:ht@inf.ed.ac.uk">ht@inf.ed.ac.uk</email>
   </author>
   <author diff="add">
   <name>C. M. Sperberg-McQueen</name>
   <affiliation>World Wide Web Consortium</affiliation>
   <email href="mailto:cmsmcq@w3.org">cmsmcq@w3.org</email>
  </author>
   <author role="1.0">
    <name>Noah Mendelsohn</name>
    <affiliation>IBM</affiliation>
    <email href="mailto:noah_mendelsohn@us.ibm.com">noah_mendelsohn@us.ibm.com</email>
   </author>
   <author role="1.0">
    <name>David Beech</name>
    <affiliation>Oracle Corporation (retired)</affiliation>
    <email href="mailto:davidbeech@earthlink.net">davidbeech@earthlink.net</email>
   </author>
   <author role="1.0">
    <name>Murray Maloney</name>
    <affiliation>Muzmo Communications</affiliation>
    <email href="mailto:murray@muzmo.com">murray@muzmo.com</email>
   </author>
  </authlist>
   *-->

  <status>
   <p><emph>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 xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/">W3C technical reports index</loc> at
     http://www.w3.org/TR/.</emph></p>
   
   
   <!--* 1.1 (current, live) status section starts here. *-->

   <p dg="x1011">This <!--*
* material suppressed here by diff group crhax *
*--><phrase dg="crhax"><!--*
* material suppressed here by diff group wg-internal *
*-->
     W3C Last Call Working Draft 
     <phrase dg="wg-internal">specifies</phrase>
     <!--*
* material suppressed here by diff group wg-internal *
*-->
     </phrase> <phrase dg="LC.200912">the</phrase> <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">W3C XML Schema Definition Language (XSD<!--*
* material suppressed here by diff group b5266 *
*-->) 1.1</phrase>.  It 
    <!--*
* material suppressed here by diff group wg-internal *
*-->
    is here made
    available for review by W3C members<phrase dg="wg-internal"> 
     and the public</phrase>.  
    <!--*
* material suppressed here by diff group wd4.ch *
*--><phrase dg="wd4.ch">XSD<!--*
* material suppressed here by diff group b5266 *
*--> 1.1 retains all
     the essential features of XSD<!--*
* material suppressed here by diff group b5266 *
*--> 1.0, but adds several new 
     features to support functionality requested by users,
     fixes many errors in XSD<!--*
* material suppressed here by diff group b5266 *
*--> 1.0, 
     and clarifies wording.</phrase>
    <!--*
* material suppressed here by diff group wg-internal *
*-->
   </p>
   <!--*
* material suppressed here by diff group telltale *
*-->

   <!--* draft of August 2007 *-->
   <p dg="wd4.ch">
    This draft was published 
    on 3 December 2009.
    <!--*
* material suppressed here by diff group ed-20080621 *
*-->
    <phrase dg="lc200901">The major revisions</phrase><!--*
* material suppressed here by diff group lc200901 *
*--> since the previous 
    <phrase dg="ed-20080621">public working</phrase> draft 
    include<phrase dg="wgi-20080613">
     the following</phrase>:
    <!--* Make sure these are in the appendix, too! *-->
    <ulist>
<!--* (retain for next time ...)
<item>
<p>[No changes yet; the body of this document is the same
as that of the most recent public draft.]</p>
</item>
*-->


     <!--* Big changes, selling points, hurrah *-->
     <item diff="add" dg="b7031">
      <p>Group references are now allowed in 
       <code>&lt;xs:all&gt;</code> model groups.
       Such
       references <rfc2119>must</rfc2119> have <code>minOccurs=maxOccurs=1</code> and <rfc2119>must</rfc2119> refer
       to other <code>&lt;xs:all&gt;</code> groups.
       (This change
       resolves issue
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7031">
        7031 XSD 1.1 doesn't support conversion of xs:sequence to xs:all
        because xs:all can't contain groups references</loc>.)
      </p>
     </item>

     <!--* Smaller technical issues, user-facing *-->

     <item diff="add" dg="b7695">
      <p>The definition of conformnance classes in section
       <specref ref="concepts-conformance"/> has been clarified.
      </p>
     </item>

     <!--* editorial, stylistic *-->

     <item diff="add" dg="b5164">
      <p>The usage of <quote><termref def="key-vn">validation</termref></quote>, 
       <quote><termref def="key-va"/></quote>, and related terms has been clarified
       and made more consistent.
      </p>
     </item>


     <!--* Smaller technical issues, implementor-facing *--> 	

     <item diff="add" dg="b7913">
      <p>A bug in the definition of the <termref def="key-governing-ed"/> has been fixed.</p>
     </item>

     <item diff="add" dg="b7813v2">
      <p>The rules regarding the default behavior of open content have
       been changed.  The XML mapping rule (in 
       <specref ref="dcl.ctd.ctcc.common"/>) has been adjusted to
       provide more graceful behavior when default open content is
       specified and open content is also inherited from a type
       being extended; in that case, the union of the two open content
       wildcards is now taken.
      </p>
     </item>


     <!--* not worth individual description *-->
     <item>
      <p>Several editorial corrections and improvements have been made.</p>
      <!--* 6008a editorial changes (John Arwe) *-->
      <!--* 5163 cleanup to schemalocation (John Arwe) *-->
      <!--* 7787 Description of change to Element Declarations Consistent is confusing
            7796 Misleading statement on change to unions
            7818 Statement on wildcard unions misleading
            5156 Sec. 3.4.2 XML Representation of Complex Type Definitions
      *-->
      <!--* 5507 clean up description of symbol spaces *-->
      <!--* 6698 provide both dated and undated DTDs and schema documents *-->
     </item>

    </ulist>
   </p>

   <p dg="x1011">For those primarily interested in the changes since version 1.0,
    the <phrase dg="wd4.ch">appendix</phrase>
    <specref ref="changes"/><!--*
* material suppressed here by diff group wd4.ch *
*--> is the recommended starting
    point.  <phrase dg="wd4.ch">It summarizes both changes made
     since XSD<!--*
* material suppressed here by diff group b5266 *
*--> 1.0 and some changes which were expected (and predicted
     in earlier drafts of this specification) but have not been made
     after all.</phrase>
    Accompanying versions of this document display in color
    all changes to normative text since version 1.0 and since the
    previous Working Draft.</p>

   <!--*
* material suppressed here by diff group bugreports *
*-->


   <p dg="bugreports">
    <!--*
* material suppressed here by diff group LC.200912 *
*--><phrase dg="LC.200912">
     The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2005/10/Process-20051014/tr#last-call">Last Call
      review period</loc>
     for this document extends until 31 December 2009.
    </phrase>
    Comments on this document should be made in
    W3C's public installation of Bugzilla, 
    specifying "XML Schema" as the product. 
    Instructions can be found at 
    <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/XML/2006/01/public-bugzilla">http://www.w3.org/XML/2006/01/public-bugzilla</loc>.
    If access to Bugzilla is not feasible, 
    please send your comments to the W3C XML Schema comments mailing list, 
    <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="mailto:www-xml-schema-comments@w3.org">www-xml-schema-comments@w3.org</loc> 
    (<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://lists.w3.org/Archives/Public/www-xml-schema-comments/">archive</loc>) 
    Each Bugzilla entry and email message should contain only one comment.</p>

   <p dg="b2333-feedback">Although feedback based on any
    aspect of this specification is welcome, there are certain aspects of
    the design presented herein for which the Working Group is
    particularly interested in feedback. These are designated
    <quote>priority feedback</quote> aspects of the design, and
    identified as such in editorial notes at appropriate points in this
    draft.
    <phrase dg="wd4.ch"><emph dg="LC.200912">Any feature 
      mentioned in a
      priority feedback note <!--*
* material suppressed here by diff group crhax *
*--><phrase dg="crhax">is</phrase> a <quote>feature
       at risk</quote>:</emph>  the feature may be retained as 
     is<!--*
* material suppressed here by diff group crhax *
*--> or
     dropped, depending on the feedback received from readers,
     schema authors, schema users, and implementors.</phrase>
   </p>

   <p dg="x1011">Publication as a 
    <phrase dg="wg-internal">W3C Working Draft</phrase><!--*
* material suppressed here by diff group wg-internal *
*-->
    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 dg="crhax">The 
    <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/XML/Schema">W3C XML Schema Working Group</loc> 
    intends to request advancement of this specification 
    and publication as a 
    <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2005/10/Process-20051014/tr#cfr">Proposed Recommendation</loc>
    <!--*
* material suppressed here by diff group LC.200912 *
*--><phrase dg="LC.200912">(bypassing
     the usual Candidate Recommendation phase)</phrase>
    as soon after 31 December 2009 as the following
    conditions are met.<ulist>
     <item>
      <p>A test suite is available which tests each required and optional
       feature of XSD 1.1.</p>
     </item>
     <item>
      <p>Each feature of the specification has been implemented successfully
       by at least two independent implementations.</p>
     </item>
     <item>
      <p>The Working Group has responded formally to all issues raised 
       against this document during the Candidate Recommendation period.</p>
     </item>
    </ulist>
    <phrase dg="LC.200912">The expected Proposed Recommendaton
     may include editorial changes and may possibly remove features 
     identified in this draft as being at risk.</phrase>
    <!--* It must include a link to a preliminary interoperability or 
    implementation report, or a statement that no such report exists. *-->
    <!--*
* material suppressed here by diff group LC.200912 *
*--><phrase dg="LC.200912">
     At the time this Last Call Working Draft 
     was published, no interoperability
     or implementation report had yet been prepared.</phrase>
   </p>


   <p>
    This document has been produced by the 
    <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/XML/Schema">W3C XML Schema Working Group</loc>
    as part of the W3C <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/XML/Activity">XML
     Activity</loc>. The goals of 
    <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.1 are
    discussed in the <phrase dg="b4399a">document</phrase>
    <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2003/WD-xmlschema-11-req-20030121/">Requirements 
     for XML Schema 1.1</loc><!--*
* material suppressed here by diff group b4399a *
*-->. 
    The authors of this document are
    the members of the XML Schema Working Group.  Different parts of this
    specification have different editors.
   </p>

   <!--*

   <p>Patent disclosures relevant to this specification may be found on
   the Working Group's <loc role="disclosure"
   href="http://www.w3.org/2004/01/pp-impl/19482/status">Patent
   disclosure page</loc> in conformance with the <loc
   href="http://www.w3.org/Consortium/Patent-Policy-20040205/">W3C Patent
   Policy</loc> of 5 February 2004.  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">section
   6 of the W3C Patent Policy</loc>.</p>

   *-->
   <p>This document was produced by a group operating under the <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February
     2004 W3C Patent Policy</loc>. W3C maintains a <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2004/01/pp-impl/19482/status">public list of
     any patent disclosures</loc> made in connection with the deliverables
    of the group; that page also includes instructions for disclosing a
    patent. An individual who has actual knowledge of a patent which the
    individual believes contains <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential 
     Claim(s)</loc> must disclose the information in accordance with 
    <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 
     6 of the W3C Patent Policy</loc>. </p>
   
   <!--* <p>In accordance with 
   <loc href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Exclusion">section 
   4 of the W3C Patent Policy</loc>, Working Group participants have 150
   days from the title page date of this document to exclude essential
   claims from the W3C RF licensing requirements with respect to this
   document series. Exclusions are with respect to the exclusion
   reference document, defined by the <loc href="http://www.w3.org/Consortium/Patent-Policy-20040205/">W3C Patent
   Policy</loc> to be the latest version of a document in this series
   that is published no later than 90 days after the title page date of
   this document.</p> *-->

   <p>The English version of this specification is the only normative
    version. Information about translations of this document is available
    at <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2003/03/Translations/byTechnology?technology=xmlschema">http://www.w3.org/2003/03/Translations/byTechnology?technology=xmlschema</loc>.</p>

  </status>

  <abstract id="abstract">
   <p><!--*
* material suppressed here by diff group b4399a *
*--><phrase dg="b4399a">This
     document</phrase> specifies the <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XML Schema Definition Language</phrase>,
    which offers facilities for describing the structure and constraining the contents
    of XML<!--*
* material suppressed here by diff group fpwd *
*--> documents, including those which 
    exploit the XML Namespace facility. The schema language, which is itself 
    represented in
    <phrase dg="b4399a">an</phrase> XML<!--*
* material suppressed here by diff group fpwd *
*--><phrase dg="b4399a"> vocabulary</phrase> and uses 
    namespaces, substantially reconstructs and considerably 
    extends the capabilities found in XML<!--*
* material suppressed here by diff group fpwd *
*--> 
    document type definitions (DTDs).  This specification depends on 
    <emph><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XML Schema Definition Language 1.1</phrase> Part 2: Datatypes</emph>.          
    <!--* <issue id="RQ-152i" role="1.1">
    <p><loc href="&reqs;#xml1.1" target="reqs">RQ-152 (xml1.1)</loc></p>
    <p>How should this specification be aligned with XML 1.1?  The changes in
    character set and name characters, and the question of what determines which
    ones to use, must be addressed.</p>
   </issue> *-->
   </p>
  </abstract>
  <pubstmt>
   <p>Edinburgh, et al.: World-Wide Web Consortium, XML Schema
    Working Group, 2004.</p>
  </pubstmt>
  <sourcedesc>
   <p>Created in electronic form using XML, starting from <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/XML/Group/2003/09/xmlschema-1/structures.xml">[internal draft
     of] XML Schema Part 1: Structures, Second Edition</loc>.</p>
  </sourcedesc>
  <langusage>
   <language id="EN">English</language>
   <language id="ebnf">Extended Backus-Naur Form (formal grammar)</language>
   <language>Extensible Markup Language (XML)</language> </langusage>
  <revisiondesc>
   <slist>
    <sitem id="x10.3e">Changes between XSD 1.0 2e and 1.0 3e not otherwise
     labeled.  (Bug fixes should be labeled appropriately; this is for
     things like changing 'Second edition' to 'Third edition'.)</sitem>
    <sitem id="x1011">Changes between XSD 1.0 and XSD 1.1, marked
     retrospectively to allow 1.1 tool chain to produce 1.0 document.
    </sitem>
    <sitem id="x1011-silent">Changes between XSD 1.0 and XSD 1.1, marked
     retrospectively to allow 1.1 tool chain to produce 1.0 document,
     which even diff-1.0 should treat as silent.
    </sitem>
    <sitem>For changes, see CVS change log at the end of the document.
     For marked diff groups, see the following items.</sitem>
    <sitem id="fpwd">Changes made (and with very few exceptions 
     marked as such) in the first public working draft of July 2004.
     Mostly approved 2005-02-18.  (What wasn't approved is now 
     tagged ep01.)</sitem>
    <sitem id="m01">Minor typos and corrections made by MSM; these
     will be batched together and handled in an editorial change 
     proposal.  Approved as part of EP-06, 2005-02-18.</sitem>
    <sitem id="imp">Changes to the section on import (mostly — 
     some go beyond import to the rest of the section), based on
     NM's proposal in Brisbane.  Approved as EP-07, 2005-02-18.</sitem>
    <sitem id="rq17">Non-status-quo draft changes to implement
     Brisbane partial consensus wrt RQ-17.
     Discussed 2005-02-18, into WD as non-status-quo text.
    </sitem>
    <sitem id="rq17-x">Changes originally part of rq17 abandoned when
     MSM revised the RQ-17 proposal 30 Oct 2006.
    </sitem>
    <sitem id="rq17a">Additional changes to fix links broken by rq17.
     Not discussed 2005-02-18, but into WD anyway as non-status-quo text
     (because otherwise links are broken).
    </sitem>
    <sitem id="rq17a1">Changes to attribute restriction in complex types
     and attribute group redefinition.
    </sitem>
    <sitem id="rq17a2">Another way to change attribute restriction.
    </sitem>
    <sitem id="rq17a2-x">Abandoned text for RQ-17 attribute restriction.
    </sitem>
    <sitem id="rq17aux">Auxiliary diff group for RQ-17.  Has no independent
     value; its sole purpose is to make the output valid when diff group
     rq17 and rq17a are not adopted.  Display as 'pre' iff rq17 is pre,
     otherwise display as 'post'.
     Added 2005-02-19.  Needs no discussion or approval; it's just
     an artifact of our diff system.
    </sitem>
    <sitem id="rq144">Draft rough wording (not status quo) for RQ-144.
     Discussed 2005-02-18, into WD as non-status-quo text.
     This is bug 2822; cf. bug 2846=RQ-142.
     Approved 2006-08-04.
    </sitem>
    <sitem id="rq144-wrap2">Replacement wrapper (after rq144 became
     status quo). 
     (2006-09-28: rq144-wrap2 appears to have no instances except its
     explanation.)</sitem>
    <sitem id="rq144a">Fixes to broken links caused by diff group rq144.
     Not discussed 2005-02-18, not sure what to do.  This should go
     together with rq144sc (schema construction variations).
     Approved 2006-08-18.
    </sitem>
    <sitem id="rq144nv">Sub-part of RQ-144: no variation in PSVI.
     Approved 2006-08-04.</sitem>
    <sitem id="rq144sc">Sub-part of RQ-144: schema construction variations.
     Approved 2006-08-18.</sitem>
    <sitem id="rq144fb">Sub-part of RQ-144: fallback variation.</sitem>
    <sitem id="rq144fl">Sub-part of RQ-144: psvi flavors.</sitem>
    <sitem id="rq144si">Sub-part of RQ-144: schema invocation details.</sitem>
    <sitem id="rq144cf">Sub-part of RQ-144: conformance clauses.
     Approved 2006-08-04.</sitem>
    <sitem id="rq144aux">Auxiliary diff group for RQ-144. Has no
     independent value; its sole purpose is to make the output document valid
     with or without rq144.  Display as 'pre' iff rq144 is pre;
     otherwise display as 'post'.
     Added 2005-02-19.  Does not need WG discussion or approval; it's
     just a mechanism for controlling the diff and the markup.
    </sitem>
    <sitem id="rq144wg">Changes made by WG in RQ-144 during meetings of
     4 and 18 August.</sitem>
    <sitem id="rq144wgno">'New Orleans' changes requested by WG in RQ-144
     and approved in advance by a 'New Orleans' vote,  during meetings of
     4 and 18 August.</sitem>
    <sitem id="rq144wg2">Changes made by WG in RQ-144 during ftf meetings of
     21-23 18 August.</sitem>
    <sitem id="rq144-abandoned">Deletions to RQ-144 proposal agreed on by WG 
     during ftf meetings of 21-23 18 August.</sitem>
    <sitem id="modals">An editorial proposal prepared by MSM.
     Eliminate nested modals, to avoid entailing modal logic.
     Check all occurrences of 'must', 'may', and 'should', eliminate
     where not aligned with RFC 2119.  (Not entirely successful; I
     eliminated almost all non-2119 occurrences of 'may', but not of
     'should'.)
     Partly approved 2005-02-18 as EP-08, partly postponed.  Postponed bits
     ('may') retagged as diff group 'may'.
    </sitem>
    <sitem id="may">Originally part of "modals".  Split off 2005-02-18
     after HT and MSM were unable to agree on specific cases; to be taken
     up again later.
    </sitem>
    <sitem id="ep06a">Proposed amendments to EP-06 (2005-02).
     Approved 2005-02-18.</sitem>
    <sitem id="ep08a">Proposed amendments to EP-08 (2005-02).
     Approved 2005-02-18.</sitem>
    <sitem id="ep01">Diff group for changes related to micro-components 
     (were originally tagged fpwd).  Split off from fpwd 2005-02-18.</sitem>
    <sitem id="ep01-part1">Misnamed for split-off addition of Scope to CTD --
     overtaken by context-2338.</sitem>
    <sitem id="dgaat">Diff group for changes related to anyAtomicType
     (were originally tagged fpwd).  Approved 2005-02-18.</sitem>
    <sitem id="wd2hax">Other last-minute fixes for WD 2 (2005-02).</sitem>
    <sitem id="wd2.silent">Changes which we record for the sake of
     the audit trail but which are not to be shown colored in WD 2 (2005-02).</sitem>
    <sitem id="nsq">Dummy diff group for sample non-status-quo text.</sitem>
    <sitem id="abandoned">Change markup which we decided against, but
     which for whatever reason (sentimentality, or a suspicion that
     we might change our minds back, or just a hope we will) we do
     not wish to delete. Yet.</sitem>
    <sitem id="iff">Selective change of "if" to "if and only if"
     (and other attempts to make sentences with "if" clearer).</sitem>
    <sitem id="iff.144">Changes of "if"/"then" related to RQ-144 (and thus
     possibly more controversial than those of "iff").</sitem>
    <sitem id="opt.144">Changes of "is" to "may" related to RQ-144 (and thus
     distinct in impact from those of "iff.144").
     (2006-07-26: N.B. the opt.144 changes reflect the proposition that
     what is in the PSVI is always / must be exposed by a conforming
     validator.  The WG seems to have moved firmly to the opposing
     view, that all PSVI properties are always present, and an 
     implementation does or doesn't expose them.  As a result, the 
     opt.144 changes look like an utter disaster.  Do NOT try turning
     them on!)</sitem>
    <sitem id="iff.144.r">Reverted changes formerly marked iff.144.
     Agreed 15 April 2005 (http://www.w3.org/2005/04/15-xmlschema-minutes.html#item10),
     22 April (http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2005Apr/0056.html).
     (! 2006-09-28 this diff group appears not to have any members)
    </sitem>
    <sitem id="rec12-main">Changes to reconcile overlap/conflict between parts 1 and 2</sitem>
    <sitem id="rec12-map">Changes to reconcile overlap/conflict between parts 1
     and 2 in the XML&lt;-&gt;component mapping rules</sitem>
    <sitem id="std-1915">Changes in tableaux for simple type definition to align with
     part 2, as agreed in Edinburgh.
     (These could be folded into rec12-map, probably, but
     I'm making them separate just out of caution. -MSM)</sitem>
    <sitem id="add.std-1915.b5152-std">A paragraph added by std-1915 that was
	moved by b3251 / b5152-std.  Old location, as add.</sitem>
    <sitem id="std-1915.b5152-std-move">A paragraph added by std-1915 that was
	moved by b3251 / b5152-std.  New location, as add.</sitem>
    <sitem id="std-1915-scope">Deletion of scope property in tableau for anySimpleType.
     This change was made as part of / at the same time as std-1915, but since
     scope was added after 1.0, it needs to be treated separately to get the colors
     in the diffs to come out right.</sitem>
    <sitem id="rq129">Remove dependency on canonical forms.
     N.B. some apparent errors in this diff group corrected
     silently by MSM, 2009-07-21.
    </sitem>
    <sitem id="rq129bis">Second pass on RQ-129, to implement WG instructions
     of 2006-02-17 (no real need for this to be separate from rq129
     except that I'm uncertain about these changes and want to be able
     to roll them back easily)</sitem>
    <sitem id="rq129ter">Additional pass to implement WG instructions
     of 2006-02-17 within nsq RQ-17 text.
     This does need to be separate from rq129.</sitem>
    <sitem id="rq129-lost">Material apparently mistagged when rq129 was
     first prepared, now re-tagged.  This should be 'pre'.</sitem>
    <sitem id="derive-1913">Implement RQ-120, use 'derived' consistently 
     vis a vis 'constructed'</sitem>
    <sitem id="scope-1973">Implement fix for R-96, bug in scope when decl is
     inside group defn</sitem>
    <sitem id="b1892">Fix for R-180, bug 1892.  (The entry for 1892 says 
     it's 1.0 only, but the text is the same in 1.0 and 1.1, so I'm putting
     this fix in here.)</sitem>
    <sitem id="b1915bis">Late amendments to the omnibus proposal which
     included both 1913 and 1915.  Approved by WG 16 December 2005.</sitem>
    <sitem id="b2532-rq127-r196">Health warning about white space normalization,
     approved at Toronto ftf meeting (according to bug 2532 - I seem to have
     read past it when processing the Toronto minutes).</sitem>
    <sitem id="b2333">Bug 2333 (= R-198, union of unions).  Changes to
     eliminate flattening of unions to make them contain only atomic and list
     types.  This requires changing the description of [member type
     definition] and friends; three designs are sketched, labeled b2333a,
     b2333b, and b2333c.</sitem>
    <sitem id="b2333a">Bug 2333 (= R-198, union of unions).  One way to
     handle member type definition properties in the PSVI.
     Make [member type definition] refer to the ground (bottom-level) 
     atomic or list type to which a value was ultimately assigned.
     Cost:  constraints imposed by other types in the derivation chain
     are not visible.  Cost:  if the same ground type appears more than
     once in the membership tree, we cannot know which appearance we are
     dealing with.  (This is already true in 1.0.  But in 1.0, when
     restrictions on sub-unions are lost, what difference can it
     make which appearance we have?)</sitem>
    <sitem id="b2333b">Bug 2333 (= R-198, union of unions).  Second way to
     handle member type definition properties in the PSVI. Make [member
     type definition] contain a sequence of type definitions (beginning
     with the immediate member of the declared type and ending with the
     non-union, i.e. atomic or list type) to which the value was ultimately
     assigned.  Cost:  change to component structure will disturb some WG
     members.  Cost:  the properties [member type definition name],
     [member type definition namespace],  and [member type definition
     anonymous] become kind of clumsy.  (Our own damn fault for not
     defining structures for expanded names.)</sitem>
    <sitem id="b2333c">Bug 2333 (= R-198, union of unions).  Third way to
     handle member type definition properties in the PSVI.
     Bite the bullet: make [member type definition] refer to the primitive 
     type to which a value was ultimately assigned.
     Cost:  constraints imposed by other types in the derivation chain
     are not visible.  Cost:  change in component semantics will disturb
     some WG members.  Cost:  if the same primitive type appears several
     times in the membership tree, it won't be clear which intermediate
     unions were involved.</sitem>
    <sitem id="b2333-feedback">Priority feedback request for fix
     2333.  Drafted by MSM 2006-01-27, not status quo until the
     other editors review and agree.</sitem>    
    <sitem id="add.b2333-feedback.b5152-std">Priority feedback request added
     by 2333, moved by 3251.  Old location, as add.</sitem>
    <sitem id="b2333-feedback.b5152-std-move">Priority feedback request added
     by 2333, moved by 3251.  New location, as add.</sitem>

    <sitem id="b1838">Changes for Bugzilla 1838 = RQ-152 = support for XML
     1.1.</sitem>
    <sitem id="b1838refs">Changes to bibref elements, in connection with
     1838.  Tagged retrospectively (2009-07-17) to allow XSD 1.0
     reconstructions to continue to generate short ref form "XML 1.0
     (Second Edition)" and current spec to continue to say "XML 1.0".
     The generic references to ref-xml and ref-xml-namespaces have
     been eliminated (although an editorial proposal will soon
     re-introduce them).
    </sitem>

    <sitem id="eg-1852">End-game resolution of dangling inconsistencies between
     parts 1 and 2</sitem>
    <sitem id="eg-1852-silent">Text movement in eg-1852.  Added by MSM; I have
     not done anything like a systematic search, but happened to notice that
     the definition of key-baseTypeDefinition had moved and was marked as a
     deletion in old location but not as an insertion in new one.  The
     eg-1852-silent diff group is to hold the insertion.  Mark it either pre
     or post, not colour, so that the micro-changes can be seen.</sitem>
    <sitem id="rec12-main-eg-1852-override">Added in rec12-main, but deleted in eg-1852</sitem>
    <sitem id="context-2338">Add {context} property to CTDs</sitem>
    <sitem id="ep01-revert">Revert an ep01 change per WG request</sitem>
    <sitem id="rq17p">Separate out content-model aspect of
     restriction-is-subsumption for separate consideration</sitem>
    <sitem id="ww-all">Introduce simple weakened wildcards, resolving
     Bugzilla 3519.  This proved to require more work than had been
     expected, because the existing UPA appears not to be an
     effective concept.  The group "ww-all" is used as an umbrella
     for several smaller changes: ww-LM, ww-p, and ww.</sitem>
    <sitem id="ww-LM">Auxiliary proposal, preparatory setup for ww / 3519.
     Introduces the notion that particles denote languages and
     introduces the notation L(P) for the language accepted by
     particle P.</sitem>
    <sitem id="ww-p">Auxiliary proposal, preparatory setup for ww / 3519.
     Introduces the notions of path and competition between particles.
    </sitem> 
    <sitem id="ww">Introduce simple weakened wildcards.  This group
     has the core change, making UPA allow competition between element
     declarations and weakened wildcards.
     IN ITS CURRENT STATE, IT DEPENDS CRUCIALLY ON GROUPS "ww-LM" AND "ww-p".</sitem>
    <sitem id="ww-x">Speculative / experimental text for ww / 3519.
     (At the moment, it's used for text which hasn't yet been classified
     as ww-LM, ww-p, or ww.)
    </sitem>
    <sitem id="ww-1">Changes asked for by the WG at the ftf of 2006-08.</sitem>
    <sitem id="rq146-0">cleanup included in Runtime EDC</sitem>
    <sitem id="rq146-1">Runtime EDC</sitem>
    <sitem id="rq146-2">Runtime EDC option #3</sitem>
    <sitem id="rq146-1.add.rq146-2.del">Runtime EDC</sitem>
    <sitem id="rq146-3">Runtime EDC disallow type change</sitem>
    <sitem id="rq146-x">Remove stuff from earlier drafts or editorial
     notes that no longer apply.</sitem>
    <sitem id="rq146-abandoned">Some changes where it was easier to change
     the diff group name than to comment them out.  Delete them eventually;
     for now I save them in case I get cold feet about their replacements,
     and want these bits back.</sitem>
    <sitem id="wg-internal">Phrases in status section which apply only to
     to WG-internal draft copies.</sitem>
    <sitem id="telltale">Material (in status section and possibly elsewhere) 
     which applies only to change proposals.</sitem>
    <sitem id="lp">Literate programming change:  make the master source of 
     the schema for schemas live in this document, not elsewhere.
     This was finally incorporated into dg-approved in 2006-03.
    </sitem>
    <sitem id="ast-pim">Addition of ptd, itd, and mtd to display
     for simple type definitions.  This happened after the WD of 200502 and should
     be marked as an add vis-a-vis that WD and vis-a-vis 1.0.</sitem>
    <sitem id="wd-200603">SOTD prose for the draft of March 2006.</sitem>
    <sitem id="wd3hax">Last-minute editorial changes prior to publication 
     of March 2006.</sitem>
    <sitem id="all-2506-1">Partial resolution of bug 2506, relax constraints
     on 'all' groups.  Drafted by SG, transcribed here by MSM.</sitem>
    <sitem id="all-2506-2">Another proposal for bug 2506:  allow extension of
     'all' groups to be 'all' groups.  Drafted by SG as part of his proposal,
     but separated here because it's lacks phase-1 consensus.  Revised by
     MSM 2006-09-28.</sitem>
    <sitem id="all-2506-2-adhoc">A deletion by b2506-2 that needs to be
     separate, to allow 1.0 to accept the deletion.</sitem>
    <sitem id="all-2506-3">Another proposal for bug 2506:  allow 'all' groups to be
     appear in 'sequence' or 'choice' groups.</sitem>
    <sitem id="ep17">Editorial proposal to tag all component references 
     not currently tagged. 

     attribute (declaration).
     element (declaration).
     complex type (definition).
     attribute use.
     attribute group (definition).
     model group.
     named model group.
     x particle done 2006-07-24.
     wildcards
     identity-constraint (definition)
     notation (declaration)
     annotation
     simple type definition 

    </sitem>

    <sitem id="vm3-0">Preliminary changes for versioning mechanism v-m3:
     fallback to declared type.  Editorial changes, no substantive changes
     here.</sitem>
    <sitem id="vm3-0x">
     To be merged with the rest of vm3. To remove some text added by vm3-0.
    </sitem>
    <sitem id="vm3-1">Proposal for versioning mechanism v-m3: fallback to
     declared type.  Will probably rely on vm3-0.</sitem>
    <sitem id="vm3-1-abandoned">Words I have tried to draft, but
     wasn't satisfied with.  Saved in case I want to try again.
     Delete these later. (2006-10-11)</sitem>
    <sitem id="vm3-1x">
     To be merged with the rest of vm3. To remove some text added by vm3-1.
    </sitem>
    <sitem id="vm3-2">
     Sandy's changes to vm3.
    </sitem>
    <sitem id="vm3-e">
     Sandy's extra changes not directly related to vm3.
    </sitem>
    <sitem id="vm3-4">
     MSM's changes of 29 October, late tweaks and changes to the proposal.
    </sitem>
    <sitem id="vm3a">
     More on "fallback to declared type". Use context-determined type for
     unexpected elements.
    </sitem>
    <sitem id="vm3a-1">
     Fix a bug in definition of governing element declaration.
    </sitem>
    <sitem id="b2861cc-1">Bug 2861, co-constraints as check clauses,
     part / level 1.</sitem>
    <sitem id="b2861cc-1a">MSM's modifications to SG's 2861 proposal;
     mostly kept separate to make them easier to roll back, but
     some changes in ednotes etc. not separated.</sitem>
    <sitem id="b2861cc-1b">Changes made based on WG's feedback from 08/2006
     f2f meetings.</sitem>
    <sitem id="b2861cc-1g">To support assertions in named (attribute)
     groups. Rejected at 08/2006 f2f meeting.</sitem>
    <sitem id="b2861cc-1m">To support mixed content in assert/report
     elements.</sitem>
    <sitem id="b2861cc-1p">To carry assertions in particles.
     Rejected at 08/2006 f2f meeting.</sitem>
    <sitem id="b2861cc-2">Changes to XPath subset.</sitem>
    <sitem id="b2867-1">Negative wildcards, part 1.</sitem>
    <sitem id="b2867-1a">Changes made based on WG's feedback from 08/2006
     f2f meeting.</sitem>
    <sitem id="b2867-2">Negative wildcards, part 2.</sitem>
    <sitem id="b2867-3">Negative wildcards fixes.</sitem>
    <sitem id="b3714">Correct descriptions of [element declaration]
     and [type definition] PSVI properties.</sitem>
    <sitem id="b3714-movement">Text movement for 3714.</sitem>
    <sitem id="bannotations">Annotation cluster.</sitem>
    <sitem id="bannotations-1">Additional annotation changes.</sitem>
    <sitem id="bannotations-2">MSM's proposed modifications to 
     bannotations and bannotations-1.  May be merged into them
     once we have editorial agreement; they are distinct only 
     to make it easier to roll them back.</sitem>
    <sitem id="bannotations-3">Float up annotations on attribute
     group references.</sitem>
    <sitem id="b2203">Change annotation attributes to a set.</sitem>
    <sitem id="b2505">Expose actual values in PSVI.</sitem>
    <sitem id="b2505-1">Minor fixes to PSVI subsets.</sitem>

    <!--* bugs cleared (from bugzilla) 22 Sept 2006, diff groups
    * added by MSM to execute WG decisions *-->
    <sitem id="b3573">(was once ed18-errors) A proposal to resolve bug
     3573 by revising the one place where we deviate violently from the
     rule that behavior of conforming processors in the face of errors is
     out of scope.</sitem>
    <sitem id="b3047">Keep namespace the same, add text.</sitem>
    <sitem id="b3054">Expose the governing declaration and
     governing type definition, whether the item is valid or not.</sitem>
    <sitem id="ww-oops">Fixes for some errors in the weakened wildcard
     proposal.</sitem>
    <sitem id="b3725">Proposal to eliminate the use of the term
     "context-determined declaration" for the keywords <pt>mustFind</pt>,
     <pt>skip</pt> and undefined. Begun 2006-10-09.</sitem>
    <sitem id="b3714.add.b3725.del">Material inserted by b3714 and
     now deleted again (mostly to be tagged as termdefs).
     Begun 2006-10-09.  Finished 2006-10-12, with SG's changes
     integrated.</sitem>
    <sitem id="b3725-2">Continuation of b3725, separate diff group 
     to allow us to decide later whether to present as one or as two
     proposals.  This part replaces the term 'Test' as in Test[ES,P] with 
     the concept of a complex type <term>binding</term> its
     dependents.  Begun 2006-10-09, finished 2006-10-12; SG's
     changes integrated.</sitem>
    <sitem id="b3725-2.add.rq146.del-as.add">Material inserted by b3725 and
     now deleted again by rq146, which moves the material to a different
     section.  Currently marked as 'add'.  If/when you change to 'del',
     then (a) change the ID, (b) correct the disposition files, and
     (c) change key-dft-binding to del_key-dft-binding, and 
     add_key-dft-binding to key-dft-binding.
     Begun 2006-10-10.  Elaborated 2006-10-20 by MSM, trying to
     solve broken links.</sitem>
    <sitem id="cleanup-1">A group of cleanup changes, gathered together
     in the hopes that all will be non-controversial.
     Bug 2829 RQ-156 Outlaw complex types with mixed simple content (mixedSimple).
    </sitem>
    <sitem id="b3837">
     To expose member type definitions for list of unions.
    </sitem>
    <sitem id="b3837-1">
     To pick up a stray erroneous 'must' in a description of the PSVI.
    </sitem>
    <sitem id="b2632">
     PSVI fixes for values and member type definitions.
    </sitem>
    <sitem id="b3836-1">
     Easier restriction with local targetNamespace.
    </sitem>
    <sitem id="b3836-2">
     Mark local targetNamespace as feature at risk.
    </sitem>
    <sitem id="consent-1020">Changes approved on the 'consent agenda'
     at the meeting of 2006-10-20.  Issues 2235, 2328, 2857, 2866, 2956.
    </sitem>
    <sitem id="vm13">
     Open content in complex types.
    </sitem>
    <sitem id="vm13-noneed">
     Open content in complex type restriction. Don't need additional rules because
     the updated "attribution" and "default binding" definitions covered this case.
    </sitem>
    <sitem id="vm13-abandoned">
     Part of original vm13 proposal. Don't apply anymore given the new syntax.
    </sitem>
    <sitem id="vm13-1">
     Amendments and new syntax.
    </sitem>
    <sitem id="vm13-2">
     Suggestions from WG members on VM13.
    </sitem>
    <sitem id="vm13-3">
     Make "any" under "openContent" optional.
    </sitem>
    <sitem id="b3725.add.vm13.del">
     Move stuff added earlier by 3725.
    </sitem>
    <sitem id="b3714-movement.add.vm13.del">
     Move stuff added earlier by b3714-movement.
    </sitem>
    <sitem id="ww-p.add.vm13.del">
     Move stuff added earlier by ww-p.
    </sitem>
    <sitem id="vm19">
     Not-in-schema wildcards.
    </sitem>
    <sitem id="vm19-1">
     Back out changes to wildcard constraints (negative wildcard)
     as a result of adopting vm19.
    </sitem>
    <sitem id="vm19-2">
     To replace occurrences of "intensional" with "wildcard".
    </sitem>
    <sitem id="vm19-3">
     Tentative revisions to vm19-1.
    </sitem>
    <sitem id="vm19-4">
     Tentative revisions to vm19-3.
    </sitem>
    <sitem id="add.b2867-1.del.vm19-3">
     Material added by b2867-1 and deleted by vm19-3.
    </sitem>
    <sitem id="cleanup-3">
     Clean up.
    </sitem>
    <sitem id="idc">
     IDC cluster.
    </sitem>
    <sitem id="idc-1">
     Additional IDC changes for skip and nil.
    </sitem>
    <sitem id="consent-1027">Changes approved on the 'consent agenda'
     at the meeting of 2006-10-27. 
    </sitem>
    <sitem id="cta">Conditional type assignment.
     Rough draft done 29 Oct 2006, in haste and by a
     tired editor.</sitem>
    <sitem id="cta-choices">
     Present different Conditional type assignment proposals.
    </sitem>
    <sitem id="cta-cp">
     Use Cartesian product to inherit type selections. Also includes
     Revisions suggested by Fabio Vitali.
    </sitem>
    <sitem id="cta-rt">
     Check type selections from base types at runtime.
    </sitem>
    <sitem id="cta-rt-xx">
     Changes originally part of cta-rt-xx that are no longer wanted,
     but which I haven't had the courage to delete outright.
    </sitem>
    <sitem id="cta-pf">
     Require type selection of base element be a prefix of that of derived.
    </sitem>
    <sitem id="cta-st">
     Just check the declared type (st = 'static typing').
    </sitem>
    <sitem id="cta-cprt">
     Changes common to CTA versions CP and RT.
    </sitem>
    <sitem id="cta-rtpf">
     Changes common to CTA versions RT, PF, and ST.
    </sitem>
    <sitem id="cta-tddtd">Possible change of {type definition}
     to {declared type definition}.  Separate both because it's
     a separate question and to allow me to turn change coloring off
     for it while working on the rest of CTA.</sitem>
    <sitem id="cta-error">
     Changes related to definition xs:error that aren't part of CP 
     proper.</sitem>
    <sitem id="cta-ed">Editorial changes made while working on CTA.
     They should be presented together with CTA but should be separate
     because if CTA should go down, these should be broght back.
    </sitem>
    <sitem id="cta-ed2">More editorial changes made while working on CTA.
    </sitem>
    <sitem id="cta-gst">An editorial change from "given [some set]" 
     to "subject to [a particular set of blocking keywords]", 
     as suggeested by the WG in Pisa.
    </sitem>
    <sitem id="cta-dd">Change to make every type table
     have a default type.  If none is specified in the XML source
     declaration, it's the declared type.
    </sitem>
    <sitem id="cta-down">Change to enforce run-time CTA restriction
     check from the parent element (in ELV(CT)), not from the
     child (in ELV(E)).</sitem>
    <sitem id="cta-wrap">Wrappers for conditional type assignment.
     Make this 'post' if cta is 'post' or 'colour'. Otherwise
     make this 'pre'.</sitem>
    <sitem id="cta-r1">Sandy's revision to CTA.</sitem>
    <sitem id="cta-r2">MSM's revision to CTA.</sitem>
    <sitem id="cta-r3">Sandy's revision #2 to CTA.</sitem>
    <sitem id="cta-r3xx">Material backed out of Sandy's revision #2 to CTA.</sitem>
    <sitem id="cta-r4">MSM's revision of CTA through r3.</sitem>
    <sitem id="cta-xx">Parts of CTA withdrawn.</sitem>
    <sitem id="ADD.cta-add-4419-del">
     Material added by CTA and promptly deleted by 4419, as add.
    </sitem>
    <sitem id="DEL.cta-add-4419-del">
     Material added by CTA and promptly deleted by 4419, as del.
    </sitem>
    <sitem id="cta-ta">Make "type alternative" a component.</sitem>
    <sitem id="cta-ta-2">MSM's revisions to cta-ta.  Subject to change.</sitem>
    <sitem id="cta-ta-en">Editorial notes.</sitem>
    <sitem id="cta-add-ta-del">
     Material added by CTA and promptly deleted by revision ta.
    </sitem>
    <sitem id="f2f0610">
     Amendments to various proposals from 2006/10 F2F.
    </sitem>
    <sitem id="ftf-2">
     Further amendments found in the minutes of the ftf but not
     found here.  Made by MSM 2006-12-21; marked with separate
     diff group to simplify sanity checks.
    </sitem>
    <sitem id="urtype">
     Replace all occurrence of ur-type with anyType/anySimpleType.
    </sitem>
    <sitem id="b2834">
     Multiple substitution group heads.
    </sitem>
    <sitem id="b2105">
     Namespace fix-up for applying default attributes.
    </sitem>
    <sitem id="b2105b">
     Second cut, independent of b2105, for namespace fix-up 
     for defaulted attributes.
    </sitem>
    <sitem id="b2105c">
     Third cut on namespace fix-up 
     for defaulted attributes, independent of b2105 and b2105b.
    </sitem>
    <sitem id="b2105bc">
     Things common to b2105b and b2105c.  Should be
     the same as whichever of them you are showing.
    </sitem>
    <sitem id="b2105baux">
     Auxiliary diff group, to simplify display of b2105b.
    </sitem>
    <sitem id="b2748no">
     Namespace fix-up for default values of type QName
     (no, do not perform namespace fixup).
    </sitem>
    <sitem id="b2748yes">
     Namespace fix-up for default values of type QName
     (yes, do perform namespace fixup).
    </sitem>
    <sitem id="b2850">
     Make complex type restriction work with IDC on local elements.
    </sitem>
    <sitem id="b2850aux">
     An auxiliary diff group, to make the addition of a conditional
     clause display correctly.
    </sitem>
    <sitem id="b2861cc-3">
     Amendments to Assertion proposal from telecon Dec. 15, 2006:
     remove &lt;report&gt;
    </sitem>
    <sitem id="b2861cc-4">
     Amendments to Assertion proposal from telecon Dec. 15, 2006:
     new PSVI property to indicate which Assertion is violated.
    </sitem>
    <sitem id="b2861cc-4a">
     Indicate which identity constraint is violated.
    </sitem>
    <sitem id="b2861cc-5">
     Amendments to Assertion proposal from telecon Dec. 15, 2006:
     Disallow &lt;assert&gt; in extension.
    </sitem>
    <sitem id="b4034">
     Make it clear that overridden facets do not appear in derived simple types.
    </sitem>
    <sitem id="b2781">
     Clarify what "valid restriction" means for facet values in the context of
     simple type restriction.
    </sitem>
    <sitem id="ep19">
     Minor editorial changes that should be brought to the WG
     as a group, originally marked ep99.  What's here so far is:
     - Trivial editorial tweak to a reference to namespaces.
     - Resolution to bug 4336 (correct a nested 'must').
     - Add requirements for XML Schema 1.1 to the informative references.
     - Add a note warning that IDs with value constraints go beyond DTDs.
    </sitem>
    <sitem id="ep19b">
     Some editorial changes in ELV(CT).
    </sitem>
    <sitem id="ep-rr">
     Tag 'resolved' more systematically, with links to the two QName
     resolution rules.
    </sitem>
    <sitem id="ep99">
     Minor editorial changes that should be brought to the WG
     as a group.  '99' is an arbitrary number than means "later".
     When these go to the WG, give them a 'real' EP number (as was
     done with ep19).
    </sitem>
    <sitem id="ep999">
     Minor editorial changes that may be taken care of or not.
    </sitem>
    <sitem id="ep99v1.0">
     Minor editorial changes and corrections in the 1.0 text.
    </sitem>
    <sitem id="b2067-common">
     Namespace fixup for chameleon include and IDC.
    </sitem>
    <sitem id="b2067">
     By changing unprefixed QNames to use the new target namespace.
    </sitem>
    <sitem id="b2067-1">
     By changing the default namespace according to the setting of the
     xpathDefaultNamespace attribute.
    </sitem>
    <sitem id="b2067a">
     Clarify how chameleon include changes namespace names in wildards.
    </sitem>
    <sitem id="b2067-2">
     By saying "as if the included/redefined schema doc had targetNamespace".
     Includes WG amendment to proposal as shipped.
    </sitem>
    <sitem id="b2067-2e">
     Editorial changes that go with 2067-2 proposal.
    </sitem>
    <sitem id="b3948">
     Provide identifiers of different versions of the schema language.
    </sitem>
    <sitem id="f2f0701a">
     Explicit amendments received at 2007-01/02 face 2 face meeting.
    </sitem>
    <sitem id="f2f0701b">
     "Editors, do your best" amendments received at 2007-01/02 face 2 face meeting.
    </sitem>
    <sitem id="f2f0701b-aux">
     Auxiliary diff group (to allow text motion to show white instead of yellow and red)
    </sitem>
    <sitem id="f2f0701c">
     MSM's revision of f2f0701b.
    </sitem>
    <sitem id="f2f0701d">
     Sandy's revision of f2f0701c.
    </sitem>
    <sitem id="f2f0701e">
     MSM's revision of f2f0701d (and possibly other stuff, if I'm not
     careful).
    </sitem>
    <sitem id="f2f0701x">
     Rejected options for type defaulting with multi-sub-group-heads.
    </sitem>
    <sitem id="consent-1020-move-ftf0701">Movement of text originally added
     by consent-1020 and moved by f2f0701c</sitem>
    <sitem id="trimtree">
     Specification of how XPath 2.0 expressions are evaluated
     for assertions:  make an XDM instance with the element as its
     root, decorated with the context-determined type (or the
     instance-specified type).
    </sitem>
    <sitem id="trimtree-x">
     Part of tree-trimming proposal Sandy wishes to revert.
    </sitem>
    <sitem id="trimtree-1">
     Other changes Sandy wishes to include in tree-trimming proposal.
    </sitem>
    <sitem id="trimtree-a">
     Additional changes for Version A, about what type to use when CDT is absent.
    </sitem>
    <sitem id="trimtree-b">
     Additional changes for Version B, about what type to use when GTD is absent.
    </sitem>
    <sitem id="trimtree-cdt">
     Use context-determined type definition in the XDM tree.
    </sitem>
    <sitem id="trimtree-gtd">
     Use governing type definition in the XDM tree.
    </sitem>
    <sitem id="typelesstree">
     Alternate description of XDM typing:  everything is
     labeled untyped or untypedAtomic, and if you want types
     you had better cast for them.
     Included as a precaution for the day when QT sees that
     we're proposing to build data model instances with 
     type annotations that have not been validated.
    </sitem>
    <sitem id="ttcommon">Changes common to trimtree-cdt,
     trimtree-gtd, and typelesstree.  Things should be set up
     so that everything works right if 
     (a) all three of those, plus ttcommon, plus tmcc, are 
     colour (for the proposal to go to WG), or
     (b) exactly ONE of those three is colour or post,
     and ttmc is pre, and ttcommon is colour or post
     (for final text).
    </sitem>
    <sitem id="ttmc">tt 'master of ceremonies':  text for
     labels like 'Version A:'</sitem>
    <sitem id="b4416">
     Proposal M for typing the trimmed tree. The sub-tree is typed as usual;
     the root is anyType (also try to type the simple content of the root)
    </sitem>
    <sitem id="b4416-1">
     Try to type simple content.
    </sitem>
    <sitem id="b4416-2">
     Amendments to the proposal from WG.
    </sitem>
    <sitem id="b4416-3">
     Amendments to the proposal from editors.
    </sitem>
    <sitem id="b4416-4">
     Further amendments (MSM, 24 July 2007).
    </sitem>
    <sitem id="b4416-en">
     Editorial note(s) for 4416.
    </sitem>
    <sitem id="b4416-wrap">
     Wrapper for 4416 changes that need a wrapper.
     Set this to post if any 4416 changes are colour or nsq or post,
     otherwise to pre.
    </sitem>
    <sitem id="b4416-x">
     Text for 4416 that's no longer used.
    </sitem>
    <sitem id="b4087">
     Use string instead of token as the datatype for assertion tests
    </sitem>
    <sitem id="b3817">
     Schema location fails to resolve.
    </sitem>
    <sitem id="b2225">
     Validation rule for xsi: attributes.
    </sitem>
    <sitem id="b4299">
     xsi:type fails to resolve and lax assessment.
    </sitem>
    <sitem id="b4299b">
     MSM addition(s) to b4299
    </sitem>
    <sitem id="b4299c">
     WG amendment to 4299 proposal.
    </sitem>
    <sitem id="b4299d">
     xsi:type must resolve
    </sitem>
    <sitem id="b4269">
     Assessment vs. strict-assessment for elements.
    </sitem>
    <sitem id="b4337">
     Allowing abstract elements in substitution groups.
    </sitem>
    <sitem id="b4314">
     Support default attribute group to ease xml: attribute handling.
    </sitem>
    <sitem id="b4314-1">
     Amendments to 4314 proposal approved by WG during Mar. 2007 F2F.
    </sitem>
    <sitem id="b2861cc-6">
     Allow type promotion in assertions.
    </sitem>
    <sitem id="b2861cc-7">
     XPath evaluation errors.
    </sitem>
    <sitem id="b4369">
     Take "assertion"s under "restriction" and "extension" into account.
    </sitem>
    <sitem id="b4348">
     Allow multiple ID attributes on the same element
    </sitem>
    <sitem id="b3968">
     Clarify that ID elements idenfity themselves, as opposed to their parents.
    </sitem>
    <sitem id="b1890">
     To clarify that schema built-in components can be referenced from within a
     schema document without needing an "import" element.
    </sitem>
    <sitem id="b1890-choices">
     Intro words. Should become "pre" when we decide which one to pick.
    </sitem>
    <sitem id="b1890-a">
     Solution A: references to all built-in components.
    </sitem>
    <sitem id="b1890-b">
     Solution B: references to all built-in components in schema namespace.
    </sitem>
    <sitem id="b1890-ab">
     Changes common to A and B.
    </sitem>
    <sitem id="b1890-c">
     Solution C: references to all components in schema namespace.
    </sitem>
    <sitem id="b1890-cp">
     Solution C': references to all components in schema/instance namespace.
    </sitem>
    <sitem id="b4437">
     Remove the requirement that "it's an error for an xsi: schema location to
     appear after the first occurrence of the corresponding namespace".
    </sitem>
    <sitem id="b4438">
     Remove the misleading note below the complex type extension note.
    </sitem>
    <sitem id="b4438-1">
     WG amendments to proposal for 4438.
    </sitem>
    <sitem id="rq17a2.del.b4438.add">
     Add the back the "all derivation can be done by an extension followed by a
     restriction" rule.
    </sitem>
    <sitem id="b4439">
     Store annotations under "openContent" and "defaultOpenContent".
    </sitem>
    <sitem id="b4159">
     Augment base infoset with information from legacy types.
    </sitem>
    <sitem id="b4159-1">
     Augment base infoset with information from element-only content.
    </sitem>
    <sitem id="b4159-2">
     More infoset properties for default attributes.
    </sitem>
    <sitem id="b4159-3">
     More infoset properties for default attributes - wg amendment.
    </sitem>
    <sitem id="bugreports">
     Update to prose about filing comments.
    </sitem>
    <sitem id="b4399">
     Proposed name change:  XSD.  (With all that that entails.)
    </sitem>
    <sitem id="b4399a">
     Second layer of changes.  No particular reason for this to be separate
     from b4399 except possible regret in cases of overlapping changes.
    </sitem>
    <sitem id="b2041">
     Apply IDREF/ENTITY/ENTITIES rules to defaulted values.
    </sitem>
    <sitem id="b2182">
     A type derived from a union type can't be a member of that union type.
    </sitem>
    <sitem id="b2197">
     Forbid "complexType" and "complexContent" having different "maixed" values.
    </sitem>
    <sitem id="b4565">
     Use "effective value constraint" for applying default attributes.
    </sitem>
    <sitem id="b4517">
     Allow value constraints on ID-derived types.
    </sitem>
    <sitem id="b4363">
     Don't apply value constraints specified on xsi: attributes.
    </sitem>
    <sitem id="b4363-1">
     Amendments from 2007-06-08 telecon on 4363.
    </sitem>
    <sitem id="b4419">
     Specify XPath static and dynamic contexts.
     (The XPath property record has been split off; it is now xppr so 
     that it can be included by CTA.)
    </sitem>
    <sitem id="b4419-fchoices">
     Different ways to specify mapping rules for IDC fields.
    </sitem>
    <sitem id="b4419-f1">
     Don't repeat selector rules.
    </sitem>
    <sitem id="b4419-f2">
     Repeat selector rules.
    </sitem>
    <sitem id="b4419-f3">
     Factor selector rules out symmetrically.
    </sitem>
    <sitem id="b4419-en">
     Editorial notes for 4419.
    </sitem>
    <sitem id="b4419-4">
     MSM revisions for 4419 (at same time as b4416-4).
    </sitem>
    <sitem id="b4419-x">
     Text for 4419 we got cold feet over but didn't want to delete yet.
    </sitem>
    <sitem id="b4467">
     For complex types with simple content, the CDT is inherited
     from its base type.
    </sitem>
    <sitem id="xppr">
     Definition of the XPath property record. For use by b4419 and by cta.
    </sitem>
    <sitem id="b4767">
     Support &lt;xs:override&gt;.
    </sitem>
    <sitem id="b4767b">
     MSM's tentative revisions to 4767, in case SG hates them.
    </sitem>
    <sitem id="b4767-en">
     Editorial notes for support of &lt;xs:override&gt;.
    </sitem>
    <sitem id="b2067n">
     Update QName references in chameleon included documents.
    </sitem>    
    <sitem id="b2067m">
     MSM tweaks to wording of 2067n.
    </sitem>
    <sitem id="b2067-d2">
     Specify that in chameleon include / redefine, it's the 
     munged document that should conform.
    </sitem>
    <sitem id="b2067-d3">
     Another attempt to specify that in chameleon include / redefine, it's the 
     munged document that should conform.
    </sitem>
    <sitem id="b2825-1">
     Layer 1 of proposal for forward processing using minVersion and
     maxVersion attributes.
    </sitem>
    <sitem id="b2825-2">
     SG's revision.
    </sitem>
    <sitem id="b2825-3">
     MSM's revision.
    </sitem>
    <sitem id="b2825-conf">
     Clarification of conformance issues related to proposal b2825.
    </sitem>
    <sitem id="wg20070803">
     Amendments made by the WG on 2007-08-03 telecon to proposals:
     2825, CTA, and 2067.
    </sitem>
    <sitem id="ed20070803">
     Notes and other changes made by the editors on very general / vague
     WG instructions on 2007-08-03 telecon.  This is a separate diff
     group so we can make in nsq in the Last Call publication candidate.
    </sitem>

    <sitem id="wd4.ch">
     Changes to appendix describing changes since 1.0, in draft of August 2007.
    </sitem>
    <sitem id="wd4.mv">
     Text movement in the appendix describing changes since 1.0, in draft of 
     August 2007.  The deletions and additions aren't really deletions or
     additions, just movement.  (Or in some cases, wrappers.) 
     Show this as colour only for special purposes,
     if you're sure you know what you're doing.
    </sitem>
    <sitem>    
     A bunch of diff groups to cover paragraphs in the changelist appendix
     added by some named group and now deleted / moved.:
     <phrase id="ADD.b2867-1-add-wd4-del"/>
     <phrase id="DEL.b2867-1-add-wd4-del"/>
     
     <phrase id="ADD.ww1-add-wd4-del"/>
     <phrase id="DEL.ww1-add-wd4-del"/>
     
     <phrase id="ADD.b2861cc-1-add-wd4-del"/>
     <phrase id="DEL.b2861cc-1-add-wd4-del"/>
     
     <phrase id="ADD.ep01-add-wd4-del"/>
     <phrase id="DEL.ep01-add-wd4-del"/>

     <phrase id="ADD.fpwd.add.wd4.del"/>
     <phrase id="DEL.fpwd.add.wd4.del"/>
    </sitem>
    <sitem id="wd-200708-1">Updates made for LCWD of August 2007.</sitem>

    <sitem id="b2316">
     Change to definition of eligible item set to resolve issue 2316
     (use of the term 'constructed').
    </sitem>

    <!-- Consent Agenda 2008-01-18 starts -->
    <sitem id="consent-080118">
     Changes prepared for the 'consent agenda' for the meeting of 2008-01-18,
     covering the following issues.
    </sitem>
    <sitem id="b2082"/>
    <sitem id="b2162"/>
    <sitem id="b2218"/>
    <sitem id="b2311"/>
    <sitem id="b3889"/>
    <sitem id="b3891"/>
    <sitem id="b3892"/>
    <sitem id="b3892b">MSM's reworking of 3892</sitem>
    <sitem id="b3963">Also covers bug 4470 and 5258</sitem>
    <sitem id="b4398"/>
    <sitem id="b4518"/>
    <sitem id="b5004"/>
    <sitem id="b5029">Typos and small problems reported by Michael Kay.</sitem>
    <sitem id="b5052">Also covers bug 5263</sitem>
    <sitem id="b5053"/>
    <sitem id="b5059"/>
    <sitem id="b5072">Typos and small problems reported by Xan Gregg.</sitem>
    <sitem id="b5074">Infelicity reported by Xan Gregg.</sitem>
    <sitem id="b5076">Also covers bug 5077</sitem>
    <sitem id="b5142"/>
    <sitem id="b5146"/>
    <sitem id="b5161"/>
    <sitem id="b5265"/>
    <!-- Consent Agenda 2008-01-18 endss -->

    <sitem id="b4912">Alignment with Datatypes in description of 
     {member type definitions} property.
    </sitem>

    <!-- Consent Agenda 2008-02-15 starts -->
    <sitem id="consent-080215">
     Changes prepared for the 'consent agenda' for the meeting of 2008-02-15,
     covering the following issues.
    </sitem>
    <sitem id="b2195"/>
    <sitem id="b3589"/>
    <sitem id="b3724"/>
    <sitem id="b4202"/>
    <sitem id="b4280"/>
    <sitem id="b5160"/>
    <sitem id="b5193"/>
    <sitem id="b5266"/>
    <sitem id="b5274"/>
    <!-- Consent Agenda 2008-02-15 ends -->

    <sitem id="b5168">Bug 5168, to make maxVersion exclusive.</sitem>
    <sitem id="b5200">Bug 5200, to support "##definedSibling".</sitem>
    <sitem id="b5200b">MSM's proposed modes to b5200.</sitem>
    <sitem id="b5200c">Sandy's revision.</sitem>
    <sitem id="b5200x">5200-related material to suppress.</sitem>
    <sitem id="b5200bx">5200b-related material to suppress.</sitem>
    <sitem id="b5200-en">Editorial notes for bug 5200.</sitem>
    <sitem id="add.vm19.b5200b">Added by vm19, deleted by 5200b, appears as 'add'.</sitem>
    <sitem id="vm19.b5200b.del">Added by vm19, deleted by 5200b, appears as 'del'.</sitem>
    <sitem id="b5273">Bug 5273, to move "xpathDefaultNamespace" to
     field/selector.</sitem>
    <sitem id="b5276">Bug 5276, relax rules around targetNamespace on local
     elements/attributes.</sitem>
    <sitem id="b5276-c">Alternative wording 3: restriction, not anyType.</sitem>
    <sitem id="b5281">Bug 5281, to check names in those constraints.</sitem>
    <sitem id="b5282">Bug 5282, to overlapping sub-groups in UPA; definition
     of sub-groups.</sitem>
    
    <sitem id="b5157">Bug 5157, to clarify notQName example.</sitem>
    <sitem id="b5286">Bug 5286, to remove component constraints from 3.x.3.</sitem>
    <sitem id="b5286-en">Editorial notes for bug 5286.</sitem>
    <sitem id="b5286b">Extensions for bug 5286, approved 11 April 2008.</sitem>
    <sitem id="b5286c">SG text that MSM is unsure of (deleted after WG 
     coin toss went to version d).</sitem>
    <sitem id="b5286d">MSM alternatives to b5286c text.</sitem>
    <sitem id="b5286e">Text about attribute reference circularity,
     unrolled by WG from 5286b, to be integrated with fixed-point
     proposal.</sitem>
    <sitem id="b5286e2">MSM mods to 5286e.</sitem>
    <sitem id="b5286e-x">Changes drafted for 5286e but then not taken.</sitem>
    <sitem id="b5286e-aux">Some auxiliary changes / moves to do silently.</sitem>
    <sitem id="add.vm19.b5286">Material added by vm19
    and deleted by b5286b, tagged as an 'add'.</sitem>
    <sitem id="vm19.b5286.del">Material added by vm19
    and deleted by b5286b, tagged as a 'del'.</sitem>
    <sitem id="b5286b-en">Editorial notes for bug 5286b.</sitem>
    <sitem id="b5286e-en">Editorial notes for bug 5286e.</sitem>
    
    <sitem id="b5165a">Bug 5165, first installment.  Split constraint sections
     so that each constraint is in a subsection.  Supply headings; perhaps supply
     introductory paragraphs?  (No.  Do them. but separate them 
     from the mechanical split-and-add-section-title.
    </sitem>
    <sitem id="b5165b">Bug 5165, splits on infoset contributions (to allow these to 
     be rolled back if we hate them).
    </sitem>
    <sitem id="b5165c">Bug 5165, first sketch of introductory paragraphs.
    </sitem>
    <sitem id="b5165a-dummy">Bug 5165, first installment, splits that contain
     only deleted material (so the new head should not show up). 
     We could just include the material with other stuff nearby, but that
     clutters things up.  This way things like the old Particle Valid (Restriction)
     constraint are enclosed a bit more tidily and are easier to skip over in
     navigation.
    </sitem>
    <sitem id="b5165xx">Bug 5165, draft text I'm not using but don't want to
     delete yet.</sitem>
    <sitem id="b4299b.add.b5165.del.asadd">Material added by b4299b and deleted by
     b5165a.
    </sitem>
    <sitem id="b4299b.add.b5165.del.asdel">Material added by b4299b and deleted by
     b5165a.
    </sitem>


    <sitem id="ep20">Simplify mentions of QNames and QName matching;
     no issue number, this is just an editorial proposal.  It came up
     when I was looking at bug 5257.
    </sitem>
    <sitem id="ep20aux0">Ancillary diff group for ep20</sitem>
    <sitem id="ep20aux1">Ancillary diff group for ep20</sitem>
    <sitem id="ep20b">Define components as having expanded names.</sitem>
    <sitem id="ep20c">Collapse local vs. global rule in
     "Element Sequence Accepted (Particle)"</sitem>
    <sitem id="ep20x">EP 20 ideas that didn't take.</sitem>
    <sitem id="ep21">Define L(T) for basic terms T.</sitem>
    <sitem id="ep22">More variable names in constraintnotes.</sitem>
    <sitem id="ep22aux">invisible changes for ep22, do not colour.</sitem>
    <sitem id="b5164">Changes for 5164, use 'assessment' and 'validation'
     more consistently.</sitem>
    <sitem id="b5164-aux">Changes for 5164, silent.</sitem>
    <sitem id="b5164x">Changes drafted for 5164, then dropped.</sitem>
    <sitem id="ep24">Introduce dot operator for components and info items.</sitem>
    <sitem id="ep24-aux">Containing elements for ep24.</sitem>
    <sitem id="ep25">Introduce variables for infoset contributions.</sitem>
    <sitem id="ep98">Further changes (related to clarity and choice of
     verb) in constraintnotes.  Began as part of ep22, but it will be
     more difficult and controversial and should be factored out.</sitem>
    <sitem id="ep98aux">invisible changes for ep98, do not colour.</sitem>
    <sitem id="b5426">XPath subset used by Assertions and Type Alternatives.</sitem>
    <sitem id="b5426-o">Changes not related to 5426.</sitem>
    <sitem id="b5426w">WG changes to XPath subset</sitem>
    <sitem id="b5145">John Arwe, miscellaneous editorial stuff</sitem>
    <sitem id="b5145b">Sandy's amendments to 5145.</sitem>
    <sitem id="b5150">John Arwe, miscellaneous editorial stuff</sitem>
    <sitem id="b5156">John Arwe, miscellaneous editorial stuff</sitem>
    <sitem id="b5156-choices">Choose between the following alternatives.</sitem>
    <sitem id="b5156a">First formulation of how "prohibited" is handled.</sitem>
    <sitem id="b5156b">Sandy's formulation.</sitem>
    <sitem id="b5156c">Another formulation (option C) from MSM.</sitem>
    <sitem id="b5156c2">Yet another formulation (option C2) from MSM.</sitem>
    <sitem id="b5156d">Late amendments from John Arwe (24 March).</sitem>
    <sitem id="b5158">John Arwe, miscellaneous editorial stuff</sitem>
    <sitem id="b5158b">Sandy's amendments to 5158.</sitem>
    <sitem id="b5167">John Arwe, miscellaneous editorial stuff</sitem>
    <sitem id="b5194">Michael Kay, miscellaneous editorial stuff</sitem>
    <sitem id="b5195">Michael Kay, editorial comment on 3.4.4</sitem>
    <sitem id="add.rq17a2.b5195">material added by rq17a2, deleted by 5195, as add</sitem>
    <sitem id="rq17a2.b5195.del">material added by rq17a2, deleted by 5195, as del</sitem>
    <sitem id="b5195a-rejected">Version A: 3 definitions.</sitem>
    <sitem id="b5195b">Version B: 1 definition</sitem>
    <sitem id="b5231">SML request for XPath subset names</sitem>
    <sitem id="b4276">Make reference to 'absent' as value clearer</sitem>
    <sitem id="b5137">editorial fixes, MK</sitem>
    <sitem id="b5139">editorial fixes, MK</sitem>
    <sitem id="b5139-x">change not adopted by WG</sitem>
    <sitem id="b5139-1">amendments from WG</sitem>
    <sitem id="b5141">editorial fixes, JA</sitem>
    <sitem id="b5144">more editorial fixes, JA</sitem>
    <sitem id="add.ww.b5144">added by ww, deleted by 5144</sitem>
    <sitem id="ww.b5144.del">added by ww, deleted by 5144</sitem>
    <sitem id="b3220">must and error</sitem>
    <sitem id="b3220b">changes for 3220 that may need separate handling</sitem>
    <sitem id="b3220c">changes related to xsi: attributes and conformance;
     hope to deal with it under a different bug.</sitem>
    <sitem id="b3220d">revisions to 3220, 30 April 2008.
     Not sure whether these really need to be separate or not.</sitem>
    <sitem id="b3076">xml-1.0 vs xml-1.1 datatypes, terminology</sitem>
    <sitem id="b5504">bug 5504 don't allow extensions to have different annotations
     on shared components (not complete)</sitem>
    <sitem id="b5150b">John Arwe, miscellaneous editorial stuff; changes missed
     first time round</sitem>
    <sitem id="b5030">Assertions on simple types</sitem>
    <sitem id="b3251">Implementation-defined primitives</sitem>
    <sitem id="b3251i">Change many occurrences of normalized value to initial value,
     and make whitespace processing explicit in cvc-simple-type (String
     Valid) rule.  Separate because this may be controversial and if so it 
     needs to be easily unwound.</sitem>
    <sitem id="b3251-f">Tentative change for unknown facets.</sitem>
    <sitem id="b3251a">Sandy's revision.</sitem>

    <sitem id="b5152-movement">Bug 5152, break the large unbroken reprdef blocks
     where possible.</sitem>
    <sitem id="b5152">Bug 5152, textual changes, with SG's revisions
     incorporated.</sitem>
    <sitem id="b5152-std-movement">Tentative change for unknown facets.</sitem>
    <sitem id="b5152-std">Parts of 5152 relevant for simple types (and thus for 3251).</sitem>
    <sitem id="b5152-movement.xr.ct11">Hack for element xr.ct11</sitem>
    
    <sitem id="add-b2195.b5152-movement">Material added by b2195,
     moved by 5152. Old location, as add.</sitem>
    <sitem id="b2195.b5152-move">Material added by b2195,
     moved by 5152. New location, as add.</sitem>
    <sitem id="add-b2850.b5152-movement">Material added by 2850 and then moved.
     Old position, as add.</sitem>
    <sitem id="b2850.b5152-move">Material added by 2850 and then moved.
     New position, as add.</sitem>
    <sitem id="add-b2861cc-1.b5152-movement">Material added by
     b2861cc-1, moved by 5152. Old location, as add.</sitem>
    <sitem id="b2861cc-1.b5152-move">Material added by
     b2861cc-1, moved by 5152. New location, as add.</sitem>    
    <sitem id="del-b2861cc-3.b5152-movement">Material deleted by b2861cc-3 
     and (later!) moved by 5152.
     Old location, as del.</sitem>
    <sitem id="b2861cc-3.b5152-move">Material deleted by b2861cc-3 and
     (later!) moved by 5152. New location, as del.</sitem>
    <sitem id="add.b3836-2.b5152-movement">Material added by b3836-2 and then moved.
     Old location, as add.
     When b5152 is post, this should be pre (to prevent the material showing up
     in the wrong place).  (The new location will be labeled b3836-2, so as to
     show up in color in diff-1.0, in its new location, and not colored in other
     forms.  Ditto for the following.)
    </sitem>
    <sitem id="b3836-2.b5152-move">Material added by b3836-2 and then moved.
     New location, as add.
     If disp(b5152) = pre, then pre,
     else if disp(b5152) = post/colour then disp(b3836-2)
     When b5152-movement is post, this should be post.  When 3836-2 is (also)
     colour, this should be colour.  This is for the new location, when it
     cannot be labeled b3836-2.
    </sitem>
    <sitem id="add-b5194.b5152-movement">Material added by b5194,
     moved by 5152. Old location, as add.</sitem>
    <sitem id="b5194.b5152-move">Material added by b5194,
     moved by 5152. New location, as add.</sitem>
    <sitem id="add-b5286d.b5152-movement">Material added by b5286d,
     moved by 5152. Old location, as add.</sitem>
    <sitem id="b5286d.b5152-move">Material added by b5286d,
     moved by 5152. New location, as add.</sitem>
    <sitem id="add.vm13.b5152-movement">Material added by vm13 and then moved.  
     Old location, as add.</sitem>
    <sitem id="vm13.b5152-move">Material added by vm13 and then moved.
     New location, as add.</sitem>
    <sitem id="b5293">Allow run-time checking of subsumption.</sitem>
    <sitem id="b5293b">Disallow non-trivial "all" restricts "sequence/choice".
     Declined by WG after discussion, 2008-05-23, removed from source.
    </sitem>
    <sitem id="b5293x">Suggest to delete.</sitem>
    <sitem id="b5512">Definition of schema-document conformance.</sitem>
    <sitem id="b5435">Valid schema</sitem>


    <sitem id="b2224">Proposal to deprecate <eltref ref="redefine"/></sitem>
    <sitem id="b5328">Definition of 'actual value'.</sitem>
    <sitem id="b2047">list equality / identity</sitem>
    <sitem id="b5078">missing components</sitem>
    <sitem id="b5078-aux">missing components</sitem>
    <sitem id="b5078a">missing components</sitem>
    <sitem id="b5078b">missing components</sitem>
    <sitem id="b5078ab">common text for ab</sitem>
    <sitem id="wgi-20080530">WG instructions from 30 May 2008</sitem>
    <sitem id="b5487">last-ditch proposal:  magic nss are impl-dependent</sitem>
    <sitem id="wgi-20080606">WG instructions from 6 June 2008</sitem>
    <sitem id="b5030tf">Task force for assertions on simple types</sitem>
    <sitem id="b5030tf-x">Pentimenti</sitem>
    <sitem id="b4416-wrap..b5030tf.del">Portmanteau</sitem>
    <sitem id="wgi-20080613">WG instructions from 13 June 2008</sitem>

    <sitem id="b5904">Bug 5904, Unknown attributes in vc namespace</sitem>
    <sitem id="b5905">Bug 5905, vc:typeAvailable and vc:typeUnavailable</sitem>
    <sitem id="b5930">Bug 5930, defaultOpenContent in the S4SD</sitem>
    <sitem id="b5934">Bug 5934, Typo concerning mixed="true" on simpleContent</sitem>
    <sitem id="ed-20080621">Changes made immediately after publication of 2008-06-21
	(in sotd only), to re-orient toward WG use.</sitem>

    <sitem id="b4316">Bug 4316, Make sure namespace prefixes are used
     appropriately throughout structures</sitem>
    <sitem id="b4690">Bug 4690, use "locally declared type" instead of
     "context-determined type"</sitem>
    <sitem id="b5140">Bug 5140, small editorial changes in 3.3</sitem>
    <sitem id="b5148">Bug 5148, consistent usage of "if present, otherwise..."</sitem>
    <sitem id="b5476">Bug 5476, resolve xsi:schemaLocation if directed</sitem>
    <sitem id="b5639">Bug 5639, facets in simple type restriction</sitem>
    <sitem id="b5916">Bug 5916, remove left-over ed-note.</sitem>
    <sitem id="b5917">Bug 5917, fix a typo.</sitem>

    <sitem id="b5800">Bug 5800, complete the list of required infoset properties.</sitem>
    <sitem id="b6120">Bug 6120, remove blockDefault from SD4SD.</sitem>
    <sitem id="b6144">Bug 6144, store annotation under idc+ref on element decls.</sitem>
    <sitem id="b6156">Bug 6156, fix typo in 3.4.2.</sitem>
    <sitem id="b6162">Bug 6162, disallow sibling in attribute wildcards.</sitem>
    <sitem id="b6165">Bug 6165, make "any" and "anyAttribute" consistent.</sitem>
    <sitem id="b6165-adhoc">Bug 6165, secondary text movement (see comments).</sitem>
    <sitem id="b6166">Bug 6166, disallow notNamespace="".</sitem>
    <sitem id="b6167">Bug 6167, add "one or more is true" to "Attribute Wildcard Intersection".</sitem>
    <sitem id="b6170">Bug 6170, default attributes comes the last.</sitem>

    <sitem id="b6163">Bug 6163, make all wildcard unions expressible.</sitem>
    <sitem id="b6163a">Related to bug 6163, use "union", not "intersection".</sitem>
    <sitem id="add.xxx.b6163.del.as.del">material deleted by 6163 that was added after 1.0</sitem>
    <sitem id="b6175">Bug 6175, UPA appendix reference to Wildcard Intersection.</sitem>

    <sitem id="b5003">Bug 5003, access to xml:lang from CTA.</sitem>
    <sitem id="b5003-en">Bug 5003, editorial notes.</sitem>
    <sitem id="b5003a">Bug 5003, CTA with opening up ancestors.</sitem>
    <sitem id="b5426w.b5003a">Bug b5003a, revert some b5426w changes.</sitem>
    <sitem id="b5003ab">Bug 5003, changes common to options A and B.</sitem>
    <sitem id="b5003b">Bug 5003, CTA without opening up ancestors.</sitem>
    <sitem id="b5003c">Bug 5003, make inheritable attributes available in the PSVI.</sitem>
    <sitem id="b5907">Bug 5907, fix CTA XPath subset to allow cast and constructors.</sitem>
    <sitem id="b5426w.b5907">Bug 5907, revert some b5426w changes.</sitem>
    <sitem id="b5907-en">Bug 5907, editorial notes about BNF changes.</sitem>
    <sitem id="b5940">Bug 5940, {type table} EDC and skip wildcards and {open content}.</sitem>

    <sitem id="b5918">Bug 5918, consider &lt;redefine in global component mapping.</sitem>
    <sitem id="b5918a">Bug 5918, introduce "top-level" and "global".</sitem>
    <sitem id="b6159">Bug 6159, handle "defined" and "sibing" in "Item Valid (Wildcard)".</sitem>
    <sitem id="b6161">Bug 6161, wildcard subset "must" to "are"; "'s" to ".".</sitem>
    <sitem id="b6161-en">Bug 6161, editorial note describing the change.</sitem>
    <sitem id="b6201">Bug 6201, particle constraints applicability.</sitem>
    <sitem id="b6204">Bug 6204, base type of anyType.</sitem>
    <sitem id="b6540">Bug 6540, make collections empty for assertins.</sitem>
    <sitem id="b6541">Bug 6541, required functions for assertions.</sitem>
    <sitem id="b6561">Bug 6561, context-determined type table and anyType/skip wildcards.</sitem>
    <sitem id="b6561a">Bug 6561, context-determined type table and skip wildcards.</sitem>
    <sitem id="b6561b">Bug 6561, context-determined type table and anyType.</sitem>
    <sitem id="b6561c">Bug 6561, post-adoption changes and cleanup.</sitem>
    <sitem id="b6685">Bug 6685, particle restriction external references.</sitem>
    <sitem id="b6685b">Bug 6685, deletion of appendix. Separate for technical reasons.</sitem>
    <sitem id="b6685x">Bug 6685, changes not adopted as part of 6685.</sitem>
    <sitem id="b6011">Bug 6011, use [base URI] for relative schema locations.</sitem>
    <sitem id="b6011bis">Bug 6011, clarification (reverses some of a change made for 5800).</sitem>
    <sitem id="b6187">Bug 6187, Remove "eltref" from sectoin headings.</sitem>
    <sitem id="b6227">Bug 6227, change anySimpleType back to anyType in
     Type Derivation OK (simple).</sitem>
    <sitem id="b6233">Bug 6233, fix the link to the "nil" clause.</sitem>
    <sitem id="b6235">Bug 6235, health warning about producing bad component from mapping rules.</sitem>

    <sitem id="b5800-reverted">Late fix to wording for 5800.</sitem>
    <sitem id="b6021">Bug 6021, define scoped transformation to make override more useful.</sitem>
    <sitem id="b6021-movement">Bug 6021, text movement.</sitem>
    <sitem id="b6021r">Variant of 6021 which includes redefine in the definition of the
     target set of an override element.</sitem>
    <sitem id="b6021nr">Variant of 6021 which excludes redefine in the definition of the
     target set of an override element.</sitem>
    <sitem id="add.b4767b.b6021">Material added by 4767b and deleted by 6021, as add</sitem>
    <sitem id="b4767b.b6021.del">Material added by 4767b and deleted by 6021, as del</sitem>

    <sitem id="b1913">Bug 1913, update "derived".</sitem>
    <sitem id="b5412">Bug 5412, update "lax assessment" to cover "missing components".</sitem>
    <sitem id="b5748">Bug 5748, update 3.4.4.4 section title.</sitem>
    <sitem id="b6008">Bug 6008, small editorial changes.</sitem>
    <sitem id="b6008a">Bug 6008 followup, small editorial changes.</sitem>
    <sitem id="b6008axx">Bug 6008 followup, changes proposed but reverted
	(retained temporarily, delete after December 2009).</sitem>
    <sitem id="b6012">Bug 6012, consistent text.</sitem>
    <sitem id="b6012b">Bug 6012, some post-adoption cleanup (John is a careful reader).</sitem>
    <sitem id="b6014">Bug 6014, normative text issues.</sitem>
    
    <sitem id="ep28">Editorial proposal EP 28, some terminology in
     composition section (experimental)</sitem>
    <sitem id="ep29">Editorial proposal EP 29, fixpoint semantics of include</sitem>
    <sitem id="ep29k">Michael Kay's proposedl revisions to EP 29</sitem>
    <sitem id="ep30">Editorial proposal EP 30, exclude schema description components
     from unions</sitem>
    <sitem id="ed200902">MSM affiliation change.</sitem>
    
    <sitem id="b5293far1">Feature at risk note about "all" group restriction.</sitem>
    <sitem id="b5293far2">Feature at risk note about reporting schema errors at runtime.</sitem>
    <sitem id="b6382">Priority feedback on changes to "block" in complex types.</sitem>
    <sitem id="b6445">Namespace fixup bug.</sitem>
    <sitem id="b6465">Namespace foxup for inherited attributes.</sitem>
    <sitem id="b6314">drop some dead text about xpath subset</sitem>
    <sitem id="b2753">component diagram(s)</sitem>

    <sitem id="b6021k">Michael Kay's comments on 6021, silently adopted by 
     editors in preparation for next Last Call.</sitem>
    <sitem id="b6021-promise">Bug 6021, things still to be done.  Someday.</sitem>

    <sitem id="lc200901">Unilateral last-minute editors' changes for 
     last-call draft of January 2009.</sitem>

    <sitem id="b5023">Discuss overlap between assertions and identity constraint and cta</sitem>
    <sitem id="b5779">Clarify, again and louder, that unimported nss cannot be referred to</sitem>
    <sitem id="b5779movement">Text movement for b5779</sitem>
    <sitem id="b6655">WAI PF on user control of dereferencing policy</sitem>
    <sitem id="b5781">node sequence, not node set</sitem>
    <sitem id="b6009">John Arwe, list of confusing bits</sitem>
    <sitem id="b6009b">late revisions (to propose as amendments in call)</sitem>
    <sitem id="b6553">changes to W3C references</sitem>
    <sitem id="ep6553">misc references cleanup</sitem>
    <sitem id="ep6553m">misc references cleanup - quiet text movement</sitem>
    <sitem id="b2632b">Late revision for bug 2632</sitem>
    <sitem id="b6804">make note in example about assertions more helpful</sitem>

    <sitem id="b6013">new example for type table and wildcards</sitem>
    <sitem id="b6013a">new example for wildcards</sitem>
    <sitem id="b6735">whitespace in list types are fixed to collapse</sitem>
    <sitem id="b5167a">Add SCD and update mentions of xpointer</sitem>
    
    <!--* ugly hacks *-->
    <!--* Diff groups to make deletions silent in diff-1.0, material deleted was new *-->
    <sitem id="b5165a.b5286e-del"/>
    <sitem id="f2f0701b-silent"/>
    <sitem id="b5281-silent"/>
    <sitem id="b6163-silent"/>
    <sitem id="vm19-1-silent"/>
    <sitem id="b5286-silent"/>
    <sitem id="b2333-silent"/>
    <sitem id="b5639-silent"/>
    <!--* insert headings where necessary, even if it's not really right *-->
    <sitem id="b5165a-special"/>

    <sitem id="crhax">Changes made for CR publication April 2009</sitem>
    <!--* portmanteau tags; I hope you understand these, becaue I don't
        * have time to explain.  *-->
    <sitem id="hither.b5152.cr.del-as-hither"/>
    <sitem id="hither.b5152.cr.del-as-del"/>
    <sitem id="add.rq144wg2.cr.del-as-add"/>
    <sitem id="add.rq144wg2.cr.del-as-del"/>
    <sitem id="add.b2333-feedback.b5152-std-move.cr.del-as-add"/>
    <sitem id="add.b2333-feedback.b5152-std-move.cr.del-as-del"/>
    <sitem id="add.b2333-feedback.cr.del-as-add"/>
    <sitem id="add.b2333-feedback.cr.del-as-del"/>

    <sitem id="b6722">Recast definition of 'laxly assessed',
    common text.</sitem>
    <sitem id="b6722b">Bug 6722 text movement FROM locs (show silently sometimes).</sitem>
    <sitem id="b6722c">Bug 6722 text movement TO locs (show silently sometimes).</sitem>
    <sitem id="b7069">Paternalsm and open content, 2009-07-24.</sitem>
    <sitem id="b7096">Annotation mapping, text from Bugzilla.</sitem>
    <sitem id="b5163">Some small clarifications on compositions, courtesy of John Arwe.</sitem>
    <sitem id="b7031">Allow refs to "all" groups from within "all" groups</sitem>
    <sitem id="b2783">s/constitute a restriction of ... with respect to .../
	is the result of overlaying ... with .../</sitem>
    <sitem id="b6698">Provide both dated and undated schema documents</sitem>
    <sitem id="ep33">MK request to number the bits of Change list</sitem>
    <sitem id="b7242">"inherited attributes" are not used by Assertions.</sitem>
    <sitem id="b7352">Remove default value for "nillable" from schema for schemas.</sitem>
    <sitem id="b5507">Recast description of symbol spaces.</sitem>
    <sitem id="b6015">Bug 6015, further on 'validation' and 'infoset' (resolved	
     together with 5164)
    </sitem>
    <sitem id="b7787">K Braun on dynamic EDC</sitem>
    <sitem id="b7787b">followup (he never tires)</sitem>
    <sitem id="b7796">K Braun on restricted unions</sitem>
    <sitem id="b7818">K Braun on wildcard unions</sitem>
    <sitem id="b7813v2">K Braun on open content</sitem>
    <sitem id="b5156e">Further editorial nits in Complex Type mapping rules section 
	(John Arwe)</sitem>
    <sitem id="b5159">Section name changes (JA again)</sitem>
    <sitem id="b5159a">Use 'XML Representation of X, Y, and Z Schema Components'</sitem>
    <sitem id="b5159b">Use 'The xs:... Element'</sitem>
    <sitem id="b7695">Conformance clause revisions</sitem>
    <sitem id="b7985">Fix botched proposal for bug 6043 explicitTimezone</sitem>
    <sitem id="b7913">fix problem in definition of governing element declaration</sitem>
    <sitem id="b7913aux">Silent parts of 7913</sitem>
    <sitem id="b8262">Bug 8282, changing variable names for schema docs</sitem>
    <sitem id="b8342">Bug 8342, small wording change for HT</sitem>

    <sitem id="LC.200912">Changes for Last Call draft of Dec 2009</sitem>

    <sitem id="pre">material we don't want to delete but which shouldn't show</sitem>

    <!-- Dummy components to discharge IDREFs which will turn into xspecrefs. 
    Any actual use of these _should_ be
    accompanied by a name attribute allowing an xtermref to
    Part 2 to be generated. -->
    <sitem id="f-w">Whitespace facet</sitem>
    <sitem id="f-e">enumeration facet</sitem>
    <sitem id="ff">Fundamental facet</sitem>
    <sitem id="f">Constraining facet</sitem>
   </slist>
  </revisiondesc>
 </header>
 <body>
  <div1 id="intro">
   <head>Introduction</head>
   <p>This document sets out the structural part <!--*
* material suppressed here by diff group b4399 *
*--> of the <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XML Schema Definition Language</phrase>.</p>
   <p>Chapter 2 presents a <specref ref="concepts"/> for <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase>, including an introduction to the
    nature of <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--> schemas</phrase> and an introduction to the <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase>
    abstract data model, along with other terminology used throughout
    this document. </p>
   <p>Chapter 3, <specref ref="components"/>, specifies the precise
    semantics of each component of the abstract model, the
    representation of each component in XML, with reference to a DTD
    and <phrase dg="b4399">an</phrase> <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--> schema</phrase> for
    an <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> document type, along with a detailed mapping
    between the elements and attribute vocabulary of this
    representation and the components and properties of the abstract
    model.</p>
   <p>Chapter 4 presents <specref ref="composition"/>, including the
    connection between documents and schemas, the import, inclusion
    and redefinition of declarations and definitions and the
    foundations of schema-validity assessment.</p>
   <p>Chapter 5 discusses <specref ref="conformance"/>, including the
    overall approach to schema-validity assessment of documents, and
    responsibilities of schema-aware processors. </p>
   <p>The normative appendices include a <specref ref="normative-schemaSchema"/> for the XML representation of
    schemas and
    <specref ref="normative-references"/>.</p>
   <p>The non-normative appendices include the <specref ref="nonnormative-schemaDTD"/> and a <specref ref="normative-glossary"/>.</p>
   <p>This document is primarily intended as a language definition
    reference. As such, although it contains a few examples, it is
    <emph>not</emph> primarily designed to serve as a motivating
    introduction to the design and its features, or as a tutorial for
    new users. Rather it presents a careful and fully explicit
    definition of that design, suitable for guiding implementations.
    For those in search of a step-by-step introduction to the design,
    the non-normative <bibref ref="bib-expo"/>
    is a much better starting point than this document.</p>

   <div2 id="intro1.1" dg="fpwd">
    <head>Introduction to Version 1.1</head>

    <p>The Working Group has <!--*
* material suppressed here by diff group b2861cc-1 *
*--><phrase dg="b2861cc-1">three</phrase> main goals for this version of W3C
     XML Schema:</p>
    <ulist>
     <item><p>Significant improvements in simplicity of design and
       clarity of exposition <emph>without</emph> loss of backward
       <emph>or</emph> forward compatibility;
      </p></item>

     <item><p>Provision of support for versioning of XML languages
       defined using <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">this</phrase>
       specification, including the XML <!--*
* material suppressed here by diff group b5137 *
*--><phrase dg="b5137">vocabulary
	specified here for use in schema documents</phrase>.</p></item>
     
     <item dg="b2861cc-1"><p>Provision of support for
       co-occurrence constraints, that is constraints which make the
       presence of an attribute or element, or the values allowable
       for it, depend on the value or presence of other attributes or
       elements.</p></item>
     
    </ulist>
    <p>These goals are <!--*
* material suppressed here by diff group ep06a *
*-->
     in tension with one another<!--*
* material suppressed here by diff group ep06a *
*--><phrase dg="ep06a">. The</phrase> Working Group's strategic guidelines
     for changes between versions 1.0 and 1.1<phrase dg="ep06a"> can be summarized as follows</phrase>:</p>
    <olist>

     <item><p><!--*
* material suppressed here by diff group ep06a *
*--><phrase dg="ep06a">Support</phrase>
       for versioning (acknowledging that this <emph>may</emph> be
       slightly disruptive to the XML transfer syntax at the
       margins)</p></item>

     <item dg="b2861cc-1"><p>Support for co-occurrence
       constraints (which will certainly involve additions to the XML
       transfer syntax, which will not be understood by 1.0
       processors)</p></item>

     <item><p><!--*
* material suppressed here by diff group ep06a *
*--><phrase dg="ep06a">B</phrase>ug fixes (unless in specific
       cases we decide that the fix is too disruptive for a point
       release)</p></item>

     <item><p><!--*
* material suppressed here by diff group ep06a *
*--><phrase dg="ep06a">E</phrase>ditorial changes</p></item>

     <item><p><!--*
* material suppressed here by diff group ep06a *
*--><phrase dg="ep06a">D</phrase>esign cleanup <!--*
* material suppressed here by diff group ep06a *
*--><phrase dg="ep06a">will possibly</phrase> change behavior in edge
       cases</p></item>

     <item><p><!--*
* material suppressed here by diff group ep06a *
*--><phrase dg="ep06a">N</phrase>on-disruptive changes to type hierarchy
       (to better support current and forthcoming international
       standards and W3C recommendations)</p></item>

     <item><p><!--*
* material suppressed here by diff group ep06a *
*--><phrase dg="ep06a">D</phrase>esign cleanup <!--*
* material suppressed here by diff group ep06a *
*--><phrase dg="ep06a">will possibly</phrase> change component structure
       (changes to functionality restricted to edge cases)</p></item>

     <item><p><!--*
* material suppressed here by diff group ep06a *
*--><phrase dg="ep06a">No</phrase>
       significant changes in <phrase dg="b2861cc-1b">existing</phrase> functionality</p></item>

     <item><p><!--*
* material suppressed here by diff group ep06a *
*--><phrase dg="ep06a">No</phrase> changes
       to XML transfer syntax except those required by version control
       hooks<phrase dg="b2861cc-1b">, co-occurrence
	constraints</phrase> and bug fixes</p></item>

    </olist>
    <p>The <!--*
* material suppressed here by diff group ep06a *
*--><phrase dg="ep06a">aim with regard
      to</phrase> compatibility is that</p>

    <ulist>
     <item><p>All schema documents conformant to version 1.0 of this
       specification should also conform to version 1.1, and should
       have the same <phrase diff="del" dg="b5164">validation</phrase><phrase diff="add" dg="b5164"><termref def="key-va"/></phrase> behavio<!--*
* material suppressed here by diff group b2861cc-1 *
*-->r across 1.0 and 1.1 implementations
       (except possibly in edge cases and in the details of the
       resulting PSVI);</p></item>
     <item><p>The vast majority of schema documents conformant to
       version 1.1 of this specification should also conform to
       version 1.0, leaving aside any incompatibilities arising from
       support for versioning<phrase dg="b2861cc-1"> or
	co-occurrence constraints</phrase>, and when they are
       conformant to version 1.0 (or are made conformant by the
       removal of versioning information), should have the same
       <phrase diff="del" dg="b5164">validation</phrase><phrase diff="add" dg="b5164"><termref def="key-va"/></phrase> behavio<!--*
* material suppressed here by diff group b2861cc-1 *
*-->r
       across 1.0 and 1.1 implementations (again except possibly in
       edge cases and in the details of the resulting PSVI)<phrase dg="ep99">;</phrase><!--*
* material suppressed here by diff group ep99 *
*-->
      </p></item>
    </ulist>
   </div2>
   <div2 id="intro-purpose">
    <head>Purpose</head>
    <!--* b4399 work needed !!! *--> 
    <p>The purpose of <emph>XML Schema<phrase dg="b4399"> Definition Language</phrase>: Structures</emph> is to define the nature of 
     <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--> schemas</phrase> and their component parts,
     provide an inventory of XML markup constructs with which to
     represent schemas, and define the application of schemas to XML
     documents. </p>
    <p>The purpose of an <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> schema is to define and describe a
     class of XML documents by using schema components to constrain
     and document the meaning, usage and relationships of their
     constituent parts: datatypes, elements and their content and
     attributes and their values. Schemas <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">can</phrase> also provide for
     the specification of additional document information, such as
     normalization and defaulting of attribute and element values.
     Schemas have facilities for self-documentation. Thus, <emph>XML Schema<phrase dg="b4399"> Definition Language</phrase>: Structures</emph> can
     be used to define, describe and catalogue XML vocabularies for
     classes of XML documents. </p>

    <p>Any application that consumes well-formed XML can use the
     <!--*
* material suppressed here by diff group b4399a *
*--> formalism <phrase dg="b4399a">defined here</phrase> to express
     syntactic, structural and value constraints applicable to its
     document instances. The <!--*
* material suppressed here by diff group b4399a *
*--><phrase dg="b4399a">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> formalism allows a useful level of
     constraint checking to be described and implemented for a wide
     spectrum of XML applications.  However, the language defined by
     this specification does not attempt to provide <emph>all</emph>
     the facilities that might be needed by <!--*
* material suppressed here by diff group ep19 *
*--><phrase dg="ep19">applications</phrase>. Some applications
     <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">will</phrase> require constraint capabilities not expressible in this
     language, and so <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">will</phrase> need to perform their own additional
     validations.</p>
   </div2>
     
   <div2 id="nss_langids" dg="b3948">
    <head>Namespaces and Language Identifiers</head>
    <div3 id="xsd-nss" dg="f2f0701b-aux">
     <head><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> Namespaces</head>
     <div4 id="xsd-namespace">
      <head>The Schema Namespace (<code>xs</code>)</head>
      <p>
       The XML representation of schema components uses a vocabulary
       identified by the namespace name <code>http://www.w3.org/2001/XMLSchema</code>.
       For brevity, the text and examples in this specification use
       the prefix <code>xs:</code> <!--*
* material suppressed here by diff group b5265 *
*--> to stand for this
       namespace; in practice, any prefix can be used.
      </p>
      <note dg="b3047"><p>
	The namespace for schema documents is unchanged from version
	1.0 of this specification, because any schema document valid
	under the rules of version 1.0 has essentially the same
	<phrase diff="del" dg="b5164">validation</phrase><phrase diff="add" dg="b5164"><termref def="key-va"/></phrase> semantics under this specification as it did under
	<!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">version 1.0 (Second Edition)</phrase>.
	There are a few exceptions to this rule, involving errors in
	version 1.0 of this specification which were not reparable by
	errata and which have therefore been fixed only in this
	version of this specification, not in version 1.0.
       </p></note>
      <note><p>
   The data model used by <bibref ref="bib-xpath2"/> and other
	specifications, namely <bibref ref="bib-xdm"/>, makes use of
	type labels in the
	<!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> namespace (<code>untyped</code>,
	<code>untypedAtomic</code>) which are not defined in this
	specification; see the <bibref ref="bib-xdm"/>
	specification for details of those types.
       </p></note>

      <p dg="consent-1020-move-ftf0701">
       Users of the namespaces defined here should be aware, as a
       matter of namespace policy, that more names <!--*
* material suppressed here by diff group f2f0701c *
*-->
       <phrase dg="f2f0701c">in this namespace may be given
	definitions</phrase> in future versions of this or other
       specifications.
      </p>

     </div4>
     <div4 id="xsi-namespace">
      <head>The Schema Instance Namespace (<code>xsi</code>)</head>
      <p><!--*
* material suppressed here by diff group b4399a *
*--><phrase dg="b4399a">This specification</phrase> defines
       several attributes for direct use in any XML documents, as
       described in <specref ref="Instance_Document_Constructions"/>.
       These attributes are in the namespace <phrase dg="f2f0701c">whose</phrase> name <phrase dg="f2f0701c">is</phrase> <code>http://www.w3.org/2001/XMLSchema-instance</code>.
       For brevity, the text and examples in this specification use
       the prefix <code>xsi:</code> to stand for this <!--*
* material suppressed here by diff group f2f0701c *
*--> namespace; in
       practice, any prefix can be used.
      </p>

      <p dg="consent-1020-move-ftf0701">
       Users of the namespaces defined here should be aware, as a
       matter of namespace policy, that more names <!--*
* material suppressed here by diff group f2f0701c *
*-->
       <phrase dg="f2f0701c">in this namespace may be given
	definitions</phrase> in future versions of this or other
       specifications.
      </p>
     </div4>
     <div4 id="vc-namespace" dg="b2825-1">
      <head>The Schema Versioning Namespace (<code>vc</code>)</head>
      <p>
       The pre-processing of schema documents described in 
       <specref ref="cip"/> uses <!--*
* material suppressed here by diff group b3251 *
*-->
       attributes in the namespace
       <code>http://www.w3.org/2007/XMLSchema-versioning</code>.
       For brevity, the text and examples in this specification use
       the prefix <code>vc:</code> to stand for this
       namespace; in practice, any prefix can be used.
      </p>

      <p>
       Users of the namespaces defined here should be aware, as a
       matter of namespace policy, that more names in this namespace
       may be given definitions in future versions of this or other
       specifications.
      </p>

     </div4>
    </div3>

    <div3 id="sec-nss-special" dg="b5487">
     <head>Namespaces with Special Status</head>
     <p>Except as otherwise specified elsewhere in this specification,
      if components are <termref def="key-nonnull"/> in a schema, or source
      declarations are included in an XSD schema document, for
      components in any of the following namespaces, then the
      components, or the declarations, <rfc2119>should</rfc2119> agree with the
      descriptions given in the relevant specifications and with the
      declarations given in any applicable XSD schema documents
      maintained by the World Wide Web Consortium for these
      namespaces.  If they do not, the effect is <termref def="key-impl-dep">implementation-dependent</termref>
      and not defined by this specification.
      <ulist>
       <item>
	<p><code>http://www.w3.org/XML/1998/namespace</code></p>
       </item>
       <item>
	<p><code>http://www.w3.org/2001/XMLSchema</code></p>
       </item>
       <item>
	<p><code>http://www.w3.org/2001/XMLSchema-instance</code></p>
       </item>
       <item>
	<p><code>http://www.w3.org/2007/XMLSchema-versioning</code></p>
       </item>
      </ulist>
      </p>
     <note>
      <p>Depending on implementation details, some processors may
       be able to process and use (for example) variant forms of the
       schema for schema documents devised for specialized purposes;
       if so, this specification does not forbid the use of such variant
       components.  Other processors, however, may find it 
       impossible to validate and use alternative components for
       these namespaces; this specification does not require them
       to do so.  Users who have an interest in such specialized
       processing should be aware of the attending interoperability
       problems and should exercise caution.
      </p>
      <p>
       This flexibility does not extend to the components described in
       this specification or in <bibref ref="ref-xsp2"/> as being
       included in every schema, such as those for the primitive and
       other built-in datatypes.  Since those components are by
       definition part of evey schema, it is not possible to have
       different components with the same <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded names</xspecref> present in
       the schema without violating constraints defined elsewhere
       against multiple components with the same <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded names</xspecref>.
      </p>
     </note>
     <!--*
     <p>If components or source declarations are supplied for
      the following namespace, they &must; agree with the
      normative specifications.  If they do not, the schema
      and/or schema document is in &error;.
      <ulist>
       <item>
	<p><code>http://www.w3.org/2000/xmlns/</code></p>
       </item>
      </ulist>
     </p>
     *-->

     <p>Components and source declarations <rfc2119>must not</rfc2119> specify
      <code>http://www.w3.org/2000/xmlns/</code> as their
      target namespace.  If they do, then the schema
      and/or schema document is in <termref def="dt-error">error</termref>.
     </p>
     <note>
      <p>Any confusion in the use, structure, or meaning of this namespace
       would have catastrophic effects on the interpretability of
       this specification.
      </p>
     </note>
    </div3>

    <div3 id="ns-bindings" dg="f2f0701c">
     <head>Conventional Namespace Bindings</head>
     <p>Several namespace prefixes are conventionally used in this
      document for notational convenience.  The following bindings are
      assumed.<ulist>
       <item>
	<p><code>fn</code> bound to
	 <code>http://www.w3.org/2005/xpath-functions</code> (defined
	 in <bibref ref="bib-fno"/></p>
       </item>
       <item>
	<p><code>html</code> bound to
	 <code>http://www.w3.org/1999/xhtml</code></p>
       </item>
       <item>
	<p><code>my</code> (in examples) bound to the target namespace
	 of the example schema document</p>
       </item>
       <!--*
* material suppressed here by diff group f2f0701e *
*-->
       <item>
	<p><code>rddl</code> bound to
	 <code>http://www.rddl.org/</code></p>
       </item>
       <item dg="b2825-1">
	<p><code>vc</code> bound to
	 <code>http://www.w3.org/2007/XMLSchema-versioning</code> (defined
	 in this and related specifications)</p>
       </item>
       <item>
	<p><code>xhtml</code> bound to
	 <code>http://www.w3.org/1999/xhtml</code></p>
       </item>
       <item>
	<p><code>xlink</code> bound to
	 <code>http://www.w3.org/1999/xlink</code></p>
       </item>
       <item>
	<p><code>xml</code> bound to
	 <code>http://www.w3.org/XML/1998/namespace</code> (defined in
	 <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/> and <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-namespaces-1.1" dg="b1838refs"/>)</p>
       </item>
       <!--*
* material suppressed here by diff group b4316 *
*-->
       <item>
	<p><code>xs</code> bound to <code>http://www.w3.org/2001/XMLSchema</code>
	 (defined in this and related specifications)</p>
       </item>
       <!--*
* material suppressed here by diff group b5265 *
*-->
       <item>
	<p><code>xsi</code> bound to
	 <code>http://www.w3.org/2001/XMLSchema-instance</code> (defined in this and
	 related specifications)</p></item>
       <item>
	<p><code>xsl</code> bound to
	 <code>http://www.w3.org/1999/XSL/Transform</code></p>
       </item>
<!--*
<item>
<p><code>ppp</code> bound to <code>nnn</code></p>
</item>
*-->
      </ulist>
     </p>
     <p>In practice, any prefix bound to the appropriate namespace
      name <rfc2119>may</rfc2119> be used (unless otherwise specified by the definition
      of the namespace in question, as for <code>xml</code> and
      <code>xmlns</code>).</p>
     
     <!--*
* material suppressed here by diff group pre *
*-->

    </div3>
    <div3 id="langids">
     <head>Schema Language Identifiers</head>
     <p>Sometimes other specifications or Application Programming
      Interfaces (APIs) need to refer to the <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XML Schema Definition Language</phrase> in
      general, sometimes they need to refer to a specific version of
      the language. To make such references easy and <!--*
* material suppressed here by diff group f2f0701c *
*--><phrase dg="f2f0701c">enable</phrase> consistent identifiers <!--*
* material suppressed here by diff group f2f0701c *
*--><phrase dg="f2f0701c">to be</phrase> used, we provide the following
      URIs <!--*
* material suppressed here by diff group f2f0701c *
*--><phrase dg="f2f0701c">to identify</phrase> these
      concepts.</p>
     <glist>
      <gitem>
       <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema</code></label>
       <def><p>
	 Identifies the <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XML Schema Definition Language</phrase> in general, without referring
	 to a specific version of it.
	</p></def>
      </gitem>
      <gitem>
       <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v<!--*
* material suppressed here by diff group f2f0701c *
*--><phrase dg="f2f0701c"><var>X</var>.<var>Y</var></phrase></code></label>
       <def><p>
	 Identifies the language described in version <!--*
* material suppressed here by diff group f2f0701c *
*--> <phrase dg="f2f0701c"><var>X</var>.<var>Y</var></phrase> of <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">the XSD<!--*
* material suppressed here by diff group b5266 *
*--> specification</phrase>. <!--*
* material suppressed here by diff group f2f0701c *
*--><phrase dg="f2f0701c">URIs of this form refer</phrase> to
	 a <phrase dg="f2f0701c">numbered</phrase> version
	 of the language in general. <!--*
* material suppressed here by diff group f2f0701c *
*--><phrase dg="f2f0701c">They do</phrase> not distinguish <!--*
* material suppressed here by diff group f2f0701c *
*--><phrase dg="f2f0701c">among</phrase> different working drafts or
	 editions of that version. For example,
	 <code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.0</code> identifies
	 <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> version 1.0 and <code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.1</code> identifies
	 <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> version 1.1.
	</p></def>
      </gitem>
      <gitem>
       <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v<!--*
* material suppressed here by diff group f2f0701c *
*--><phrase dg="f2f0701c"><var>X</var>.<var>Y</var></phrase>/<!--*
* material suppressed here by diff group f2f0701c *
*--><phrase dg="f2f0701c"><var>N</var></phrase>e</code></label>
       <def><p>
	 Identifies the language described in the <!--*
* material suppressed here by diff group f2f0701c *
*--><phrase dg="f2f0701c"><var>N</var></phrase>-th edition of version <!--*
* material suppressed here by diff group f2f0701c *
*--><code dg="f2f0701c"><phrase><var>X</var>.<var>Y</var></phrase></code> of
	 <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">the XSD<!--*
* material suppressed here by diff group b5266 *
*--> specification</phrase>. For example, <code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.0/2e</code>
	 identifies the second edition of <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> version 1.0.
	</p></def>
      </gitem>
      <gitem>
       <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v<!--*
* material suppressed here by diff group f2f0701c *
*--><phrase dg="f2f0701c"><var>X</var>.<var>Y</var>/<var>N</var>e</phrase>/yyyymmdd</code></label>
       <def><p>
	 Identifies the language described in the <!--*
* material suppressed here by diff group f2f0701c *
*--><phrase dg="f2f0701c"><var>N</var></phrase>-th edition of version
	 <code><!--*
* material suppressed here by diff group f2f0701c *
*--><phrase dg="f2f0701c"><var>X</var>.<var>Y</var></phrase></code> of
	 <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">the XSD<!--*
* material suppressed here by diff group b5266 *
*--> specification</phrase> published on the particular date
	 <code>yyyy-mm-dd</code>. For example,
	 <code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.0/1e/20001024</code> 
	 identifies <phrase dg="f2f0701c">the language
	  defined in the</phrase> <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> version 1.0 Candidate
	 Recommendation (CR) <phrase dg="f2f0701c">published on 24 October 2000,</phrase> and
	 <code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.0/2e/20040318</code> 
	 identifies <phrase dg="f2f0701c">the language
	  defined in the</phrase> <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> version 1.0 Second Edition Proposed
	 Edited Recommendation (PER)<phrase dg="f2f0701c">
	  published on 18 March 2004</phrase>. 
        <!-- <ednote><edtext>
	 This is slightly different from the task force
	 recommendation, where 1.0 CR uses
	 http://www.w3.org/2001/XMLSchema/v1.0/20001024 as opposed to
	 http://www.w3.org/2001/XMLSchema/v1.0/1e/20001024. I made
	 this change so that different drafts of different editions
	 are identified consistently: they always have the edition
	 number and each version has only one identifier.
	</edtext></ednote> -->
	</p></def>
      </gitem>
     </glist>
     <p>Please see <specref ref="nonnormative-language-ids"/> for a
      complete list of <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XML Schema Definition Language</phrase> identifiers <phrase dg="f2f0701c">which</phrase> exist to date.</p>
    </div3>
   </div2>

   <div2 id="intro-relatedWork">
    <head>Dependencies on Other Specifications</head>
    <p>The definition of <emph>XML Schema<phrase dg="b4399"> Definition Language</phrase>: Structures</emph> depends on the following
     specifications:
     <bibref ref="ref-xmlinfo"/>,
     <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-namespaces-1.1" dg="b1838refs"/>, <!--*
* material suppressed here by diff group f2f0701a *
*--> <phrase dg="b2861cc-1"><bibref ref="bib-xpath2"/>,
     </phrase>and
     <bibref ref="ref-xsp2"/>.</p>
    <p>See <specref ref="infoset"/> for a tabulation of the
     information items and properties specified in <bibref ref="ref-xmlinfo"/> which this
     specification requires as a precondition to schema-aware
     processing.</p>
    <p dg="b1838"><bibref ref="ref-xsp2"/> defines some
     datatypes which depend on definitions in <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/>
     and <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-namespaces-1.1" dg="b1838refs"/>; those definitions, and therefore
     the datatypes based on them, vary between version 1.0 (<bibref ref="ref-xml-1.0"/>, <bibref ref="ref-xml-namespaces-1.0"/>) and
     version 1.1 (<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/>, 
     <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-namespaces-1.1" dg="b1838refs"/>) of those specifications.  In any
     given schema-validity-<termref def="key-va"/>
     episode, the choice of the 1.0 or the 1.1 definition of those
     datatypes is <termref def="key-impl-defined">implementation-defined</termref>.</p>
    <p dg="b1838">
     Conforming implementations of this specification <rfc2119>may</rfc2119> provide
     either the 1.1-based datatypes or the 1.0-based datatypes, or
     both.  If both are supported, the choice of which datatypes to
     use in a particular assessment episode <rfc2119>should</rfc2119> be under user
     control.
    </p>
    <note dg="b1838"><p>
      <phrase dg="b5150b">It is a consequence of the
       rule just given that implementations</phrase> 
      <!--*
* material suppressed here by diff group b5150b *
*--> 
      <rfc2119>may</rfc2119> provide the heuristic of using the 1.1
      datatypes if the input is labeled as XML 1.1, and the 1.0
      datatypes if the input is labeled 1.0. It should be noted
      however that the XML version number is not required to be
      present in the input to an assessment episode, and in any case
      the heuristic <rfc2119>should</rfc2119> be subject to override by users, to
      support cases where users wish to accept XML 1.1 input but
      validate it using the 1.0 datatypes, or accept XML 1.0 input and
      validate it using the 1.1 datatypes.
     </p>
    </note>
    <note dg="b1838">
     <p>
      Some users will perhaps wish to accept only XML 1.1 input, or
      only XML 1.0 input. <phrase dg="b5150b">The rules 
       just given ensure that conforming</phrase><!--*
* material suppressed here by diff group b5150b *
*--> implementations of this
      specification which accept XML input <rfc2119>may</rfc2119> accept XML 1.0, XML
      1.1, or both and <rfc2119>may</rfc2119> provide user control over which versions
      of XML to accept.
     </p>
    </note>
   </div2>

   <div2 id="intro-terminology">
    <head>Documentation Conventions and Terminology</head>
    <p>The section introduces the highlighting and typography as used
     in this document to present technical material.</p>

    <p dg="b5150">Unless otherwise noted, the entire text of
     this specification is normative.  Exceptions include:
     <ulist>
      <item>
       <p>notes</p>
      </item>
      <item>
       <p>sections explicitly marked non-normative</p>
      </item>
      <item>
       <p>examples and their commentary</p>
      </item>
      <item>
       <p>informal descriptions of the consequences of rules
	formally and normatively stated elsewhere (such informal
	descriptions are typically introduced by phrases like
	<quote>Informally, ...</quote> or <quote>It is a 
	consequence of ... that ...</quote>)</p>
      </item>
     </ulist>
     Explicit statements that some material is normative are not
     to be taken as implying that material not so described
     is non-normative
     (other than that mentioned in the list just given).     
    </p>

    <!--*
* material suppressed here by diff group ADD.fpwd.add.wd4.del *
*-->
    <!--*
* material suppressed here by diff group ADD.fpwd.add.wd4.del *
*-->
    <!--*
* material suppressed here by diff group ADD.fpwd.add.wd4.del *
*-->
    <!--*
* material suppressed here by diff group DEL.fpwd.add.wd4.del *
*-->
    <!--*
* material suppressed here by diff group DEL.fpwd.add.wd4.del *
*-->
    <!--*
* material suppressed here by diff group ADD.fpwd.add.wd4.del *
*-->

    <p>Special terms are defined at their point of introduction in the
     text.  For example <termdef id="key-sampledef" term="term" role="local">a <term>term</term> is something used with a
      special meaning</termdef>.  The definition is labeled as such
     and the term it defines is displayed in boldface.  The end of the
     definition is not specially marked in the displayed or printed
     text.  Uses of defined terms are links to their definitions, set
     off with middle dots, for instance <termref def="key-sampledef">term</termref>.</p>
    <p>Non-normative examples are set off in boxes and accompanied by
     a brief explanation:</p>
    <note role="example">
     <eg xml:space="preserve">&lt;schema targetNamespace="http://www.example.com/XMLSchema/1.0/mySchema"&gt;</eg>
     <p>And an explanation of the example.</p>
    </note>
    <p>The definition of each kind of schema component consists of a
     list of its properties and their contents, followed by
     descriptions of the semantics of the properties:</p>
        <!--* !!! not sure whether it's sensible or feasible to mark this 
            * as deletion and insertion.  It changed in first WD (vis a vis
            * 1.0 2E), but I'll leave it for now. *-->
    <compdef name="Example" abbrev="ex" showAKO="true">
     <property arity="singleton" name="example property" required="true" type="Component" valueType="component">
      <description>
       <p>An example property</p>
      </description>
     </property>
    </compdef>
    <p>References to properties of schema components are links to the
     relevant definition as exemplified above, set off with curly
     braces, for instance 
     <propref comp="ex" prop="example property"/>.</p>
    <p dg="ep24">For a given component <var>C</var>, an expression
     of the form <quote><var>C</var>.<propref comp="ex" prop="example property"/></quote>
     denotes the (value of the) property 
     <propref comp="ex" prop="example property"/> for component <var>C</var>.
     The leading <quote><var>C</var>.</quote> (or more) is sometimes omitted,
     if the identity of the component and any other omitted properties
     is understood from the context.
     This <quote>dot operator</quote> is left-associative, so
     <quote><var>C</var>.<propref comp="ex" role="generic" prop="p1"/>.<propref role="generic" comp="ex" prop="p2"/></quote>
     means the same as 
     <quote>(<var>C</var>.<propref comp="ex" prop="p1" role="generic"/>) . 
     <propref comp="ex" prop="p2" role="generic"/></quote>
     and denotes the value of property <propref comp="ex" prop="p2" role="generic"/>
     within the component or <termref def="t-propRec"/> which itself
     is the value of <var>C</var>'s <propref comp="ex" prop="p1" role="generic"/>  property.
     White space on either side of the dot operator has no significance
     and is used (rarely) solely for legibility.
    </p>
    <p dg="ep24">For components <var>C</var><sub>1</sub> and <var>C</var><sub>2</sub>, an expression
     of the form <quote><var>C</var><sub>1</sub> . <propref comp="ex" prop="example property 1" role="generic"/> =  <var>C</var><sub>2</sub> . <propref comp="ex" role="generic" prop="example property 2"/></quote>
     means that <var>C</var><sub>1</sub> and <var>C</var><sub>2</sub> have the same value for the
     property (or properties) in question.  Similarly,
     <quote><var>C</var><sub>1</sub> = <var>C</var><sub>2</sub></quote> means that <var>C</var><sub>1</sub> and <var>C</var><sub>2</sub> are
     identical, and <quote><var>C</var><sub>1</sub>.<propref comp="ex" prop="example property"/>
     =  <var>C</var><sub>2</sub></quote> that <var>C</var><sub>2</sub> is the value of 
     <var>C</var><sub>1</sub>.<propref comp="ex" prop="example property"/>.</p>

    <!--*
    <p diff="add" dg="ep24">
     In passages describing constraints on the values of various
     component properties, the equals sign (=) is used with the obvious
     meaning.
    </p> *-->
    <p>The correspondence between an element information item which is
     part of the XML representation of a schema and one or more schema
     components is presented in a tableau which illustrates the
     element information item(s) involved. This is followed by a
     tabulation of the correspondence between properties of the
     component and properties of the information item.  Where context
     <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">determines</phrase> which of several
     different components <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">corresponds to the
      source declaration</phrase>, several tabulations, one per
     context, are given.  The property correspondences are normative,
     as are the illustrations of the XML representation element
     information items.
    </p>
    <p>In the XML representation, bold-face attribute names (e.g.
     <term>count</term> below) indicate a required attribute
     information item, and the rest are optional.  Where an attribute
     information item has an enumerated type definition, the values
     are shown separated by vertical bars, as for <code>size</code>
     below; if there is a default value, it is shown following a
     colon.  Where an attribute information item has a built-in simple
     type definition defined in <bibref ref="ref-xsp2"/>, a hyperlink
     to
     its definition therein is given.</p>
    <p>The allowed content of the information item is shown as a
     grammar fragment, using the Kleene operators <code>?</code>,
     <code>*</code> and <code>+</code>.  Each element name therein is
     a hyperlink to its own illustration.</p>
    <note>
     <p>The illustrations are derived automatically from the <specref ref="normative-schemaSchema"/>.  In the case of apparent
      conflict, the <specref ref="normative-schemaSchema"/> takes
      precedence, as it, together with the <termref def="gloss-src">Schema Representation Constraints</termref>,
      provide the normative statement of the form of XML
      representations.</p>
    </note>
    <reprdef>
     <reprelt eltname="example"/>
     <reprcomp abstract="Example" ref="intro-terminology">
      <propmap comp="ex" prop="example property">Description of what
       the property corresponds to, e.g. the value of the
       <code>size</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>
      </propmap>
     </reprcomp>
    </reprdef>
    <p>References to elements in the text are links to the relevant
     illustration as exemplified above, set off with angle brackets,
     for instance <eltref ref="example"/>.</p>
    <p dg="ep24">
     Unless otherwise specified, references to attribute values
     are references to the <termref def="key-vv">actual value</termref> of the attribute information 
     item in question, not to its <termref def="key-nv">normalized value</termref> or to other forms
     or varieties of <quote>value</quote> associated with it.
     For a given element information item <var>E</var>, expressions of the 
     form <quote><var>E</var> has <code>att1</code> = <var>V</var></quote> 
     are short-hand for <quote>there is an attribute information
      item named <code>att1</code> among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> of <var>E</var> and 
      its <termref def="key-vv">actual value</termref> <!--* of the <code>use</code> attribute information
      item among the &i-attributes; of &E; *--> 
      is <var>V</var>.</quote>
     If the identity of <var>E</var> is clear from context, expressions
     of the form <quote><code>att1</code> = <var>V</var></quote>
     are sometimes used.
     The form <quote><code>att1</code> ≠ <var>V</var></quote> is also used
     to specify that the <termref def="key-vv">actual value</termref> of <code>att1</code> is
     <emph>not</emph> <var>V</var>.
    </p>
    <p>References to properties of information items as defined in
     <bibref ref="ref-xmlinfo"/> are notated as links to the relevant
     section thereof, set off with square brackets, for example
     <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>.</p>
    <p>Properties which this specification defines for information
     items are introduced as follows:</p>
    <proplist item="example" role="psvi">
     <propdef id="ex-foo" name="new property">The value the property
      gets.</propdef>
    </proplist>
    <p>References to properties of information items defined in this
     specification are notated as links to their introduction as
     exemplified above, set off with square brackets, for example
     <propref role="psvi" ref="ex-foo"/>.</p>
    <p dg="ep24">The <quote>dot operator</quote> described above
     for components and their properties is also used for information items 
     and their properties.  For a given information item <var>I</var>, an expression
     of the form <quote><var>I</var> . <propref role="psvi" ref="ex-foo"/></quote>
     denotes the (value of the) property 
     <propref role="psvi" ref="ex-foo"/> for item <var>I</var>.
    </p>

    <p dg="b5150b">
     Lists of normative constraints are typically introduced with
     phrase like 
     <quote>all of the following are true</quote> (or <quote>... apply</quote>),
     <quote>one of the following is true</quote>,
     <quote>at least one of the following is true</quote>,
     <quote>one or more of the following is true</quote>,
     <quote>the appropriate case among the following is true</quote>,
     etc.
     The phrase <quote>one of the following is true</quote>
     is used in cases where the authors believe the items listed
     to be mutually exclusive (so that the distinction between
     <quote>exactly one</quote> and <quote>one or more</quote>
     does not arise).  If the items in such a list are not in fact
     mutually exclusive, the phrase <quote>one of the following</quote>
     should be interpreted as meaning <quote>one or more of the
     following</quote>.
     The phrase <quote>the appropriate case among the following</quote>
     is used only when the cases are thought by the authors to be
     mutually exclusive; if the cases in such a list are not in fact
     mutually exclusive, the first applicable case should be 
     taken.  Once a case has been encountered with a true condition,
     subsequent cases <!--* need not (and indeed *--> <rfc2119>must</rfc2119> not be tested.
     <!--* <phrase diff="add" dg="b6009xx">If one of the items in a list of constraints
      has the form <quote>If <var>antecedent</var>, then <var>consequent</var></quote>,
     then the item is taken to be true whenever the antecedent is false, or the 
     consequent is true, or both; it is false if and only if the 
     antecedent is true and consequent is false.  (This is the
     truth table conventionally used for material implication
     in sentential logic.)</phrase> *-->
    </p>
    <p>The following highlighting is used for non-normative commentary
     in this document:</p>

    <note>
     <p>General comments directed to all readers. </p>
    </note>
    <p><!--*
* material suppressed here by diff group ep06a *
*--><phrase dg="ep06a">W</phrase>ithin normative prose in this
     specification, the words <rfc2119>may</rfc2119><!--*
* material suppressed here by diff group fpwd *
*--><phrase dg="ep06a">,
      <rfc2119>should</rfc2119></phrase><phrase dg="fpwd">,</phrase>
     <rfc2119>must</rfc2119><phrase dg="fpwd"> and <rfc2119>must not</rfc2119></phrase> are
     defined as follows:</p>
    <glist>
     <gitem>
      <label><rfc2119>may</rfc2119></label>
      <def>
       <p><!--*
* material suppressed here by diff group b3220d *
*--><phrase dg="b3220d">Schemas,
	schema documents, and processors</phrase> are
	permitted to but need not behave as described.</p>
      </def>
<!--*
5. MAY   This word, or the adjective "OPTIONAL", mean that an item is
   truly optional.  One vendor may choose to include the item because a
   particular marketplace requires it or because the vendor feels that
   it enhances the product while another vendor may omit the same item.
   An implementation which does not include a particular option MUST be
   prepared to interoperate with another implementation which does
   include the option, though perhaps with reduced functionality. In the
   same vein an implementation which does include a particular option
   MUST be prepared to interoperate with another implementation which
   does not include the option (except, of course, for the feature the
   option provides.)
*-->
     </gitem>
     <gitem dg="ep06a">
      <label><rfc2119>should</rfc2119></label>
      <def>
       <p>It is recommended that <!--*
* material suppressed here by diff group b3220d *
*--><phrase dg="b3220d">schemas,
	schema documents,</phrase>
	and
	<!--*
* material suppressed here by diff group b3220b *
*--> 
	processors behave as described, but there
	can be valid reasons for them not to; it is important that the
	full implications be understood and carefully weighed before
	adopting behavior at variance with the recommendation.</p>
      </def>
<!--*
3. SHOULD   This word, or the adjective "RECOMMENDED", mean that there
   may exist valid reasons in particular circumstances to ignore a
   particular item, but the full implications must be understood and
   carefully weighed before choosing a different course.
*-->
<!--*
4. SHOULD NOT   This phrase, or the phrase "NOT RECOMMENDED" mean that
   there may exist valid reasons in particular circumstances when the
   particular behavior is acceptable or even useful, but the full
   implications should be understood and the case carefully weighed
   before implementing any behavior described with this label.
*-->
     </gitem>
     <gitem>
      <label><rfc2119>must</rfc2119></label>
      <def>
       <!--*
* material suppressed here by diff group b3220 *
*-->
       <p dg="b3220">
	<emph dg="b3220c">(Of schemas and 
	 schema documents:)</emph>
	<!--*
* material suppressed here by diff group b3220c *
*-->
	Schemas and documents are required to behave as
	described; otherwise they are in <termref def="dt-error">error</termref>.</p>
       <p dg="b3220"><emph>(Of 
	 <!--*
* material suppressed here by diff group b3220b *
*--> processors:)</emph>
	Processors are 
	required to behave as described.</p>
      </def>
<!--*
1. MUST   This word, or the terms "REQUIRED" or "SHALL", mean that the
   definition is an absolute requirement of the specification.
*-->
     </gitem>
     <gitem dg="fpwd">
      <label><rfc2119>must not</rfc2119></label>
      <def>
       <p dg="fpwd"><!--*
* material suppressed here by diff group b3220 *
*--><phrase dg="b3220">Schemas, 
	 schema documents<!--*
* material suppressed here by diff group b3220c *
*-->, and processors</phrase> 
	are forbidden to behave as
	described; <!--*
* material suppressed here by diff group b3220 *
*--><phrase dg="b3220">schemas and documents which nevertheless
	 do so are in <termref def="dt-error">error</termref></phrase>.</p>
      </def>
<!--*
2. MUST NOT   This phrase, or the phrase "SHALL NOT", mean that the
   definition is an absolute prohibition of the specification.
*-->
     </gitem>
     <gitem dg="b3220">
      <label id="dt-error">error</label>
      <def>
       <p>A failure of a schema<phrase dg="b3220c">
	 or</phrase><!--*
* material suppressed here by diff group b3220c *
*--> schema
	document<!--*
* material suppressed here by diff group b3220c *
*--> to conform to the rules of this
	specification.</p>
       <p>Except as otherwise specified, 
	processors <rfc2119>must</rfc2119> distinguish error-free (conforming) schemas
	and schema documents used in <termref def="key-va"/> from those with errors; 
	<!--*
* material suppressed here by diff group b3220b *
*--> 
	<phrase dg="b3220b"><phrase dg="b3220c">if a schema used in <termref def="key-va"/>
	  or a schema document used in constructing a schema
	  is in error,</phrase><!--*
* material suppressed here by diff group b3220c *
*-->
	 processors <rfc2119>must</rfc2119> report the fact;
	 if more than one is in error, it is <termref def="key-impl-dep">implementation-dependent</termref>
	 whether more than one is reported as being in error.
	 If one or more of the constraint codes given 
	 in <specref ref="outcomes"/> is applicable, it is 
	 <termref def="key-impl-dep">implementation-dependent</termref> how many of them, and which, 
	 are reported.
	</phrase>
       </p>

       <note>
	<p>Failure of an XML document to be valid against a particular
	 schema is not (except for the special case of a schema
	 document consulted in the course of building a schema) in
	 itself a failure to conform to this specification and thus,
	 for purposes of this specification, not an error.<!--*
* material suppressed here by diff group b3220c *
*-->
	</p>
       </note>
       <note>
	<p>Notwithstanding the fact that (as just noted) failure to be
	 schema-valid is not a violation of this specification and 
	 thus not strictly speaking an error as defined here,
	 the names of the PSVI properties <propref ref="a-schema_error_code"/> (for attributes) and <propref ref="e-schema_error_code"/> (for elements) are retained for
	 compatibility with other versions of this specification, and
	 because in many applications of XSD<!--*
* material suppressed here by diff group b5266 *
*-->, non-conforming
         documents <emph>are</emph> <quote>in error</quote> for
	 purposes of those applications.
	</p>
       </note>
      </def>
     </gitem>
     <gitem dg="b2224" id="key-deprecated">
      <label>deprecated</label>
      <def>
       <p>A feature or construct defined in this specification 
	described as <term>deprecated</term> is retained in this
	specification for compatibility with previous versions
	of the specification, and but its use is not advisable and
	schema authors <rfc2119>should</rfc2119> avoid its use if possible.
       </p>
       <p>       
	Deprecation has no effect on the conformance of schemas
	or schema documents which use deprecated features.
	Since deprecated features are part of the specification,
	processors <rfc2119>must</rfc2119> support them, although some processors
	<!--*
* material suppressed here by diff group b6014 *
*--><phrase dg="b6014"><rfc2119>may</rfc2119></phrase>
 choose to issue warning messages when deprecated
	features are encountered.
       </p>
       <p>
	Features deprecated in this version of this specification
	may be removed entirely in future versions, if any.
       </p>
      </def>
<!--*
2. MUST NOT   This phrase, or the phrase "SHALL NOT", mean that the
   definition is an absolute prohibition of the specification.
*-->
     </gitem>

    </glist>
    
    <p dg="ep06a">These definitions describe in terms
     specific to this document the meanings assigned to these terms by
     <bibref ref="rfc-2119"/>. The specific wording follows
     that of <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/>.
    </p>
     <p dg="b5150b">Where these terms appear without special highlighting,
     they are used in their ordinary senses and do not express conformance
     requirements.  Where these terms appear highlighted within
     non-normative material (e.g. notes), they are recapitulating
     rules normatively stated elsewhere.
    </p>
    <p><!--*
* material suppressed here by diff group fpwd *
*--><phrase dg="fpwd">This</phrase>
     specification provides a <!--*
* material suppressed here by diff group b3220 *
*--> 
     <phrase dg="b3220">further description</phrase>
     of error and of conformant
     processors' responsibilities with respect to errors <!--*
* material suppressed here by diff group fpwd *
*--><phrase dg="fpwd">in</phrase>
     <specref ref="conformance"/><!--*
* material suppressed here by diff group fpwd *
*-->.</p>

   </div2>
  </div1>
  <div1 id="concepts">
   <head>Conceptual Framework</head>
   <p>This chapter gives an overview of <emph>XML Schema<phrase dg="b4399"> Definition Language</phrase>: Structures</emph> at the level of its
    abstract data model.  <specref ref="components"/> provides details
    on this model, including a normative representation in XML for the
    components of the model. Readers interested primarily in learning
    to write schema documents <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">will find it most
     useful first to</phrase> read <bibref ref="bib-expo"/> for a
    tutorial introduction, and only then <phrase dg="may">to</phrase> consult the sub-sections of 
    <specref ref="components"/> named 
    <emph><phrase dg="b5159b">XML Representation of ...</phrase><!--*
* material suppressed here by diff group b5159b *
*--></emph> 
    for the details.</p>
   <div2 id="xsover">
    <head>Overview of <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase></head>
    <p>An <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--> schema</phrase> <!--*
* material suppressed here by diff group rq144nv *
*--><phrase dg="rq144nv">is
      a set</phrase> of components such as type definitions and
     element declarations. These can be used to assess the validity of
     well-formed element and attribute information items (as defined
     in <bibref ref="ref-xmlinfo"/>), and furthermore 
     <phrase diff="del" dg="b5164"><!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase></phrase><phrase diff="add" dg="b5164">to</phrase>
     specify <phrase diff="del" dg="b5164">augmentations to</phrase><phrase diff="add" dg="b5164">additional information about</phrase> 
     those items and their descendants. <phrase diff="del" dg="b5164">This
     augmentation makes</phrase><phrase diff="add" dg="b5164">These augmentations
      to the information set make</phrase> explicit information <!--*
* material suppressed here by diff group may *
*--> <phrase dg="b6008">that
      was</phrase> implicit<phrase diff="add" dg="b5164">ly
      present</phrase> in the original
     document<phrase diff="add" dg="b5164"> (or in the original document
      and the governing schema, taken together)</phrase>, such as normalized and/or default values for attributes
     and elements and the types of element and attribute information
     items. <phrase dg="rq144nv">The input information set
      <phrase diff="del" dg="b5164">can also be</phrase><phrase diff="add" dg="b5164">is
       also</phrase> augmented with information about the validity of the
      item, or about other properties described in this
      specification.</phrase> <termdef term="post-schema-validation       infoset" id="key-psvi">We refer to the augmented infoset which
      results from conformant processing as defined in this
      specification as the <term>post-schema-validation
       infoset</term>, or <term>PSVI</term></termdef>. <phrase dg="rq144nv">Conforming processors <rfc2119>may</rfc2119> provide
      access to <!--*
* material suppressed here by diff group rq144wg *
*--><phrase dg="rq144wg">some or
       all</phrase> of the PSVI<phrase dg="ep99"><phrase dg="rq144fl">, as described in <specref ref="var_psvi"/></phrase></phrase>. The mechanisms by which
      processors provide <phrase dg="rq144wg">such</phrase>
      access to the PSVI are neither defined nor constrained by this
      specification.</phrase> <!--*
* material suppressed here by diff group ep99 *
*--></p>

    <!--*
* material suppressed here by diff group b5164x *
*-->

    <!--*
* material suppressed here by diff group opt.144 *
*-->
    
    <!--* <issue id="RQ-142i" role="1.1"  diff="del" dg="ep99">
< ! - - *
	  <p><loc href="&reqs;#PSVIProp" target="reqs">RQ-142 (PSVIProp)</loc>,
             <loc href="&reqs;#WhichPSVIPropertiesReqd" target="reqs">RQ-144 
             (WhichPSVIPropertiesReqd)</loc></p>
* - - >
     <p>
      <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=2846"
       target="reqs" >Issue 2846 (RQ-142 PSVI properties)</loc>, <loc
       href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=2822"
       target="reqs" >Issue 2822 (RQ-144 required
       properties)</loc></p>
  <p>Version 1.0 included several properties in the PSVI whose absence
      carried information (e.g. <propref role="psvi"
       ref="e-type_definition"/>),
      while at the same time not being completely clear about which
      PSVI properties, if any, were required.  The Working Group
      intends to eliminate the former and clarify the latter.</p>
  <resolution>
      <p>For 142, which mandates that insofar as possible absence of a
       property should not in general signify, when it does explicit
       'if-and-only-if' language is required, the effect is
       distributed throughout the PSVI sub-sub-sections in section
       3.</p>
      <p>The Working Group appears to be close to consensus (although
       no final decision has been made) on views which can be
       summarized thus:
       <olist>
	<item>
	 <p>We should eliminate any dependency on the absence of
	  specific properties (i.e. important situations should be
	  describable and distinguishable in terms of properties and
	  their values, without appeal to the absence of particular
	  properties), or if this proves unfeasible in particular
	  cases we should say explicitly that a property is present
	  "if and only if" certain conditions apply.  Any remaining
	  "if" (if any) would be a true conditional, not an
	  equivalence.</p>
	</item>
	<item>
	 <p>Any specification of a class of processors (including
	  ours) can require specific additional information not in the
	  PSVI, though should note that interoperability is better if
	  applications depend only on the properties present in the
	  PSVI as we define it.</p>
	</item>
	<item>
	 <p>In our own specification of processor classes, we should
	  be explicit that processors may provide additional
	  information. (Or alternatively be explicit that they must
	  not  &mdash;  but the chair believes the WG consensus was to allow
	  it.)</p>
	</item>
       </olist> 
      </p>
      <p>For 144, a few general remarks here about flexible-but-firm
       conformance are wanted here; most of the new work should end up
       in section 4 and/or 5.</p>
     </resolution>
    </issue> *-->
    <p><termdef id="key-s-v-a" term="schema-validity assessment" dg="b6015">As it is used in this specification, the
      term <term>schema-validity assessment</term> has <phrase diff="del" dg="b5164">two</phrase><phrase diff="add" dg="b5164">three</phrase> aspects: <olist>
       <item id="c-lsv"><p>Determining local schema-validity, that is
	 whether an element or attribute information item satisfies
	 the constraints embodied in the 
	 <phrase dg="b5164x">relevant components of an
	 <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--> schema</phrase></phrase>
	 <phrase diff="add" dg="b5164">(specifically the <termref def="key-governing"/>
	  element or attribute declaration and/or <termref def="key-governing"/>
	  type definition)</phrase>;</p></item>
       <item><p diff="del" dg="b5164">Synthesizing an overall validation
	 outcome for the item, combining local schema-validity with
	 the results of schema-validity assessments of its
	 descendants, if any, and adding appropriate augmentations to
	 the infoset to record this
	 outcome.</p><p diff="add" dg="b5164">Determining an 
	 overall validation outcome for the item
	 by combining local schema-validity with
	 the results of schema-validity assessments of its
	 descendants, if any; and</p>
       </item>
       <item dg="b5164-aux">
	<!--* double diff-tagging intentional; makes the coloring better *-->
	<p diff="add" dg="b5164">Determining the appropriate
	 augmentations to the infoset (and, if desired, exposing them
	 to downstream applications in some way, to record this
	 outcome).</p></item>
      </olist></termdef></p>
    <p diff="del" dg="b5164">Throughout this specification, <termdef id="del-key-vn" term="valid">the word <term>valid</term> and its
      derivatives are used to refer to <clauseref ref="c-lsv"/> above,
      the determination of local schema-validity</termdef>.</p>
    <!--* following paragraph marked deleted in first draft of 5164/6015.  
        * Apparently an error, or else I meant something by it that
        * I now can't remember.
    <p diff="del" dg="b5164">
        *-->
    <p>Throughout this specification, <termdef id="key-va" term="assessment"> the word <term>assessment</term>
      is used to refer to the overall process of local validation,
      <phrase diff="del" dg="b6015">schema-validity assessment</phrase><phrase diff="add" dg="b6015">recursive determination of
       validation outcome,</phrase> and infoset augmentation<phrase diff="add" dg="b6015">, i.e. as a short form for
       <quote><termref def="key-s-v-a"/></quote></phrase></termdef>.
    </p>
    <p diff="add" dg="b5164"><termdef id="key-vn" term="valid">
      <term>Validation</term> is the process of determining
      whether an XML document, an element information item, or an
      attribute information item obeys the constraints expressed in a
      schema; in the context of XSD, this amounts to calculating the
      value of the appropriate item's <propref ref="e-validity" role="psvi"/> property. </termdef>
     <note>
      <p>As just defined, validation produces not a binary result, but a
       ternary one:  if the information item is <termref def="key-sva"/>,
       it will be either valid or invalid, but if no applicable
       declaration is found, its validity will be unknown (and its
       <propref ref="e-validity"/> property will have the
       value <pt>notKnown</pt>). Whether in a particular application
       <pt>notKnown</pt> should be treated in the same way as
       <pt>invalid</pt> or differently is outside the scope of this
       specification; sometimes one choice is appropriate,
       sometimes the other.
      </p>
     </note>
     <!--*
* material suppressed here by diff group b5164x *
*-->
     <note dg="b5164">
      <p>In phrases such as <quote><termref def="key-val-sub-type"/></quote>
       and <quote>length valid restriction</quote>, the word
       <term>valid</term> is used in its ordinary English sense
       of <quote>conforming to some set of rules</quote>, not
       necessarily limited to rules expressed in an XSD schema. 
      </p>
     </note>
    </p>

    <p diff="add" dg="b5164">In general, a <term>valid document</term>
     is a document whose contents obey the constraints expressed in a
     particular schema. Since a document may be validated against many
     different schemas, it is often clearer to speak of a document
     being valid <emph>against a particular schema</emph>. When this
     specification is used, document validity can be defined
     operationally in terms of the <termref def="key-psvi">post-schema-validation infoset</termref> properties on the nodes of
     the document (in particular <propref prop="validity" role="psvi"/>).  Several similar but distinct kinds of validity are
     usefully distinguished, for which terms are defined below in
     <specref ref="sec-schema-validity-and-docs"/>.</p>

    <p diff="add" dg="b5164">Because the <propref prop="validity" role="psvi"/> property is part of the <termref def="key-psvi">post-schema-validation infoset</termref>, it should be
     evident that any full <termref def="key-va"/> of an item by definition
     entails the <termref def="key-vn">validation</termref> of that item.  Conversely, since the
     <propref prop="validity" role="psvi"/> property is recursive and
     depends upon many other pieces of information which are part of
     the <termref def="key-psvi">post-schema-validation infoset</termref>, <termref def="key-vn">validation</termref> also typically entails at least partial
     <termref def="key-va"/>.  The processes denoted by the two terms thus
     overlap and are not always distinguishable; often the same
     process can be referred to by either term. In this specification,
     the term <quote><termref def="key-va"/></quote> is used when it is desired
     to stress the calculation of the complete <termref def="key-psvi">post-schema-validation infoset</termref>, including
     properties whose values have no effect on validity.
     The term <quote><termref def="key-vn">validation</termref></quote>, in contrast, is used
     when it is desired to focus primarily on the <termref def="key-vn">validity</termref>
     of the item, treating the other information generated in
     the process as merely incidental.
     <note>
      <p>When there is no particular
       emphasis one way or the other, the choice of terms is
       necessarily arbitrary, or grounded in the history of 
       this and related specifications.  Historical reasons,
       rather than connotation, determine the
       use of the term <quote><termref def="key-vn">validation</termref></quote> instead of
       <quote><termref def="key-va"/></quote> in terms like 
       <quote><termref def="key-psvi">post-schema-validation infoset</termref></quote>,
       <quote><termref def="key-vr"/></quote>, and
       <quote>Validation Rules</quote>.
      </p>
     </note>
    </p>
    <p dg="b3714">During <termref def="key-va"/>, some or
     all of the element and attribute information items in the input
     document are associated with declarations and/or type
     definitions; these declarations and type definitions are then
     used in the <termref def="key-va"/> of those items, in a
     recursive process. <termdef id="key-governing" term="governing">The declaration associated with an information
      item, if any, and with respect to which its validity is <termref def="key-va">assessed</termref> in a given assessment episode
      is said to <term>govern</term> the item, or to be its
      <term>governing</term> element or attribute declaration.
      Similarly the type definition with respect to which the
      type-validity of an item is assessed is its
      <term>governing</term> type definition.</termdef>
     <note dg="b3725">
      <p>See also the definitions of <termref def="key-governing-ed"/> and	<termref def="key-governing-type-elem"/>
       (for elements) and <termref def="key-governing-ad"/> and <termref def="key-governing-type-att"/> (for
       attributes).</p>
     </note>
    </p>
   </div2>
   <div2 id="concepts-data-model">
    <head><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> Abstract Data Model</head>
    <p>This specification builds on <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/> and
     <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-namespaces-1.1" dg="b1838refs"/>.  The concepts and definitions used
     herein regarding XML are framed at the abstract level of
     <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-infoset/#infoitem">information
      items</xtermref> as defined in <bibref ref="ref-xmlinfo"/>.  By
     definition, this use of the infoset provides <emph>a
      priori</emph> guarantees of <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#sec-well-formed">well-formedness</xtermref> 
     (as defined in <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/>) and <!--*
* material suppressed here by diff group crhax *
*--><xtermref xmlns:xlink="http://www.w3.org/1999/xlink" dg="crhax" href="http://www.w3.org/TR/xml-names11/#Conformance">namespace
      conformance</xtermref> (as defined in <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-namespaces-1.1" dg="b1838refs"/>)
     for all candidates for <termref def="key-va"/> and for all
     <termref def="key-schemaDoc">schema documents</termref>.</p>
    <p>Just as <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/> and
     <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-namespaces-1.1" dg="b1838refs"/> can be described in terms of
     information items, <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--> schemas</phrase> can be described in terms of
     an abstract data model.  In defining <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">schemas</phrase> in terms of
     an abstract data model, this specification rigorously specifies
     the information which <rfc2119>must</rfc2119> be available to a conforming
     <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> processor.  The abstract model for schemas is
     conceptual only, and does not mandate any particular
     implementation or representation of this information.  To
     facilitate interoperation and sharing of schema information, a
     normative XML interchange format for schemas is provided.</p>
<!--* 
    <issue id="CC" role="1.1">
     <p><loc href="http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2003Jun/0090.html">2003-06-13 minutes (Component cleanup)</loc> (W3C-member-only link)</p>
     <p>Some aspects of the abstract components used to organise this
specification have proved clumsy and/or susceptible to improvement.  The way in
which components and their properties are referenced in constraints and
validation rules is sometimes irritatingly verbose.  Wherever possible these
problems should be addressed.</p>
     <resolution>
      <p>Changes to the component structure which do not produce
    substantially different functionality (i.e. change behavior only in
    edge cases) [are consistent with our overall goals].  Such changes might be made in order to make the
    component structure easier to understand, reason about, document,
    or talk about.  This class is not, however, restricted to changes
    which do not affect the information-theoretic information content
    of the component structure.  That is, it may contain changes
    that go beyond renaming or other changes which do not affect
    information content.</p>
      <p>These changes will be disruptive to (some) implementors, but (MSM
    suggested) not to all users, and probably not to any (or: many)
    users.</p>
      <p>The editor intends under this heading to make the presentation of
components much more systematic, because auto-generated from an XML-notated
explicit definition of components and properties, for example:</p>
      <p><![CDATA[<component name="Attribute Declaration" base="Component"
           abstract="false" abbrev="ad">
  <property name="type definition" valueType="component" arity="singleton"
            type="Simple Type Definition" required="true"/>
  . . .]]></p>
      <p>The editor also intends to introduce a number of 'micro-components',
replacing all values with complicated value types, e.g. replacing "A pair consisting of a value and one of <pt>default</pt>, <pt>fixed</pt>." with a
Value Constraint micro-component.</p>
     </resolution>
    </issue> *-->

    <p><termdef id="c" term="schema component"><term>Schema
       component</term> is the generic term for the building blocks
      that <!--*
* material suppressed here by diff group b4399a *
*--><phrase dg="b4399a">make up</phrase> the abstract data model
      of the schema. </termdef> <!--*
* material suppressed here by diff group b4399 *
*--><termdef id="key-schema" term="XSD schema" dg="b4399"> An <term>XSD<!--*
* material suppressed here by diff group b5266 *
*--> schema</term> is a set of <termref def="c">schema components</termref></termdef>. There are
     <!--*
* material suppressed here by diff group b5137 *
*--><phrase dg="b5137">several kinds of schema component</phrase>, falling
     into three groups.  The primary <phrase dg="b5137">schema</phrase> components, which <rfc2119>may</rfc2119> (type
     definitions) or <rfc2119>must</rfc2119> (element and attribute declarations) have
     names, are as follows:</p>
    <ulist>
     <item><p>Simple type definitions
      </p></item>
     <item><p>Complex type definitions</p></item>
     <item><p>Attribute declarations</p></item>
     <item><p>Element declarations</p></item>
    </ulist><p>The secondary <phrase dg="b5137">schema</phrase> components, <!--*
* material suppressed here by diff group b2861cc-1 *
*-->are as
     follows:</p>
    <ulist>
     <item><p>Attribute group definitions</p></item>
     <item><p>Identity-constraint definitions</p></item>
     <item dg="cta-ta"><p>Type alternatives</p></item>
     <item><p><phrase dg="b2861cc-1">Assertions</phrase></p></item>
     <item><p>Model group definitions</p></item>
     <item><p>Notation declarations</p></item>
    </ulist>
    <p>Finally, the <quote>helper</quote> <phrase dg="b5137">schema</phrase> components provide small
     parts of other <phrase dg="b5137">schema</phrase> components; they are <!--*
* material suppressed here by diff group b5137 *
*--><phrase dg="b5137">dependent on</phrase> their context:</p>
    <ulist>
     <item><p>Annotations</p></item>
     <item><p>Model groups</p></item>
     <item><p>Particles</p></item>
     <item><p>Wildcards</p></item>
     <item><p>Attribute Uses</p></item>
    </ulist>
    <!--*
* material suppressed here by diff group b5139 *
*-->
    <p dg="b5139">The 
      name <compdef name="Component" abbrev="xc" role="termdef" showAKO="true"> covers all the different kinds of
      schema component defined in this specification.</compdef>
     <!--* following addition suggested by Pete Cordell, to whom
     thanks. *-->
     <!--*
* material suppressed here by diff group ep99 *
*-->
    </p>
    <p>During <termref def="key-vn">validation</termref>, <termdef id="key-declaration" term="declaration"><term>declaration</term>
      components are associated by (qualified) name to information items
      being <termref def="key-vn">validated</termref></termdef>.
    </p>
    <p>On the other hand, <termdef id="key-definition" term="definition"><term>definition</term> components define internal
      schema components that can be used in other schema
      components</termdef>.
    </p>
    <p><termdef id="key-compName" term="component name">Declarations
      and definitions <!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase> <phrase dg="modals">and in
       some cases <rfc2119>must</rfc2119></phrase> have and be identified by
      <term>name<!--*
* material suppressed here by diff group ep99 *
*--></term><phrase dg="ep99">s</phrase>, which are 
       NCNames as defined by <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-namespaces-1.1" dg="b1838refs"/></termdef>.</p>

    <p><termdef id="key-targetNS" term="target namespace">Several
      kinds of component have a <term>target namespace</term>, which
      is either <termref def="key-null">absent</termref> or a
      namespace name, also as defined by <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-namespaces-1.1" dg="b1838refs"/></termdef>.  The <termref def="key-targetNS">target namespace</termref> serves to identify
     the namespace within which the association between the component
     and its name exists.  
     <!--*
* material suppressed here by diff group ep20b *
*--></p>
    <p dg="ep20b">An <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref>, as defined in
     <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-namespaces-1.1" dg="b1838refs"/>, is a pair consisting
     of a namespace name, which <rfc2119>may</rfc2119> be <termref def="key-null">absent</termref>, and a local
     name.  The <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> of any component with both a
     <termref def="key-targetNS"/> property and a 
     <termref def="key-compName"/> property is the pair 
     consisting of the values of those two properties.
     The <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> of a declaration is used to help
     determine which information items will be 
     <termref def="key-governing">governed</termref> by
     the declaration.
    </p>
    <note>
     <p>At the abstract level, there is no requirement that the
      components of a schema share a <termref def="key-targetNS">target namespace</termref>.  Any schema for
      use in <termref def="key-va"/> of documents
      containing names from more than one namespace will of necessity
      include components with different <termref def="key-targetNS">target namespaces</termref>.  This contrasts
      with the situation at the level of the XML representation of
      components, in which each schema document contributes
      definitions and declarations to a single target namespace.</p>
    </note>
    <p><termref def="key-vn">Validation</termref>, defined in detail
     in <specref ref="components"/>, is a relation between information
     items and schema components.  For example, an attribute
     information item <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">is <termref def="key-vn">validated</termref></phrase>
     with respect to an attribute declaration, a list of element
     information items <!--*
* material suppressed here by diff group may *
*--> with respect to a
     content model, and so on.  The following sections briefly
     introduce the kinds of components in the schema abstract data
     model, other major features of the abstract model, and how they
     contribute to <termref def="key-vn">validation</termref>.</p>

    <!--* probably should insert here something about local and top-level
    components and source declarations *-->

    <div3 id="Type_Definition_Summary">
     <head>Type Definition Components</head>
     <p>The abstract model provides two kinds of type definition
      component: simple and complex.</p>
     <p><termdef id="td" term="type definition">This specification
       uses the phrase <term>type definition</term> in cases where no
       distinction need be made between simple and complex
       types</termdef>.</p>
     <p>Type definitions form a hierarchy with a single root.  The
      subsections below first describe characteristics of that
      hierarchy, then provide an introduction to simple and complex
      type definitions themselves.</p>
     
     <div4 id="Type_Derivation">
      <head>Type Definition Hierarchy</head>

<!--*    <issue id="RQ-120i" role="1.1">
	      <p><loc href="&reqs;#term-&derived_AV;" target="reqs">RQ-120 (term-derived)</loc></p>
      <p>There is an inconsistency in the use of the word '&derived;' and related
words between parts 1 and 2 of version 1.0:  Sometimes it refers only to types
defined by
restriction and/or extension, but other times includes lists and unions as
well.  This terminological problem, and the underlying conceptual issue, should
be addressed.</p>
      <resolution>
       <p><loc href="http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2004May/0007.html">http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2004May/0007.html</loc>, <loc href="http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2004May/0009.html">http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2004May/0009.html</loc> (W3C-member-only links)</p>
       <p>In anticipation of a change in this area, the editor has replaced all
occurrences of '&derived;' and related words with one of two entity references:
&amp;&derived;; for restriction and extension only, and &amp;constructedDiff; for
restriction, extension, list and union.  The former is defined to be
'derived' for now, the latter a diff-marked replacement of 'derived'
by 'constructed'.</p>
      </resolution>
	      </issue> *-->

      <p><phrase id="anchor6204"/><termdef id="key-typeDefinitionHierarchy" term="Type  Definition Hierarchy">Except for <!--*
* material suppressed here by diff group wd-200708-1 *
*--> <phrase dg="wd-200708-1"><termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref>,</phrase> every <termref def="td">type definition</termref> is, by construction,
	either a <termref def="key-typeRestriction">restriction</termref> or an
	<termref def="key-typeExtension">extension</termref> of some
	other type definition. <phrase dg="b6204">The exception
	<termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref> is a <termref def="key-typeRestriction"/> of itself.
	With the exception of the loop on <termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref>, the</phrase>
        <!--*
* material suppressed here by diff group b6204 *
*--> graph of these relationships forms
	a tree known as the <term>Type Definition
	Hierarchy</term><phrase dg="b6204"> with <termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref> as its
	root</phrase></termdef>.
      </p>
      <p dg="eg-1852-silent"><termdef id="key-baseTypeDefinition" term="base type definition"><!--*
* material suppressed here by diff group eg-1852 *
*--><phrase dg="eg-1852">The</phrase> type definition used as the basis
	for an <termref def="key-typeExtension">extension</termref> or
	<termref def="key-typeRestriction">restriction</termref> is
	known as the <term>base type definition</term> of that
	definition</termdef>.
       <termdef id="key-derived" term="derived" dg="b1913">
        If a type definition <var>D</var> can reach a type definition <var>B</var> by following
        its base type definition chain, then <var>D</var> is said to be
        <term>derived</term> from <var>B</var>.</termdef>
       <phrase dg="b1913">In most cases, a type definition is
        derived from other type definitions. The only exception is
        <termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref>, which is derived from itself.
       </phrase>
      </p>
      <p><termdef id="key-typeRestriction" term="restriction"><phrase dg="rq17-x"><!--*
* material suppressed here by diff group eg-1852 *
*--><phrase dg="eg-1852">A
	  type defined with the same constraints as its <termref def="key-baseTypeDefinition"/>, or with more,</phrase> is
	 said to be a <term>restriction</term>.</phrase> <!--*
* material suppressed here by diff group rq17-x *
*--></termdef> The <!--*
* material suppressed here by diff group eg-1852 *
*--><phrase dg="eg-1852">added constraints</phrase> might include narrowed
       ranges or reduced alternatives. <!--*
* material suppressed here by diff group ftf-2 *
*--><phrase dg="ftf-2">Given two types <var>A</var> and <var>B</var>, if the definition of
	<var>A</var> is a <termref def="key-typeRestriction">restriction</termref> of the
	definition of <var>B</var>, then members of type <var>A</var> are always locally
	valid against type <var>B</var> as well.</phrase></p>

      <!--* <issue id="RQ-17i" role="1.1">
< ! - -* <p><loc href="&reqs;#restrictn-rules" target="reqs">RQ-17 (restrictn-rules)</loc></p> * - ->

       <p><loc
	 href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=2820"
	 target="reqs" >Issue 2820 (RQ-17 simplify restriction
	 rules)</loc></p>
       <p>Version 1.0 made clear that the <emph>intention</emph> for
	derivation by restriction was that restrictions validated a
	subset of what their base validated.  However, the
	constructive rules for what constituted valid content model
	restrictions for complex type definition not only failed to
	enforce this completely correctly, but also ruled out various
	cases which evidently should have been allowed.  The Working
	Group has decided to shift to a much higher level statement of
	what constitutes a valid restriction, appealing directly to
	the subset requirement, in order to address these
	problems.</p>
       <resolution>
	<p>A major change in definition/presentation, with only modest
	 changes in consequences for schemas and validity, will be
	 made, by <emph>defining</emph> restriction for complex type
	 definitions in terms of the desired result, that is that all
	 members of a restricted type are members of its base type.
	 In the normative part of the spec. this will be done by
	 appeal to local validity.</p>
	<p><quote>Clarifying: R restricts B: any EII that is locally
	  valid [per R] &must; also be locally valid [per B], with
	  side conditions on properties on terms you appeal to [to]
	  get same child allowed by two content models.</quote> [-<loc
	  href="http://www.w3.org/XML/Group/2004/05/xml-schema-ftf-minutes.html">F2F 
	  2004-03-12, section Subsumption</loc> (W3C-member-only
	 link)]</p>
	<p>A non-normative appendix will provide references to
	 published algorithms for enforcing the constraint.</p>
       </resolution>
      </issue> *-->
      <p><termdef id="key-typeExtension" term="extension">A complex
	type definition which allows element or attribute content in
	addition to that allowed by another specified type definition
	is said to be an <term>extension</term></termdef>.</p>

      <note dg="b6009">
       <p>Conceptually, the definitions of 
	<termref def="key-typeRestriction"/> and
	<termref def="key-typeExtension"/> overlap:  given a 
	type <var>T</var>, a vacuous  
	<termref def="key-typeRestriction"/> of <var>T</var> and a vacuous
	<termref def="key-typeExtension"/> of <var>T</var> will each 
	accept the same inputs as valid.  The syntax specified
	in this version of this specification, however, requires
	that each type be defined either as a restriction 
	or as an extension, not both.  Thus even though the
	vacuous extension of <var>T</var> accepts the same inputs as
	the vacuous restriction, it will not be accepted in 
	contexts which require restrictions of <var>T</var>.
       </p>
      </note>

      <!--*
* material suppressed here by diff group rq17 *
*-->

      <p dg="rq17"><termdef id="key-anyType" term="definition of anyType">A special complex type
	definition, <!--*
* material suppressed here by diff group f2f0610 *
*--><phrase dg="f2f0610">(referred to in earlier versions of this
	 specification as 'the ur-type definition')</phrase> whose
	name is <pt>anyType</pt> in the <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> namespace, is
	present in each <!--*
* material suppressed here by diff group b4399 *
*--><termref def="key-schema" dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--> schema</termref>. The <term>definition of
	 <phrase><pt>anyType</pt></phrase></term> serves as default
	type definition for element declarations whose XML
	representation does not specify one</termdef>. <!--* why is
       the termdef closed inside the full stop? HST: Because I always
       do it that way :-) *--> <!--*
* material suppressed here by diff group cta *
*-->
      </p>

      <p dg="cta-error">
       <termdef id="key-error" term="xs:error">A special simple type
	definition, whose name is <pt>error</pt> in the XSD<!--*
* material suppressed here by diff group b5266 *
*-->
	namespace, is also present in each <termref def="key-schema">XSD<!--*
* material suppressed here by diff group b5266 *
*--> schema</termref>. The
	<term>XSD<!--*
* material suppressed here by diff group b5266 *
*--> <phrase><code>error</code></phrase> type</term>
	has no valid instances. It can be used in any place where
	other types are normally used; in particular, it can be used
	in conditional type assignment to cause elements which satisfy
	certain conditions to be invalid. </termdef>
      </p>
      <p dg="cta">
       For brevity, the text and examples in this specification often
       use the qualified names <code>xs:anyType</code> and
       <code>xs:error</code> for these type definitions. (In
       practice, any appropriately declared prefix can be used, as
       described in <specref ref="Instance_Document_Constructions"/>.)
      </p>

      <!--*
* material suppressed here by diff group eg-1852 *
*-->
     </div4>

     <div4 id="Simple_Type_Definition">
      <head>Simple Type Definition</head>
      <p>A simple type definition is a set of constraints on strings
       and information about the values they encode, applicable to the
       <termref def="key-nv">normalized value</termref> of an attribute information item or of an element
       information item with no element children. Informally, it
       applies to the values of attributes and the text-only content
       of elements.
      </p>
      <p>Each simple type definition, whether built-in (that is,
       defined in <bibref ref="ref-xsp2"/>) or user-defined, is a <termref def="key-typeRestriction">restriction</termref> of <!--*
* material suppressed here by diff group eg-1852 *
*--><phrase dg="eg-1852">its</phrase> <termref def="key-baseTypeDefinition">base type definition</termref>.
       <!--*
* material suppressed here by diff group eg-1852 *
*--><!--*
* material suppressed here by diff group urtype *
*--> <phrase dg="urtype"><termdef id="key-anySimpleType" term="anySimpleType">A
	 special <termref def="key-typeRestriction">restriction</termref> of 
	 <termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref>, whose name is 
	 <term><phrase><pt>anySimpleType</pt></phrase></term> in the
	 <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> namespace, is the root of the <termref def="key-typeDefinitionHierarchy"/> for all simple type
	 definitions. <termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref> has a lexical space containing 
	 all sequences of characters in the Universal Character 
	 Set (UCS) and a value space containing all 
	 <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-atomic">atomic values</xspecref>
	 and all finite-length lists of 
	 <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-atomic">atomic values</xspecref>.</termdef> 
	As with <termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref>, this
	specification sometimes uses the qualified name
	<code>xs:anySimpleType</code> to designate this type
	definition.</phrase> <phrase dg="eg-1852">The
	built-in list datatypes all have <!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase> as their
	<termref def="key-baseTypeDefinition">base type
	 definition</termref>.</phrase></p>
      <p dg="eg-1852"><termdef id="key-anyAtomicType" term="anyAtomicType">There is a further special datatype
	called <term><!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><pt>anyAtomicType</pt></phrase></term>, a
	<termref def="key-typeRestriction">restriction</termref> of
	<!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase>, which is the <termref def="key-baseTypeDefinition">base type definition</termref>
	of all the primitive <!--*
* material suppressed here by diff group b3251 *
*-->
	datatypes.</termdef> <phrase dg="urtype">This type definition is often referred
	to simply as <quote><code>xs:anyAtomicType</code></quote>.</phrase> 
       It too is
       considered to have an unconstrained lexical space.  Its value
       space consists of the union of the value spaces of all the
       <!--*
* material suppressed here by diff group b3251 *
*--> primitive datatypes.</p>
      <p dg="b1913"><termdef id="key-constructed" term="constructed">
       Datatypes can be <term>constructed</term> from other datatypes by
       <pt>restricting</pt> the value space or lexical space of a
       <propref comp="std" prop="base type definition"/> using zero or more
       <compref ref="f"/>s, by specifying the new datatype as a <pt>list</pt>
       of items of some <propref comp="std" prop="item type definition"/>,
       or by defining it as a <pt>union</pt> of some specified sequence of
       <propref comp="std" prop="member type definitions"/>.</termdef></p>
      <p>The mapping from lexical space to value space is unspecified
       for items whose type definition is <!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase> <phrase dg="eg-1852">or <!--*
* material suppressed here by diff group urtype *
*--><termref def="key-anyAtomicType" dg="urtype"><phrase><code>xs:anyAtomicType</code></phrase></termref></phrase>. Accordingly
       this specification does not constrain processors'
       behavio<!--*
* material suppressed here by diff group b2861cc-1 *
*-->r in areas
       where this mapping is implicated, for example checking such
       items against enumerations, constructing default attributes or
       elements whose declared type definition is <!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase>
       <phrase dg="urtype">or <!--*
* material suppressed here by diff group urtype *
*--><termref def="key-anyAtomicType" dg="urtype"><phrase><code>xs:anyAtomicType</code></phrase></termref></phrase>,
       checking identity constraints involving such items.</p>
      <note>
       <p>The Working Group expects to return to this area in a future
	version of this specification.</p>
      </note>
      <p><!--*
* material suppressed here by diff group eg-1852 *
*--><phrase dg="eg-1852"><bibref ref="ref-xsp2"/>
	provides mechanisms for defining new simple type definitions
	by <termref def="key-typeRestriction">restricting</termref>
	<!--*
* material suppressed here by diff group b3251 *
*--><phrase dg="b3251">some primitive 
	 or ordinary datatype</phrase>.  It also
	provides mechanisms for constructing new simple type
	definitions</phrase> whose members are lists of items
       themselves constrained by some other simple type definition, or
       whose membership is the union of the memberships of some other
       simple type definitions.  Such list and union simple type
       definitions are also <termref def="key-typeRestriction">restrictions</termref> of
       <!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase>.</p>
      <p>For detailed information on simple type definitions, see
       <specref ref="Simple_Type_Definitions"/> and <bibref ref="ref-xsp2"/>.  The
       latter also defines an extensive inventory of pre-defined
       simple types.</p>
     </div4>
     <div4 id="Complex_Type_Definition">
      <head>Complex Type Definition</head>
      <p>A complex type definition is a set of attribute declarations
       and a content type, applicable to the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> and
       <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of an element information item respectively.  The
       content type <!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase> require the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> to contain
       neither element nor character information items (that is, to be
       empty), <phrase dg="modals">or</phrase> to be a
       string which belongs to a particular simple type<phrase dg="modals">,</phrase> or to contain a sequence of
       element information items which conforms to a particular model
       group, with or without character information items as well.</p>

      <p>Each complex type definition other than <!--*
* material suppressed here by diff group wd-200708-1 *
*--><phrase dg="wd-200708-1"><termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref></phrase> is
       either
      <ulist>
	<item>
	 <p>a restriction of a complex <termref def="key-baseTypeDefinition">base type
	   definition</termref></p>
	</item>
      </ulist> or
       <ulist><item>
	 <p>an <termref def="key-typeExtension">extension</termref> of
	  a simple or complex <termref def="key-baseTypeDefinition">base type
	   definition</termref>.</p>
	</item>
       </ulist>
      
      
      </p>
      <p> A complex type which extends another does so by having
       additional content model particles at the end of the other
       definition's content model, or by having additional attribute
       declarations, or both.
       <note>
	<p><!--*
* material suppressed here by diff group all-2506-2 *
*--><phrase dg="all-2506-2">For the most part, this</phrase>
	 specification allows only appending, and not other kinds of
	 extensions. This decision simplifies application processing
	 required to cast instances from
	 <!--*
* material suppressed here by diff group b1913 *
*-->
	 <phrase dg="b1913">the derived type to the</phrase> base type.
	 <phrase dg="all-2506-2"><!--*
* material suppressed here by diff group b1913 *
*-->
	  <phrase dg="b1913">One</phrase> special case allows the
	  extension of <code>all</code>-groups in ways that do not
	  guarantee that the new material occurs only at the end of
	  the content.</phrase> <phrase dg="b1913">Another
	  special case is extension via <compref ref="oc"/>s in <pt>interleave</pt>
	  mode.</phrase> <!--*
* material suppressed here by diff group b1913 *
*--></p>
       </note></p>
      <p>
       For detailed information on complex type definitions, see <specref ref="Complex_Type_Definitions"/>.</p>
     </div4>
    </div3>

    <div3 id="Declarations_Summary">
     <head>Declaration Components</head>
     <p>There are three kinds of declaration component: element, attribute,
      and notation.  Each is described in a section below. Also
      included is a discussion of element substitution groups, which
      is a feature provided in conjunction with element
      declarations.</p>
     <div4 id="Element_Declaration">
      <head>Element Declaration</head>
      <p>An element declaration is an association of a name with a
       type definition, either simple or complex, an (optional)
       default value and a (possibly empty) set of identity-constraint
       definitions.  The association is either global or scoped to a
       containing complex type definition.  A top-level element
       declaration with name 'A' is broadly comparable to a pair of
       DTD declarations as follows, where the associated type
       definition fills in the ellipses:</p>

<eg xml:space="preserve">&lt;!ELEMENT A . . .&gt;
&lt;!ATTLIST A . . .&gt;
</eg>

      <p>Element declarations contribute to <termref def="key-vn">validation</termref> as part of model group
       <termref def="key-vn">validation</termref>, when their defaults
       and type components are checked against an element information
       item with a matching name and namespace, and by triggering
       identity-constraint definition <termref def="key-vn">validation</termref>.</p>
      <p>
       For detailed information on element declarations, see <specref ref="cElement_Declarations"/>.<phrase dg="b6009">
	For an overview of identity constraints, see
	<specref ref="Identity-constraint_Definition"/>.
	</phrase>
      </p>
     </div4>

     <div4 id="Element_Equivalence_Class">
      <head>Element Substitution Group</head>
      <!--*
* material suppressed here by diff group b6009 *
*-->
      <p dg="b6009">When XML vocabularies are defined using
       the <phrase diff="del" dg="b6008a">document type definition</phrase>
       <phrase diff="add" dg="b6008a">DTD</phrase> syntax defined by <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/>, 
       a reference in a content model to a particular name is satisfied
       only by an element in the XML document whose 
       name and content correspond exactly to those given in the
       corresponding <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#elemdecls">element type
	<!--*
* material suppressed here by diff group b6009b *
*--><phrase dg="b6009b">declaration</phrase></xspecref>.<note>
	<p>The <quote>element type<phrase dg="b6009b"> declaration</phrase></quote> 
	 of <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/>
	 is not quite the same as the <termref def="key-governing-type-elem"/> as defined
	 in this specification:  <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/> does not
	 distinguish between element declarations and 
	 type<phrase dg="b6009b"> definition</phrase>s as
	 distinct kinds of object in the way that this specification
	 does. The <quote>element type declaration</quote> of 
	 <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/> specifies both the kinds of properties
	 associated in this specification with element declarations
	 and the kinds of properties associated here with
	 (complex) type definitions.
	</p>
       </note>
      </p>
      <p><termdef id="key-equivalenceClass" term="element substitution  group">Through the <!--*
* material suppressed here by diff group b6009 *
*--> 
	mechanism of <term>element substitution
	groups</term>, <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> provides a more powerful model
 <phrase diff="add" dg="b6008a">than DTDs do</phrase>
	supporting substitution of one named element for
	another</termdef>. Any top-level element declaration can serve
       as the defining member, or head, for an element <!--*
* material suppressed here by diff group b4337 *
*--><termref def="key-eq" dg="b4337"/>.
       Other top-level element declarations, regardless of target
       namespace, can be designated as members of the <!--*
* material suppressed here by diff group b4337 *
*--><termref def="key-eq" dg="b4337"/>
       headed by this element.  In a suitably enabled content model, a
       reference to the head <termref def="key-vn">validates</termref>
       not just the head itself, but elements corresponding to any
       other member of the <!--*
* material suppressed here by diff group b4337 *
*--><termref def="key-eq" dg="b4337"/> as well.
      </p>
      <p>All such members <rfc2119>must</rfc2119> have type definitions which are
       either the same as the head's type definition or <!--*
* material suppressed here by diff group b5074 *
*--><phrase dg="b5074">derived
       from</phrase> it. Therefore, although the names of elements
       can vary widely as new namespaces and members of the
       <!--*
* material suppressed here by diff group b4337 *
*--><termref def="key-eq" dg="b4337"/> are defined, the content of member elements is
       <!--*
* material suppressed here by diff group b5074 *
*--><phrase dg="b5074">constrained by</phrase> the type 
       definition of the
       <!--*
* material suppressed here by diff group b4337 *
*--><termref def="key-eq" dg="b4337"/> head.</p>
      <p>Note that element substitution groups are not represented as
       separate components.  They are specified in the property values
       for element declarations (see
       <specref ref="cElement_Declarations"/>).</p>
     </div4>
     <div4 id="Attribute_Declaration">
      <head>Attribute Declaration</head>
      <p>An attribute declaration is an association between a name and
       a simple type definition, together with occurrence information
       and (optionally) a default value. The association is either
       global, or local to its containing complex type definition.
       Attribute declarations contribute to <termref def="key-vn">validation</termref> as part of complex type
       definition <termref def="key-vn">validation</termref>, when
       their occurrence, defaults and type components are checked
       against an attribute information item with a matching name and
       namespace.</p>
      <p>
       For detailed information on attribute declarations, see
       <specref ref="cAttribute_Declarations"/>.</p>
     </div4>
     <div4 id="Notation_Declaration">
      <head>Notation Declaration</head>
      <p>A notation declaration is an association between a name and
       an identifier for a notation.  For an attribute <phrase dg="b3054">or element</phrase> information item to
       be <termref def="key-vn">valid</termref> with respect to a
       <code>NOTATION</code> simple type definition, its value <rfc2119>must</rfc2119>
       have been declared with a notation declaration.</p>
      <p>
       For detailed information on notation declarations, see <specref ref="cNotation_Declarations"/>.</p>
     </div4>
    </div3>

    <div3 id="Model_Group_Summary">
     <head>Model Group Components</head>
     <p>The model group, particle, and wildcard components
      contribute to the portion of a complex type definition that
      controls an element information item's content.</p>
     <div4 id="Model_Group">
      <head>Model Group</head>
      <p>A model group is a constraint in the form of a grammar
       fragment that applies to lists of element information items. It
       consists of a list of particles, i.e. element declarations,
       wildcards and model groups.  There are three varieties of model
       group:</p>
      <ulist>
       <item><p>Sequence (the element information items match the
	 particles in sequential order);</p></item>
       <item><p>Conjunction (the element information items match the
	 particles, in any order);</p></item>
       <item><p>Disjunction (the element information items match
         one <phrase dg="b6008">or more</phrase>
	 of the particles).</p></item>
      </ulist>

      <p dg="ww-1">Each model group denotes a set of
       sequences of element information items.  Regarding that set of
       sequences as a language, the set of sequences recognized by a
       group <var>G</var> may be written <var>L</var>(<var>G</var>). <termdef id="key-accept-g" term="accept">A model group <var>G</var><phrase dg="b5072"> </phrase>is said to <term>accept</term>
	or <term>recognize</term> the members of <var>L</var>(<var>G</var>).</termdef>
      </p>
      
      <p>
       For detailed information on model groups, see <specref ref="Model_Groups"/>.</p>
     </div4>
     <div4 id="Particle">
      <head>Particle</head>
      <p>A particle is a term in the grammar for element content,
       consisting of either an element declaration, a wildcard or a
       model group, together with occurrence constraints.
       Particles contribute to <termref def="key-vn">validation</termref> as part of complex type
       definition <termref def="key-vn">validation</termref>, when
       they allow anywhere from zero to many element information items
       or sequences thereof, depending on their contents and
       occurrence constraints.</p>
 
      <p dg="ep01">The name <compdef name="Term" abbrev="t" role="termdef" showAKO="true"> is used to refer to any of the three kinds of
	components which can appear in particles.</compdef>  All
       <termref def="t">Terms</termref> are themselves <termref def="ac">Annotated Components</termref>. <phrase dg="ww-LM"><termdef id="key-basic-term" term="basic term">A
	 <term>basic term</term> is an <compref ref="ed"/> or a
	 <compref ref="w"/>.</termdef> <termdef id="key-basic-particle" term="basic particle">A <term>basic
	  particle</term> is a <compref ref="p"/> whose <propref comp="p" prop="term"/> is a <termref def="key-basic-term"/>.</termdef></phrase></p>

      <p><termdef id="key-contentModel" term="content model">A
	particle can be used in a complex type definition to
	constrain the <termref def="key-vn">validation</termref> of
	the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of an element information item; such a
	particle is called a <term>content model</term></termdef>.
       <note>
	<p><!--*
* material suppressed here by diff group b4399a *
*--><phrase dg="b4399a">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> <termref def="key-contentModel">content models</termref> are similar
	 to but more expressive than
	 <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/> content models; unlike 
	 <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/>, <!--*
* material suppressed here by diff group b4399a *
*--><phrase dg="b4399a">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> <!--*
* material suppressed here by diff group consent-1027 *
*--><phrase dg="consent-1027">does not restrict the form of <termref def="key-contentModel">content models</termref> describing
	  mixed content</phrase>. </p>
       </note></p>
      
      <p dg="ww-LM">Each content model, indeed each 
       particle<phrase dg="ep21"> and each term</phrase>,
       denotes a set of sequences of element information items.  Regarding
       that set of sequences as a language, the set of sequences recognized
       by a particle <var>P</var> may be written <var>L</var>(<var>P</var>).
       <termdef id="key-accept" term="accept">A particle <var>P</var> is said to
	<term>accept</term> or <term>recognize</term> the members of
	<var>L</var>(<var>P</var>).<phrase dg="ep21">  Similarly, a term <var>T</var>
	 <term>accepts</term> or <term>recognizes</term> the members
       of <var>L</var>(<var>T</var>).</phrase></termdef>
      </p>
      <note dg="ww-LM">
       <p>The language accepted by a content model plays a role in determining
	whether an element information item is locally valid or not: if the
	appropriate content model does not accept the sequence of elements
	among its children, then the element information item is not locally
	valid.<phrase dg="ww">  (Some additional constraints must 
	 also be met: not every
	 sequence in <var>L</var>(<var>P</var>) is locally valid against <var>P</var>.  See
	 <specref ref="group-validation"/>.)</phrase></p>
       <p>
<!--* 
The local validity of an element is determined in part by whether
its content model accepts the sequence of element information items
among its children.  *-->
	No assumption is made, in the definition above,
	that the items in the sequence are themselves valid; only the
	<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded names</xspecref> of the items in the sequence are relevant in
	determining whether the sequence is accepted by a particle.
	Their validity does affect whether their parent is (recursively)
	valid as well as locally valid.</p>
      </note>
      <p dg="ww-p">If a sequence <var>S</var> is a member of <var>L</var>(<var>P</var>), 
       then it is necessarily possible to trace a path through the 
       <termref def="key-basic-particle">basic particles</termref>
       within <var>P</var>, with each item within <var>S</var> corresponding to a matching particle
       within <var>P</var>. The sequence of particles within <var>P</var> corresponding to <var>S</var>
       is called the <termref def="key-path"/> of <var>S</var> in <var>P</var>.</p>
      <note dg="ww-p"><p>This <termref def="key-path"/> has nothing to do with
	<!--*
* material suppressed here by diff group f2f0701c *
*--> XPath expressions.
	When there may otherwise be danger of confusion, the <termref def="key-path"/>
	described here may be referred to as the <termref def="key-path">match path</termref> of <var>S</var>
	in <var>P</var>.
       </p></note>

      <p>For detailed information on particles, see <specref ref="cParticles"/>.</p>
     </div4>
     <div4 id="Attribute_Use">
      <head>Attribute Use</head>
      <p>An attribute use plays a role similar to that of a
       particle, but for attribute declarations:  an attribute
       declaration <phrase diff="del" dg="b6008a">within</phrase>
       <phrase diff="add" dg="b6008a">used by</phrase> a complex type definition is embedded within
       an attribute use, which specifies whether the declaration
       requires or merely allows its attribute, and whether it has a
       default or fixed value.</p>
     </div4>
     <div4 id="Wildcard">
      <head>Wildcard</head>
      <p>A wildcard is a special kind of particle which matches element
       and attribute information items dependent on their namespace
       name<phrase dg="b2867-1">s</phrase><!--*
* material suppressed here by diff group b2867-1a *
*--> <!--*
* material suppressed here by diff group b2867-1 *
*--><phrase dg="b2867-1">and optionally on</phrase> their local names.</p>
      <p>
       For detailed information on wildcards, see <specref ref="Wildcards"/>.</p>
     </div4>
    </div3>
    
    <div3 id="Constraint_Summary">
     <head><!--*
* material suppressed here by diff group b2861cc-1 *
*--><phrase dg="b2861cc-1">Constraint</phrase> Components</head>

     <p dg="b5023">This section describes constructs which
      use <bibref ref="bib-xpath2"/> expressions to constrain the
      input document; using them, certain rules can be expressed
      conveniently which would be inconvenient or impossible to
      express otherwise. Identity-constraint definitions are associated with
      element declarations; assertions are associated with type
      definitions; conditional type assignment using type alternatives
      allows the type of an element instance to be chosen based on
      properties of the element instance (in particular, based on the
      values of its attributes).
     </p>

     <div4 id="Identity-constraint_Definition">
      <head><phrase dg="b2861cc-1">Identity-constraint Definition</phrase></head>
      <p>An identity-constraint definition is an association between a name
       and one of several varieties of identity-constraint related to
       uniqueness and reference.  All the varieties use <!--*
* material suppressed here by diff group f2f0701a *
*--><bibref ref="bib-xpath2" dg="f2f0701a"/> expressions to pick out sets of information
       items relative to particular target element information items
       which are unique, or a key, or a <termref def="key-vn">valid</termref> reference, within a specified
       scope. An element information item is only <termref def="key-vn">valid</termref> with respect to an element
       declaration with identity-constraint definitions if those definitions
       are all satisfied for all the descendants of that element
       information item which they pick out.</p>
     <p>For detailed information on identity-constraint definitions, see
       <specref ref="cIdentity-constraint_Definitions"/>.</p>
      <!--*
* material suppressed here by diff group f2f0701b-silent *
*-->
      <note dg="f2f0701b"><p>
	In <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">version 1.0 of this specification</phrase>, identity constraints <!--*
* material suppressed here by diff group f2f0701c *
*--><phrase dg="f2f0701c">used</phrase>
	<bibref ref="bib-xpath1"/><phrase dg="b5023">;</phrase> <!--*
* material suppressed here by diff group f2f0701c *
*--><phrase dg="f2f0701c"><!--*
* material suppressed here by diff group b5023 *
*--><phrase dg="b5023">they</phrase> now</phrase> use <bibref ref="bib-xpath2"/>. <!--*
* material suppressed here by diff group f2f0701e *
*--></p></note>
       </div4>

     <div4 id="TypeAlternative" dg="cta-ta">
      <head>Type Alternative</head>
      <p>A <phrase dg="cta-ta-2"><!--*
* material suppressed here by diff group b6008 *
*-->
       <compref ref="tac" dg="b6008"/> component
	(</phrase>type alternative<phrase dg="cta-ta-2"> for short)</phrase>
       associates a type definition with a predicate.
       <!--*
* material suppressed here by diff group cta-ta-2 *
*-->
       <phrase dg="cta-ta-2">Type alternatives are used in conditional
	type assignment, in which the choice of <termref def="key-governing-type-elem"/>
	for elements governed by a particular element declaration
	depends on properties of the document instance.  An element
	declaration may have a <propref prop="type table" comp="ed"/> which contains a 
	sequence of type alternatives; the predicates on the alternatives
	are tested, and when a predicate is satisfied, the type
	definition paired with it is chosen as the element instance's
	<termref def="key-governing-type-elem"/>.</phrase>
      </p>

      <note dg="wd4.ch">
       <p>The provisions for conditional type assignment are inspired by,
	but not identical to, those of <bibref ref="bib-schemapath"/>.</p>
      </note>
      
      <p>For detailed information on Type Alternatives, see
       <specref ref="cTypeAlternative"/>.</p>
     </div4>

     <div4 id="Assertion" dg="b2861cc-1">
      <head>Assertion</head>

      <p>An assertion is a predicate associated with a type, which is
       checked for each instance of the type.  <!--*
* material suppressed here by diff group trimtree *
*--> If an element or attribute information item
       fails to satisfy an assertion associated with a given type,
       then that information item is not locally <phrase dg="b2861cc-1b"><termref def="key-vn">valid</termref></phrase>
       with respect to that type.</p>

      <p>For detailed information on Assertions, see <specref ref="cAssertions"/>.</p>

      <!--*
* material suppressed here by diff group trimtree *
*-->
      <!--*
* material suppressed here by diff group b5916 *
*-->
      
     </div4>
     <div4 id="sec-ccoverlap" dg="b5023">
      <head>Overlapping Functionality of Constraint Components</head>
     
     <p>Many rules that can be enforced by identity constraints
       and conditional type assignment can also be formulated
       in terms of assertions.  That is, the various constructs have
       overlapping functionality.
       The three forms of constraint differ from each other in various
       ways which may affect the schema author's choice of formulation.
      </p>
      <p>Most obviously, the <termref def="key-psvi">post-schema-validation infoset</termref> will differ somewhat, depending
       on which form of constraint is chosen.       
      </p>
      <p>
       Less obviously, identity constraints are associated with 
       element declarations, while assertions are associated with
       type definitions.  If it is desired to enforce a particular
       property of uniqueness or referential integrity associated
       with a particular element declaration <var>E</var>, of type <var>T</var>,
       the schema author may often choose either an identity constraint
       associated with <var>E</var>, or an assertion associated with <var>T</var>.
       One obvious difference is that
       elements substitutable for <var>E</var> 
       are required to have types derived from <var>T</var>, but
       are not required to enforce the identity constraints (or
       the nillability) of <var>E</var>.  If the constraint applicable to <var>E</var>
       should be enforced by elements substitutable for <var>E</var>, it
       is often most convenient to formulate the constraint as
       an assertion on <var>T</var>; conversely, if only some elements of
       type <var>T</var> are intended to be subject to the constraint, or if
       elements substitutable for <var>E</var> need not enforce the constraint, then it
       will be more convenient to formulate the rule as an
       identity constraint on <var>E</var>.       
      </p>
      <p>Similar considerations sometimes apply to the choice between
       assertions and conditional type assignment.</p>
      <p>
       Because identity constraints and conditional type assignment are
       simpler and less variable than assertions, it may be easier
       for software to exploit or optimize them.  Assertions have
       greater expressive power, which means they are often 
       convenient.  The <quote>rule of least power</quote> applies here;
       it is often preferable to use a less expressive notation in 
       preference to a more expressive one, when either will suffice.
       See <bibref ref="ref-rolp"/>.
      </p>
</div4>
    </div3>
    <div3 id="Group_Definitions">
     <head>Group Definition Components</head>
     <p>There are two kinds of convenience definitions provided to
      enable the re-use of pieces of complex type definitions: model
      group definitions and attribute group definitions.</p>
     <div4 id="Model_Group_Definition">
      <head>Model Group Definition</head>
      <p>A model group definition is an association between a name and
       a model group, enabling re-use of the same model group in
       several complex type definitions.</p>
      <p>
       For detailed information on model group definitions, see
       <specref ref="cModel_Group_Definitions"/>.</p>
     </div4>
     <div4 id="Attribute_Group_Definition">
      <head>Attribute Group Definition</head>
      <p>An attribute group definition is an association between a
       name and a set of attribute declarations, enabling re-use of
       the same set in several complex type definitions.</p>
      <p>
       For detailed information on attribute group definitions, see
       <specref ref="cAttribute_Group_Definitions"/>.</p>
     </div4>
    </div3>
    <div3 id="Annotation">
     <head>Annotation Components</head>
     <p>An annotation is information for human and/or mechanical
      consumers. The interpretation of such information is not defined
      in this specification.</p>
     <p>For detailed information on annotations, see <specref ref="cAnnotations"/>.</p>

    </div3>
   </div2>

   <div2 id="concepts-schemaConstraints">
    <head>Constraints and Validation Rules</head>
    <p>The <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/> specification describes two kinds
     of constraints on XML documents: <emph>well-formedness</emph> and
     <emph>validity</emph> constraints. Informally, the
     well-formedness constraints are those imposed by the definition
     of XML itself (such as the rules for the use of the &lt; and &gt;
     characters and the rules for proper nesting of elements), while
     validity constraints are the further constraints on document
     structure provided by a particular DTD. </p>
    <p>The preceding section focused on <termref def="key-vn">validation</termref>, that is the constraints on
     information items which schema components supply.  In fact
     however this specification provides four different kinds of
     normative statements about schema components, their
     representations in XML and their contribution to the <termref def="key-vn">validation</termref> of information items:</p>
    <glist>
     <gitem>
      <label>Schema Component Constraint</label>
      <def>
       <p><termdef id="gloss-cos" term="Schema Component   Constraint">Constraints on the schema components themselves,
	 i.e. conditions components <rfc2119>must</rfc2119> satisfy to be components at
	 all. <phrase dg="b6008">They are located</phrase>
  <!--*
* material suppressed here by diff group b6008 *
*-->
  in the sixth sub-section of the per-component
	 sections of <specref ref="components"/> and tabulated in
	 <specref ref="outcome-cos"/></termdef>.</p>
      </def>
     </gitem>
     <gitem>
      <label>Schema Representation Constraint</label>
      <def>
       <p><termdef id="gloss-src" term="Schema Representation   Constraint">Constraints on the representation of schema
	 components in XML beyond those which are expressed in
	 <specref ref="normative-schemaSchema"/>.
  <phrase dg="b6008">They are located</phrase>
  <!--*
* material suppressed here by diff group b6008 *
*--> in the
	 third sub-section of the per-component sections of <specref ref="components"/> and tabulated in <specref ref="outcome-src"/></termdef>.</p>
      </def>
     </gitem>
     <gitem>
      <label>Validation Rules</label>
      <def>
       <p><termdef id="gloss-cvc" term="Validation   Rules">Contributions to <termref def="key-vn">validation</termref> associated with schema
	 components. <phrase dg="b6008">They are located</phrase>
  <!--*
* material suppressed here by diff group b6008 *
*-->
  in the fourth sub-section of the
	 per-component sections of <specref ref="components"/> and
	 tabulated in <specref ref="validation_failures"/></termdef>.</p>
      </def>
     </gitem>
     <gitem>
      <label>Schema Information Set Contribution</label>
      <def>
       <p><termdef id="gloss-sic" term="Schema Information Set   Contribution">Augmentations to <termref def="key-psvi">post-schema-validation infoset</termref>s expressed by schema
	 components, which follow as a consequence of 
	 <phrase diff="del" dg="b6015"><termref def="key-vn">validation</termref> 
	  and/or</phrase> <termref def="key-va"/>.
	 <phrase dg="b6008">They are located</phrase>
  <!--*
* material suppressed here by diff group b6008 *
*--> in the fifth
	 sub-section of the per-component sections of <specref ref="components"/> and tabulated in <specref ref="PSVI_contributions"/></termdef>.</p>
      </def>
     </gitem>
    </glist>
    <p>The last of these, schema information set contributions, are
     not as new as they might at first seem.  XML<!--*
* material suppressed here by diff group fpwd *
*--> validation augments the XML<!--*
* material suppressed here by diff group fpwd *
*--> information set in similar
     ways, for example by providing values for attributes not present
     in instances, and by implicitly exploiting type information for
     normalization or access. (As an example of the latter case,
     consider the effect of <code>NMTOKENS</code> on attribute white
     space, and the semantics of <code>ID</code> and
     <code>IDREF</code>.) By including schema information set
     contributions, this specification makes explicit some features
     that XML<!--*
* material suppressed here by diff group fpwd *
*--> <!--*
* material suppressed here by diff group fpwd *
*--><phrase dg="fpwd">leaves</phrase> implicit.</p>

    </div2>

   <div2 id="concepts-conformance">
    <head>Conformance</head>
    
    <note dg="rq144cf">
     <p><phrase diff="del" dg="b7695">The Working Group expects to revise this discussion of
       conformance in future.  A sketch of relevant work can be found
       in <specref ref="impl-def-list"/> and <specref ref="var_terminology"/>.
      </phrase></p>
    </note>

    <p dg="b2825-conf">Within the context of this
     specification, conformance can be claimed for schema
     documents<phrase dg="wgi-20080530">, for schemas,</phrase> 
     and for <!--*
* material suppressed here by diff group b3220b *
*--> 
     processors.
    </p>

    <p dg="b2825-conf">A <termref def="key-schemaDoc">schema document</termref>
     conforms to this specification if and only if 
     <olist role="andtest">
      <item id="sd-valid">
       <p>It is valid with respect to <phrase dg="b5512">the
	 top-level element declaration for <eltref ref="schema"/> in</phrase>
	the schema specified
	in <specref ref="normative-schemaSchema"/>.  
	<!--*
* material suppressed here by diff group b5512 *
*-->That is,
	<phrase dg="b5512">when <termref def="key-va">assessed</termref> using
	 <termref def="c-res">element-driven validation</termref>
	 and stipulating the declaration for <eltref ref="schema"/>, then</phrase>
	in its <termref def="key-psvi">post-schema-validation infoset</termref>, the <eltref ref="schema"/> element
	has a <propref role="psvi" ref="e-validation_attempted"/>
	property with value <pt>full</pt> or <pt>partial</pt> and a
	<propref role="psvi" ref="e-validity"/> property
	with value <pt>valid</pt>.</p>
      </item>
      <item id="sd-supervalid">
       <p>No element in the schema document violates any of the
	Schema Representation Constraints set out in 
	<specref ref="outcome-src"/>.</p>
      </item>
      <!--*
* material suppressed here by diff group wg20070803 *
*-->
     </olist>
    </p>
    <note dg="ed20070803">
     <p>While conformance of schema documents is a precondition for
      the mapping from schema documents to schema components described
      in this specification, conformance of the schema documents does
      not guarantee that the result of that mapping will be a schema
      that conforms to this specification.  Some constraints (e.g. the
      rule that there must be at most one top-level element
      declaration with a particular <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref>) can only be
      checked in the context of the schema as a whole.  
      <phrase dg="b5286">Because component correctness
       depends in part upon the other components present, the
       XML mapping rules defined in this specification do not always
       map conforming schema documents into components that satisfy
       all constraints.  In some cases, the mapping will produce
       components which violate constraints imposed at the component
       level; in others, no component at all will be produced.</phrase>
     </p>
    </note>
    <note dg="ed20070803">
     <p><!--*
* material suppressed here by diff group b5286 *
*-->
     <phrase dg="b5286">
      In this version of this specification, Schema Representation
      Constraints concern only properties of the schema document which
      can be checked in isolation. In version 1.0 of this
      specification, some Schema Representation Constraints could not
      be checked against the schema document in isolation, and so it
      was not always possible to say, for a given schema document,
      whether it satisfied the constraints or not.</phrase>
     </p>
    </note>

    <p diff="add" dg="b7695">A schema conforms to this specification
     if and only if it consists of components which individually and
     collectively satisfy all the relevant constraints specified in
     this document, including but not limited to all the <termref def="gloss-cos">Schema Component Constraints</termref>.
    </p>

    <note diff="add" dg="b7695">
     <p>This specification defines no API or other interface
      for interacting with schemas, so a conformance claim for
      a schema is not normally testable in any standardized way.
      However, if an interface is provided which enables a user
      to interrogate various properties of the schema and check
      their values, conformance can usefully be claimed for the
      schema.</p>
    </note>

    <p diff="del" dg="b7695">This specification describes three levels
     of conformance for schema aware processors. The first is required
     of all processors. Support for the other two will depend on the
     application environments for which the processor is intended.</p>

    <p diff="del" dg="b7695"><termdef id="key-minimallyConforming" term="minimally conforming"><term>Minimally conforming</term>
      processors <rfc2119>must</rfc2119> completely and correctly implement the
      <termref def="gloss-cos">Schema Component Constraints</termref>,
      <termref def="gloss-cvc">Validation Rules</termref>, and
      <termref def="gloss-sic">Schema Information Set
       Contributions</termref> contained in this
      specification</termdef>.</p>

    
    <p diff="del" dg="b7695"><termdef id="key-interchange" term="schema-document aware"><termref def="key-minimallyConforming">Minimally conforming</termref>
      processors which accept schemas represented in the form of XML
      documents as described in <specref ref="layer2"/> are
      additionally said to <!--*
* material suppressed here by diff group rq144cf *
*--><phrase dg="rq144cf">be
       <term>schema-document aware</term></phrase>.</termdef> Such
     processors <rfc2119>must</rfc2119>, when processing schema documents, completely
     and correctly implement <phrase dg="b2825-1">(or
      enforce)</phrase> all <termref def="gloss-src">Schema
      Representation Constraints</termref> in this specification, and
     <rfc2119>must</rfc2119> adhere exactly to the specifications in <specref ref="components"/> for
     mapping the contents of such documents to <termref def="c">schema
      components</termref> for use in <termref def="key-vn">validation</termref> and
     <termref def="key-va"/>.</p>    

    <p diff="add" dg="b7695">This specification distinguishes several
     classes of conforming processors, which are defined in terms
     of the following concepts.
    </p>

    <p diff="add" dg="b7695">
     <termdef id="key-validator" term="validator">A
      <term>validator</term> (or <term>instance validator</term>) is a
      processor which <termref def="key-vn">validates</termref> an XML instance document against a
      conforming schema and distinguishes between valid documents
      and others, for one or more of the definitions of validity
      (<termref def="key-root-valid-doc">root-validity</termref>,
      <termref def="key-deep-valid-doc">deep validity</termref>,
      or
      <termref def="key-uniformly-valid-doc">uniform validity</termref>)
      defined below in section
      <specref ref="sec-schema-validity-and-docs"/>.
      Conforming validators <rfc2119>may</rfc2119> additionally support other
      definitions of validity defined in terms of the <termref def="key-psvi">post-schema-validation infoset</termref>.
     </termdef>
    </p>
    <p diff="add" dg="b7695">
     <termdef id="key-assessor" term="assessor">A <term>schema-validity
       assessor</term> (or just <term>assessor</term>)
      is a processor which performs full or partial
      <termref def="key-s-v-a"/> of an XML instance document,
      element information item, or attribute information item,
      with
      reference to a conforming schema, and provides access to the
      entirety of the resulting <termref def="key-psvi">post-schema-validation infoset</termref>.
      The means by which an <termref def="key-assessor"/> provides
      access to the <termref def="key-psvi">post-schema-validation infoset</termref> is <termref def="key-impl-defined">implementation-defined</termref>. </termdef>
    </p>

    <p diff="add" dg="b7695"><termdef id="key-general-purpose" term="general-purpose">A <term>general-purpose</term> processor
      is a <termref def="key-validator"/> or <termref def="key-assessor"/> which accepts schemas represented in the
      form of XML documents as described in <specref ref="layer2"/>.
      </termdef>
    </p>

    <note dg="b2825-1">
     <p>The <termref def="gloss-src">Schema Representation
      Constraints</termref> are to be enforced after, not 
      before, the conditional-inclusion pre-processing
      described in <specref ref="cip"/>.
     </p>
    </note>

    <p dg="rq144cf"><phrase diff="del" dg="b7695"><termdef id="key-XML-unaware" term="non-schema-document-aware">A
       <termref def="key-minimallyConforming">minimally
	conforming</termref> processor which is not <termref def="key-interchange"/> is said to be a
       <term>non-schema-document-aware</term>
       processor.</termdef></phrase><phrase diff="add" dg="b7695"><termdef id="key-special-purpose" term="special-purpose">A
       schema processor which is not a <termref def="key-general-purpose"/>
       processor is a <term>special-purpose</term>
       processor.</termdef></phrase></p>

    <note>
     <p>By separating the conformance requirements relating to the
      concrete syntax of <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399"><termref def="key-schemaDoc">schema documents</termref></phrase>, this specification
      admits processors which use schemas stored in optimized binary
      representations, dynamically created schemas represented as
      programming language data structures, or implementations in
      which particular schemas are compiled into executable code such
      as C or Java.  Such processors can be said 
      <!--*
* material suppressed here by diff group LC.200912 *
*--><phrase dg="LC.200912">to conform to this 
       specification as <termref def="key-special-purpose"/> 
       but not as <termref def="key-general-purpose"/> 
       processors.</phrase></p>
    </note>

    <p><termdef id="key-fullyConforming" term="Web-aware"><!--*
* material suppressed here by diff group rq144cf *
*--><phrase dg="rq144cf"><term>Web-aware</term></phrase> processors are
      network-enabled processors which are not only 
      <phrase diff="del" dg="b7695">both <termref def="key-minimallyConforming">minimally conforming</termref>
      and <termref def="key-interchange"><!--*
* material suppressed here by diff group rq144cf *
*--><phrase dg="rq144cf">schema-document aware</phrase></termref>,</phrase><phrase diff="add" dg="b7695"><termref def="key-general-purpose"/></phrase> but
      which additionally <rfc2119>must</rfc2119> be capable of accessing schema
      documents from the World Wide Web <!--*
* material suppressed here by diff group rq144cf *
*--><phrase dg="rq144cf">as described in</phrase> <specref ref="web-representation"/> and <specref ref="schema-loc"/>.
     </termdef>.
    </p>
    <note dg="rq144wgno">
     <p>In version 1.0 of this specification the class of <termref diff="del" def="key-interchange" dg="b7695"/><termref diff="add" def="key-general-purpose" dg="b7695"/> processors 
      was termed 
      <quote>conformant
       to the XML Representation of Schemas</quote>. Similarly, the
      class of <termref def="key-fullyConforming"/> processors was
      called <quote>fully conforming</quote>.</p>
    </note>
    
    <p diff="add" dg="b7695">Several important classes of processor
     can be defined in terms of the concepts just given:</p>
    <glist diff="add" dg="b7695">
     <gitem id="key-gpval">
      <label>general-purpose validators</label>
      <def>
       <p><termref def="key-validator">Validators</termref>
	which accept arbitrary schemas expressed
	in the form of sets of schema documents (i.e.,
	are <termref def="key-general-purpose"/>); some
	general-purpose validators may additionally be
	<termref def="key-fullyConforming"/>.</p>
      </def>
     </gitem>
     <gitem id="key-gp-assessor">
      <label>general-purpose schema-validity assessors</label>
      <def>
       <p><termref def="key-assessor">Assessors</termref>
	which accept arbitrary schemas expressed
	in the form of sets of schema documents (i.e.,
	are <termref def="key-general-purpose"/>); some
	general-purpose assessors may additionally be
	<termref def="key-fullyConforming"/>.</p>
      </def>
     </gitem>
     <gitem id="key-spval">
      <label>special-purpose validators</label>
      <def>
       <p><termref def="key-validator">Validators</termref>
	which do not accept arbitrary schemas expressed
	in the form of sets of schema documents</p>
       <note>
	<p>Typically a special-purpose validator will either have a
	 built-in (hard-coded) schema, or else will accept arbitrary
	 schemas in some form other than schema documents.
	</p>
       </note>
      </def>
     </gitem>
     <gitem id="key-othertools">
      <label>other special-purpose tools</label>
      <def>
       <p>Processors (other than those otherwise defined) which
	perform some task, service, or activity which depends at
	least in part on the contents of some schema, and which
	do so in ways which are consistent with the provisions of
	this specification.</p>
       <note>
	<p>The class of <termref def="key-othertools">other
	  special-purpose tools</termref> is not,
	 as defined here, a particularly informative description
	 of a piece of software.  It is expected that other
	 specifications may wish to define processes depending
	 in part upon schemas, and to require that implementations
	 of those processes conform to this specification;
	 this conformance class provides a reference point for
	 such requirements, and for such claims of conformance.
	</p>
       </note>
      </def>
      
     </gitem>
    </glist>

    <note><p>Although this specification provides just these <phrase diff="del" dg="b7695">three</phrase> standard levels of
      conformance, it is anticipated that other conventions can be
      established in the future. <phrase diff="del" dg="b7695">For
       example, the World Wide Web Consortium is considering
       conventions for packaging on the Web a variety of resources
       relating to individual documents and namespaces.  Should such
       developments lead to new conventions for representing schemas,
       or for accessing them on the Web, new levels of conformance can
       be established and named at that time.</phrase> There is no
      need to modify or republish this specification to define such
      additional levels of conformance.
     </p></note>

    <p diff="del" dg="b7695">See <specref ref="composition"/> for a
     more detailed explanation of the mechanisms supporting these
     levels of conformance.</p>

    <p diff="add" dg="b7695">See <specref ref="impl-def-list"/> and <specref ref="var_terminology"/>
     for terminology and concepts which may be helpful in 
     defining the behavior of conforming processors and/or
     claiming conformance to this specification.
    </p>

   </div2>

   <div2 diff="add" id="sec-schema-validity-and-docs" dg="b5164">
    <head>Schema-validity and documents</head>
     
    <!--*
* material suppressed here by diff group b5164x *
*-->
    <!--*
* material suppressed here by diff group b5164x *
*-->
    <!--*
* material suppressed here by diff group b5164x *
*-->

    <p>As noted above, in general a document is <term>valid against
     a particular schema</term> if it obeys the constraints imposed 
     by that schema.  Depending on the nature of the application
     and on the specific invariants to be enforced, different
     forms of validity may be appropriately required by an
     application, a specification, or other users of XSD.
     This section defines terminology for use in describing the
     requirements of applications or other technologies which use
     XSD schema to describe constraints on XML documents.
    </p>
     
    <note dg="b5164">
     <p>Conformance to this specification cannot be claimed for XML
      documents other than schema documents; this specification
      imposes no requirements on documents, validity-related or 
      otherwise, and the terms defined in this section play 
      no role in conformance 
      to this specification.  They are defined here for the 
      convenience of users of this specification who do wish to
      impose specific requirements on documents.</p>
     <p>The terms defined capture some commonly used requirements, but
      the specification of which documents should be regarded as
      acceptable for a specific application, or as conforming to a
      given specification, is out of scope for this specification.
      Applications and specifications which use XSD are free to
      specify whatever constraints they see fit on documents; the
      provision of terms for the concepts identified here should not
      be taken to imply that other rules for document acceptability
      are discouraged or inappropriate.
     </p>
    </note>

    <p>All the terms defined below require that the document's root
     element be <termref def="key-va">assessed</termref> using either <termref def="c-res">element-driven validation</termref> (when the
     intended root element of the schema is clearly specified <!--* ,
     by methods outside the scope of this specification *-->) or else
     <termref def="key-strict-wc-mode">strict wildcard
      validation</termref> (if several different root elements are
     acceptable).</p>
    
    <glist dg="b5164">
     <gitem id="key-root-valid-doc">
      <label>root-valid document</label>
      <def>
       <p>A document is <term>root-valid</term> against a given
	XSD schema if and only if after <termref def="key-va"/> the document's root
	element has <propref ref="e-validity" role="psvi"/> =
	<pt>valid</pt> and <propref ref="e-validation_attempted"/> 
	= <pt>full</pt> or <pt>partial</pt>.
       </p>
      </def>
     </gitem>
     <gitem id="key-deep-valid-doc">
      <label>deep-valid document</label>
      <def>
       <p>A document is <term>deep-valid</term> against a given
	XSD schema if and only if after <termref def="key-va"/>
	<olist role="andtest"> 
	 <item id="docdeepvalid-rootvalid"> 
	  <p>The document's root element has <propref ref="e-validity" role="psvi"/> = <pt>valid</pt>.</p> 
	 </item>
	 <item>
	  <p>The document's root element has 
	   <propref ref="e-validation_attempted"/> = <pt>full</pt> or
	   <pt>partial</pt>.
	  </p> 
	 </item> 
	 <item> 
	  <p>No element in the document has <propref ref="e-validity" role="psvi"/> = <pt>invalid</pt>.</p>
	 </item> 
	 <item>
	  <p>No attribute in the document has <propref ref="a-validity" role="psvi"/> = <pt>invalid</pt>.</p>
	 </item> 
	</olist>
       </p>
       <note>
	<p>The second and third clauses are necessary to ensure that
	 invalid descendants of laxly validated elements are caught;
	 they do not cause their laxly validated ancestor to have
	 <propref ref="e-validity"/> = <pt>invalid</pt>.
	</p>
       </note>
      </def>
     </gitem>
     <gitem id="key-uniformly-valid-doc">
      <label>uniformly valid document</label>
      <def>
       <p>A document is <term>uniformly valid</term> against a given
	XSD schema if and only if after <termref def="key-va"/>
	<olist role="andtest"> 
	 <item id="uniformlyvalid-rootvalid"> 
	  <p>The document's root element has <propref ref="e-validity" role="psvi"/> = <pt>valid</pt>.</p> 
	 </item>
	 <item>
	  <p>The document's root element has 
	   <propref ref="e-validation_attempted"/> = <pt>full</pt>.
	  </p> 
	 </item>  
	</olist>
       </p>
       <note>
	<p>See <specref ref="sec-sic-e-outcome"/> for the definition
	 of the <propref ref="e-validation_attempted"/> property.)
	</p>
	<p>It follows from the first and second clauses that every
	 element and attribute in the document has been 
	 <termref def="key-vn">validated</termref> and each of them is valid.  (This distinguishes
	 <term>uniform validity</term> from <term>deep validity</term>;
	 a deep-valid document may include elements and attributes
	 whose validity is <pt>notKnown</pt>, perhaps because they  
	 are laxly <termref def="key-va">assessed</termref> and no declarations were found for
	 them, or because they were <termref def="key-skipped"/>.)
	</p>
       </note>
      </def>
     </gitem>
    </glist>
    
    
    <note dg="b5164">
     <p>The absence of error codes does not suffice to make a document
      valid according to any of the definitions just given; the
      <propref ref="e-schema_error_code"/> property will be empty (or
      <termref def="key-null">absent</termref>) for any root element with <propref ref="e-validity" role="psvi"/> = <pt>notKnown</pt>. <!--* will
      not necessarily elicit an error message from a processor. *-->
      Validators which expose only the <propref ref="e-schema_error_code"/> property and fail to distinguish in
      their behavior between <propref ref="e-validity" role="psvi"/> = <pt>notKnown</pt> and <propref ref="e-validity" role="psvi"/> = <pt>valid</pt> can thus easily
      mislead unwary users. A frequent cause of <!--* such an outcome
      *-->
      <propref ref="e-validity" role="psvi"/> = <pt>notKnown</pt> is
      the failure of the element information item to <termref def="key-e-d-match"/> any
      declaration in the schema.  
     </p>
    </note>
    

   </div2>

   <div2 id="concepts-nameSymbolSpaces">
    <head>Names and Symbol Spaces</head>
    <p>As discussed in <specref ref="concepts-data-model"/>, most
     schema components (<!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase>) have <termref def="key-compName">names</termref>. If all such names were
     assigned from the same <quote>pool</quote>, then it would be
     impossible to have, for example, a simple type definition and an
     element declaration both with the name <quote>title</quote> in a
     given <termref def="key-targetNS">target namespace</termref>.</p>
    <p>Therefore <termdef id="key-symbolSpace" term="symbol       space">this specification introduces the term <term>symbol
       space</term> to denote a collection of names, each of which is
      unique with respect to the others</termdef>.  <!--*
* material suppressed here by diff group ep19 *
*-->
<!--* !!! should recast this a bit; the relevant discussion has been
    * removed from later versions of Namespaces because it was so
    * misleading. *-->
<!--* &old-xmlnsspec;#ns-breakdown *-->
     <phrase diff="del" dg="b5507">
     There is a single distinct symbol space within a given <termref def="key-targetNS">target namespace</termref> for each kind of 
     definition and declaration component identified in <specref ref="concepts-data-model"/>, except that within a target namespace,
     simple type definitions and complex type definitions share a
     symbol space. Within a given symbol space, names 
     <!--*
* material suppressed here by diff group b5150b *
*--><phrase dg="b5150b"><rfc2119>must</rfc2119> be</phrase> unique, but
     the same name <rfc2119>may</rfc2119> appear in more than one symbol space without
     conflict. For example, the same name can appear in both a type
     definition and an element declaration, without conflict or
     necessary relation between the two.</phrase><phrase diff="add" dg="b5507">
     Within a given schema there are distinct symbol spaces 
      for each kind of named definition and declaration component identified 
      in <specref ref="concepts-data-model"/>, except that 
     simple type definitions and complex type definitions share a
     symbol space. Within a given symbol space, names 
     <!--*
* material suppressed here by diff group b5150b *
*--><phrase dg="b5150b"><rfc2119>must</rfc2119> be</phrase> unique;
      as a consequence, each <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> within a given
      symbol space uniquely identifies a single component.
     The same <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> <rfc2119>may</rfc2119> however appear in more than one symbol space without
     conflict. For example, assuming that the namespace prefix
      <code>my</code> is bound to some particular namespace, 
      both a simple type definition and a top-level element declaration 
      can bear the name <code>my:abc</code> without conflict or
      necessary relation between the two.  But it is not possible
      for both a simple type definition and a complex type
      definition, or two distinct top-level element declarations,
      to share the name <code>my:abc</code>.</phrase>
    </p>
    <p>Locally scoped attribute and element declarations are special
     with regard to symbol spaces. <phrase diff="del" dg="b5507">Every 
      complex type definition
      defines its own local attribute and element declaration symbol
      spaces, where these symbol spaces are distinct from each other
      and from any of the other symbol spaces.</phrase><phrase diff="add" dg="b5507">Their names are not included
      in the global symbol spaces for attribute and element names;
      each complex type definition defines its own attribute symbol
      space, and elements local to a complex type definition are
      constrained by <specref ref="cos-element-consistent"/>,
      but not by means of symbol spaces.  Their names 
      are not regarded as being in any particular symbol space.</phrase>  
     So, for example, two
     complex type definitions having the same target namespace can
     contain a local attribute declaration for the unqualified name
     <quote>priority</quote>, or contain a local element declaration
     for the name <quote>address</quote>, without conflict or
     necessary relation between the two.</p>
    </div2>
   <div2 id="Instance_Document_Constructions"> 
    <head>Schema-Related Markup in Documents Being Validated</head>
    <!--*
* material suppressed here by diff group f2f0701b *
*-->

    <!--* <issue id="RQ-153i" role="1.1" diff="del" dg="b3047">
     < ! - - * 
     <p><loc href="&reqs;#xsd-1.1-namespace" target="reqs">RQ-153 (xsd-1.1-namespace)</loc></p> 
     * - - >
     <p><loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=3047"
       target="reqs" >Issue 3047 (RQ-153 XSD 1.1 namespace)</loc></p>
     <p>This specification must choose either to use the same
      namespace as XML Schema 1.0, or to use a different namespace, or
      to use more than one namespace. An explicit decision should be
      made.</p>
    </issue> *-->

    <!--*
* material suppressed here by diff group f2f0701b-silent *
*-->

    <!--*
* material suppressed here by diff group f2f0701b-silent *
*-->

    <p><emph>XML Schema<phrase dg="b4399"> Definition Language</phrase>: Structures</emph> <!--*
* material suppressed here by diff group f2f0701b *
*--> defines
     several attributes for direct use in any XML documents. <!--*
* material suppressed here by diff group f2f0701b *
*--><phrase dg="f2f0701c">These
      attributes are in the schema instance namespace
      (<code>http://www.w3.org/2001/XMLSchema-instance</code>) described in <specref ref="xsi-namespace"/> above.</phrase> All schema processors
     <phrase dg="b5150b"><rfc2119>must</rfc2119></phrase>
     have appropriate attribute declarations for these attributes
     built in, see <specref ref="xsi.type"/>,
     <specref ref="xsi.nil"/>, <specref ref="xsi.schemaLocation"/> and
     <specref ref="xsi.noNamespaceSchemaLocation"/>.</p>

    <note dg="ep20">
     <p>As described above (<specref ref="ns-bindings"/>), the
      attributes described in this section are referred to in this
      specification as <quote><code>xsi:type</code></quote>,
      <quote><code>xsi:nil</code></quote>, etc.  This is shorthand for
      <quote>an attribute information item whose <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">namespace 
	name</xpropref> is <!--* identical to *-->
       <code>http://www.w3.org/2001/XMLSchema-instance</code> and whose <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">local 
	name</xpropref> is <code>type</code></quote> (or
      <code>nil</code>, etc.).
     </p><!--* 'identical to' was in fact in some of the passages
     replaced by this idiom, but the WG felt that was unnecessary to 
     say it here.  So delete it. *-->
    </note>

    <!--*
* material suppressed here by diff group consent-1020-move-ftf0701 *
*-->

    <div3 id="xsi_type">
     <head>xsi:type</head>
     <p>The <specref ref="Simple_Type_Definition"/> or <specref ref="Complex_Type_Definition"/> used in <termref def="key-vn">validation</termref> of an element is usually
      determined by reference to the appropriate schema components. An
      element information item in an instance <rfc2119>may</rfc2119>, however,
      explicitly assert its type using the attribute
      <code>xsi:type</code>. The value of this attribute is a <termref def="gloss-QName">QName</termref>;  see <!--*
* material suppressed here by diff group b5286b *
*--> <specref ref="cvc-resolve-instance" dg="b5286b"/> for the means by which the <termref def="gloss-QName">QName</termref> is associated with a type
      definition.
     </p>
    </div3>
    <div3 id="xsi_nil">
     <head>xsi:nil</head>
     <p><emph>XML Schema<phrase dg="b4399"> Definition Language</phrase>: Structures</emph> introduces a mechanism for signaling that an element
      <!--*
* material suppressed here by diff group fpwd *
*--><phrase dg="fpwd"><rfc2119>must</rfc2119></phrase> be accepted as <termref def="key-vn">valid</termref>
      when it has no content despite a content type which does not
      require or even necessarily allow empty content.  An element
      <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">can be</phrase> <termref def="key-vn">valid</termref>
      without content if it has the attribute <code>xsi:nil</code>
      with the value <code>true</code>.  An element so labeled <rfc2119>must</rfc2119>
      be empty, but can carry attributes if permitted by the
      corresponding complex type.</p>
    </div3>
    <div3 id="xsi_schemaLocation">
     <head>xsi:schemaLocation, xsi:noNamespaceSchemaLocation</head>
     <p>The <code>xsi:schemaLocation</code> and
      <code>xsi:noNamespaceSchemaLocation</code> attributes can be
      used in a document to provide hints as to the physical location
      of schema documents which <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">can</phrase> be used for <termref def="key-va"/>. See <specref ref="schema-loc"/> for details on the use of these
      attributes.</p>
     <note diff="add" dg="b5163">
      <p>The <att>xsi:schemaLocation</att> attribute typically appears
       in XML document instances being <termref def="key-vn">validated</termref>; it is distinct from
       the <att>schemaLocation</att> attribute defined for some
       elements in schema documents (which is not always a hint
       but sometimes a firm directive).</p>
     </note>
    </div3>
   </div2>
   <div2 id="web-representation">
    <head>Representation of Schemas on the World Wide Web</head>
    <p>On the World Wide Web, schemas are conventionally represented
     as XML documents (preferably of MIME type
     <code>application/xml</code> or <code>text/xml</code>, but see
     <clauseref ref="c-vxd"/> of <specref ref="src-include"/>),
     conforming to the specifications in <specref ref="layer2"/>. For
     more information on the representation and use of schema
     documents on the World Wide Web
     see <specref ref="schema-repr"/> and
     <specref ref="schema-loc"/>. </p>
   </div2>
  </div1>
  <div1 id="components">
   <head>Schema Component Details</head>
   <div2 id="scIntro">
    <head>Introduction</head>
    <p>The following sections provide full details on the composition
     of all schema components, together with their XML representations
     and their contributions to <termref def="key-va"/>.  Each section is devoted to a
     single component, with separate subsections for
     <olist>
      <item>
       <p>properties:  their values and significance</p>
      </item>
      <item>
       <p>XML representation and the mapping to properties</p>
      </item>
      <item>
       <p>constraints on representation</p>
      </item>
      <item>
       <p>validation rules</p>
      </item>
      <item>
       <p><termref def="key-psvi">post-schema-validation infoset</termref> contributions</p>
      </item>
      <item>
       <p>constraints on the components themselves</p>
      </item>
     </olist> The sub-sections immediately below introduce conventions
     and terminology used throughout the component sections.</p>
   <div3 id="sec-components-and-properties">
     <head>Components and Properties</head>
     <p>Components are defined in terms of their properties, and each
      property in turn is defined by giving its range, that is the
      values it <!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase> have.  This can be understood as defining a
      schema as a labeled directed graph, where the root is a schema,
      every other vertex is a schema component or a literal (string,
      boolean, <!--*
* material suppressed here by diff group b1915bis *
*--><phrase dg="b1915bis">decimal</phrase>) and every labeled edge is a property.
      The graph is <emph>not</emph> acyclic:  multiple copies of
      components with the same name in the same <termref def="key-symbolSpace">symbol space</termref> <!--*
* material suppressed here by diff group fpwd *
*--><phrase dg="fpwd"><rfc2119>must not</rfc2119></phrase> exist, so in some cases re-entrant
      chains of properties <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">will</phrase> exist. <!--*
* material suppressed here by diff group b6012 *
*--></p>
     <!--* <issue id="RQ-125i" role="1.1">
< ! - - * <p><loc href="&reqs;#id-anon-types" target="reqs">RQ-125 (id-anon-types)</loc>, 
<loc href="&reqs;#scd-origin-inheritance" target="reqs">RQ-134 (scd-origin-inheritance)</loc>
* - - >
      <p><loc
	href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=2837"
	target="reqs" >Issue 2837 (RQ-125 identity of anonymous
	types)</loc>, <loc
	href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=2842"
	target="reqs" >Issue 2842 (RQ-134 inherited portions of
	content model)</loc>
      </p>
      <p>Version 1.0 was deliberately reticent in stating identity
       conditions for components.  With hindsight this was a mistake,
       and will be corrected.</p>
      <resolution>
       <p>Add {scope} property to type definition components which
	will either be the enclosing element declaration or "global",
	by analogy with element declarations {scope}. [For further
	context, see <loc
	 href="http://www.w3.org/XML/Group/2004/05/xml-schema-ftf-minutes.html">F2F 
	 2004-03-12, section RQ-125</loc> (W3C-member-only link).]</p>
       <p>This change will solve the anonymous type equality problem
	by giving an unequivocal answer to the <quote>who am
	 I?</quote> question for such types by way of the answer
	<quote>Your identity is determined by your scope's
	 identity.</quote></p>
      </resolution>
     </issue> *-->
     <note>
      <p>A schema and its components as defined in this chapter are an
       idealization of the information a schema-aware processor
       requires: implementations are not constrained in how they
       provide it.  In particular, no implications about literal
       embedding versus indirection follow from the use below of
       language such as <quote>properties . . . having . . .
	components as values</quote>.</p>
     </note>
    
     <p dg="ep01">Component properties are simply named
      values.  Most properties have either other components or
      literals (that is, strings or booleans or enumerated keywords)
      for values, but in a few cases, where more complex values are
      involved, <termdef id="t-propRec" term="property record">a property
       value may itself be a collection of named values, which we call
       a <term>property record</term></termdef>.</p>
     <p><termdef id="key-null" term="absent">Throughout this
       specification, the term <term>absent</term> is used as a
       distinguished property value denoting absence</termdef>.<phrase dg="fpwd">  Again this should not be 
       <!--*
* material suppressed here by diff group b5917 *
*-->
       <phrase dg="b5917">interpreted</phrase> as
       constraining implementations, as for instance between using a
       <pt>null</pt> value for such properties or not representing
       them at all.</phrase>
      <termdef id="key-nonnull" term="present" dg="ep24">
       A property value
       which is not <termref def="key-null">absent</termref> is <term>present</term>.</termdef>
     </p>
     <p>Any property <!--*
* material suppressed here by diff group rq144nv *
*--><phrase dg="rq144nv">not defined as optional is always
       present</phrase>; optional properties which are not present are
      taken to have <termref def="key-null">absent</termref> as their
      value.  Any property identified as a having a set, subset or
      list value <!--*
* material suppressed here by diff group b5150b *
*--><phrase dg="b5150b">might</phrase> have an empty value unless this is explicitly
      ruled out:  this is <emph>not</emph> the same as <termref def="key-null">absent</termref>. Any property value identified
      as a superset or subset of some set 
      <!--*
* material suppressed here by diff group b5150b *
*--><phrase dg="b5150b">might</phrase> be equal to that set,
      unless a proper superset or subset is explicitly called for. By
      'string' in Part 1 of this specification is meant a sequence of
      ISO 10646 characters identified as <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#charsets">legal XML
       characters</xtermref> in <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/>.</p>
     <note dg="b1838">
      <p>It is <termref def="key-impl-defined">implementation-defined</termref> whether a schema processor uses the
       definition of legal character from <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/> or
       <bibref ref="ref-xml-1.0"/>.</p>
     </note>
    </div3>
    <div3 id="xroc">
     <head>XML Representations of Components</head>
     <p>The principal purpose of <emph>XML Schema<phrase dg="b4399"> Definition Language</phrase>: Structures</emph> is to define a set of schema
      components that constrain the contents of instances and augment
      the information sets thereof.  Although no external
      representation of schemas is required for this purpose, such
      representations will obviously be widely used. To provide for
      this in an appropriate and interoperable way, this specification
      provides a normative XML representation for schemas which makes
      provision for every kind of schema component.  <termdef id="key-schemaDoc" term="schema document">A document in this
       form (i.e. a <eltref ref="schema"/> element information item)
       is a <term>schema document</term></termdef>.  For the schema
      document as a whole, and its constituents, the sections below
      define correspondences between element information items (with
      declarations in
<specref ref="normative-schemaSchema"/> and <specref ref="nonnormative-schemaDTD"/>) and schema components.  <!--*
* material suppressed here by diff group cleanup-1 *
*--><phrase dg="cleanup-1">The key</phrase> element information items in
      the XML representation of a schema <!--*
* material suppressed here by diff group cleanup-1 *
*--><phrase dg="cleanup-1">are</phrase> in the <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> namespace, that
      is their <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">namespace 
       name</xpropref> <!--*
* material suppressed here by diff group cleanup-1 *
*--><phrase dg="cleanup-1">is</phrase>
      <code>http://www.w3.org/2001/XMLSchema</code>.  Although a common way of creating
      the XML Infosets which are or contain <termref def="key-schemaDoc">schema documents</termref> will be
      using an XML parser, this is not required:  any mechanism which
      constructs conformant infosets as defined in <bibref ref="ref-xmlinfo"/> is a possible starting
      point.</p>
     <p>Two aspects of the XML representations of components presented
      in the following sections are constant across them all:
      <olist>
       <item>
	<p>All of them allow attributes qualified with namespace names
	 other than the <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> namespace itself: these appear as
	 annotations in the corresponding schema component;</p>
       </item>
       <item>
	<p>All of them allow an <eltref ref="annotation"/> as their
	 first child, for human-readable documentation and/or
	 machine-targeted information.</p>
       </item>
      </olist>
     </p>

     <p dg="b5158">A recurrent pattern in the XML
      representation of schemas may also be mentioned here.  In many
      cases, the same element name (e.g. <code>element</code> or
      <code>attribute</code> or <code>attributeGroup</code>), serves
      both to define a particular schema component and to incorporate
      it by reference.  In the first case the <code>name</code>
      attribute is required, in the second the <code>ref</code>
      attribute is required<!--*
* material suppressed here by diff group b5158b *
*-->.  These
      two usages are mutually exclusive, and sometimes also depend on
      context<!--*
* material suppressed here by diff group b5158b *
*-->.</p>
     
     <p dg="b2825-1">The descriptions of the XML representation
      of components, and the <termref def="gloss-src">Schema Representation
       Constraints</termref>, apply to schema documents <emph>after</emph>,
      not before, the conditional-inclusion pre-processing described
      in <specref ref="cip"/>.
     </p>

    </div3>
    <div3 id="mapping.xr.c">
     <head>The Mapping between XML Representations and
      Components</head>
     <p>For each kind of schema component there is a corresponding
      normative XML representation. The sections below describe the
      correspondences between the properties of each kind of schema
      component on the one hand and the properties of information
      items in that XML representation on the other, together with
      constraints on that representation above and beyond those
      <!--*
* material suppressed here by diff group b5139 *
*--><phrase dg="b5139">expressed</phrase> in the
      <specref ref="normative-schemaSchema"/>.</p>
     <p>The language used is as if the correspondences were mappings
      from XML representation to schema component, but the mapping in
      the other direction, and therefore the correspondence in the
      abstract, can always be constructed therefrom.</p>
     <p>In discussing the mapping from XML representations to schema
      components below, the value of a component property is often
      determined by the value of an attribute information item, one of
      the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> of an element information item.  Since schema
      documents are constrained by the
      <specref ref="normative-schemaSchema"/>, there is always a simple type
      definition associated with any such attribute information item.
      <termdef id="key-vv" term="actual value"><!--*
* material suppressed here by diff group b5328 *
*--><phrase dg="b5328">With reference to any 
	string, interpreted as denoting
	an instance of a given datatype, the term 
	<term>actual value</term> denotes the value to which the
	<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-lexical-mapping">lexical mapping</xtermref> of that datatype maps the string.
       </phrase>       
      </termdef><!--*
* material suppressed here by diff group b5328 *
*--><phrase dg="b5328">In the case of attributes in 
       schema documents, the string used as the
       lexical representation is normally the <termref def="key-nv">normalized value</termref> of the
       attribute.  The associated datatype is, unless otherwise specified, 
       the one identified in the declaration of the attribute, in the
       schema for schema documents; in some cases (e.g. the
       <compref ref="f-e" name="enumeration"/> 
       facet, or fixed and default values
       for elements and attributes) the associated datatype will
       be a <phrase dg="ep99">more specific</phrase><!--*
* material suppressed here by diff group ep99 *
*--> one, 
       as specified in the appropriate
       XML mapping rules.  The <termref def="key-vv">actual value</termref></phrase>
      <!--*
* material suppressed here by diff group b5328 *
*-->
      will often be a string, but <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">can</phrase> also be an integer, a
      boolean, a URI reference, etc.  This term is also occasionally
      used with respect to element or attribute information items in a
      document being <termref def="key-va"><phrase diff="del" dg="b5164">validated</phrase><phrase diff="add" dg="b5164">assessed</phrase></termref>.</p>
     <p>Many properties are identified below as having other schema
      components or sets of components as values.  For the purposes of
      exposition, the definitions in this section assume that (unless
      the property is explicitly identified as optional) all such
      values are in fact present.  When schema components are
      constructed from XML representations involving reference by name
      to other components, this assumption <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">will in some
       cases</phrase> be violated if one or more references cannot be
      <!--*
* material suppressed here by diff group ep-rr *
*--><phrase dg="ep-rr"><termref def="src-resolve">resolved</termref></phrase>.  This specification addresses the matter of
      missing components in a uniform manner, described in
<specref ref="conformance-missing"/>:  no mention of handling missing
      components will be found in the individual component
      descriptions below.</p>
     <p>Forward reference to named definitions and declarations
      <emph>is</emph> allowed, both within and between
      <termref def="key-schemaDoc">schema documents</termref>. By the time the component corresponding to
      an XML representation which contains a forward reference is
      actually needed for <termref def="key-vn">validation</termref><phrase dg="may">,
       it is possible that</phrase> an appropriately-named component
      <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">will</phrase> have become available to discharge the reference: see
      <specref ref="composition"/> for details.</p>
   </div3>
   <div3 id="sec-wsnormalization">
    <head>White Space Normalization during Validation</head>
    <p>Throughout this specification, <termdef id="key-iv" term="initial value">the
<term>initial value</term> of some
attribute information item is the value of the
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">normalized
value</xpropref> property of that item.  Similarly, the <term>initial value</term> of an element information item is the string composed of, in order, the
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.character">character code</xpropref> of each character information item in the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of that
element information item</termdef>.</p>
   <p>The above definition means that comments and processing instructions,
even in the midst of text, are ignored for all <termref def="key-vn">validation</termref> purposes.</p>

   <p><termdef id="key-nv" term="normalized value">The
       <term>normalized value</term> of an element or attribute
       information item is an <termref def="key-iv">initial value</termref> <!--*
* material suppressed here by diff group b3251 *
*--><phrase dg="b3251">which</phrase> has been normalized
       according to the value of the <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#rf-whiteSpace">whiteSpace facet</xtermref><!--*
* material suppressed here by diff group b3251 *
*--><phrase dg="b3251">, and the values of any other <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-pre-lexical">pre-lexical facets</xtermref>, associated with</phrase> the simple type definition used
       in its <termref def="key-vn">validation</termref><!--*
* material suppressed here by diff group b3251 *
*--><phrase dg="b3251">.  The keywords for 
	whitespace normalization have the following meanings:</phrase>
       <glist> 
	<gitem><label>preserve</label>
	 <def><p>No normalization is done, the 
	   <phrase dg="b3251">whitespace-normalized</phrase> value
	   is the <!--*
* material suppressed here by diff group b3251 *
*--><phrase dg="b3251"><termref def="key-iv">initial value</termref></phrase></p></def>
	</gitem> 
	<gitem><label>replace</label> 
	 <def><p>All occurrences of <code>#x9</code> (tab),
	   <code>#xA</code> (line feed) and <code>#xD</code> (carriage
	   return) are replaced with <code>#x20</code>
	   (space).</p></def>
	</gitem>
	<gitem><label>collapse</label> 
	 <def><p>Subsequent to the replacements specified above under
	   <local>replace</local>, contiguous sequences of
	   <code>#x20</code>s are collapsed to a single
	   <code>#x20</code>, and initial and/or final
	   <code>#x20</code>s are deleted.</p></def> 
	</gitem>
       </glist> 
       <phrase dg="b3251">Similarly, the
	<term>normalized value</term> of any string with respect to a
	given simple type definition is the string resulting from
	normalization using the <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#rf-whiteSpace">whiteSpace facet</xtermref>
	and any other <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-pre-lexical">pre-lexical facets</xtermref>, associated with that simple type definition.</phrase>
      </termdef>
      <!--*
* material suppressed here by diff group pre *
*-->
     </p>
     <p dg="b3251">When more than one <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-pre-lexical">pre-lexical facet</xtermref> applies, the <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#rf-whiteSpace">whiteSpace facet</xtermref> is applied first; the order in which <termref def="key-impl-defined">implementation-defined</termref> facets
      are applied is <termref def="key-impl-defined">implementation-defined</termref>.</p>
    <p>If the simple type definition used in an item's 
<termref def="key-vn">validation</termref> is <!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase>, 
<phrase dg="iff">then </phrase>the 
<termref def="key-nv">normalized value</termref> <rfc2119>must</rfc2119> be determined 
as in the <local>preserve</local> case above.</p>
   <p>There are three alternative validation rules which <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">help</phrase> supply the necessary background for the
above:  <specref ref="cvc-attribute"/> (<clauseref ref="c-sva"/>), <specref ref="cvc-type"/> (<clauseref ref="c-sv1"/>) or <specref ref="cvc-complex-type"/> (<clauseref ref="c-sv2"/>).</p>
   <p>These three levels of normalization correspond to the processing mandated
in XML<!--*
* material suppressed here by diff group fpwd *
*--> for element content, CDATA attribute 
content and tokenized
attributed content, respectively.  See 
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#AVNormalize">Attribute Value Normalization</xspecref> 
in <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/> for the precedent for <local>replace</local> and 
<local>collapse</local> for attributes.  Extending this processing to element 
content is necessary to ensure <!--*
* material suppressed here by diff group b5139 *
*--> 
consistent <termref def="key-vn">validation</termref> 
semantics for simple types, regardless of whether they are applied to attributes 
or elements.  Performing it twice in the case of attributes whose 
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">normalized
value</xpropref> has already been subject to replacement or collapse on the basis of
information in a DTD is necessary to ensure consistent treatment of attributes
regardless of the extent to which DTD-based information has been made use of
during infoset construction.</p>
   <note>
    <p>Even when DTD-based information <emph>has</emph> been appealed
to, and <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#AVNormalize">Attribute Value
Normalization</xspecref> has taken place, <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">it 
is possible that</phrase>
<emph>further</emph> normalization <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">will
take</phrase> place, as for instance when character entity references
in attribute values result in white space characters other than spaces
in their <termref def="key-iv">initial value</termref>s.</p>
   </note>
<note dg="b2532-rq127-r196">
<p>The values <local>replace</local> and 
<local>collapse</local> may appear to provide a
convenient way to <quote>unwrap</quote> text (i.e. undo the effects of
pretty-printing and word-wrapping).  In some cases, especially
highly constrained data consisting of lists of artificial tokens
such as part numbers or other identifiers, this appearance is
correct.  For natural-language data, however, the whitespace
processing prescribed for these values is not only unreliable but
will systematically remove the information needed to perform
unwrapping correctly.  For Asian scripts, for example, a correct
unwrapping process will replace line boundaries not with blanks but
with zero-width separators or nothing.  In consequence, it is
normally unwise to use these values for natural-language data, or
for any data other than lists of highly constrained tokens.</p>
</note>
   </div3>
   </div2>
   <div2 id="cAttribute_Declarations">
    <head>Attribute Declarations</head>
    <p>Attribute declarations provide for:</p>
    <ulist>
     <item><p>Local <termref def="key-vn">validation</termref> of attribute information item values using a simple type definition;</p></item>
     <item><p>Specifying default or fixed values for attribute information items.</p></item>
    </ulist>
 <note role="example">
<eg xml:space="preserve">&lt;xs:attribute name="age" type="xs:positiveInteger" use="required"/&gt;</eg>
<p>The XML representation of an attribute declaration.</p>
</note>
    <div3 id="Attribute_Declaration_details">
     <head>The Attribute Declaration Schema Component</head>
<!--*
     <issue id="RQ-129i" role="1.1">
      <p><loc href="&reqs;#eliminate-canonical" target="reqs">RQ-129 (eliminate-canonical)</loc></p>
      <p>In a few places part 1 of version 1.0 relied on the ability to
determine a (canonical) lexical form for any simple typed value, e.g. in the
construction of default attribute information items.  But not all simple types
<emph>have</emph> such a canonical form.  The dependence on canonical forms,
which part 2 will no longer normatively require, will be removed.</p>
      <resolution>
       <p><loc href="http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2004Mar/0072.html">minutes from XML Schema WG call 2004-03-19</loc> (W3C-member-only link)</p>
       <p>Modify the component structure to record / retain a lexical form.
   (There was some speculation in the WG about whether the existing 
   value property should or should not be repurposed, or a new property
   added; the WG did NOT decide this now, preferring to leave it to
   the editor as part of the plumbing and deal with it as part of
   Phase 2.)</p>
       <p>If the component comes from a schema document, then the lexical
   form in the component should be that appearing in the schema
   document.</p>
       <p>Otherwise (i.e. if the component is born binary), the lexical
   form in the component should be any appropriate one.</p>
      </resolution>
     </issue> *-->
    <p>The attribute declaration schema component has the following
      properties:</p>

     <compdef name="Attribute Declaration" abbrev="ad" showAKO="true"/>
     <microCompdef name="Scope" abbrev="sc_a" dg="ep01"/>
     <microCompdef name="Value Constraint" abbrev="vc_a" dg="ep01"/>

     <p>The <propref comp="ad" prop="name"/> property <rfc2119>must</rfc2119> match the
      local part of the names of attributes being <termref def="key-vn">validated</termref>.</p>
     <p>The value<!--*
* material suppressed here by diff group b5139-x *
*--> of <!--*
* material suppressed here by diff group b5139-1 *
*--> <phrase dg="b5139-1">each</phrase> attribute<!--*
* material suppressed here by diff group b5139-x *
*--> <phrase dg="b5139-1">validated</phrase> <rfc2119>must</rfc2119> conform to the supplied
      <propref comp="ad" prop="type definition"/>.</p>
     <p>A <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals"><termref def="key-null">non-absent</termref></phrase>
 value of the <propref comp="ad" prop="target        namespace"/> property provides for <termref def="key-vn">validation</termref> of namespace-qualified
      attribute information items (which <rfc2119>must</rfc2119> be explicitly prefixed
      in the character-level form of XML documents).  <termref def="key-null">Absent</termref> values of
      <propref comp="ad" prop="target namespace"/> <termref def="key-vn">validate</termref> unqualified (unprefixed)
      items.</p>
     <!--*
* material suppressed here by diff group ep24 *
*-->
     <p dg="ep24">
      For an attribute declaration <var>A</var>, if <var>A</var>.<propref comp="ad" prop="scope"/>.<propref comp="sc_a" prop="variety"/>
      = <pt>global</pt>, then <var>A</var> is available for use throughout the schema.
      If <var>A</var>.<propref comp="ad" prop="scope"/>.<propref comp="sc_a" prop="variety"/>
      = <pt>local</pt>, then <var>A</var> is available for use only within (the
      <compref ref="ctd"/> or <compref ref="agd"/>)
      <var>A</var>.<propref comp="ad" prop="scope"/>.<propref comp="sc_a" prop="parent"/>.
     </p>
     <p><phrase dg="b5139">The</phrase> 
      <propref comp="ad" prop="value constraint"/> <phrase dg="b5139">property</phrase> reproduces the functions of
      XML<!--*
* material suppressed here by diff group fpwd *
*--> default and
      <code>#FIXED</code> attribute values.  <phrase dg="ep01">A <propref comp="vc_a" prop="variety"/> of
      </phrase><pt>default</pt> specifies that the attribute is to
      appear unconditionally in the <termref def="key-psvi">post-schema-validation infoset</termref>, with <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01"><propref comp="vc_a" prop="value"/><phrase dg="rq129"> and <propref comp="vc_a" prop="lexical   form"/></phrase></phrase> used whenever the attribute is not
      actually present; <pt>fixed</pt> indicates that the attribute
      value if present <rfc2119>must</rfc2119> <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01">be <!--*
* material suppressed here by diff group wgi-20080530 *
*--><phrase dg="wgi-20080530">equal</phrase> to <propref comp="vc_a" prop="value"/></phrase>, and if absent receives <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01"><propref comp="vc_a" prop="value"/><phrase dg="rq129"> and <propref comp="vc_a" prop="lexical   form"/></phrase></phrase> as for <pt>default</pt>.  Note that
      it is <emph>values</emph> that are <!--*
* material suppressed here by diff group ep01 *
*-->checked, not 
      strings<phrase dg="wgi-20080530">,
       and that the test is for equality, not identity</phrase>.</p>
    <p>See <specref ref="cAnnotations"/> for information on the role of the
<propref comp="ad" prop="annotations"/> property.</p>
<note><p>A more complete and formal presentation of the semantics of <propref comp="ad" prop="name"/>, <propref comp="ad" prop="target namespace"/> and <propref comp="ad" prop="value constraint"/> is provided in
conjunction with other aspects of complex type <termref def="key-vn">validation</termref> (see <specref ref="cvc-complex-type"/>.)</p></note>
    <p><bibref ref="ref-xmlinfo"/> distinguishes attributes with names such as <code>xmlns</code> or <code>xmlns:xsl</code> from
ordinary attributes, identifying them as <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">namespace attributes</xpropref>.  Accordingly, it is unnecessary and in fact not possible for
schemas to contain attribute declarations corresponding to such
namespace declarations, see <specref ref="no-xmlns"/>.  No means is provided in
this specification to supply a
default value for a namespace declaration.</p> 
</div3>
    <div3 id="declare-attribute">
     <head><phrase dg="b5159">XML Representation of Attribute Declaration Schema Components</phrase><!--*
* material suppressed here by diff group b5159a *
*--><!--*
* material suppressed here by diff group b5159b *
*--></head>
	  <!--* <issue id="RQ-121i" role="1.1">
< ! - - * <p>
<loc href="&reqs;#prohibited-and-fixed" target="reqs">RQ-121 (prohibited-and-fixed)</loc>
</p> * - - >
<p><loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=2835" target="reqs"
>Issue 2835 (RQ-121 prohibited + fixed)</loc></p>

    <p>Neither the prose of this specification nor the
schema for schema documents rules out XML representations of
attribute declarations containing both <code>use='prohibited'</code> and 
<code>fixed='...'</code>.  It
will be made clear that this is not an error and that
&lsquo;<code>prohibited</code>&rsquo; wins.</p>
</issue> *-->
<p>The XML representation for an attribute declaration schema
component is an
<eltref ref="attribute"/> element information item.  It specifies a
simple type definition for an attribute either by reference or
explicitly, and <!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase> provide default information. The
correspondences between the properties of the information item and
properties of the component are <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152">given in this section.</phrase></p>

<!--*
* material suppressed here by diff group b5152-movement *
*-->
     
     <p>Attribute declarations can appear at the top level of a schema
      document, or within complex type definitions, either as complete
      (local) declarations, or by reference to top-level declarations,
      or within attribute group definitions.  For complete
      declarations, top-level or local, the <code>type</code>
      attribute is used when the declaration can use a built-in or
      pre-declared simple type definition.  Otherwise an anonymous
      <eltref ref="simpleType"/> is provided inline. <phrase dg="b5139">When no simple type definition is
       referenced or provided, the default is <!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase>, which
       imposes no constraints at all.</phrase></p>
     <!--*
* material suppressed here by diff group b5139 *
*-->
     <!--*
* material suppressed here by diff group b5003-en *
*-->
     
     <reprdef dg="b5152-movement">
      <reprelt id="xr.att1" dg="b5152-movement" eltname="attribute" type="attribute"/>
     </reprdef>      
     <!--* <p id="xr.att2-bis" diff="add" dg="b3836-2.b5152-move"> *-->
<!--* I *think* this needs to be b3836-2, not add.b3836-2.b5152-movement
    * or some other portmanteau tag. (MSM 2008-04-27)
    * No, that would suggest that b3836-2 added it *here*, which it didn't.
    * Especially now that it's no longer inside the reprdef added by
    * b5152-movement.
    * We need a new double-tag.  (MSM 2008-04-28)
    * Actually, we don't need this p element at all, and it makes the
    * output invalid.  So I'm suppressing it.  (MSM 2008-06-10)
    *-->
     <!--*
* material suppressed here by diff group hither.b5152.cr.del-as-hither *
*-->
     <!--*
* material suppressed here by diff group hither.b5152.cr.del-as-del *
*-->
     <!--* </p> *-->

     <p dg="b6012"><phrase dg="b6012b">An</phrase>
      <eltref ref="attribute"/> <phrase dg="b6012b">element</phrase> 
      maps to an attribute declaration<phrase dg="b6012b">,</phrase> and
      allows the type definition of that declaration to be specified either by
      reference or by explicit inclusion.
     </p>
     <p dg="b6012"><phrase dg="b6012b">Top-level</phrase>
      <eltref ref="attribute"/><phrase dg="b6012b"> element</phrase>s 
      <!--*
* material suppressed here by diff group b6012b *
*--><phrase dg="b6012b">(i.e. those which appear
       within the schema document as
       children of</phrase> <eltref ref="schema"/><phrase dg="b6012b">
       elements)</phrase> produce
      <pt>global</pt> <!--*
* material suppressed here by diff group b6012b *
*--><phrase dg="b6012b">attribute</phrase> declarations; 
      <!--*
* material suppressed here by diff group b6012b *
*--><phrase dg="b6012b"><eltref ref="attribute"/>s</phrase> 
      within
      <eltref ref="attributeGroup"/> or <eltref ref="complexType"/> produce
      either attribute uses which contain <pt>global</pt> attribute
      declarations (if there's a <code>ref</code> attribute) or local
      declarations (otherwise). For complete declarations, top-level or local,
      the <code>type</code> attribute is used when the declaration can use a
      built-in or user-defined global type definition. Otherwise an anonymous
      <eltref ref="simpleType"/> is provided inline.
     </p>

     <p>Attribute information items <termref def="key-vn">validated</termref> by a top-level
      declaration <rfc2119>must</rfc2119> be qualified with the
      <propref comp="ad" prop="target namespace"/> of that
      declaration<!--*
* material suppressed here by diff group iff *
*--><phrase dg="iff">. If the
       <propref comp="ad" prop="target namespace"/> is <termref def="key-null">absent</termref>, the item <rfc2119>must</rfc2119> be
       unqualified.</phrase> Control over whether attribute
      information items <termref def="key-vn">validated</termref> by a local declaration <rfc2119>must</rfc2119> be
      similarly qualified or not is provided by the <code>form</code>
      <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, whose default is provided by the
      <code>attributeFormDefault</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> on the enclosing
      <eltref ref="schema"/>, via its determination of 
      <propref comp="ad" prop="target namespace"/>.</p>
     <!--*
* material suppressed here by diff group b5156-choices *
*-->
     <!--*
* material suppressed here by diff group b5156c2 *
*-->
     <p>The names for top-level attribute declarations are in their
      own <termref def="key-symbolSpace">symbol space</termref>.  The
      names of locally-scoped attribute declarations reside in symbol
      spaces local to the type definition which contains them.</p>

     <p dg="b5152">The following sections specify several
      sets of XML mapping rules which apply in different
      circumstances.
      <ulist>
       <item>
	<p>If the <eltref ref="attribute"/> element information item
	 has <eltref ref="schema"/> as its parent, then it maps to 
	 <!--*
* material suppressed here by diff group b6012b *
*--><phrase dg="b6012b">a
	  global</phrase>
	 <compref ref="ad"/> as described in
	 <specref ref="dcl.att.global"/>.
	</p>
       </item>
       <item>
	<p>If the <eltref ref="attribute"/> element
	 information item has <eltref ref="complexType"/> 
	 or <eltref ref="attributeGroup" inside="simpleContent"/>
	 as an ancestor, and the <code>ref</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is
	 absent, and the <code>use</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is not
	 <code>"prohibited"</code>, then it maps both to
	 an <compref ref="ad"/> and to an <compref ref="au"/>
	 component, as described in 
	 <specref ref="dcl.att.local"/>.
	</p>
	<p>On <compref ref="au"/> components, see
	 <specref ref="cAttributeUse"/>.
	</p>
       </item>
       <item>
	<p>If the <eltref ref="attribute"/> element
	 information item has <eltref ref="complexType"/> 
	 or <eltref ref="attributeGroup" inside="simpleContent"/>
	 as an ancestor, and the <code>ref</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is
	 <termref def="key-nonnull"/>, and the <code>use</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is not
	 <code>"prohibited"</code>, then it maps to
	 an <compref ref="au"/>
	 component, as described in 
	 <specref ref="ref.att.local"/>.
	</p>
       </item>
       <item>
	<p>If the <eltref ref="attribute"/> element information item
	 has <code>use='prohibited'</code>, then it does not map to,
	 or correspond to, any schema component at all.
	</p>
	<note>
	 <p>The <code>use</code> attribute is not allowed on
	  top-level <eltref ref="attribute"/> elements, so
	  this can only happen with <eltref ref="attribute"/> elements
	  appearing within a <eltref ref="complexType"/>
	  or <eltref ref="attributeGroup" inside="simpleContent"/> element.
	 </p>
	</note>
       </item>
      </ulist>
     </p>

     <div4 id="dcl.att.global" dg="b5152-movement">
      <head dg="b5152">Mapping Rules for Global Attribute Declarations</head>

     <p id="xr.att3" dg="b5152-movement">If the <eltref ref="attribute"/> element information item has <eltref ref="schema"/> as its parent, the corresponding schema
      component is as follows:</p>
     
     <reprdef dg="b5152-movement">
      <reprcomp id="xr.att4" dg="b5152-movement" ref="Attribute_Declaration_details" abstract="Attribute Declaration">
       <propmap comp="ad" prop="name">The <termref def="key-vv">actual value</termref> of the
	<code>name</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref></propmap>
       <propmap comp="ad" prop="target namespace">The <termref def="key-vv">actual value</termref> of the
	<code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of the parent
	<eltref ref="schema"/> element information item, or <termref def="key-null">absent</termref> if there is none.</propmap>
       <propmap comp="ad" prop="type definition">The simple type
	definition corresponding to the <eltref ref="simpleType"/>
	element information
	item in the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if present, otherwise the simple
	type definition <termref def="src-resolve">resolved</termref> to by the <termref def="key-vv">actual value</termref> of the
	<code>type</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise
	<!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase>.</propmap>
       <propmap comp="ad" prop="scope"><phrase dg="ep01">A
	 <compref ref="sc_a"/> as follows:</phrase>
	<pvlist>
	 <pvpair comp="sc_a" prop="variety"><pt>global</pt></pvpair>
	 <pvpair comp="sc_a" prop="parent" dg="ep01"><termref def="key-null">absent</termref></pvpair>
	</pvlist>
       </propmap>
       <propmap comp="ad" prop="value constraint">If there is a
	<code>default</code> or a <code>fixed</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>,
	then <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01">a <compref ref="vc_a"/> as follows</phrase>, otherwise <termref def="key-null">absent</termref>.
	<pvlist>
	 <pvpair comp="vc_a" prop="variety">either <pt>default</pt> or
	  <pt>fixed</pt>, as appropriate</pvpair>
	 <pvpair comp="vc_a" prop="value">the <termref def="key-vv">actual value</termref> (with respect
	  to the
	  <propref comp="ad" prop="type definition"/>) of <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01">the</phrase> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref></pvpair>
	 <pvpair comp="vc_a" prop="lexical form" dg="rq129">the <termref def="key-nv">normalized value</termref> (with respect to the
	  <propref comp="ad" prop="type definition"/>) of the
	  <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref></pvpair>
	</pvlist></propmap>
       <propmap comp="ad" prop="inheritable" dg="b5003">The <termref def="key-vv">actual value</termref>
        of the <code>inheritable</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise
        <pt>false</pt>.</propmap>
       <propmap comp="ad" prop="annotations"><!--*
* material suppressed here by diff group bannotations-1 *
*--> <phrase dg="bannotations-2"> The <termref def="key-am-one"/> of the
	 <eltref ref="attribute"/> element, as defined in <specref ref="declare-annotation"/>. </phrase>

       </propmap>
       
      </reprcomp>
     </reprdef>
     
     </div4>

     <div4 id="dcl.att.local" dg="b5152-movement">
      <head dg="b5152">Mapping Rules for Local Attribute Declarations</head>

      <p id="xr.att5" dg="b5152-movement"><!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152">If</phrase> 
       the <eltref ref="attribute"/> element information item has
      <eltref ref="complexType"/> or <eltref ref="attributeGroup" inside="simpleContent"/> as
       an ancestor and the <code>ref</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is absent,
       it <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152">maps</phrase> <phrase dg="b5152">both to an attribute 
	declaration (see <phrase diff="del" dg="b6008a">below</phrase><loc xmlns:xlink="http://www.w3.org/1999/xlink" diff="add" href="#xr.att.local" dg="b6008a">below</loc>) and</phrase>
       to an attribute use with properties as follows
       (unless <code>use='prohibited'</code>, in which case the item
       corresponds to nothing at all):</p>
     
     <reprdef dg="b5152-movement">
      <reprcomp id="xr.att6" dg="b5152-movement" ref="AU_details" abstract="Attribute Use">
       <propmap comp="au" prop="required"><pt>true</pt> if 
	<!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">the 
	 <eltref ref="attribute"/> element has <code>use</code> =
	 <code>required</code></phrase>, otherwise
	<pt>false</pt>.</propmap>
       <propmap comp="au" prop="attribute declaration">See the Attribute Declaration mapping
	immediately below.</propmap>
       <propmap comp="au" prop="value constraint">If there is a
	<code>default</code> or a <code>fixed</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>,
	then a <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01"><compref ref="vc_au"/>
	 as follows</phrase>, otherwise <termref def="key-null">absent</termref>.
	<pvlist>
	 <pvpair comp="vc_au" prop="variety">either <pt>default</pt>
	  or <pt>fixed</pt>, as appropriate</pvpair>
	 <pvpair comp="vc_au" prop="value">the <termref def="key-vv">actual value</termref> <!--*
* material suppressed here by diff group ep24 *
*--> of
	  <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01">the</phrase> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> <phrase dg="ep24">(with respect to <propref comp="au" prop="attribute declaration"/>.<propref comp="ad" prop="type definition"/>)</phrase>
	 </pvpair>
	 <pvpair comp="vc_au" prop="lexical form" dg="rq129">the <termref def="key-nv">normalized value</termref> <!--*
* material suppressed here by diff group ep24 *
*--> of the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> <phrase dg="ep24">(with respect to <propref comp="au" prop="attribute declaration"/>.<propref comp="ad" prop="type definition"/>)</phrase></pvpair>
	</pvlist>
       </propmap>
       <propmap comp="au" prop="inheritable" dg="b5003">The <termref def="key-vv">actual value</termref>
        of the <code>inheritable</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise
        <pt>false</pt>.</propmap>
       <propmap comp="au" prop="annotations" dg="bannotations-1">
	The same annotations as the <propref comp="ad" prop="annotations"/> of
	the Attribute Declaration. See below.
       </propmap>
      </reprcomp>
     </reprdef>

      <p dg="b5152"><phrase id="xr.att.local"/>
       The <eltref ref="attribute"/> element also
       maps to the <propref comp="au" prop="attribute declaration"/>
       of the <!--*
* material suppressed here by diff group b6008axx *
*--> attribute use<phrase diff="del" dg="b6008a"> just described</phrase>, as follows:
     </p>

     <reprdef dg="b5152-movement">
      <reprcomp id="xr.att7" dg="b5152-movement" ref="Attribute_Declaration_details" abstract="Attribute Declaration">
       <propmap comp="ad" prop="name">The <termref def="key-vv">actual value</termref> of the
	<code>name</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref></propmap>
       <!--*
* material suppressed here by diff group b3836-1 *
*-->

       <propmap comp="ad" prop="target namespace" dg="b3836-1">
	<olist role="Caseval">
	 <item><p role="if">
	   <code>targetNamespace</code> is present
	  </p><p role="then">
	   its <termref def="key-vv">actual value</termref>.
	  </p></item>
	 <item><p role="if">
	   <code>targetNamespace</code> is not present and
	   <olist role="ortest">
	    <item><p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"> <code>form</code>
	       = <code>qualified</code> </phrase>
	     </p></item>
	    <item><p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"> <code>form</code> is absent and the <eltref ref="schema"/> ancestor has
	       <code>attributeFormDefault</code> =
	       <code>qualified</code></phrase>
	     </p></item>
	   </olist>
	  </p><p role="then" id="no-comma-1">
	   the <termref def="key-vv">actual value</termref> of the <code>targetNamespace</code>
	   <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of the <!--*
* material suppressed here by diff group cleanup-1 *
*--><phrase dg="cleanup-1">ancestor</phrase> <eltref ref="schema"/>
	   element information
	   item, or <termref def="key-null">absent</termref> if there
	   is none.
	  </p></item>
	 <item><p role="otherwise">
	   <termref def="key-null">absent</termref>.
	  </p></item>
	</olist> <!--* A note about 3836 being at risk MIGHT go here.
	But I * took it out, preferring the one at the XML summary.
	*-->
       </propmap>

       <propmap comp="ad" prop="type definition">The simple type
	definition corresponding to the <eltref ref="simpleType"/>
	element information
	item in the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if present, otherwise the simple
	type definition <termref def="src-resolve">resolved</termref> to by the <termref def="key-vv">actual value</termref> of the
	<code>type</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise
	<!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase>.</propmap>
       <propmap comp="ad" prop="scope"><phrase dg="ep01">A
	 <compref ref="sc_a"/> as follows:</phrase>
	<pvlist>
	 <pvpair comp="sc_a" prop="variety" dg="ep01"><pt>local</pt></pvpair>
	 <pvpair comp="sc_a" prop="parent">If the <eltref ref="attribute"/> element information item has <eltref ref="complexType"/> as an ancestor, the <compref ref="ctd"/> corresponding to that item, otherwise (the
	  <eltref ref="attribute"/>
	  element information item is within an <eltref ref="attributeGroup" inside="simpleContent"/> <!--*
* material suppressed here by diff group scope-1973 *
*--><phrase dg="scope-1973">element information
	   item</phrase>), <!--*
* material suppressed here by diff group scope-1973 *
*--><phrase dg="scope-1973">the <compref ref="agd"/> corresponding to
	   that item</phrase>.</pvpair>
	</pvlist>
       </propmap>
       <propmap comp="ad" prop="value constraint"><termref def="key-null">absent</termref>.</propmap>
       <propmap comp="ad" prop="inheritable" dg="b5003">The <termref def="key-vv">actual value</termref>
        of the <code>inheritable</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise
        <pt>false</pt>.</propmap>
       <propmap comp="ad" prop="annotations"><!--*
* material suppressed here by diff group bannotations-1 *
*--> <phrase dg="bannotations-2"> The <termref def="key-am-one"/> of the
	 <eltref ref="attribute"/> element, as defined in <specref ref="declare-annotation"/>. </phrase>
       </propmap>
      </reprcomp>
     </reprdef>
     
     </div4>
     <div4 id="ref.att.local" dg="b5152-movement">
      <head dg="b5152">Mapping Rules for References to Top-level Attribute Declarations</head>

      <p id="xr.att8" dg="b5152-movement">
       <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152">If 
       </phrase>the
      <eltref ref="attribute"/> element information item has
      <eltref ref="complexType"/> or <eltref ref="attributeGroup" inside="simpleContent"/> as an
      ancestor and the <code>ref</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is 
       present<!--*
* material suppressed here by diff group b5152 *
*-->, it
      <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152">maps</phrase> to an attribute use with properties as follows
      (unless <code>use='prohibited'</code>, in which case the item
      corresponds to nothing at all):</p>
     
     <reprdef dg="b5152-movement">
      <reprcomp id="xr.att9" dg="b5152-movement" ref="AU_details" abstract="Attribute Use">
       <propmap comp="au" prop="required"><pt>true</pt> if <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><code>use</code> =
	 <code>required</code></phrase>, otherwise
	<pt>false</pt>.</propmap>
       <propmap comp="au" prop="attribute declaration">The (top-level)
	attribute declaration <termref def="src-resolve">resolved</termref> to by the <termref def="key-vv">actual value</termref> of
	the <code>ref</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref></propmap>
       <propmap comp="au" prop="value constraint">If there is a
	<code>default</code> or a <code>fixed</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>,
	then a <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01"><compref ref="vc_au"/>
	 as follows</phrase>, otherwise <termref def="key-null">absent</termref>.
	<pvlist>
	 <pvpair comp="vc_au" prop="variety">either <pt>default</pt>
	  or <pt>fixed</pt>, as appropriate</pvpair>
	 <pvpair comp="vc_au" prop="value">the <termref def="key-vv">actual value</termref> <!--*
* material suppressed here by diff group ep24 *
*--> of
	  <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01">the</phrase> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> <phrase dg="ep24">(with respect to <propref comp="au" prop="attribute declaration"/>.<propref comp="ad" prop="type definition"/>)</phrase></pvpair>
	 <pvpair comp="vc_au" prop="lexical form" dg="rq129">the <termref def="key-nv">normalized value</termref> <!--*
* material suppressed here by diff group ep24 *
*--> of the
	  <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> <phrase dg="ep24">(with respect to
	   <propref comp="au" prop="attribute declaration"/>.<propref comp="ad" prop="type definition"/>)</phrase></pvpair>
	</pvlist>
       </propmap>
       <propmap comp="au" prop="inheritable" dg="b5003">The <termref def="key-vv">actual value</termref>
        of the <code>inheritable</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise
        <propref comp="au" prop="attribute declaration"/>.<propref comp="ad" prop="inheritable"/>.</propmap>
       <propmap comp="au" prop="annotations" dg="bannotations">
	<!--*
* material suppressed here by diff group bannotations-1 *
*--> <phrase dg="bannotations-2"> The <termref def="key-am-one"/> of
	 the <eltref ref="attribute"/> element, as defined in <specref ref="declare-annotation"/>. </phrase>
       </propmap>
      </reprcomp>
     </reprdef>
     </div4>
    </div3>

    <div3 id="sec-src-attdecl">
     <head>Constraints on <phrase dg="b5159">XML Representations of Attribute Declarations</phrase><!--*
* material suppressed here by diff group b5159a *
*--><!--*
* material suppressed here by diff group b5159b *
*--></head>

     <constraintnote id="src-attribute" type="src">
      <head>Attribute Declaration Representation OK</head>
      <p>In addition to the conditions imposed on <eltref ref="attribute"/> element
       information items by the schema for schema<!--*
* material suppressed here by diff group b2067-2e *
*--><phrase dg="b2067-2e"> documents</phrase>,
       <olist role="and.apply">
	<item>
	 <p><code>default</code> and <code>fixed</code> <rfc2119>must not</rfc2119> both be present.</p>
	</item>
	<item>
	 <p>If <code>default</code> and <code>use</code> are both present,
	  <code>use</code> <rfc2119>must</rfc2119> have the <termref def="key-vv">actual value</termref> <code>optional</code>.</p>
	</item>
	<item>
	 <p>If the item's parent is not <eltref ref="schema"/>, then
	  <olist role="and">
	   <item>
	    <p>One of <code>ref</code> or <code>name</code> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> present, but not both.</p>
	   </item>
	   <item>
	    <p>If <code>ref</code> is present, then all of <eltref ref="simpleType"/>,
	     <code>form</code> and <code>type</code> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">are</phrase> absent.</p>
	   </item>
	  </olist>
	 </p>
	</item>
	<item>
	 <p><phrase dg="b5139">The</phrase>
	  <code>type</code> <phrase dg="b5139">attribute</phrase> and <phrase dg="b5139">a</phrase>
	  <eltref ref="simpleType"/> <phrase dg="b5139">child element</phrase>
	  <rfc2119>must not</rfc2119> both be present.</p>
	</item>
	<item dg="cleanup-3"><p>
	  If <code>fixed</code> and <code>use</code> are both present,
	  <code>use</code> <rfc2119>must not</rfc2119> have the <termref def="key-vv">actual value</termref> <code>prohibited</code>.
	 </p></item>
	<item dg="b3836-1" id="att-with-ns"><p>
	  If <phrase dg="b5139">the</phrase>
	  <code>targetNamespace</code> <phrase dg="b5139">attribute</phrase>
	  is present then 
	  <olist role="and">
	   <item><p><phrase dg="b5139">The</phrase>
	     <code>name</code> <phrase dg="b5139">attribute</phrase>
	     is present.
	    </p></item>
	   <item><p><phrase dg="b5139">The</phrase>
	     <code>form</code> <phrase dg="b5139">attribute</phrase>
	     is <!--*
* material suppressed here by diff group b5139 *
*--><phrase dg="b5139">absent</phrase>.
	    </p></item>
	   <item><p>
	     If the ancestor <eltref ref="schema"/> does not have a
	     <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> or its <termref def="key-vv">actual value</termref>
	     is different from the <termref def="key-vv">actual value</termref> of <code>targetNamespace</code> of
	     <eltref ref="attribute"/>, then
	     <olist role="andtest">
	      <item><p>
		<eltref ref="attribute"/> has <eltref ref="complexType"/> as an ancestor
	       </p></item>
	      <item id="att-with-ns-must-be-old"><!--*
* material suppressed here by diff group b5276 *
*--><p dg="b5276-c">
		There is a <eltref ref="restriction" inside="complexContent"/> ancestor
		between the <eltref ref="attribute"/> and the nearest
		<eltref ref="complexType"/> ancestor, and the <termref def="key-vv">actual value</termref> of the
		<att>base</att> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of
		<eltref ref="restriction" inside="complexContent"/> does not 
		<termref def="key-en-match"/> the
		name of <termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref>.
	       </p>
	      </item>
	     </olist>
	    </p></item>
	  </olist>
	 </p></item>
	<!--* A note about 3836 being at risk MIGHT go here.  But I
            * took it out, preferring the one at the XML summary.
            *-->
	<!--*
* material suppressed here by diff group b5286 *
*-->
       </olist>
      </p>
     </constraintnote>
    </div3>
    <div3 id="sec-cvc-attdecl">
     <head>Attribute Declaration Validation Rules</head>

     <!--*
* material suppressed here by diff group b3725.add.vm13.del *
*-->

     <div4 id="sec-cvc-attribute" dg="b5165a">
      <head dg="b5165a">Attribute Locally Valid</head>

      <p dg="b5165c">Informally, an attribute in an XML
       instance is locally <termref def="key-vn">valid</termref>
       against an attribute declaration if and only if (a)
       <phrase dg="b5281">the name of the attribute matches
       the name of the declaration, (b)</phrase> after
       whitespace normalization its <termref def="key-nv">normalized value</termref> is locally valid
       against the type declared for the attribute, and
       (<!--*
* material suppressed here by diff group b5281 *
*--><phrase dg="b5281">c</phrase>) the 
       attribute obeys any relevant value constraint. Additionally, 
       for <code>xsi:type</code>, it is required that the type named
       by the attribute be present in the schema.
       A logical prerequisite for checking the local validity of an
       attribute against an attribute declaration is that the attribute
       declaration itself and the type definition it identifies
       both be present in the schema. 
      </p>
      <!--*
* material suppressed here by diff group b5281-silent *
*-->
      <p dg="b5165c">Local validity of attributes is 
       tested as part of schema-validity <termref def="key-va"/> of attributes
       (and of the elements on which they occur), and the result
       of the test is exposed in the 
       <propref ref="a-validity" role="psvi"/> property of the
       <termref def="key-psvi">post-schema-validation infoset</termref>.</p>
      <p dg="b5165c">A more formal statement 
       is given in the following constraint.</p>

      <constraintnote type="cvc" id="cvc-attribute">
       <head>Attribute Locally Valid</head>
       <p>For an attribute information item <phrase dg="ep20"><var>A</var></phrase>
	to be locally <termref def="key-vn">valid</termref> 
        with respect to an attribute declaration <phrase dg="ep20"><var>D</var></phrase>
        <olist role="and">
         <item id="c-a1">
          <p><!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>D</var></phrase> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is not</phrase> <termref def="key-null">absent</termref> 
           (see <specref ref="conformance-missing"/> for
           how this can fail to be the case)<phrase dg="b5281"><!--*
* material suppressed here by diff group ep20b *
*--><phrase dg="ep20b">
           and <var>D</var> and <var>A</var> have the same <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref></phrase></phrase>.</p>
         </item>
         <item id="c-a2">
          <p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>D</var>.<propref comp="ad" prop="type definition"/></phrase> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is not</phrase> 
	   <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><termref def="key-null">absent</termref></phrase>.</p>
         </item>
         <item id="c-sva">
          <p><!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>A</var></phrase>'s <!--*
* material suppressed here by diff group b3251i *
*--><phrase dg="b3251i"><termref def="key-iv">initial value</termref></phrase> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> locally <termref def="key-vn">valid</termref> 
           with respect to <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>D</var>.</phrase><propref comp="ad" prop="type definition"/> 
           as per <specref ref="cvc-simple-type"/>.</p>
         </item>
         <item>
          <p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">If</phrase> 
	   <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>D</var>.<propref comp="ad" prop="value constraint"/></phrase> is present and <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">
	    <var>D</var>.<propref comp="ad" prop="value constraint"/>.<propref comp="vc_a" prop="variety"/> = <pt>fixed</pt>, then <var>A</var>'s <termref def="key-vv">actual value</termref> 
	    is <!--*
* material suppressed here by diff group wgi-20080530 *
*--><phrase dg="wgi-20080530">equal to</phrase>
	    <var>D</var>.<propref comp="ad" prop="value constraint"/>.<propref comp="vc_a" prop="value"/></phrase>.</p>
         </item>
         <item dg="b4299d"><p>
           If <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>D</var></phrase> is the built-in declaration for <code>xsi:type</code>
           (<specref ref="xsi.type"/>), then <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>A</var></phrase>'s <termref def="key-vv">actual value</termref>
           <termref def="src-resolve">resolves</termref> to a type definition.
          </p></item>
        </olist>
       </p>
      </constraintnote>
     </div4>
     <div4 id="sec-gov-attribute" dg="b5165a">
      <head dg="b5165a">Governing Attribute Declaration and Governing Type Definition</head>

      <!--*
* material suppressed here by diff group b3714-movement.add.vm13.del *
*-->

      <!--*
* material suppressed here by diff group b3714.add.b3725.del *
*-->

      <!--*
* material suppressed here by diff group b3714.add.b3725.del *
*-->

      <p dg="b3725">
       <termdef id="key-governing-ad" term="governing attribute declaration">
        In a given schema-validity <termref def="key-va"/> episode, 
        the <termref def="key-governing"/> declaration of an attribute 
        (its <term>governing attribute declaration</term>)
        is the first of
        the following which applies:
        <olist>
         <item id="c-ad" dg="rq144si">
          <p>A declaration which was stipulated by the processor (see
           <specref ref="validation_outcome"/>).</p>
         </item>
         <item>
          <p>Its <termref def="key-dd">context-determined declaration</termref>;</p>
         </item>
         <item id="c-adbyr">
          <p>A declaration <!--*
* material suppressed here by diff group ep-rr *
*--><phrase dg="ep-rr"><termref def="cvc-resolve-instance">resolved</termref></phrase> to by its <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">local
            name</xpropref> and <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">namespace
            name</xpropref><!--*
* material suppressed here by diff group cta-ed *
*-->,
           provided the attribute
           is not <termref def="key-att-to">attributed</termref> to a <pt>skip</pt> <termref def="key-wp"/>
           and the processor has not
           stipulated a type definition at the start of <termref def="key-va"/>.
          </p>
         </item>
        </olist>
        If the attribute is <termref def="key-att-to">attributed</termref> to a <pt>skip</pt> <termref def="key-wp"/>
        or if the processor has
        stipulated a type definition,
        then it has no <termref def="key-governing"/> declaration.
       </termdef>
      </p>

      <!--*
* material suppressed here by diff group b3714.add.b3725.del *
*-->

      <p dg="b3725">
       <termdef id="key-governing-type-att" term="governing type definition">
        The <term>governing type definition</term> of an
        attribute, in a given schema-validity <termref def="key-va"/> episode, is the
        <propref comp="ad" prop="type definition"/> of the <termref def="key-governing-ad"/>, 
        unless the processor has stipulated another
        type definition at the start of <termref def="key-va"/> (see <specref ref="validation_outcome"/>), in which case it is the
        stipulated type definition.</termdef></p>

     </div4>

     <div4 id="sec-cvs-assess-attr" dg="b5165a">
      <head dg="b5165a">Schema-Validity Assessment (Attribute)</head>

      <p dg="b5165c">
       Schema-validity assessment of an attribute information item
       involves identifying its <termref def="key-governing-ad"/> and checking its
       local validity against the declaration.  If the <termref def="key-governing-type-att"/>
       is not present in the schema, then assessment is necessarily
       incomplete.
      </p>
      <constraintnote id="cvc-assess-attr" type="cvc">
       <head>Schema-Validity Assessment (Attribute)</head>
       <p>The schema-validity assessment of an attribute information item depends
        on its <phrase diff="add" dg="b5164">local</phrase> <termref def="key-vn">validation</termref> alone.</p>
       <!--*
* material suppressed here by diff group b3714-movement *
*-->
       <p>For an attribute information item's schema-validity to have been assessed
        <olist role="and">
         <item id="c-caa-ad">
          <p>A <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals"><termref def="key-null">non-absent</termref></phrase>
 attribute declaration
           <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> known for it, namely <phrase dg="b3714">its <termref def="key-governing"/>
            declaration.</phrase>
           <!--*
* material suppressed here by diff group b3714 *
*-->
          </p>
         </item>
         <item>
          <p>Its <phrase diff="add" dg="b5164">local</phrase> <termref def="key-vn">validity</termref> with respect to that
           declaration 
           <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">has</phrase> 
           been evaluated as per <specref ref="cvc-attribute"/>.</p>
         </item>
         <item dg="b5078b">
          <p>Both <clauseref ref="c-a1"/> and <clauseref ref="c-a2"/> of <specref role="xref" ref="cvc-attribute"/> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">are</phrase> satisfied.</p>
         </item>
         <!--*
* material suppressed here by diff group b5078b *
*-->
        </olist>
       </p>
      </constraintnote>

      <!--* 2008-01-30 MSM silently moves this remark out of the
      constraint definition and into running prose where I think it
      belongs. *-->
      <p><termdef id="key-svaa" term="strictly assessed" role="local">For
	attribute<phrase dg="b5139"> information item</phrase>s, 
	there is no difference between assessment and strict
	assessment, so <!--*
* material suppressed here by diff group iff *
*--> 
	the attribute information item has
	been <term>strictly assessed</term></termdef><phrase dg="iff">
	if and only if its schema-validity has been assessed</phrase>.</p> 
     </div4>

    </div3>
    <div3 id="psvi_ad">
     <head>Attribute Declaration Information Set Contributions</head>

     <div4 id="sec-sic-a-outcome" dg="b5165b">
      <head dg="b5165b">Assessment Outcome (Attribute)</head>     
     <constraintnote id="sic-a-outcome" type="sic">
      <head>Assessment Outcome (Attribute)</head>
      <!--* <issue id="RQ-143i" role="1.1">
      < ! - - *
      <p><loc href="&reqs;#AssessmentOfAtts" target="reqs">RQ-143 (AssessmentOfAtts)</loc></p>
      * - - >
      <p><loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=2827" target="reqs"
      >Issue 2827 (RQ-143 attribute assessment)</loc></p>
      <p>An attribute with no type declaration cannot be 'assessed', as defined
      by (Schema-Validity Assessment (Attribute)), so it will never have any PSVI
      properties, whereas it would be natural for it to have [validation attempted] =
      none and [validity] = notKnown.  This will be fixed.</p>
      <resolution>
      <p>It is likely that the current backward-chaining approach to defining
      schema-validity assessment will be reworked, in which case this will get fixed as
      part of that.</p>
     </resolution>
     </issue> *-->
      <p>If<!--*
* material suppressed here by diff group iff.144.r *
*--> the schema-validity of an attribute information item has been assessed
       as per <specref ref="cvc-assess-attr"/>, then in the <termref def="key-psvi">post-schema-validation infoset</termref> it 
       <phrase dg="opt.144">has</phrase><!--*
* material suppressed here by diff group opt.144 *
*--> properties as follows:</p>
      <proplist role="psvi" item="attribute">
       <propdef name="validation context" id="a-validation_context">The nearest ancestor element
        information item with a <propref role="psvi" ref="e-schema_information"/>
        property.</propdef>
       <propdef name="validity" id="a-validity">
        <olist role="Caseval">
         <item>
          <p role="if">it was <termref def="key-svaa">strictly assessed</termref></p>
          <p role="then">
           <olist role="caseval">
            <item>
             <p role="if">it was <phrase diff="add" dg="b5164">locally</phrase> <termref def="key-vn">valid</termref>
              as defined by <specref ref="cvc-attribute"/></p>
             <p role="then"><pt>valid</pt>;</p>
            </item>
            <item>
             <p role="otherwise"><pt>invalid</pt>.</p>
            </item>
           </olist> 
          </p>
         </item>
         <item>
          <p role="otherwise"><pt>notKnown</pt>.</p>
         </item>
        </olist>
       </propdef>
       <propdef name="validation attempted" id="a-validation_attempted">
        <olist role="Caseval">
         <item>
          <p role="if">it was <termref def="key-svaa">strictly assessed</termref></p>
          <p role="then"><pt>full</pt>;</p>
         </item>
         <item>
          <p role="otherwise"><pt>none</pt>.</p>
         </item>
        </olist></propdef>
       <propdef name="schema specified" id="a-schema_specified"><pt>infoset</pt>.  See <specref ref="sic-attrDefault"/> for the other possible value.</propdef>
      </proplist>
     </constraintnote>
     </div4>

     <div4 id="sec-sic-attr-error-code" dg="b5165b">
      <head dg="b5165b">Validation Failure (Attribute)</head>
    <constraintnote type="sic" id="sic-attr-error-code">
     <head>Validation Failure (Attribute)</head>
     <p>If<phrase dg="iff.144"> and only if</phrase> the local <termref def="key-vn">validity</termref>, as defined 
by <specref ref="cvc-attribute"/>
above, of an attribute information item has been assessed,
<phrase dg="iff.144">then</phrase> in the <termref def="key-psvi">post-schema-validation infoset</termref> the item 
<phrase dg="opt.144">has</phrase><!--*
* material suppressed here by diff group opt.144 *
*--> a property:</p>
     <proplist role="psvi" item="attribute">
      <propdef id="a-schema_error_code" name="schema error code">
       <olist role="Caseval">
        <item>
         <p role="if">the item is <!--*
* material suppressed here by diff group b1892 *
*--><phrase dg="b1892"><termref def="key-vn">invalid</termref></phrase></p>
         <p role="then">a list.  Applications wishing to provide
information as to the reason(s) for the <termref def="key-vn">validation</termref> failure are encouraged to record one or more
error codes (see <specref ref="outcomes"/>) herein.</p>
        </item>
        <item>
         <p role="otherwise"><termref def="key-null">absent</termref>.</p>
        </item>
       </olist>
      </propdef>
     </proplist>
    </constraintnote>
     </div4>
     <div4 id="sec-sic-attr-decl" dg="b5165b">
      <head dg="b5165b">Attribute Declaration</head>
      <constraintnote type="sic" id="sic-attr-decl">
     <head>Attribute Declaration</head>
     <p>If<!--*
* material suppressed here by diff group iff.144.r *
*--> <phrase dg="b3054">and only if a <termref def="key-governing"/>
declaration is known for</phrase> an attribute information 
item<!--*
* material suppressed here by diff group b3054 *
*--> 
then in the <termref def="key-psvi">post-schema-validation infoset</termref> the attribute information item
<!--*
* material suppressed here by diff group rq144nv *
*--><phrase dg="rq144nv">has</phrase> a
property:</p>
     <proplist role="psvi" item="attribute">
      <propdef id="a-declaration" name="attribute declaration">
       An <termref def="key-iso">item isomorphic</termref> to the 
<phrase dg="b3714"><termref def="key-governing"/></phrase> declaration component itself.
      </propdef>
      <propdef id="a-schema_default" name="schema default" dg="vm3-e">
       If the attribute information item is <termref def="key-att-to">attributed</termref> to an
       <compref ref="au"/> then the <propref comp="vc_a" prop="lexical form"/>
       of the <termref def="key-evc">effective value constraint</termref>,
       otherwise the <propref comp="vc_a" prop="lexical form"/> of the
       declaration's <propref comp="ad" prop="value constraint"/>.
      </propdef>
     </proplist>
    </constraintnote>
     </div4>

<div4 id="sec-sic-attrType" dg="b5165b">
<head dg="b5165b">Attribute Validated by Type</head>
    <constraintnote type="sic" id="sic-attrType">
     <head>Attribute Validated by Type</head>
     <p>If<!--*
* material suppressed here by diff group iff.144.r *
*--> <!--*
* material suppressed here by diff group b3714 *
*--><phrase dg="b3054">and
only if a
<termref def="key-governing-type-att"/> <!--*
* material suppressed here by diff group ep25 *
*--> is known for</phrase>
an attribute information
item<!--*
* material suppressed here by diff group b3054 *
*--><!--*
* material suppressed here by diff group ep25 *
*-->, 
<phrase dg="iff">then</phrase> in the <termref def="key-psvi">post-schema-validation infoset</termref> <phrase dg="ep25">the
attribute information item</phrase><!--*
* material suppressed here by diff group ep25 *
*-->
<phrase dg="opt.144">has</phrase><!--*
* material suppressed here by diff group opt.144 *
*--> <!--*
* material suppressed here by diff group rq144nv *
*--><phrase dg="rq144nv">the
properties</phrase>:</p>
     <proplist role="psvi" item="attribute">
      
<propdef id="a-schema_normalized_value" name="schema normalized value">
<!--*
* material suppressed here by diff group b2632 *
*-->
<phrase dg="b2632">If <phrase dg="ep25">the 
attribute</phrase><!--*
* material suppressed here by diff group ep25 *
*-->'s <termref def="key-nv">normalized value</termref> is
<termref def="key-vn">valid</termref> with respect to <phrase dg="ep25">the <termref def="key-governing-type-att"/></phrase><!--*
* material suppressed here by diff group ep25 *
*-->,
then the</phrase> <termref def="key-nv">normalized value</termref> as <termref def="key-vn">validated</termref><phrase dg="b2632">, otherwise
<termref def="key-null">absent</termref></phrase>.
</propdef>

<propdef id="a-schema_actual_value" name="schema actual value" dg="b2505">
<!--*
* material suppressed here by diff group b2632 *
*-->
<phrase dg="b2632">If the
<propref ref="a-schema_normalized_value" role="psvi"/> is not
<termref def="key-null">absent</termref>, then the corresponding
<termref def="key-vv">actual value</termref>; otherwise <termref def="key-null">absent</termref></phrase>.
</propdef>

<propdef id="a-type_definition" name="type definition" dg="rq144nv">An <termref def="key-iso">item isomorphic</termref> to
<phrase dg="ep25">the <!--*
* material suppressed here by diff group b3714 *
*--> <phrase dg="b3714"><termref def="key-governing-type-att"/></phrase>
component</phrase><!--*
* material suppressed here by diff group ep25 *
*-->.</propdef>

<propdef id="a-type_definition_type" name="type definition type" dg="rq144nv"> <pt>simple</pt>.</propdef>

<propdef id="a-type_definition_namespace" name="type definition namespace" dg="rq144nv"><phrase dg="ep25">The <propref comp="std" prop="target namespace"/> of the <termref def="td">type
definition</termref></phrase><!--*
* material suppressed here by diff group ep25 *
*-->.</propdef>

<propdef name="type definition anonymous" id="a-type_definition_anonymous" dg="rq144nv"><pt>true</pt>
if <phrase dg="ep25">the</phrase> 
<!--*
* material suppressed here by diff group ep25 *
*--><propref comp="std" prop="name"/> 
<phrase dg="ep25">of the <termref def="td">type
definition</termref></phrase> is <termref def="key-null">absent</termref>,
otherwise <pt>false</pt>.</propdef>

<propdef name="type definition name" id="a-type_definition_name" dg="rq144nv"><phrase dg="ep25">The </phrase><!--*
* material suppressed here by diff group ep25 *
*--><propref comp="std" prop="name"/> 
<phrase dg="ep25">of the
<termref def="td">type definition</termref></phrase>, if <!--*
* material suppressed here by diff group rq144wgno *
*--><phrase dg="ep25"><phrase dg="rq144wgno">the
<propref comp="std" prop="name"/></phrase></phrase><!--*
* material suppressed here by diff group ep25 *
*--> 
is not <termref def="key-null">absent</termref>.  If <phrase dg="ep25"><!--*
* material suppressed here by diff group rq144wgno *
*--><phrase dg="rq144wgno">the
<termref def="td">type definition</termref>'s
<propref comp="std" prop="name"/> property</phrase></phrase><!--*
* material suppressed here by diff group ep25 *
*--> is <termref def="key-null">absent</termref>, <phrase dg="rq144wgno">then</phrase>
schema processors <rfc2119>may</rfc2119>, but need
not, provide a value which uniquely identifies this
type definition among those with the same target namespace.
<phrase dg="f2f0701d"><phrase dg="f2f0701e">It is
<termref def="key-impl-defined">implementation-defined</termref> whether a processor provides a name
for such a type definition.  </phrase>If a processor does provide a value in this
situation, the choice of what value to use is <termref def="key-impl-dep">implementation-dependent</termref><!--*
* material suppressed here by diff group f2f0701e *
*-->.</phrase>
</propdef>

</proplist>

<!--*
* material suppressed here by diff group rq144nv *
*-->

<!--*
* material suppressed here by diff group rq144nv *
*-->

<!--*
* material suppressed here by diff group rq144nv *
*-->

<!--*
* material suppressed here by diff group rq144nv *
*-->

<!--*
* material suppressed here by diff group rq144nv *
*-->

<note dg="rq144nv">
<p>The
<xpropref role="psviAnon">type definition type</xpropref>,
<xpropref role="psviAnon">type definition namespace</xpropref>,
<xpropref role="psviAnon">type definition name</xpropref>, and
<xpropref role="psviAnon">type definition anonymous</xpropref> properties
are redundant with the 
<xpropref role="psviAnon">type definition</xpropref> property; 
they are defined for the convenience of implementations
which wish to expose those specific properties 
but not the entire type definition.
</p>
</note>


<p dg="b2333b">If 
<phrase dg="b2632"><phrase dg="ep25">the attribute's</phrase><!--*
* material suppressed here by diff group ep25 *
*-->
<!--*
* material suppressed here by diff group b3251i *
*--><phrase dg="b3251i"><termref def="key-iv">initial value</termref></phrase> is <termref def="key-vn">valid</termref> with respect to <phrase dg="ep25">the <termref def="key-governing-type-att"/></phrase><!--*
* material suppressed here by diff group ep25 *
*-->
as defined by <specref ref="cvc-simple-type"/> and</phrase>
<phrase dg="ep25">the <termref def="key-governing-type-att"/> has </phrase><!--*
* material suppressed here by diff group ep25 *
*--><propref comp="std" prop="variety"/>
<!--*
* material suppressed here by diff group ep25 *
*-->
<pt>union</pt>, then calling <termdef id="a-key-amt" term="actual member type definition" role="local"> that <phrase dg="b2333c"><!--*
* material suppressed here by diff group b2333a *
*--><phrase dg="b2333a"><xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-basicmember">basic
member</xtermref> of its <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-transitivemembership">transitive
membership</xtermref></phrase> which actually <termref def="key-vn">validated</termref></phrase><!--*
* material suppressed here by diff group b2333c *
*--> the attribute item's <termref def="key-nv">normalized value</termref> <!--* <phrase
diff="add" dg="b2333c">was ultimately assigned</phrase> *--> the
<term>actual member type definition</term></termdef>, there <phrase dg="opt.144">are</phrase><!--*
* material suppressed here by diff group opt.144 *
*--> <!--*
* material suppressed here by diff group rq144nv *
*--><phrase dg="rq144nv">four</phrase> additional properties:</p>

<!--*
* material suppressed here by diff group b2333b *
*-->
<!--*
* material suppressed here by diff group b2333b *
*-->

<proplist role="psvi" item="attribute">
<propdef name="member type definition" id="a-member_type_definition" dg="rq144nv">
an <termref def="key-iso">item isomorphic</termref> to 
the <termref def="a-key-amt"/>.
<!--* that <xtermref
href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-basicmember">basic member</xtermref> of its
<xtermref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-transitivemembership">transitive
membership</xtermref> which actually <termref
def="key-vn">validated</termref> the attribute item's <xpropref
href="&ii-a;">normalized
value</xpropref>. *--></propdef>

<propdef name="member type definition namespace" id="a-member_type_definition_namespace">The <propref comp="std" prop="target namespace"/> of the <termref def="a-key-amt">actual
member type definition</termref>.</propdef>
<propdef name="member type definition anonymous" id="a-member_type_definition_anonymous"><pt>true</pt> if the <propref comp="std" prop="name"/> of the <termref def="a-key-amt">actual member
type definition</termref> is <termref def="key-null">absent</termref>,
otherwise <pt>false</pt>.</propdef>
<propdef name="member type definition name" id="a-member_type_definition_name">The <propref comp="std" prop="name"/> of the <termref def="a-key-amt">actual member type
definition</termref>, if it is not <termref def="key-null">absent</termref>.  If it is <termref def="key-null">absent</termref>, schema processors <rfc2119>may</rfc2119>, but need
not, provide a value unique to the definition.
<phrase dg="f2f0701d"><phrase dg="f2f0701e">It is
<termref def="key-impl-defined">implementation-defined</termref> whether a processor provides a name
for such a type definition.  </phrase>If a processor does provide a value in this
situation, the choice of what value to use is <termref def="key-impl-dep">implementation-dependent</termref><!--*
* material suppressed here by diff group f2f0701e *
*-->.</phrase>
</propdef>
</proplist>

<p>The first (<termref def="key-iso">item isomorphic</termref>)
<phrase dg="ep99">alternative</phrase><!--*
* material suppressed here by diff group ep99 *
*--> 
above is provided for applications such as query
processors which need access to the full range of details about an
item's <termref def="key-va"/>, for example the
type hierarchy; the <phrase dg="ep99">second</phrase><!--*
* material suppressed here by diff group ep99 *
*-->, for lighter-weight processors for whom
representing the significant parts of the type hierarchy as
information items might be a significant burden.</p>

<p dg="b3837">
 If
 <olist role="andtest">
  <item><p>
    the attribute's <termref def="key-nv">normalized value</termref> is <termref def="key-vn">valid</termref> with respect to the
    <termref def="key-governing-type-att"/>;
  </p></item>
  <item><olist role="Ortest">
   <item><p>
    the <termref def="key-governing-type-att"/> has <propref comp="std" prop="variety"/> <phrase dg="ep24">=</phrase>
    <pt>list</pt>;
   </p></item>
   <item><p>
    the <termref def="key-governing-type-att"/> has <propref comp="std" prop="variety"/> <phrase dg="ep24">=</phrase>
    <pt>union</pt> and the <termref def="a-key-amt"/> has
    <propref comp="std" prop="variety"/> <phrase dg="ep24">=</phrase> <pt>list</pt>;
   </p></item>
  </olist></item>
  <item><p>
   the <propref comp="std" prop="item type definition"/> of the list type
   (from the previous clause) has <propref comp="std" prop="variety"/> <phrase dg="ep24">=</phrase>
   <pt>union</pt>;
  </p></item>
 </olist>
 then there is an additional property:
</p>
<proplist role="psvi" item="attribute" dg="b3837">
 <propdef name="member type definitions" id="a-member_type_definitions">
  a sequence of <compref ref="std"/> components, with the same length as the
  <propref ref="a-schema_actual_value" role="psvi"/>, each one an
  <termref def="key-iso">item isomorphic</termref> to the
  <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-basicmember">basic member</xtermref> which
  actually <termref def="key-vn">validated</termref> the corresponding
  space-delimited substring in the <propref ref="e-schema_normalized_value" role="psvi"/>.
 </propdef>
</proplist>

<!--*
* material suppressed here by diff group cleanup-3 *
*-->

     <!--*
* material suppressed here by diff group vm3-e *
*-->
     <!--*
* material suppressed here by diff group cleanup-3 *
*-->   
<!--*
* material suppressed here by diff group b4159 *
*-->
<!--*
* material suppressed here by diff group b4159 *
*-->
<!--* 
<ednote diff="add" dg="b4159"><edtext>
 Not trying to use ENUMERATION when, say, the type is derived from string and
 a set of enumerations are specified.
</edtext></ednote>
<ednote diff="add" dg="b4159"><edtext>
 When the type is NOTATION, not much we can do with [references], because
 schema notations are declared in the schema, and don't correspond to any
 notation information items.
</edtext></ednote>
<ednote diff="add" dg="b4159"><edtext>
 How to fit these propoerties into the different PSVI subsets? "full instance
 subset"? Also note that the current subsets don't include propoerties like
 [ID/IDREF binding].
</edtext></ednote>
*-->
    </constraintnote>

<!--*
* material suppressed here by diff group vm3-1x *
*-->
<p dg="vm3-2">See also
<specref ref="sic-attrDefault"/>,
<specref ref="sic-match-info"/> and <specref ref="sic-schema"/>,
 which <!--*
* material suppressed here by diff group vm3-4 *
*--><phrase dg="vm3-4">describe
other information set contributions related</phrase> to attribute information items.
</p>
     </div4>
    </div3>

    <div3 id="coss-attribute">
     <head>Constraints on Attribute Declaration Schema Components</head>
     <p>All attribute declarations (see <specref ref="cAttribute_Declarations"/>) <rfc2119>must</rfc2119> satisfy the following constraints.</p>

     <div4 id="sec-a-props-correct" dg="b5165a">
      <head dg="b5165a">Attribute Declaration Properties Correct</head>

      <constraintnote type="cos" id="a-props-correct">
       <head>Attribute Declaration Properties Correct</head>
       <p><!--*
* material suppressed here by diff group ep98 *
*-->
       <olist role="And" dg="ep98">
	<item>
	 <p>The values of the properties of an attribute declaration <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">are</phrase> as described in
	  the property tableau in <specref ref="Attribute_Declaration_details"/>, modulo the impact 
	  of <specref ref="conformance-missing"/>.</p>
	</item>
	<item>
	 <p>if there is a <propref comp="ad" prop="value      constraint"/>, <phrase dg="iff">then</phrase>
	   <!--*
* material suppressed here by diff group rq129 *
*--><phrase dg="rq129">it is a valid default with respect
	    to the <propref comp="ad" prop="type definition"/> as
	    defined in <specref ref="cos-valid-simple-default"/></phrase>.
	 </p>
	</item>
	<!--*
* material suppressed here by diff group b4517 *
*-->
	</olist>
	<!--*
* material suppressed here by diff group ep98aux *
*-->
       </p>
      </constraintnote>

      <note dg="ep19">
       <!--* MSM added this on own responsibility, should check with SG *-->
       <p>The use of <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ID">ID</xtermref> and related
	types together with value constraints goes beyond what is possible with 
	XML DTDs, and <rfc2119>should</rfc2119> be avoided if compatibility with DTDs is desired.</p>
      </note>

     </div4>
     <div4 id="sec-cos-valid-simple-default" dg="b5165a">
      <head dg="b5165a">Simple Default Valid</head>

      <constraintnote type="cos" id="cos-valid-simple-default" dg="rq129">
       <head>Simple Default Valid</head>
       <p><phrase dg="ep98">For a</phrase><!--*
* material suppressed here by diff group ep98 *
*--> 
	Value Constraint <phrase dg="ep22"><var>V</var></phrase>
	<phrase dg="ep98">to be</phrase><!--*
* material suppressed here by diff group ep98 *
*-->
	a valid default with respect to a <compref ref="std"/>
	<phrase dg="ep22"><var>T</var></phrase>
	<!--*
* material suppressed here by diff group ep98 *
*-->
	<olist role="and">
	 <!--* MSM corrects 'and.ixm' to 'and'.  This list was not present when diff group
             * 'modals' was adopted, so it was not changed.  It should have been just 'and'
             * and not 'andtest'.  MSM 2008-02-26 *-->
	 <item>
	  <p><!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>V</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="vc_a" prop="lexical      form"/> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> <termref def="key-vn">valid</termref> with
	   respect to <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>T</var></phrase> 
	   as defined by <!--*
* material suppressed here by diff group cleanup-3 *
*-->
	   <phrase dg="cleanup-3"><xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#cvc-datatype-valid">Datatype
	     Valid</xtermref> in <bibref ref="ref-xsp2"/>.</phrase></p></item>
	 <item>
	  <p><!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>V</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="vc_a" prop="lexical form"/>
	   maps to <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>V</var>.</phrase><propref comp="vc_a" prop="value"/> 
	   in <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22">the</phrase> 
	   value space<phrase dg="ep22"> of <var>T</var></phrase>.</p>
	 </item>
	</olist>
       </p>
      </constraintnote>

     </div4>

     <div4 id="sec-no-xmlns" dg="b5165a">
      <head dg="b5165a"><code>xmlns</code> Not Allowed</head>

      <constraintnote type="cos" id="no-xmlns">
       <head><code>xmlns</code> Not Allowed</head>
       <p>The <propref comp="ad" prop="name"/> of an attribute declaration <rfc2119>must not</rfc2119> match <code>xmlns</code>.</p>
       <note>
	<p>The <propref comp="ad" prop="name"/> of an attribute is an <termref def="gloss-NCName">NCName</termref>, which implicitly
	 prohibits attribute declarations of the form <code>xmlns:*</code>.</p>
       </note>
      </constraintnote>

     </div4>
     <div4 id="sec-no-xsi" dg="b5165a">
      <head dg="b5165a"><code>xsi:</code> Not Allowed</head>

      <constraintnote type="cos" id="no-xsi">
       <head><code>xsi:</code> Not Allowed</head>
       <p>The <propref comp="ad" prop="target namespace"/> of an attribute declaration,
	whether local or top-level, <rfc2119>must not</rfc2119> match <code>http://www.w3.org/2001/XMLSchema-instance</code>
	(unless it is one of the four built-in declarations given in the next section).</p>
       <note>
	<p>This reinforces the special status of these attributes, so that they not
	 only <emph>need</emph> not be declared to be allowed in instances, but
	 <phrase dg="b5150b">in consequence of the rule just given</phrase>
	 <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals"><rfc2119>must not</rfc2119></phrase> be declared.
	 <!--*
* material suppressed here by diff group b4363 *
*--></p>
       </note>
       <note dg="b4363">
	<!--*
* material suppressed here by diff group b4363-1 *
*-->
	<p dg="b4363-1">It is <!--*
* material suppressed here by diff group b5139 *
*-->legal for <compref ref="au"/>s that
	 refer to <code>xsi:</code> attributes to specify default or fixed value
	 constraints (e.g. in a component corresponding to a schema document construct
	 of the form <code>&lt;xs:attribute ref="xsi:type" default="xs:integer"/&gt;</code>),
	 but the practice is not recommended; including such attribute uses will tend
	 to mislead readers of the schema document, because the attribute uses would
	 have no effect; see <specref ref="cvc-complex-type"/> and
	 <specref ref="sic-attrDefault"/> for details.</p>
       </note>
      </constraintnote>
     </div4>
    </div3>
    <div3 id="builtin-ads">
     <head>Built-in Attribute Declarations</head>
     <p>There are four attribute declarations present in every
schema by definition:</p>
     
     <div4 id="sec-sc-xsi.type" dg="b5165a">
      <head dg="b5165a"><code>xsi:type</code></head>
      <p dg="b5165c">The <code>xsi:type</code> attribute
       is used to signal use of a type other than the declared type of 
       an element.  See <specref ref="xsi_type"/>.
      </p>
    <schemaComp id="xsi.type">
     <head>Attribute Declaration for the 'type' attribute</head>
     <pvlist>
      <pvpair comp="ad" prop="name"><code>type</code></pvpair>
      <pvpair comp="ad" prop="target namespace"><code>http://www.w3.org/2001/XMLSchema-instance</code></pvpair>
      <pvpair comp="ad" prop="type definition">The built-in <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#QName">QName</xtermref> simple
type definition</pvpair>
      <pvpair comp="ad" prop="scope">A <compref ref="sc_a"/> as follows:
       <pvlist>
        <pvpair comp="sc_a" prop="variety"><pt>global</pt></pvpair>
        <pvpair comp="sc_a" prop="parent" dg="ep01"><termref def="key-null">absent</termref></pvpair>
       </pvlist>
      </pvpair>
      <pvpair comp="ad" prop="value constraint"><termref def="key-null">absent</termref></pvpair>
      <pvpair comp="ad" prop="annotations"><termref def="key-null">
       <!--*
* material suppressed here by diff group bannotations *
*-->
       <phrase dg="bannotations">the empty sequence</phrase>
      </termref></pvpair>
     </pvlist>
    </schemaComp>
     </div4>
     <div4 id="sec-sc-xsi.nil" dg="b5165a">
      <head dg="b5165a"><code>xsi:nil</code></head>

      <p dg="b5165c">The <code>xsi:nil</code> attribute
       is used to signal that an element's content is <quote>nil</quote>
       (or <quote>null</quote>). See <specref ref="xsi_nil"/>.
      </p>
     <schemaComp id="xsi.nil">
     <head>Attribute Declaration for the 'nil' attribute</head>
      <pvlist>
      <pvpair comp="ad" prop="name"><code>nil</code></pvpair>
      <pvpair comp="ad" prop="target namespace"><code>http://www.w3.org/2001/XMLSchema-instance</code></pvpair>
      <pvpair comp="ad" prop="type definition">The built-in <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#boolean">boolean</xtermref> simple
type definition</pvpair>
      <pvpair comp="ad" prop="scope">A <compref ref="sc_a"/> as follows:
       <pvlist>
        <pvpair comp="sc_a" prop="variety"><pt>global</pt></pvpair>
        <pvpair comp="sc_a" prop="parent" dg="ep01"><termref def="key-null">absent</termref></pvpair>
       </pvlist>
      </pvpair>
      <pvpair comp="ad" prop="value constraint"><termref def="key-null">absent</termref></pvpair>
      <pvpair comp="ad" prop="annotations"><termref def="key-null">
       <!--*
* material suppressed here by diff group bannotations *
*-->
       <phrase dg="bannotations">the empty sequence</phrase>
      </termref></pvpair>
     </pvlist>
     </schemaComp>

     </div4>
     <div4 id="sec-sc-xsi.schemaLocation" dg="b5165a">
      <head dg="b5165a"><code>xsi:schemaLocation</code></head>

      <p dg="b5165c">The <code>xsi:schemaLocation</code> attribute
       is used to signal possible locations of relevant schema documents.
       See <specref ref="xsi_schemaLocation"/>.
      </p>
     <schemaComp id="xsi.schemaLocation">
     <head>Attribute Declaration for the 'schemaLocation' attribute</head>
      <pvlist>
      <pvpair comp="ad" prop="name"><code>schemaLocation</code></pvpair>
      <pvpair comp="ad" prop="target namespace"><code>http://www.w3.org/2001/XMLSchema-instance</code></pvpair>
      <pvpair comp="ad" prop="type definition">An anonymous simple type definition, as follows:
       <pvlist>
        <pvpair comp="std" prop="name"><termref def="key-null">absent</termref></pvpair>
        <pvpair comp="std" prop="target namespace"><code>http://www.w3.org/2001/XMLSchema-instance</code></pvpair>
        <pvpair comp="std" prop="base type definition">The built in <!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase></pvpair>
        <pvpair comp="std" prop="facets"><termref def="key-null">absent</termref></pvpair>
        <pvpair comp="std" prop="variety"><pt>list</pt></pvpair>
        <pvpair comp="std" prop="item type definition">The built-in <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#anyURI">anyURI</xtermref> simple
type definition</pvpair>
        <pvpair comp="std" prop="annotations"><termref def="key-null">
         <!--*
* material suppressed here by diff group bannotations *
*-->
         <phrase dg="bannotations">the empty sequence</phrase>
        </termref></pvpair>
       </pvlist>
      </pvpair>
      <pvpair comp="ad" prop="scope">A <compref ref="sc_a"/> as follows:
       <pvlist>
        <pvpair comp="sc_a" prop="variety"><pt>global</pt></pvpair>
        <pvpair comp="sc_a" prop="parent" dg="ep01"><termref def="key-null">absent</termref></pvpair>
       </pvlist>
      </pvpair>
      <pvpair comp="ad" prop="value constraint"><termref def="key-null">absent</termref></pvpair>
      <pvpair comp="ad" prop="annotations"><termref def="key-null">
       <!--*
* material suppressed here by diff group bannotations *
*-->
       <phrase dg="bannotations">the empty sequence</phrase>
      </termref></pvpair>
     </pvlist>
     </schemaComp>

     </div4>
     <div4 id="sec-sc-xsi.noNamespaceSchemaLocation" dg="b5165a">
      <head dg="b5165a"><code>xsi:noNamespaceSchemaLocation</code></head>

      <p dg="b5165c">The <code>xsi:noNamespaceSchemaLocation</code> attribute
       is used to signal possible locations of relevant schema documents.
       See <specref ref="xsi_schemaLocation"/>.
      </p>
     <schemaComp id="xsi.noNamespaceSchemaLocation">
     <head>Attribute Declaration for the 'noNamespaceSchemaLocation' attribute</head>
      <pvlist>
      <pvpair comp="ad" prop="name"><code>noNamespaceSchemaLocation</code></pvpair>
      <pvpair comp="ad" prop="target namespace"><code>http://www.w3.org/2001/XMLSchema-instance</code></pvpair>
      <pvpair comp="ad" prop="type definition">The built-in <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#anyURI">anyURI</xtermref> simple
type definition</pvpair>
      <pvpair comp="ad" prop="scope">A <compref ref="sc_a"/> as follows:
       <pvlist>
        <pvpair comp="sc_a" prop="variety"><pt>global</pt></pvpair>
        <pvpair comp="sc_a" prop="parent" dg="ep01"><termref def="key-null">absent</termref></pvpair>
       </pvlist> 
      </pvpair>
      <pvpair comp="ad" prop="value constraint"><termref def="key-null">absent</termref></pvpair>
      <pvpair comp="ad" prop="annotations"><termref def="key-null">
       <!--*
* material suppressed here by diff group bannotations *
*-->
       <phrase dg="bannotations">the empty sequence</phrase>
      </termref></pvpair>
     </pvlist>
     </schemaComp>
     </div4>
    </div3>
   </div2>

   <div2 id="cElement_Declarations">
    <head>Element Declarations</head>
       <p>Element declarations provide for:</p>
    <ulist>
     <item><p>Local <termref def="key-vn">validation</termref> of element information item values using a type definition;</p></item>
     <item><p>Specifying default or fixed values for <!--*
* material suppressed here by diff group b5140 *
*--> element information items;</p></item>
     <item><p>Establishing uniquenesses and reference constraint relationships among the values of related elements and
attributes;</p>
</item>
     <item><p>Controlling the substitutability of elements through the
mechanism of <termref def="key-equivalenceClass">element substitution groups</termref>.</p>
     </item>
    </ulist>
    <note role="example">
     <eg xml:space="preserve">&lt;xs:element name="PurchaseOrder" type="PurchaseOrderType"/&gt;

&lt;xs:element name="gift"&gt;
 &lt;xs:complexType&gt;
  &lt;xs:sequence&gt;
   &lt;xs:element name="birthday" type="xs:date"/&gt;
   &lt;xs:element ref="PurchaseOrder"/&gt;
  &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;
&lt;/xs:element&gt;
</eg>
     <p>XML representations of several different types of element declaration</p>
    </note>

    <div3 id="Element_Declaration_details">
     <head>The Element Declaration Schema Component</head>
     <p>The element declaration schema component has the following
      properties:</p>

     <compdef name="Element Declaration" abbrev="ed" showAKO="true"/>

     <microCompdef name="Type Table" abbrev="tt" dg="cta"/>
     <!--*
* material suppressed here by diff group cta-add-ta-del *
*-->
     <!-- <microCompdef name="Namespace Context" abbrev="ncon" diff="add" dg="cta"/> -->

<!--* ATTENTION:  Read the comments before you touch anything within five
    * lines of here. *-->
     <!--*
* material suppressed here by diff group ADD.cta-add-4419-del *
*-->
     <!--*
* material suppressed here by diff group DEL.cta-add-4419-del *
*-->

     <!--*
* material suppressed here by diff group ADD.cta-add-4419-del *
*--> 
     <!--*
* material suppressed here by diff group DEL.cta-add-4419-del *
*--> 
<!--* CTA added these microcomponents here, and now 4419 is deleting them.
      Because these are compact, I've just put both an add and a del here.
      Possible states of text to reconstruct:  0 (nothing here), change 0-1,
      1 (something here), change 1-2, 2 (nothing here).      
      Legal combinations are pre+post (states 0, 2), colour+post (change 0-1),
      post+post or pre+pre (state 1), pre+colour (change 1-2),
*-->

     <microCompdef name="Scope" abbrev="sc_e" dg="ep01"/>
     <microCompdef name="Value Constraint" abbrev="vc_e" dg="ep01"/>

     <!--*
* material suppressed here by diff group ep25 *
*-->
     <p><phrase dg="ep25">The <propref comp="ed" prop="name"/> property</phrase><!--*
* material suppressed here by diff group ep25 *
*--> <rfc2119>must</rfc2119> match the
      local part of the names of element information items being
      <termref def="key-vn">validated</termref>.</p>
     <!--*
* material suppressed here by diff group ep24 *
*-->
     <p dg="ep24">
      For an element declaration <var>E</var>, if <var>E</var>.<propref comp="ed" prop="scope"/>.<propref prop="variety" comp="sc_e"/>
      = <pt>global</pt>, then <var>E</var> is available for use throughout the schema.
      If <var>E</var>.<propref comp="ed" prop="scope"/>.<propref prop="variety" comp="sc_e"/>
      = <pt>local</pt>, then <var>E</var> is available for use only within (the
      <compref ref="ctd"/> or <compref ref="mgd"/>)
      <var>E</var>.<propref comp="ed" prop="scope"/>.<propref comp="sc_e" prop="parent"/>.
     </p>
     <p>A <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals"><termref def="key-null">non-absent</termref></phrase>
 value of the <propref comp="ed" prop="target        namespace"/> property provides for <termref def="key-vn">validation</termref> of namespace-qualified
      element information items.  <termref def="key-null">Absent</termref> values of
      <propref comp="ed" prop="target namespace"/> <termref def="key-vn">validate</termref> unqualified items.</p>
     <p>An element information item <!--*
* material suppressed here by diff group ep25 *
*-->is <!--*
* material suppressed here by diff group cleanup-1 *
*--><phrase dg="cleanup-1">normally
       required to satisfy</phrase> <phrase dg="ep25">the </phrase><!--*
* material suppressed here by diff group ep25 *
*--><propref prop="type definition" comp="ed"/>.  For such an
      item, schema information set
      contributions appropriate to the <propref prop="type definition" comp="ed"/> are added to the
      corresponding element information
      item in the <termref def="key-psvi">post-schema-validation infoset</termref>. <phrase dg="cleanup-1"> The type
       definition against which an element information item is
       validated <phrase dg="ep19">(its
	<termref def="key-governing-type-elem"/>)</phrase> can be different from the
       <phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/>. The <phrase dg="cta"><propref comp="ed" prop="type table"/> property of an <compref ref="ed"/>, which governs conditional type assignment, and
	the</phrase> <code>xsi:type</code> attribute <phrase dg="cta">of an element information item</phrase>
       (see <specref ref="xsi_type"/>) can <!--*
* material suppressed here by diff group cta *
*--><phrase dg="cta">cause the <termref def="key-governing-type-elem"/> and the
	<phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/> to be different</phrase>. </phrase>
     </p>
     <p>If <!--*
* material suppressed here by diff group ep25 *
*--><propref comp="ed" prop="nillable"/> is <pt>true</pt>, then
      an element <phrase dg="ep20">with no text or element
       content</phrase> <!--*
* material suppressed here by diff group ep08a *
*--><phrase dg="ep08a">can</phrase> <!--*
* material suppressed here by diff group ep20 *
*--> be <termref def="key-vn">valid</termref> <!--*
* material suppressed here by diff group ep25 *
*-->
      <!--*
* material suppressed here by diff group ep20 *
*--> despite a <!--*
* material suppressed here by diff group ep20c *
*-->
      <propref comp="ed" prop="type definition" dg="ep20c"/>
      which would otherwise require
      content<phrase dg="ep20">, if <phrase dg="ep25">it</phrase><!--*
* material suppressed here by diff group ep25 *
*--> carries the
       attribute <code>xsi:nil</code> with the value
       <code>true</code> (see <specref ref="xsi_nil"/>)</phrase>.
      Formal details of element <termref def="key-vn">validation</termref> are described in
      <specref ref="cvc-elt"/>.</p>
     <!--*
* material suppressed here by diff group b5195a-rejected *
*-->
     <p dg="b5195">
      <termdef id="key-nilled" term="nilled">An
       element information item <var>E</var> is <term>nilled</term> 
       with respect to some element declaration <var>D</var> if and only if 
       <olist role="andtest">
	<item>
	 <p><!--*
* material suppressed here by diff group b5195a-rejected *
*--><phrase dg="b5195b"><var>E</var> has <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">
	   <code>xsi:nil</code> = <pt>true</pt></phrase>.</phrase> </p>
	</item>
	<item>
	 <p><var>D</var>.<propref comp="ed" prop="nillable"/> = <pt>true</pt>. </p>
	</item>
       </olist>
      </termdef>
      If <var>E</var> is said to be <termref def="key-nilled"/> without the
      identity of <var>D</var> being clear from the context, then <var>D</var> is assumed to
      be <var>E</var>'s <termref def="key-governing-ed"/>.
     </p>
     <!--*
* material suppressed here by diff group b5195a-rejected *
*-->
     <!--*
     <p diff="add" dg="b5195">
      <termdef id="key-spuriously-nilled" term="spuriously nilled">An
       element information &E; which is <termref def="key-nilled"/>
       with respect to some element declaration &D;, but is not
       &actually-nil;
       with respect to &D;, is <term>spuriously nilled</term>.
      </termdef>
     </p>
     *-->
     <p><propref comp="ed" prop="value constraint"/> establishes a
      default or fixed value for an element.  If <phrase dg="ep01">a <propref comp="ed" prop="value constraint"/> 
       with <!--*
* material suppressed here by diff group ep24 *
*-->
       <propref comp="vc_e" prop="variety"/> <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">=</phrase>
      </phrase><pt>default</pt> is <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01">present</phrase>, and if the element being <termref def="key-vn">validated</termref> is 
      empty, then <!--*
* material suppressed here by diff group b2632 *
*--> <phrase dg="b2632"><phrase dg="b2632b">for
	purposes of calculating the <propref role="psvi" ref="e-schema_normalized_value"/>
	and other contributions to the <termref def="key-psvi">post-schema-validation infoset</termref> </phrase>the element is
       treated as if <!--*
* material suppressed here by diff group ep24 *
*--> 
       <propref comp="ed" prop="value constraint"/><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="vc_e" prop="lexical form"/> 
       <phrase dg="ep99">was</phrase><!--*
* material suppressed here by diff group ep99 *
*-->
       used as the content of the element.</phrase> If <pt>fixed</pt>
      is specified, then the element's content <rfc2119>must</rfc2119> either be empty,
      in which case <pt>fixed</pt> behaves as <pt>default</pt>, or its
      value <rfc2119>must</rfc2119> <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01">be <!--*
* material suppressed here by diff group wgi-20080530 *
*--><phrase dg="wgi-20080530">equal</phrase> to</phrase> 
      <!--*
* material suppressed here by diff group ep24 *
*--> 
      <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01"><propref comp="ed" prop="value  constraint"/><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="vc_e" prop="value"/></phrase>.</p>
     <note dg="b2632b">
      <p>When a default value is supplied and used, as described in
       the second sentence of the preceding paragraph, the default
       value is used to calculate the
       <propref role="psvi" ref="e-schema_normalized_value"/>, etc.,
       but the actual content of the element is not changed: the
       element contained no character information items in the input 
       information set, and it contains none in the PSVI.</p>
     </note>
     <note>
      <p>The provision of defaults for elements goes beyond what is
       possible in XML<!--*
* material suppressed here by diff group fpwd *
*--> DTDs,
       and does not exactly correspond to defaults for attributes.  In
	particular, an element with a non-empty <propref comp="ed" prop="value constraint"/> whose simple type definition includes the empty
       string in its lexical space will nonetheless never receive that
	value, because the <propref comp="ed" prop="value constraint"/> will override it.</p>
     </note>
     <p><propref comp="s" prop="identity-constraint definitions"/> express
      constraints establishing uniquenesses and reference
      relationships among the values of related elements and
      attributes.  See <specref ref="cIdentity-constraint_Definitions"/>.</p>
     <p><!--*
* material suppressed here by diff group b6009 *
*--><phrase dg="b6009">The 
      <!--*
* material suppressed here by diff group b2834 *
*--><phrase dg="b2834"><propref comp="ed" prop="substitution group affiliations"/></phrase> property of an element declaration indicates
      which <!--*
* material suppressed here by diff group b4337 *
*--><termref def="key-eq" dg="b4337">substitution groups</termref>, if any, it can potentially be a member of.</phrase> 
      Potential membership is transitive but not
      symmetric; an element declaration is a potential member of any
      group <phrase dg="b6009">named in its <!--*
* material suppressed here by diff group b2834 *
*--><phrase dg="b2834"><propref comp="ed" prop="substitution group affiliations"/></phrase>, and 
       also of any group</phrase> of which <phrase dg="b2834">any entry
       in</phrase> its <!--*
* material suppressed here by diff group b2834 *
*--><phrase dg="b2834"><propref comp="ed" prop="substitution group affiliations"/></phrase> is a potential member. Actual
      membership <!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase> be blocked by the effects of <propref comp="ed" prop="substitution        group exclusions"/> or <propref comp="ed" prop="disallowed        substitutions"/>, see below.</p>
     <p>An empty <propref comp="ed" prop="substitution group        exclusions"/> allows a declaration to be <!--*
* material suppressed here by diff group cta-ed *
*--><phrase dg="cta-ed">named in</phrase> the <!--*
* material suppressed here by diff group b2834 *
*--><phrase dg="b2834"><propref comp="ed" prop="substitution group affiliations"/></phrase> of other
      element declarations having the same <phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/> or
      <!--*
* material suppressed here by diff group cta-ed *
*--><phrase dg="cta-ed">some type</phrase> <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> therefrom.  
      The explicit values of <propref comp="ed" prop="substitution group exclusions"/><phrase dg="b3889">,
      <pt>extension</pt> or <pt>restriction</pt>,</phrase>
      rule out element declarations having 
      types <!--*
* material suppressed here by diff group b3889 *
*--><phrase dg="b3889">whose
       derivation from <propref prop="type definition" comp="ed"/> involves any
       <pt>extension</pt> steps, or <pt>restriction</pt> steps,
       respectively</phrase> .

      <!--*
* material suppressed here by diff group cleanup-3 *
*--></p>

     <p>The supplied values for <propref comp="ed" prop="disallowed        substitutions"/> determine whether an element declaration
      appearing in a <termref def="key-contentModel">content
       model</termref> will be prevented from additionally <termref def="key-vn">validating</termref> elements (a) with an
      <specref ref="xsi_type"/> that identifies an <pt>extension</pt>
      or <pt>restriction</pt> of the type of the declared element,
      and/or (b) from <termref def="key-vn">validating</termref>
      elements which are in the <!--*
* material suppressed here by diff group b4337 *
*--><termref def="key-eq" dg="b4337"/> headed by the declared
      element. If <propref comp="ed" prop="disallowed substitutions"/>
      is empty, then
      all <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> types and <!--*
* material suppressed here by diff group b4337 *
*--><termref def="key-eq" dg="b4337"/> members are allowed.</p>
     <p>Element declarations for which <propref comp="ed" prop="abstract"/> is <pt>true</pt> can appear in content models
      only when substitution is allowed; such declarations <!--*
* material suppressed here by diff group fpwd *
*--><phrase dg="fpwd"><rfc2119>must not</rfc2119></phrase> themselves ever be used to
      <termref def="key-vn">validate</termref> element content.</p>
     <p>See <specref ref="cAnnotations"/> for information on the role
      of the <propref comp="ed" prop="annotations"/> property.</p>
    </div3>

    <div3 id="declare-element">
     <head><phrase dg="b5159">XML Representation of Element Declaration Schema Components</phrase><!--*
* material suppressed here by diff group b5159a *
*--><!--*
* material suppressed here by diff group b5159b *
*--></head>
     <p>The XML representation for an element declaration schema
      component is an <eltref ref="element"/> element information
      item.  It specifies a type definition for an element either by
      reference or explicitly, and <!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase> provide occurrence and
      default information.  The correspondences between the properties
      of the information item and properties of the component(s) it
      corresponds to are <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152">given in this section.</phrase></p>

     <!--*
* material suppressed here by diff group b5152-movement *
*-->

     <reprdef dg="b5152-movement">
      <reprelt id="xr.elt1" dg="b5152-movement" eltname="element" type="element"/>
     </reprdef>
     
     <!--* <p id="xr.elt2-bis" diff="add" dg="b3836-2.b5152-move"> *-->
     <!--*
* material suppressed here by diff group hither.b5152.cr.del-as-hither *
*-->
     <!--*
* material suppressed here by diff group hither.b5152.cr.del-as-del *
*-->
     <!--* </p> *-->
<!--* N.B. 'test' attribute display is hacked in the xmlschema.xsl
    * stylesheet.  You can save a lot of time by not trying to
    * trace through to figure out where in structures.xml or
    * *.xsd.dmp the words "a restricted XPath expression, see below"
    * come from:  they don't come from there at all.
    *-->
     
     <!--* no new copy of xr.elt3? it was deleted by cta-add-ta-del 
         * before the text was moved and is 'post' in all important
         * views of the spec.
         *-->
     <!--*
     <reprdef diff="add" dg="b5152-movement">
      <reprelt id="xr.elt3-bis" eltname="alternative" type="altType" diff="del" dg="cta-add-ta-del" local="element"/>
     </reprdef>
     *-->

   

<p><phrase dg="b6012b">An</phrase>
<eltref ref="element"/> <phrase dg="b6012b">element
information item in a schema document</phrase> 
<!--*
* material suppressed here by diff group b6012b *
*--><phrase dg="b6012b">maps to</phrase> an 
element declaration<!--*
* material suppressed here by diff group b6012b *
*--> and allows the
type definition of that declaration to be specified either by
reference or by explicit inclusion.</p>

<p><phrase dg="b6012b">Top-level </phrase><eltref ref="element"/><phrase dg="b6012b">
element</phrase>s <!--*
* material suppressed here by diff group b6012b *
*--> 
<phrase dg="b6012b">(i.e. those which appear within
the schema document as children of</phrase> 
<eltref ref="schema"/><phrase dg="b6012b"> 
elements)</phrase> 
produce
<pt>global</pt> element declarations; <eltref ref="element"/>s within <eltref ref="group"/> or <eltref ref="complexType"/> produce either particles which contain <pt>global</pt> element declarations (if there's a <code>ref</code> attribute) or local declarations (otherwise).  For complete declarations, top-level or local, the <code>type</code> attribute is used when the declaration can use a
built-in or <!--*
* material suppressed here by diff group b6012 *
*-->
<phrase dg="b6012">user-defined global</phrase> type definition.  Otherwise an
anonymous <eltref ref="simpleType"/> or <eltref ref="complexType"/> is provided inline.</p>

 <p>Element information items <termref def="key-vn">validated</termref> by a top-level 
declaration <rfc2119>must</rfc2119> be qualified with the
<propref comp="ed" prop="target namespace"/> of that 
declaration<!--*
* material suppressed here by diff group iff *
*--><phrase dg="iff">.
If the 
<propref comp="ed" prop="target namespace"/> is <termref def="key-null">absent</termref>,
the item <rfc2119>must</rfc2119> be unqualified.</phrase>
Control over whether element information items <termref def="key-vn">validated</termref> by a local declaration <rfc2119>must</rfc2119> be similarly qualified or not
is provided by the <code>form</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, whose default is provided
by the <code>elementFormDefault</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> on the enclosing <eltref ref="schema"/>, via its determination of <propref comp="ed" prop="target namespace"/>.</p>
<p><!--*
* material suppressed here by diff group b5140 *
*-->
<phrase dg="b5140">The</phrase> names for top-level element declarations are in a separate
<termref def="key-symbolSpace">symbol space</termref> from the symbol spaces for
the names of type definitions, so there can (but need
not be) a simple or complex type definition with the same name as a
top-level element.  <phrase diff="del" dg="b5507">As with attribute names, 
the names of locally-scoped
element declarations with no <propref comp="ed" prop="target namespace"/> 
reside in symbol spaces local to the type definition which contains
them.</phrase><phrase diff="add" dg="b5507">The names of locally-scoped
element declarations need not be unique and thus 
reside in no symbol space at all (but the element declarations are
constrained by <specref ref="cos-element-consistent"/>).</phrase></p>

  <p>Note that the above allows for two levels of defaulting for unspecified
type definitions.  An <eltref ref="element"/> with no referenced or included type definition will
correspond to an element declaration which has
<!--* <phrase diff="del" dg="f2f0701d"> *--><!--*
* material suppressed here by diff group f2f0701c *
*-->
<!--*
* material suppressed here by diff group f2f0701x *
*-->
<!--*
* material suppressed here by diff group f2f0701x *
*--><!--* </phrase> *-->
<!--*
* material suppressed here by diff group f2f0701x *
*-->
<!--*
* material suppressed here by diff group f2f0701x *
*-->
<!--*
* material suppressed here by diff group f2f0701x *
*-->
<phrase dg="f2f0701e">the 
same type definition as the first 
substitution-group head named in the
<code>substitutionGroup</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present,</phrase>
<!--*
* material suppressed here by diff group f2f0701x *
*-->
otherwise <!--*
* material suppressed here by diff group rq17 *
*--><phrase dg="rq17"><termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref></phrase>.  
This has the important consequence that the minimum valid element declaration, 
that is, one with only a <code>name</code> attribute and no contents, 
is also (nearly) the most general, validating any combination of text and 
element content and allowing any attributes, and providing for recursive 
validation where possible.</p>

  <!--*
* material suppressed here by diff group f2f0701x *
*-->

 <p>See <!--*
* material suppressed here by diff group b5140 *
*-->
  <specref ref="declare-key"/> for <eltref ref="key"/>, <eltref ref="unique"/> and <eltref ref="keyref"/>.</p>

     <p dg="b5152">The following sections specify several
      sets of XML mapping rules which apply in different circumstances.
      <ulist>
       <item>
	<p>If the <eltref ref="element"/> element information item has
	 <eltref ref="schema"/> as its parent, it maps to 
	 an <compref ref="ed"/> using the mappings described in 
	 <specref ref="dcl.elt.common"/> and
	 <specref ref="dcl.elt.global"/>.
	</p>
       </item>
       <item>
	<p>If the <eltref ref="element"/> element information
	 item has
	 <eltref ref="complexType"/> or <eltref ref="group"/> as an ancestor,
	 and the <code>ref</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is absent, 
	 and it does not have <code>minOccurs=maxOccurs=0</code>,
	 then it maps both to a <compref ref="p"/>, as described
	 in <specref ref="dcl.elt.local"/>, and also to an
	 <compref ref="ed"/>, using the mappings described in
	 <specref ref="dcl.elt.common"/> and
	 <specref ref="dcl.elt.local"/>.
	</p>
       </item>
       <item>
	<p>If the <eltref ref="element"/> element information item has
	 <eltref ref="complexType"/> or <eltref ref="group"/> as an
	 ancestor, and the <code>ref</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is present,
	 and it does not have <code>minOccurs=maxOccurs=0</code>,
	 then it maps to a <compref ref="p"/>
	 as described in <specref ref="ref.elt.global"/>.</p>
       </item>
       <item>
	<p>If the <eltref ref="element"/> element information item has
	 <code>minOccurs=maxOccurs=0</code>,
	 then it maps to no component at all.</p>
	<note>
	 <p>The <att>minOccurs</att> and <att>maxOccurs</att>
	  attributes are not allowed on top-level 
	  <eltref ref="element"/> elements, so in valid schema
	  documents this will happen only when the <eltref ref="element"/> element information item has
	 <eltref ref="complexType"/> or <eltref ref="group"/> as an
	  ancestor.
	 </p>
	</note>
       </item>
      </ulist>
     </p>

     <div4 id="dcl.elt.common" dg="b5152-movement">
      <head dg="b5152">Common Mapping Rules for Element Declarations</head>
      <p dg="b5152">The following mapping rules apply
       in all cases where an <eltref ref="element"/> element
       maps to an <compref ref="ed"/> component.</p>
      
     <reprdef dg="b5152-movement">
      <reprcomp id="xr.elt5" dg="b5152-movement" abstract="Element Declaration" ref="Element_Declaration_details">  

       <propmap comp="ed" prop="name">The <termref def="key-vv">actual value</termref> of the
	<code>name</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>.</propmap>

       <!--*
* material suppressed here by diff group b5152-movement *
*-->
       <!--*
* material suppressed here by diff group b5152-movement *
*-->

       <propmap comp="ed" prop="type definition"><!--*
* material suppressed here by diff group f2f0701b *
*-->
	<phrase dg="f2f0701b">The first of the following
	 that applies:</phrase>
	<olist dg="f2f0701b">
	 <item><p>The type definition corresponding to the <eltref ref="simpleType"/> or
	   <eltref ref="complexType"/> element information item in the
	   <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if either is present.
	  </p></item>
	 <item><p>
	   The type definition <termref def="src-resolve">resolved</termref> to by the <termref def="key-vv">actual value</termref> of
	   the <code>type</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if it is present.
	  </p></item>
	 <item dg="f2f0701c">
	  <!--* <item diff="del" dg="f2f0701d"> *-->
	  <!--*  </item>
	  <item diff="add" dg="f2f0701d"> *-->
	  <!--*
* material suppressed here by diff group f2f0701x *
*-->
	  <!--*
* material suppressed here by diff group f2f0701x *
*-->
	  <!--*
* material suppressed here by diff group f2f0701x *
*-->
	  <!--*
* material suppressed here by diff group f2f0701x *
*-->
	  <!--*
* material suppressed here by diff group f2f0701x *
*-->
	  <p dg="f2f0701e">The <phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/>
	   of the <compref ref="ed"/> 
	   <termref def="src-resolve">resolved</termref> to by the first 
	   <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#QName">QName</xtermref> in the <termref def="key-vv">actual value</termref> of the
	   <code>substitutionGroup</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present.
	  </p>
	  <!--*
* material suppressed here by diff group f2f0701c *
*-->
	 </item>
	 <item><p>
	   <!--*
* material suppressed here by diff group rq17 *
*--><phrase dg="rq17"><termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref></phrase>.
	  </p></item>
	</olist>
       </propmap>

       <propmap comp="ed" prop="type table" dg="cta">A 
	<compref ref="tt"/> corresponding to the <eltref ref="alternative"/> element
	information
	items among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if any, as follows, otherwise
	<termref def="key-null">absent</termref>.
	<pvlist>
	 <pvpair comp="tt" prop="alternatives" dg="cta-rtpf">
	  <!--*
* material suppressed here by diff group cta-choices *
*--> A sequence of <!--*
* material suppressed here by diff group cta-ta *
*--><compref ref="tac" dg="cta-ta"/>s, each corresponding, in
	  order, to one of
	  the <eltref ref="alternative"/> elements which have a
	  <code>test</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref><!--*
* material suppressed here by diff group cta-ta *
*--><phrase dg="cta-ta">.</phrase><!--*
* material suppressed here by diff group cta-ta *
*-->
	 </pvpair>

	 <!--*
* material suppressed here by diff group cta-cp *
*-->

<!--* new wording, with nested list *-->
	 <!--*
* material suppressed here by diff group cta-ta *
*-->
	  <pvpair comp="tt" prop="default type definition" dg="cta-ta">
	   Depends upon the final <eltref ref="alternative"/> element among the
	   <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref><!--*
* material suppressed here by diff group b6009 *
*--><phrase dg="b6009">.  If it has no <att>test</att>
	    <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, the final <eltref ref="alternative"/> maps to 
	    the <propref comp="tt" prop="default type definition"/>; 
	    if it does have a <att>test</att> attribute, it is covered by
	    the rule for <propref comp="tt" prop="alternatives"/> and
	    the <propref comp="tt" prop="default type definition"/>
	    is taken from the declared type of the <compref ref="ed"/>.
	    So the value of the <propref comp="tt" prop="default type definition"/>
	    is given by</phrase>
	   <olist role="caseval">
	   <item>
	    <p role="if">the <eltref ref="alternative"/> has no <code>test</code>
	     <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref></p>
	    <p role="then">a <!--*
* material suppressed here by diff group cta-ta *
*--><compref ref="tac" dg="cta-ta"/> corresponding to the <eltref ref="alternative"/>.</p>
	   </item>
	   <item>
	    <p role="otherwise">(the <eltref ref="alternative"/> has a
	     <code>test</code>) a <!--*
* material suppressed here by diff group cta-ta *
*--><compref ref="tac" dg="cta-ta"/> with the following properties: <pvlist>
	      <pvpair comp="tac" prop="test"><termref def="key-null">absent</termref>.</pvpair>
	      <pvpair comp="tac" prop="type definition">the <propref prop="type definition" comp="ed"/> property of
	       the parent <compref ref="ed"/>.</pvpair>
	      <pvpair comp="tac" prop="annotations">the empty sequence.</pvpair>
	     </pvlist></p>
	   </item>
	  </olist>
	 </pvpair>
	 
<!--* old wording, no nested list, for if we want to revert *-->
<!--*
<pvpair comp="tt" prop="default type definition">If the
final <eltref ref="alternative"/> element among the &i-children; does not have a
<code>test</code> &i-attribute;, then 
the type definition resolved to by the &v-value; of the
<code>type</code> &i-attribute;, if one is present,
otherwise
the type definition corresponding to the <code>complexType</code> or
<code>simpleType</code> among the &i-children; of the <eltref
ref="alternative"/> element<phrase diff="add" dg="cta-dd">, if
one is present, 
otherwise the same <compref ref="td"/> as the value
of the &ed-typedef; property (see above)</phrase>.
</pvpair> 
*-->
	 <!--*
* material suppressed here by diff group cta-cp *
*-->
	</pvlist>
       </propmap>
       
       <propmap comp="ed" prop="nillable">The <termref def="key-vv">actual value</termref> of the
	<code>nillable</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise
	<pt>false</pt>.</propmap>

	<propmap comp="ed" prop="value constraint">If there is a
	 <code>default</code> or a <code>fixed</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>,
	 then <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01">a <compref ref="vc_e"/> as follows</phrase>, otherwise <termref def="key-null">absent</termref>. <termdef id="l-std" term="effective simple type definition" role="local" dg="ep01">Use the name <term>effective simple type
	  definition</term> for the <phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/>, if it is a
	 simple type definition, 
	 or, if <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><propref prop="type definition" comp="ed"/>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/> = <pt>simple</pt>,
	 for <propref prop="type definition" comp="ed"/>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="simple type definition"/></phrase>, 
	 or else <phrase dg="ep24">for</phrase> the built-in
	 <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#string">string</xtermref> simple
	 type definition).</termdef>
	<pvlist dg="ep01">
	 <pvpair comp="vc_e" prop="variety">either <pt>default</pt> or
	  <pt>fixed</pt>, as appropriate</pvpair>
	 <pvpair comp="vc_e" prop="value">the <termref def="key-vv">actual value</termref> (with respect
	  to the <termref def="l-std"/>) of <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01">the</phrase> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref></pvpair>
	 <pvpair comp="vc_e" prop="lexical form" dg="rq129">the <termref def="key-nv">normalized value</termref> (with respect to the <termref def="l-std"/>) of the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref></pvpair>
	</pvlist></propmap>

       <propmap comp="ed" prop="identity-constraint definitions">A set
	consisting of the identity-constraint-definitions corresponding to
	all the <eltref ref="key"/>,
	<eltref ref="unique"/> and <eltref ref="keyref"/> element
	information items in the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if any, otherwise the
	empty set.</propmap>
       <!--*
* material suppressed here by diff group b2834 *
*-->
       <propmap comp="ed" prop="substitution group affiliations" dg="b2834">A set of the element declarations
	<termref def="src-resolve">resolved</termref> to by the items in the <termref def="key-vv">actual value</termref> of the
	<code>substitutionGroup</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present,
	otherwise the empty set.</propmap>
       <propmap comp="ed" prop="disallowed substitutions">A set
	depending on the <termref def="key-vv">actual value</termref> of the <code>block</code>
	<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise on the <termref def="key-vv">actual value</termref> of the
	<code>blockDefault</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of the ancestor
	<eltref ref="schema"/> element information item, if present,
	otherwise on the empty string.  Call this the
	<local>EBV</local> (for effective block value).  Then the
	value of this property is
	<olist role="caseval">
	 <item>
	  <p role="if">the <local>EBV</local> is the empty string</p>
	  <p role="then">the empty set;</p>
	 </item>
	 <item>
	  <p role="if">the <local>EBV</local> is <code>#all</code></p>
	  <p role="then"><code>{</code><pt>extension</pt>,
	   <pt>restriction</pt>,
	   <pt>substitution</pt><code>}</code>;</p>
	 </item>
	 <item>
	  <p role="otherwise">a set with members drawn from the set
	   above, each being present or absent depending on whether
	   the <termref def="key-vv">actual value</termref> (which is a list) contains an equivalently
	   named item.
	   <note>
	    <p>Although the <code>blockDefault</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of
	     <eltref ref="schema"/> <!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase> include values other than
	     <pt>extension</pt>, <pt>restriction</pt> or
	     <pt>substitution</pt>, those values are ignored in the
	     determination of <propref comp="ed" prop="disallowed substitutions"/> for element
	     declarations (they <emph>are</emph> used elsewhere).</p>
	   </note>
	  </p>
	 </item>
	</olist>
       </propmap>
       <propmap comp="ed" prop="substitution group exclusions">As for
	<propref comp="ed" prop="disallowed substitutions"/> above,
	but using the <code>final</code> and <code>finalDefault</code>
	<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> in place of the <code>block</code> and
	<code>blockDefault</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> and with the relevant
	set being <code>{</code><pt>extension</pt>,
	<pt>restriction</pt><code>}</code>.</propmap>
       <propmap comp="ed" prop="abstract">The <termref def="key-vv">actual value</termref> of the
	<code>abstract</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise
	<pt>false</pt>.</propmap>
       <!--*
* material suppressed here by diff group bannotations-1 *
*-->
       <propmap comp="ed" prop="annotations" dg="bannotations-2"> The <termref def="key-am-one"/> of the
	 <eltref ref="element"/> element<!--*
* material suppressed here by diff group cta-ta *
*--><phrase dg="b6144">
	  and any of its <eltref ref="unique"/>, <eltref ref="key"/> and
	  <eltref ref="keyref"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> with a <att>ref</att>
	  <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref></phrase>, as defined in <specref ref="declare-annotation"/>. 
       </propmap>
      </reprcomp>
     </reprdef>

     </div4>

     <div4 id="dcl.elt.global" dg="b5152-movement">
      <head dg="b5152">Mapping Rules for Top-Level Element Declarations</head>

     <p id="xr.elt4" dg="b5152-movement">If the <eltref ref="element"/> element information item has
       <eltref ref="schema"/> as its parent, 
       <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152">it
	maps to a<!--*
* material suppressed here by diff group b6012 *
*-->
	<phrase dg="b6012">global</phrase> <compref ref="ed"/>, using the mapping given
	in <specref ref="dcl.elt.common"/>,
	supplemented by the following.</phrase>
      </p>
      
      <reprdef dg="b5152-movement">
       <reprcomp abstract="Element Declaration" ref="Element_Declaration_details">  
	
	<propmap id="xr.elt.g.tns" dg="b5152-movement" comp="ed" prop="target namespace">The <termref def="key-vv">actual value</termref> of the
	 <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of the parent
	 <eltref ref="schema"/> element information item, or <termref def="key-null">absent</termref> if there is none.</propmap>
	
	<propmap id="xr.elt.g.scope" dg="b5152-movement" comp="ed" prop="scope"><!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01">A
	  <compref ref="sc_e"/> as follows</phrase>
	 <pvlist dg="ep01">
	  <pvpair comp="sc_e" prop="variety"><pt>global</pt></pvpair>
	  <pvpair comp="sc_e" prop="parent" dg="ep01"><termref def="key-null">absent</termref></pvpair>
	 </pvlist>
	</propmap>
       </reprcomp>
      </reprdef>
     </div4>

     <div4 id="dcl.elt.local" dg="b5152-movement">     
      <head dg="b5152">Mapping Rules for Local Element Declarations</head>

      <p id="xr.elt6" dg="b5152-movement">
       <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152">If</phrase>
       the <eltref ref="element"/> element information
       item has
       <eltref ref="complexType"/> or <eltref ref="group"/> as 
       an ancestor<phrase dg="b5152">,</phrase>
       and the <code>ref</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is absent, 
       <phrase dg="b5152">and it does not have
	<code>minOccurs=maxOccurs=0</code>,</phrase>
       <!--*
* material suppressed here by diff group b5152 *
*-->
       <phrase dg="b5152">then it maps both to a
	<compref ref="p"/> and to a local 
	<compref ref="ed"/> which is the <propref comp="p" prop="term"/>
	of that <compref ref="p"/>.  The <compref ref="p"/>
	is as follows:</phrase>
      </p>
     
     <reprdef dg="b5152-movement">
      <reprcomp id="xr.elt7" dg="b5152-movement" abstract="Particle" ref="Particle_details">
       <propmap comp="p" prop="min occurs">The <termref def="key-vv">actual value</termref> of the
	<code>minOccurs</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise
	<code>1</code>.</propmap>
       <propmap comp="p" prop="max occurs"><pt>unbounded</pt>, if the
	<code>maxOccurs</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> equals
	<pt>unbounded</pt>, otherwise the <termref def="key-vv">actual value</termref> of the
	<code>maxOccurs</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise
	<code>1</code>.</propmap>
       <propmap comp="p" prop="term">A (local) element declaration as
	given below.</propmap>
       <propmap comp="p" prop="annotations" dg="bannotations-1">
	The same annotations as the <propref comp="ed" prop="annotations"/> of the <!--*
* material suppressed here by diff group b6144 *
*--><phrase dg="b6144">
	 <propref comp="p" prop="term"/>.</phrase>
       </propmap>
      </reprcomp>
     </reprdef>
      
      <p id="xr.elt8" dg="b5152-movement">
       <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152">The <eltref ref="element"/> 
	element also maps to an</phrase>
       element declaration<!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152"> using the
	mapping rules given in 
	<specref ref="dcl.elt.common"/>, supplemented by those
	below:</phrase>
      </p>
     
     <reprdef dg="b5152-movement">
       <reprcomp id="xr.elt9" dg="b5152-movement" abstract="Element Declaration" ref="Element_Declaration_details">
       <!--*
* material suppressed here by diff group b3836-1 *
*-->
       <propmap comp="ed" prop="target namespace" dg="b3836-1">
	<olist role="Caseval">
	 <item><p role="if">
	   <code>targetNamespace</code> is present
	  </p><p role="then">
	   its <termref def="key-vv">actual value</termref>.
	  </p></item>
	 <item><p role="if">
	   <code>targetNamespace</code> is not present and
	   <olist role="ortest">
	    <item><p>
	      <code>form</code> <!--*
* material suppressed here by diff group ep24 *
*-->
	      <phrase dg="ep24">=</phrase> <code>qualified</code>
	     </p></item>
	    <item><p>
	      <code>form</code> is absent and <!--*
* material suppressed here by diff group ep24 *
*--> the <eltref ref="schema"/>
	      ancestor <!--*
* material suppressed here by diff group ep24 *
*-->
	      <phrase dg="ep24">has <code>elementFormDefault</code> =</phrase>
	      <code>qualified</code>
	     </p></item>
	   </olist>
	  </p><p role="then" id="no-comma-2">
	   the <termref def="key-vv">actual value</termref> of the <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>
	   of the <!--*
* material suppressed here by diff group cleanup-1 *
*--><phrase dg="cleanup-1">ancestor</phrase> <eltref ref="schema"/> element
	   information item,
	   or <termref def="key-null">absent</termref> if there is
	   none.
	  </p></item>
	 <item><p role="otherwise">
	   <termref def="key-null">absent</termref>.
	  </p></item>
	</olist>
       </propmap>
       <!--* A note about 3836 being at risk MIGHT go here.  But I
       * took it out, preferring the one at the XML summary.
       *-->
       <propmap comp="ed" prop="scope">
	 <!--*
* material suppressed here by diff group ep01 *
*-->
	 <phrase dg="ep01">A
	 <compref ref="sc_e"/> as follows:</phrase>
	<pvlist dg="ep01">
	 <pvpair comp="sc_e" prop="variety" dg="ep01"><pt>local</pt></pvpair>
	 <pvpair comp="sc_e" prop="parent">If the <eltref ref="element"/> element information item has <eltref ref="complexType"/> as an ancestor, the <compref ref="ctd"/> corresponding to that item, otherwise (the
	  <eltref ref="element"/>
	  element information item is within a named <eltref ref="group"/> <!--*
* material suppressed here by diff group scope-1973 *
*--><phrase dg="scope-1973">element information
	   item</phrase>), <!--*
* material suppressed here by diff group scope-1973 *
*--><phrase dg="scope-1973">the <compref ref="mgd"/> corresponding to
	   that item</phrase>.</pvpair>
	</pvlist>
       </propmap>
      </reprcomp>
     </reprdef>
     </div4>

     <div4 id="ref.elt.global" dg="b5152-movement">     
      <head dg="b5152">References to Top-Level Element Declarations</head>
     
     <p id="xr.elt10" dg="b5152-movement">
       <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152">If the</phrase>
       <eltref ref="element"/> element information
       item has
       <eltref ref="complexType"/> or <eltref ref="group"/> as an
       ancestor<phrase dg="b5152">,</phrase> 
       and the <code>ref</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is 
       present<!--*
* material suppressed here by diff group b5152 *
*-->,
       <phrase dg="b5152">and it does not have
	<code>minOccurs=maxOccurs=0</code>,</phrase>
       <!--*
* material suppressed here by diff group b5152 *
*-->
       <phrase dg="b5152">then it maps to
	a <compref ref="p"/> as follows.</phrase></p>
     
     <reprdef dg="b5152-movement">
      <reprcomp id="xr.elt11" dg="b5152-movement" abstract="Particle" ref="Particle_details">
       <propmap comp="p" prop="min occurs">The <termref def="key-vv">actual value</termref> of the
	<code>minOccurs</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise
	<code>1</code>.</propmap>
       <propmap comp="p" prop="max occurs"><pt>unbounded</pt>, if the
	<code>maxOccurs</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> equals
	<pt>unbounded</pt>, otherwise the <termref def="key-vv">actual value</termref> of the
	<code>maxOccurs</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise
	<code>1</code>.</propmap>
       <propmap comp="p" prop="term">The (top-level) element
	declaration <termref def="src-resolve">resolved</termref> to by the <termref def="key-vv">actual value</termref> of the
	<code>ref</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>.</propmap>
       <propmap comp="p" prop="annotations" dg="bannotations">
	<!--*
* material suppressed here by diff group bannotations-1 *
*--> <phrase dg="bannotations-2"> The <termref def="key-am-one"/> of
	 the <eltref ref="element"/> element, as defined in <specref ref="declare-annotation"/>. </phrase>
       </propmap>
      </reprcomp>
     </reprdef>
     </div4>
     <div4 id="dcl.elt.exx" dg="b5152-movement">
      <head dg="b5152">Examples of Element Declarations</head>

<note role="example">
<eg xml:space="preserve">&lt;xs:element name="unconstrained"/&gt;

&lt;xs:element name="emptyElt"&gt;
 &lt;xs:complexType&gt;
  &lt;xs:attribute ...&gt;. . .&lt;/xs:attribute&gt;
 &lt;/xs:complexType&gt;
&lt;/xs:element&gt;

&lt;xs:element name="contextOne"&gt;
 &lt;xs:complexType&gt;
  &lt;xs:sequence&gt;
   &lt;xs:element name="myLocalElement" type="myFirstType"/&gt;
   &lt;xs:element ref="globalElement"/&gt;
  &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;
&lt;/xs:element&gt;

&lt;xs:element name="contextTwo"&gt;
 &lt;xs:complexType&gt;
  &lt;xs:sequence&gt;
   &lt;xs:element name="myLocalElement" type="mySecondType"/&gt;
   &lt;xs:element ref="globalElement"/&gt;
  &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;
&lt;/xs:element&gt;</eg>
<p>The first example above declares an element whose type, by default, is 
<!--*
* material suppressed here by diff group rq17 *
*--><phrase dg="rq17"><termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref></phrase>.
The second uses an embedded anonymous complex
type definition.</p>
<p>The last two examples illustrate the use of local element declarations.  Instances of <code>myLocalElement</code> within
<code>contextOne</code> will be constrained by <code>myFirstType</code>,
while those within <code>contextTwo</code> will be constrained by
<code>mySecondType</code>. </p>

</note>
<note>
<p>The possibility that differing attribute declarations and/or content models
would apply to elements with the same name in different contexts is an
extension beyond the expressive power of a DTD in XML<!--*
* material suppressed here by diff group fpwd *
*-->.</p>
</note>
  <note role="example">
   <eg xml:space="preserve"> &lt;xs:complexType name="facet"&gt;
  &lt;xs:complexContent&gt;
   &lt;xs:extension base="xs:annotated"&gt;
    &lt;xs:attribute name="value" use="required"/&gt;
   &lt;/xs:extension&gt;
  &lt;/xs:complexContent&gt;
 &lt;/xs:complexType&gt;

 &lt;xs:element name="facet" type="xs:facet" abstract="true"/&gt;

 &lt;xs:element name="encoding" substitutionGroup="xs:facet"&gt;
  &lt;xs:complexType&gt;
   &lt;xs:complexContent&gt;
    &lt;xs:restriction base="xs:facet"&gt;
     &lt;xs:sequence&gt;
      &lt;xs:element ref="annotation" minOccurs="0"/&gt;
     &lt;/xs:sequence&gt;
     &lt;xs:attribute name="value" type="xs:encodings"/&gt;
    &lt;/xs:restriction&gt;
   &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
 &lt;/xs:element&gt;

 &lt;xs:element name="period" substitutionGroup="xs:facet"&gt;
  &lt;xs:complexType&gt;
   &lt;xs:complexContent&gt;
    &lt;xs:restriction base="xs:facet"&gt;
     &lt;xs:sequence&gt;
      &lt;xs:element ref="annotation" minOccurs="0"/&gt;
     &lt;/xs:sequence&gt;
     &lt;xs:attribute name="value" type="xs:duration"/&gt;
    &lt;/xs:restriction&gt;
   &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
 &lt;/xs:element&gt;

 &lt;xs:complexType name="datatype"&gt;
  &lt;xs:sequence&gt;
   &lt;xs:element ref="facet" minOccurs="0" maxOccurs="unbounded"/&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="name" type="xs:NCName" use="optional"/&gt;
  . . .
 &lt;/xs:complexType&gt;
</eg>
   <p>An example from a previous version of the schema for datatypes.  The
<code>facet</code> type is defined
and the <code>facet</code> element is declared to use it. The <code>facet</code> element is abstract -- it's
<emph>only</emph> defined to stand as the head for a <!--*
* material suppressed here by diff group b4337 *
*--><termref def="key-eq" dg="b4337"/>.  Two further
elements are declared, each a member of the <code>facet</code> <!--*
* material suppressed here by diff group b4337 *
*--><termref def="key-eq" dg="b4337"/>.  Finally a type is defined which refers to <code>facet</code>, thereby
allowing <emph>either</emph> <code>period</code> or <code>encoding</code> (or
any other member of the group).</p>
  </note>
  <note role="example" dg="cta">
<p>The following example illustrates conditional type assignment
to an element, based on the value of one of the element's attributes.
Each instance of the <code>message</code> element will be
assigned either to type <code>messageType</code> or to a more
specific type derived from it.  
</p>
<p>The type <code>messageType</code> accepts any well-formed XML
or character sequence as content, and carries a <code>kind</code>
attribute which can be used to describe the kind or format of 
the message.  The value of <code>kind</code> is either one of a 
few well known keywords or, failing that, any string.</p>
   <eg xml:space="preserve">&lt;xs:complexType name="messageType" mixed="true"&gt;
 &lt;xs:sequence&gt;
  &lt;xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded"/&gt;
 &lt;/xs:sequence&gt;
 &lt;xs:attribute name="kind"&gt;
  &lt;xs:simpleType&gt;
   &lt;xs:union&gt;
    &lt;xs:simpleType&gt;
     &lt;xs:restriction base="xs:string"&gt;
      &lt;xs:enumeration value="string"/&gt;
      &lt;xs:enumeration value="base64"/&gt;
      &lt;xs:enumeration value="binary"/&gt;
      &lt;xs:enumeration value="xml"/&gt;
      &lt;xs:enumeration value="XML"/&gt;
     &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;
    &lt;xs:simpleType&gt;
     &lt;xs:restriction base="xs:string"/&gt;
    &lt;/xs:simpleType&gt;
   &lt;/xs:union&gt;
  &lt;/xs:simpleType&gt;
 &lt;/xs:attribute&gt;
 &lt;xs:anyAttribute processContents="skip"/&gt;
&lt;/xs:complexType&gt;
</eg>
<p>Three restrictions of <code>messageType</code> are defined, each
corresponding to one of the three well-known formats:
<code>messageTypeString</code> for <code>kind="string"</code>,
<code>messageTypeBase64</code> for <code>kind="base64"</code> 
and <code>kind="binary"</code>, and
<code>messageTypeXML</code> for <code>kind="xml"</code> or
<code>kind="XML"</code>.
</p>
<eg xml:space="preserve">
&lt;xs:complexType name="messageTypeString"&gt;
 &lt;xs:simpleContent&gt;
  &lt;xs:restriction base="messageType"&gt;
   &lt;xs:simpleType&gt;
    &lt;xs:restriction base="xs:string"/&gt;
   &lt;/xs:simpleType&gt;
  &lt;/xs:restriction&gt;
 &lt;/xs:simpleContent&gt;
&lt;/xs:complexType&gt;

&lt;xs:complexType name="messageTypeBase64"&gt;
 &lt;xs:simpleContent&gt;
  &lt;xs:restriction base="messageType"&gt;
   &lt;xs:simpleType&gt;
    &lt;xs:restriction base="xs:base64Binary"/&gt;
   &lt;/xs:simpleType&gt;
  &lt;/xs:restriction&gt;
 &lt;/xs:simpleContent&gt;
&lt;/xs:complexType&gt;

&lt;xs:complexType name="messageTypeXML"&gt;
 &lt;xs:complexContent&gt;
  &lt;xs:restriction base="messageType"&gt;
   &lt;xs:sequence&gt;
    &lt;xs:any processContents="strict"/&gt;
   &lt;/xs:sequence&gt;
  &lt;/xs:restriction&gt;
 &lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
</eg>
<p><phrase id="anchor6013"/>
The <code>message</code> element itself uses
<code>messageType</code> both as its declared type and
as its default type, and uses <code>test</code> attributes on its
<eltref ref="alternative"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> to assign the appropriate
specialized message type to messages with the well known
values for the <code>kind</code> attribute<phrase diff="del" dg="b6013">:</phrase><phrase diff="add" dg="b6013">.
Because the declared type and the default type are the same, the last
<eltref ref="alternative"/> (without the <code>test</code> attribute)
can be omitted.</phrase></p>
<eg xml:space="preserve">
&lt;xs:element name="message" type="messageType"&gt;
  &lt;xs:alternative test="@kind='string'" type="messageTypeString"/&gt;
  &lt;xs:alternative test="@kind='base64'" type="messageTypeBase64"/&gt;
  &lt;xs:alternative test="@kind='binary'" type="messageTypeBase64"/&gt;
  &lt;xs:alternative test="@kind='xml'"    type="messageTypeXML"/&gt;
  &lt;xs:alternative test="@kind='XML'"    type="messageTypeXML"/&gt;<phrase diff="add" dg="b6013"> 
  &lt;xs:alternative                       type="messageType"/&gt;</phrase>
&lt;/xs:element&gt;
</eg>

      </note>
     </div4>
    </div3>
    <div3 id="sec-src-element">
     <head>Constraints on <phrase dg="b5159">XML Representations of Element Declarations</phrase><!--*
* material suppressed here by diff group b5159a *
*--><!--*
* material suppressed here by diff group b5159b *
*--></head>
 <constraintnote id="src-element" type="src">
  <head>Element Declaration Representation OK</head>
  <p>In addition to the conditions imposed on <eltref ref="element"/> element
information items by the schema for schema<!--*
* material suppressed here by diff group b2067-2e *
*--><phrase dg="b2067-2e"> documents</phrase>:
   <olist role="and">
    <item>
     <p><code>default</code> and <code>fixed</code> 
<!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">are not
both</phrase> present.</p>
    </item>
    <item>
     <p>If the item's parent is not <eltref ref="schema"/>, then
      <olist role="andtest">
       <item>
     <p>One of <code>ref</code> or <code>name</code> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> present, but not both.</p>
    </item>
       <item>
        <p>If <code>ref</code> is present, then all of <eltref ref="complexType"/>,
<eltref ref="simpleType"/>, <eltref ref="key"/>, <eltref ref="keyref"/>,
<eltref ref="unique"/>, <code>nillable</code>, <code>default</code>,
<code>fixed</code>, <code>form</code>, <code>block</code> and <code>type</code> 
<!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">are</phrase> absent,
i.e. only <code>minOccurs</code>, <code>maxOccurs</code>, <code>id</code> 
<phrase dg="modals">and <eltref ref="annotation"/></phrase> are
allowed <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">to appear together with</phrase> 
<code>ref</code><!--*
* material suppressed here by diff group modals *
*-->.</p>
       </item>
      </olist>
     </p>
    </item>
    <item>
     <!--*
* material suppressed here by diff group modals *
*-->
     <p dg="modals"><!--*
* material suppressed here by diff group ep08a *
*--><phrase dg="ep08a">The <eltref ref="element"/> element does not have both a
<eltref ref="simpleType"/> or <eltref ref="complexType"/> child and a
<!--*
* material suppressed here by diff group b5286 *
*--><code dg="b5286">type</code> attribute.</phrase></p>
    </item>
    <item id="ed-with-ns" dg="b3836-1"><p>
     If <code>targetNamespace</code> is present then 
     <olist role="andtest"><!--* MSM changed from and.mxm 3 July 2007 during
        systematic search for nested MUSTs *-->
      <item><p>
       <code>name</code> is present.
      </p></item>
      <item><p>
       <code>form</code> is not present.
      </p></item>
      <item><p>
       If the ancestor <eltref ref="schema"/> does not have a
       <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> or its <termref def="key-vv">actual value</termref>
       is different from the <termref def="key-vv">actual value</termref> of <code>targetNamespace</code> of
       <eltref ref="element"/>, then
       <olist role="andtest">
        <item><p>
         <eltref ref="element"/> has <eltref ref="complexType"/> as an ancestor
        </p></item>
	      <item id="ed-with-ns-must-be-old"><!--*
* material suppressed here by diff group b5276 *
*-->
	       <p dg="b5276-c">
		There is a <eltref ref="restriction" inside="complexContent"/> ancestor
		between the <eltref ref="element"/> and the nearest
		<eltref ref="complexType"/> ancestor, and the <termref def="key-vv">actual value</termref> of the
		<att>base</att> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of
		<eltref ref="restriction" inside="complexContent"/> does not 
		<termref def="key-en-match"/> the
		name of <termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref>.
	       </p>
	      </item>
	     </olist>
	    </p></item>
	  </olist>
	 </p></item>
   <!--* A note about 3836 being at risk MIGHT go here.  But I
       * took it out, preferring the one at the XML summary.
       *-->
    <!--*
* material suppressed here by diff group b5286 *
*-->
<!--*
* material suppressed here by diff group cta-add-ta-del *
*-->
<item dg="cta-wrap">
<p><phrase dg="cta">Every <eltref ref="alternative"/> element but
the last has a <code>test</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>; the last 
<eltref ref="alternative"/> element <rfc2119>may</rfc2119> have such an <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>.</phrase></p>
</item>
   </olist>
  </p>
 </constraintnote>
    </div3>
    <div3 id="eldec_vr">
     <head>Element Declaration Validation Rules</head>

     <p dg="b3714">When an element is <termref def="key-va">assessed</termref>, it is
      first checked against its <termref def="key-governing-ed"/>, if any; this in turn
      entails checking it against its <termref def="key-governing-type-elem"/>. The
      second step is recursive: the element's <!--*
* material suppressed here by diff group cta-ed *
*--><phrase dg="cta-ed"><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> and <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref></phrase> are
      <termref def="key-va">assessed</termref> in turn with respect to the declarations assigned to
      them by their parent's <termref def="key-governing-type-elem"/>.</p>
     
     <div4 id="sec-sistd" dg="b5165a">
      <head dg="b5165a">Selected and Instance-specified Type Definitions</head>

      <p dg="b3714">The <termref def="key-governing-type-elem"/> of an element
       is normally the <!--*
* material suppressed here by diff group cta *
*--><phrase dg="cta"><phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/></phrase> associated with the
       <termref def="key-governing-ed"/>, but this may be <termref def="key-overrides">overridden</termref> using <phrase dg="cta">conditional type assignment in the <compref ref="ed"/> or using</phrase> an <termref def="key-itd"/><phrase dg="cta">, or both</phrase>.
       <phrase dg="cta">When the element is declared with
	conditional type assignment, the <termref def="key-selected-type"/> is used as the
	<termref def="key-governing-type-elem"/> unless <termref def="key-overrides">overridden</termref> by an <termref def="key-itd"/>.</phrase></p>
      
      <p dg="cta"><termdef id="key-selected-type" term="selected type definition">The <term>selected type
	 definition</term> <var>S</var> of an element information item <var>E</var> is a
	type definition associated with <var>E</var> in the following way. Let
	<var>D</var> be the <termref def="key-governing-ed"/> of <var>E</var>.  Then: <olist> <!--* giving
	 the following item an ID causes the stylesheet to choose * the
	 correct template.  Don't delete the ID, even though it's not
	 used. *--> <item id="hack-will-it-work-haha-yes"> 
	  <!--*
* material suppressed here by diff group cta-rt *
*--> 
	  <p dg="cta-rt"> If <var>D</var> has a <propref comp="ed" prop="type table"/>, <!--* with a non-empty
	   &tt-actual-alternatives;, *--> then <var>S</var> is the type <termref def="key-cta-select">conditionally selected</termref> for
	   <var>E</var> by <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>D</var>.<propref prop="type table" comp="ed"/></phrase>. </p> 
	 </item> 
	 <item> 
	  <p>If
	   <var>D</var> has no <propref prop="type table" comp="ed"/>, <!--* or if its &ed-type-table;
	   is empty, *--> then <var>S</var> is <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>D</var>.<propref prop="type definition" comp="ed"/></phrase>.</p> </item>
	</olist> 
	If <var>E</var> has no <termref def="key-governing-ed"/>, then <var>E</var> has no selected
	type definition.</termdef>
       <note><p>It is a consequence of <specref ref="e-props-correct"/>
	 that if <var>D</var> <!--* !!! don't say 'valid', say if D's properties
	 are correct / D obeys that constraint ... *--> is valid, then
	 <var>S</var> will be <termref def="key-val-sub-type"/> for <var>D</var>'s 
	 <!--*
* material suppressed here by diff group wd-200708-1 *
*--><phrase dg="wd-200708-1">
	  <phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/></phrase><phrase dg="cta-error">, or else that <var>S</var> will be
	  <termref def="key-error"><phrase><code>xs:error</code></phrase></termref></phrase>.</p></note>
      </p> 
      <p dg="cta-rt"><termdef id="key-cta-select" term="conditionally selects"> Given a <compref ref="tt"/> <var>T</var> and an element
	information item <var>E</var>, <var>T</var> <term>conditionally selects</term> a
	type <var>S</var> for <var>E</var> <!--*
* material suppressed here by diff group cta-ta *
*--><phrase dg="cta-ta-2">in 
	 the following way. The <!--*
* material suppressed here by diff group cta-ta *
*--><propref prop="test" comp="tac" dg="cta-ta"/>
	 expressions in <var>T</var>'s <propref prop="alternatives" comp="tt"/> are evaluated, in order,
	 until one of the <compref ref="tac"/>s <termref def="key-cta-ta-select"/> a type definition for <var>E</var>, or until
	 all have been tried without success.  If any
	 <compref ref="tac"/> <termref def="key-cta-ta-select"/> a type definition, none of the following
	 <compref ref="tac"/>s are tried. Then the type <var>S</var> <term>conditionally
	  selected</term> for <var>E</var> by <var>T</var> is</phrase>
	as described in
	<!--*
* material suppressed here by diff group cta-ta *
*-->
       <olist role="caseval" dg="cta-ta"> 
	<item id="hack-to-force-template-match-2"><p>
	  If at least one <!--*
* material suppressed here by diff group cta-ta *
*--><compref ref="tac" dg="cta-ta"/> in <var>T</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref prop="alternatives" comp="tt"/>
	  <termref def="key-cta-ta-select"/> a type definition for <var>E</var>, then <var>S</var>
	  is the type definition selected by the first such <!--*
* material suppressed here by diff group cta-ta *
*--><compref ref="tac" dg="cta-ta"/>.
	 </p></item>
        <item><p>
	  If no <!--*
* material suppressed here by diff group cta-ta *
*--><compref ref="tac" dg="cta-ta"/> in <var>T</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref prop="alternatives" comp="tt"/> <termref def="key-cta-ta-select"/>
	  a type definition, then <var>S</var> is 
	   <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>T</var>.<propref prop="default type definition" comp="tt"/>.<propref prop="type definition" comp="tac"/></phrase>.
	 </p></item> 
       </olist>
      </termdef></p>

     <!--*
* material suppressed here by diff group cta-add-ta-del *
*--> 
     <!--*
* material suppressed here by diff group cta-add-ta-del *
*-->

     <!--*
* material suppressed here by diff group cta-add-ta-del *
*-->

     <p dg="b3714">
      <termdef id="key-itd" term="instance-specified type        definition">An <term>instance-specified type definition</term>
       is a type definition associated with an element information
       item in the following way: <olist> <item id="xsi-type-att">
	  <p>Among the element's attribute information items is one
	   named <code>xsi:type</code><!--*
* material suppressed here by diff group ep20 *
*-->.</p> </item> <item>
	 <p>The <termref def="key-nv">normalized value</termref> of that attribute information item is a
	  qualified name <termref def="key-vn">valid</termref> with
	  respect to the built-in <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#QName">QName</xtermref> simple type, as
	  defined by <specref ref="cvc-simple-type"/>. <!--*
* material suppressed here by diff group b5286b *
*--></p> </item> 
	 <item>
	  <p>The <!--*
* material suppressed here by diff group b5286b *
*-->
	   <phrase dg="b5286b"><termref def="key-vv">actual value</termref> (a <termref def="gloss-QName"/>)
	   <termref def="cvc-resolve-instance">resolves</termref></phrase>
	  to a type definition<!--*
* material suppressed here by diff group ep-rr *
*-->.
	  It is this type definition which is the
	  <term>instance-specified type definition</term>.</p></item>
       </olist> </termdef></p>

     <!--*
* material suppressed here by diff group vm3-0x *
*-->
     </div4>
     <div4 id="sec-type-override" dg="b5165a">
      <head dg="b5165a">Type Override and Valid Substitutability</head>

     <p dg="b3714"><termdef id="key-overrides" term="override">An <termref def="key-itd"/> <var>S</var> is said to
       <term>override</term> another type definition <var>T</var> if and only
       if all of the following are true: <olist> <item> <p><var>S</var> is the
	  <termref def="key-itd"/> on some element information item
	  <var>E</var>. A <termref def="key-governing-ed"/> may or may not be known for <var>E</var>.</p>
	</item> <!--*
* material suppressed here by diff group trimtree-1 *
*--> <item>
	 <p><var>S</var> is <termref def="key-val-sub-type"/> for <var>T</var>, <!--*
* material suppressed here by diff group cta-gst *
*--><phrase dg="cta-gst">subject to the blocking keywords of</phrase>
	  the <propref comp="ed" prop="disallowed substitutions"/> of
	  <var>E</var>'s <termref def="key-governing-ed"/>, if any, or <!--*
* material suppressed here by diff group cta *
*--><phrase dg="cta"><termref def="key-val-sub-type-absolute">validly
	    substitutable without limitation</termref> for
	   <var>T</var></phrase> (if no <termref def="key-governing-ed"/> is known).</p> </item>
       </olist> <note dg="trimtree-1"><p> Typically, <var>T</var>
	 would be the <termref def="key-governing-type-elem"/> for <var>E</var> if it were not
	 overridden.  (This will be the case if <var>T</var> was stipulated by
	 the processor, as described in <specref ref="validation_outcome"/>, or <var>E</var> has a <termref def="key-governing-ed"/> and
	 <var>T</var> is its declared type, or <var>T</var> is the <!--*
* material suppressed here by diff group b4690 *
*-->
  <termref def="key-ldtype" dg="b4690"/> of <var>E</var>.) </p></note> </termdef></p>
      <note dg="b4767b">
       <p>The use of the term <quote><termref def="key-overrides"/></quote>
	to denote the relation between an <termref def="key-itd"/>
	<var>S</var> and another type <var>T</var> has nothing to do with the
	<eltref ref="override"/> element; the two mechanisms are
	distinct and unrelated.</p>
       <!--*
* material suppressed here by diff group b4767-en *
*-->
      </note>


     <p dg="b3714"><termdef id="key-val-sub-type" term="validly substitutable">A type definition <var>S</var> is
       <term>validly substitutable</term> for another type  <var>T</var>,
       <!--*
* material suppressed here by diff group cta-gst *
*--><phrase dg="cta-gst">subject to a
	set of blocking keywords</phrase> <var>K</var> <phrase dg="rq146-0"> (typically drawn from the set
	{<pt>substitution</pt>, <pt>extension</pt>,
	<pt>restriction</pt>, <pt>list</pt>, <pt>union</pt>} used in
	the <propref comp="ed" prop="disallowed substitutions"/> and
	<propref comp="ctd" prop="prohibited substitutions"/> of
	element declarations and type definitions)</phrase>, if and
       only if either <ulist> <item> <p><var>S</var> and <var>T</var> are both complex
	  type definitions and <var>S</var> is <!--* MSM unilaterally
	  de-entifies 'derived' here.  This is NOT * a reference to
	  Datatypes! *--> validly derived from <var>T</var>
	  <!--*
* material suppressed here by diff group cta-gst *
*--><phrase dg="cta-gst">subject to</phrase> <phrase dg="cta-gst">the
	   blocking keywords in</phrase> the union of <var>K</var> and <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>T</var>.</phrase>
	  <propref comp="ctd" prop="prohibited substitutions"/><!--*
* material suppressed here by diff group ep24 *
*-->, 
	   as defined in <specref ref="cos-ct-derived-ok"/></p> </item> </ulist> or
       <ulist> <item><p><var>S</var> is a complex type definition, <var>T</var> is a
	  simple type definition, and <var>S</var> is validly <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> from
	  <var>T</var> <!--*
* material suppressed here by diff group cta-gst *
*--><phrase dg="cta-gst">subject to</phrase> <phrase dg="cta-gst">the
	   blocking keywords in</phrase> <var>K</var>, as defined in <specref ref="cos-ct-derived-ok"/></p> </item> </ulist> or
       <ulist> <item><p><var>S</var> is a simple type definition and <var>S</var> is
	  validly <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> from <var>T</var> <!--*
* material suppressed here by diff group cta-gst *
*--><phrase dg="cta-gst">subject to</phrase> <phrase dg="cta-gst">the blocking keywords in</phrase>
	  <var>K</var>, as defined in <specref ref="cos-st-derived-ok"/>.</p> </item>
       </ulist></termdef></p>

     <p dg="cta-gst"><termdef id="key-val-sub-type-absolute" term="validly substitutable        without limitation">If the set of keywords controlling whether
       a type <var>S</var> is <termref def="key-val-sub-type"/> for another type <var>T</var> is the
       empty set, then <var>S</var> is said to be <term>validly
	substitutable</term> for <var>T</var> <term>without limitation</term>
       or <term>absolutely</term>.  The phrase <term>validly
	substitutable</term>, without mention of any set of blocking
       keywords, means <quote>validly substitutable without
	limitation</quote>.</termdef>
     </p>

     <p dg="cta-ed">Sometimes one type <var>S</var> is
      <termref def="key-val-sub-type"/> for another type <var>T</var> only if <var>S</var> is derived
      from <var>T</var> by a chain of restrictions, or if <var>T</var> is a union type
      and <var>S</var> a member type of the union.  The concept of <termref def="key-val-sub-type">valid substitutability</termref> is
      appealed to often enough in such contexts that it is convenient
      to define a term to cover this specific case. <termdef id="key-val-sub-type-restricts" term="validly substitutable as        a restriction">A type definition <var>S</var> is <term>validly
	substitutable as a restriction</term> for another type  <var>T</var> if
       and only if <var>S</var> is <termref def="key-val-sub-type"/> for <var>T</var>, subject to the
       blocking keywords {<pt>extension</pt>, <pt>list</pt>,
       <pt>union</pt>}.</termdef>
     </p>

     </div4>
     <div4 id="sec-cvc-elt" dg="b5165a">
      <head dg="b5165a">Element Locally Valid (Element)</head>

      <p dg="b5165c">The concept of local validity of an
       element information item against an element declaration is
       an important part of the schema-validity <termref def="key-va"/>
       of elements.  (The other important part is the recursive
       <termref def="key-va"/> of attributes and descendant elements.)
       Local validity partially determines the element information item's
       <propref role="psvi" ref="e-validity"/> property,
       and fully determines the 
       <propref role="psvi" ref="e-local_elem_validity"/>
       property, in the <termref def="key-psvi">post-schema-validation infoset</termref>.
      </p>
      <p dg="b5165c">Informally, an element is locally valid
       against an element declaration when:
       <olist>
	<item>
	 <p>The declaration is present in the schema<phrase dg="b5281">
	  and the name of the element matches the name of the declaration</phrase>.</p>
	</item>
	<item>
	 <p>The element is declared concrete (i.e. not abstract).</p>
	</item>
	<item>
	 <p>Any <code>xsi:nil</code> attribute on the element obeys the 
	  rules. The element is allowed to have an <code>xsi:nil</code>
	  attribute only if the element is declared nillable, and 
	  <code>xsi:nil = 'true'</code> is allowed only if the element
	  itself is empty. If the element declaration specifies a 
	  fixed value for the element, <code>xsi:nil='true'</code>
	  will make the element invalid.
	 </p>
	</item>
	<item>
	 <p>Any <code>xsi:type</code> attribute present names a
	  type which is <termref def="key-val-sub-type"/> for the element's
	  <phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/>.</p>
	</item>
	<item>
	 <p>
	  The element's content satisfies the appropriate constraints:
	  If the element is empty and the declaration specifies a
	  default value, the default is checked against the
	  appropriate type definitions.
	  Otherwise, the content of the element is checked against
	  the <termref def="key-governing-type-elem"/>; additionally, if the element
	  declaration specifies a fixed value, the content is
	  checked against that value.</p>
	</item>
	<item>
	 <p>
	  The element satisfies all the identity constraints specified
	  on the element declaration.</p>
	</item>
	<item>
	 <p>
	  Additionally, on the <termref def="key-vr"/>, document-level
	  ID and IDREF constraints are checked.
	 </p>
	</item>
       </olist>
      </p>
      <!--*
* material suppressed here by diff group b5281-silent *
*-->

      <p dg="b5165c">The following validation rule gives
       the normative formal definition of local validity of an element
       against an element declaration.</p>

     <constraintnote type="cvc" id="cvc-elt">
      <head>Element Locally Valid (Element)</head>
      <p>For an element information item <phrase dg="b3714"><var>E</var></phrase> to be locally <termref def="key-vn">valid</termref> with respect to an element
       declaration <phrase dg="b3714"><var>D</var></phrase>
       <olist role="and">
	<item id="c-ea">
	 <p><!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="b3714"><var>D</var></phrase>
	  <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is not</phrase> <termref def="key-null">absent</termref><phrase dg="b5281"><!--*
* material suppressed here by diff group ep20b *
*--><phrase dg="ep20b">
	  and <var>E</var> and <var>D</var> have the same <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref></phrase></phrase>.</p>
	</item>
	<item>
	  <p><!--*
* material suppressed here by diff group ep20 *
*--><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>D</var>.</phrase><propref comp="ed" prop="abstract"/> 
	   <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">=</phrase>
	   <pt>false</pt>.</p>
	</item>
	<item>	 
	 <!--*
* material suppressed here by diff group modals *
*-->
	 <olist role="Ortest" dg="modals">
	  <item>
	    <p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>D</var>.</phrase><propref comp="ed" prop="nillable"/> 
	     <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">=</phrase>
	     <pt>false</pt>,
	     and <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var> has no
	      <code>xsi:nil</code> attribute</phrase>.</p>
	  </item>
	  <item id="c-nl">
	   <!--* added after agreement between SG and MSM *-->
	   <p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>D</var>.</phrase><propref comp="ed" prop="nillable"/> 
	     <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">=</phrase> 
	     <pt>true</pt>
	     and 
	     <olist role="ortest" dg="b5195a-rejected">
	     <item>
	       <p><!--*
* material suppressed here by diff group ep24 *
*-->
		<phrase dg="ep24"><var>E</var> has no <code>xsi:nil</code></phrase>
	        attribute information item.</p>
	     </item>
	     <item>
	      <p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var> has <code>xsi:nil</code> = <code>false</code></phrase>.</p>
	     </item>
	     <item id="c-nl-11">
	      <p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var> has <code>xsi:nil</code>
		= <code>true</code></phrase>
		<phrase dg="b5195b">
		(that is, <var>E</var> is <termref def="key-nilled"/>)</phrase>, and 
	       <olist role="andtest">
		<item>
		 <p><!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var></phrase> has no character or element
		   information item <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>.</p>
		</item>
		<item>
		 <p><!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>D</var>
		    has</phrase> no <!--*
* material suppressed here by diff group ep01 *
*--><propref comp="ed" prop="value      constraint"/><phrase dg="ep01"> with
		    <propref comp="vc_e" prop="variety"/> <phrase dg="ep24">=</phrase>
		    <pt>fixed</pt></phrase>.</p>
		</item>
	       </olist></p>
	      </item>
	     </olist>
      
	     <!--*
* material suppressed here by diff group b5195a-rejected *
*-->
	   </p>
	  </item>
	  <!--*
* material suppressed here by diff group abandoned *
*-->
	  <!--*
* material suppressed here by diff group abandoned *
*-->
	  <!--*
* material suppressed here by diff group abandoned *
*-->
	 </olist>
	</item>
	<item id="c-itd">
	 <!--*
* material suppressed here by diff group b3714 *
*-->

	 <p dg="b3714">If <!--*
* material suppressed here by diff group ep24 *
*--> <phrase dg="ep24"><var>E</var> has an</phrase>
	  <code>xsi:type</code> <phrase dg="ep24">attribute</phrase><!--*
* material suppressed here by diff group ep24 *
*-->, then
	   <olist role="andtest">
	   <item>
	    <p><var>E</var> has an <termref def="key-itd"/> which is not
	     <pt>absent</pt>.</p>
	   </item>
	   <item>
	    <p>The <termref def="key-itd"/> is <termref def="key-val-sub-type"/>
	     for <!--*
* material suppressed here by diff group cta *
*--><phrase dg="cta">the
	      <termref def="key-selected-type"/> of <var>E</var></phrase>, <!--*
* material suppressed here by diff group cta-gst *
*--><phrase dg="cta-gst">subject to</phrase>
	     <phrase dg="cta-gst">the blocking keywords
	      in</phrase> <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>D</var>.</phrase><propref comp="ed" prop="disallowed        substitutions"/><!--*
* material suppressed here by diff group ep24 *
*-->.</p></item>
	   </olist> 
	   That is, the <termref def="key-itd"/> <termref def="key-overrides">overrides</termref> the <!--*
* material suppressed here by diff group cta *
*--><phrase dg="cta"><termref def="key-selected-type"/></phrase>.</p>
	 <p dg="b3714">If an <termref def="key-itd"/>
	  exists and <termref def="key-overrides">overrides</termref> the <!--*
* material suppressed here by diff group cta *
*--><phrase dg="cta"><termref def="key-selected-type"/></phrase>, then the
	  <termref def="key-governing-type-elem"/> of <var>E</var> is the <termref def="key-itd"/>, otherwise it is the <!--*
* material suppressed here by diff group cta *
*--><phrase dg="cta"><termref def="key-selected-type"/></phrase>.</p>

	</item>
	<item>
	 <olist role="Casetest">
	  <item id="c-evc">
	   <p role="if"><!--*
* material suppressed here by diff group ep20 *
*-->
	     <phrase dg="b3714"><var>D</var></phrase> has a <propref comp="ed" prop="value constraint"/>, <phrase dg="modals">and</phrase> 
	     <!--*
* material suppressed here by diff group ep20 *
*-->
	     <phrase dg="b3714"><var>E</var></phrase> has neither
	     element nor character <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref><phrase dg="modals">,</phrase> and 
	     <!--*
* material suppressed here by diff group b5195 *
*--><phrase dg="b5195"><var>E</var> is not
	      <termref def="key-nilled"/> with respect to <var>D</var>
             <!--* identity of D might be thought obvious from context, 
                 * but MK asked about it, so let's make it explicit.
                 *-->
	     </phrase></p>
	   <p role="then">
	    <olist role="andtest">
	     <item>
	      <p>If 
		<!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var>'s</phrase> 
		<!--*
* material suppressed here by diff group b3714 *
*--><phrase dg="b3714"><termref def="key-governing-type-elem"/></phrase> 
		is 
		<!--*
* material suppressed here by diff group b3714 *
*--><phrase dg="b3714">an <termref def="key-itd"/></phrase><phrase dg="iff">,</phrase>
		then 
		<!--*
* material suppressed here by diff group ep20 *
*--><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>D</var>.</phrase><propref comp="ed" prop="value constraint"/><phrase dg="ep99v1.0"><!--*
* material suppressed here by diff group rq129 *
*--><!--*
* material suppressed here by diff group rq129-lost *
*--></phrase><!--*
* material suppressed here by diff group ep99v1.0 *
*--> 
		<!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> a valid default for the 
		<!--*
* material suppressed here by diff group b3714 *
*--><phrase dg="b3714"><termref def="key-governing-type-elem"/></phrase> 
		as defined in <specref ref="cos-valid-default"/>.
	      </p>
	     </item>
	      <item>
	       <p>The element information item with 
		<!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>D</var>.<propref comp="ed" prop="value constraint"/>.<propref comp="vc_e" prop="lexical form"/></phrase> 
		used as its <termref def="key-nv">normalized value</termref> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase>
		<phrase diff="add" dg="b5164">locally</phrase> <termref def="key-vn">valid</termref> with respect to
		the <!--*
* material suppressed here by diff group b3714 *
*--><phrase dg="b3714"><termref def="key-governing-type-elem"/></phrase> as defined
		by <specref ref="cvc-type"/>.</p>
	     </item>
	    </olist>
	   </p>
	  </item>
	  <item>
	   <p role="if"><!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>D</var></phrase> has no <propref comp="ed" prop="value constraint"/><phrase dg="modals">,</phrase> or <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var></phrase> has either element or
	    character <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref><phrase dg="modals">,</phrase> or <!--*
* material suppressed here by diff group b5195 *
*--><phrase dg="b5195"><var>E</var> is 
	      <termref def="key-nilled"/> with respect to <var>D</var></phrase></p>
	   <p role="then"><olist role="andtest">
	     <item>
	      <p><!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var></phrase> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> <phrase diff="add" dg="b5164">locally</phrase> <termref def="key-vn">valid</termref> with respect to the
	       <!--*
* material suppressed here by diff group b3714 *
*--><phrase dg="b3714"><termref def="key-governing-type-elem"/></phrase> as defined
	       by <specref ref="cvc-type"/>.</p>
	     </item>
	     <item>
	      <p>If <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>D</var>.<propref comp="ed" prop="value constraint"/>.<propref comp="vc_e" prop="variety"/> = <pt>fixed</pt></phrase> and
		<!--*
* material suppressed here by diff group b5195 *
*--><phrase dg="b5195"><var>E</var>
		 is not <termref def="key-nilled"/> with respect to <var>D</var></phrase>, <phrase dg="iff">then</phrase>
	       <olist role="andtest">
		<item>
		 <p><!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var></phrase> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">has</phrase> no element
		  information item <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>.</p>
		</item>
		<item>
		 <olist role="Casetest">
                  <!--* MSM changed Case.mxm to Case.ixm 2007-07-03 to remove a nested MUST *-->
		   <item>
		    <p role="if"><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var>'s <termref def="key-governing-type-elem"/> is a <compref ref="ctd"/>
		      with <propref comp="ctd" prop="content         type"/>.<propref comp="ct" prop="variety"/> = <pt>mixed</pt></phrase>
		    </p>
		   <p role="then">the <termref def="key-iv">initial
		      value</termref> of <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var></phrase> 
		     <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">matches</phrase> <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>D</var>.<propref comp="ed" prop="value constraint"/>.<propref comp="vc_e" prop="lexical form"/></phrase>.</p>
		  </item>
		  <item>
		    <p role="if"><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var>'s <termref def="key-governing-type-elem"/> 
		      is a <compref ref="std"/>
		      or a <compref ref="ctd"/> with 
		      <propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/> = <pt>simple</pt></phrase></p>
		    <p role="then">the <termref def="key-vv">actual value</termref> of <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var></phrase> <!--*
* material suppressed here by diff group modals *
*--><!--*
* material suppressed here by diff group rq129 *
*--><phrase dg="rq129">is <!--*
* material suppressed here by diff group wgi-20080530 *
*--><phrase dg="wgi-20080530">equal</phrase> to</phrase>
		     <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">
		      <var>D</var>.<propref comp="ed" prop="value constraint"/>.<propref comp="vc_e" prop="value"/></phrase>.
		   </p>
		  </item>
		 </olist>
		</item>
	       </olist>
	      </p>
	     </item>
	    </olist></p>
	  </item>
	 </olist>
	</item>
       
	<item>
	 <p><!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var></phrase> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> <termref def="key-vn">valid</termref> with respect to each of the
	  <propref comp="s" prop="identity-constraint     definitions"/> as per <specref ref="cvc-identity-constraint"/>.</p>
	</item>
	<item>
	 <p>If <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var></phrase> is the <termref def="key-vr"/>,
	  <phrase dg="modals">then</phrase> it <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase>
	  <termref def="key-vn">valid</termref> per <specref ref="cvc-id"/>.</p>
	</item>
	<!--*
* material suppressed here by diff group cta-rt-xx *
*-->
      </olist>      
      </p>
     </constraintnote>

     <!--*
* material suppressed here by diff group b5281-silent *
*-->

     <note dg="vm3-4">
      <p>If an element has an <code>xsi:type</code> attribute whose
       value does not <!--*
* material suppressed here by diff group ep-rr *
*--><phrase dg="ep-rr"><termref def="cvc-resolve-instance">resolve</termref></phrase> to a type definition,
       <!--*
* material suppressed here by diff group f2f0610 *
*--> <phrase dg="f2f0610">or <phrase dg="ftf-2">if
	</phrase>the type definition <!--*
* material suppressed here by diff group ftf-2 *
*--><phrase dg="ftf-2">fails to</phrase> <termref def="key-overrides">override</termref> the <!--*
* material suppressed here by diff group cta *
*--><phrase dg="cta"><termref def="key-selected-type"/></phrase>, then <!--*
* material suppressed here by diff group ftf-2 *
*--><phrase dg="ftf-2">the</phrase> <!--*
* material suppressed here by diff group cta *
*--><phrase dg="cta"><termref def="key-selected-type"/> <phrase dg="ftf-2">of its
	  <termref def="key-governing-ed"/></phrase></phrase> becomes <!--*
* material suppressed here by diff group ftf-2 *
*--><phrase dg="ftf-2">the</phrase> <termref def="key-governing-type-elem"/><phrase dg="ftf-2">.  The</phrase><!--*
* material suppressed here by diff group ftf-2 *
*--> local validity of the element
	with respect to the <termref def="key-governing-type-elem"/> is recorded in the
	<propref role="psvi" ref="e-local_type_validity"/>
	property.</phrase></p>
     </note>

     </div4>
     
      <!--*
* material suppressed here by diff group b5165a-dummy *
*-->

     <!--*
* material suppressed here by diff group cta-rt-xx *
*-->

     
     <div4 id="sec-cvc-type" dg="b5165a">
      <head dg="b5165a">Element Locally Valid (Type)</head>

      <p dg="b5165c">The following validation rule specifies
       formally what it means for an element to be locally valid 
       against a type definition.  This concept is appealed to in the
       course of checking an element's local validity against its
       <!--*
* material suppressed here by diff group b6008 *
*-->
       <phrase dg="b6008"><termref def="key-governing-type-elem"/>. It</phrase>
       is also part of schema-validity
       <termref def="key-va"/> of an element when <!--*
* material suppressed here by diff group b6008 *
*--> <phrase dg="b6008">the element is
       <termref def="key-lva">laxly assessed</termref>, by</phrase> checking <!--*
* material suppressed here by diff group b6008 *
*--><phrase dg="b6008">its</phrase> local validity
       <!--*
* material suppressed here by diff group b6008 *
*--> against <code>xs:anyType</code>.</p>
      <p dg="b5165c">
       Informally, local validity against a type requires first
       that the type definition be present in the schema and not declared abstract.
       For a simple type definition, the element must lack attributes
       (except for namespace declarations and the special attributes
       in the <code>xsi</code> namespace) and child elements, and must
       be type-valid against that simple type definition.
       For a complex type definition, the element must
       be locally valid against that complex type definition.
       Also, if the element has an <code>xsi:type</code> attribute,
       then it is not locally valid against any type other than the
       one named by that attribute.
      </p>
      <!--*
* material suppressed here by diff group b5165xx *
*-->
      <!--*
* material suppressed here by diff group b5165xx *
*-->
     <constraintnote type="cvc" id="cvc-type">
      <head>Element Locally Valid (Type)</head>
      <p>For an element information item <phrase dg="ep20"><var>E</var></phrase> 
	to be locally <termref def="key-vn">valid</termref> with respect to 
	a type definition <phrase dg="ep20"><var>T</var></phrase>
      <olist role="and">
	<item id="c-ct">
	 <p><!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>T</var></phrase> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is not</phrase> <termref def="key-null">absent</termref>;</p>
	</item>
	<item>
	 <!--*
* material suppressed here by diff group ep24 *
*-->
	 <p dg="ep24">
	   If <var>T</var> is a complex type definition, then
	   <var>T</var>.<propref comp="ctd" prop="abstract"/> = <pt>false</pt>.</p>
	</item>
	<item>
	 <olist role="Casetest">
	  <item>
	   <p role="if"><!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>T</var></phrase> is a simple type
	    definition</p>
	   <p role="then">
         <olist role="andtest">
	     <item><p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var>.<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref>
		 is empty</phrase>, <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">except for attributes</phrase> <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20">named <code>xsi:type</code>,
		 <code>xsi:nil</code>,
		 <code>xsi:schemaLocation</code>, or
		 <code>xsi:noNamespaceSchemaLocation</code></phrase>.</p>
	     </item>
	     <item>
	      <p><!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var></phrase> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">has</phrase> no element
	       information item <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>.</p>
	     </item>
	     <item id="c-sv1">
	      <p>If <!--*
* material suppressed here by diff group b5195 *
*--><phrase dg="b5195"><var>E</var> is not <termref def="key-nilled"/></phrase>, then the <!--*
* material suppressed here by diff group b3251i *
*--><phrase dg="b3251i"><termref def="key-iv">initial value</termref></phrase>
	       <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> <termref def="key-vn">valid</termref> with
	       respect to <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>T</var></phrase> as defined by <specref ref="cvc-simple-type"/>.</p>
	     </item>
         </olist>
	   </p>
	  </item>
	  <item>
	   <p role="if"><!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>T</var></phrase> is a complex type
	    definition</p>
	   <p role="then"><!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var></phrase> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase>
	    <phrase diff="add" dg="b5164">locally</phrase> <termref def="key-vn">valid</termref> with respect to <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>T</var></phrase>
	     as per <specref ref="cvc-complex-type"/>;</p>
	  </item>
	 </olist>
	 </item>
	 <item dg="b4299"><p>
	   If <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var></phrase> has an
	   <code>xsi:type</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref><!--*
* material suppressed here by diff group ep20 *
*--> and does
	   not have a <termref def="key-governing-ed"/>, then the <termref def="key-vv">actual value</termref> of
	   <code>xsi:type</code> <termref def="src-resolve">resolves</termref> to <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>T</var></phrase>.
	  </p>
	  <!--*
* material suppressed here by diff group b4299b.add.b5165.del.asadd *
*-->
	  <!--*
* material suppressed here by diff group b4299b.add.b5165.del.asdel *
*-->
	  <note dg="b4299c"><p>
	    This rule only covers the case when a <termref def="key-governing-ed"/> is not available.
	    When a <termref def="key-governing-ed"/> is present, the same rule is checked
	    in
	    <clauseref ref="c-itd"/> of <specref ref="cvc-elt"/>.
	   </p></note>
	</item>
      </olist>
      </p>
     </constraintnote>
     </div4>
     <div4 id="sec-cvc-id" dg="b5165a">
      <head dg="b5165a">Validation Root Valid (ID/IDREF)</head>

      <p dg="b5165c">The following validation rule
       specifies document-level ID/IDREF constraints checked on the 
       <termref def="key-vr"/> if it is an element; this rule is not checked on other
       elements.  Informally, the requirement is that each ID
       identifies a single element within the <termref def="key-vr"/>, 
       and that each IDREF value matches one ID.
      </p>

     <constraintnote type="cvc" id="cvc-id">
      <head>Validation Root Valid (ID/IDREF)</head>
      <p>For an element information item <phrase dg="ep24"><var>E</var></phrase>
	which is the
	<termref def="key-vr"/> to be <termref def="key-vn">valid</termref>
	<olist role="and">
	 <item>
	  <p>There <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> no <local>ID/IDREF binding</local> in 
	   <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var>.</phrase><propref ref="e-ii_table" role="psvi"/> whose <propref role="psvi" ref="iib-binding"/> is the empty set.</p>
        </item>
        <item id="c-uba">
         <p>There <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> no <local>ID/IDREF binding</local> in 
	   <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var>.</phrase><propref ref="e-ii_table" role="psvi"/> whose
	  <propref role="psvi" ref="iib-binding"/> has more than one
	  member.</p>
        </item>
       </olist>
      </p>
      <p>See <specref ref="sic-id"/> for the definition of
       <local>ID/IDREF binding</local>.</p>
     </constraintnote>

      <!--* 2008-01-30: MSM silently moves these notes out of the
      constraint and into the context, which is where I think they
      belong. *-->
      <note>
       <p>The first clause above <phrase dg="ep99">applies</phrase><!--*
* material suppressed here by diff group ep99 *
*--> when there is a reference to an undefined
	ID.  The second <phrase dg="ep99">applies</phrase><!--*
* material suppressed here by diff group ep99 *
*--> when there is a multiply-defined ID. They
	are separated out to ensure that distinct error codes (see
	<specref ref="outcomes"/>) are associated with these two
	cases.</p>
      </note>
      <note>
       <p>Although this rule applies at the <termref def="key-vr"/>, in
	practice processors, particularly streaming processors,
	<!--*
* material suppressed here by diff group may *
*--><phrase dg="may">will perhaps</phrase> wish to detect and signal the
	<clauseref ref="c-uba"/> case as it arises.</p>
      </note>
      <note>
       <p>This reconstruction of <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/>'s
	<code>ID/IDREF</code> functionality is imperfect in that if
	the <termref def="key-vr"/> is not the document element of an XML
	document, the results will not necessarily be the same as
	those a validating parser would give were the document to have
	a DTD with equivalent declarations.</p>
      </note>

     </div4>
     <div4 id="sec-cvc-assess-elt" dg="b5165a">
      <head dg="b5165a">Schema-Validity Assessment (Element)</head>
      
      <!--*
* material suppressed here by diff group b5165xx *
*-->
      
      <!--*
* material suppressed here by diff group b5165xx *
*-->

      <p dg="b5165c">This section gives the top-level rule
       for <termref def="key-va"/> of an element information item.  Informally:
       <olist>
	<item>
	 <p>Assessment begins with the identification of a
	  <termref def="key-governing-ed"/> for the element and then checks that the
	  element is locally valid against the declaration; if no
	  <termref def="key-governing-ed"/> is available, a <termref def="key-governing-type-elem"/> can be
	  used instead.</p>
	</item>
	<item>
	 <p>The element's attributes are to be <termref def="key-va">assessed</termref> recursively, 
	  unless they match a <pt>skip</pt> wildcard and are thus 
	  <termref def="key-skipped"/>.  
	 </p>
	</item>
	<item>
	 <p>The element's children are to be <termref def="key-va">assessed</termref> recursively, 
	  unless they match a <pt>skip</pt>
	  wildcard and are thus <termref def="key-skipped"/>.  For each child element,
	  the <termref def="key-governing-ed"/> is the one identified in the course
	  of checking the local validity of the parent, unless that
	  declaration is not available. If the <termref def="key-governing-ed"/> is not
	  available, the element may still be <termref def="key-sva"/>
	  if a <termref def="key-governing-type-elem"/> can be identified (e.g. via the
	  <code>xsi:type</code> attribute), otherwise the element
	  will be <termref def="key-lva">laxly assessed</termref>.
	 </p>
	</item>
       </olist>
       
      </p>

     <!--*
* material suppressed here by diff group b3714.add.b3725.del *
*-->
      <p dg="b3725">
       <termdef id="key-governing-ed" term="governing element  declaration"> The <term>governing element declaration</term> of
	an element information item<phrase diff="add" dg="b7913"> <var>E</var></phrase>, 
	in a given schema-validity
	<termref def="key-va"/> episode, is the first of the following
	which applies: 
	<olist> 
	 <item id="elem-stipulated"> <p>A
	   declaration stipulated by the processor (see <specref ref="validation_outcome"/>).</p> 
	 </item> 
	 <item id="elem-cdd">
	  <p><phrase diff="del" dg="b7913">Its</phrase><phrase diff="add" dg="b7913"><var>E</var>'s</phrase> 
	   <termref def="key-dd">context-determined
	    declaration</termref>.</p> 
	 </item> 
	 <item id="elem-wc-split" dg="b7913aux"> 
	  <p diff="add" dg="b7913">A declaration <termref def="cvc-resolve-instance">resolved</termref>
	   to by <var>E</var>'s <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">local name</xpropref>
	   and <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">namespace
	    name</xpropref><!--*
* material suppressed here by diff group ep-rr *
*-->, provided that <var>E</var>
	   is <termref def="key-att-to">attributed</termref> either to a <pt>strict</pt> <termref def="key-wp"/>
	   or to a <pt>lax</pt> <termref def="key-wp"/>. 
	  </p></item> 
	 <item id="elem-wc"> 
	  <p>A declaration <!--*
* material suppressed here by diff group ep-rr *
*--><phrase dg="ep-rr"><termref def="cvc-resolve-instance">resolved</termref></phrase> to by 
	   <phrase diff="del" dg="b7913">its</phrase><phrase diff="add" dg="b7913"><var>E</var>'s</phrase> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">local 
	    name</xpropref> and <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">namespace 
	    name</xpropref><!--*
* material suppressed here by diff group ep-rr *
*-->, provided <!--*
* material suppressed here by diff group vm3a *
*--> <phrase dg="vm3a">that
	    <local>none</local> of the following is true:</phrase>
	   <olist dg="vm3a"> 
	    <item id="no-id-if-skipped"><p><phrase diff="del" dg="b7913">it</phrase><phrase diff="add" dg="b7913"><var>E</var></phrase> is <termref def="key-att-to">attributed</termref> to
	      a <pt>skip</pt> <termref def="key-wp"/> </p></item> 
	    <item><p>the
	      processor has stipulated a type definition <!--*
* material suppressed here by diff group vm3a-1 *
*--> <phrase dg="vm3a-1">for
	       <phrase diff="del" dg="b7913">it</phrase><phrase diff="add" dg="b7913"><var>E</var></phrase></phrase> </p></item> 
	    <item><p>a <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals"><termref def="key-null">non-absent</termref></phrase>

	      <!--*
* material suppressed here by diff group b4690 *
*-->
	      <termref def="key-ldtype" dg="b4690"/> exists for 
	      <phrase diff="del" dg="b7913">it</phrase><phrase diff="add" dg="b7913"><var>E</var></phrase></p></item>
	   </olist> 
	  </p></item> 
	</olist> 
       <!--*
* material suppressed here by diff group vm3a *
*-->
       <phrase dg="vm3a">If none of these apply, 
	 <phrase diff="del" dg="b7913">there is</phrase><phrase diff="add" dg="b7913"><var>E</var> has</phrase>
	no <termref def="key-governing-ed"/> (or, in equivalent words, 
	 <phrase diff="del" dg="b7913">it</phrase><phrase diff="add" dg="b7913"><var>E</var>'s <termref def="key-governing-ed"/></phrase> is <termref def="key-null">absent</termref>).</phrase> </termdef>
     </p>

     <!--*
* material suppressed here by diff group b3714.add.b3725.del *
*-->

     <p dg="b3725">
       <termdef id="key-governing-type-elem" term="governing type        definition"> The <term>governing type definition</term> of an
       element information item<phrase dg="ep20"> <var>E</var></phrase>, 
	in a given schema-validity <termref def="key-va"/> episode, is the first of the following which
       applies: <olist> 
	 <item id="stipulated-plus-xsitype"> 
	  <p>An <termref def="key-itd"/> which <termref def="key-overrides">overrides</termref> a type
	   definition stipulated by the processor (see <specref ref="validation_outcome"/>).</p> 
	 </item> 
	 <item id="stipulated">
	  <p>A type definition stipulated by the processor (see
	   <specref ref="validation_outcome"/>).</p>
	 </item> 
	 <item id="governing-plus-xsitype"> 
	  <p>An <termref def="key-itd"/> which <termref def="key-overrides">overrides</termref> the <!--*
* material suppressed here by diff group cta *
*--><phrase dg="cta"><termref def="key-selected-type"/> of <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var></phrase></phrase>.</p>
	 </item>
	 <item id="gov-no-xsitype">
	  <p>The <!--*
* material suppressed here by diff group cta *
*--><phrase dg="cta"><termref def="key-selected-type"/> of <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var></phrase></phrase>.</p>
	  <!--*
* material suppressed here by diff group f2f0610 *
*-->
	 </item> 
	 <item dg="b4299">
	  <p><phrase dg="b4299b">The value</phrase> <termref def="key-null">absent</termref>
	   if <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var></phrase> is <termref def="key-skipped"/>. </p>
	 </item> 
	 <item dg="vm3a">
	  <p> An <termref def="key-itd"/> which <termref def="key-overrides">overrides</termref> the <!--*
* material suppressed here by diff group b4690 *
*--><termref def="key-ldtype" dg="b4690"/>. </p>
	 </item>
	 <item dg="vm3a">
	  <p>The <!--*
* material suppressed here by diff group b4690 *
*--><termref def="key-ldtype" dg="b4690"/>.</p>
	 </item>
	 <item>
	  <p>An
	  <termref def="key-itd"/>.</p>
	 </item>
	 <!--*
* material suppressed here by diff group rq146-x *
*-->
	<!--* <item> <p><termref def="key-null">absent</termref>.</p> </item> *--> 
	</olist> 
	If none of these apply, there is no
       <termref def="key-governing-type-elem"/> (or, in equivalent words, it is <termref def="key-null">absent</termref>). </termdef>
     </p>

      <constraintnote diff="del" id="del-cvc-assess-elt" type="cvc" dg="b6722">
      <head>Schema-Validity Assessment (Element)</head>
      <p>The schema-validity assessment of an element information item
       depends on its <!--*
* material suppressed here by diff group b5164 *
*--> <termref def="key-vn">validation</termref> and
       the <termref def="key-va"/> of its element
       information item children and associated attribute information
       items, if any.</p>
       <p><!--*
* material suppressed here by diff group b4269 *
*--> 
	<termdef id="del_del-key-sva" term="strictly assessed" role="local" dg="b4269"><phrase dg="b4269">For 
	  <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20">the</phrase> 
	 schema-validity <phrase dg="ep20">of an 
	  element information item <var>E</var></phrase>
	 to be <term>strictly assessed<phrase dg="b5140">,</phrase></term> </phrase>
	 <!--* 2008-02-13 : MSM unilaterally moves the termdef end
	     * tag away from this location to follow the olist,
	     * so that the termdef includes the actual definition.
	     *-->
	 <olist role="and">
	  <item id="del_b6722-c-xd">
	   <!--*
* material suppressed here by diff group ep99 *
*-->
	   <p id="c-xd-p1" dg="b6722c">
	   <olist role="Ortest">
	     <item id="c-ed">        
	      <olist role="Andtest">
	       <item id="dummy-id-to-force-special-list-processing-for-parent">
		<p>A <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals"><termref def="key-null">non-absent</termref></phrase> element declaration
		 <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> known for <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var></phrase>, <phrase dg="b3714">namely its <termref def="key-governing"/>
		  declaration.</phrase><!--*
* material suppressed here by diff group b3714 *
*-->
		 <!--*
* material suppressed here by diff group b3714 *
*--></p>        
	      </item>
	      <item>
	       <p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var>'s</phrase> <!--*
* material suppressed here by diff group b5164 *
*--> <termref def="key-vn">validity</termref> with
		respect to that declaration <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">has</phrase> been evaluated as per
		<specref ref="cvc-elt"/>.</p>
	      </item>
	      <item dg="b5078b">
	       <p>If that evaluation involved the evaluation of 
		<specref role="xref" ref="cvc-type"/>, <clauseref ref="c-ct"/> thereof <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> satisfied.</p>
	      </item>
	      <!--*
* material suppressed here by diff group b5078b *
*-->
	     </olist>        
	    </item>
	    <item id="c-td">
	     <olist role="Andtest">
	      <item dg="vm3-e"><p>
		<!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var></phrase> does not have a <termref def="key-governing-ed"/>.
	       </p></item>
	       <item>
		<p>A <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals"><termref def="key-null">non-absent</termref></phrase>
 type definition is known for <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var></phrase><phrase dg="b3714">, namely its
		  <termref def="key-governing-type-elem"/></phrase><!--*
* material suppressed here by diff group b3714 *
*-->
		 <!--*
* material suppressed here by diff group b3714 *
*-->
		</p>
	      </item>
	      
	      
	      <item id="another-dummy-id-to-force-special-list-processing-for-parent">
	       <p>The <!--*
* material suppressed here by diff group ep20 *
*--> <!--*
* material suppressed here by diff group b5164 *
*--> <termref def="key-vn">validity</termref> <phrase dg="ep20">of <var>E</var></phrase> with respect to <!--*
* material suppressed here by diff group b3714 *
*--><phrase dg="b3714">its
		 <termref def="key-governing-type-elem"/></phrase> has been evaluated as
		per <specref ref="cvc-type"/>.</p>
	      </item>
	      <!--*
* material suppressed here by diff group b5078b *
*-->
	     </olist>        
	    </item>
	   </olist>
	  </p>
	  </item>
	<!--*
* material suppressed here by diff group b4269 *
*-->
	  <item id="del_b6722-c-deepa" dg="b4269">
	   <!--*
* material suppressed here by diff group ep99 *
*-->
	   <p id="c-deepa-p1" dg="b6722c">
	   For each of the attribute information items among 
	   <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var>.</phrase><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref>,
	   <olist role="casetest">
	    <item><p role="if">
	      the attribute has a <termref def="key-governing-ad"/>
	     </p><p role="then">
	      its schema-validity is assessed with respect to that
	      declaration, as defined in <specref ref="cvc-assess-attr"/>.
	     </p></item>
	    <item><p role="otherwise">
	      its schema-validity is not assessed.
	     </p></item>
	   </olist>
	  </p>
	  </item>
	<item id="del_b6722-c-deepe" dg="b4269">
	 <!--*
* material suppressed here by diff group ep99 *
*-->
	   <p id="c-deepe-p1" dg="b6722c">
	   For each of the element information items among its
	   <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>,
	   <olist role="casetest">
	    <item><p role="if">
	      the child has a <termref def="key-governing-ed"/> or a <termref def="key-governing-type-elem"/>
	     </p><p role="then">
	      its schema-validity is assessed with respect to that
	      declaration or type definition, as defined in <specref ref="cvc-assess-elt"/>.
	     </p></item>
	    <item><p role="if">
	      the child is <termref def="key-att-to"/> a <pt>skip</pt>
	      <compref ref="w"/>
	     </p><p role="then">
	      its schema-validity is not assessed.
	     </p></item>
	    <item><p role="otherwise">
	      its schema-validity is <termref def="key-lva">laxly assessed</termref> with
	      respect to <termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref>.
	     </p></item>
	   </olist>
	  </p>
	  </item>
	 </olist>
	</termdef>
	<!--* 2008-02-13 : MSM unilaterally moves the /termdef here,
	    * to include the meat of the definition *-->
	<!--* 2009-07-21 : MSM changes the tagging from diff='add'
	    * to diff='tag' on the termdef, to allow generation of
	    * 1.0 text.
            *-->
      </p>
      <!--*
* material suppressed here by diff group b4269 *
*-->

      <p><phrase id="anchor5412"/>If <phrase dg="b6722">the</phrase><!--*
* material suppressed here by diff group b6722 *
*--> 
	 item cannot be <termref def="key-sva"/>,
	because neither <clauseref ref="c-ed"/> nor <clauseref ref="c-td"/> above <!--*
* material suppressed here by diff group b2225 *
*-->
	<phrase dg="b2225">is</phrase> satisfied<phrase dg="b5412">
	or the necessary components are missing
	(see <specref ref="conformance-missing"/></phrase>, <phrase dg="b2225">and the item is not <termref def="key-skipped"/>,</phrase> <!--*
* material suppressed here by diff group b2225 *
*--><phrase dg="b2225">the</phrase> element information item's schema
	validity <!--*
* material suppressed here by diff group rq144fb *
*--><phrase dg="rq144fb"><rfc2119>must</rfc2119></phrase> be <term>laxly
	 assessed</term> <!--*
* material suppressed here by diff group b3725 *
*--><phrase dg="b6722"> by 
	  <termref def="key-vn">validating</termref> with respect to <!--*
* material suppressed here by diff group f2f0610 *
*--> <!--*
* material suppressed here by diff group rq146-0 *
*--><phrase dg="rq146-0"><termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref></phrase> as per
	  <specref ref="cvc-type"/></phrase><phrase dg="b3725"><phrase dg="b2225"><phrase dg="b6722"> and assessing schema-validity of its
	    <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> and <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> as per <clauseref ref="c-deepa"/> and <clauseref ref="c-deepe"/> 
	    above</phrase>.
	 </phrase><!--*
* material suppressed here by diff group b2225 *
*--><phrase dg="b2225">If</phrase> the element information item <!--*
* material suppressed here by diff group idc *
*--> <phrase dg="idc">is
	  <termref def="key-skipped"/>,</phrase> <!--*
* material suppressed here by diff group b2225 *
*--> it <rfc2119>must not</rfc2119> be <!--*
* material suppressed here by diff group b2225 *
*--><phrase dg="b2225"><term>laxly
	   assessed</term></phrase></phrase>. <!--*
* material suppressed here by diff group rq146-x *
*--></p>

      <!--*
* material suppressed here by diff group add.rq144wg2.cr.del-as-add *
*-->
      <!--*
* material suppressed here by diff group add.rq144wg2.cr.del-as-del *
*-->

      <note dg="b2225"><p>
        When an element information item is <termref def="key-sva"/> or
	<termref def="key-lva">laxly assessed</termref>, <clauseref ref="c-deepa"/> above
	requires that all <code>xsi:</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> <!--*
* material suppressed here by diff group b4299b *
*--><phrase dg="b4299b">be</phrase> assessed with respect to the
	corresponding attribute declarations from <specref ref="builtin-ads"/>. The result of such assessment is present
	in the <!--* also contributes to *--> <termref def="key-psvi">post-schema-validation infoset</termref>, as defined in
 <specref ref="psvi_ad"/>.
       </p></note>

      <!--*
* material suppressed here by diff group b2225 *
*-->
     </constraintnote>

      <constraintnote diff="add" id="cvc-assess-elt" type="cvc" dg="b6722">
       <head>Schema-Validity Assessment (Element)</head>
       <p>The schema-validity assessment of an element information item
	<var>E</var> is performed as follows:<olist>
	 <item>
	  <p>If <var>E</var> has a <termref def="key-governing-ed"/> or a <termref def="key-governing-type-elem"/>,
	   then <var>E</var> <rfc2119>must</rfc2119> be <termref def="key-sva"/>.</p>
	 </item>
	 <item>
	  <p>If <var>E</var> is <termref def="key-skipped"/>,
	   then <var>E</var> <rfc2119>must not</rfc2119> be <termref def="key-va">assessed</termref>.</p>
	 </item>
	 <item>
	  <p>Otherwise, <var>E</var> <rfc2119>must</rfc2119> be <termref def="key-lva">laxly assessed</termref>.</p>
	 </item>
	</olist>
       </p>
      </constraintnote>

      <p dg="b6722">
       <termdef id="key-sva" term="strictly assessed" dg="b6722"><phrase diff="add" dg="b6722">An element
	information item <var>E</var> is said to be <term>strictly assessed</term>
	if and only if</phrase> 
	<olist role="andtest" dg="b6722">
	 <item id="c-xd" dg="b6722">
	  <p id="c-xd-p1" dg="b6722c">
	   <olist role="Ortest">
	     <item id="c-ed">        
	      <olist role="Andtest">
	       <item id="dummy-id-to-force-special-list-processing-for-parent">
		<p>A <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals"><termref def="key-null">non-absent</termref></phrase> element declaration
		 <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> known for <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var></phrase>, <phrase dg="b3714">namely its <termref def="key-governing"/>
		  declaration.</phrase><!--*
* material suppressed here by diff group b3714 *
*-->
		 <!--*
* material suppressed here by diff group b3714 *
*--></p>        
	      </item>
	      <item>
	       <p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var>'s</phrase> <phrase diff="add" dg="b5164">local</phrase> <termref def="key-vn">validity</termref> with
		respect to that declaration <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">has</phrase> been evaluated as per
		<specref ref="cvc-elt"/>.</p>
	      </item>
	      <item dg="b5078b">
	       <p>If that evaluation involved the evaluation of 
		<specref role="xref" ref="cvc-type"/>, <clauseref ref="c-ct"/> thereof <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> satisfied.</p>
	      </item>
	      <!--*
* material suppressed here by diff group b5078b *
*-->
	     </olist>        
	    </item>
	    <item id="c-td">
	     <olist role="Andtest">
	      <item dg="vm3-e"><p>
		<!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var></phrase> does not have a <termref def="key-governing-ed"/>.
	       </p></item>
	       <item>
		<p>A <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals"><termref def="key-null">non-absent</termref></phrase>
 type definition is known for <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var></phrase><phrase dg="b3714">, namely its
		  <termref def="key-governing-type-elem"/></phrase><!--*
* material suppressed here by diff group b3714 *
*-->
		 <!--*
* material suppressed here by diff group b3714 *
*-->
		</p>
	      </item>
	      
	      
	      <item id="another-dummy-id-to-force-special-list-processing-for-parent">
	       <p>The <!--*
* material suppressed here by diff group ep20 *
*--> <phrase diff="add" dg="b5164">local</phrase> <termref def="key-vn">validity</termref> <phrase dg="ep20">of <var>E</var></phrase> with respect to <!--*
* material suppressed here by diff group b3714 *
*--><phrase dg="b3714">its
		 <termref def="key-governing-type-elem"/></phrase> has been evaluated as
		per <specref ref="cvc-type"/>.</p>
	      </item>
	      <!--*
* material suppressed here by diff group b5078b *
*-->
	     </olist>        
	    </item>
	   </olist>
	  </p>
	 </item>
	 <item id="c-deepa" dg="b4269">
	  <p id="c-deepa-p1" dg="b6722c">
	   For each of the attribute information items among 
	   <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var>.</phrase><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref>,
	   <olist role="casetest">
	    <item><p role="if">
	      the attribute has a <termref def="key-governing-ad"/>
	     </p><p role="then">
	      its schema-validity is assessed with respect to that
	      declaration, as defined in <specref ref="cvc-assess-attr"/>.
	     </p></item>
	    <item><p role="otherwise">
	      its schema-validity is not assessed.
	     </p></item>
	   </olist>
	  </p>
	 </item>
	 <item id="c-deepe" dg="b4269">
	  <p id="c-deepe-p1" dg="b6722c">
	   For each of the element information items among its
	   <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>,
	   <olist role="casetest">
	    <item><p role="if">
	      the child has a <termref def="key-governing-ed"/> or a <termref def="key-governing-type-elem"/>
	     </p><p role="then">
	      its schema-validity is assessed with respect to that
	      declaration or type definition, as defined in <specref ref="cvc-assess-elt"/>.
	     </p></item>
	    <item><p role="if">
	      the child is <termref def="key-att-to"/> a <pt>skip</pt>
	      <compref ref="w"/>
	     </p><p role="then">
	      its schema-validity is not assessed.
	     </p></item>
	    <item><p role="otherwise">
	      its schema-validity is <termref def="key-lva">laxly assessed</termref> with
	      respect to <termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref>.
	     </p></item>
	   </olist>
	  </p>
	 </item>
	</olist>
       </termdef>
      </p>

      <p diff="add" dg="b6722"><termdef id="key-lva" term="laxly assessed">The schema validity of an element information item <var>E</var> is 
	said to be <term>laxly assessed</term> if and only if
	<olist role="bothtest">
	 <item>
	  <p><var>E</var> has neither a <termref def="key-governing-ed"/>
	   nor a <termref def="key-governing-type-elem"/>.</p>
	 </item>
	 <item>
	  <p><var>E</var> is <phrase dg="b5164">locally</phrase>
	   <termref def="key-vn">validated</termref> with respect to 
	   <termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref> as defined in
	   <specref ref="cvc-type"/>, and the schema-validity of 
	   <var>E</var>'s <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> and <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> 
	   is assessed as described in <clauseref ref="c-deepa"/> and <clauseref ref="c-deepe"/> 
	   of <specref ref="cvc-assess-elt"/>.</p>
	 </item>
	</olist>
       </termdef>
      </p>
      <note diff="add" dg="b6722">
       <p>It follows from the definitions given that no element
	information item can be both <termref def="key-sva"/>
	and <termref def="key-lva">laxly assessed</termref> in the same schema-validity 
	<termref def="key-va"/> episode.</p>
      </note>

     <!--*
* material suppressed here by diff group ep99 *
*-->
     <!--*
* material suppressed here by diff group b2225 *
*-->
     </div4>
    </div3>

    <div3 id="edisc">
     <head>Element Declaration Information Set Contributions</head>

<div4 id="sec-sic-e-outcome" dg="b5165b">
<head dg="b5165b">Assessment Outcome (Element)</head>
     <constraintnote id="sic-e-outcome" type="sic">
      <head>Assessment Outcome (Element)</head>
      <p>If<phrase dg="iff.144"> and only if</phrase> the schema-validity of an element information item
       has been assessed as per <specref ref="cvc-assess-elt"/>, then
       in the <termref def="key-psvi">post-schema-validation infoset</termref> it <phrase dg="opt.144">has</phrase><!--*
* material suppressed here by diff group opt.144 *
*--> properties as follows:</p>
      <proplist role="psvi" item="element">
       <propdef name="validation context" id="e-validation_context">The nearest ancestor element
	information item with a <propref role="psvi" ref="e-schema_information"/> property (or this element item
	itself if it has such a property).</propdef>
       <propdef name="validity" id="e-validity">
        <olist role="Caseval">
	 <item>
	  <p role="if">it was <termref def="key-sva"/></p>
	  <p role="then">
        <olist role="caseval">
	    <item>
	     <p role="if">
          <olist role="andtest">
	       <item>
		<olist role="Ortest">
		 <item>
		  <p><clauseref ref="c-ed"/> of <specref role="xref" ref="cvc-assess-elt"/> applied and the item was
		   <phrase diff="add" dg="b5164">locally</phrase> <termref def="key-vn">valid</termref> as defined by
		   <specref ref="cvc-elt"/>;</p>
		 </item>
		 <item>
		  <p><clauseref ref="c-td"/> of <specref role="xref" ref="cvc-assess-elt"/> applied and the item was
		   <phrase diff="add" dg="b5164">locally</phrase> <termref def="key-vn">valid</termref> as defined by
		   <specref ref="cvc-type"/>.</p>
		 </item>
		</olist>            
	       </item>
	       <item>
		<p>Neither its <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> nor its <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref>
		 contains an information item (element or attribute
		 respectively) whose  <xpropref role="psviAnon">validity</xpropref> is
		 <pt>invalid</pt>.</p>
	       </item>
	       <item>
		<p>Neither its <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> nor its <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref>
		 contains an information item (element or attribute
		 respectively) <!--*
* material suppressed here by diff group b3725 *
*--><phrase dg="b3725">which is <termref def="key-att-to">attributed</termref> to a
		  <pt>strict</pt> <termref def="key-wp"/> and</phrase> whose
		 <xpropref role="psviAnon">validity</xpropref> is
		 <pt>notKnown</pt>.</p>
	       </item>
          </olist>
	     </p>
	     <p role="then" id="no-comma-3"><pt>valid</pt>;</p>
	    </item>
	    <item>
	     <p role="otherwise"><pt>invalid</pt>.</p>
	    </item>
        </olist>
	  </p>
	 </item>
	 <item>
	  <p role="otherwise"><pt>notKnown</pt>.</p>
	 </item>
      </olist>
       </propdef>
       <propdef name="validation attempted" id="e-validation_attempted">
       <olist role="Caseval">
	 <item> 
	  <p role="if">it was <termref def="key-sva"/> and neither its <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> nor its
	   <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> contains an information item (element or
	   attribute respectively) whose  <xpropref role="psviAnon">validation attempted</xpropref> is not
	   <pt>full</pt></p>
	  <p role="then"><pt>full</pt>;</p>
	 </item>
	 <item>
	  <p role="if">it was not <termref def="key-sva"/> and neither its <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> nor its
	   <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> contains an information item (element or
	   attribute respectively) whose  <xpropref role="psviAnon">validation attempted</xpropref> is not
	   <pt>none</pt></p>
	  <p role="then"><pt>none</pt>;</p>
	 </item>
	 <item>
	  <p role="otherwise"><pt>partial</pt>.</p>
	 </item>
	</olist></propdef></proplist>
     </constraintnote>
     </div4>

     <div4 id="sec-sic-elt-error-code" dg="b5165b">
      <head dg="b5165b">Validation Failure (Element)</head>

     <constraintnote type="sic" id="sic-elt-error-code">
      <head>Validation Failure (Element)</head>
      <p>If<phrase dg="iff.144"> and only if</phrase> the local <termref def="key-vn">validity</termref>,
       as defined by
<specref ref="cvc-elt"/> above and/or <specref ref="cvc-type"/> below,
       of an element information item has been assessed, <phrase dg="iff">then</phrase> in the <termref def="key-psvi">post-schema-validation infoset</termref> the item
       <phrase dg="opt.144">has</phrase><!--*
* material suppressed here by diff group opt.144 *
*--> a property:</p>
      <proplist role="psvi" item="element">
       <propdef id="e-schema_error_code" name="schema error code">
       <olist role="Caseval">
	 <item>
	  <p role="if">the item is <!--*
* material suppressed here by diff group b1892 *
*--><phrase dg="b1892"><termref def="key-vn">invalid</termref></phrase></p>
	  <p role="then">a list.  Applications wishing to provide
	   information as to the reason(s) for the <termref def="key-vn">validation</termref> failure are encouraged
	   to record one or more error codes (see <specref ref="outcomes"/>) herein.</p>
	 </item>
	 <item>
	  <p role="otherwise"><termref def="key-null">absent</termref>.</p>
	 </item>
       </olist>
       </propdef>

       <propdef name="subsequence-valid" id="e-subsequence_valid" dg="vm3-1">
<olist role="Caseval">
	 <item>
	  <p role="if">the element information item is locally
	   <termref def="key-vn">invalid</termref>, because unexpected
	   attributes or elements were found among its <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref>
	   and <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref></p>
	  <p role="if"><!--*
* material suppressed here by diff group vm3-2 *
*-->
	   <phrase dg="vm3-2"><clauseref ref="c-cvct"/> of
	    <specref ref="cvc-complex-type"/> would be
	    satisfied,</phrase> if those unexpected attributes and
	   children (those with <propref ref="e-match_info" role="psvi"/> = <pt>none</pt>) were removed</p>
	  <p role="then"><pt>true</pt>
	  </p>
	 </item>
	 <!--*
* material suppressed here by diff group vm3-2 *
*-->
	 <item>
	  <p role="otherwise"><!--*
* material suppressed here by diff group vm3-2 *
*--> <phrase dg="vm3-2"><pt>false</pt></phrase></p>
	 </item>
      </olist>
       </propdef>
	<propdef name="failed identity constraints" id="e-idcs" dg="b2861cc-4a">
	 A list of <compref ref="icd"/>s that <!--*
* material suppressed here by diff group b6009 *
*--><phrase dg="b6009"><phrase dg="b6009">are
	   </phrase>not satisfied
	  by</phrase> the element information item, as defined by <specref ref="cvc-identity-constraint"/>. <note><p>
	   <!--*
* material suppressed here by diff group f2f0701a *
*--><!--*
* material suppressed here by diff group b6009 *
*--><phrase dg="b6009">In
	    principle, the value of this property includes all of the
	    <compref ref="icd"/>s which are not satisfied for this element item;
	    in practice, some processors will expose a subset of the 
	    items in this value, rather than the full value.  
	    For example, a processor could choose not to check
	    further identity constraints after detecting the first 
	    failure.</phrase>	    
	 </p></note>
       </propdef>
       <propdef name="failed assertions" id="e-assertions" dg="b2861cc-4">
       A list of <compref ref="as"/>s that <!--*
* material suppressed here by diff group b6009 *
*--><phrase dg="b6009">are not 
	  satisfied by</phrase> the element information item, as defined by <specref ref="cvc-assertion"/>. <note><p>
	  <!--*
* material suppressed here by diff group f2f0701a *
*--><!--*
* material suppressed here by diff group b6009 *
*--><phrase dg="b6009">In
	    principle, the value of this property includes all of the
	    <compref ref="as"/>s which are not satsfied by this element item;
	    in practice, some processors will expose a subset of the items in this
	    value, rather than the full value.  For example, a processor
	    could choose not to check further assertions after detecting the first 
	    failure.</phrase>
	 </p></note>
       </propdef>
      </proplist>
     </constraintnote>
     </div4>

     <div4 id="sec-sic-elt-decl" dg="b5165b">
      <head dg="b5165b">Element Declaration</head>
     <constraintnote type="sic" id="sic-elt-decl">
      <head>Element Declaration</head>
      <p>If<phrase dg="iff.144"> and only if</phrase> <phrase dg="b3054"><!--*
* material suppressed here by diff group vm3-e *
*-->a <termref def="key-governing-ed"/> is known
	for</phrase> an element information item<!--*
* material suppressed here by diff group b3054 *
*--><phrase dg="iff">,</phrase> then in the <termref def="key-psvi">post-schema-validation infoset</termref> the element
       information item <!--*
* material suppressed here by diff group rq144nv *
*--><phrase dg="rq144nv">has the properties</phrase>:</p>
      <!--*
* material suppressed here by diff group rq144nv *
*-->
      <!--*
* material suppressed here by diff group rq144nv *
*-->

      <!--*
* material suppressed here by diff group rq144nv *
*-->
      <proplist role="psvi" item="element" dg="rq144nv">
       <propdef id="e-declaration" name="element declaration">
	an <termref def="key-iso">item isomorphic</termref> to the
	<phrase dg="b3714"><termref def="key-governing"/></phrase> declaration
	component itself</propdef>
       <propdef id="e-nil" name="nil"><pt>true</pt> if <!--*
* material suppressed here by diff group b6233 *
*--><phrase dg="b6233"><clauseref ref="c-nl-11"/></phrase>
        of <specref ref="cvc-elt"/> above is satisfied,
	otherwise <pt>false</pt>
       </propdef>
       <propdef id="e-expected-ed" name="expected element declaration" dg="vm3-1">if the element information item is
	<termref def="key-att-to">attributed</termref> to an <termref def="key-ep"/>, then the <propref comp="p" prop="term"/> of that <compref ref="p"/>, otherwise <termref def="key-null">absent</termref>
	<note dg="vm3-2"><p>
        The <propref ref="e-declaration" role="psvi"/> either is the
	  same as or is in the <termref def="key-eq"/> of the <propref ref="e-expected-ed" role="psvi"/>.
	 </p></note>
       </propdef>
       <propdef id="e-declared_type" name="declared type" dg="vm3-1">an <termref def="key-iso">item isomorphic</termref>
	to the <phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/> of the <termref def="key-governing-ed"/>
       </propdef>
       <propdef name="local element validity" id="e-local_elem_validity" dg="vm3-2">
       <olist role="Caseval">
	 <item>
	  <p role="if">the item was <phrase diff="add" dg="b5164">locally</phrase> <termref def="key-vn">valid</termref> as defined by <specref ref="cvc-elt"/></p>
	  <p role="then"><pt>valid</pt></p>
	 </item>
	 <item>
	  <p role="otherwise">(the item was 
	    <phrase diff="add" dg="b5164">locally</phrase>
	    <termref def="key-vn">invalid</termref> as defined by <specref ref="cvc-elt"/>) <pt>invalid</pt>.</p>
	 </item>
       </olist>
       </propdef>
      </proplist>
     </constraintnote>

     <!--*
* material suppressed here by diff group vm3-1-abandoned *
*-->
     </div4>

     <div4 id="sec-sic-eltType" dg="b5165b">
      <head dg="b5165b">Element Validated by Type</head>
     <constraintnote type="sic" id="sic-eltType">
      <head>Element Validated by Type</head>
      <p>If<phrase dg="iff.144"> and only if</phrase> <phrase dg="b3054"><!--*
* material suppressed here by diff group b5072 *
*--> a
	<termref def="key-governing-type-elem"/> is known for</phrase> an element
       information item<!--*
* material suppressed here by diff group b3054 *
*-->, <phrase dg="iff">then</phrase> in the <termref def="key-psvi">post-schema-validation infoset</termref> the item <phrase dg="opt.144">has</phrase><!--*
* material suppressed here by diff group opt.144 *
*-->
       <!--*
* material suppressed here by diff group rq144nv *
*--><phrase dg="rq144nv">the properties</phrase>:</p>

      <proplist role="psvi" item="element">
       <propdef id="e-schema_normalized_value" name="schema normalized value">
      <!--*
* material suppressed here by diff group b2632 *
*-->
	 <olist role="Caseval" dg="b2632">
	 <item><p role="if"><!--*
* material suppressed here by diff group b5195 *
*--><phrase dg="b5195">the element information item is not <termref def="key-nilled"/></phrase> and either the
	   <termref def="key-governing-type-elem"/> is a simple type definition or its
	   <propref comp="ctd" prop="content type"/> has
	   <propref comp="ct" prop="variety"/> <pt>simple</pt></p>
	  <p role="then">
  <olist role="caseval">
	    <item><p role="if">
	      <clauseref ref="c-evc"/> of <specref ref="cvc-elt"/>
	      above has applied</p>
	     <p role="then">
    the <propref comp="vc_e" prop="lexical form"/> of the
    <propref comp="ed" prop="value constraint"/>
	     </p></item>
	    <item><p role="if">
    <clauseref ref="c-evc"/> of <specref ref="cvc-elt"/> above has
	      <emph>not</emph> applied and the the element's <!--*
* material suppressed here by diff group b3251i *
*--><phrase dg="b3251i"><termref def="key-iv">initial value</termref></phrase>
	      is <termref def="key-vn">valid</termref> with respect to the simple
	      type definition as defined by <specref ref="cvc-simple-type"/></p>
	     <p role="then">
	      the <termref def="key-nv">normalized value</termref> of the item as <termref def="key-vn">validated</termref>
	     </p></item>
	    <item><p role="otherwise">
	      <termref def="key-null">absent</termref>.
	     </p></item>
  </olist>
	  </p></item>
	 <item><p role="otherwise">
	   <termref def="key-null">absent</termref>.
	  </p></item>
</olist>
       </propdef>

       <propdef id="e-schema_actual_value" name="schema actual value" dg="b2505">
 If the <propref ref="e-schema_normalized_value" role="psvi"/> is not
	<termref def="key-null">absent</termref>, then the <phrase dg="b2632">corresponding </phrase><termref def="key-vv">actual value</termref>
	<!--*
* material suppressed here by diff group b2632 *
*-->; otherwise
	<termref def="key-null">absent</termref>.
       </propdef>

       <propdef id="e-type_definition" name="type definition" dg="rq144nv">An <termref def="key-iso">item isomorphic</termref> to
	the <phrase dg="b3714"><termref def="key-governing-type-elem"/></phrase> component
	itself.</propdef>
       <propdef id="e-type_definition_type" name="type definition type" dg="rq144nv">
	<pt>simple</pt> or <pt>complex</pt>, depending on the <!--*
* material suppressed here by diff group b6008 *
*--><phrase dg="b6008">
	 <propref ref="e-type_definition" role="psvi"/></phrase>.</propdef>
       <propdef id="e-type_definition_namespace" name="type definition namespace" dg="rq144nv"><!--*
* material suppressed here by diff group b6008 *
*-->
       <phrase dg="b6008"><propref ref="e-type_definition" role="psvi"/>.<xpropref role="anon">target namespace</xpropref>.</phrase></propdef>
       <propdef name="type definition anonymous" id="e-type_definition_anonymous" dg="rq144nv"><pt>true</pt>
	if <!--*
* material suppressed here by diff group b6008 *
*-->
  <phrase dg="b6008"><propref ref="e-type_definition" role="psvi"/>.<xpropref role="anon">name</xpropref></phrase>
  is <termref def="key-null">absent</termref>, otherwise
	<pt>false</pt>.</propdef>

       <propdef name="type definition name" id="e-type_definition_name" dg="rq144nv"><!--*
* material suppressed here by diff group b6008 *
*-->
  <phrase dg="b6008">If <propref ref="e-type_definition" role="psvi"/>.<xpropref role="anon">name</xpropref> is not <termref def="key-null">absent</termref>, then
  <propref ref="e-type_definition" role="psvi"/>.<xpropref role="anon">name</xpropref>, otherwise</phrase>
  schema processors <rfc2119>may</rfc2119>, but
	need not, provide a value unique to the definition. <phrase dg="f2f0701d"><phrase dg="f2f0701e">It
	  is <termref def="key-impl-defined">implementation-defined</termref> whether a processor provides a name for
	  such a type definition.  </phrase>If a processor does
	 provide a value in this situation, the choice of what value
	 to use is <termref def="key-impl-dep">implementation-dependent</termref><!--*
* material suppressed here by diff group f2f0701e *
*-->.</phrase>
       </propdef>

<!-- <propdef id="e-selected_type" name="selected type" diff="add" dg="cta">an
<termref def="key-iso">item isomorphic</termref> to the
&selected-type; of the element
</propdef> -->

       <propdef name="type fallback" id="e-type_fallback" dg="vm3-1">A keyword indicating whether the expected type
	definition was unavailable and the element had a fallback type
	as its <termref def="key-governing-type-elem"/>
<ulist>
	 <item>
	  <!--*
* material suppressed here by diff group vm3-1-abandoned *
*-->
	  <!--*
* material suppressed here by diff group vm3-1-abandoned *
*-->
	  <p dg="vm3-2">
<pt>declared</pt> if the element information item has a<!--*
* material suppressed here by diff group f2f0610 *
*--> <termref def="key-governing-ed"/> <phrase dg="cta">which has no <propref prop="type table" comp="ed"/>,</phrase>
	   and <phrase dg="f2f0610">also</phrase> an
	   <code>xsi:type</code> attribute<!--*
* material suppressed here by diff group f2f0610 *
*--> which fails to <!--*
* material suppressed here by diff group ep-rr *
*--><phrase dg="ep-rr"><termref def="cvc-resolve-instance">resolve</termref></phrase> to
	   a type definition that <termref def="key-overrides">overrides</termref> the
	   <phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/><!--*
* material suppressed here by diff group f2f0610 *
*-->
	  </p>
	 </item>
	 <item dg="cta-wrap">
	  <p><phrase dg="cta"> <pt>selected</pt> if the
	    element information item has a <termref def="key-governing-ed"/> with a
	    <propref prop="type table" comp="ed"/> and also has an <code>xsi:type</code>
	    attribute which fails to <!--*
* material suppressed here by diff group ep-rr *
*--><phrase dg="ep-rr"><termref def="cvc-resolve-instance">resolve</termref></phrase> to a type
	    definition that <termref def="key-overrides">overrides</termref> the <termref def="key-selected-type"/>
	   </phrase></p>
	 </item>
	 <item>
	  <p><pt>lax</pt> if <!--*
* material suppressed here by diff group f2f0610 *
*--> the
	   element was <termref def="key-lva">laxly assessed</termref>
	   using <!--*
* material suppressed here by diff group rq17 *
*--><termref def="key-anyType" dg="rq17"><phrase><code>xs:anyType</code></phrase></termref>
	  </p>
<!--* <note diff="add" dg="vm3-4">
<p>Working Group choice point:  keep or omit
<quote>the expected type definition was unavailable</quote>?</p>
</note> *-->
	 </item>
<!--* <item>
<p><pt>unconditional</pt> if the type conditionally assigned to
the element information item was unavailable, and
the element was instead assigned to its declared type
</p>
</item> *-->
	 <item>
	  <p><pt>none</pt> otherwise <!--*
* material suppressed here by diff group vm3-2 *
*--></p>
	 </item>
</ulist>
       </propdef>

       <propdef name="type alternative" id="e-type_alternative" dg="cta"><!--*
* material suppressed here by diff group cta-ta *
*-->
	       <phrase dg="cta-ta">If the element's <termref def="key-governing-ed"/> does not
	       have a <propref prop="type table" comp="ed"/>, then <termref def="key-null">absent</termref>; otherwise the first <!--*
* material suppressed here by diff group cta-ta *
*--><compref ref="tac" dg="cta-ta"/> that
	       <termref def="key-cta-ta-select">successfully selected</termref> the
	       element's <termref def="key-selected-type"/>, if any; otherwise the <propref prop="default type definition" comp="tt"/>.</phrase>
       </propdef>

       <propdef name="local type validity" id="e-local_type_validity" dg="vm3-1">
<olist role="Caseval">
	 <!--*
* material suppressed here by diff group vm3-2 *
*-->
	 <!--*
* material suppressed here by diff group vm3-2 *
*-->
	 <!--*
* material suppressed here by diff group vm3-2 *
*-->
	 <item dg="vm3-2">
	  <p role="if">the element information item was <phrase diff="add" dg="b5164">locally</phrase> <termref def="key-vn">valid</termref> as defined by
	   <specref ref="cvc-type"/></p>
	  <p role="then"><pt>valid</pt></p>
	 </item>
	 <item dg="vm3-2">
	  <p role="otherwise">(the item was <phrase diff="add" dg="b5164">locally</phrase>
	    <termref def="key-vn">invalid</termref> as defined by <specref ref="cvc-type"/>) <pt>invalid</pt>.</p>
	 </item>
</olist>
       </propdef>

       <propdef name="descendent validity" id="e-descendent_validity" dg="vm3-2">
 <olist role="Caseval">
	 <item>
	  <p role="if">
    neither its <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> nor its <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> contains an
	   information item <local>I</local> (element or attribute
	   respectively) where either <local>I</local>'s <propref ref="e-validity" role="psvi"/> is <pt>invalid</pt> or
	   <local>I</local> is <termref def="key-att-to">attributed</termref> to a strict <termref def="key-wp"/>
	   and <local>I</local>'s
    <propref ref="e-validity" role="psvi"/> is <pt>notKnown</pt>
	  </p>
	  <p role="then"><pt>valid</pt>;</p>
	 </item>
	 <item>
	  <p role="otherwise"><pt>invalid</pt>.</p>
	 </item>
 </olist>
       </propdef>
      </proplist>

      <!--*
* material suppressed here by diff group rq144nv *
*-->

      <!--*
* material suppressed here by diff group rq144nv *
*-->
      <!--*
* material suppressed here by diff group rq144nv *
*-->
      <!--*
* material suppressed here by diff group rq144nv *
*-->
      <!--*
* material suppressed here by diff group rq144nv *
*-->

      <note dg="rq144nv">
       <p>The <xpropref role="psviAnon">type definition
	 type</xpropref>, <xpropref role="psviAnon">type definition
	 namespace</xpropref>, <xpropref role="psviAnon">type
	 definition name</xpropref>, and <xpropref role="psviAnon">type definition anonymous</xpropref>
	properties are redundant with the <xpropref role="psviAnon">type definition</xpropref> property; they are
	defined for the convenience of implementations which wish to
	expose those specific properties but not the entire type
	definition.</p>
      </note>

      <note dg="b2748no"><p>
 When <clauseref ref="c-evc"/> of <specref ref="cvc-elt"/> above
	applies and the <phrase dg="f2f0701e">default or
	 fixed value constraint</phrase>
 <propref comp="vc_a" prop="value"/> <!--*
* material suppressed here by diff group f2f0701e *
*--> is of type <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#QName">QName</xtermref> or <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#NOTATION">NOTATION</xtermref>, <!--*
* material suppressed here by diff group f2f0701b *
*--> <phrase dg="f2f0701b">it is <termref def="key-impl-dep">implementation-dependent</termref> whether 
	 <termref def="term-ns-fixup"/> occurs</phrase><!--*
* material suppressed here by diff group f2f0701c *
*--><phrase dg="f2f0701c">;
	 if it does not, the prefix used in the lexical representation
	 <phrase dg="f2f0701d">(in <propref role="psvi" ref="e-schema_normalized_value"/>)</phrase> will not
	 necessarily map to the namespace name of the value<phrase dg="f2f0701d"> (in <propref role="psvi" ref="e-schema_actual_value"/>)</phrase></phrase>. <!--*
* material suppressed here by diff group f2f0701b *
*--> <phrase dg="f2f0701c">To reduce problems and confusion, users may
	 prefer to ensure that the required namespace information item
	 is <!--*
* material suppressed here by diff group f2f0701d *
*-->
	 <phrase dg="f2f0701d">present in the input
	  infoset.</phrase></phrase>
       </p></note>

      <p dg="b2333b">If <phrase dg="b2632">the
	<propref ref="e-schema_normalized_value" role="psvi"/> is not
	<termref def="key-null">absent</termref> and </phrase>the
       <phrase dg="b3714"><termref def="key-governing-type-elem"/></phrase> is
       a simple type definition<phrase dg="ep01"> with
	<propref comp="std" prop="variety"/> <pt>union</pt>,</phrase>
       or its <propref comp="ctd" prop="content type"/> <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01">has <propref comp="ct" prop="variety"/>
	<pt>simple</pt> and <propref comp="ct" prop="simple type   definition"/> a simple type definition with</phrase> <propref comp="std" prop="variety"/> <pt>union</pt>, then calling
       <termdef id="key-amt" term="actual member type definition" role="local"> that <phrase dg="b2333c"><!--*
* material suppressed here by diff group b2333a *
*--><phrase dg="b2333a"><xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-basicmember">basic
	   member</xtermref> of its <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-transitivemembership">transitive
	   membership</xtermref></phrase> which actually <termref def="key-vn">validated</termref></phrase><!--*
* material suppressed here by diff group b2333c *
*--> the <!--*
* material suppressed here by diff group b2632 *
*--> <phrase dg="b2632"><propref ref="e-schema_normalized_value" role="psvi"/></phrase> <!--* <phrase diff="add"
	dg="b2333c">was ultimately assigned</phrase> *--> the
	<term>actual member type definition</term></termdef>, there
       are <!--*
* material suppressed here by diff group rq144nv *
*--><phrase dg="rq144nv">four</phrase> additional
       properties:</p>


      <!--*
* material suppressed here by diff group b2333b *
*-->

      <proplist role="psvi" item="element">
       <propdef name="member type definition" id="e-member_type_definition" dg="rq144nv">An <termref def="key-iso">item
	 isomorphic</termref> to the <termref def="key-amt"/>
	<!--* that <xtermref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-basicmember">basic
	member</xtermref> of its <xtermref
	href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-transitivemembership">transitive
	membership</xtermref> which actually <termref
	def="key-vn">validated</termref> the element item's
	&norm-value;.*-->
       </propdef>

       <propdef name="member type definition namespace" id="e-member_type_definition_namespace">The <propref comp="std" prop="target namespace"/> of the <termref def="key-amt">actual member type
	 definition</termref>.</propdef>
       <propdef name="member type definition anonymous" id="e-member_type_definition_anonymous"><pt>true</pt> if the
	<propref comp="std" prop="name"/> of the <termref def="key-amt">actual member type definition</termref> is
	<termref def="key-null">absent</termref>, otherwise
	<pt>false</pt>.</propdef>
       <propdef name="member type definition name" id="e-member_type_definition_name">The <propref comp="std" prop="name"/> of the <termref def="key-amt">actual member
	 type definition</termref>, if it is not <termref def="key-null">absent</termref>.  If it is <termref def="key-null">absent</termref>, schema processors <rfc2119>may</rfc2119>, but
	need not, provide a value unique to the definition. <phrase dg="f2f0701d"><phrase dg="f2f0701e">It
	  is <termref def="key-impl-defined">implementation-defined</termref> whether a processor provides a name for
	  such a type definition.  </phrase>If a processor does
	 provide a value in this situation, the choice of what value
	 to use is <termref def="key-impl-dep">implementation-dependent</termref><!--*
* material suppressed here by diff group f2f0701e *
*-->.</phrase>
       </propdef>
      </proplist>
      <!--*
* material suppressed here by diff group b6009 *
*-->
       <p dg="b6009">The <propref ref="e-type_definition"/>
	property is provided for applications such as query
	processors which need access to the full range of details about
	an item's <termref def="key-va"/>, for
	example the type hierarchy; the <propref ref="e-type_definition_type"/>,
	<propref ref="e-type_definition_namespace"/>,
	<propref ref="e-type_definition_name"/>, and
	<propref ref="e-type_definition_anonymous"/> properties are defined
	for the convenience of those specifying
	lighter<phrase dg="b6009b">-</phrase>weight interfaces, in which
	exposing the entire type hierarchy and full component details
	might be a significant
	burden.</p>

      <p dg="b3837">
 If
 <olist role="andtest">
	<item><p>
   the <propref ref="e-schema_normalized_value" role="psvi"/> is not
	  <termref def="key-null">absent</termref>;
	 </p></item>
	<item><olist role="Ortest">
	  <item><p>
    the simple type <!--*
* material suppressed here by diff group f2f0610 *
*--> <phrase dg="f2f0610">definition</phrase> used to validate the
	    <termref def="key-nv">normalized value</termref> (either the <termref def="key-governing-type-elem"/> or its
	    <propref comp="ct" prop="simple type       definition"/>) has <propref comp="std" prop="variety"/>
	     <phrase dg="ep24">=</phrase> <pt>list</pt>;
	   </p></item>
	  <item><p>
    the simple type <!--*
* material suppressed here by diff group f2f0610 *
*--> <phrase dg="f2f0610">definition</phrase> has <propref comp="std" prop="variety"/> <phrase dg="ep24">=</phrase> <pt>union</pt> and the
	    <termref def="a-key-amt"/> has
    <propref comp="std" prop="variety"/> <phrase dg="ep24">=</phrase> <pt>list</pt>;
	   </p></item>
	 </olist></item>
	<item><p>
   the <propref comp="std" prop="item type definition"/> of the list
	  type (from the previous clause) has <propref comp="std" prop="variety"/> <phrase dg="ep24">=</phrase> <pt>union</pt>;
	 </p></item>
 </olist> then there is an additional property:
      </p>
      <proplist role="psvi" item="element" dg="b3837">
       <propdef name="member type definitions" id="e-member_type_definitions">
  a sequence of <compref ref="std"/> components, with the same length
	as the
  <propref ref="e-schema_actual_value" role="psvi"/>, each one an
	<termref def="key-iso">item isomorphic</termref> to the
	<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-basicmember">basic
	 member</xtermref> which actually <termref def="key-vn">validated</termref> the corresponding
	space-delimited substring in the <propref ref="e-schema_normalized_value" role="psvi"/>.
       </propdef>
      </proplist>

      <p>Also, if the declaration has a <propref comp="ed" prop="value  constraint"/>, the item has a property:</p>
      <proplist role="psvi" item="element">
       <propdef id="e-schema_default" name="schema default">The
	<!--*
* material suppressed here by diff group rq129 *
*--><phrase dg="rq129"><propref comp="vc_e" prop="lexical    form"/> of the </phrase>declaration's <propref comp="ed" prop="value constraint"/><!--*
* material suppressed here by diff group ep01 *
*--><!--*
* material suppressed here by diff group rq129 *
*-->.</propdef>
      </proplist>
      <p dg="vm3-1x">Note that if an element is <termref def="key-lva">laxly assessed</termref>, then the <propref ref="e-type_definition" role="psvi"/> and
<propref ref="e-member_type_definition" role="psvi"/> properties, or
       their alternatives, are based on <!--*
* material suppressed here by diff group rq17 *
*--><phrase dg="rq17"><termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref></phrase><!--* the
       <termref def="any-type-itself" diff="del" dg="rq17">ur-type
       definition</termref><termref def="any-type-itself" diff="add"
       dg="rq17">definition of anyType</termref> *-->.</p>
      <!--*
* material suppressed here by diff group b4159-1 *
*-->
      <!--*
* material suppressed here by diff group b4159-1 *
*-->
     </constraintnote>
     </div4>

     <div4 id="sec-sic-eltDefault" dg="b5165b">
      <head dg="b5165b">Element Default Value</head>
     <constraintnote type="sic" id="sic-eltDefault">
      <head>Element Default Value</head>
      <p>If<phrase dg="iff.144"> and only if</phrase> the local <termref def="key-vn">validity</termref>,
       as defined by <specref ref="cvc-elt"/> above, of an element
       information item has been assessed, in the <termref def="key-psvi">post-schema-validation infoset</termref> the item
       <phrase dg="opt.144">has</phrase><!--*
* material suppressed here by diff group opt.144 *
*--> a property:</p>
      <proplist role="psvi" item="element">
       <propdef id="e-schema_specified" name="schema specified">
	<olist role="Caseval"><item>
	  <p role="if"><!--*
* material suppressed here by diff group b2632 *
*--> <phrase dg="b2632"><clauseref ref="c-evc"/> of <specref ref="cvc-elt"/> above <!--*
* material suppressed here by diff group f2f0610 *
*--><phrase dg="f2f0610">applies</phrase></phrase></p>
	  <p role="then">
	   <pt>schema</pt>. <!--*
* material suppressed here by diff group b2632 *
*--></p></item>
	 <item>
	  <p role="otherwise"><pt>infoset</pt>.</p></item></olist></propdef></proplist>
      <!--*
* material suppressed here by diff group b2748yes *
*-->
      <!--*
* material suppressed here by diff group b2748yes *
*-->
     </constraintnote>

     <p dg="vm3-2">See also <specref ref="sic-match-info"/>,
      <specref ref="sic-key"/>, <specref ref="sic-notation-used"/>,
      and
      <specref ref="sic-schema"/>, which <!--*
* material suppressed here by diff group vm3-4 *
*--><phrase dg="vm3-4">describe other information set contributions
       related</phrase> to element information items. 
     </p>
     </div4>
     <div4 dg="b5003c" id="Inherited_attributes">
      <head>Inherited Attributes</head>
      <!--*
* material suppressed here by diff group b5003-en *
*-->
     <constraintnote type="sic" id="sic-inheritedAttrs">
      <head>Inherited Attributes</head>
      <p><termdef id="key-p-inherited" term="potentially inherited">An attribute
       information item <var>A</var>, whether explicitly specified in the input
       information set or defaulted as described in
       <specref ref="sic-attrDefault"/>, is <term>potentially inherited</term> by
       an element information item <var>E</var> if and only if
       <olist role="andtest">
        <item><p>
         <var>A</var> is among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> of one of <var>E</var>'s ancestors.
        </p></item>
        <item><p>
         <var>A</var> and <var>E</var> have the same
         <xpropref role="psviAnon">validation context</xpropref>.
        </p></item>
        <item><p><olist role="Ortest">
         <item><p>
          <var>A</var> is <termref def="key-att-to"/> an <compref ref="au"/> whose
          <propref comp="au" prop="inheritable"/> = <pt>true</pt>.
         </p></item>
         <item><p>
          <var>A</var> is <emph>not</emph> <termref def="key-att-to"/> any <compref ref="au"/>
          but <var>A</var> has a <termref def="key-governing-ad"/> whose
          <propref comp="ad" prop="inheritable"/> = <pt>true</pt>.
         </p></item>
        </olist></p></item>
       </olist>
      </termdef></p>

      <p>If and only if an element information item <var>P</var> is not
       <termref def="key-skipped"/> (that is, it is either
       <termref def="key-sva">strictly</termref> or
       <termref def="key-lva">laxly</termref> assessed), in the <termref def="key-psvi">post-schema-validation infoset</termref> each of
       <var>P</var>'s element information item <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> <var>E</var> which is not
       <termref def="key-att-to"/> a <pt>skip</pt> <compref ref="w"/>, has a
       property:</p>
      <proplist role="psvi" item="element">
       <propdef id="e-inherited_attributes" name="inherited attributes">
        A list of attribute information items. An attribute information item
        <var>A</var> is included if and only if <olist role="andtest">
         <item><p>
          <var>A</var> is <termref def="key-p-inherited"/> by <var>E</var>.
         </p></item>
         <item><p>
          Let <var>O</var> be <var>A</var>'s <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">owner element</xpropref>. <var>A</var> does not have the same <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref>
          as another attribute which is also <termref def="key-p-inherited"/> by <var>E</var>
          and whose <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">owner element</xpropref> is a descendant of <var>O</var>.
         </p></item>
        </olist>
       </propdef>
      </proplist>
     </constraintnote>
     </div4>
    </div3>
    <div3 id="coss-element">
     <head>Constraints on Element Declaration Schema Components</head>

     <p>All element declarations (see <specref ref="cElement_Declarations"/>) <rfc2119>must</rfc2119> satisfy the following
      constraint.</p>

     <div4 id="sec-e-props-correct" dg="b5165a">
      <head dg="b5165a">Element Declaration Properties Correct</head>

     <constraintnote type="cos" id="e-props-correct">
      <head>Element Declaration Properties Correct</head>
       <p dg="ep24">
	<phrase dg="ep24"><phrase dg="ep98">For 
	  any element declaration <var>E</var>,</phrase><!--*
* material suppressed here by diff group ep98 *
*--></phrase>
	<olist role="and">
	 <!--* !!! s/And.mxm/and.mxm/ for ep24, silently.  Revert if necessary *-->	 
	 <!--* !!! s/and.mxm/and.ixm/ for ep98 ... *-->	 
	 <item>
	  <p>The values of <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var>'s</phrase> properties 
	   <!--*
* material suppressed here by diff group ep24 *
*-->.
	   <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">are</phrase> as described in the property tableau in
	   <specref ref="Element_Declaration_details"/>, modulo the
	   impact of <specref ref="conformance-missing"/>.</p>
	 </item>
       <item>
	<p>If <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var> has a <termref def="key-null">non-absent</termref></phrase>
	   <propref comp="ed" prop="value constraint"/>,
	 <!--*
* material suppressed here by diff group rq129 *
*--><phrase dg="rq129"><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">then 
	     <var>E</var>.<propref comp="ed" prop="value constraint"/></phrase> 
	    is a valid default</phrase> with
	   respect to <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var>.<propref prop="type definition" comp="ed"/></phrase> 
	   as defined in <specref ref="cos-valid-default"/>.</p>
	 </item>
	 <item>
	  <p>If <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var>.<!--*
* material suppressed here by diff group b2834 *
*--><phrase dg="b2834"><propref comp="ed" prop="substitution group affiliations"/></phrase> is 
	    non-empty</phrase>, then 
	   <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">
	    <var>E</var>.<propref comp="ed" prop="scope"/>.<propref prop="variety" comp="sc_e"/> 
	    = <pt>global</pt></phrase>.</p>
	 </item>
       <item id="c-vs-sg">
	<!--*
* material suppressed here by diff group ep24 *
*-->
	<p dg="ep24">For each member <var>M</var> of <var>E</var>.<!--*
* material suppressed here by diff group b2834 *
*--><phrase dg="b2834"><propref comp="ed" prop="substitution group affiliations"/></phrase>,
	  <var>E</var>.<propref prop="type definition" comp="ed"/> 
	  is <termref def="key-val-sub-type"/> for <var>M</var>.<propref prop="type definition" comp="ed"/>, 
	  subject to the blocking keywords 
	  in <var>M</var>.<propref comp="ed" prop="substitution group exclusions"/>.
	 </p>
       </item>
       <!--*
* material suppressed here by diff group b4517 *
*-->
	 <item>
	  <p><!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">There are no circular substitution groups.
	   </phrase> That is, it <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is not</phrase> possible to return to 
	   <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var></phrase> 
	   by repeatedly following <phrase dg="b2834">any member of</phrase> the
	   <!--*
* material suppressed here by diff group b2834 *
*--><phrase dg="b2834"><propref comp="ed" prop="substitution group affiliations"/></phrase> property.</p>
	 </item>
	 <item dg="b4419">
	  <!--* 4419 adopted, cta-ta-2 adopted, this is dead text in a live item. *-->
	  <!--*
* material suppressed here by diff group cta-ta-2 *
*-->	
	  <!--* 4419 adopted, cta-ta-2 adopted, the following is live text. *-->
	  <p dg="cta-ta-2">If <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var>.<propref prop="type table" comp="ed"/> exists</phrase>, 
	   then 
	   for each <compref ref="tac"/> in <!--*
* material suppressed here by diff group ep24 *
*-->
	   <phrase dg="ep24"><var>E</var>.<propref prop="type table" comp="ed"/>.</phrase><propref prop="alternatives" comp="tt"/>,
	   the <propref prop="test" comp="tac"/> property is not <termref def="key-null">absent</termref>.
	  </p>
	 </item>
	 <item dg="cta-wrap">
	  <!--* cta-wrap adopted, this is live text *-->
	  <p><phrase dg="cta">If <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var>.<propref prop="type table" comp="ed"/> exists</phrase>, 
	    then for each <!--*
* material suppressed here by diff group cta-ta *
*--><propref prop="type definition" comp="tac" dg="cta-ta"/> <var>T</var> in <!--*
* material suppressed here by diff group ep24 *
*-->
	    <phrase dg="ep24"><var>E</var>.<propref prop="type table" comp="ed"/>.</phrase><propref prop="alternatives" comp="tt"/>, and also for <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">
	     <var>E</var>.<propref prop="type table" comp="ed"/>.<propref prop="default type definition" comp="tt"/>.<propref prop="type definition" comp="tac"/></phrase>,
	   </phrase><olist role="ortest">
	    <item><p><phrase dg="cta"><var>T</var> is
	       <termref def="key-val-sub-type"/> for <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var>.<propref prop="type definition" comp="ed"/></phrase>, subject
	       to the blocking keywords of <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var>.<propref comp="ed" prop="disallowed substitutions"/></phrase>.</phrase></p></item>
	    <item><p><phrase dg="cta-error"><var>T</var> is the type
	       <termref def="key-error"><phrase><code>xs:error</code></phrase></termref>.</phrase></p></item>
	   </olist>
	  </p>
	 </item>
	</olist>
       </p>
     </constraintnote>
     </div4>
     
      <!--*
* material suppressed here by diff group b5165a-dummy *
*-->
      <!--*
* material suppressed here by diff group b4419-en *
*-->
     <!-- wg2070803: changed the following from b4419-4 to b4419-en, so that
          it's not included in the SQ. -->
     <!--*
* material suppressed here by diff group b4419-en *
*-->

     
     
      <!--*
* material suppressed here by diff group b5165a-dummy *
*-->

      <!--*
* material suppressed here by diff group cta-cp *
*-->
      <!--*
* material suppressed here by diff group cta-cp *
*-->

     <!--*
* material suppressed here by diff group cta-cp *
*-->

     

     <div4 id="sec-cos-valid-default" dg="b5165a">
      <head dg="b5165a">Element Default Valid (Immediate)</head>

     <p><!--*
* material suppressed here by diff group b5165c *
*-->
       <phrase dg="b5165c">This and the following sections</phrase>
       define relations appealed to
       elsewhere in this specification.</p>
     <constraintnote id="cos-valid-default" type="cos">
      <head>Element Default Valid (Immediate)</head>
      <p><phrase dg="ep98">For a</phrase><!--*
* material suppressed here by diff group ep98 *
*--> 
	<!--*
* material suppressed here by diff group rq129 *
*--><phrase dg="rq129"><compref ref="vc_e"/></phrase> 
	<phrase dg="ep22"><var>V</var></phrase>
	<phrase dg="ep98">to be</phrase><!--*
* material suppressed here by diff group ep98 *
*--> a
	valid default with respect to a type definition <phrase dg="ep22"><var>T</var></phrase>
	<!--*
* material suppressed here by diff group ep98 *
*-->
	<olist role="case" dg="ep98">
	 <item>
	  <p role="if"><!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>T</var></phrase> is a simple type
	   definition<phrase dg="rq129"> or a complex type
	    definition <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">with
	     <propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/> = <pt>simple</pt></phrase></phrase>
	  </p>
	  <p role="then">
	   <!--*
* material suppressed here by diff group rq129 *
*--><phrase dg="rq129"><!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>V</var></phrase> is a valid default
	    with respect <phrase dg="ep24">either</phrase>
	    to <phrase dg="ep24"><var>T</var> (if <var>T</var> is simple) or 
	     (if <var>T</var> is complex) to</phrase>
	    <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">
	     <var>T</var>.</phrase><propref comp="ctd" prop="content type"/><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="ct" prop="simple type definition"/>
	    as defined by <specref ref="cos-valid-simple-default"/>.</phrase>
	  </p>
	 </item>
	 <item>
	 <p role="if"><!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>T</var></phrase> is a complex type definition
	  <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">with <propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/> 
	    ≠ <pt>simple</pt></phrase>
	  </p>
	  <p role="then">
       <olist role="andtest">
	   <item>
	    <p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>T</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/> = <pt>mixed</pt></phrase>.</p>
	   </item>
	   <item>
	    <!--*
* material suppressed here by diff group rq129 *
*-->
	     <p dg="rq129"><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">The particle <var>T</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="particle"/></phrase>
	      <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> <termref def="cd-emptiable">emptiable</termref>
	      as defined by <specref ref="cos-group-emptiable"/>.</p>
	    </item>
	   </olist>
	 </p>
	</item>
	</olist>
	<!--*
* material suppressed here by diff group ep98aux *
*-->
      </p>
     </constraintnote>
     </div4>

     <div4 id="sec-cos-equiv-derived-ok-rec" dg="b5165a">
      <head dg="b5165a">Substitution Group OK (Transitive)</head>

     <constraintnote id="cos-equiv-derived-ok-rec" type="cos">
      <head>Substitution Group OK (Transitive)</head>
      <p>For an element declaration (call it <!--*
* material suppressed here by diff group b5282 *
*--><local dg="b5282">M</local><phrase dg="b5282">,
       for member</phrase>) to be
       <!--*
* material suppressed here by diff group b4337 *
*--> substitutable
       for another element declaration (call it <!--*
* material suppressed here by diff group b5282 *
*--><local dg="b5282">H</local><phrase dg="b5282">,
       for head</phrase>)<!--*
* material suppressed here by diff group b5282 *
*-->
	<phrase dg="b5150b">at least</phrase>
    <olist role="or">
	<item>
	 <p><!--*
* material suppressed here by diff group b5282 *
*--><local dg="b5282">M</local> and <!--*
* material suppressed here by diff group b5282 *
*--><local dg="b5282">H</local> are the same element
	  declaration.</p>
	</item>
	<item>
	 <olist role="Andtest">
	  <item>
	   <p><!--*
* material suppressed here by diff group b5282 *
*-->
	    <phrase dg="b5282"><local>H</local><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase>
	    <propref comp="ed" prop="disallowed substitutions"/></phrase> does not contain
	    <pt>substitution</pt>.</p>
	  </item>
	  <item>
	   <p>There is a chain of <!--*
* material suppressed here by diff group b2834 *
*--><phrase dg="b2834"><propref comp="ed" prop="substitution group affiliations"/></phrase><phrase dg="ep24">
	      propertie</phrase>s from
	    <!--*
* material suppressed here by diff group b5282 *
*--><local dg="b5282">M</local> to <!--*
* material suppressed here by diff group b5282 *
*--><local dg="b5282">H</local>, that is, either
	    <!--*
* material suppressed here by diff group b5282 *
*--><local dg="b5282">M</local><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><!--*
* material suppressed here by diff group b2834 *
*--><phrase dg="b2834"><propref comp="ed" prop="substitution group affiliations"/></phrase> <!--*
* material suppressed here by diff group b2834 *
*--><phrase dg="b2834">contains</phrase> <!--*
* material suppressed here by diff group b5282 *
*--><local dg="b5282">H</local>, or
	    <!--*
* material suppressed here by diff group b5282 *
*--><local dg="b5282">M</local><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><!--*
* material suppressed here by diff group b2834 *
*--><phrase dg="b2834"><propref comp="ed" prop="substitution group affiliations"/></phrase><!--*
* material suppressed here by diff group b2834 *
*--> <phrase dg="b2834">contains a declaration whose <propref comp="ed" prop="substitution group affiliations"/>
	     contains</phrase> <!--*
* material suppressed here by diff group b5282 *
*--><local dg="b5282">H</local>, or . . .</p>
	  </item>
	  <item>
	    <p>The set of all 
	     <propref comp="ctd" prop="derivation method"/>s involved in 
	     the <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derivation</termref> of <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>M</var>.<propref prop="type definition" comp="ed"/> from
	      <var>H</var>.<propref prop="type definition" comp="ed"/></phrase> does not
	     intersect with the union of 
	     <phrase dg="ep24">(1)</phrase>
	     <!--*
* material suppressed here by diff group b5282 *
*--><phrase dg="b5282"><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>H</var>.<propref comp="ed" prop="disallowed substitutions"/>,</phrase></phrase> 
	     <phrase dg="ep24">(2)</phrase>
	     <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>H</var>.<propref prop="type definition" comp="ed"/>.</phrase><propref comp="ctd" prop="prohibited substitutions"/> 
	      (if <!--*
* material suppressed here by diff group b5282 *
*--><local dg="b5282">H</local><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.<propref prop="type definition" comp="ed"/></phrase> is complex, otherwise
	      the empty set)<phrase dg="ep24">,</phrase> 
	     and 
	     <phrase dg="ep24">(3)</phrase>
	     the
	     <propref comp="ctd" prop="prohibited substitutions"/>
	     (respectively the empty set) of any intermediate
	     <phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/>s
	     in the <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derivation</termref> of <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>M</var>.<propref prop="type definition" comp="ed"/> from
	       <var>H</var>.<propref prop="type definition" comp="ed"/></phrase>.</p>
	   </item>
	 </olist>
	</item>
    </olist>
    
      </p>
     </constraintnote>

     </div4>
     <div4 id="sec-cos-equiv-class" dg="b5165a">
      <head dg="b5165a">Substitution Group</head>

     <p dg="ww-p"><termdef id="key-validly-sub" term="substitutable">One element declaration is <term><!--*
* material suppressed here by diff group b4337 *
*--> substitutable</term>
       for another if together they satisfy constraint <specref ref="cos-equiv-derived-ok-rec"/>.</termdef> </p>

     <p dg="b4337"><termdef id="key-eq" term="substitution        group"> Every element declaration (call this
       <local>HEAD</local>) in the <propref comp="s" prop="element  declarations"/> of a schema defines a <term>substitution
	group</term>, a subset of those <propref comp="s" prop="element declarations"/>. An element declaration is in
       the <term>substitution group</term> of <local>HEAD</local> if
       and only if it is <termref def="key-validly-sub"/> for
       <local>HEAD</local>. </termdef></p>

     <!--*
* material suppressed here by diff group b4337 *
*-->
     </div4>
    </div3>
   </div2>
   <div2 id="Complex_Type_Definitions">
    <head>Complex Type Definitions</head>
<p>Complex Type Definitions provide for:</p>
<ulist>
     <item><p>Constraining element information items by providing <specref ref="Attribute_Declaration"/>s governing the appearance and content of
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref></p></item>
     <item><p>Constraining element information item <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> to be empty,
or to conform to a specified element-only or mixed content model, or else
constraining the character information item <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> to conform to a
specified simple type definition.</p></item>
     <item dg="b2861cc-1"><p>Constraining <!--*
* material suppressed here by diff group b2861cc-1a *
*-->
elements and attributes <phrase dg="b2861cc-1a">to exist,
not to exist, or to have specified values,</phrase> with <specref ref="Assertion"/>s.</p></item>
     <item><p>Using the mechanisms of <specref ref="Type_Derivation"/> to <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derive</termref> a complex type from another simple or complex type.</p></item>
     <item>
<p>Specifying <termref def="gloss-sic">post-schema-validation infoset contributions</termref> for elements. </p>
</item>
     <item><p>Limiting the ability to <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derive</termref> additional types from a given complex type.</p></item>
     <item><p>Controlling the permission to substitute, in an instance, elements of a <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref>
type for elements declared in a content model to be of a given complex type.</p></item>
</ulist>
<!--* <issue id="RQ-36i" role="1.1">
< ! - - *
<p>
<loc href="&reqs;#wildcards" target="reqs"
>RQ-7 (wildcards)</loc>,
<loc href="&reqs;#local-references" target="reqs"
>RQ-36 (local-references)</loc>, 
<loc href="&reqs;#ElementDeclarationsConsistent" target="reqs"
>RQ-146 (ElementDeclarationsConsistent)</loc></p>
* - - >
<p>
<loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=2857" target="reqs"
>Issue 2857 (RQ-7 wildcards)</loc>,
<loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=2860" target="reqs"
>Issue 2860 (RQ-36 local references)</loc>, 
<loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=2544" target="reqs"
>Issue 2544 (RQ-146 element declarations consistent)</loc></p>

  <p>Although extremely useful, wildcards have proved to interact in
unfortunate ways with the Unique Particle Attribution and Element Declarations
Consistent constraints, and this has limited their utility, particularly for
use in allowing for extension and anticipating subsequent versions.  The
interpretation of wildcards will be changed to address these problems, without
compromising backward compatibility.</p>
< ! - - *
  <resolution><p>As part of an overall reworking of the interpretation of local
declarations and of the Unique Particle Attribution and Element Declarations
Consistent constraints, we will change the interpretation of wildcards to
allow them to reference local declarations and subordinate them to explicit
declarations, thereby fixing the main conflicts.</p>
   <p>The so-called <loc href="http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2004Apr/0091.html">landscape summary</loc> (W3C-member-only link) covers
this along with related issues.</p>
  </resolution>
* - - >
	  </issue> *-->
<note role="example">
 <eg xml:space="preserve">&lt;xs:complexType name="PurchaseOrderType"&gt;
  &lt;xs:sequence&gt;
   &lt;xs:element name="shipTo" type="USAddress"/&gt;
   &lt;xs:element name="billTo" type="USAddress"/&gt;
   &lt;xs:element ref="comment" minOccurs="0"/&gt;
   &lt;xs:element name="items"  type="Items"/&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="orderDate" type="xs:date"/&gt;
 &lt;/xs:complexType&gt;
</eg>
 <p>The XML representation of a complex type definition.</p>
</note>
<div3 id="Complex_Type_Definition_details">
 <head>The Complex Type Definition Schema Component</head>
 <p>A complex type definition schema component has the following
properties:</p>

<compdef name="Complex Type Definition" abbrev="ctd" showAKO="true"/>
<!--*
* material suppressed here by diff group ep01-part1 *
*-->
<microCompdef name="Content Type" abbrev="ct" dg="ep01"/>
<microCompdef name="Open Content" abbrev="oc" dg="vm13"/>

<!--* <issue id="RQ-131i" role="1.1" diff="del" dg="bannotations">
< ! - - * <p>
<loc href="&reqs;#scd-ordering-annotation" target="reqs"
>RQ-131 (scd-ordering-annotation)</loc>, 
<loc href="&reqs;#scd-lost-annotation" target="reqs"
>RQ-130 (scd-lost-annotation)</loc>, 
<loc href="&reqs;#annotation-psvi" target="reqs"
>RQ-19 (annotation-psvi)</loc></p>
* - - >
<p>
<loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=2841" target="reqs"
>Issue 2841 (RQ-131 ordering of annotations)</loc>, 
<loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=2840" target="reqs"
>Issue 2840 (RQ-130 lost annotations)</loc>, 
<loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=2851" target="reqs"
>Issue 2851 (RQ-19 annotations in PSVI)</loc></p>
<p>Version 1.0 was inconsistent in providing for multiple sources of
annotation, particularly where components corresponded to multiple nested
elements in schema documents (e.g. Complex Type Definitions <emph>vis a
vis</emph> <code>xs:complexType</code>, <code>xs:complexContent</code> and
<code>xs:restriction</code>).  This will change so that all components can have
multiple annotations, and annotations will be handled consistently across all
kinds of components.</p>
<p>Also applies anywhere else {annotations}
plural appears &mdash; everywhere, in fact.</p>
<resolution>
<olist>
<item>
<p>All components have an {annotations} property;</p>
</item>
<item>
<p>It contains a sequence of annotations;</p>
</item>
<item>
<p>Namely all annotations "scoped" by this component, but not "scoped"
by any other component "further down".</p>
</item>
<item>
<p>The order of annotations within {annotations} is
implementation-determined.</p>
</item>
</olist>
<p>Note that when point 3 above mentions "annotations 'scoped' by . . ."
this means &lt;annotation> elements <emph>and</emph> out-of-band attributes.</p>
<p>[<loc
href="http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2004Mar/0169.html">Agendum 
4.1 SCD-related requirements</loc> (W3C-member-only link)]</p>
</resolution>
</issue> *-->

<p>Complex type definitions are identified by their <propref comp="ctd" prop="name"/> and <propref comp="ctd" prop="target namespace"/>.  Except
for anonymous complex type definitions (those with no <propref comp="ctd" prop="name"/>), since
type definitions (i.e. both simple and complex type definitions taken together) <rfc2119>must</rfc2119> be uniquely identified within an <!--*
* material suppressed here by diff group b4399 *
*--><termref def="key-schema" dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--> schema</termref>, no complex type definition can have the same name as another
simple or complex type definition.  Complex type <propref comp="ctd" prop="name"/>s and <propref comp="ctd" prop="target namespace"/>s
are provided for reference from
instances (see <specref ref="xsi_type"/>), and for use in the XML
representation of schema components
(specifically in <eltref ref="element"/>).  See <specref ref="composition-schemaImport"/> for the use of component
identifiers when importing one schema into another.</p>
<note>
<p>The <propref comp="ctd" prop="name"/> of a complex type is not <emph>ipso
facto</emph> the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">(local) name</xpropref> of the
  element information items <termref def="key-vn">validated</termref> by that definition. The connection between a
  name and a type definition is described in <specref ref="cElement_Declarations"/>. </p>
</note>
   <p>As described in <specref ref="Type_Derivation"/>, each complex type is <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> from a
<propref comp="ctd" prop="base type definition"/> which is itself either a <specref ref="Simple_Type_Definition"/> or a <specref ref="Complex_Type_Definition"/>.  <propref comp="ctd" prop="derivation method"/> specifies the means of <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derivation</termref> as either <pt>extension</pt> or <pt>restriction</pt> (see <specref ref="Type_Derivation"/>).</p>

<p>A complex type with an empty specification for <propref comp="ctd" prop="final"/> can be used as a
<propref comp="ctd" prop="base type definition"/> for other types <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> by either of
extension or restriction; the explicit values <pt>extension</pt>, and <pt>restriction</pt> prevent further
<!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derivations</termref> by extension and restriction respectively.  If all values are specified, then <termdef id="key-ct-final" term="final">the complex type is said to be
<term>final</term>, because no
further <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derivations</termref> are possible</termdef>.  Finality is <emph>not</emph>
inherited, that is, a type definition <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> by restriction from a type
definition which is final for extension is not itself, in the absence of any
explicit <code>final</code> attribute of its own, final for anything.</p>
<p dg="context-2338">The <propref comp="ctd" prop="context"/> property is only relevant for anonymous type
definitions, for which its value is the component in which this type
definition appears as the value of a property, e.g.
<propref prop="type definition" comp="ed"/>.</p>
<p>Complex types for which <propref comp="ctd" prop="abstract"/> is
<pt>true</pt> <!--*
* material suppressed here by diff group cta-ed *
*--><phrase dg="cta-ed">have
no valid instances and thus cannot be used in the normal way as 
the <propref prop="type definition" comp="ed"/> for the <termref def="key-vn">validation</termref> 
of element information items (if for some reason an abstract
type is identified as the <termref def="key-governing-type-elem"/> of an element
information item, the item will invariably be invalid)</phrase>.  It
follows that <!--*
* material suppressed here by diff group cta-ed *
*--><phrase dg="cta-ed">such
abstract types</phrase> <rfc2119>must not</rfc2119> be referenced from an
<specref ref="xsi_type"/> attribute in an instance document.  Abstract
complex types can be used as <propref comp="ctd" prop="base type definition"/>s, or even as
the <phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/>s of element declarations, provided in every
case a concrete <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> type definition is used for <termref def="key-vn">validation</termref>, either via <specref ref="xsi_type"/> or the operation of a <!--*
* material suppressed here by diff group b4337 *
*--><termref def="key-eq" dg="b4337"/>.</p>


<p><propref comp="ctd" prop="attribute uses"/> are a set of attribute uses.  See <specref ref="cvc-complex-type"/>
and <specref ref="cvc-attribute"/> for details of attribute <termref def="key-vn">validation</termref>.</p>
<p><propref comp="ctd" prop="attribute wildcard"/>s provide a more flexible specification for <termref def="key-vn">validation</termref> of
attributes not explicitly included in <propref comp="ctd" prop="attribute uses"/>.
<!--*
* material suppressed here by diff group b2867-1 *
*-->
<!--*
* material suppressed here by diff group b2867-1 *
*-->
See <specref ref="cvc-complex-type"/><phrase dg="b2867-1">, <specref ref="Wildcard_details"/></phrase> and
<!--*
* material suppressed here by diff group b2867-1 *
*--><phrase dg="b2867-1"><specref ref="cvc-wildcard-name"/></phrase> for formal
details of attribute wildcard <termref def="key-vn">validation</termref>. </p>
<p><propref comp="ctd" prop="content type"/> determines the <termref def="key-vn">validation</termref> of <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of element information items.  Informally:
<ulist>
<item>
<p>A <propref comp="ctd" prop="content type"/> with <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01"><propref comp="ct" prop="variety"/></phrase> <pt>empty</pt> <termref def="key-vn">validates</termref> elements
with no character or element information item <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>.</p>
</item>
<item>
<p>A <propref comp="ctd" prop="content type"/> <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01">with <propref comp="ct" prop="variety"/> <pt>simple</pt></phrase> <termref def="key-vn">validates</termref>
elements with character-only <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref><phrase dg="ep01">using its <propref comp="ct" prop="simple type definition"/></phrase>.</p>
</item>
<item>
<p>A<!--*
* material suppressed here by diff group ep01 *
*--> <propref comp="ctd" prop="content type"/><phrase dg="ep01"> with <propref comp="ct" prop="variety"/> <pt>element-only</pt></phrase> <termref def="key-vn">validates</termref> elements with <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> that
conform to the <!--*
* material suppressed here by diff group ep01 *
*--><termref def="key-contentModel">content model</termref><phrase dg="ep01"> supplied by its <propref comp="ct" prop="particle"/></phrase>.</p>
</item>
<item>
<p>A<!--*
* material suppressed here by diff group ep01 *
*--> <propref comp="ctd" prop="content type"/><phrase dg="ep01"> with <propref comp="ct" prop="variety"/> <pt>mixed</pt></phrase> <termref def="key-vn">validates</termref> elements whose element <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> (i.e. specifically ignoring other <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> such as character information items)
conform to the <!--*
* material suppressed here by diff group ep01 *
*--><termref def="key-contentModel">content model</termref><phrase dg="ep01"> supplied by its <propref comp="ct" prop="particle"/></phrase>.</p>
</item>
<item dg="vm13"><p>
 A <propref comp="ctd" prop="content type"/> with <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals"><termref def="key-null">non-absent</termref></phrase>

 <propref comp="ct" prop="open content"/> <termref def="key-vn">validates</termref>
 elements with some <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> conforming to the
 <termref def="key-contentModel">content model</termref>
 <!--*
* material suppressed here by diff group vm13-2 *
*--><phrase dg="vm13-2">and</phrase>
 others <phrase dg="vm13-2">conforming</phrase> to
 the <propref comp="ct" prop="open content"/>.
</p></item>
</ulist>
</p>

     <note dg="b5286d.b5152-move">
      <p id="xr.ctd.n5p" dg="b5152-movement">
       Not all combinations of <propref comp="ctd" prop="derivation method"/> and <propref comp="ctd" prop="content type"/>
       are compatible with all properties of the <propref comp="ctd" prop="base type definition"/>.  For example,
       it is not allowed to derive a complex type with complex content
       from a simple type. 
       The XML mapping rules <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152">specified in the following
       section</phrase> 
       (in particular <!--*
* material suppressed here by diff group b6163 *
*--> <clauseref ref="c-ctsc-bad"/>
       <phrase dg="b5152">of the rule for 
	the 
	<propref comp="ct" prop="simple type definition"/>
	in the rule for 
	<propref comp="ctd" prop="content type"/>
	of complex types with simple content</phrase>, <phrase dg="b5152">and</phrase>
       <clauseref ref="c-ctr"/> 
       and 
       <clauseref ref="c-ctes"/>
       <phrase dg="b5152">of the rule for 
	<propref comp="ctd" prop="content type"/>
       for complex types with complex content</phrase>)
       do not detect such incompatible combinations of properties;
       in such cases the mapping rules will build a complex type
       regardless of the fact that the properties specified are
       incompatible.  But the resulting complex type does
       not satisfy component rules outlined in <specref ref="cos-ct-extends"/>
       or <specref ref="derivation-ok-restriction"/>.       
     </p></note>

<!--*
* material suppressed here by diff group b3892b *
*-->

<p dg="b3892b"><phrase id="anchor6382"/>
The <propref comp="ctd" prop="prohibited substitutions"/> property of a complex type definition <var>T</var> determines
whether type definitions derived from <var>T</var> are or are not
<termref def="key-val-sub-type"/> for <var>T</var>.  Examples include (but are not limited
to) the substitution of another type definition:
      <ulist>
       <item>
	<p>as the <termref def="key-governing-type-elem"/> of an element instance <var>E</var>,
	 when <var>T</var> is the <termref def="key-selected-type"/> of <var>E</var> 
	 (often, the <phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/> of <var>E</var>'s
	 <termref def="key-governing-ed"/>); this can occur when <var>E</var> specifies a type
	 definition using the <code>xsi:type</code> attribute; 
	 see <specref ref="xsi_type"/>;
	</p>
       </item>
       <item>
	<p>as the <termref def="key-selected-type"/> of an element instance <var>E</var>,
	 when <var>T</var> is the <phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/> of <var>E</var>'s
	 <termref def="key-governing-ed"/>; this can occur when conditional type
	 assignment is used; 
	 see <specref ref="cTypeAlternative"/>;
	</p>
       </item>
       <item>
	<p>as the <termref def="key-governing-type-elem"/> of element instances
	 whose <termref def="key-governing-ed"/> is included in a model group only 
	 <termref def="key-impl-cont">implicitly</termref>,
	 by virtue of being included in the
	 <termref def="key-eq">substitution group</termref> of
	 some element declaration present <termref def="key-contain-dpt">directly</termref>
	 <termref def="key-contain-ipx">indirectly</termref>
	 in the model group, whose <phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/> is <var>T</var>.
	</p>
       </item>
       <item dg="b6382"><p>
        as the <propref comp="ed" prop="type definition"/> of an
        <compref ref="ed"/> <var>E1</var> where <ulist>
         <item><p>
          <var>E1</var> is contained in a <compref ref="ctd"/> <var>D</var>
         </p></item>
         <item><p>
          <var>D</var> is derived from another <compref ref="ctd"/> <var>B</var>
         </p></item>
         <item><p>
          <var>B</var> contains an <compref ref="ed"/> <var>E2</var> that has the same
          <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> as <var>E1</var>
         </p></item>
         <item><p>
          <var>E2</var> has <var>T</var> as its <propref comp="ed" prop="type definition"/>.
         </p></item>
        </ulist>
       </p></item>
      </ulist>
If <propref comp="ctd" prop="prohibited substitutions"/> is empty,
then all such substitutions are allowed;
if it contains the keyword <pt>restriction</pt>, then no type definition is
<termref def="key-val-sub-type"/> for <var>T</var> if its derivation from <var>T</var> involves
any restriction steps;
if <propref comp="ctd" prop="prohibited substitutions"/> contains 
the keyword <pt>extension</pt>, then no type definition is
<termref def="key-val-sub-type"/> for <var>T</var> if its derivation from <var>T</var> involves
any extension steps.</p>
<ednote role="pf" dg="b6382"><edtext>
In version 1.0 of this specification, <propref comp="ctd" prop="prohibited substitutions"/>
of a <compref ref="ctd"/> is only used when type substitution
(<code>xsi:type</code>) or element substitution (substitution groups) appear in
the instance document. It has been changed to take effect whenever complex type
derivation is checked, including cases beyond type and element substitutions in
instance documents. In particular, it affects
<clauseref ref="c-vs-sg"/> of <specref ref="e-props-correct"/>,
<!--*
* material suppressed here by diff group b6561c *
*--><clauseref ref="cta-substitutable-restriction"/> of <specref ref="vr-cta-substitutable"/>,
<clauseref ref="c-vs-ctd-e"/> of <specref ref="cos-ct-extends"/>,
<clauseref ref="c-vs-ctd-r"/> of <specref ref="derivation-ok-restriction"/>,
and <clauseref ref="c-vs-ct"/> of <specref ref="cos-content-act-restrict"/>.
Because of the consideration of <propref comp="ctd" prop="prohibited substitutions"/>,
existing schemas may be rendered invalid by the above rules. The XML Schema Working Group
solicits input from implementors and users of this specification as to whether
this change is desirable and acceptable.
</edtext></ednote>
 
 <p dg="b2861cc-1"><propref comp="ctd" prop="assertions"/> constrain 
<!--*
* material suppressed here by diff group b2861cc-1a *
*--> 
elements and attributes
<phrase dg="b2861cc-1a">to exist, not to exist, or to 
have specified values</phrase>.
Though specified as a sequence, the order
among the assertions is not significant during assessment.
See <specref ref="cAssertions"/>.</p>
 <p>See <specref ref="cAnnotations"/> for information on the role of the
<propref comp="ctd" prop="annotations"/> property.</p>
</div3>

    <div3 id="declare-type">
     <head><phrase dg="b5159b">XML Representation of Complex Type Definition<phrase dg="b5156"> Schema Component</phrase>s</phrase><!--*
* material suppressed here by diff group b5159b *
*--></head>

     <p>The XML representation for a complex type definition schema component is a
      <eltref ref="complexType"/> element information item.</p>

     <p>The XML representation for complex type definitions with a
      <!--*
* material suppressed here by diff group ep01 *
*--><propref comp="ctd" prop="content type"/> <phrase dg="ep01">with <propref comp="ct" prop="variety"/>
       <pt>simple</pt></phrase> is significantly different from that
      of those with other <propref comp="ctd" prop="content        type"/>s, and this is reflected in the presentation below,
      which <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152">describes
       the mappings for the two cases in separate subsections.
       Common mapping rules are factored out and given in 
       separate sections</phrase>.</p>

<!--*
* material suppressed here by diff group b5152-movement *
*-->

     <reprdef dg="b5152-movement">
      <reprelt id="xr.ct0" dg="b5152-movement" eltname="complexType" type="complexType"/>
     </reprdef>

     <note dg="b5152-movement">
      <!--* don't just move this paragraph, wrap it in a Note *-->
      <p id="xr.ctd.n6" dg="b5152-movement">
       <!--*
* material suppressed here by diff group b5194 *
*--><phrase dg="b5194">It is
	a consequence of the concrete syntax given above</phrase> that
       a <phrase dg="b5194">top-level</phrase>
       type definition need consist of no more than a name, i.e. that
       <code>&lt;complexType name="anyThing"/&gt;</code> is allowed.
      </p>

     </note>

     <note dg="b5194.b5152-move">
      <p id="xr.ctd.n2p" dg="b5152-movement">
       Aside from the simple coherence requirements outlined <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152">below</phrase>, the requirement that type
       definitions identified as restrictions actually <emph>be</emph>
       restrictions — that is, the requirement that they accept
       as valid only a subset of the items which are accepted as valid
       by their base type definition — is enforced in <specref ref="coss-ct"/>.</p>
     </note>

     <p dg="b5152">The following sections describe
      different sets of mapping rules for complex types; some
      are common to all or many source declarations, others
      only in specific circumstances.
      <ulist>
       <item>
	<p>If the <eltref ref="complexType"/> source declaration
	 has a <eltref ref="simpleContent"/> element as a child,
	 then it maps to a <compref ref="ctd"/> using the mapping
	 rules in
	 <ulist>
	  <item>
	   <p><specref ref="dcl.ctd.ctsc"/>,</p>
	  </item>
	  <item>
	   <p><specref ref="dcl.ctd.common"/>,</p>
	  </item>
	  <item>
	   <p><specref ref="dcl.ctd.attuses"/>, and</p>
	  </item>
	  <item>
	   <p><specref ref="dcl.ctd.anyatt"/>.</p>
	  </item>
	 </ulist>
	</p>
       </item>
       <item>
	<p>If the <eltref ref="complexType"/> source declaration
	 has a <eltref ref="complexContent"/> element as a child,
	 then it maps to a <compref ref="ctd"/> using the mapping
	 rules in
	 <ulist>
	  <item>
	   <p><specref ref="dcl.ctd.ctcc.explicit"/>, </p>
	  </item>
	  <item>
	   <p><specref ref="dcl.ctd.ctcc.common"/>, </p>
	  </item>
	  <item>
	   <p><specref ref="dcl.ctd.common"/>,</p>
	  </item>
	  <item>
	   <p><specref ref="dcl.ctd.attuses"/>, and</p>
	  </item>
	  <item>
	   <p><specref ref="dcl.ctd.anyatt"/>.</p>
	  </item>
	 </ulist>
	 
	</p>
       </item>
       <item>
	<p>If the <eltref ref="complexType"/> source declaration
	 has neither a <!--*
* material suppressed here by diff group b6156 *
*-->
	 <phrase dg="b6156"><eltref ref="simpleContent"/></phrase> nor a
	 <eltref ref="complexContent"/> element as a child,
	 then it maps to a <compref ref="ctd"/> using the mapping
	 rules in
	 <ulist>
	  <item>
	   <p><specref ref="dcl.ctd.ctcc.implicit"/>,</p>
	  </item>
	  <item>
	   <p><specref ref="dcl.ctd.ctcc.common"/>,</p>
	  </item>
	  <item>
	   <p><specref ref="dcl.ctd.common"/>,</p>
	  </item>
	  <item>
	   <p><specref ref="dcl.ctd.attuses"/>, and</p>
	  </item>
	  <item>
	   <p><specref ref="dcl.ctd.anyatt"/>.</p>
	  </item>
	 </ulist>
	</p>
       </item>
      </ulist>
     </p>
     <p dg="b5152">Where convenient, the mapping rules are
      described exclusively in terms of the schema document's
      information set.  The mappings, however, depend not only upon
      the source declaration but also upon the schema context. Some
      mappings, that is, depend on the properties of other components
      in the schema.  In particular, several of the mapping rules
      given in the following sections depend upon the <propref comp="ctd" prop="base type definition"/> having
      been identified before they apply.</p>

     <div4 id="dcl.ctd.common" dg="b5152-movement">
      <head dg="b5152">Common Mapping Rules for Complex Type Definitions</head>

     <p id="xr.ct1" dg="b5152-movement">Whichever
      alternative for the content of <eltref ref="complexType"/> is
      chosen, the following property mappings 
       apply<!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152">.
	Except where otherwise specified, attributes and child
	elements are to be sought among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> and
	<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of the <eltref ref="complexType"/> element.
       </phrase></p>
     
     <reprdef dg="b5152-movement">
      <reprcomp id="xr.ct2" dg="b5152-movement" abstract="Complex Type Definition" ref="Complex_Type_Definition_details">
       <propmap comp="ctd" prop="name">The <termref def="key-vv">actual value</termref> of the
	<code>name</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> if present, otherwise <termref def="key-null">absent</termref>.</propmap>
       <propmap comp="ctd" prop="target namespace">The <termref def="key-vv">actual value</termref> of
	the <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of the <eltref ref="schema"/> ancestor element information item if present,
	otherwise <termref def="key-null">absent</termref>.</propmap>
       <propmap comp="ctd" prop="abstract">The <termref def="key-vv">actual value</termref> of the
	<code>abstract</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise
	<pt>false</pt>.</propmap>

       <propmap comp="ctd" prop="prohibited substitutions">A set
	corresponding to the <termref def="key-vv">actual value</termref> of the <code>block</code>
	<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise <!--*
* material suppressed here by diff group b5194 *
*--><phrase dg="b5194">to</phrase> the <termref def="key-vv">actual value</termref> of the
	<code>blockDefault</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of the ancestor
	<eltref ref="schema"/> element information item, if present,
	otherwise on the empty string.  Call this the
	<local>EBV</local> (for effective block value).  Then the
	value of this property is
	<olist role="caseval">
	 <item>
	  <p role="if">the <local>EBV</local> is the empty string</p>
	  <p role="then">the empty set;</p>
	 </item>
	 <item>
	  <p role="if">the <local>EBV</local> is <code>#all</code></p>
	  <p role="then"><code>{</code><pt>extension</pt>,
	   <pt>restriction</pt><code>}</code>;</p>
	 </item>
	 <item>
	  <p role="otherwise">a set with members drawn from the set
	   above, each being present or absent depending on whether
	   the <termref def="key-vv">actual value</termref> (which is a list) contains an equivalently
	   named item.
	   <note>
	    <p>Although the <code>blockDefault</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of
	     <eltref ref="schema"/> <!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase> include values other than
	     <pt>restriction</pt> or <pt>extension</pt>, those values
	     are ignored in the determination of <propref comp="ctd" prop="prohibited substitutions"/> for complex type
	     definitions (they <emph>are</emph> used elsewhere).</p>
	   </note>
	  </p>
	 </item>
	</olist>
       </propmap>

       <propmap comp="ctd" prop="final">As for <propref comp="ctd" prop="prohibited substitutions"/> above, but using the
	<code>final</code> and <code>finalDefault</code>
	<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> in place of the <code>block</code> and
	<code>blockDefault</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref>.</propmap>
       <propmap comp="ctd" prop="context" dg="context-2338">If the <code>name</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is
	present, then <termref def="key-null"/>, otherwise (the parent
	element information item will be <eltref ref="element"/>), the <compref ref="ed"/> corresponding to
	that parent information item.</propmap>
       <propmap comp="ctd" prop="assertions" dg="b2861cc-1">
	A sequence whose members are <compref name="Assertion" ref="as"/>s drawn from the following sources, in order:
	<olist>
	 <item>
	  <p><!--*
* material suppressed here by diff group b2861cc-1a *
*--><phrase dg="b2861cc-1a">The
	     <propref comp="ctd" prop="assertions"/> of the <propref comp="ctd" prop="base type definition"/>.</phrase></p>
	 </item>
	 <!--*
* material suppressed here by diff group b2861cc-1g *
*-->
	 <!--*
* material suppressed here by diff group b2861cc-1g *
*-->
	 <item>
	  <p><compref name="Assertion" ref="as"/>s corresponding to
	   all the <eltref ref="assert"/> <!--*
* material suppressed here by diff group b2861cc-3 *
*--> element
	   information items among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref><phrase dg="b4369"> of <eltref ref="complexType"/>, <eltref ref="restriction" inside="simpleContent"/> and <eltref ref="extension" inside="simpleContent"/></phrase>, if
	   any, in <phrase dg="b5156">document</phrase>
	   order.
	   <!--*
* material suppressed here by diff group b2861cc-1g *
*--></p>
	 </item>
	</olist>
       </propmap>
       <propmap comp="ctd" prop="annotations"><!--*
* material suppressed here by diff group bannotations-1 *
*--> <phrase dg="bannotations-2"> The <termref def="key-am-set"/> of the set of
	 elements containing the <eltref ref="complexType"/>, <phrase dg="b4439">the <eltref ref="openContent"/>
	  <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">child</xpropref>, if present,</phrase> <phrase dg="bannotations-3">the <eltref ref="attributeGroup" inside="simpleContent"/>
	  <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if present,</phrase> the <eltref ref="simpleContent"/> and <eltref ref="complexContent"/>
	 <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if present, and their <eltref ref="restriction" inside="simpleContent"/> and <eltref ref="extension" inside="simpleContent"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if present, <phrase dg="bannotations-3">and their <phrase dg="b4439"><eltref ref="openContent"/> and</phrase> <eltref ref="attributeGroup" inside="simpleContent"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if present,</phrase>
	 as defined in <specref ref="declare-annotation"/>. </phrase>
       </propmap>
      </reprcomp>
     </reprdef>

      <note dg="b2861cc-1.b5152-move">
       <p id="xr.ctd.n1p" dg="b5152-movement">
	If the <propref comp="ctd" prop="base type definition"/> is a
	complex type definition, then the <propref comp="ctd" prop="assertions"/> always
	contain members of the
	<propref comp="ctd" prop="assertions"/> of the <propref comp="ctd" prop="base type definition"/>, no matter which
	alternatives are chosen in the XML representation,
	<eltref ref="simpleContent"/> or <eltref ref="complexContent"/>,
	<eltref ref="restriction" inside="simpleContent"/> or <eltref ref="extension" inside="simpleContent"/>.
       </p>
      </note>
     </div4>

     <div4 id="dcl.ctd.ctsc" dg="b5152-movement">
      <head dg="b5152">Mapping Rules for Complex Types with Simple Content</head>

      <p id="xr.ct3" dg="b5152-movement">When the
       <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152"><eltref ref="complexType"/>
	source declaration has a <eltref ref="simpleContent"/> 
	child</phrase>, the
      following elements are relevant<phrase dg="b5152"> 
	(as are <eltref ref="attribute"/>,
	<eltref ref="attributeGroup" inside="simpleContent"/>, and 
	<eltref ref="anyAttribute"/>)</phrase>, 
       and the <!--*
* material suppressed here by diff group b5152 *
*--> 
       property
       mappings are as below<phrase dg="b5152">,
	supplemented by the mappings in
	<specref ref="dcl.ctd.common"/>,
	<specref ref="dcl.ctd.attuses"/>,
	and <specref ref="dcl.ctd.anyatt"/></phrase>.  
       Note that either
      <eltref ref="restriction" inside="simpleContent"/> or <eltref ref="extension" inside="simpleContent"/> <rfc2119>must</rfc2119>  
       <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152">appear in</phrase>
      the content of <eltref ref="simpleContent"/>.</p>
     
     <reprdef dg="b5152-movement">
      <reprelt id="xr.ct4" dg="b5152-movement" eltname="simpleContent"/>
      <reprelt id="xr.ct5" dg="b5152-movement" eltname="restriction" type="simpleRestrictionType" local="simpleContent"/>
      <reprelt id="xr.ct6" dg="b5152-movement" eltname="extension" type="simpleExtensionType" local="simpleContent"/> 
       <!--* lose attribute, anyAttribute, move below. *-->
      <!--*
      <note diff="add" dg="bannotations-2">
      <p>The <eltref ref="annotation"/> element in an <eltref ref="anyAttribute"/>
      element has no reflection in the component structure.</p>
     </note>
      *-->
     </reprdef>

     <p dg="b5152">When <!--*
* material suppressed here by diff group b5152 *
*-->
       <phrase dg="b5152">the <eltref ref="complexType"/>
	element has a <eltref ref="simpleContent"/> child, then</phrase>
       the
       <eltref ref="complexType"/> element maps to a complex type with
       simple content, as follows.</p>

     <reprdef dg="b5152-movement">
      <reprcomp id="xr.ct9" dg="b5152-movement" abstract="Complex Type Definition with simple content" ref="Complex_Type_Definition_details">

       <propmap comp="ctd" prop="base type definition">The type
	definition <termref def="src-resolve">resolved</termref> to by the <termref def="key-vv">actual value</termref> of the
	<code>base</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>
	 <phrase dg="b5152">on the 
	  <eltref ref="restriction"/> or
	  <eltref ref="extension" inside="simpleContent"/> element appearing as a child of
	  <eltref ref="simpleContent"/></phrase>
	</propmap>

       <propmap comp="ctd" prop="derivation method">If the
	<eltref ref="restriction" inside="simpleContent"/> alternative
	is chosen, then <pt>restriction</pt>, otherwise (the <eltref ref="extension" inside="simpleContent"/> alternative is
	chosen) <pt>extension</pt>.</propmap>

       <!--*
* material suppressed here by diff group b5152-movement *
*-->
       <!--*
* material suppressed here by diff group b5152-movement *
*-->

       <propmap comp="ctd" prop="content type">
	<phrase dg="ep01">A <compref name="Content Type" ref="ct"/> as follows:</phrase>
	<pvlist dg="ep01">
	 <pvpair comp="ct" prop="variety" dg="ep01"><pt>simple</pt></pvpair>
	 <pvpair comp="ct" prop="particle" dg="ep01"><termref def="key-null"/></pvpair>
	 <pvpair comp="ct" prop="open content" dg="vm13"><termref def="key-null"/></pvpair>
	 <pvpair comp="ct" prop="simple type definition" dg="ep01"><olist role="caseval">
	   <item><p role="if">the 
	      <!--* 
	      type definition &resolved_src; to by
	      the &v-value; of the <code>base</code> &i-attribute; 
	      *-->
	      <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152"><propref comp="ctd" prop="base type definition"/></phrase> 
	      is a
	     complex type definition whose own <propref comp="ctd" prop="content type"/> <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01">has <propref comp="ct" prop="variety"/>
	      <pt>simple</pt></phrase> and the <eltref ref="restriction" inside="simpleContent"/> alternative
	     is chosen</p>
	    <p role="then">starting from either
	     <olist>
	      <item id="std1cl">
	       <p>the simple type definition corresponding to the
		<eltref ref="simpleType"/> among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of
		<eltref ref="restriction" inside="simpleContent"/> if there is one;</p>
	      </item>
	      <item id="std2cl">
	       <p>otherwise (<eltref ref="restriction" inside="simpleContent"/> has no <eltref ref="simpleType"/> among its <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>), the
		simple type definition which is the <phrase dg="ep01"><propref comp="ct" prop="simple type     definition"/> of the </phrase><propref comp="ctd" prop="content type"/> of
		the 
		 <!--* type definition &resolved_src; to by the &v-value;
		 of the <code>base</code> &i-attribute; *-->
		 <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152"><propref comp="ctd" prop="base type definition"/></phrase> 
		</p>
	      </item>
	     </olist> a simple type definition which restricts the
	     simple type definition identified in
	     <clauseref ref="std1cl"/> or <clauseref ref="std2cl"/>
	     with a set of facet components corresponding to the
	     appropriate element information items among the <eltref ref="restriction" inside="simpleContent"/>'s <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> (i.e. those
	     which specify facets, if any), as defined in <specref ref="st-restrict-facets"/>;
	    </p>
	   </item>
	   <item><p role="if">the 
	      <!--* type definition &resolved_src; to by
	      the &v-value; of the <code>base</code> &i-attribute; 
	      *-->
	      <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152"><propref comp="ctd" prop="base type definition"/></phrase> 
	      is a
	     complex type definition whose own <propref comp="ctd" prop="content type"/>
	     <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01">has <propref comp="ct" prop="variety"/></phrase> <pt>mixed</pt> and <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01"><propref comp="ct" prop="particle"/> a <compref name="Particle" ref="p"/></phrase> which is
	     <termref def="cd-emptiable">emptiable</termref>, as
	     defined in <specref ref="cos-group-emptiable"/> and the
	     <eltref ref="restriction" inside="simpleContent"/>
	     alternative is chosen</p>
	    <p role="then"><!--*
* material suppressed here by diff group b5286b *
*--> <phrase dg="b5286b">(let <var>S</var><sub><phrase><var>B</var></phrase></sub>
	      be</phrase> the simple type definition corresponding to
	     the <eltref ref="simpleType"/> among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <eltref ref="restriction" inside="simpleContent"/> <!--*
* material suppressed here by diff group b5286b *
*--> <phrase dg="b5286b">if any, otherwise
	      <termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref>)</phrase> a simple type definition which
	     restricts <!--*
* material suppressed here by diff group b5286b *
*--> <phrase dg="b5286b"><var>S</var><sub><phrase><var>B</var></phrase></sub></phrase> with a set of facet
	     components corresponding to the appropriate element
	     information items among the <eltref ref="restriction" inside="simpleContent"/>'s <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> (i.e. those
	     which specify facets, if any), as defined in <specref ref="st-restrict-facets"/>;
	    </p>
	    <note dg="b6235"><p>
	     If there is no <eltref ref="simpleType"/> among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of
	     <eltref ref="restriction" inside="simpleContent"/> (and if therefore
	     <var>S</var><sub><phrase><var>B</var></phrase></sub> is <termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref>), the result will be a simple type definition component
	     which fails to obey the constraints on simple type definitions, including
	     for example <clauseref ref="c-base_atomic"/> of
	     <specref ref="cos-st-restricts"/>.
	    </p></note>
	   </item>
	   <item><p role="if">the 
	      <!--* type definition &resolved_src; to by
	      the &v-value; of the <code>base</code> &i-attribute; 
	      *-->
	      <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152"><propref comp="ctd" prop="base type definition"/></phrase> 
	      is a
	     complex type definition <!--*
* material suppressed here by diff group b5286b *
*-->whose own
	     <propref comp="ctd" prop="content type"/> <!--*
* material suppressed here by diff group b5286b *
*--> <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01"><!--*
* material suppressed here by diff group b5286b *
*--> <phrase dg="b5286b">has</phrase> <propref comp="ct" prop="variety"/> <pt>simple</pt></phrase><!--*
* material suppressed here by diff group b5286b *
*--> and the
	     <eltref ref="extension" inside="simpleContent"/> alternative is chosen</p>
	    <p role="then">
	     the <phrase dg="ep01"><propref comp="ct" prop="simple type definition"/> of the
	     </phrase><propref comp="ctd" prop="content type"/> of
	     that complex type definition;</p>
	   </item>
	   <!--*
* material suppressed here by diff group b5286b *
*-->
	   <item dg="b5286b">
	    <p role="if">the 
	      <!--* type definition &resolved_src; to by the
	     &v-value; of the <code>base</code> &i-attribute; 
	      *-->
	      <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152"><propref comp="ctd" prop="base type definition"/></phrase> 
	      is a
	     simple type definition and the
	     <eltref ref="extension" inside="simpleContent"/>
	     alternative is chosen</p>
	    <p role="then">that simple type definition;</p>
	   </item>
	   <item id="c-ctsc-bad" dg="b5286b">
	    <p role="otherwise"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref>.</p>
	   </item>
	  </olist></pvpair>
	</pvlist>
	
       </propmap>
      </reprcomp>
     </reprdef>

     </div4>
     <div4 id="dcl.ctd.ctcc" dg="b5152-movement">
      <head dg="b5152">Mapping Rules for Complex Types with Complex Content</head>

      <p id="xr.ct10" dg="b5152-movement">When the
      <!--*
* material suppressed here by diff group b5152 *
*-->
       <phrase dg="b5152"><eltref ref="complexType"/>
	element does not have a <eltref ref="simpleContent"/> child
	element, then it maps to a complex type with complex
	content.  The</phrase>
       following elements are relevant (as are the 
       <phrase dg="b5152"> 
	<eltref ref="attribute"/>,</phrase>
       <eltref ref="attributeGroup" inside="simpleContent"/><phrase dg="b5152">,</phrase> 
       and <eltref ref="anyAttribute"/>
       elements, 
       <phrase diff="add" dg="b5156e">which are described 
	more fully in
	<specref ref="declare-attribute"/>,
	<specref ref="dcl.ctd.attuses"/>, and
	<specref ref="declare-openness"/>, respectively, and which are 
       </phrase>	
	not repeated here), and the additional property
       mappings are as below<phrase dg="b5152">, supplemented
	by the mappings in 
	<specref ref="dcl.ctd.common"/>,
	<specref ref="dcl.ctd.attuses"/>, <phrase diff="del" dg="b5156e">and</phrase>
	<specref ref="dcl.ctd.anyatt"/></phrase><phrase diff="add" dg="b5156e">,
	<specref ref="dcl.att.local"/>, and
	<specref ref="ref.att.local"/></phrase>. Note that either
       <eltref ref="restriction" inside="complexContent"/> or <eltref ref="extension" inside="complexContent"/> <rfc2119>must</rfc2119> 
       <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152">appear in</phrase>
      the content of <eltref ref="complexContent"/>, but their
      content
      models are different in this case from the case above when they
      occur as children of
      <eltref ref="simpleContent"/>.</p>
     <p id="xr.ct11" dg="b5152-movement.xr.ct11">
       <!--*
* material suppressed here by diff group b5152 *
*--></p>
     
      <reprdef dg="b5152-movement">
       <reprelt id="xr.ct12" dg="b5152-movement" eltname="complexContent"/>
       <reprelt id="xr.ct13" dg="b5152-movement" eltname="restriction" type="complexRestrictionType" local="complexContent"/>
       <reprelt id="xr.ct14" dg="b5152-movement" eltname="extension" type="extensionType" local="complexContent"/>
       <reprelt id="xr.ct15-bis" dg="vm13.b5152-move" eltname="openContent"/>
       <!--* 
       <reprelt diff="add" dg="b5156e" eltname="attribute" type="attribute"/> 
       <reprelt diff="add" dg="b5156e" 
	eltname="attributeGroup" type="attributeGroupRef" local="simpleContent"/> 
       <reprelt diff="add" dg="b5156e" eltname="anyAttribute"/> 
       *-->
      </reprdef>

      <p dg="b5152">Complex types with complex content can
       be the image of two different forms of
       <eltref ref="complexType"/> element:  one with a <eltref ref="complexContent"/> child (discussed in
       <specref ref="dcl.ctd.ctcc.explicit"/>), and one with neither
       <eltref ref="simpleContent"/> nor
       <eltref ref="complexContent"/> as a child (discussed in
       <!--*
* material suppressed here by diff group b6008 *
*--><specref ref="dcl.ctd.ctcc.implicit" dg="b6008"/>).
       The mapping of the 
       <propref comp="ctd" prop="content type"/> is the same
       in both cases; it is described in 
       <specref ref="dcl.ctd.ctcc.common"/>.
      </p>

      <div5 id="dcl.ctd.ctcc.explicit" dg="b5152-movement">
       <head dg="b5152">Mapping Rules for Complex Types with Explicit Complex Content</head>

       <p dg="b5152">When the <eltref ref="complexType"/>
	source declaration has a <eltref ref="complexContent"/>
	child, the following mappings apply, supplemented by those
	specified in 
	<specref ref="dcl.ctd.ctcc.common"/>,
	<specref ref="dcl.ctd.common"/>, 
	<specref ref="dcl.ctd.attuses"/>, 
	and
	<specref ref="dcl.ctd.anyatt"/>.
       </p>

       <reprdef dg="b5152-movement">
	<reprcomp id="xr.ct16" dg="b5152-movement" abstract="Complex Type Definition with complex content" ref="Complex_Type_Definition_details">
	 <propmap comp="ctd" prop="base type definition">The type
	  definition <termref def="src-resolve">resolved</termref> to by the <termref def="key-vv">actual value</termref> of the
	  <code>base</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref></propmap>
	 <propmap comp="ctd" prop="derivation method">If the
	  <eltref ref="restriction" inside="complexContent"/>
	  alternative is chosen, then <pt>restriction</pt>, otherwise
	  (the <eltref ref="extension" inside="complexContent"/> alternative is
	  chosen) <pt>extension</pt>.</propmap>
	 
	 <!--*
* material suppressed here by diff group b5152 *
*-->
	 <!--*
* material suppressed here by diff group b5152 *
*-->
	 
	 <!--*
* material suppressed here by diff group b5152-movement *
*-->
	</reprcomp>
       </reprdef>
      </div5>

      <div5 id="dcl.ctd.ctcc.implicit" dg="b5152">
       <head dg="b5152">Mapping Rules for Complex Types with Implicit Complex Content</head>
       <p>When the <eltref ref="complexType"/> source declaration
	has neither <eltref ref="simpleContent"/> nor
	<eltref ref="complexContent"/> as a child, it is taken
	as shorthand for complex content restricting
	<!--*
* material suppressed here by diff group wd-200708-1 *
*--><phrase dg="wd-200708-1"><termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref></phrase>. The mapping rules specific to this
	situation are as follows; the mapping rules for properties
	not described here are as given in 
	<specref ref="dcl.ctd.ctcc.common"/>, 
	<specref ref="dcl.ctd.common"/>, 
	<specref ref="dcl.ctd.attuses"/>, 
	and 
	<specref ref="dcl.ctd.anyatt"/>.
       </p>
       <reprdef>
	<reprcomp id="xr.ct16-neardup" abstract="Complex Type Definition with complex content" ref="Complex_Type_Definition_details">

	 <propmap comp="ctd" prop="base type definition">
	  <termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref>
	 </propmap>
	 <propmap comp="ctd" prop="derivation method">
	  <pt>restriction</pt>
	 </propmap>
	</reprcomp>
       </reprdef>
      </div5>

      <div5 id="dcl.ctd.ctcc.common" dg="b5152-movement">
       <head dg="b5152">Mapping Rules for Content Type Property of Complex Content</head>
     
     <p dg="b5152">For complex types with complex content,
	the <propref comp="ctd" prop="content type"/> property is
	calculated as follows.  (For the <propref comp="ctd" prop="content type"/> on complex types with simple content,
	see <specref ref="dcl.ctd.ctsc"/>.)
     </p>
       <note dg="b5152">
	<p>The mapping rule below refers here and there to elements
	 not necessarily present within a <eltref ref="complexType"/>
	 source declaration.  For purposes of evaluating tests like
	 <quote>If the <code>abc</code> attribute is present
	  on the <el>xyz</el> element</quote>, if no <el>xyz</el>
	 element information item is present, then no
	 <code>abc</code> attribute is present on the
	 (non-existent) <el>xyz</el> element.</p>
	<p>When the mapping rule below refers to <quote>the
	  <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref></quote>, then for a
	 <eltref ref="complexType"/> source declaration with a
	 <eltref ref="complexContent"/> child, then the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>
	 of <eltref ref="extension" inside="complexContent"/>
	 or <eltref ref="restriction" inside="complexContent"/> (whichever
	 appears as a child of <eltref ref="complexContent"/>) are meant.  If no <eltref ref="complexContent"/> is present, then the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of
	 the <eltref ref="complexType"/> source
	 declaration itself are meant.
	</p>
	<p>The mapping rule also refers to the value of the
	 <propref comp="ctd" prop="derivation method"/> 
	 property, whose value is determined as specified in
	 the preceding sections.</p>
       </note>

       <reprdef dg="b5152-movement">
	<reprcomp id="xr.ct16-part" dg="b5152-movement" abstract="Complex Type Definition with complex content" ref="Complex_Type_Definition_details">
	 
	 <propmap comp="ctd" prop="content type" id="xr.ctd.prop.contenttype" dg="b5152-movement">
	  <olist>
	   <item>
	    <p><termdef id="key-efm" term="effective mixed" role="local">Let the <term>effective mixed</term> be
	     </termdef>
	     <olist role="caseval">
	      <item id="ccmixed">
	       <p role="if">the <code>mixed</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is
		present on <eltref ref="complexContent"/></p>
	       <p role="then">its <termref def="key-vv">actual value</termref>;</p>
	      </item>
	      <item id="ctmixed">
	       <p role="if">the <code>mixed</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is
		present on
		<eltref ref="complexType"/></p>
	       <p role="then">its <termref def="key-vv">actual value</termref>;</p>
	      </item>
	      <item>
	       <p role="otherwise"><code>false</code>.</p>
	      </item>
	     </olist></p>
	    <note dg="b5194">
	     <p>It is a consequence of <clauseref ref="ccmixed-eq-ctmixed"/> of 
	      <specref ref="src-ct"/> that 
	      <clauseref ref="ccmixed"/> and
	      <clauseref ref="ctmixed"/> above will never contradict
	      each other in a conforming schema document.</p>
	    </note>
	   </item>
	   <item dg="all-2506-2">
	    <p><termdef id="key-expcon" term="explicit content" role="local">Let the <term>explicit content</term> be
	     </termdef>
	     <olist role="caseval">  <item id="c-cme-bis"><p role="if"> 
		<phrase dg="b5150b">at least</phrase>
		<olist role="ortest">
		 <item>
		  <p>There is no <eltref ref="group"/>, <eltref ref="all"/>, <eltref ref="choice"/> or <eltref ref="sequence"/> among the
		   <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>;</p>
		 </item>
		 <item>
		  <p>There is an <eltref ref="all"/> or <eltref ref="sequence"/> among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> with no
		   <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of its own excluding <eltref ref="annotation"/>;</p>
		 </item>
		 <item>
		  <!--*
* material suppressed here by diff group b5156 *
*-->
		  <p dg="b5156"><phrase diff="del" dg="b5156e">There is a 
		    <eltref ref="choice"/> among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> 
		    whose <code>minOccurs</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> 
		    has the <termref def="key-vv">actual value</termref> <code>0</code> 
		    and which has no <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of its own 
		    except for <eltref ref="annotation"/>; </phrase><phrase diff="add" dg="b5156e">There is among the
		    <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> a <eltref ref="choice"/> element
		    <!--* with
		    <code>minOccurs</code> = <code>0</code> and with *-->
		    whose <code>minOccurs</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> 
		    has the <termref def="key-vv">actual value</termref> <code>0</code> 
		    and which has no
		    <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of its own except for <eltref ref="annotation"/>; </phrase>
		  </p>
		 </item>
		 <item dg="consent-1027">
		  <p><phrase dg="b5150b">The</phrase>
		   <eltref ref="group"/>, <eltref ref="all"/>, <eltref ref="choice"/> or <eltref ref="sequence"/> 
		   <phrase dg="b5150b">element</phrase>
		   among the
		   <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> has a <code>maxOccurs</code>
		   <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> with an <termref def="key-vv">actual value</termref> of 0;</p>
		 </item>
		</olist>
	       </p>
	       <p role="then" id="no-comma-4"><pt>empty</pt></p>
	      </item>
	      <item>
	       <p role="otherwise">the particle corresponding to the
		<eltref ref="all"/>, <eltref ref="choice"/>,
		<eltref ref="group"/> or
		<eltref ref="sequence"/> among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>.</p>
	      </item>
	     </olist></p>
	   </item>
	   <item>
	    <p>
	     <termdef id="key-exg" term="effective content" role="local">Let the <term>effective content</term> be
	     </termdef><olist role="caseval">
	      <item id="c-cme"><p role="if"> 
		<!--*
* material suppressed here by diff group all-2506-2 *
*--> <phrase dg="all-2506-2">the <termref def="key-expcon"/> is <pt>empty</pt></phrase>
	       </p>
	       <p role="then">
		<olist role="caseval">
		 <item>
		  <p role="if">the <termref def="key-efm">effective
		    mixed</termref> is <code>true</code></p>
		  <p role="then">A particle whose properties are as
		   follows:
		   <!--*
* material suppressed here by diff group b5141 *
*--><!--*
* material suppressed here by diff group b5141 *
*-->
		   <pvlist dg="b5141">
		    <pvpair comp="p" prop="min occurs">1</pvpair>
		    <pvpair comp="p" prop="max occurs">1</pvpair>
		    <pvpair comp="p" prop="term">
		     a model group whose <propref comp="mg" prop="compositor"/> is <pt>sequence</pt> and whose
		     <propref comp="mg" prop="particles"/> is empty.
		    </pvpair>
		   </pvlist>
		  </p></item>
		 <item>
		  <p role="otherwise"><pt>empty</pt></p></item>
		</olist></p>
	      </item>
	      <item>
	       <p role="otherwise"><!--*
* material suppressed here by diff group all-2506-2 *
*--><phrase dg="all-2506-2">the <termref def="key-expcon"/>.</phrase></p>
	      </item>
	     </olist></p>
	   </item>
	   <item>
	    <p>
	     <!--*
* material suppressed here by diff group vm13 *
*--> <phrase dg="vm13"> <termdef id="key-ect" term="explicit content type" role="local">
	       Let the <term>explicit content type</term>
	       be</termdef></phrase>
	     <olist role="caseval">
	      <item id="c-ctr"><p role="if">
		<!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152"><propref comp="ctd" prop="derivation method"/> = <pt>restriction</pt></phrase></p>
	       <p role="then">
		<olist role="caseval">
		 <item id="c-ctr-empty">
		  <p role="if">the <termref def="key-exg">effective
		    content</termref> is <pt>empty</pt> </p>
		  <p role="then"><phrase dg="ep01">a <compref name="Content Type" ref="ct"/> as follows:</phrase>
		   <pvlist dg="ep01">
		    <pvpair comp="ct" prop="variety" dg="ep01"><pt>empty</pt></pvpair>
		    <pvpair comp="ct" prop="particle" dg="ep01"><termref def="key-null"/></pvpair>
		    <pvpair comp="ct" prop="open content" dg="vm13"><termref def="key-null"/></pvpair>
		    <pvpair comp="ct" prop="simple type definition" dg="ep01"><termref def="key-null"/></pvpair>
		   </pvlist>
		  </p>
		 </item>
		 <item id="c-ctrp">
		  <p role="otherwise"><!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01">a <compref name="Content Type" ref="ct"/>
		    as follows:</phrase> 
		   <!--*
* material suppressed here by diff group ep01 *
*-->
		   <pvlist dg="ep01">
		    <pvpair comp="ct" prop="variety"><pt>mixed</pt> if
		     the <termref def="key-efm">effective
		      mixed</termref> is <code>true</code>, otherwise
		     <pt>element-only</pt></pvpair>
		    <pvpair comp="ct" prop="particle" dg="ep01">The <termref def="key-exg">effective
		      content</termref></pvpair>
		    <pvpair comp="ct" prop="open content" dg="vm13"><termref def="key-null"/></pvpair>
		    <pvpair comp="ct" prop="simple type definition" dg="ep01"><termref def="key-null"/></pvpair>
		   </pvlist>
		  </p>
		 </item>
		</olist>
	       </p>
	      </item>
	      <item id="ct-extension"><p role="if">
		<!--* the <eltref
		 ref="extension" inside="complexContent"/> alternative
		is chosen *-->
		<!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152"><propref comp="ctd" prop="derivation method"/> = <pt>extension</pt></phrase><!--* ? correct entity? *--></p>
	       <p role="then">
		<olist role="caseval">
		 <!--*
* material suppressed here by diff group b5286b *
*-->
		 <!--*
* material suppressed here by diff group b5286b *
*-->
		 <item id="c-ctes" dg="b5286b">
		  <p role="if">the <propref comp="ctd" prop="base type definition"/> is a simple type
		   definition or is a complex type definition whose
		   <propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/> = <pt>empty</pt> or
		   <pt>simple</pt></p>
		  <p role="then">a <compref name="Content Type" ref="ct"/> <!--*
* material suppressed here by diff group b6009 *
*--><phrase dg="b6009">as per
		    <clauseref ref="c-ctr-empty"/>
		    and <clauseref ref="c-ctrp"/> above</phrase>;</p>
		 </item>
		 <item dg="b5286b">
		  <p role="if">the <propref comp="ctd" prop="base type definition"/> is a complex type
		   definition whose <propref comp="ctd" prop="content       type"/>.<propref comp="ct" prop="variety"/> =
		   <pt>element-only</pt> or <pt>mixed</pt> and  the
		   <termref def="key-exg"/> is <pt>empty</pt></p>
		  <p role="then"><propref comp="ctd" prop="base type definition"/>.<propref comp="ctd" prop="content type"/>;</p>
		 </item>
		 <item>
		  <p role="otherwise">a <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01"><compref name="Content Type" ref="ct"/> as
		    follows:</phrase>
		   <pvlist dg="ep01">
		    <pvpair comp="ct" prop="variety" dg="ep01"><pt>mixed</pt> 
		     <phrase dg="ep01">if
		     the <termref def="key-efm">effective
		      mixed</termref> is <code>true</code>, otherwise</phrase>
		     <!--*
* material suppressed here by diff group ep01 *
*-->
		     <!--*
* material suppressed here by diff group x1011 *
*--><phrase dg="x1011"><pt>element-only</pt></phrase>
		     <!--*
* material suppressed here by diff group ep01 *
*-->
		     <!--*
* material suppressed here by diff group ep01 *
*-->
		    </pvpair>
		    <!--*
* material suppressed here by diff group all-2506-2-adhoc *
*-->

		    <pvpair comp="ct" prop="particle" dg="all-2506-2">
		     <termdef id="key-baseparticle" term="base         particle">Let the <term>base particle</term> be
		      the particle of the <propref comp="ctd" prop="content type"/> of the 
		      <!--* type definition
		      &resolved_src; to by the &v-value; of the
		      <code>base</code> &i-attribute;.*-->
		      <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152"><propref comp="ctd" prop="base type definition"/></phrase>.</termdef> Then
		     <olist role="caseval">
		      <item>
		       <p role="if"><!--*
* material suppressed here by diff group all-2506-3 *
*-->the
			<propref comp="p" prop="term"/> of
			the <termref def="key-baseparticle"/> has
			<propref comp="mg" prop="compositor"/> <pt>all</pt> and the
			<termref def="key-expcon"/> is empty</p>
		       <p role="then">the <termref def="key-baseparticle"/>.</p>
		      </item>
		      <item>
		       <p role="if"><!--*
* material suppressed here by diff group all-2506-3 *
*-->the
			<propref comp="p" prop="term"/> of
			the <termref def="key-baseparticle"/> has
			<propref comp="mg" prop="compositor"/>
			<pt>all</pt> and the <propref comp="p" prop="term"/> of the
			<termref def="key-exg"/> also has <propref comp="mg" prop="compositor"/>
			<pt>all</pt></p>
		       <p role="then">a <compref name="Particle" ref="p"/> whose properties are
			as follows: <glist> <gitem> <label><propref comp="p" prop="min occurs"/></label> <def>
			   <p>the <propref comp="p" prop="min occurs"/>
			    of the <termref def="key-exg"/>.</p> </def>
			 </gitem> <gitem> <label><propref comp="p" prop="max occurs"/></label> <def>
			   <p><code>1</code></p> </def> </gitem> <gitem>
			  <label><propref comp="p" prop="term"/></label>
			  <def> <p>a model group whose <propref comp="mg" prop="compositor"/> is
			    <pt>all</pt> and whose <propref comp="mg" prop="particles"/> are the <propref comp="mg" prop="particles"/> of the
			    <propref comp="p" prop="term"/> of the
			    <termref def="key-baseparticle"/> followed
			    by the  <propref comp="mg" prop="particles"/> of the <propref comp="p" prop="term"/> of the <termref def="key-exg"/>. </p> </def> </gitem>
			</glist>
		       </p>
		      </item>
		      <item id="c-suffix-extension">
		       <p role="otherwise">
			<glist>
			 <gitem>
			  <label><propref comp="p" prop="min        occurs"/></label>
			  <def>
			   <p><code>1</code></p>
			  </def>
			 </gitem>
			 <gitem>
			  <label><propref comp="p" prop="max        occurs"/></label>
			  <def>
			   <p><code>1</code></p>
			  </def>
			 </gitem>
			 <gitem>
			  <label><propref comp="p" prop="term"/></label>
			  <def>
			   <p>
			    a model group whose <propref comp="mg" prop="compositor"/> is <pt>sequence</pt>
			    and whose <propref comp="mg" prop="particles"/> are the <termref def="key-baseparticle"/> followed by the
			    <termref def="key-exg"/>. 
			   </p>
			  </def>
			 </gitem>
			</glist>
		       </p>
		      </item>
		     </olist>
		    </pvpair>
		    <pvpair comp="ct" prop="open content" dg="vm13">
		     the <propref comp="ct" prop="open content"/> of the
		     <propref comp="ctd" prop="content type"/> of the
		     <propref comp="ctd" prop="base type definition"/>.
		     
		    </pvpair>
		    <pvpair comp="ct" prop="simple type definition" dg="ep01"><termref def="key-null"/></pvpair>
		   </pvlist></p>
		 </item>
		</olist>
	       </p>
	      </item>
	     </olist></p>
	   </item>

	   <item dg="vm13"><p>
	     <termdef id="key-we" term="wildcard element" role="local">
	      Let the <term>wildcard element</term> be</termdef>
	     <olist role="caseval">
	      <item><p role="if">
		the <eltref ref="openContent"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">child</xpropref> is present
	       </p><p role="then">
		the <eltref ref="openContent"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">child</xpropref>.
	       </p></item>
	      <item><p role="if">
		the <eltref ref="openContent"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">child</xpropref> is not
		present, 
		the
		<eltref ref="schema"/> ancestor has a<!--*
* material suppressed here by diff group ep24 *
*--> 
		<eltref ref="defaultOpenContent"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">child</xpropref>, and
		<olist role="ortest">
		 <item><p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">
		    the <termref def="key-ect"/> has <propref comp="ct" prop="variety"/> ≠ <pt>empty</pt></phrase>
		  </p></item>
		 <item><p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">
		    the <termref def="key-ect"/> has <propref comp="ct" prop="variety"/> = <pt>empty</pt> and the <eltref ref="defaultOpenContent"/> element has
		    <code>appliesToEmpty</code> = <pt>true</pt></phrase>
		  </p></item>
		</olist>
	       </p><p role="then" id="del-no-comma-5">
		the <eltref ref="defaultOpenContent"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">child</xpropref> of the
		<eltref ref="schema"/>.
	       </p></item>
	      <item><p role="otherwise">
		<termref def="key-null">absent</termref>.
	       </p></item>
	     </olist>
	    </p></item>

	   <item dg="vm13"><p>
	     Then the value of the property is
	     <olist role="caseval">
	      <item><p role="if">
		the <termref def="key-we"/> is <termref def="key-null">absent</termref>
		<phrase diff="add" dg="b7813v2">or is present and has
		 <code>mode</code> = <code>'none'</code></phrase>
	       </p><p role="then">
		the <termref def="key-ect"/>.
	       </p></item>
	      <item diff="del" dg="b7813v2"><p role="if">
		the <termref def="key-we"/> is <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">present and has <code>mode</code> =
		 <code>'none'</code></phrase>
	       </p><p role="then">
		a <compref ref="ct"/> as follows:
		<pvlist>
		 <pvpair comp="ct" prop="variety">
		  The <propref comp="ct" prop="variety"/> of the
		  <termref def="key-ect"/>
		 </pvpair>
		 <pvpair comp="ct" prop="particle">
		  The <propref comp="ct" prop="particle"/> of the
		  <termref def="key-ect"/>
		 </pvpair>
		 <pvpair comp="ct" prop="open content">
		  <termref def="key-null">absent</termref>
		 </pvpair>
		 <pvpair comp="ct" prop="simple type definition">
		  <termref def="key-null">absent</termref>
		 </pvpair>
		</pvlist>
	       </p></item>
	      <item><p role="otherwise">
		<pvlist>
		 <pvpair comp="ct" prop="variety">
		  The <propref comp="ct" prop="variety"/> of the
		  <termref def="key-ect"/> if it's not <pt>empty</pt>;
		  otherwise <pt>element-only</pt>. 
		 </pvpair>
		 <pvpair comp="ct" prop="particle">
		  The <propref comp="ct" prop="particle"/> of the
		  <termref def="key-ect"/> if the <propref comp="ct" prop="variety"/> of the
		  <termref def="key-ect"/> is not <pt>empty</pt>;
		  otherwise a <compref ref="p"/>
		  as follows:
		  <pvlist>
		   <pvpair comp="p" prop="min occurs">1</pvpair>
		   <pvpair comp="p" prop="max occurs">1</pvpair>
		   <pvpair comp="p" prop="term">
		    a model group whose <propref comp="mg" prop="compositor"/> is <pt>sequence</pt> and whose
		    <propref comp="mg" prop="particles"/> is empty.
		   </pvpair>
		  </pvlist>
		 </pvpair>
		 <pvpair comp="ct" prop="open content">
		  An <compref ref="oc"/> as follows:
		  <pvlist>
		   <pvpair comp="oc" prop="mode">
		    The <termref def="key-vv">actual value</termref> of the <code>mode</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>
		    of the <termref def="key-we"/>, if present,
		    otherwise <pt>interleave</pt>.
		   </pvpair>
		   <pvpair comp="oc" prop="wildcard">
		    <phrase diff="del" dg="b7813v2">A</phrase>
		    <phrase diff="add" dg="b7813v2">Let <var>W</var> be the</phrase>
		     wildcard <!--*
* material suppressed here by diff group vm13-1 *
*--> <phrase dg="vm13-1">corresponding to the <eltref ref="any"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">child</xpropref> of the <termref def="key-we"/>.</phrase>
		    <phrase diff="add" dg="b7813v2">If the
		    <propref comp="ct" prop="open content"/> of the
		    <termref def="key-ect"/> is <termref def="key-null">absent</termref>, then <var>W</var>; otherwise
                    a wildcard whose <propref comp="w" prop="process contents"/>
                    and	<!--*
* material suppressed here by diff group bannotations *
*--><propref comp="w" prop="annotations" dg="bannotations"/> are	those of <var>W</var>, and whose
                    <propref comp="w" prop="namespace constraint"/> is the
                    wildcard union of the
                    <propref comp="w" prop="namespace constraint"/> of <var>W</var> and
		    of <propref comp="ct" prop="open content"/>.<propref comp="oc" prop="wildcard"/> of
		    the <termref def="key-ect"/>, as defined in
		    <specref ref="cos-aw-union"/>.</phrase>
		   </pvpair>
		  </pvlist>
		 </pvpair>
		 <pvpair comp="ct" prop="simple type definition">
		  <termref def="key-null"/>
		 </pvpair>
		</pvlist>
	       </p></item>
	     </olist>
	    </p></item>
	  </olist>
	 </propmap>
	</reprcomp>
       </reprdef>

       <note id="xr.ctd.n4-bis" dg="b2195.b5152-move">
	<p id="xr.ctd.n4p" dg="b5152-movement">
	 It is a consequence of <clauseref ref="ct-extension"/> above that
	 when a type definition is extended, the same particles appear
	 in both the base type definition and the extension;
	 the particles are reused without being copied.
	</p>
       </note>

      </div5>
     </div4>

     <div4 id="dcl.ctd.attuses" dg="b5152-movement">
      <head dg="b5152">Mapping Rule for Attribute Uses Property</head>

      <p dg="b5152">Any <eltref ref="complexType"/>
       source declaration can have <eltref ref="attribute"/> and
       <eltref ref="attributeGroup" inside="simpleContent"/> elements as 
       children, or descendants.  The <eltref ref="attribute"/>
       element is described in
       <specref ref="declare-attribute"/>
       and will not be repeated here.
      </p>
      
      <reprdef>
       <reprelt id="xr.ct7" dg="b5152-movement" eltname="attributeGroup" type="attributeGroupRef" local="simpleContent"/>
      </reprdef>

      <p dg="b5152">The <eltref ref="attribute"/> and
       <eltref ref="attributeGroup" inside="simpleContent"/> elements map to
       the <propref comp="ctd" prop="attribute uses"/>
       property of the <compref ref="ctd"/> component
       as described below.  This mapping rule
       is the same for all complex type definitions.  
       <!--* They
       depend upon the value of the 
       <propref comp="ctd" prop="base type definition"/>
       property, which is specified elsewhere.
       *-->
      </p>
      <note dg="b5152">
       <p>In the following rule, references to <quote>the
	 <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref></quote> refer to the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of
	the <eltref ref="extension" inside="simpleContent"/>
	or <eltref ref="restriction" inside="simpleContent"/> 
	element (whichever
	appears as a child of  <eltref ref="simpleContent"/> or
	<eltref ref="complexContent"/> in the
	<eltref ref="complexType"/> source declaration),
	if present, otherwise to the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of the
	<eltref ref="complexType"/> source declaration itself.
       </p>
       <p>The rule also refers to the value of the
	<propref comp="ctd" prop="derivation method"/>
	property, which is described elsewhere.
       </p>
      </note>
      
      <reprdef dg="b5152-movement">
       <reprcomp ref="Complex_Type_Definition_details" abstract="Complex Type Definition (Attribute Uses)">

	<propmap comp="ctd" prop="attribute uses" id="xr.ctd.prop.attuses" dg="b5152-movement">
	 <p dg="b4314"><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"> If the
	   <eltref ref="schema"/> ancestor has a
	   <code>defaultAttributes</code> attribute, and the <eltref ref="complexType"/> element does not have
	   <code>defaultAttributesApply</code> =
	   <code>false</code>,</phrase> then <phrase dg="ep24">the</phrase> <!--*
* material suppressed here by diff group b6170 *
*--> <propref comp="ctd" prop="attribute uses"/> <!--*
* material suppressed here by diff group b6170 *
*-->
	   <phrase dg="b6170">property is</phrase>
	   computed as if there were an
	  <eltref ref="attributeGroup" inside="simpleContent"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">child</xpropref> with empty content
	  and a <code>ref</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> whose <termref def="key-vv">actual value</termref> is the
	  same as that of the <!--*
* material suppressed here by diff group b4314-1 *
*-->
	  <phrase dg="b4314-1"><code>defaultAttributes</code></phrase>
	  <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref><phrase dg="b6170"> appearing after any other
	  <eltref ref="attributeGroup" inside="simpleContent"/>
	  <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref></phrase>. Otherwise proceed as if there were no such
	  <eltref ref="attributeGroup" inside="simpleContent"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">child</xpropref>. </p> <!--*
* material suppressed here by diff group b4314 *
*--> <phrase dg="b4314">Then the value is a</phrase> union of sets of
	 attribute uses as follows 
	 <olist>
	  <item id="c-add1">
	   <p>The set of attribute uses corresponding to the <eltref ref="attribute"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if any.</p>
	  </item>
	  <item id="c-add2">
	   <p>The <propref comp="agd" prop="attribute uses"/> of the
	    attribute groups <termref def="src-resolve">resolved</termref> to by the <termref def="key-vv">actual value</termref>s of the
	    <code>ref</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of the <eltref ref="attributeGroup" inside="simpleContent"/>
	    <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if any.</p>
	  </item>
	  <item>
	   <!--*
* material suppressed here by diff group b5156 *
*-->
	   <!--*
* material suppressed here by diff group b5156-choices *
*-->
	   <!--*
* material suppressed here by diff group b5156a *
*-->
	   <!--*
* material suppressed here by diff group b5156-choices *
*-->
	   <!--*
* material suppressed here by diff group b5156b *
*-->

	   <!--*
* material suppressed here by diff group b5156-choices *
*-->
	   <p dg="b5156c">
	    The attribute uses <quote>inherited</quote> from the
	    <propref comp="ctd" prop="base type definition"/> <var>T</var>, as described by <olist role="caseval">
	     <item> <p role="if"><var>T</var> is a complex type definition and
	       <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152"><propref comp="ctd" prop="derivation method"/> = <pt>extension</pt></phrase></p>
	      <p role="then">the attribute
	       uses in <var>T</var>.<propref comp="ctd" prop="attribute uses"/>
	       are inherited.</p>
	     </item> 
	     <item> <p role="if"><var>T</var> is a
	       complex type definition and 
	       <!--* the <eltref
		ref="restriction" inside="simpleContent"/> alternative
	       is used *-->
	       <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152"><propref comp="ctd" prop="derivation method"/> = <pt>restriction</pt></phrase></p>
	      <p role="then">the attribute uses in
	       <var>T</var>.<propref comp="ctd" prop="attribute uses"/> are
	       inherited, with the exception of those with an <propref comp="au" prop="attribute declaration"/> whose
	       <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> is 
	       <olist role="orval"> 
		<item id="att-locally-specified"> 
		 <p>the <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> of the <propref comp="au" prop="attribute declaration"/> of an attribute use
		  which has already been included in the set, following
		  the rules in <clauseref ref="c-add1"/> or <clauseref ref="c-add2"/> above;</p>
		</item> 
		<item id="att-prohibited"> 
		 <p>the <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> of the <propref comp="au" prop="attribute declaration"/> of what would have
		  been an attribute use corresponding to an <eltref ref="attribute"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">child</xpropref>, if the <eltref ref="attribute"/> had not <phrase dg="b5156d">had</phrase><!--*
* material suppressed here by diff group b5156d *
*--> <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><code>use</code> =
		   <pt>prohibited</pt></phrase>.</p> 
		 <note diff="add" dg="b5156e">
		  <p>This sub-clause handles the case where the
		   base type definition <var>T</var> allows the attribute
		   in question, but the restriction prohibits it.</p>
		 </note>
		</item>
	       </olist>
	      </p></item>
	     <item> <p role="otherwise">no attribute use
	       is inherited.</p> </item>
	    </olist> 
	    <!--*
* material suppressed here by diff group b5156d *
*-->
	   </p>
	  </item>
	 </olist>
	</propmap>
       </reprcomp>
      </reprdef>
      <note id="xr.ctd.n3bis" dg="b5152-movement">
       <p id="xr.ctd.n3.p" dg="b5152-movement">
	The <emph>only</emph> substantive function of the value
	<pt>prohibited</pt> for the <code>use</code> attribute of an
	<eltref ref="attribute"/> is in
	establishing the correspondence between a complex type defined
	by restriction and its XML representation.  It serves to
	prevent inheritance of an identically named attribute use from
	the <propref comp="ctd" prop="base type definition"/>.  Such an <eltref ref="attribute"/> does not correspond to any component, and
	hence there is no interaction with either explicit or
	inherited wildcards in the operation of <specref ref="formal-complex-type"/> or <specref ref="coss-ct"/>.
	<phrase dg="b2311">It is pointless, though not an
	 error, for the <code>use</code> attribute to have the value
	 <pt>prohibited</pt> in other contexts (e.g. in complex type
	 extensions or named model group definitions), in which cases
	 the &lt;attribute&gt; element is simply ignored, provided that
	 it does not violate other constraints in this
	 specification.</phrase></p>
      </note>
     </div4>
     <div4 id="dcl.ctd.anyatt" dg="b5152-movement">
      <head dg="b5152">Mapping Rule for Attribute Wildcard Property</head>

      <p dg="b5152">The <propref comp="ctd" prop="attribute wildcard"/>
       property of a <compref ref="ctd"/> depends on the 
       <eltref ref="anyAttribute"/> element which may be present
       within the <eltref ref="complexType"/> element
       or within the attribute groups referred to
       within <eltref ref="complexType"/>.
       The <eltref ref="attributeGroup" inside="simpleContent"/>
       element is described in the preceding section
       <specref ref="dcl.ctd.attuses"/>
       and will not be repeated here.
      </p>
      
      <!--*
* material suppressed here by diff group b6165 *
*-->

      <note dg="b5152">
       <p dg="b5152">The following mapping rule
	is the same for all complex type definitions.  
       </p>
       <p>References to <quote>the
	 <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref></quote> refer to the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of
	the <eltref ref="extension" inside="simpleContent"/>
	or <eltref ref="restriction" inside="simpleContent"/> 
	element (whichever
	appears as a child of  <eltref ref="simpleContent"/> or
	<eltref ref="complexContent"/> in the
	<eltref ref="complexType"/> source declaration),
	if present, otherwise to the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of the
	<eltref ref="complexType"/> source declaration itself.
       </p>
       <p>The rule also refers to the value of the
	<propref comp="ctd" prop="derivation method"/>
	property, which is described elsewhere.
       </p>
      </note>
      
      <reprdef dg="b5152-movement">
       <reprcomp ref="Complex_Type_Definition_details" abstract="Complex Type Definition (Attribute Wildcard)">
	<propmap comp="ctd" prop="attribute wildcard" id="xr.ctd.prop.attwc" dg="b5152-movement">
	 <p dg="b6170">If the <eltref ref="schema"/> ancestor has a
	  <code>defaultAttributes</code> attribute, and the
	  <eltref ref="complexType"/> element does not have
	  <code>defaultAttributesApply</code> = <code>false</code>, then the
	  <propref comp="ctd" prop="attribute wildcard"/> property is computed
	  as if there were an <eltref ref="attributeGroup" inside="simpleContent"/>
	  <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">child</xpropref> with empty content and a <code>ref</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>
	  whose <termref def="key-vv">actual value</termref> is the same as that of the
	  <code>defaultAttributes</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> appearing after any
	  other <eltref ref="attributeGroup" inside="simpleContent"/>
	  <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>. Otherwise proceed as if there were no such
	  <eltref ref="attributeGroup" inside="simpleContent"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">child</xpropref>.</p>
         <olist>
	  <!--*
* material suppressed here by diff group b5286e *
*-->
	  <!--*
* material suppressed here by diff group b5286e *
*-->
	  <item dg="b5286e">
	   <p><termdef id="key-eaw" term="complete wildcard" role="local">Let the <term>complete wildcard</term> be the
	     <compref ref="w"/> computed <!--*
* material suppressed here by diff group b5286e2 *
*--><phrase dg="b5286e2">as described in 
	      <specref ref="declare-attributeGroup-wildcard"/></phrase>.</termdef>
	   </p></item>
	  <item>
	   <p>The value is then determined by
	    <olist role="caseval">
	     <item>
	      <p role="if"><!--* the <eltref ref="restriction"
		inside="simpleContent"/> alternative is chosen *-->
	       <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152"><propref comp="ctd" prop="derivation method"/> = <pt>restriction</pt></phrase></p>
	      <p role="then">the <termref def="key-eaw">complete
		wildcard</termref>;</p>
	     </item>
	     <item>
	      <p role="if"><!--* the <eltref ref="extension"
		inside="simpleContent"/> alternative is chosen *-->
	       <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152"><propref comp="ctd" prop="derivation method"/> = <pt>extension</pt></phrase></p>
	      <p role="then">
	       <olist>
		<item>
		 <p><termdef id="key-baw" term="base wildcard" role="local">let the <term>base wildcard</term> be
		   defined as</termdef>
		  <olist role="caseval">
		   <item>
		    <p role="if">the 
		     <!--* type definition &resolved_src; to
		     by the &v-value; of the <code>base</code>
		     &i-attribute; 
		     *-->
		     <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152"><propref comp="ctd" prop="base type definition"/></phrase> 
		     is a complex type definition with an
		     <propref comp="ctd" prop="attribute         wildcard"/></p>
		    <p role="then">that <propref comp="ctd" prop="attribute wildcard"/>.</p>
		   </item>
		   <item>
		    <p role="otherwise"><termref def="key-null">absent</termref>.</p>
		   </item>
		  </olist>
		 </p>
		</item>
		<item>
		 <p>The value is then determined by
		  <olist role="caseval-first">
		   <!--*
* material suppressed here by diff group b5286b *
*-->     
		   <!--*
* material suppressed here by diff group b5286b *
*-->
		   <item dg="b5286b">
		    <p role="if">the <termref def="key-baw"/> is
		     <termref def="key-null">absent</termref></p>
		    <p role="then">the <termref def="key-eaw"/>;</p>
		   </item>
		   <item dg="b5286b">
		    <p role="if">the <termref def="key-eaw"/> is
		     <termref def="key-null">absent</termref></p>
		    <p role="then">the <termref def="key-baw"/>;</p>
		   </item>
		   <!--*
* material suppressed here by diff group add.xxx.b6163.del.as.del *
*-->
		   <!--*
* material suppressed here by diff group b6163-silent *
*-->
		   <item dg="b6163"><p role="otherwise">
		    a wildcard whose <propref comp="w" prop="process contents"/> and
		    <propref comp="w" prop="annotations"/> are those of the
		    <termref def="key-eaw"/>, and whose <propref comp="w" prop="namespace constraint"/>
		    is the	wildcard	union of the <propref comp="w" prop="namespace constraint"/>
		    of the <termref def="key-eaw"/> and of the <termref def="key-baw"/>, as
		    defined in <specref ref="cos-aw-union"/>.
		   </p></item>
		  </olist></p>
		</item>
	       </olist>
	      </p>
	     </item>
	    </olist></p>
	  </item>
	 </olist>
	</propmap>

       </reprcomp>
      </reprdef>

      <!--*
* material suppressed here by diff group add-b2861cc-1.b5152-movement *
*-->

      <!--*
* material suppressed here by diff group b5194 *
*-->
      <!--*
* material suppressed here by diff group add-b5194.b5152-movement *
*-->
      <!--*
* material suppressed here by diff group b5152-movement *
*-->
      
      <!--*
* material suppressed here by diff group add-b2195.b5152-movement *
*-->
      
      <!--*
* material suppressed here by diff group add-b5286d.b5152-movement *
*-->
      <!--*
* material suppressed here by diff group b5152-movement *
*-->
      
     </div4>

<div4 id="dcl.ctd.exx" dg="b5152-movement">
<head dg="b5152">Examples of Complex Type Definitions</head>
       

<!--*
* material suppressed here by diff group b5194 *
*-->
 
<example dg="b5194">
<!--* <note dg="b5194" role="example"> *-->
<head>Three ways to define a type for length</head>
<p>The following declaration defines a type for specifications of length
by creating a complex type with simple content, with
<code>xs:nonNegativeInteger</code> as the type of the 
content, and a <code>unit</code> attribute to give the
unit of measurement.</p>
<eg xml:space="preserve">&lt;xs:complexType name="length1"&gt;
 &lt;xs:simpleContent&gt;
  &lt;xs:extension base="xs:nonNegativeInteger"&gt;
   &lt;xs:attribute name="unit" type="xs:NMTOKEN"/&gt;
  &lt;/xs:extension&gt;
 &lt;/xs:simpleContent&gt;
&lt;/xs:complexType&gt;

&lt;xs:element name="width" type="length1"/&gt;
</eg>
<p>An instance using this type might look like this:</p>
<eg xml:space="preserve">  &lt;width unit="cm"&gt;25&lt;/width&gt;
</eg>
<p>A second approach to defining length
uses two elements, one for size and one for the unit of 
measure.  The definition of the type and the
declaration of the element might look like this:
</p>
<eg xml:space="preserve">&lt;xs:complexType name="length2"&gt;
 &lt;xs:complexContent&gt;
  &lt;xs:restriction base="<phrase dg="rq17-x">xs:anyType</phrase><!--*
* material suppressed here by diff group rq17-x *
*-->"&gt;
   &lt;xs:sequence&gt;
    &lt;xs:element name="size" type="xs:nonNegativeInteger"/&gt;
    &lt;xs:element name="unit" type="xs:NMTOKEN"/&gt;
   &lt;/xs:sequence&gt;
  &lt;/xs:restriction&gt;
 &lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;

&lt;xs:element name="depth" type="length2"/&gt;
</eg>
<p>An instance using this method might look like this:</p>
<eg xml:space="preserve">  &lt;depth&gt;
   &lt;size&gt;25&lt;/size&gt;&lt;unit&gt;cm&lt;/unit&gt;
  &lt;/depth&gt;</eg>
<p>A third definition of type leaves the base type
implicit; at the component level, the following declaration
is equivalent to the preceding one.</p>
<eg xml:space="preserve">&lt;xs:complexType name="length3"&gt;
 &lt;xs:sequence&gt;
  &lt;xs:element name="size" type="xs:nonNegativeInteger"/&gt;
  &lt;xs:element name="unit" type="xs:NMTOKEN"/&gt;
 &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;</eg>
</example>

<note role="example"><!--* this example lost in 1.6.2.301, restored 19 Mar 2008 *-->
   <eg xml:space="preserve">&lt;xs:complexType name="personName"&gt;
 &lt;xs:sequence&gt;
  &lt;xs:element name="title" minOccurs="0"/&gt;
  &lt;xs:element name="forename" minOccurs="0" maxOccurs="unbounded"/&gt;
  &lt;xs:element name="surname"/&gt;
 &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;

&lt;xs:complexType name="extendedName"&gt;
 &lt;xs:complexContent&gt;
  &lt;xs:extension base="personName"&gt;
   &lt;xs:sequence&gt;
    &lt;xs:element name="generation" minOccurs="0"/&gt;
   &lt;/xs:sequence&gt;
  &lt;/xs:extension&gt;
 &lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;

&lt;xs:element name="addressee" type="extendedName"/&gt;

  &lt;addressee&gt;
   &lt;forename&gt;Albert&lt;/forename&gt;
   &lt;forename&gt;Arnold&lt;/forename&gt;
   &lt;surname&gt;Gore&lt;/surname&gt;
   &lt;generation&gt;Jr&lt;/generation&gt;
  &lt;/addressee&gt;</eg>
   <p>A type definition for personal names, and a definition <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> by
extension which adds a single element; an element declaration referencing the
<!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> definition, and a <termref def="key-vn">valid</termref> instance thereof.</p>
  </note>
 
<note role="example">
   <eg xml:space="preserve">&lt;xs:complexType name="simpleName"&gt;
 &lt;xs:complexContent&gt;
  &lt;xs:restriction base="personName"&gt;
   &lt;xs:sequence&gt;
    &lt;xs:element name="forename" minOccurs="1" maxOccurs="1"/&gt;
    &lt;xs:element name="surname"/&gt;
   &lt;/xs:sequence&gt;
  &lt;/xs:restriction&gt;
 &lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;

&lt;xs:element name="who" type="simpleName"/&gt;

   &lt;who&gt;
    &lt;forename&gt;Bill&lt;/forename&gt;
    &lt;surname&gt;Clinton&lt;/surname&gt;
   &lt;/who&gt;</eg>
   <p>A simplified type definition
<!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> from the base type from the previous example by restriction, eliminating 
one optional <!--*
* material suppressed here by diff group b5194 *
*--><phrase dg="b5194">child</phrase> and
fixing another to occur exactly once; an element declared by reference to it,
and a <termref def="key-vn">valid</termref> instance thereof.</p>
  </note>
 <note role="example">
  <eg xml:space="preserve">&lt;xs:complexType name="paraType" mixed="true"&gt;
 &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
  &lt;xs:element ref="emph"/&gt;
  &lt;xs:element ref="strong"/&gt;
 &lt;/xs:choice&gt;
 &lt;xs:attribute name="version" type="xs:<!--*
* material suppressed here by diff group b1915bis *
*--><phrase dg="b1915bis">decimal</phrase>"/&gt;
&lt;/xs:complexType&gt;</eg>
  <p>A<phrase dg="b5141">n</phrase><!--*
* material suppressed here by diff group b5141 *
*--> illustration of the abbreviated form, with the
<code>mixed</code> attribute appearing on <code>complexType</code> itself.</p>
 </note>

<note role="example" dg="vm13">
 <eg xml:space="preserve">&lt;xs:complexType name="name"&gt;<!--*
* material suppressed here by diff group vm13-2 *
*--><phrase dg="vm13-2">
  &lt;xs:openContent&gt;
    &lt;xs:any namespace="##other" processContents="skip"/&gt;
  &lt;/xs:openContent&gt;</phrase>
  &lt;xs:sequence&gt;
    &lt;xs:element name="given" type="xs:string"/&gt;
    &lt;xs:element name="middle" type="xs:string" minOccurs="0"/&gt;
    &lt;xs:element name="family" type="xs:string"/&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;</eg>
 <p>
  A complex type definition that
  <!--*
* material suppressed here by diff group vm13-2 *
*-->
  <phrase dg="vm13-2">allows three explicitly declared child
  elements, in the specified order (but not necessarily adjacent), and
  furthermore allows additional elements of any name from any namespace other
  than the target namespace to appear anywhere in the children.</phrase>
 </p>
</note>
     
 <note role="example" dg="b2867-2">
  <p>To restrict away a local element declaration that <termref def="key-compete">competes</termref> with
   a wildcard, use a wildcard in the derived type that explicitly
   disallows the element's <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref>.  For example:</p>
  <eg xml:space="preserve">&lt;xs:complexType name="computer"&gt;
 &lt;xs:all&gt;
  &lt;xs:element name="CPU"<phrase dg="b5157"> type="CPUType"</phrase>/&gt;
  &lt;xs:element name="memory"<phrase dg="b5157"> type="memoryType"</phrase>/&gt;
  &lt;xs:element name="monitor"<phrase dg="b5157"> type="monitorType"</phrase>/&gt;
  &lt;xs:element name="speaker" <phrase dg="b5157">type="speakerType"
              </phrase>minOccurs="0"/&gt;
  &lt;!-- Any additional information about the computer --&gt;
  &lt;xs:any processContents="lax"<phrase dg="b5157">
          minOccurs="0" maxOccurs="unbounded"</phrase>/&gt;
 &lt;/xs:all&gt;
&lt;/xs:complexType&gt;

&lt;xs:complexType name="quietComputer"&gt;
 &lt;xs:complexContent&gt;
  &lt;xs:restriction base="computer"&gt;
   &lt;xs:all&gt;
    &lt;xs:element name="CPU"<phrase dg="b5157"> type="CPUType"</phrase>/&gt;
    &lt;xs:element name="memory"<phrase dg="b5157"> type="memoryType"</phrase>/&gt;
    &lt;xs:element name="monitor"<phrase dg="b5157"> type="monitorType"</phrase>/&gt;
    &lt;!-- Any additional information about the computer --&gt;
    &lt;xs:any processContents="lax" notQName="speaker"<phrase dg="b5157">
            minOccurs="0" maxOccurs="unbounded"</phrase>/&gt;
   &lt;/xs:all&gt;
  &lt;/xs:restriction&gt;
 &lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;</eg>
  <p dg="b5157">The restriction type <code>quietComputer</code> has
   a <pt>lax</pt> wildcard, which <termref def="key-wc-match">matches</termref> any element but one with the name
   <code>speaker</code>.</p>
  <p>Without the specification of the <code>notQName</code> attribute,
   <!--*
* material suppressed here by diff group b5157 *
*-->
   <phrase dg="b5157">the wildcard would <termref def="key-wc-match">match</termref> elements named
   <code>speaker</code>, as well.  In that case, the restriction 
   would be valid only if there is a
   top-level declaration for <el>speaker</el> that also has type
   <code>speakerType</code> or a type derived from it. 
   Otherwise, there would be instances locally valid against the restriction
   <code>quietComputer</code> that are not locally valid against the base type 
   <code>computer</code>.</phrase></p>
  <p dg="b5157">
   For example, if there is no <code>notQName</code> attribute on the wildcard and 
   no top-level declaration for <el>speaker</el>, then the following is allowed
   by <code>quietComputer</code>, but not by <code>computer</code>:
  </p>
  <eg dg="b5157" xml:space="preserve">   &lt;speaker xsi:type="xs:string"/&gt;</eg>
  <!--*
* material suppressed here by diff group b5157 *
*-->
  <!--*
* material suppressed here by diff group b5157 *
*-->
  <p dg="b5157">The specific rule violated in this case  
   is <clauseref ref="ctr-child-type-subsumption"/> of 
   constraint <specref ref="cos-content-act-restrict"/>  </p>
 </note>
</div4>
</div3>

    <div3 id="sec-src-ct">
      <head>Constraints on <phrase dg="b5159b">XML Representations of Complex Type Definitions</phrase><!--*
* material suppressed here by diff group b5159b *
*--></head>
      <constraintnote id="src-ct" type="src">
      <head>Complex Type Definition Representation OK</head>

      <p>In addition to the conditions imposed on <eltref ref="complexType"/> element information items by the schema for schema<!--*
* material suppressed here by diff group b2067-2e *
*--><phrase dg="b2067-2e"> documents</phrase>,
       <olist role="and.apply">
	<!--*
* material suppressed here by diff group b5286b *
*-->
	<item id="simple-content-rules">
	 <p>If the <eltref ref="simpleContent"/> alternative is chosen,
	  <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">the <!--*
* material suppressed here by diff group b5934 *
*-->
	   <phrase dg="b5934"><eltref ref="complexType"/></phrase> element <rfc2119>must not</rfc2119> 
	   have <code>mixed</code> = <pt>true</pt>.
	   </phrase>
	  <!--*
* material suppressed here by diff group b5286b *
*-->
	 </p>            
	 <!--*
* material suppressed here by diff group cleanup-1 *
*-->
	</item>
	<!--*
* material suppressed here by diff group b5286 *
*-->
	<!--*
* material suppressed here by diff group b2867-1 *
*-->
	<!--* nb all-2506-3 has not been adopted (2008-02-27), so not deleted by 5286 *-->
	<!--*
* material suppressed here by diff group all-2506-3 *
*-->
	<!--*
* material suppressed here by diff group add.vm19.b5286 *
*-->
	<!--*
* material suppressed here by diff group vm19.b5286.del *
*-->
	<item dg="vm13-3"><p>
	  If <eltref ref="openContent"/> is present 
	  and <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">has
	  <code>mode</code> ≠ <code>'none'</code></phrase>, 
	  then there
	  <rfc2119>must</rfc2119> be an <eltref ref="any"/> among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of
	  <eltref ref="openContent"/>.
	 </p></item>
	<item diff="add" dg="b7069">
	 <p>If <eltref ref="openContent"/> is present 
	  and has <code>mode</code> = <code>'none'</code>, 
	  then there <rfc2119>must not</rfc2119> be an <eltref ref="any"/> among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of
	  <eltref ref="openContent"/>.
	 </p>
	</item>
	<item id="ccmixed-eq-ctmixed" dg="b2197"><p>
	  If the <eltref ref="complexContent"/> alternative is chosen and the
	  <code>mixed</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is present on both
	  <eltref ref="complexType"/> and <eltref ref="complexContent"/>,
	  then <termref def="key-vv">actual values</termref> of those <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref>
	  <rfc2119>must</rfc2119> be the same.
	 </p></item>
       </olist>
      </p>
     </constraintnote>

     <!--*
* material suppressed here by diff group b5286b-en *
*-->
     <!--*
* material suppressed here by diff group b5286b-en *
*-->
     <!--*
* material suppressed here by diff group b5286b-en *
*-->
     <!-- <ednote diff="add" dg="b5286b-en">
      <edtext>The rule expressed by <clauseref ref="att-wc-union-ok"/>
       is covered, less directly, by the XML mapping rules for complex types
       (specifically the rule for {attribute wildcard}), which require
       that a certain XML structure map to a particular wildcard union,
       and the definition of attribute wildcard union in
       <specref ref="cos-aw-union"/>, which 
       says of inexpressible unions that any rule requiring them to be
       expressed (here:  the XML mapping rule) <quote>cannot be
       satisfied</quote>.
       It might be useful to have a general note pointing out that,
       depending on context, the XML mapping rules do not always map
       source declarations in conforming schema documents into
       components that satisfy all constraints.
      </edtext>
     </ednote> -->
     <!--*
* material suppressed here by diff group b5286b-en *
*-->
    </div3>
    <div3 id="formal-complex-type">
    <head>Complex Type Definition Validation Rules</head>

     <div4 id="sec-cdtt" dg="b5165a">
      <head dg="b5165a"><!--*
* material suppressed here by diff group b5195 *
*--><phrase dg="b5195">Locally Declared Type</phrase> and Context-determined Type Table</head>

      <p dg="b6009">This section defines the concepts of
      <termref def="key-ldtype"/> and <termref def="key-cdtat"/>;
      these concepts play a role in determining whether restrictions
      and extensions of complex type definitions are legitimate.
      The <termref def="key-ldtype"/>
      is also used to help determine the <termref def="key-governing-ed"/> and
      <termref def="key-governing-type-elem"/> of an element information item.</p>

      <p dg="b5195"><!--*
* material suppressed here by diff group b4690 *
*-->
      <termdef id="key-ldtype" term="locally declared type" dg="b4690">
	Every <compref ref="ctd"/> determines a partial functional mapping from
	element <phrase dg="rq17a2">or attribute</phrase>
	information items (and their <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded names</xspecref>) to type
	definitions.  This mapping serves as a <term>locally declared type</term>
 for elements <!--*
* material suppressed here by diff group rq17a2 *
*-->
	<phrase dg="rq17a2">and attributes which are allowed by</phrase>
	the <compref ref="ctd"/>.</termdef></p>
      
      <p dg="b5195"><!--* originally added elsewhere, for rq17a2,
       moved here and modifed slightly by b5195 *-->
       The attribute case is simpler and will be taken first.</p>
      <p dg="b5195">
       <termdef id="key-ldt-att" term="locally declared type">
	For a given <compref ref="ctd"/> <var>CTD</var> and a given attribute
	information item <var>A</var>, the <!--*
* material suppressed here by diff group b4690 *
*-->
 <termref def="key-ldtype" dg="b4690"/> of
	<var>A</var> within <var>CTD</var> is
	<olist role="caseval">
	 <item id="dummy3"><p role="if">
	   <var>CTD</var> is <termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref>
	  </p><p role="then">
	   <!--*
* material suppressed here by diff group vm3a *
*-->
	   <phrase dg="vm3a"><termref def="key-null">absent</termref>.</phrase>
	  </p></item>
	 <item><p role="if">
	   <var>A</var><!--*
* material suppressed here by diff group ep20b *
*--><phrase dg="ep20b"> has the same <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> as</phrase> some
	   attribute declaration <var>D</var> which is the
	   <propref comp="au" prop="attribute declaration"/> of some
	   <compref ref="au"/> contained by <var>CTD</var>'s
	   <propref comp="ctd" prop="attribute uses"/>
	  </p><p role="then">
	   the <propref comp="ad" prop="type definition"/> of <var>D</var>.
	  </p></item>
	 <item><p role="otherwise">
	   the <!--*
* material suppressed here by diff group b4690 *
*-->
	   <termref def="key-ldtype" dg="b4690"/> of <var>A</var> within 
	   <var>CTD</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="ctd" prop="base type definition"/>.
	  </p></item>
	</olist>
       </termdef>
      </p>

      <!--* 2008-01-30: MSM unilaterally changes the end-tag of this 
      definition to the logical place.  I think the end-tag was put before the list
      because when rq146-2 was done definitions could not contain lists.
      They can now, because we need them for cases like this. *-->
      <!--* 2008-03-05 : change it again, to deal with bug 5195 *-->
      <p dg="b5195">The definition for elements is slightly
	more complex.</p>
      <p dg="rq146-2">
       <!--*
* material suppressed here by diff group b5195 *
*-->
       <termdef id="key-ldt-elem" term="locally declared type">
	<!--*
* material suppressed here by diff group b5195 *
*-->
	For a given <compref ref="ctd"/>
	<var>CTD</var> and a given element information item <var>E</var>, the
	<!--*
* material suppressed here by diff group rq17a2 *
*-->
	<phrase dg="rq17a2"><!--*
* material suppressed here by diff group b4690 *
*-->
	<termref def="key-ldtype" dg="b4690"/></phrase> of
	<var>E</var> within <var>CTD</var> is 
	<olist role="caseval">
	 <item id="dummy1"><p role="if">
	   <var>CTD</var> is <termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref><!--*
* material suppressed here by diff group b4467 *
*-->
	  </p><p role="then">
	   <!--*
* material suppressed here by diff group vm3a *
*-->
	   <phrase dg="vm3a"><termref def="key-null">absent</termref>.</phrase>
	  </p></item>
	 <item><p role="if">
	   <var>E</var><!--*
* material suppressed here by diff group ep20b *
*-->
	   <phrase dg="ep20b">has the same <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> as</phrase>
	   some element declaration <var>D</var> which is <termref def="key-contain-xpx">contained</termref> by <var>CTD</var>'s
	   content model, whether <termref def="key-contain-dpt">directly</termref>, <termref def="key-contain-ipx">indirectly</termref>, or <termref def="key-impl-cont">implicitly</termref>
	  </p><p role="then">
	   <phrase dg="rq146-3">the
	    <phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/> of <var>D</var>.</phrase>
	   <!--*
* material suppressed here by diff group rq146-3 *
*--></p></item>
	 <item><p role="otherwise">
	   <!--*
* material suppressed here by diff group rq146-3 *
*-->
	   <phrase dg="rq146-3">the <!--*
* material suppressed here by diff group b4690 *
*-->
	    <termref def="key-ldtype" dg="b4690"/> of
	    <var>E</var> within 
	    <var>CTD</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="ctd" prop="base type definition"/>.</phrase>
	  </p></item>
	</olist>
       </termdef>
     </p>
     <note dg="rq146-2">
      <p>The constraint <specref ref="cos-element-consistent"/>
       ensures that even if there is more than one such declaration
       <var>D</var>, there will be just one type definition.
      </p>
     </note>
     <note dg="rq146-2">
      <p>The reference to <termref def="key-impl-cont">implicit</termref>
       containment ensures that if <var>E</var> has a 
       <termref def="key-governing-ed"/> <termref def="key-validly-sub"/> for a declaration 
       <termref def="key-contain-xpx">contained</termref>
       by <var>CTD</var>'s content model, a <!--*
* material suppressed here by diff group b4690 *
*-->
	      <termref def="key-ldtype" dg="b4690"/>
       is defined for <!--*
* material suppressed here by diff group trimtree *
*--><phrase dg="trimtree"><var>E</var></phrase>.</p>
     </note>

     <p dg="cta-cprt">Similarly: <termdef id="key-cdtat" term="context-determined type table">Every <compref ref="ctd"/> 
      determines a partial functional mapping from element 
      information items (and their <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded names</xspecref>) to <compref ref="tt"/>s.
      The <compref ref="tt"/> identified by this mapping is the <term>context-determined
      type table</term> for elements which match a
      <compref ref="p"/> contained by the content model of
      the <compref ref="ctd"/>.</termdef> For a given <compref ref="ctd"/>
      <var>T</var> and a given element information item <var>E</var>, the 
      <termref def="key-cdtat"/> of <var>E</var> in <var>T</var> is as follows:
      <phrase id="anchor6561"/>
      <olist>
       <item dg="b6561b">
        <p role="if"><var>T</var> is <termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref></p>
	       <p role="then"><var>E</var> has no <termref def="key-cdtat"/> in <var>T</var>.</p>
       </item>
       <item id="cdtat-elemdecl">
	<p>Let <var>D</var> be an <compref ref="ed"/> matched by <var>E</var>, given by
	 <olist role="caseval-first">
	  <item id="cdtat-localelem">
	   <p role="if"><var>E</var><!--*
* material suppressed here by diff group ep20b *
*--> <phrase dg="ep20b">has
	      the same <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> as</phrase> some element
	    declaration(s) <termref def="key-contain-xpx">contained</termref> by <var>T</var>'s
	    content model, whether <termref def="key-contain-dpt">directly</termref>,
	    <!--*
* material suppressed here by diff group cta-r1 *
*--> 
	    <termref def="key-contain-ipx">indirectly</termref><!--*
* material suppressed here by diff group cta-r1 *
*--><phrase dg="cta-r1">,
	     or <termref def="key-impl-cont">implicitly</termref></phrase></p>
	   <p role="then">let <var>D</var> be any one of those <compref ref="ed"/>s.</p>
	  </item>
	  <item>
	   <p role="if"><var>E</var> <termref def="key-wc-match">matches</termref> some <phrase dg="b6561a">
	    <pt>strict</pt> or <pt>lax</pt></phrase> wildcard particle
	    <termref def="key-contain-xpx">contained</termref> by <var>T</var>'s
	    content model, whether <termref def="key-contain-dpt">directly</termref>
	    or <termref def="key-contain-ipx">indirectly</termref>,</p>
	   <p role="if"> <var>E</var> <termref def="key-en-match">matches</termref> some top-level <compref ref="ed"/></p>
	   <p role="then">let <var>D</var> be that top-level <compref ref="ed"/>.</p>
	  </item>
	 </olist>
	</p>
       </item>
       <item>
	<p>If <var>E</var> matches some <compref ref="ed"/> as described above in
	 <clauseref ref="cdtat-elemdecl"/>, then 
	 the <termref def="key-cdtat"/> of <var>E</var> in <var>T</var> is given by
	 <olist role="caseval">
	  <item id="cdtat-has-tat">
	   <p role="if"><var>D</var> has a <compref ref="tt"/></p>
	   <p role="then">the <termref def="key-cdtat"/> of <var>E</var> in <var>T</var> is
	    the <compref ref="tt"/> of <var>D</var>.
	   </p>
	  </item>
	  <item id="cdtat-notat">	
	   <p role="if"><var>D</var> has no <compref ref="tt"/></p>
	   <p role="then">the <termref def="key-cdtat"/> of <var>E</var> in <var>T</var> is
	    the <compref ref="tt"/> whose <propref prop="alternatives" comp="tt"/> is the empty sequence
	    and whose <propref prop="default type definition" comp="tt"/> is <phrase dg="cta-ta">a <!--*
* material suppressed here by diff group cta-ta *
*--><compref ref="tac" dg="cta-ta"/> whose
	    <!--*
* material suppressed here by diff group cta-ta *
*--><propref prop="test" comp="tac" dg="cta-ta"/> is <termref def="key-null">absent</termref> and whose <!--*
* material suppressed here by diff group cta-ta *
*--><propref prop="type definition" comp="tac" dg="cta-ta"/> is</phrase>
	    the declared <propref prop="type definition" comp="ed"/> of <var>D</var>.
	   </p>
	  </item>
	 </olist>
	</p>
       </item>
       <item id="cdtat-ghost">
	<p>If <var>E</var> matches no <compref ref="ed"/> as described above in
	 <clauseref ref="cdtat-elemdecl"/>, then<!--*
* material suppressed here by diff group b6561b *
*-->
	 <phrase dg="b6561b">the <termref def="key-cdtat"/> of <var>E</var> in <var>T</var>
	 is the <termref def="key-cdtat"/> of <var>E</var> in <var>T</var>'s <!--*
* material suppressed here by diff group wd-200708-1 *
*--><phrase dg="wd-200708-1"><propref comp="ctd" prop="base type definition"/></phrase>.</phrase>
	 <!--*
* material suppressed here by diff group b6561b *
*-->
	</p>
       </item>
      </olist>
 
      <!--*
* material suppressed here by diff group cta-xx *
*-->
      
      <note dg="cta-rt">
       <p>The constraint <specref ref="cos-element-consistent"/>
	ensures that even if <var>E</var> <termref def="key-en-match">matches</termref> more than one such declaration
	<var>D</var>, there will be just one <termref def="key-cdtat"/>.
       </p>
      </note>
      <note dg="cta-r2">
       <p>It is a consequence of the definition of <termref def="key-cdtat"/>
	that if any element <var>E</var> has a <termref def="key-cdtat"/> in any 
	complex type <var>T</var>, then <var>E</var> has a <termref def="key-cdtat"/> in any 
	complex type derived from <var>T</var>.</p>
      </note>
     </p>

     <!--*
     <ednote diff="add" dg="cta-r2">
      <edtext>Note that <clauseref ref="cdtat-ghost"/> of the definition of
       <termref def="key-cdtat"/>, together with 
       <clauseref ref="cta-substitutable-extension"/> of    
       the constraint <specref ref="vr-cta-substitutable"/>,
       together form the conditional-type analog of the
       <quote>run-time EDC</quote> constraint.  They ensure that if a type
       has an optional element with a &ed-type-table;, restricted away
       by a restriction of the type, then no extension of the restriction
       can reintroduce the element with an incompatible type table.
      </edtext>
     </ednote>
     *-->

     <!--*
* material suppressed here by diff group add.rq17a2.b5195 *
*-->
     <!--*
* material suppressed here by diff group rq17a2.b5195.del *
*-->

     </div4>

     <div4 id="sec-cvc-complex-type" dg="b5165a">
      <head dg="b5165a">Element Locally Valid (Complex Type)</head>

     <constraintnote type="cvc" id="cvc-complex-type">
      <head>Element Locally Valid (Complex Type)</head>
      <p>For an element information item <phrase dg="cta-down"><var>E</var></phrase>
       to be locally <termref def="key-vn">valid</termref> with respect to a 
       complex type definition <phrase dg="cta-down"><var>T</var></phrase>
       <olist role="and">
	<!--* <item> ALV ALV ALV *-->
	<!--*
* material suppressed here by diff group rq17p *
*-->
	<item id="c-cvct">
	 <p>If <!--*
* material suppressed here by diff group b5195 *
*--><phrase dg="b5195"><var>E</var> is not <termref def="key-nilled"/></phrase>, then <!--*
* material suppressed here by diff group b5193 *
*--><olist role="andtest" dg="b5193">
	   <item>
	    <p role="if"><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>T</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/> =</phrase> 
	      <pt>empty</pt></p>
	     <p role="then"><!--*
* material suppressed here by diff group ep19b *
*--><phrase dg="ep19b"><var>E</var></phrase> has no character or element information item <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>.</p>
	   </item>
	   <item id="c-sv2">
	    <p role="if"><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>T</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/> =</phrase> 
	       <pt>simple</pt></p>
	     <p role="then"><!--*
* material suppressed here by diff group ep19b *
*--><phrase dg="ep19b"><var>E</var></phrase> has no element
	      information item <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, and the <!--*
* material suppressed here by diff group b3251i *
*--><phrase dg="b3251i"><termref def="key-iv">initial value</termref></phrase> of <!--*
* material suppressed here by diff group ep19b *
*--><phrase dg="ep19b"><var>E</var></phrase>
	     is <termref def="key-vn">valid</termref> with respect 
	     to <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>T</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="simple type definition"/></phrase>
	       as defined 
	       by <specref ref="cvc-simple-type"/>.</p>
	   </item>
	   <item>
	    <p role="if"><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>T</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/> =</phrase>
	       <pt>element-only</pt></p>
	     <p role="then"><!--*
* material suppressed here by diff group ep19b *
*--><phrase dg="ep19b"><var>E</var></phrase> has no character information item <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> other
	      than those whose <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.character">character code</xpropref> is defined as 
	     a <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-S">white space</xtermref>
	     in <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/>.
	     <!--*
* material suppressed here by diff group b5193 *
*-->
	    </p>
	   </item>
	   <item>
	    <p role="if"><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>T</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/> =</phrase>
	       <pt>element-only</pt> or
	      <phrase dg="ep24"><var>T</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/> =</phrase>
	      <pt>mixed</pt></p>
	    <p role="then">the sequence of <!--*
* material suppressed here by diff group ep24 *
*--> element
	      information item<phrase dg="ep24">s in
	       <var>E</var>.</phrase><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if any, taken in order, 
	      is <termref def="key-vn">valid</termref> with
	      respect to <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>T</var>.</phrase><propref comp="ctd" prop="content type"/><!--*
* material suppressed here by diff group vm13 *
*-->,
	      as defined in <!--*
* material suppressed here by diff group vm13 *
*-->
	      <phrase dg="vm13"><specref ref="cvc-complex-content"/>.</phrase></p>
	    
	   </item>
	  </olist></p>
	</item>
	<item id="c-aam">
	 <p>For each attribute information item <phrase dg="ep20"><var>A</var></phrase>
	   in <!--*
* material suppressed here by diff group ep19b *
*--><phrase dg="ep19b"><var>E</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> 
	   excepting those <!--*
* material suppressed here by diff group ep19b *
*--><phrase dg="ep19b">named <code>xsi:type</code>, <code>xsi:nil</code>, 
	   <code>xsi:schemaLocation</code>, or <code>xsi:noNamespaceSchemaLocation</code>
	   (see <specref ref="builtin-ads"/>)</phrase>,
	  <olist role="casetest">
	   <item id="c-ctma">
	     <p role="if">there is among the <propref comp="ctd" prop="attribute uses"/> an
	      attribute use <phrase dg="ep24"><var>U</var></phrase>
	      <!--*
* material suppressed here by diff group ep20b *
*--><phrase dg="ep20b">whose 
	       <propref comp="au" prop="attribute declaration"/> 
	       has the same <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> as <var>A</var></phrase>	      
	    </p>           
	    <p role="then"><!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>A</var></phrase> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> <phrase diff="add" dg="b5164">locally</phrase> <termref def="key-vn">valid</termref> 
	     with respect to <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>U</var></phrase> 
	      as per <specref ref="cvc-au"/>.  
	      In this case <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>U</var>.<propref comp="au" prop="attribute declaration"/></phrase> 
	      is the <termref def="key-dd">context-determined 
	      declaration</termref> for <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>A</var></phrase> with respect 
	     to <specref role="xref" ref="cvc-assess-attr"/> and 
	     <specref role="xref" ref="sic-a-outcome"/>.
	     <phrase dg="b3725">Also <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>A</var></phrase> is 
	      <termref def="key-att-to"/> <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>U</var></phrase>.</phrase></p>
	   </item>
	   <item id="c-avaw">
	    <p role="otherwise">
	     <olist role="andtest">
	      <item>
	       <p>There <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> an <propref comp="ctd" prop="attribute wildcard"/>.</p>
	      </item>
	      <item>
	       <p><!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>A</var></phrase> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> <termref def="key-vn">valid</termref> with respect 
		 to it as defined in <specref ref="cvc-wildcard"/>.</p>
	      </item>
	     </olist>
	     <phrase dg="b3725">In this case <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>A</var></phrase> is
	      <termref def="key-att-to"/> the <propref comp="ctd" prop="attribute wildcard"/>.</phrase>
	    </p>
	   </item>
	  </olist>
	 </p>
	</item>
	<item id="c-ra">
	 <!--*
* material suppressed here by diff group ep24 *
*-->
	 <p dg="ep24">For each attribute use <var>U</var>
	   in <var>T</var>.<propref comp="ctd" prop="attribute uses"/>,
	   if <var>U</var>.<propref comp="au" prop="required"/> = <pt>true</pt>,
	   then <var>U</var>.<propref comp="au" prop="attribute declaration"/> 
	   <!--*
* material suppressed here by diff group ep24 *
*--> 
	   <phrase dg="ep24">has the same
	    <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> as</phrase>
	   one of the attribute information items in
	   <!--*
* material suppressed here by diff group ep19b *
*--><phrase dg="ep19b"><var>E</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref><!--*
* material suppressed here by diff group ep24 *
*-->.</p>
	  <note dg="ep24">
	   <p>It is a consequence that each such <var>U</var> will have 
	    the matching attribute information item
	    <termref def="key-att-to"/> it by 
	    <clauseref ref="c-ctma"/> above.
	   </p>
	  </note>
	</item>
	<item dg="b2041"><p>
	   <!--*
* material suppressed here by diff group ep24-aux *
*-->
	  <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">For</phrase> each <termref def="key-dflt-att"/><phrase dg="ep24">
	    <var>A</var> belonging to <var>E</var></phrase>,
	  the <propref comp="vc_a" prop="lexical form"/> of 
	   <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>A</var>'s</phrase>
	  <termref def="key-evc"/> is <termref def="key-vn">valid</termref> with
	  respect to <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>A</var>.<propref comp="au" prop="attribute declaration"/>.<propref comp="a" prop="type definition"/></phrase> 
	   as defined by
	  <specref ref="cvc-simple-type"/>.
	 </p>
	 <note dg="ep19b">
	  <p>When an <propref comp="ctd" prop="attribute wildcard"/> is
	   present, this does <emph>not</emph> introduce any ambiguity with
	   respect to how attribute information items for which an attribute use
	   is present amongst the <propref comp="ctd" prop="attribute uses"/> whose name and target namespace match are
	   <termref def="key-va">assessed</termref>.  In such cases the attribute
	   use <emph>always</emph> takes precedence, and the <termref def="key-va"/> of such items stands or falls
	   entirely on the basis of the attribute use and its <propref comp="au" prop="attribute declaration"/>.  This follows from the details of
	   <clauseref ref="c-aam"/>.</p>
	 </note>
	</item>
	<!--*
* material suppressed here by diff group b4348 *
*-->
	<item dg="rq146-2"><p>
	  For each element information item <!--*
* material suppressed here by diff group rq17a2 *
*--> in 
	  <!--*
* material suppressed here by diff group ep19b *
*-->
	  <!--*
* material suppressed here by diff group rq17a2 *
*-->
	  <phrase dg="rq17a2"><!--*
* material suppressed here by diff group ep19b *
*--><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var>.</phrase><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>
	   and each attribute information item in 
	    <!--*
* material suppressed here by diff group ep19b *
*--><phrase dg="ep19b"><var>E</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref></phrase><!--*
* material suppressed here by diff group rq146-3 *
*-->, if
	  <phrase dg="vm3a">neither</phrase> the
	  <termref def="key-governing-type-elem"/> <phrase dg="vm3a">nor the
	  <!--*
* material suppressed here by diff group b4690 *
*-->
	  <termref def="key-ldtype" dg="b4690"/></phrase> <!--*
* material suppressed here by diff group rq17a2 *
*-->
	  is <!--*
* material suppressed here by diff group trimtree *
*--> <termref def="key-null">absent</termref>, then
	  <phrase dg="rq146-3"><!--*
* material suppressed here by diff group vm3a *
*-->
	   <phrase dg="vm3a">the <termref def="key-governing-type-elem"/></phrase> is the same as, or is
	   <termref def="key-val-sub-type"/> for, the <!--*
* material suppressed here by diff group b4690 *
*--><termref def="key-ldtype" dg="b4690"/>, <!--*
* material suppressed here by diff group cta-gst *
*--><phrase dg="cta-gst"><termref def="key-val-sub-type-absolute">without limitation</termref></phrase>.</phrase>
	  <!--*
* material suppressed here by diff group rq146-3 *
*-->
	 </p></item>
	<item id="c-as" dg="b2861cc-1">
	 <p><!--*
* material suppressed here by diff group ep19b *
*--><phrase dg="ep19b"><var>E</var></phrase> is <termref def="key-vn">valid</termref>
	  with respect to each of <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">the assertions in 
	    <var>T</var>.<propref comp="ctd" prop="assertions"/></phrase> as 
	  per <specref ref="cvc-assertion"/>.</p>
	</item>
	<!--*
* material suppressed here by diff group cta-xx *
*-->
 <item id="elv.checks.cta" dg="cta-wrap">
  <p><phrase dg="cta-r1">Each element information
   item in <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>E</var>.<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref></phrase>, 
   together with 
   <!--*
* material suppressed here by diff group cta-down *
*--><phrase dg="cta-r2"><var>T</var></phrase>,
   satisfies <specref ref="vr-cta-substitutable"/>.</phrase></p>
  <!--*
* material suppressed here by diff group cta-r3xx *
*-->
 </item>
       </olist>
      </p>
      <!--*
* material suppressed here by diff group ep19b *
*-->
     </constraintnote>

      <p dg="ep24">
       <termdef id="key-dflt-att" term="defaulted attribute">A
	<term>defaulted attribute</term> 
	<phrase dg="ep24">belonging to an element information item <var>E</var>
	 <termref def="key-governing-type-elem">governed by</termref> a complex type <var>T</var></phrase>
	is any <compref ref="au"/> 
	<phrase dg="ep24"><var>U</var>
	</phrase>
	for which
	<olist role="andtest">
	 <item><!--*
* material suppressed here by diff group ep24 *
*--><p dg="ep24">
	   <var>U</var> is a member of <var>T</var>.<propref comp="ctd" prop="attribute uses"/>.
	  </p></item>
	 <item><!--*
* material suppressed here by diff group ep24 *
*--><p dg="ep24">
	   <var>U</var>.<propref comp="au" prop="required"/> = <pt>false</pt>.
	  </p></item>
	 <item><p>
	   <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>U</var>'s</phrase> <termref def="key-evc"/> is not <termref def="key-null">absent</termref>.
	  </p></item>
	 <item dg="b4363"><p>
	   <var>U</var>.<propref comp="au" prop="attribute declaration"/> is not one
	   of the <compref ref="ad"/>s from <specref ref="builtin-ads"/>.
	  </p></item>
	 <item><p>
	   <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>U</var>.</phrase><propref comp="au" prop="attribute declaration"/> does not match
	   <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">any</phrase> of the 
	   attribute information items in <!--*
* material suppressed here by diff group ep19b *
*--><phrase dg="ep19b"><var>E</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> 
	   as per <clauseref ref="c-ctma"/> of
	   <specref ref="cvc-complex-type"/> above.
	  </p></item>
	</olist>
       </termdef></p>

     </div4>

     <div4 id="sec-cvc-complex-content" dg="b5165a">
      <head dg="b5165a">Element Sequence Locally Valid (Complex Content)</head>

    <constraintnote type="cvc" id="cvc-complex-content" dg="vm13">
     <head>Element Sequence Locally Valid (Complex Content)</head>
     <p>
      For a sequence <var>S</var> (possibly empty) of element information items
      to be locally <termref def="key-vn">valid</termref> with respect to a
      <compref ref="ct"/> <var>CT</var>,
	<olist role="case">
	 <item><p role="if">
	   <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>CT</var>.<propref comp="ct" prop="open content"/></phrase>
	    is <termref def="key-null">absent</termref>
	  </p>
	  <p role="then">
	   <var>S</var> is <termref def="key-vn">valid</termref> with respect
	   to <var>CT</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="ct" prop="particle"/>, as defined in
	   <specref ref="cvc-particle"/>.
	  </p></item>
	 <item><p role="if"><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>CT</var>.<propref comp="ct" prop="open content"/>.<propref comp="oc" prop="mode"/> = </phrase> 
	   <pt>suffix</pt>
	  </p><p role="then">
	   <var>S</var> can be represented as two subsequences <var>S1</var> and
	   <var>S2</var> (either can be empty) such that
	   <olist role="andtest">
	    <item><p>
	      <var>S</var> = <var>S1</var> + <var>S2</var>
	     </p></item>
	    <item><p>
	      <var>S1</var> is <termref def="key-vn">valid</termref> with respect
	      to <var>CT</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="ct" prop="particle"/>, as defined
	      in <specref ref="cvc-particle"/>.
	     </p></item>
	    <item><p>
	      If <var>S2</var> is not empty, let <var>E</var> be the first element
	      in <var>S2</var>, then <var>S1</var> + <var>E</var> does
	      <emph>not</emph> have a <termref def="key-path"/> in 
	      <var>CT</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="ct" prop="particle"/>
	     </p></item>
	    <item><p>
	      Every element in <var>S2</var> is
	      <termref def="key-vn">valid</termref> with respect to <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">the wildcard
	       <var>CT</var>.<propref comp="ct" prop="open content"/>.<propref comp="oc" prop="wildcard"/></phrase>, as defined in
	      <specref ref="cvc-wildcard"/>.
	     </p></item>
	   </olist>
	  </p></item>
	 <item><p role="otherwise">
	   (<!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>CT</var>.<propref comp="ct" prop="open content"/>.<propref comp="oc" prop="mode"/> = </phrase>
	   <pt>interleave</pt>) <var>S</var>
	   can be represented as two subsequences <var>S1</var> and <var>S2</var>
	   (either can be empty) such that
	   <olist role="andtest">
	    <item><p>
	      <var>S</var> is a member of <var>S1</var> × <var>S2</var>
	      <phrase dg="vm13-2">(where × is the interleave
	       operator, see <specref ref="all-mg"/>)</phrase>
	     </p></item>
	    <item><p>
	      <var>S1</var> is <termref def="key-vn">valid</termref> with
	      respect to <var>CT</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="ct" prop="particle"/>, as
	      defined in <specref ref="cvc-particle"/>.
	     </p></item>
	    <item><p>
	      For every element <var>E</var> in <var>S2</var>, let <var>S3</var> be
	      <!--*
* material suppressed here by diff group vm13-2 *
*-->
	      <phrase dg="vm13-2">the longest</phrase>
	      prefix of <var>S1</var> where members of <var>S3</var> are before
	      <var>E</var> in <var>S</var>, then <var>S3</var> + <var>E</var> does
	      <emph>not</emph> have a <termref def="key-path"/> in 
	      <var>CT</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="ct" prop="particle"/>
	     </p></item>
	    <item><p>
	      Every element in <var>S2</var> is
	      <termref def="key-vn">valid</termref> with respect to <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">the wildcard 
	       <var>CT</var>.<propref comp="ct" prop="open content"/>.<propref comp="oc" prop="wildcard"/></phrase>, 
	      as defined in
	      <specref ref="cvc-wildcard"/>.
	     </p></item>
	   </olist>
	  </p></item>
	</olist>
       </p>
      </constraintnote>
      
    <p dg="vm13"><termdef id="loc-locallyValid-seq" term="locally valid">
     A sequence of element information items is <term>locally valid</term> with
     respect to a <compref ref="ct"/> if and only if it satisfies
     <specref ref="cvc-complex-content"/> with respect to that <compref ref="ct"/>.
    </termdef></p>

     </div4>
     <div4 id="sec-particle-attribution" dg="b5165a">
      <head dg="b5165a">Attribution<!--*
* material suppressed here by diff group b5748 *
*-->
      </head>
     
    <p dg="vm13"><phrase id="anchor5748"/><termdef id="key-att-to" term="attributed to">
     During <termref def="key-vn">validation</termref> of an element
     information item against its (complex) <termref def="key-governing-type-elem"/>,
     associations <!--*
* material suppressed here by diff group ep999 *
*-->
     between element and attribute information items among the
     <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> and <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> on the one hand, and <phrase diff="add" dg="b6008a">the</phrase> attribute uses,
     attribute wildcard<phrase diff="del" dg="b6008a">s</phrase>, particles
     and open content<phrase diff="del" dg="b6008a">s</phrase><phrase diff="add" dg="b6008a">property record <!--*
* material suppressed here by diff group ep999 *
*--></phrase> on the other<phrase dg="ep999">, are
     established</phrase>. The element or attribute information item is
     <term>attributed to</term> the corresponding component.
    </termdef></p>
    <p dg="vm13"> 
     When <!--*
* material suppressed here by diff group ep20b *
*--><phrase dg="ep20b">an attribute information item
     has the same <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> as</phrase>
     the
     <propref comp="au" prop="attribute declaration"/> of an
     <compref ref="au"/>, then the item is <term>attributed to</term> that
     attribute use. Otherwise, if the item matches an attribute wildcard, as
     described in <specref ref="cvc-wildcard"/>, then the item is
     <term>attributed to</term> that wildcard. Otherwise the item is
     <emph>not</emph> <term>attributed to</term> any component.
    </p>
    <p dg="vm13">
     When a sequence <var>S</var> of <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">child</xpropref> element information items are checked
     against the <termref def="key-governing-type-elem"/>'s <propref comp="ctd" prop="content type"/>
     <var>CT</var>, let <var>S1</var> and <var>S2</var> be subsequences of <var>S</var>
     such that
     <olist role="andtest">
      <item><p>
       <var>S</var> is a member of <var>S1</var> × <var>S2</var>
      </p></item>
      <item><p>
       <var>S1</var> is a prefix of some element sequence that is
       <!--*
* material suppressed here by diff group f2f0610 *
*-->
       <phrase dg="f2f0610"><termref def="loc-locallyValid-seq"/></phrase>
       with respect to <var>CT</var>,
       as defined in <specref ref="cvc-complex-content"/>.
      </p></item>
      <item><p>
       for every element <var>E</var> in <var>S2</var>, let <var>S3</var> be
       <!--*
* material suppressed here by diff group vm13-2 *
*-->
       <phrase dg="vm13-2">the longest</phrase>
       prefix of <var>S1</var> where members of <var>S3</var> are before
       <var>E</var> in <var>S</var>, then <var>S3</var> + <var>E</var> is
       <emph>not</emph> a prefix of any element sequence that is
       <!--*
* material suppressed here by diff group f2f0610 *
*-->
       <phrase dg="f2f0610"><termref def="loc-locallyValid-seq"/></phrase>
       with respect to <var>CT</var>.
      </p></item>
     </olist>
     <phrase>Then members of <var>S1</var> that form a
      <!--*
* material suppressed here by diff group f2f0610 *
*--><phrase dg="f2f0610"><termref def="key-vpath"/></phrase> in
      <var>CT</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="ct" prop="particle"/> (see
      <specref ref="cvc-complex-content"/>) are <term>attributed to</term>
      the particles they match up with<phrase dg="f2f0610"> </phrase>in the
      <!--*
* material suppressed here by diff group f2f0610 *
*--><phrase dg="f2f0610"><termref def="key-vpath"/></phrase>. Other members of
      <var>S1</var> are <term>attributed to</term> the
      <propref comp="ct" prop="open content"/> of <var>CT</var>.
      Members of <var>S2</var> are <emph>not</emph> <term>attributed to</term>
      any component.</phrase>
    </p>
    <!--* <note diff="add" dg="vm13"><p>
     The above definition made sure that
     <termref def="key-att-to">attribution</termref> happens even when the
     sequence of element information items is not valid with respect to a
     particle. This affects how elements in such an invalid sequence are
     assessed.
    </p></note> *-->
    <note dg="vm13-1"><p>
     The above definition <!--*
* material suppressed here by diff group vm13-2 *
*-->
     <phrase dg="vm13-2">makes</phrase> sure that
     <termref def="key-att-to">attribution</termref> happens even when the
     sequence of element information items is not
     <termref def="loc-locallyValid-seq"/> with respect to a
     <compref ref="ct"/>. For example, if a complex type definition has the
     following content model:
<eg xml:space="preserve">   &lt;xs:sequence&gt;
     &lt;xs:element name="a"/&gt;
     &lt;xs:element name="b"/&gt;
     &lt;xs:element name="c"/&gt;
   &lt;/xs:sequence&gt;</eg>
     and an input sequence
<eg xml:space="preserve">   &lt;a/&gt;&lt;b/&gt;&lt;d/&gt;</eg>
     The<phrase dg="vm13-2">n</phrase> the element &lt;a&gt; is
     <termref def="key-att-to">attributed</termref> to the particle whose term is the
     "a" element declaration. Similarly, &lt;b&gt; is <termref def="key-att-to">attributed</termref> to the "b"
     particle.
    </p></note>

    <p dg="vm13">
     <termdef id="key-dd" term="context-determined declaration">
      During <termref def="key-vn">validation</termref>, associations between
      element and attribute information items among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> and
      <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> on the one hand, and element and attribute declarations on
      the other, are also established. When an item is <termref def="key-att-to">attributed</termref> to an
      <termref def="key-ep"/>, then it is associated with the declaration which is the
      <propref comp="p" prop="term"/> of the particle. Similarly, when an
      attribute information item is <termref def="key-att-to"/> an <compref ref="au"/>,
      then the item is associated with the
      <propref comp="au" prop="attribute declaration"/> of that
      <compref ref="au"/>. Such declarations are called the
      <term>context-determined declarations</term>.
     </termdef>
     See <clauseref ref="c-ctma"/> (in <specref ref="cvc-complex-type"/>)
     for attribute declarations, <clauseref ref="c-cdde"/> (in
     <specref ref="cvc-particle"/>) for element declarations.
    </p>

     </div4>
     <div4 id="sec-vr-cta-substitutable" dg="b5165a">
      <head dg="b5165a">Conditional Type Substitutable<!--*
* material suppressed here by diff group b6561c *
*--></head>

     <constraintnote id="vr-cta-substitutable" type="cvc" dg="cta-rt">
      <head>Conditional Type Substitutable<!--*
* material suppressed here by diff group b6561c *
*--></head>
      <p>Given an element information item <var>E</var> and a complex type <var>T</var>,
       let <ulist>
	<item>
	 <p><var>B</var> be the <!--*
* material suppressed here by diff group wd-200708-1 *
*--><phrase dg="wd-200708-1"><xpropref role="anon">base type definition</xpropref></phrase> of <var>T</var></p>
	</item>
	<item>
	 <p><var>T</var><sub><phrase><var>T</var></phrase></sub> be the <termref def="key-cdtat"/> of <var>E</var> in <var>T</var>, if any</p>
	</item>
	<item>
	 <p><var>T</var><sub><phrase><var>B</var></phrase></sub> be the <termref def="key-cdtat"/> of <var>E</var> in <var>B</var>, if any</p>
	</item>
	<item>
	 <p><var>S</var><sub><phrase><var>T</var></phrase></sub> be the <compref ref="td"/> 
	  <termref def="key-cta-select">conditionally selected</termref> for <var>E</var> 
	  by <var>T</var><sub><phrase><var>T</var></phrase></sub>, if <var>T</var><sub><phrase><var>T</var></phrase></sub> exists</p>
	</item>
	<item>
	 <p><var>S</var><sub><phrase><var>B</var></phrase></sub> be the <compref ref="td"/> <termref def="key-cta-select">conditionally
	   selected</termref> for <var>E</var> by <var>T</var><sub><phrase><var>B</var></phrase></sub>, if <var>T</var><sub><phrase><var>B</var></phrase></sub> exists</p>
	</item>
       </ulist>
       <var>E</var><!--*
* material suppressed here by diff group cta-r3xx *
*--> and <var>T</var> satisfy this constraint 
       if and only if
       <olist role="ortest" dg="cta-r2">
	<item id="cta-sub-basecase">
	 <p><var>T</var><sub><phrase><var>B</var></phrase></sub> does not exist (i.e. <var>E</var> has no <termref def="key-cdtat"/> in <var>B</var>).</p>
	</item>

	<item>
	 <p><var>T</var><sub><phrase><var>T</var></phrase></sub> and <var>T</var><sub><phrase><var>B</var></phrase></sub> both exist and at least <olist role="ortest">
	   <!--*
* material suppressed here by diff group b6561c *
*-->
	   <item id="cta-substitutable-restriction">
	    <p><var>T</var> has <propref comp="ctd" prop="derivation method"/> <pt>restriction</pt>,
	     and <var>S</var><sub><phrase><var>T</var></phrase></sub> is <termref def="key-val-sub-type-restricts"/> for <var>S</var><sub><phrase><var>B</var></phrase></sub>,
	     and <var>E</var> and <var>B</var> together satisfy this constraint.</p>
	   </item>
	   <item id="cta-substitutable-extension">
	    <p><var>T</var> has <propref comp="ctd" prop="derivation method"/> <pt>extension</pt>,
	     and <var>S</var><sub><phrase><var>T</var></phrase></sub> is identical to <var>S</var><sub><phrase><var>B</var></phrase></sub>,
	     and <var>E</var> and <var>B</var> together satisfy this constraint.</p>
	   </item>
	  </olist></p>
	</item>
       </olist>
      </p>
      <note dg="cta-r2">
       <p>This constraint has (by <clauseref ref="cta-substitutable-restriction"/>) the effect of ensuring
	that if <var>T</var> is a restriction of <var>B</var>, then any type
	conditionally assigned to <var>E</var> in the context of <var>T</var> is a
	restriction of the type which would be assigned to <var>E</var> in the
	context of <var>B</var>.</p>
       <p>It also ensures (by <clauseref ref="cta-substitutable-extension"/>, together with
	<clauseref ref="cdtat-ghost"/> of the definition of
	<termref def="key-cdtat"/>) that if any element declaration in a
	complex type <var>T</var> has a <propref prop="type table" comp="ed"/>, then the <propref prop="type table" comp="ed"/>s
	used for same-named elements in any types derived from <var>T</var>
	will be consistent with that used in <var>T</var>.
       </p>
      </note>
     </constraintnote>

<ednote role="pf" dg="cta-r3">
<edtext>The constraint <specref ref="vr-cta-substitutable"/> above is 
 intended to ensure that the use of <compref ref="tt"/>s for 
 conditional type assignment does not violate the usual principles of 
 complex type restriction.
 More specifically, if <var>T</var> is a complex type definition derived from 
 its base type <var>B</var> by restriction, then the rule seeks to ensure that 
 a type definition conditionally assigned by <var>T</var> to some child element
 is always derived by restriction from that assigned by <var>B</var> to the same child. 
 The current design enforces this using a "run-time" rule: instead of 
 marking <var>T</var> as invalid if it could possibly assign types incompatible 
 with those assigned by <var>B</var>, the run-time rule accepts the schema as valid
 if the usual constraints on the declared <propref prop="type definition" comp="ed"/>s are satisified,
 without checking the details of the <propref prop="type table" comp="ed"/>s.  Element instances are
 then checked as part of validation, and any instances that would cause 
 <var>T</var> (or any type in <var>T</var>'s <!--*
* material suppressed here by diff group wd-200708-1 *
*--><phrase dg="wd-200708-1"><xpropref role="anon">base type definition</xpropref></phrase> chain) to assign the incompatible
 types are made invalid with respect to <var>T</var>. 
 This rule may prove hard to understand or implement. The Working Group is 
 uncertain whether the current design has made the right trade-off and
 whether we should use a simpler but more restrictive rule. We solicit 
 input from implementors and users of this specification as to whether 
 the current run-time rule should be retained.</edtext>
</ednote>
     </div4>
    </div3>

     <div3 id="sec-ctdsic">
     <head>Complex Type Definition Information Set Contributions</head>

<div4 id="sec-sic-attrDefault" dg="b5165b">
<head dg="b5165b">Attribute Default Value</head>
     <constraintnote type="sic" id="sic-attrDefault">
     <head>Attribute Default Value</head>
     <p>For each <!--*
* material suppressed here by diff group b4565 *
*--><termref def="key-dflt-att" dg="b4565"/>,
the <termref def="key-psvi">post-schema-validation infoset</termref> <phrase dg="opt.144">has</phrase><!--*
* material suppressed here by diff group opt.144 *
*--> an attribute information item whose
properties are as below added to the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> of the element
information item.</p>
<!--*
* material suppressed here by diff group b2105b *
*-->
<p dg="b2105c">In addition, if necessary 
<termref def="term-ns-fixup"/> is performed on the element
information item for the <propref comp="au" prop="attribute declaration"/>'s 
<propref comp="ad" prop="target namespace"/>.</p>

      <!--* <issue id="RQ-22i" role="1.1">
< ! - - *  <p><loc href="&reqs;#norm-default" target="reqs">RQ-22 (norm-default)</loc></p> * - - >
       <p><loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=2852" target="reqs"
>Issue 2852 (RQ-22 add normalized default)</loc></p>
       <p>Constructed default attribute information items in the PSVI
did not have a [normalized value] property, only a [schema normalized
value], making them incompatible with ordinary attribute infoitems.
On balance, it seems sensible to correct this.</p>
       <resolution><p>Add a [normalized value] property to the
constructed attribute infoitem which arises when a default value is
applied.</p></resolution>
      </issue> *-->
      <glist>
       <gitem>
        <label><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">local name</xpropref></label>
        <def>
<p>The <propref comp="au" prop="attribute declaration"/>'s <propref comp="ad" prop="name"/>.</p>
        </def>
       </gitem>
       <gitem>
        <label><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">namespace name</xpropref></label>
        <def>
<p>The <propref comp="au" prop="attribute declaration"/>'s <propref comp="ad" prop="target namespace"/>.</p>
        </def>
       </gitem>
       <gitem dg="b2105baux">
        <label><phrase dg="b2105bc"><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">prefix</xpropref></phrase></label>
        <def>
<!--*
* material suppressed here by diff group b2105b *
*-->
<p dg="b2105c">If the 
<propref comp="au" prop="attribute declaration"/> has a <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals"><termref def="key-null">non-absent</termref></phrase>

<propref comp="ad" prop="target namespace"/> <var>N</var>, then
a namespace prefix bound to <var>N</var> in the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">in-scope namespaces</xpropref> property 
of the element information item in the <termref def="key-psvi">post-schema-validation infoset</termref>.
If the 
<propref comp="au" prop="attribute declaration"/>'s
<propref comp="ad" prop="target namespace"/> is <termref def="key-null">absent</termref>, then
<termref def="key-null">absent</termref>.
</p>
<!--*
* material suppressed here by diff group b2105b *
*-->
<p dg="f2f0701b">
 If <!--*
* material suppressed here by diff group f2f0701c *
*--> 
 more than one <!--*
* material suppressed here by diff group f2f0701c *
*-->
 <phrase dg="f2f0701c">prefix is</phrase>
 bound to <var>N</var> in the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">in-scope namespaces</xpropref>, it is
 <termref def="key-impl-dep">implementation-dependent</termref> which <!--*
* material suppressed here by diff group f2f0701c *
*--><phrase dg="f2f0701c">of those prefixes</phrase> is used.
</p>
        </def>
       </gitem>
       <!--*
* material suppressed here by diff group b2105 *
*-->
       <gitem dg="cleanup-3">
        <label><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">normalized value</xpropref></label>
        <def>
         <p>The <termref def="key-evc">effective value constraint</termref>'s <propref comp="vc_a" prop="lexical form"/>.</p>
        </def>
       </gitem>
       <!--*
* material suppressed here by diff group b4159-2 *
*-->
       <!--*
* material suppressed here by diff group b4159-2 *
*-->
       <!--*
* material suppressed here by diff group b4159-2 *
*-->
       <gitem dg="b4159-3">
        <label><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">owner element</xpropref></label>
        <def>
         <p>The element information item being assessed.</p>
        </def>
       </gitem>
       <gitem>
        <label><propref ref="a-schema_normalized_value" role="psvi"/></label>
        <def>
         <p>The <!--*
* material suppressed here by diff group rq129 *
*--><termref def="key-evc">effective value constraint</termref><!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="rq129">'s <propref comp="vc_a" prop="lexical form"/></phrase>.</p>
        </def>
       </gitem>
       <gitem dg="b2505">
        <label><propref ref="a-schema_actual_value" role="psvi"/></label>
        <def>
         <p>The <termref def="key-evc">effective value constraint</termref>'s
          <propref comp="vc_a" prop="value"/>.</p>
        </def>
       </gitem>
       <gitem>
        <label><propref ref="a-schema_default" role="psvi"/></label>
        <def>
         <p>The <!--*
* material suppressed here by diff group rq129 *
*--><termref def="key-evc">effective value constraint</termref><!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="rq129">'s <propref comp="vc_a" prop="lexical form"/></phrase>.</p>
        </def>
       </gitem>
       <gitem>
        <label><propref ref="a-validation_context" role="psvi"/></label>
        <def><p>The nearest ancestor element information item with a
<propref role="psvi" ref="e-schema_information"/> property.</p></def>
       </gitem>
       <gitem>
        <label><propref ref="a-validity" role="psvi"/></label>
        <def>
         <p><pt>valid</pt>.</p>
        </def>
       </gitem>
       <gitem>
        <label><propref ref="a-validation_attempted" role="psvi"/></label>
        <def><p><pt>full</pt>.</p></def>
       </gitem>
       <gitem>
        <label><propref ref="a-schema_specified" role="psvi"/></label>
        <def><p><pt>schema</pt>.</p></def>
       </gitem>
      </glist>
      <p>The added items 
<!--*
* material suppressed here by diff group b3837-1 *
*-->
also <!--*
* material suppressed here by diff group b3837-1 *
*--> 
have <propref role="psvi" ref="a-type_definition"/>
(and <propref role="psvi" ref="a-member_type_definition"/>
<phrase dg="b3837">and <propref role="psvi" ref="a-member_type_definitions"/></phrase>
if appropriate) properties, 
<!--*
* material suppressed here by diff group b3837-1 *
*--><phrase dg="b3837-1">and</phrase> 
their lighter-weight alternatives, as specified in <specref ref="sic-attrType"/>.</p>
      <!--*
* material suppressed here by diff group b2105 *
*-->
      <!--*
* material suppressed here by diff group b2105 *
*-->
<!--*
* material suppressed here by diff group b2748yes *
*-->
    </constraintnote>

<!--*
* material suppressed here by diff group b2105b *
*-->
<!--*
* material suppressed here by diff group b2105b *
*-->

<p dg="b2105c"> <phrase id="anchor6445"/>
<termdef id="term-ns-fixup" term="namespace fixup">When
default values are supplied for attributes<!--*
* material suppressed here by diff group b2748yes *
*-->, <term>namespace fixup</term>
may be required, to ensure that the <termref def="key-psvi">post-schema-validation infoset</termref> includes 
the namespace bindings needed and maintains the consistency
of the namespace information in the infoset.  To perform
namespace fixup on an element information item <var>E</var> for
a namespace <var>N</var>:
<olist>
<item> 
<p>If the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">in-scope namespaces</xpropref> of <var>E</var>
<!--*
* material suppressed here by diff group b6445 *
*-->
<phrase dg="b6445">binds a prefix to</phrase> <var>N</var>, no
namespace fixup is needed; the properties of <var>E</var> 
are not changed.</p>
</item>
<item>
<p>Otherwise, first select some prefix <var>P</var> which is not bound by
the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">in-scope namespaces</xpropref> of <var>E</var><phrase dg="f2f0701b"> (the choice of
<!--*
* material suppressed here by diff group f2f0701c *
*--><phrase dg="f2f0701c">prefix</phrase> 
is <termref def="key-impl-dep">implementation-dependent</termref>)</phrase>.</p>
</item>
<item>
<p>Add an entry to the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">in-scope namespaces</xpropref> of <var>E</var> binding <var>P</var> to <var>N</var>.</p>
</item>
<item>
<p>Add a namespace attribute to the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">namespace attributes</xpropref> of <var>E</var>.</p>
</item>
<item>
<p>Maintain the consistency of the information set by adjusting
the namespace bindings on the descendants of <var>E</var>.  This may
be done in either of two ways:<olist>
<item>
<p>Add the binding of <var>P</var> to <var>N</var> to the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">in-scope namespaces</xpropref> of all
descendants of <var>E</var>, except where that binding is overridden 
by another binding for <var>P</var>.</p>
</item>
<item>
<p>Add to the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">namespace attributes</xpropref> of each child of <var>E</var> a namespace 
attribute which undeclares the binding for <var>P</var> (i.e. a
namespace attribute for prefix <var>P</var> whose <termref def="key-nv">normalized value</termref> 
is the empty string), unless that child already has a
namespace declaration for prefix <var>P</var>.
Note that this approach is possible
only if <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-namespaces-1.1" dg="b1838refs"/> is in use,
rather than <bibref ref="ref-xml-namespaces-1.0"/>.</p>
</item>
</olist>
</p>
<p>The choice between the two methods of maintaining
consistency in the information set is
<!--*
* material suppressed here by diff group f2f0701b *
*-->
<phrase dg="f2f0701b"><termref def="key-impl-dep">implementation-dependent</termref>.</phrase></p>
</item>
</olist></termdef>
If the <termref def="term-ns-fixup"/> is occasioned by a defaulted attribute 
with a non-absent target namespace, then (as noted above), the
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">prefix</xpropref> of the attribute information item supplied
in the <termref def="key-psvi">post-schema-validation infoset</termref> is set to <var>P</var>.</p>

      <note dg="b2748no"><p>
       When a default value of type <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#QName">QName</xtermref>
       or <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#NOTATION">NOTATION</xtermref> is applied,
       <!--*
* material suppressed here by diff group f2f0701b *
*-->
       <phrase dg="f2f0701b">it is <termref def="key-impl-dep">implementation-dependent</termref> whether
       <termref def="term-ns-fixup"/> occurs</phrase><!--*
* material suppressed here by diff group f2f0701c *
*--><phrase dg="f2f0701c">; if it does not, the prefix
       used in the lexical representation <phrase dg="f2f0701d">(in
       <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">normalized value</xpropref>
       or <propref role="psvi" ref="a-schema_normalized_value"/>)</phrase> will
       not necessarily map to the namespace name of the value<phrase dg="f2f0701d">
       (in <propref role="psvi" ref="a-schema_actual_value"/>)</phrase></phrase>.
       <!--*
* material suppressed here by diff group f2f0701b *
*-->
       <phrase dg="f2f0701c">To reduce problems and
       confusion, users may prefer to ensure that the required namespace
       information item is <!--*
* material suppressed here by diff group f2f0701d *
*-->
       <phrase dg="f2f0701d">present in the input infoset.</phrase></phrase>
      </p></note>
     </div4>

<div4 id="sec-sic-match-info" dg="b5165b">
<head dg="b5165b">Match Information</head>
    <constraintnote type="sic" id="sic-match-info" dg="vm3-1">
     <head>Match Information</head>
     <!--*
* material suppressed here by diff group vm3-1-abandoned *
*-->
     <p dg="vm3-4">
      To allow users of the <termref def="key-psvi">post-schema-validation infoset</termref>
      to distinguish element information
      items which are <termref def="key-att-to">attributed</termref> to <termref def="key-ep">element particles</termref> from those 
      <termref def="key-att-to">attributed</termref> to <termref def="key-wp">wildcard particles</termref>, if
      and only if the
      local <termref def="key-vn">validity</termref> of an element 
      information item has been assessed as defined by
      <specref ref="cvc-complex-type"/>,
      then each attribute information item in its <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> 
      has the following properties in the <termref def="key-psvi">post-schema-validation infoset</termref>:</p>
     <!--*
* material suppressed here by diff group vm3-1-abandoned *
*-->
     <proplist role="psvi" item="attribute" dg="vm3-2">
      <propdef id="a-attribution" name="attribute attribution">
       <olist role="Caseval">
        <item><p role="if">the attribute information item is <termref def="key-att-to">attributed</termref> to
         an <compref ref="au"/></p>
         <p role="then">an <termref def="key-iso">item isomorphic</termref> to
          the <compref ref="au"/>.</p></item>
        <item><p role="if">the attribute information item is <termref def="key-att-to">attributed</termref> to
         an <propref comp="ctd" prop="attribute wildcard"/></p>
         <p role="then">an <termref def="key-iso">item isomorphic</termref> to
          the attribute wildcard.</p></item>
        <item><p role="otherwise">(the item is not <termref def="key-att-to">attributed</termref> to
         an <compref ref="au"/> or an
         <propref comp="ctd" prop="attribute wildcard"/>) <termref def="key-null">absent</termref>.</p></item>
       </olist>
      </propdef>
      <propdef id="a-match_info" name="match information">
       A keyword indicating what kind of component the
       attribute information item is <termref def="key-att-to">attributed</termref> to.
       <olist role="Caseval">
        <item><p role="if">the item is <termref def="key-att-to">attributed</termref> to an
         <compref ref="au"/></p>
         <p role="then"><pt>attribute</pt></p></item>
        <item><p role="if">the item is <termref def="key-att-to">attributed</termref> to a <pt>strict</pt>
         <propref comp="ctd" prop="attribute wildcard"/></p>
         <p role="then"><pt>strict</pt></p></item>
        <item><p role="if">the item is <termref def="key-att-to">attributed</termref> to a <pt>lax</pt>
         <propref comp="ctd" prop="attribute wildcard"/></p>
         <p role="then"><pt>lax</pt></p></item>
        <item><p role="if">the item is <termref def="key-att-to">attributed</termref> to a <pt>skip</pt>
         <propref comp="ctd" prop="attribute wildcard"/></p>
         <p role="then"><pt>skip</pt></p></item>
        <item><p role="otherwise">(the item is not <termref def="key-att-to">attributed</termref> to
         an <compref ref="au"/> or an
         <propref comp="ctd" prop="attribute wildcard"/>)
         <pt>none</pt></p></item>
       </olist>
      </propdef>
     </proplist>
     <p dg="vm3-2">And each element information item in
      its <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> has the following properties in the <termref def="key-psvi">post-schema-validation infoset</termref>:</p>
     <proplist role="psvi" item="element">
      <!--* <propdef id="e-attribution" name="particle attribution" diff="add" dg="vm3-2"> *-->
      <propdef id="e-attribution" name="element attribution" dg="vm3-2">
       <olist role="Caseval">
        <item><p role="if">the element information item is <termref def="key-att-to">attributed</termref> to
         an <termref def="key-ep"/> or a <termref def="key-wp"/></p>
         <p role="then">an <termref def="key-iso">item isomorphic</termref> to
          the <compref ref="p"/>.</p></item>
        <item dg="vm13"><p role="if">the item is <termref def="key-att-to">attributed</termref> to an
         <compref ref="oc"/></p>
         <p role="then">an <termref def="key-iso">item isomorphic</termref> to
          the <compref ref="oc"/>.</p></item>
        <item><p role="otherwise">(the item is not <termref def="key-att-to">attributed</termref> to
         a <compref ref="p"/><phrase dg="vm13"> or an
         <compref ref="oc"/></phrase>) <termref def="key-null">absent</termref>.</p></item>
       </olist>
      </propdef>
      <propdef id="e-match_info" name="match information">
       A keyword indicating what kind of <compref ref="p"/> the
       item is <termref def="key-att-to">attributed</termref> to.
       <olist role="Caseval">
        <item><p role="if">the item is <termref def="key-att-to">attributed</termref> to an
         <termref def="key-ep"/></p>
         <p role="then"><pt>element</pt></p></item>
        <item><p role="if">the item is <termref def="key-att-to">attributed</termref> to a <pt>strict</pt>
         <termref def="key-wp"/></p>
         <p role="then"><pt>strict</pt></p></item>
        <item><p role="if">the item is <termref def="key-att-to">attributed</termref> to a <pt>lax</pt>
         <termref def="key-wp"/></p>
         <p role="then"><pt>lax</pt></p></item>
        <item><p role="if">the item is <termref def="key-att-to">attributed</termref> to a <pt>skip</pt>
         <termref def="key-wp"/></p>
         <p role="then"><pt>skip</pt></p></item>
        <!--*
* material suppressed here by diff group vm3-1x *
*-->
        <item dg="vm13"><p role="if">the item is <termref def="key-att-to">attributed</termref> to an
         <compref ref="oc"/></p>
         <p role="then"><pt>open</pt></p>
        </item>
        <item dg="vm3-2"><p role="otherwise">(the item is not
         <termref def="key-att-to">attributed</termref> to a <compref ref="p"/><phrase dg="vm13"> or
          an <compref ref="oc"/></phrase>) <pt>none</pt></p></item>
       </olist>
      </propdef></proplist>
    </constraintnote>
     </div4>
</div3>
 <div3 id="coss-ct">
  <head>Constraints on Complex Type Definition Schema Components</head>
  <p>All complex type definitions (see <specref ref="Complex_Type_Definitions"/>) <rfc2119>must</rfc2119> satisfy the following constraints.</p>

     <div4 id="sec-ct-props-correct" dg="b5165a">
      <head dg="b5165a">Complex Type Definition Properties Correct</head>

  <constraintnote type="cos" id="ct-props-correct">
   <head>Complex Type Definition Properties Correct</head>
   <olist role="And">
    <item>
     <p>The values of the properties of a complex type definition <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">are</phrase> as described in
the property tableau in
<specref ref="Complex_Type_Definition_details"/>, modulo the impact of <specref ref="conformance-missing"/>.</p>
    </item>
    <item>
     <p>If the <propref comp="ctd" prop="base type definition"/> is a simple type
definition, the <propref comp="ctd" prop="derivation method"/> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> <pt>extension</pt>.</p>
    </item>
    <item><p><!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">There are no circular 
definitions, except for that of <!--*
* material suppressed here by diff group rq17 *
*--><phrase dg="rq17"><termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref></phrase></phrase>.  That is, it <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> 
possible to reach the <!--*
* material suppressed here by diff group rq17 *
*--><phrase dg="rq17">definition of 
<termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref></phrase> by repeatedly following the 
<propref comp="ctd" prop="base type definition"/>.</p></item>

	<item>
	 <p diff="del" dg="b8342">
	  <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">No two</phrase> 
	  distinct attribute declarations in the 
	  <propref comp="ctd" prop="attribute uses"/> <!--*
* material suppressed here by diff group modals *
*--> 
	  have identical <!--*
* material suppressed here by diff group ep20b *
*--><phrase dg="ep20b"><xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded names</xspecref></phrase>.</p>
	 <p diff="add" dg="b8342">
	  No two distinct members of the 
	  <propref comp="agd" prop="attribute uses"/> have
	  <propref comp="au" prop="attribute declaration"/>s 
	  with the same <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref>.
	 </p>
	</item>

	<!--*
* material suppressed here by diff group b4348 *
*-->
	<item dg="vm13"><p>
	  If <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="open content"/> is <termref def="key-null">non-absent</termref></phrase>, then 
	  <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/>
	  </phrase> is either <pt>element-only</pt>
	  or <pt>mixed</pt>.
	 </p></item>
       </olist>
  </constraintnote>

     </div4>

     <div4 id="sec-cos-ct-extends" dg="b5165a">
      <head dg="b5165a">Derivation Valid (Extension)</head>
 
      <constraintnote type="cos" id="cos-ct-extends">
       <head>Derivation Valid (Extension)</head>
       <p><!--*
* material suppressed here by diff group ep24 *
*-->
  <phrase dg="ep24">For every complex type <var>T</var> with
  <propref comp="ctd" prop="base type definition"/> <var>B</var> where
	 <var>T</var>.<propref comp="ctd" prop="derivation method"/> 
	 = <pt>extension</pt>,</phrase>
	<olist role="case">
	 <item>
	  <p role="if"><!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>B</var></phrase> is a complex type definition</p>
	  <p role="then">
	   <olist role="andtest">
	    <item>
	     <p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>B</var>.<propref comp="ctd" prop="final"/></phrase>
	      <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">does not</phrase> contain <pt>extension</pt>.</p>
	    </item>
	    <item id="c-cte">
	     <!--*
* material suppressed here by diff group ep24 *
*-->
	     <p dg="ep24"><var>B</var>.<propref comp="ctd" prop="attribute uses"/> 
	      is a subset of <var>T</var>.<propref comp="ctd" prop="attribute uses"/>. 
	      That is, for every attribute use <var>U</var> in
	      <var>B</var>.<propref comp="ctd" prop="attribute uses"/>, 
	      there is an attribute use in 
	      <var>T</var>.<propref comp="ctd" prop="attribute uses"/> 
	      whose properties, recursively, are identical to
	      those of <var>U</var><!--*
* material suppressed here by diff group b5504 *
*-->.
	     </p>
	    </item>
	    <item>
	     <p>If <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>B</var></phrase> has an <propref comp="ctd" prop="attribute wildcard"/>,
	      <phrase dg="modals">then</phrase> <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>T</var></phrase>
	      <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">also
	       has</phrase> one, and <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>B</var>.<propref comp="ctd" prop="attribute wildcard"/>.<propref comp="w" prop="namespace constraint"/>
	       is a subset of 
	       <var>T</var>.<propref comp="ctd" prop="attribute wildcard"/>.<propref comp="w" prop="namespace constraint"/></phrase>, as
	      defined by <specref ref="cos-ns-subset"/>.</p>
	    </item>
	    <item>
	     <p>
            <olist role="Ortest">
	       <item>
		<!--*
* material suppressed here by diff group ep24 *
*-->
		<p dg="ep24"><var>B</var> and <var>T</var> both 
		 have <propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/> 
		 = <pt>simple</pt> and both have the same 
		 <propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="simple type definition"/>.
		</p>
	       </item>
	       <item>
		<!--*
* material suppressed here by diff group ep24 *
*-->
		<p dg="ep24"><var>B</var> and <var>T</var> both have 
		 <propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/>
		 = 
		 <pt>empty</pt>.</p>
	       </item>
	       <item>
		<olist role="Andtest">
		 <item>
		  <!--*
* material suppressed here by diff group ep24 *
*-->
		  <p dg="ep24"><var>T</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/>
		   =
		   <pt>element-only</pt> or
		   <pt>mixed</pt>.</p>
		 </item>
		 <item>
		  <olist role="Ortest">
		   <item>
		    <!--*
* material suppressed here by diff group ep24 *
*-->
		    <p dg="ep24"><var>B</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/> = <pt>empty</pt>.</p>
		   </item>
		   <item>
		    <p>
                   <olist role="Andtest">
		      <item>
		       <!--*
* material suppressed here by diff group ep24 *
*-->
		       <p dg="ep24">Both <var>B</var> and <var>T</var> have
			<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/> 
			= <pt>mixed</pt> or
			both have <propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/>
			= <pt>element-only</pt>.</p>
		      </item>
		      <item>
		       <!--*
* material suppressed here by diff group ep24 *
*-->
		       <p dg="ep24">
			<var>T</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="particle"/>
			is a <termref def="cd-model-extension">valid
			 extension</termref> of 
			<var>B</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="particle"/>, 
			as defined in <specref ref="cos-particle-extend"/>.</p>
		      </item>
		      <item dg="vm13"><p>
                     <olist role="OoMtest">
			 <item><p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>B</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="open content"/> 
			    </phrase> (call it <local>BOT</local>) is
			   <termref def="key-null">absent</termref>.
			  </p></item>
			 <item><p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>T</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="open content"/></phrase> 
			   (call it <local>EOT</local>) has
			   <propref comp="oc" prop="mode"/>
			   <pt>interleave</pt>.
			  </p></item>
			 <item><p>
			   Both <local>BOT</local> and <local>EOT</local>
			   have
			   <propref comp="oc" prop="mode"/>
			   <pt>suffix</pt>.
			  </p></item>
                     </olist>
		       </p></item>
		      <item dg="vm13"><p>
                     If neither <local>BOT</local> nor
			<local>EOT</local> is <termref def="key-null">absent</termref>, then 
			<!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><local>BOT</local>.<propref comp="oc" prop="wildcard"/>.<propref comp="w" prop="namespace constraint"/></phrase>
			is a subset of 
			<!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">
			 <local>EOT</local>.<propref comp="oc" prop="wildcard"/>.<propref comp="w" prop="namespace constraint"/></phrase>, as defined
			by
			<specref ref="cos-ns-subset"/>.</p>

		      </item>
                   </olist>
		    </p>
		   </item>
		  </olist>
		 </item>
		</olist>
	       </item>
            </olist>
	     </p>
	    </item>
	    <item dg="rq17a2.del.b4438.add">
	     <p>It <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is <phrase dg="b4438">in principle</phrase></phrase>
	      possible to <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derive</termref> <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>T</var></phrase> in two steps, the first
	      an extension and the second a restriction (possibly
	      vacuous), from that type definition among its ancestors
	      whose <propref comp="ctd" prop="base type definition"/>
	      is <!--*
* material suppressed here by diff group wd-200708-1 *
*--><phrase dg="wd-200708-1"><termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref></phrase>.</p>
	     <note>
	      <p dg="b4438">This requirement ensures that
	       nothing removed by a restriction is subsequently added
	       back by an extension<!--*
* material suppressed here by diff group b4438-1 *
*--><phrase dg="b4438-1"> in an incompatible way (for example,
		with a conflicting type assignment or value
		constraint)</phrase>.</p>
	      <p>Constructing the intermediate type definition to
	       check this constraint is straightforward:  simply
	       re-order the <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derivation</termref> to put all the extension
	       steps first, then collapse them into a single
	       extension.  If the resulting definition can be the
	       basis for a valid restriction to the desired
	       definition, the constraint is satisfied.</p>
	     </note>
	    <!--*
           <ednote diff="add" dg="b4438"><edtext>
            Or maybe instead of deleting the above note, replace it with
            something like "This requirement ensures that nothing removed by a
            restriction is subsequently added back by an extension in an
            incompatible way (for example, with a conflicting type assignment
            or value constraint)".
           </edtext></ednote>
	    *-->
	    </item>
	    <item id="c-vs-ctd-e" dg="rq17a2"><p>
	      For any element or attribute information item, its
	      <!--*
* material suppressed here by diff group b4690 *
*-->
	      <termref def="key-ldtype" dg="b4690"/> within <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>T</var></phrase> is
	      <termref def="key-val-sub-type"/> for the <!--*
* material suppressed here by diff group b4690 *
*-->
	      <termref def="key-ldtype" dg="b4690"/>
	      within <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>B</var></phrase>, <!--*
* material suppressed here by diff group cta-gst *
*--><phrase dg="cta-gst"><termref def="key-val-sub-type-absolute">without limitation</termref></phrase><phrase dg="vm3a">, if neither is <termref def="key-null">absent</termref></phrase>.
	     </p></item>
	    <item dg="b2861cc-1">
	     <!--*
* material suppressed here by diff group ep24 *
*-->
	     <p dg="ep24"><var>B</var>.<propref comp="ctd" prop="assertions"/>
	      is a prefix of <var>T</var>.<propref comp="ctd" prop="assertions"/>.</p>
	    </item>
          </olist>
	  </p>
	 </item>
	 <item>
	  <p role="if"><!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>B</var></phrase> is a simple type definition</p>
	  <p role="then">
         <olist role="andtest">
	    <item>
	     <!--*
* material suppressed here by diff group ep24 *
*-->
	     <p dg="ep24">
	      <var>T</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/> 
	      = <pt>simple</pt> and 
	      <var>T</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="simple type definition"/> =
	      <var>B</var>.</p>
	    </item>
	    <item>
	     <p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>B</var>.</phrase><propref comp="std" prop="final"/><!--*
* material suppressed here by diff group ep24 *
*-->
	      <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">does not</phrase> contain <pt>extension</pt>.</p>
	    </item>
        </olist>
	  </p>        
	 </item>
      </olist> <!--*
* material suppressed here by diff group iff *
*-->.
     </p>
    </constraintnote>

      <p dg="iff"><termdef id="cd-ct-extension" term="valid extension">
	A complex type <local>T</local> is a <term>valid extension</term> of its 
	<propref comp="ctd" prop="base type definition"/> if and only if 
	<!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><local>T</local>.<propref comp="ctd" prop="derivation method"/>
	 = <pt>extension</pt></phrase> 
	and
	<phrase dg="ep24"><var>T</var></phrase>
	satisfies the constraint <specref ref="cos-ct-extends"/></termdef>.</p>
      
     </div4>
     <div4 id="sec-derivation-ok-restriction" dg="b5165a">
      <head dg="b5165a">Derivation Valid (Restriction, Complex)</head>
    
      <constraintnote type="cos" id="derivation-ok-restriction">
       <head>Derivation Valid (Restriction, Complex)</head>
       <p><!--*
* material suppressed here by diff group ep24 *
*-->
  <phrase dg="ep24">For every complex type <var>T</var> with
  <propref comp="ctd" prop="base type definition"/> <var>B</var> where
	 <var>T</var>.<propref comp="ctd" prop="derivation method"/> 
	 = <pt>restriction</pt>,</phrase>
	<olist role="and">
	 <item>
<!--* MSM begins a long campaign to eliminate places that seem to imply
    * modal logic must be used.  It suffices, here, that the base type
    * definition lack 'restriction' as an element of its final set.
    * It need not be logically necessary, factuality suffices. 
    *-->
	  <p><!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>B</var></phrase> <!--* !!! rq17 and modals both want this baby
	   changed !!! *--> <!--* !!! Since rq17 has already gone out,
	   MSM changed * the diff group to modals, so as to include it
	   also * in the modals proposal. *--> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> a complex type definition whose
	   <propref comp="ctd" prop="final"/> does not contain <pt>restriction</pt>.</p>
	 </item>
	 <!--*
* material suppressed here by diff group rq17a1 *
*-->
	 <!--*
* material suppressed here by diff group rq17a1 *
*-->
	 <!--*
* material suppressed here by diff group rq17a1 *
*-->
	 <item>
	  <olist role="OoMtest">
	   <item>
	    <p><!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>B</var></phrase> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> <!--*
* material suppressed here by diff group wd-200708-1 *
*--><phrase dg="wd-200708-1"><termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref></phrase>.</p>
	   </item>
	   <item>
	    <olist role="Andtest">
	     <item><!--*
* material suppressed here by diff group ep24 *
*-->
	      <p dg="ep24"><var>T</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/>
	       = <pt>simple</pt></p>
	     </item>
	     <item><olist role="Ortest">
	       <item>
		<!--*
* material suppressed here by diff group ep22 *
*-->
		<p dg="ep22">Let <var>S</var><sub><phrase><var>B</var></phrase></sub> be 
		 <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>B</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="simple type definition"/></phrase>, 
		 and
		 <var>S</var><sub><phrase><var>T</var></phrase></sub> be 
		 <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>T</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="simple type definition"/></phrase>.
		 Then <var>S</var><sub><phrase><var>T</var></phrase></sub> is validly derived from <var>S</var><sub><phrase><var>B</var></phrase></sub> as defined
		 in
		 <specref ref="cos-st-derived-ok"/>.</p>
	       </item>
	       <item>
		<!--*
* material suppressed here by diff group ep24 *
*-->
		<p dg="ep24"><var>B</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/> = <pt>mixed</pt> and
		 <var>B</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="particle"/>
		 is a <compref ref="p"/> which is
		 <termref def="cd-emptiable">emptiable</termref> as
		 defined in <specref ref="cos-group-emptiable"/>.</p>
	       </item>
	      </olist></item>
	    </olist>
	   </item>
	   <item>
	    <olist role="Andtest">
	     <item><!--*
* material suppressed here by diff group ep24 *
*-->
	      <p dg="ep24">
	       <var>T</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/>
	       = <pt>empty</pt>.
	      </p></item>
	     <item><olist role="Ortest">
	       <item>
		<!--*
* material suppressed here by diff group ep24 *
*-->
		<p dg="ep24"><var>B</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/> 
		 = <pt>empty</pt>.</p>
	       </item>
	       <item>
		<!--*
* material suppressed here by diff group ep24 *
*-->
		<p dg="ep24"><var>B</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/> =
		 <pt>element-only</pt> or
		 <pt>mixed</pt>, and
		   <var>B</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="particle"/>
		  is a
		  <compref ref="p"/> which is <termref def="cd-emptiable">emptiable</termref> as defined in
		 <specref ref="cos-group-emptiable"/>.</p>
	       </item>
	      </olist></item>
	    </olist>
	   </item>
	   <item>
	    <olist role="Andtest">
	     <item>

	      <olist role="Ortest">
	       <item><!--*
* material suppressed here by diff group ep24 *
*-->
		<p dg="ep24">
		 <var>T</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/>
		 = <pt>element-only</pt>
		  and <var>B</var>.<propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/> 
		 = <pt>element-only</pt> or <pt>mixed</pt>. </p>
	       </item>
	       <item><!--*
* material suppressed here by diff group ep24 *
*-->
		
		<p dg="ep24">
		 <var>T</var> and <var>B</var> both have 
		 <propref comp="ctd" prop="content type"/>.<propref comp="ct" prop="variety"/> 
		 =
		 <pt>mixed</pt>.</p>
	       </item>

	      </olist></item>
	     <!--*
* material suppressed here by diff group rq17p *
*-->
	     <item id="T.ct.restricts.B.ct" dg="rq17p">
	      <!--* rq17p adopted Redwood Shores April 2006.  Live text *-->
	      <p>The <propref comp="ctd" prop="content type"/> of
	       <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>T</var></phrase> <termref def="pt-actual-restriction">restricts</termref>
	       <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22">that of <var>B</var></phrase> as defined
	       in <specref ref="cos-content-act-restrict"/>.</p>
	      <!--* rq17p adopted Redwood Shores April 2006.  Live text *-->
	     </item>
	    </olist>
	   </item>         
	  </olist>
	  <!--*
* material suppressed here by diff group cleanup-3 *
*-->
	 </item>
	 <item id="c-ran" dg="rq17a1">
	  <p>For every element information item <!--*
* material suppressed here by diff group ep22 *
*--> <phrase dg="ep22"><var>E</var>,</phrase> if the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> of <!--*
* material suppressed here by diff group ep22 *
*--> <phrase dg="ep22"><var>E</var></phrase> satisfy <clauseref ref="c-aam"/> <phrase dg="rq17a2">and
	    <clauseref ref="c-ra"/></phrase> of 
<specref ref="cvc-complex-type"/> with respect to <!--*
* material suppressed here by diff group rq17a2 *
*--> <!--*
* material suppressed here by diff group ep22 *
*--> <phrase dg="ep22"><var>T</var>,</phrase> then they also satisfy the same
	   <!--*
* material suppressed here by diff group rq17a2 *
*--> <phrase dg="rq17a2">clauses</phrase> with respect to
	   <!--*
* material suppressed here by diff group rq17a2 *
*--> <phrase dg="rq17a2"><!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>B</var></phrase>,
	    and for every attribute information item <var>A</var> in <!--*
* material suppressed here by diff group ep22 *
*--> <phrase dg="ep22"><var>E</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase></phrase><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref>,
	    <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>B</var></phrase>'s <termref def="key-dft-binding"/> for <var>A</var> <termref def="loc-testSubP">subsumes</termref> that defined by
	    <!--*
* material suppressed here by diff group ep22 *
*-->
	    <phrase dg="ep22"><var>T</var>.</phrase></phrase></p>
	 </item>
	 <!--*
* material suppressed here by diff group rq17-x *
*-->
	 <!--*
* material suppressed here by diff group rq17a2-x *
*-->
	 <item id="c-vs-ctd-r" dg="rq146-3"><p>
	   For any element <phrase dg="rq17a2">or
	    attribute</phrase> information item<!--*
* material suppressed here by diff group rq17a2 *
*-->, its <!--*
* material suppressed here by diff group b4690 *
*-->
	    <termref def="key-ldtype" dg="b4690"/>
	    within <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>T</var></phrase> is <phrase dg="ep99"><termref def="key-val-sub-type"/></phrase>
	    <!--*
* material suppressed here by diff group ep99 *
*--> for <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22">its</phrase> <!--*
* material suppressed here by diff group b4690 *
*-->
	    <termref def="key-ldtype" dg="b4690"/> within
	    <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>B</var></phrase><phrase dg="ep99">, <!--*
* material suppressed here by diff group cta-gst *
*--><phrase dg="cta-gst">subject to</phrase> <phrase dg="cta-gst">the blocking keywords</phrase>
	   {<pt>extension</pt>, <pt>list</pt>, <pt>union</pt>}</phrase><phrase dg="vm3a">, if <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22">the item has a <!--*
* material suppressed here by diff group b4690 *
*-->
	     <termref def="key-ldtype" dg="b4690"/> both in
	     <var>T</var> and in <var>B</var></phrase></phrase>.
	  </p></item>
	 <item dg="b2861cc-1">
	  <!--*
* material suppressed here by diff group ep24 *
*-->
	  <p dg="ep24"><var>B</var>.<propref comp="ctd" prop="assertions"/> is a prefix of
	   <var>T</var>.<propref comp="ctd" prop="assertions"/>.</p>
	 </item>
	</olist> 
	<!--*
* material suppressed here by diff group rq17p *
*-->
	<termdef id="cd-ct-restriction" term="valid restriction" dg="rq17p">A complex
	 type definition with <propref comp="ctd" prop="derivation    method"/> <phrase dg="ep24">=</phrase> <pt>restriction</pt> is a <term>valid
	  restriction</term> of its <propref comp="ctd" prop="base    type definition"/> if and only if the constraint <specref ref="derivation-ok-restriction"/> is
	 satisfied</termdef>.
       </p>
<!--* The added condition 'with {derivation method{ restriction' seems 
    * to be required to avoid extensions, for which the constraint 
    * vacuously holds, being valid restrictions of their base. 
    *-->
</constraintnote>

<!--*
* material suppressed here by diff group rq17-x *
*-->


<!--*
* material suppressed here by diff group rq17-x *
*-->

<note dg="rq17">
<p><!--*
* material suppressed here by diff group f2f0610 *
*--> <phrase dg="f2f0610">Valid</phrase>
	restriction involves both a subset relation on the set of
	elements valid against <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>T</var></phrase> and those valid against <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>B</var></phrase>, and a<!--*
* material suppressed here by diff group f2f0610 *
*--> derivation relation, explicit in the
	type hierarchy, between the types assigned to attributes and
	child elements by <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>T</var></phrase> and those assigned to the same
	attributes and children by <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>B</var></phrase>.</p>
</note>

      <p dg="b5293">The constraint just given,
       like other constraints on schemas, 
       <rfc2119>must</rfc2119> be satisfied by every complex type <var>T</var> to which it
       applies.
      </p>

      <ednote role="pf" dg="b5293far1"><edtext>
       <phrase id="anchor5293far1"/>
       The above constraint allows a complex type with an <eltref ref="all"/>
       model groups to restrict another complex type with either
       <eltref ref="all"/>, <eltref ref="sequence"/>, or <eltref ref="choice"/>
       model groups. Even when the base type has an <eltref ref="all"/> model
       group, the list of member elements and wildcard may be very different
       between the two types. The working group solicits feedback on how useful
       this is in practice, and on the difficulty in implementing this feature.
      </edtext></ednote>

      <p dg="b5293">
       However, under certain conditions conforming processors
       need not (although they <rfc2119>may</rfc2119>) detect some violations of this constraint.
       If (1) the type definition being checked
       has <var>T</var> . <propref comp="ctd" prop="content type"/> . <propref comp="ct" prop="particle"/> . <propref comp="p" prop="term"/> . <propref comp="mg" prop="compositor"/>
       = <pt>all</pt>
       and (2) an implementation is unable to determine
       <!--* statically *-->
       by examination of the schema in isolation
       whether or not <clauseref ref="T.ct.restricts.B.ct"/>
       is satisfied, then the implementation <rfc2119>may</rfc2119> 
       provisionally accept the derivation.
       If any instance encountered in the <termref def="key-va"/> episode
       is valid against <var>T</var> but not against <var>T</var>.<propref comp="ctd" prop="base type definition"/>,
       then the derivation of <var>T</var> does not satisfy this
       constraint, the schema does not conform to this
       specification, and no <termref def="key-va"/> can be performed
       using that schema.
      </p>
      <p dg="b5293">It is <termref def="key-impl-defined">implementation-defined</termref> whether a processor (a) always
       detects violations of <clauseref ref="T.ct.restricts.B.ct"/>
       by examination of the schema in isolation, (b)
       detects them only when some element information item
       in the input document is valid against <var>T</var> but not
       against <var>T</var>.<propref comp="ctd" prop="base type definition"/>, or (c) sometimes detects
       such violations by examination of the schema in isolation
       and sometimes not.  In the latter case, the circumstances
       in which the processor does one or the other are 
       <termref def="key-impl-dep">implementation-dependent</termref>.
      </p>
      <note dg="b5293">
       <p>This provision for validation-time checking of
	this constraint on schemas is similar, in some ways,
	to the validation-time checking of restrictions
	involving conditional type assignment specified
	in <specref ref="vr-cta-substitutable"/>.
	Both involve checking information items in the
	instance being <termref def="key-va">assessed</termref> against both a type and
	its <propref comp="ctd" prop="base type definition"/>.
       </p>
       <p>The two cases differ, however, in that a failure
	to satisfy <specref ref="vr-cta-substitutable"/>
	makes the document instance invalid
	(<clauseref ref="elv.checks.cta"/> of
	<specref ref="cvc-complex-type"/>), while a failure to
	satisfy the rule just given indicates an <termref def="dt-error">error</termref>
	in the schema.
       </p>
      </note>

      <ednote role="pf" dg="b5293far2"><edtext>
       <phrase id="anchor5293far2"/>
       The above rule allows an implementation to use a potentially non-conforming
       schema to perform schema assessment and produce PSVI. This results in
       an exception of rules specified in <specref ref="conformance-schemaValidity"/>.
       The Working Group solicits input from implementors and users of this
       specification as to whether this is an acceptable implementation
       behavior.
      </edtext></ednote>

<!--* HST is very uneasy with this definition, as it only works if the
	  assessment rules _require_ you to carry on with recursive
	  assessment after finding an error, but they don't -->
<!--* Touch&eacute;.  I still don't like the subjunctive, but 
    * it's currently the best we've got.
    *-->
<!--*
* material suppressed here by diff group rq17-x *
*-->
<!--* 
results in errors raised by violations of constraints on the 
abstractness of type definitions, element declarations, or
attribute declarations, but no other errors.</termdef></p>
*-->

<!--* MSM is uneasy with the word 'actually' here, since it seems to 
    * want the constraint to be one that forbids vacuous restriction.
    * hmmm.  After consideration, he just deletes the 'actually'.
    *-->
<!--*   <p diff="add" dg="rq17">In practice the above definition cannot 
be directly understood as a Constraint on Components.  The following 
constraint is the operationally normative statement.</p> *-->

<!-- HST is not at all happy with an appeal to empty types as the
	  basis for including 'actually restricts'.  It has the same
	  'problem', so arguing that we use it to avoid the 'problem'
	  makes no sense.  About that which we can say nothing,
	  thereof we should remain silent. -->
<!--
For a variety of reasons, the description of
restriction just given is not suitable as a Constraint on Components.
In particular, if no elements at all are valid with respect to a type
<local>R</local>, then <local>R</local> satisfies the first constraint
for <emph>any possible</emph> base type <local>B</local>. It is not
necessarily easy, however, to detect type definitions which accept no
elements, however, and so the following constraint is the
operationally normative statement of valid restriction.-->

<!--*
* material suppressed here by diff group rq17-x *
*-->
     </div4>
     
      <!--*
* material suppressed here by diff group b5165a-dummy *
*-->
 

  <!--*
* material suppressed here by diff group rq17-x *
*-->
 
     
     <div4 id="sec-cos-content-act-restrict" dg="b5165a">
      <head dg="b5165a">Content Type Restricts<phrase dg="b3724"> (Complex Content)</phrase></head>

  <constraintnote id="cos-content-act-restrict" type="cos" dg="rq17p">
   <head>Content type restricts<phrase dg="b3724"> (Complex Content)</phrase></head>
   <!--*
* material suppressed here by diff group b6685 *
*-->
   <!--*
* material suppressed here by diff group b3724 *
*-->
   <p dg="b3724"><termdef id="pt-actual-restriction" term="restricts" role="local">A
<compref ref="ct"/> <local>R</local> (for <quote>restriction</quote>)
<phrase dg="b3724">with complex content (i.e. one with a <termref def="key-null">non-absent</termref>
<propref comp="ct" prop="particle"/>)</phrase>
<term>restricts</term> another <compref ref="ct"/> <local>B</local> (for
<quote>base</quote>) <phrase dg="b3724">with complex content</phrase>
if and only if
    <olist role="andtest">
     <item>
      <p>Every sequence of element information items which is 
<termref def="loc-locallyValid-seq">locally valid</termref> 
with respect to <local>R</local>
is also <termref def="loc-locallyValid-seq">locally valid</termref> 
with respect to <local>B</local>.</p>
     </item>
     <item id="ctr-child-type-subsumption">
      <p>For all sequences of element information items <local>ES</local> which are 
<termref def="loc-locallyValid-seq">locally valid</termref> 
with respect to <local>R</local>, for all
elements <local>E</local> in <local>ES</local>,
<local>B</local>'s <termref def="key-dft-binding"/> for <local>E</local>
<termref def="loc-testSubP">subsumes</termref> 
that defined by <local>R</local>.
      </p>
     </item>
     <!--*
* material suppressed here by diff group all-2506-3 *
*-->
    </olist>
    </termdef>    
   </p>
   <!--*
* material suppressed here by diff group vm13 *
*-->

<!--* 2006-10-09: the following graf was marked as deleted by rq146,
    * but b3725-2 is getting there first.  If b3725-2 is not approved,
    * this may need shifting back to rq146. 
    *-->
<!--*
* material suppressed here by diff group b3725-2 *
*-->

   <!--*
* material suppressed here by diff group rq146-abandoned *
*-->


<!--* <p diff="add" dg="b3725-2"><termdef id="key-dft-binding" term="default binding"> *-->
<!--* <p diff="add" dg="b3725-2.add.rq146.del-as.add"> *-->
   
   <p dg="b3725-2"><termdef id="key-dft-binding" term="default binding">
    When a sequence of <!--*
* material suppressed here by diff group cleanup-3 *
*--> element information items <local>ES</local> 
    is <termref def="loc-locallyValid-seq">locally valid</termref>
    with respect to a <!--*
* material suppressed here by diff group vm13 *
*-->
    <phrase dg="vm13"><compref ref="ct"/> <local>CT</local></phrase>
    <phrase dg="rq17a2">or when a set of attribute information items
    <local>AS</local> satisfies <clauseref ref="c-aam"/> and <clauseref ref="c-ra"/>
    of <specref ref="cvc-complex-type"/> with respect to a <compref ref="ctd"/>,</phrase>
    there is a (partial) functional mapping from
    the element information items <var>E</var> in the sequence <var>ES</var>
    <phrase dg="rq17a2">or the attribute information items in
    <var>AS</var></phrase>
    to a <term>default binding</term> for the item,
    where the default binding is <!--*
* material suppressed here by diff group rq17a2 *
*-->
    an <compref ref="ed"/>, <!--*
* material suppressed here by diff group b5003 *
*-->
    <phrase dg="b5003">an <compref ref="au"/>,</phrase>
    <!--*
* material suppressed here by diff group rq146-0 *
*--><phrase dg="rq146-0">or one
    of the keywords <pt>strict</pt>, <pt>lax</pt>, or <pt>skip</pt>,</phrase>
    as follows:
    <olist>
     <item>
      <p>When the item has a <termref def="key-governing-ed"/>, the 
       default binding is that <compref ref="ed"/>.</p>
     </item>
     <item dg="rq17a2"><p>
      When the item has a <termref def="key-governing-ad"/> and it is <termref def="key-att-to">attributed</termref> to an
      <compref ref="au"/>,<!--*
* material suppressed here by diff group wd-200708-1 *
*--> the default binding is <!--*
* material suppressed here by diff group b5003 *
*-->
      <phrase dg="b5003">that <compref ref="au"/>.</phrase>
     </p></item>
     <item dg="rq17a2"><p>
      When the item has a <termref def="key-governing-ad"/> and it is <termref def="key-att-to">attributed</termref> to an
      attribute wildcard, the default binding is <!--*
* material suppressed here by diff group b5003 *
*-->
      <phrase dg="b5003">an <compref ref="au"/> whose
      <propref comp="au" prop="attribute declaration"/> is the <termref def="key-governing-ad"/>,
      whose <propref comp="au" prop="value constraint"/> is <termref def="key-null">absent</termref>, and
      whose <propref comp="au" prop="inheritable"/> is the <termref def="key-governing-ad"/>'s
      <propref comp="ad" prop="inheritable"/> (the other properties in the
      <compref ref="au"/> are not relevant).</phrase>
     </p></item>
     <item dg="rq146-0">
      <p>When the item is <termref def="key-att-to">attributed</termref> to a <pt>strict</pt>
       <termref def="key-wp"/> <phrase dg="rq17a2">or attribute wildcard</phrase>
       <phrase dg="vm13">or an <compref ref="oc"/>
       with a <pt>strict</pt> <compref ref="w"/></phrase> and 
       it does not have a <termref def="key-governing-ed"/><phrase dg="rq17a2"> or
       a <termref def="key-governing-ad"/></phrase>, then
       the default binding is the keyword <pt>strict</pt>.</p>
     </item>
     <item>
      <p>When the item is <termref def="key-att-to">attributed</termref> to a <pt>lax</pt>
       <termref def="key-wp"/> <phrase dg="rq17a2">or attribute wildcard</phrase>
       <phrase dg="vm13">or an <compref ref="oc"/>
       with a <pt>lax</pt> <compref ref="w"/></phrase> and 
       it does not have a <termref def="key-governing-ed"/><phrase dg="rq17a2"> or
       a <termref def="key-governing-ad"/></phrase>, then
       the default binding is 
       <!--*
* material suppressed here by diff group rq146-0 *
*-->
       <phrase dg="rq146-0">the keyword <pt>lax</pt>.</phrase></p>
     </item>
     <item>
      <p>When the item is <termref def="key-att-to">attributed</termref> to a <pt>skip</pt>
       <termref def="key-wp"/> <phrase dg="rq17a2">or attribute wildcard</phrase>
       <phrase dg="vm13">or an <compref ref="oc"/>
       with a <pt>skip</pt> <compref ref="w"/></phrase> then
       the default binding is the keyword
       <!--*
* material suppressed here by diff group rq146-0 *
*-->
       <phrase dg="rq146-0"><pt>skip</pt>.</phrase></p>
     </item>
     <!--*
* material suppressed here by diff group rq146-0 *
*-->
    </olist>
   </termdef>
   </p>
   <!--*
    <note diff="add" dg="rq146-0">
    <p>The &dft-binding; of an element information item is different from
    its <termref def="key-cdt" diff="del" dg="b4690"/><termref
    def="key-ldtype" diff="add" dg="b4690"/>, but related: for any element with a &cdd;, the
    <termref def="key-cdt" diff="del" dg="b4690"/><termref
    def="key-ldtype" diff="add" dg="b4690"/>, will be the &ed-declared-type.xtd;
    of the element's &cdd; and thus of its
    &dft-binding;.</p>
    </note>
    *-->
   
   <!--*
* material suppressed here by diff group rq146-abandoned *
*-->

<p><termdef role="local" id="loc-testSubP" term="subsumes">A 
<!--*
* material suppressed here by diff group b3725-2 *
*--><phrase dg="b3725-2"><termref def="key-dft-binding"/></phrase>
<local>G</local> (for general) <term>subsumes</term> another 
<!--*
* material suppressed here by diff group b3725-2 *
*--><phrase dg="b3725-2"><termref def="key-dft-binding"/></phrase>
<local>S</local> (for specific) if and only if </termdef>
    <olist role="ortest">
     <item>
      <p><local>G</local> is <!--*
* material suppressed here by diff group rq146-0 *
*--><phrase dg="rq146-0"><pt>skip</pt></phrase>.</p>
     </item>
     <item>
      <p><local>G</local> is <!--*
* material suppressed here by diff group rq146-0 *
*--><phrase dg="rq146-0"><pt>lax</pt></phrase>
and <local>S</local> is not <!--*
* material suppressed here by diff group rq146-0 *
*--><phrase dg="rq146-0"><pt>skip</pt></phrase>.</p>
     </item>
     <item dg="rq146-0">
      <p>Both <local>G</local> and <local>S</local> are <pt>strict</pt>.</p>
     </item>
     <item>
      <p><local>G</local> and <local>S</local> are both Element Declarations and
       <olist role="andtest">
        <item>
	     <!--*
* material suppressed here by diff group ep24 *
*-->
	     <p dg="ep24">Either 
	      <local>G</local>.<propref comp="ed" prop="nillable"/> = <pt>true</pt>
	      or 
	      <local>S</local>.<propref comp="ed" prop="nillable"/> = <pt>false</pt>.</p>
        </item>
        <item>
	     <p>Either <local>G</local> has no <propref comp="ed" prop="value constraint"/>, or it is not <pt>fixed</pt>,
	      or <local>S</local> has a <pt>fixed</pt> <propref comp="ed" prop="value constraint"/> with 
	      <!--*
* material suppressed here by diff group wgi-20080530 *
*--><phrase dg="wgi-20080530">an equal</phrase>
	      value.</p>
        </item>
        <item>
         <p><local>S</local><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="ed" prop="identity-constraint definitions"/> 
	      <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">is</phrase> 
	      a superset of <local>G</local><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.<propref comp="ed" prop="identity-constraint definitions"/></phrase>.</p>
        </item>
        <item>
         <p><local>S</local> disallows a superset of the substitutions that <local>G</local> does.</p>
</item>
<!--*
* material suppressed here by diff group cta-cp *
*-->
        <item id="c-vs-ct">
         <!--*
* material suppressed here by diff group cta-ed *
*-->
         <p dg="cta-ed"><local>S</local>'s <phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/> is <termref def="key-val-sub-type-restricts"/> for <local>G</local>'s <phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/>.</p>
        </item>
        <!--*
* material suppressed here by diff group cta-pf *
*-->
       </olist>
      </p>
     </item>
	 <item dg="rq17a2">
	  <p><local>G</local> and <local>S</local> are both <!--*
* material suppressed here by diff group b5003 *
*--><phrase dg="b5003">
	   <compref ref="au"/>s</phrase> and
	   <olist role="andtest">
	    <item>
	     <p><!--*
* material suppressed here by diff group b5003 *
*--><phrase dg="b5003"><var>G</var>.<propref comp="au" prop="attribute declaration"/></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="ad" prop="type definition"/> is
	      validly <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> from 
	      <!--*
* material suppressed here by diff group b5003 *
*--><phrase dg="b5003"><var>S</var>.<propref comp="au" prop="attribute declaration"/></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="ad" prop="type definition"/>, 
	      <!--*
* material suppressed here by diff group cta-gst *
*--> as
	      defined in <specref ref="cos-st-derived-ok"/>.</p>
	    </item>
	    <item><p>
	     <phrase dg="b5003">Let <local>GVC</local> be <var>G</var>'s
	     <termref def="key-evc"/> and <local>SVC</local> be <var>S</var>'s
	     <termref def="key-evc"/>, then</phrase>
	     <olist role="oomtest">
	       <item>
		<p><local>GVC</local> is <termref def="key-null">absent</termref> or has
		 <propref comp="vc_a" prop="variety"/> <pt>default</pt>.</p>
	       </item>
	       <item>
		<!--*
* material suppressed here by diff group ep24 *
*-->
		<p dg="ep24"><local>SVC</local>.<propref comp="vc_a" prop="variety"/>
		 = <pt>fixed</pt> and 
		 <local>SVC</local>.<propref comp="vc_a" prop="value"/> is 
		 <!--*
* material suppressed here by diff group wgi-20080530 *
*--><phrase dg="wgi-20080530">equal</phrase> to
		 <local>GVC</local>.<propref comp="vc_a" prop="value"/>.</p>
	       </item>
	      </olist>
	     </p>
	    </item>
	    <item dg="b5003"><p>
	     <var>G</var>.<propref comp="au" prop="inheritable"/> =
	     <var>S</var>.<propref comp="au" prop="inheritable"/>.
	    </p></item>
	   </olist>
	  </p>
	 </item>
    </olist>
   </p>
  </constraintnote>

  <note>
   <p>To restrict a complex type definition with a simple base type definition
to <pt>empty</pt>, use a simple type definition with a <pt>fixed</pt> value of
the empty string: this preserves the type information.</p>
  </note>

  <note dg="b2867-2">
   <p>To restrict away a local element declaration that <termref def="key-compete">competes</termref> with
    a wildcard, use a wildcard in the derived type that explicitly
    disallows the element's <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref>. See the example given in
    <specref ref="declare-type"/>.</p>
  </note>

<!--*
* material suppressed here by diff group cta-st *
*-->

     </div4>
     <div4 id="sec-cos-ct-derived-ok" dg="b5165a">
      <head dg="b5165a">Type Derivation OK (Complex)</head>

<p>The following constraint defines a relation appealed to elsewhere
in this specification.</p>
<constraintnote id="cos-ct-derived-ok" type="cos">
<head>Type Derivation OK (Complex)</head>
<p>For a complex type definition (call it <local>D</local>, for
<!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref>) to be validly <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> from a type definition (call this
<local>B</local>, for base) <!--*
* material suppressed here by diff group cta-gst *
*--><phrase dg="cta-gst">subject to</phrase> 
<phrase dg="cta-gst">the blocking keywords in</phrase>
a subset of {<pt>extension</pt>,
<pt>restriction</pt>}
<olist role="and">
<item>
<p>If <local>B</local> and <local>D</local> are not the same type
definition, then the <propref comp="ctd" prop="derivation method"/> of
<local>D</local> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is not</phrase>
in the subset.</p>
</item>
<item>      
<p>
<olist role="OoMtest">
<!--* changed to One or more 2008-05-08 by MSM:
    * if B = D = xs:anyType, the first two clauses are both true.
    *-->
<item id="c-tid">
<!--*
* material suppressed here by diff group ep24 *
*-->
<p dg="ep24"><local>B</local> = <local>D</local>.</p>
</item>
<item>
<!--*
* material suppressed here by diff group ep24 *
*-->
<p dg="ep24"><local>B</local> = <local>D</local>.<propref comp="ctd" prop="base type definition"/>.</p>
</item>
<item>
<p>
<olist role="Andtest">
<item>
<p><local>D</local><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="ctd" prop="base type definition"/> <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">≠</phrase> <!--*
* material suppressed here by diff group wd-200708-1 *
*--><phrase dg="wd-200708-1"><termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref></phrase>.</p>
</item>
<item>
<p>
<olist role="Casetest">
<item>
<p role="if"><local>D</local><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="ctd" prop="base type definition"/> is complex</p>
<p role="then">it <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> validly <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> from <local>B</local>
<!--*
* material suppressed here by diff group cta-gst *
*--><phrase dg="cta-gst">subject to</phrase> the subset as defined by this constraint.</p>
</item>
<item>
<p role="if"><local>D</local><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="ctd" prop="base type definition"/> is simple</p>
<p role="then">it <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> validly <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> from <local>B</local>
<!--*
* material suppressed here by diff group cta-gst *
*--><phrase dg="cta-gst">subject to</phrase> the subset as defined in <specref ref="cos-st-derived-ok"/>.</p>
</item>
</olist>
</p>
</item>
</olist>
</p>
</item>
</olist>
</p>
</item>
</olist>
</p>
</constraintnote>
  <note>
   <p>This constraint is used to check that when someone uses a type in a
context where another type was expected (either via <code>xsi:type</code> or
<!--*
* material suppressed here by diff group b4337 *
*--><termref def="key-eq" dg="b4337">substitution groups</termref>), that the type used is actually <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> from the expected
type, and that that <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derivation</termref> does not involve a form of <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derivation</termref> which was
ruled out by the expected type.</p>
  </note>
  <note id="no-identity">
   <p>The wording of <clauseref ref="c-tid"/> above appeals to a notion of component identity which
is only incompletely defined by this version of this specification.
In some cases, the wording of this specification does make clear the
rules for component identity.  These cases include:
    <ulist>
     <item>
      <p>When they are both top-level components with the same component type,
namespace name, and local name;</p>
     </item>
     <item>
      <p>When they are necessarily the same type definition (for example, when
the two type<!--*
* material suppressed here by diff group b5141 *
*-->
definitions in question are the type definitions associated with
two attribute or element declarations, which are discovered to be the same
declaration);</p>
     </item>
     <item>
      <p>When they are the same by construction (for example, when an element's
type definition defaults to being the same type definition as that of its
substitution-group head or when a complex type definition inherits an attribute
declaration from its base type definition).</p>
     </item>
    </ulist>
   </p>
   <p>In other cases <!--*
* material suppressed here by diff group ep08a *
*--> 
<phrase dg="modals">it is possible
that</phrase> conforming implementations <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">will</phrase>
disagree as to whether components are identical.</p>
  </note>

<note dg="cta-gst">
<p>When a complex type definition <var>S</var> is said to be 
<quote>validly <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref></quote> from a type definition <var>T</var>,
without mention of any specific set of blocking keywords,
or with the explicit phrase <quote>without limitation</quote>,
then what is meant is that <var>S</var> is validly derived from
<var>T</var>, subject to the empty set of blocking keywords,
i.e. without any particular limitations.</p>
</note>
     </div4>
    </div3>

    <div3 id="builtin-ctd">
     <head>Built-in Complex Type <phrase dg="rq17-x">Definition</phrase><!--*
* material suppressed here by diff group rq17-x *
*--></head>

<!--* 
<div4 id="xsd-anyType">
<head><code>xs:anyType</code></head>
*-->
<!--* the contents of this div4 were wrapped in a div4 only
    * when the following div4 was added, by dg cta.  If that fails to be
    * adopted, unwrap this silently. -msm 
    *-->

     <!--*
* material suppressed here by diff group rq17-x *
*-->
     <!--*
* material suppressed here by diff group rq17-x *
*-->
<!--*
* material suppressed here by diff group rq17-x *
*-->
<!--*
* material suppressed here by diff group rq17-x *
*-->
<!--* <p diff="add" dg="rq129ter"> *-->
<!--*
* material suppressed here by diff group rq17-x *
*-->
<!--*
* material suppressed here by diff group rq17-x *
*-->

    <!--*
* material suppressed here by diff group rq17-x *
*-->

    <p>There is <!--*
* material suppressed here by diff group rq17-x *
*-->a complex
type definition <!--*
* material suppressed here by diff group rq17 *
*--><phrase dg="rq17">for <termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref></phrase> present in every schema
by definition.  It has the following properties:</p>

<!--* WARNING!!! The following schema-component definition occurs twice
    * in order to avoid IDREF validity problems when generating status quo text
    * without RQ-17.  If you edit, be sure you edit the right one!
    * N.B. After RQ-17 is adopted, we may wish to suppress the older
    * version. *-->
<!--* Edit this copy with id=any-type-itself if you are working in 
    * a world where RQ17 is adopted *-->
    <schemaComp id="any-type-itself" dg="rq17">
     <head>Complex Type Definition of anyType</head>
     <pvlist>
      <pvpair comp="ctd" prop="name">anyType</pvpair>
      <pvpair comp="ctd" prop="target namespace">http://www.w3.org/2001/XMLSchema</pvpair>
      <pvpair comp="ctd" prop="base type definition">itself</pvpair>
      <pvpair comp="ctd" prop="derivation method"><pt>restriction</pt></pvpair>
      <pvpair comp="ctd" prop="content type">A <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01"><compref ref="ct"/> as follows:</phrase>
       <pvlist>
        <pvpair comp="ct" prop="variety"><pt>mixed</pt></pvpair>
        <pvpair comp="ct" prop="particle">a
<compref ref="p"/> with the <!--*
* material suppressed here by diff group rq129bis *
*-->properties<phrase dg="rq129bis"> shown
         below in <specref ref="anyType-outer-particle"/>.</phrase><!--*
* material suppressed here by diff group rq129bis *
*-->
       <!--*
* material suppressed here by diff group rq129bis *
*--></pvpair>
        <pvpair comp="ct" prop="simple type definition"><termref def="key-null"/></pvpair>
       </pvlist>
      </pvpair>
      <pvpair comp="ctd" prop="attribute uses">The empty set</pvpair>
        <pvpair comp="ctd" prop="attribute wildcard">
        a wildcard with the following properties::
             <pvlist>
              <pvpair comp="w" prop="namespace constraint"><!--*
* material suppressed here by diff group b2867-1 *
*-->
               <phrase dg="b2867-1">A <compref ref="nc"/> with the following properties:</phrase>
               <pvlist dg="b2867-1">
                <pvpair comp="nc" prop="variety"><pt>any</pt></pvpair>        
                <pvpair comp="nc" prop="namespaces">The empty set</pvpair>
                <pvpair comp="nc" prop="disallowed names">The empty set</pvpair>
               </pvlist>
              </pvpair>
              <pvpair comp="w" prop="process contents"><pt>lax</pt></pvpair>
             </pvlist></pvpair>
        <pvpair comp="ctd" prop="final">The empty set</pvpair>
      <pvpair dg="context-2338" comp="ctd" prop="context"><termref def="key-null"/></pvpair>
        <pvpair comp="ctd" prop="prohibited substitutions">The empty set</pvpair>
        <pvpair comp="ctd" prop="assertions" dg="b2861cc-1">The empty sequence</pvpair>
        <pvpair comp="ctd" prop="abstract"><pt>false</pt></pvpair>
     </pvlist>
    </schemaComp>

<!--* Edit this copy with del-ur-type-itself if you are working in a world 
    * where RQ17 has been rejected *-->
    <!--*
* material suppressed here by diff group rq17aux *
*-->

<p dg="rq129bis">
The outer particle of <!--*
* material suppressed here by diff group rq17 *
*--><termref def="key-anyType" dg="rq17"><phrase><code>xs:anyType</code></phrase></termref> contains a sequence with a single term:
</p>
<schemaComp id="anyType-outer-particle" dg="rq129bis">
<head>Outer Particle for Content Type of anyType</head>
       <pvlist>
        <pvpair comp="p" prop="min occurs">1</pvpair>
        <pvpair comp="p" prop="max occurs">1</pvpair>
        <pvpair comp="p" prop="term">a model group with
the following properties:
         <pvlist>
          <pvpair comp="mg" prop="compositor"><pt>sequence</pt></pvpair>
          <pvpair comp="mg" prop="particles">
           a list containing one particle with the properties shown
           below in <specref ref="anyType-inner-particle"/>.
           </pvpair>
         </pvlist>
        </pvpair>
       </pvlist>
</schemaComp>
<p dg="rq129bis">
The inner particle of <!--*
* material suppressed here by diff group rq17 *
*--><termref def="key-anyType" dg="rq17"><phrase><code>xs:anyType</code></phrase></termref> contains a wildcard which matches any element:
</p>
<schemaComp id="anyType-inner-particle" dg="rq129bis">
<head>Inner Particle for Content Type of anyType</head>
  <pvlist>
    <pvpair comp="p" prop="min occurs">0</pvpair>
    <pvpair comp="p" prop="max occurs"><pt>unbounded</pt></pvpair>
    <pvpair comp="p" prop="term">a wildcard with the following properties:
      <pvlist>
       <pvpair comp="w" prop="namespace constraint"><!--*
* material suppressed here by diff group b2867-1 *
*-->
        <phrase dg="b2867-1">A <compref ref="nc"/> with the following properties:</phrase>
        <pvlist dg="b2867-1">
         <pvpair comp="nc" prop="variety"><pt>any</pt></pvpair>        
         <pvpair comp="nc" prop="namespaces">The empty set</pvpair>
         <pvpair comp="nc" prop="disallowed names">The empty set</pvpair>
        </pvlist>
       </pvpair>
        <pvpair comp="w" prop="process contents"><pt>lax</pt></pvpair>
      </pvlist>
    </pvpair>
  </pvlist>
</schemaComp>

     <note><p>This specification does not provide an inventory of built-in complex
type definitions for use in user schemas.  A preliminary library of complex type
definitions is available which includes both mathematical (e.g.
<code>rational</code>) and utility (e.g. <code>array</code>) type definitions. 
In particular, there is a <code>text</code> type definition which is recommended for use
as the type definition in element declarations intended for general text
content, as it makes sensible provision for various aspects of
internationalization.  For more details, see the schema document for the type
library at its namespace name: <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2001/03/XMLSchema/TypeLibrary.xsd">http://www.w3.org/2001/03/XMLSchema/TypeLibrary.xsd</loc>.</p></note>
<!--* </div4> *-->

    </div3>
   </div2>
   <div2 id="cAttributeUse">
    <head>Attribute Uses</head>
    <p>An attribute use is a utility component which controls the occurrence and
defaulting behavior of attribute declarations.  It plays the same role for
attribute declarations in complex types that particles play for element declarations.</p>
    <note role="example">
     <eg xml:space="preserve">&lt;xs:complexType&gt;
 . . .
 &lt;xs:attribute ref="xml:lang" use="required"/&gt;
 &lt;xs:attribute ref="xml:space" default="preserve"/&gt;
 &lt;xs:attribute name="version" type="xs:<!--*
* material suppressed here by diff group b1915bis *
*--><phrase dg="b1915bis">decimal</phrase>" fixed="1.0"/&gt;
&lt;/xs:complexType&gt;
     </eg>
     <p>XML representations which all involve attribute uses, illustrating some of
the possibilities for controlling occurrence.</p>
    </note>
    <div3 id="AU_details">
     <head>The Attribute Use Schema Component</head>
     <p>The attribute use schema component has the following properties:</p>

     <compdef name="Attribute Use" abbrev="au" showAKO="true"/>
     <microCompdef name="Value Constraint" abbrev="vc_au" dg="ep01"/>
     <p><propref comp="au" prop="required"/> determines whether this use of an attribute
declaration requires an appropriate attribute information item to be present, or
merely allows it.</p>
     <p><propref comp="au" prop="attribute declaration"/> provides the attribute declaration itself,
which will in turn determine the simple type definition used.</p>
     <p><propref comp="au" prop="value constraint"/> allows for local
      specification of a default or fixed value.  This <rfc2119>must</rfc2119> be
      consistent with that of the
      <propref comp="au" prop="attribute declaration"/>, in that if
      the <propref comp="au" prop="attribute declaration"/> specifies
      a fixed value, the only allowed <propref comp="au" prop="value        constraint"/> is the same fixed value<phrase dg="wgi-20080530">, or a value equal to it</phrase>.</p>
     <p dg="bannotations">
      See <specref ref="cAnnotations"/> for information on the role of the
      <propref comp="au" prop="annotations"/> property.
     </p>
    </div3>
    <div3 id="sec-xrau">
     <head>XML Representation of Attribute Use <phrase dg="b5156">Schema</phrase> Components</head>
     <p>Attribute uses correspond to all uses of <eltref ref="attribute"/> which
allow a <code>use</code> attribute.  These in turn correspond to
<emph>two</emph> components in each case, an attribute use and its <propref comp="au" prop="attribute declaration"/> (although note the latter is not new when the attribute use is a reference to a top-level attribute declaration).  The appropriate mapping is described in <specref ref="declare-attribute"/>.</p>
    </div3>
    <div3 id="sec-src-au">
     <head>Constraints on XML Representations of Attribute Uses</head>
     <p>None<phrase dg="ep99"> as such</phrase>.</p>
    </div3>
    <div3 id="sec-cvc-au">
     <head>Attribute Use Validation Rules</head>

     <p dg="wd-200708-1">
      <termdef id="key-evc" term="effective value constraint">
       The <term>effective value constraint</term> of an attribute use 
       <phrase dg="ep24"><var>U</var></phrase>
       is <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>U</var>.</phrase><propref comp="au" prop="value constraint"/>, if present, otherwise 
       <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>U</var>.</phrase><propref comp="au" prop="attribute declaration"/><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="ad" prop="value constraint"/>, if present, 
       otherwise
       the <term>effective value constraint</term> is <termref def="key-null">absent</termref>.</termdef>
     </p>
     <constraintnote type="cvc" id="cvc-au">
      <head>Attribute Locally Valid (Use)</head>
      <!--*
* material suppressed here by diff group b3963 *
*-->
      <p>For an attribute information item to be <termref def="key-vn">valid</termref> with respect to an attribute use
       its <!--*
* material suppressed here by diff group rq129 *
*--><phrase dg="rq129"><termref def="key-vv">actual value</termref></phrase> <rfc2119>must</rfc2119> <!--*
* material suppressed here by diff group rq129 *
*--><phrase dg="rq129">be <!--*
* material suppressed here by diff group wgi-20080530 *
*--><phrase dg="wgi-20080530">equal</phrase> to the <propref comp="vc_a" prop="value"/></phrase> of the attribute use's <propref comp="au" prop="value constraint"/><!--*
* material suppressed here by diff group rq129 *
*-->, if it is present and <phrase dg="ep01">has <propref comp="vc_a" prop="variety"/>
       </phrase><pt>fixed</pt>.</p>
     </constraintnote>

     
    </div3>
    <div3 id="sec-ausic">
     <head>Attribute Use Information Set Contributions</head>
     <p>None<phrase dg="ep99"> as such</phrase>.</p>
    </div3>
    <div3 id="coss-attruse">
     <head>Constraints on Attribute Use Schema Components</head>
  <p>All attribute uses (see <specref ref="cAttributeUse"/>) <rfc2119>must</rfc2119> satisfy the following constraints.</p>

     <constraintnote type="cos" id="au-props-correct">
      <head>Attribute Use Correct</head>
      <olist role="And">
       <item>
	<p>The values of the properties of an attribute use 
	 <phrase dg="ep24"><var>U</var></phrase> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">are</phrase> as
	 described in the property tableau in
	 <specref ref="AU_details"/>, modulo 
	 the impact of <specref ref="conformance-missing"/>.</p>
       </item>
       <item dg="rq129">
	<p>If <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>U</var>.</phrase><propref comp="au" prop="value constraint"/> is 
	 not <termref def="key-null"/>, then it is a valid default with
	 respect to <!--*
* material suppressed here by diff group ep24 *
*--> 
	 <phrase dg="ep24"><var>U</var>.</phrase><propref comp="au" prop="attribute declaration"/><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="ad" prop="type definition"/> 
	 as defined in <specref ref="cos-valid-simple-default"/>.</p>
       </item>
       <item>
	<!--*
* material suppressed here by diff group ep24 *
*-->
	<p dg="ep24">If <var>U</var>.<propref comp="au" prop="attribute declaration"/> has 
	 <propref comp="ad" prop="value constraint"/>.<propref comp="vc_a" prop="variety"/> 
	 = <pt>fixed</pt> and <var>U</var> itself has a
	 <propref comp="au" prop="value constraint"/>, then 
	 <var>U</var>.<propref comp="au" prop="value constraint"/>.<propref comp="vc_au" prop="variety"/> 
	 = <pt>fixed</pt> and
	 <var>U</var>.<propref comp="au" prop="value constraint"/>.<propref comp="vc_au" prop="value"/> 
	 is identical to
	 <var>U</var>.<propref comp="au" prop="attribute declaration"/>.<propref comp="ad" prop="value constraint"/>.<propref comp="vc_a" prop="value"/>.</p>
       </item>
      </olist>
     </constraintnote>

    </div3>
   </div2>
   <div2 id="cAttribute_Group_Definitions">
    <head>Attribute Group Definitions</head>
<p>A schema can name a group of attribute declarations <!--*
* material suppressed here by diff group b2861cc-1g *
*-->so that they <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">can</phrase> be incorporated as a
group into complex type definitions.</p>
<p>
Attribute group definitions do not participate in <termref def="key-vn">validation</termref> as such, but the
<propref comp="ctd" prop="attribute uses"/><phrase dg="b2861cc-1g"> and</phrase><!--*
* material suppressed here by diff group b2861cc-1g *
*--> <propref comp="ctd" prop="attribute wildcard"/>
<!--*
* material suppressed here by diff group b2861cc-1g *
*-->of one or
more complex type definitions <!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase> be constructed in whole or part by reference
to an attribute group.  Thus, attribute group definitions provide a
replacement for some uses of XML's
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#dt-PE">parameter entity</xspecref> facility.
Attribute group definitions are provided primarily for reference from the XML
representation of schema components
(see <eltref ref="complexType"/> and <eltref ref="attributeGroup" inside="simpleContent"/>).
</p>
    <note role="example">
<eg xml:space="preserve">&lt;xs:attributeGroup name="myAttrGroup"&gt;
    &lt;xs:attribute . . ./&gt;
    . . .
&lt;/xs:attributeGroup&gt;

&lt;xs:complexType name="myelement"&gt;
    . . .
    &lt;xs:attributeGroup ref="myAttrGroup"/&gt;
&lt;/xs:complexType&gt;
</eg>
<p>XML representations for attribute group definitions. The effect is as if the attribute
declarations in the group were present in the type definition.</p>
</note>
 <p dg="b5158">The example above illustrates the pattern
     mentioned in <specref ref="xroc"/><!--*
* material suppressed here by diff group b5158b *
*-->:  The same
     element, in this case <code>attributeGroup</code>, serves both to
     define and to incorporate by reference.  In the first
     <code>attributeGroup</code> element in the example, the
     <code>name</code> attribute is required and the
     <code>ref</code> attribute is forbidden; in the second the
     <code>ref</code> attribute is required, the 
     <code>name</code> attribute is forbidden<!--*
* material suppressed here by diff group b5158b *
*-->.</p>

    <div3 id="Attribute_Group_Definition_details">
     <head>The Attribute Group Definition Schema Component</head>
    <p>The attribute group definition schema component has the
following properties:</p>

  <compdef name="Attribute Group Definition" abbrev="agd" showAKO="true"/>

  <p>Attribute groups are identified by their <propref comp="agd" prop="name"/> and <propref comp="agd" prop="target namespace"/>; attribute group identities <rfc2119>must</rfc2119> be unique within an <!--*
* material suppressed here by diff group b4399 *
*--><termref def="key-schema" dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--> schema</termref>.  See <specref ref="composition-schemaImport"/> for the use of component
identifiers when importing one schema into another.</p>
<p><propref comp="agd" prop="attribute uses"/> is 
a set <phrase dg="b5141">of</phrase>
attribute uses, allowing
for local specification of occurrence and default or fixed values.</p>
<p><propref comp="agd" prop="attribute wildcard"/> provides for an attribute wildcard to be included in an
attribute group.
See above under <specref ref="Complex_Type_Definitions"/> for the
interpretation of
attribute wildcards during <termref def="key-vn">validation</termref>.</p>
<!--*
* material suppressed here by diff group b2861cc-1g *
*-->
     <p>See <specref ref="cAnnotations"/> for information on the role of the
<propref comp="agd" prop="annotations"/> property.</p>
    </div3>

    <div3 id="declare-attributeGroup">
     <head><phrase dg="b5159b">XML Representation of Attribute Group Definition Schema Components</phrase><!--*
* material suppressed here by diff group b5159b *
*--></head>
     <div4 id="declare-attributeGroup-core" dg="b5286e2">
      <head dg="b5286e2">XML Mapping Rule for Named Attribute Groups</head>

      <p>The XML representation for an attribute group definition
       schema component is an <eltref ref="attributeGroup" inside="simpleContent"/> element information item. <phrase dg="b2861cc-1g">It provides for naming a group of
	attribute declarations and an attribute wildcard for use by
	reference in the XML representation of complex type definitions
	and other attribute group definitions. </phrase> <!--* uh, why
       bother to delete that? *--> The correspondences between the
       properties of the information item and properties of the
       component it corresponds to are <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152">given in this section.</phrase></p>

      <!--* Experiments with splitting the representations *-->
      <reprdef dg="b5286e-aux">
       <reprelt id="reprelt_ag" eltname="attributeGroup" type="attributeGroup" dg="b5286e-aux"/>
      </reprdef>

      <p id="ag_p1" dg="b5286e-aux">When an <eltref ref="attributeGroup" inside="simpleContent"/> appears as a <!--*
* material suppressed here by diff group b5194 *
*--><phrase dg="b5194">child</phrase> of
       <eltref ref="schema"/> or <eltref ref="redefine"/>, it corresponds to an
       attribute group definition as below.  When it appears as a
       <!--*
* material suppressed here by diff group b5194 *
*--><phrase dg="b5194">child</phrase> of <eltref ref="complexType"/> or <eltref ref="attributeGroup" inside="simpleContent"/>, it does
       not correspond to any component as such.</p>

      <reprdef>
       <!--* this is the original reprdef element.
       Some of its contents are still here.
       Others have been moved out. 
       *-->
       <!--*
* material suppressed here by diff group b5286e-aux *
*-->
       <!--*
* material suppressed here by diff group b5286e-aux *
*-->
       <!--* 
       <reprelt eltname="attributeGroup" type="attributeGroup"
       diff="del" dg="b5286e-aux"
       />
       
       <p diff="del" dg="b5286e-aux">When an <eltref
       ref="attributeGroup"/> appears as a &child.xdaughter; of
       <eltref ref="schema"/><phrase diff="del" dg="b4767">
       or</phrase><phrase diff="add" dg="b4767">,</phrase>
       <eltref ref="redefine"/><phrase diff="add" dg="b4767"> or
       <eltref ref="override"/></phrase>, it corresponds to an
       attribute group definition as below.  When it appears as a
       &child.xdaughter; of <eltref
       ref="complexType"/> or <eltref ref="attributeGroup"/>, it does
       not correspond to any component as such.</p>
       *-->

       <!--* During 2006-10-20 telecon, the WG agreed to include annotations
       on <include> etc. on the enclosing schema.
       <note diff="add" dg="bannotations-2">
       <p>It is a consequence of this rule that any annotations specified in
       attribute group references are not reflected in the component structure.</p>
      </note>
       *-->
       
       <reprcomp abstract="Attribute Group Definition" ref="Attribute_Group_Definition_details">
	<propmap comp="agd" prop="name">The <termref def="key-vv">actual value</termref> of the <code>name</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref></propmap>
	<propmap comp="agd" prop="target namespace">The <termref def="key-vv">actual value</termref> of the
	 <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of the
	 <phrase dg="b5148"><eltref ref="schema"/></phrase> <!--*
* material suppressed here by diff group cleanup-1 *
*--><phrase dg="cleanup-1">ancestor</phrase>
	 <!--*
* material suppressed here by diff group b5148 *
*-->
	 element information item<phrase dg="b5148"> if present, otherwise <termref def="key-null">absent</termref></phrase>.</propmap>
	<propmap comp="agd" prop="attribute uses" dg="b5286e-x">
	 The union of the set of attribute uses corresponding to the
	 <eltref ref="attribute"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if any, with the
	 <propref comp="agd" prop="attribute uses"/> of the attribute groups
	 <termref def="src-resolve">resolved</termref> to by the <termref def="key-vv">actual value</termref>s of the <code>ref</code>
	 <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of the <eltref ref="attributeGroup" inside="simpleContent"/>
	 <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if any.
	 <note dg="b5286e2">
	  <p>As described below, circular references from <eltref ref="attributeGroup" inside="simpleContent"/>
	   to <eltref ref="attributeGroup" inside="simpleContent"/> are not errors.</p>
	 </note>
	</propmap>
	<!--*
* material suppressed here by diff group b5286e *
*-->
	<!--*
* material suppressed here by diff group b5286e-x *
*-->
	<propmap comp="agd" prop="attribute wildcard" dg="b5286e">
	 <!--*
* material suppressed here by diff group b5286e2 *
*-->
	 <phrase dg="b5286e2">The <compref ref="w"/> determined by
	  applying the attribute-wildcard mapping described 
	  <!--*
* material suppressed here by diff group b5286e2 *
*--><phrase dg="b5286e2">in 
	   <specref ref="declare-attributeGroup-wildcard"/></phrase>
	  to the <eltref ref="attributeGroup" inside="simpleContent"/>
	  element information item.</phrase>
	</propmap>
	<!--*
* material suppressed here by diff group b2861cc-1g *
*-->
	<propmap comp="agd" prop="annotations"><!--*
* material suppressed here by diff group bannotations-1 *
*-->
	 <phrase dg="bannotations-2">
	  The <termref def="key-am-one"/> of the
	  <eltref ref="attributeGroup" inside="simpleContent"/> element<phrase dg="bannotations-3"> and
	   its <eltref ref="attributeGroup" inside="simpleContent"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if present</phrase>,
	  as defined in <specref ref="declare-annotation"/>.
	 </phrase>
	</propmap>
       </reprcomp>

      </reprdef>
      <note dg="bannotations-3"><p>
	It is a consequence of this rule and the rule in <specref ref="declare-type"/>
	that any annotations specified in attribute group references are included in
	the sequence of <compref ref="a"/>s of the enclosing <compref ref="ctd"/> or
	<compref ref="agd"/> components.
       </p></note>
      <p dg="b5286e2">The rules given above for 
       <propref comp="agd" prop="attribute uses"/>
       and <propref comp="agd" prop="attribute wildcard"/> specify that 
       if an <eltref ref="attributeGroup" inside="simpleContent"/> element <var>A</var> contains a reference
       to another attribute group <var>B</var> (i.e. <var>A</var>'s <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> include an
       <eltref ref="attributeGroup" inside="simpleContent"/> with a <att>ref</att> attribute pointing
       at <var>B</var>), then <var>A</var> maps to an <compref ref="agd"/> component whose
       <propref comp="agd" prop="attribute uses"/> reflect not only 
       the <eltref ref="attribute"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <var>A</var> but also those of
       <var>B</var> and of any <eltref ref="attributeGroup" inside="simpleContent"/> elements referred
       to in <var>B</var>.  The same is true for attribute groups referred to from
       complex types.
      </p>
      <p dg="b5286e2">
       Circular reference is <emph>not</emph> disallowed.  That is, it
       is not an error if <var>B</var>, or some <eltref ref="attributeGroup" inside="simpleContent"/>
       element referred to by <var>B</var> (directly, or indirectly at some 
       remove) contains a reference to <var>A</var>.  An <eltref ref="attributeGroup" inside="simpleContent"/>
       element involved in such a reference cycle maps to a
       component whose <propref comp="agd" prop="attribute uses"/>
       and <propref comp="agd" prop="attribute wildcard"/> properties
       reflect all the <eltref ref="attribute"/> and <eltref ref="any"/>
       elements contained in, or referred to (directly or indirectly)
       by elements in the cycle.  
      </p>
      <!--*
* material suppressed here by diff group b5158 *
*-->
      <note dg="b5286e"><p>
	In version 1.0 of this specification, circular group reference was not
	allowed except in the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <eltref ref="redefine"/>.  
	As described above, this version allows it.
	The effect is to take the transitive closure of the 
	reference relation between <eltref ref="attributeGroup" inside="simpleContent"/> 
	elements and take into account
	all their <propref comp="agd" prop="attribute uses"/> and
	<propref comp="agd" prop="attribute wildcard"/> properties.
       </p></note>

     </div4>
     <div4 id="declare-attributeGroup-wildcard" dg="b5286e2">
      <head dg="b5286e2">Common Rules for Attribute Wildcards</head>
      <p dg="b5286e2">
       The following mapping for attribute-wildcards forms part of the
       XML mapping rules for different kinds of source declaration
       (most prominently <eltref ref="attributeGroup" inside="simpleContent"/>).  It can be
       applied to any element which can have an <eltref ref="anyAttribute"/>
       element as a child, and produces as a result either a
       <compref ref="w"/> or the special value <termref def="key-null">absent</termref>.
       The mapping depends on the concept of the <termref def="key-law"/>:
       <termdef id="key-law" term="local wildcard" role="local" dg="b5286e">
	<!--*
* material suppressed here by diff group b5286e2 *
*--><phrase dg="b5286e2">The</phrase> 
	<term>local wildcard</term> <phrase dg="b5286e2">of 
	 an element information item <var>E</var></phrase>
	<!--*
* material suppressed here by diff group b5286e2 *
*--><phrase dg="b5286e2">is</phrase> <olist role="caseval">
	 <item id="local-wc-yes">
	  <p role="if"><!--*
* material suppressed here by diff group b5286e2 *
*--><phrase dg="b5286e2"><var>E</var> has
	    an <eltref ref="anyAttribute"/> child</phrase></p>
	  <p role="then"><!--*
* material suppressed here by diff group b5286e2 *
*--><phrase dg="b5286e2">the
	    <compref ref="w"/> mapped to by the <eltref ref="anyAttribute"/> element using the wildcard
	    mapping</phrase> set out in
	   <specref ref="declare-openness"/>;</p>
	 </item>
	 <item>
	  <p role="otherwise"><termref def="key-null">absent</termref>.</p>
	 </item>
	</olist></termdef>
      </p>
      <p dg="b5286e2">The mapping is defined as follows:
       <olist id="awc-mapping-steps" dg="b5286e-aux">
	<item id="local-wc"><p>
	  <!--*
* material suppressed here by diff group b5286e2 *
*-->
	  <phrase dg="b5286e2">Let <var>L</var> be the 
	   <termref def="key-law"/></phrase>
	 </p>
	</item>
	<item dg="b5286e2">
	 <p>Let <var>W</var> be a sequence containing all the <termref def="key-null">non-absent</termref> 
	  <propref comp="agd" prop="attribute wildcard"/>s
	  of the attribute groups <!--*
* material suppressed here by diff group wgi-20080613 *
*--><phrase dg="wgi-20080613">referenced</phrase>
	  by <var>E</var>, in document order.
	 </p>
	</item>
	<item><p>
	  The value is then determined by <olist role="caseval">
	   <item>
	    <p role="if"><!--*
* material suppressed here by diff group b5286e2 *
*--><phrase dg="b5286e2"><var>W</var> is empty</phrase></p>
	    <p role="then">the <termref def="key-law">local 
	      wildcard</termref><phrase dg="b5286e2"> 
	      <var>L</var></phrase>.</p>
	   </item>
	   <item>
	    <p role="otherwise"><olist role="caseval">
	      <item id="c-awi1">
	       <p role="if"><!--*
* material suppressed here by diff group b5286e2 *
*--><phrase dg="b5286e2"><var>L</var> is <termref def="key-null">non-absent</termref></phrase></p>
	       <p role="then">a wildcard whose 
		<!--*
* material suppressed here by diff group b5286e2 *
*--><phrase dg="b5286e2">properties are as follows:</phrase>
		<pvlist>
		 <pvpair comp="w" prop="process contents">
		  <var>L</var>.<propref comp="w" prop="process contents"/>		
		 </pvpair>
		 <pvpair comp="w" prop="annotations">
		  <var>L</var>.<propref comp="w" prop="annotations"/>		
		 </pvpair>
		 <pvpair comp="w" prop="namespace constraint">the
		  wildcard <phrase dg="b6163a">intersection</phrase>
		  <!--*
* material suppressed here by diff group b6163a *
*-->
		  of <!--*
* material suppressed here by diff group b5286e2 *
*--><phrase dg="b5286e2"><var>L</var>.</phrase><propref comp="w" prop="namespace constraint"/> <!--*
* material suppressed here by diff group b5286e2 *
*--> and of the 
		  <propref comp="w" prop="namespace constraint"/>s of all
		  the <!--*
* material suppressed here by diff group b5286e2 *
*--><phrase dg="b5286e2">the wildcards in <var>W</var></phrase>,
		  as defined in <specref ref="cos-aw-intersect" dg="b6163a"/>
		  <!--*
* material suppressed here by diff group b6163a *
*-->
		 </pvpair>
		</pvlist>
	       </p>
	      </item>
	      <item id="c-awi2">
	       <p role="otherwise">(<!--*
* material suppressed here by diff group b5286e2 *
*-->no <eltref ref="anyAttribute"/> <phrase dg="b5286e2">is</phrase>
		present)
		a wildcard whose properties are as follows: <pvlist>
		 <pvpair comp="w" prop="process contents">
		  The <propref comp="w" prop="process contents"/> of the first
		  <!--*
* material suppressed here by diff group b5286e2 *
*--><phrase dg="b5286e2">wildcard in <var>W</var></phrase>
		 </pvpair>
		 <pvpair comp="w" prop="namespace constraint">
		  The wildcard <phrase dg="b6163a">intersection</phrase>
		  <!--*
* material suppressed here by diff group b6163a *
*-->
		  of the <propref comp="w" prop="namespace constraint"/>s
		  of all the <!--*
* material suppressed here by diff group b5286e2 *
*--><phrase dg="b5286e2">wildcards in <var>W</var></phrase>,
		  as defined in <specref ref="cos-aw-intersect" dg="b6163a"/>
		  <!--*
* material suppressed here by diff group b6163a *
*-->
		 </pvpair>
		 <pvpair comp="w" prop="annotations">
		  <termref def="key-null">The empty sequence</termref>
		 </pvpair>
		</pvlist>
	       </p>
	      </item>
	     </olist>
	    </p>
	   </item>  
	  </olist>
	 </p>
	</item>
       </olist>
      </p>
     </div4>
    </div3>

    <div3 id="constrain-attribute-group-xml">
     <head>Constraints on XML Representations of Attribute Group Definitions</head>
<constraintnote id="src-attribute_group" type="src">
<head>Attribute Group Definition Representation OK</head>
<!--*
* material suppressed here by diff group b5286e *
*-->
<p dg="b5286e">None<phrase dg="ep99"> as such</phrase>.</p>
</constraintnote>
     <!--*
* material suppressed here by diff group b5286e-en *
*-->
     
    </div3>
    <div3 id="sec-cvc-agd">
     <head>Attribute Group Definition Validation Rules</head>
     <p>None<phrase dg="ep99"> as such</phrase>.</p>
    </div3>
    <div3 id="sec-sic-agd">
     <head>Attribute Group Definition Information Set
Contributions</head>
     <p>None<phrase dg="ep99"> as such</phrase>.</p>
    </div3>
    <div3 id="coss-attrGroup">
     <head>Constraints on Attribute Group Definition Schema Components</head>
<p>All attribute group definitions (see <specref ref="cAttribute_Group_Definitions"/>) <rfc2119>must</rfc2119> satisfy the following constraint.</p>
<constraintnote type="cos" id="ag-props-correct">
<head>Attribute Group Definition Properties Correct</head>
<olist role="And">
<item>
<p>The values of the properties of an attribute group definition
<!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">are</phrase> as described in the property tableau in
<specref ref="Attribute_Group_Definition_details"/>, modulo the impact
of <specref ref="conformance-missing"/>;</p>
</item>
<item>
<p><!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">No two</phrase> 
distinct members of the <propref comp="agd" prop="attribute uses"/> <!--*
* material suppressed here by diff group modals *
*--> have
<propref comp="au" prop="attribute declaration"/>s <!--*
* material suppressed here by diff group ep20b *
*--><phrase dg="ep20b">with the same
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref></phrase>.</p>
</item>
<!--*
* material suppressed here by diff group b4348 *
*-->
</olist>
</constraintnote>
    </div3>
   </div2>
   <div2 id="cModel_Group_Definitions">
    <head>Model Group Definitions</head>
<p>A model group definition associates a name and optional annotations with
 a <compref ref="mg"/><!--*
* material suppressed here by diff group b2861cc-1g *
*-->.
By reference to the name, the entire model group can be incorporated by reference into
 a <propref comp="p" prop="term"/><!--*
* material suppressed here by diff group b2861cc-1g *
*-->.</p>
<p>
Model group definitions are provided
primarily for reference from the <specref ref="declare-type"/> (see <eltref ref="complexType"/>
and <eltref ref="group"/>).  Thus, model group definitions provide a
replacement for some uses of XML's
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#dt-PE">parameter entity</xspecref> facility.
</p>
    <note role="example">
<eg xml:space="preserve">&lt;xs:group name="myModelGroup"&gt;
 &lt;xs:sequence&gt;
  &lt;xs:element ref="someThing"/&gt;
  . . .
 &lt;/xs:sequence&gt;
&lt;/xs:group&gt;

&lt;xs:complexType name="trivial"&gt;
 &lt;xs:group ref="myModelGroup"/&gt;
 &lt;xs:attribute .../&gt;
&lt;/xs:complexType&gt;

&lt;xs:complexType name="moreSo"&gt;
 &lt;xs:choice&gt;
  &lt;xs:element ref="anotherThing"/&gt;
  &lt;xs:group ref="myModelGroup"/&gt;
 &lt;/xs:choice&gt;
 &lt;xs:attribute .../&gt;
&lt;/xs:complexType&gt;</eg>
<p>A minimal model group is defined and used by reference, first as the whole
content model, then as one alternative in a choice. </p>
</note>
    <div3 id="Model_Group_Definition_details">
     <head>The Model Group Definition Schema Component</head>
    <p>The model group definition schema component has the following
properties:</p>

  <compdef name="Model Group Definition" abbrev="mgd" showAKO="true"/>

<p>Model group definitions are identified by their <propref comp="mgd" prop="name"/> and <propref comp="mgd" prop="target namespace"/>; model group identities <rfc2119>must</rfc2119> be unique within an <!--*
* material suppressed here by diff group b4399 *
*--><termref def="key-schema" dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--> schema</termref>.  See <specref ref="composition-schemaImport"/> for the use of component
identifiers when importing one schema into another.</p>
<p>Model group definitions <emph>per se</emph> do not participate in <termref def="key-vn">validation</termref>, but the <propref comp="p" prop="term"/> of
a particle <!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase> correspond in whole or in part
to a model group from a model group definition<!--*
* material suppressed here by diff group b2861cc-1g *
*-->.</p>
<p><phrase dg="b2861cc-1g"><propref comp="mgd" prop="model group"/> is the <compref ref="mg"/> for which the model group definition provides a name.</phrase></p>
<!--*
* material suppressed here by diff group b2861cc-1g *
*-->
<p>See <specref ref="cAnnotations"/> for information on the role of the
<propref comp="mgd" prop="annotations"/> property.</p>
    </div3>

<div3 id="declare-namedModelGroup">
     <head><phrase dg="b5159b">XML Representation of Model Group Definition Schema Components</phrase><!--*
* material suppressed here by diff group b5159b *
*--></head>
 <p>The XML representation for a model group definition schema component is a
<eltref ref="group"/> element information item.
<phrase dg="b2861cc-1g">It provides for
naming a model group for use by reference in the XML representation of
complex type definitions and model groups. </phrase>The correspondences between the
properties of the information item and
properties of the component it corresponds to are <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152">given in this section.</phrase></p>

<!--*
* material suppressed here by diff group b5152-movement *
*-->

     <reprdef dg="b5152-movement">
      <reprelt id="xr.mgd0" dg="b5152-movement" eltname="group" type="realGroup"/>
     </reprdef>

     <p id="xr.mgd1" dg="b5152-movement">If there is a
      <code>name</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> (in which case the item will
      have <eltref ref="schema"/> or <eltref ref="redefine"/> as parent), then the item <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152">maps</phrase>
      to a model group definition component with properties as
      follows:</p>
     
     <reprdef dg="b5152-movement">      
      <reprcomp id="xr.mgd2" dg="b5152-movement" abstract="Model Group Definition" ref="Model_Group_Definition_details">
       <propmap comp="mgd" prop="name">The <termref def="key-vv">actual value</termref> of the
	<code>name</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref></propmap>
       
       <propmap comp="mgd" prop="target namespace">The <termref def="key-vv">actual value</termref> of
	the <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of the
	<phrase dg="b5148"><eltref ref="schema"/></phrase>
 <!--*
* material suppressed here by diff group cleanup-1 *
*--><phrase dg="cleanup-1">ancestor</phrase> <!--*
* material suppressed here by diff group b5148 *
*--> element information
	item<phrase dg="b5148"> if present, otherwise <termref def="key-null">absent</termref></phrase>.</propmap>
       <propmap comp="mgd" prop="model group">A model group which is
	the <propref comp="p" prop="term"/> of a particle
	corresponding to the <eltref ref="all"/>, <eltref ref="choice"/> or
	<eltref ref="sequence"/> among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> (there <rfc2119>must</rfc2119>
	be <phrase dg="b5150b">exactly</phrase> one).</propmap>
       <!--*
* material suppressed here by diff group b2861cc-1g *
*-->
       <propmap comp="mgd" prop="annotations"><!--*
* material suppressed here by diff group bannotations-1 *
*--> <phrase dg="bannotations-2"> The <termref def="key-am-one"/> of the
	 <eltref ref="group"/> element, as defined in <specref ref="declare-annotation"/>. </phrase>
       </propmap>
      </reprcomp>
     </reprdef>
     
     <p id="xr.mgd3" dg="b5152-movement">Otherwise,
      <phrase dg="b5152">if</phrase>
      the item <!--*
* material suppressed here by diff group b5152 *
*-->
      <phrase dg="b5152">has</phrase>
      a <code>ref</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref><phrase dg="b5152">
       and does <emph>not</emph> have <code>minOccurs=maxOccurs=0</code>
      </phrase>, <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152">then
       the <eltref ref="group"/> element maps</phrase>
      to a particle component with properties
      as follows<!--*
* material suppressed here by diff group b5152 *
*-->:</p>
     
     <reprdef dg="b5152-movement">      
      <reprcomp id="xr.mgd4" dg="b5152-movement" abstract="Particle" ref="Particle">
       <propmap comp="p" prop="min occurs">The <termref def="key-vv">actual value</termref> of the
	<code>minOccurs</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise
	<code>1</code>.</propmap>
       <propmap comp="p" prop="max occurs"><pt>unbounded</pt>, if the
	<code>maxOccurs</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> equals
	<pt>unbounded</pt>, otherwise the <termref def="key-vv">actual value</termref> of the
	<code>maxOccurs</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise
	<code>1</code>.</propmap>
       <propmap comp="p" prop="term">The <propref comp="mgd" prop="model group"/> of the model group definition
	<termref def="src-resolve">resolved</termref> to by the <termref def="key-vv">actual value</termref> of the <code>ref</code>
	<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref></propmap>
       <propmap comp="mgd" prop="annotations" dg="bannotations-2">
	The <termref def="key-am-one"/> of the
	<eltref ref="group"/> element, as defined in <specref ref="declare-annotation"/>.
       </propmap>
      </reprcomp>
     </reprdef>

     <p dg="b5152">Otherwise, the <eltref ref="group"/>
      has <code>minOccurs=maxOccurs=0</code>, in which
      case it maps to no component at all.</p>

     <note dg="b6009">
     <p>The name of this section is slightly misleading, in that the
      second, un-named, case above (with a <code>ref</code> and no
      <code>name</code>) is not really a named model group at all, but
      a reference to one.  Also note that in the first (named) case
      above no reference is made to <code>minOccurs</code> or
      <code>maxOccurs</code>: this is because the schema for schema<!--*
* material suppressed here by diff group b2067-2e *
*--><phrase dg="b2067-2e"> documents</phrase> does not
      allow them on the child of <eltref ref="group"/> when it is
      named.  This in
      turn is because the <propref comp="p" prop="min occurs"/> and
      <propref comp="p" prop="max occurs"/> of the particles which
      <emph>refer</emph> to the definition are what count.</p>
     </note>

     <!--*
* material suppressed here by diff group b5160 *
*-->
    </div3>

    <div3 id="sec-src-model_group_defn">
     <head>Constraints on <phrase dg="b5159b">XML Representations of Model Group Definitions</phrase><!--*
* material suppressed here by diff group b5159b *
*--></head>
<!--*
* material suppressed here by diff group b5286 *
*-->
     <p dg="b5286">None<phrase dg="ep99"> as such</phrase>.</p>
    </div3>
    <div3 id="sec-cvc-mg">
     <head>Model Group Definition Validation Rules</head>
     <p>None<phrase dg="ep99"> as such</phrase>.</p>
    </div3>
    <div3 id="sec-sic-mg">
     <head>Model Group Definition Information Set Contributions</head>
     <p>None<phrase dg="ep99"> as such</phrase>.</p>
    </div3>
    <div3 id="coss-groupDef">
     <head>Constraints on Model Group Definition Schema Components</head>
  <p>All model group definitions (see <specref ref="cModel_Group_Definitions"/>) <rfc2119>must</rfc2119> satisfy the following constraint.</p>
  <constraintnote type="cos" id="mgd-props-correct">
   <head>Model Group Definition Properties Correct</head>
   <p>The values of the properties of a model group definition <rfc2119>must</rfc2119> be as described in
the property tableau in
<specref ref="Model_Group_Definition_details"/>, modulo the impact of <specref ref="conformance-missing"/>.</p>
  </constraintnote>
 
    </div3>
   </div2>
   <div2 id="Model_Groups">
    <head>Model Groups</head>
    <p>When the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of element information items are not constrained
to be <pt>empty</pt> or by reference to a simple type definition
(<specref ref="Simple_Type_Definitions"/>), the sequence of element
information item <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> content <!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase> be specified in
more detail with a model group.  Because the <propref comp="p" prop="term"/> 
property of a particle can be a
model group, and model groups contain particles, model groups can indirectly 
contain other model groups; the grammar for <!--*
* material suppressed here by diff group b5142 *
*--><phrase dg="b5142">model group</phrase>s
is therefore recursive.<phrase dg="ww-1">
<termdef id="key-contain-dgp" term="directly contains">A model group 
<term>directly contains</term> the particles in the value of its
<propref comp="mg" prop="particles"/> property.</termdef>
<termdef id="key-contain-igx" term="indirectly contains">A model group 
<term>indirectly contains</term> the particles, groups, wildcards, and
element declarations which are <termref def="key-contain-xpx">contained</termref> 
by the particles it
<termref def="key-contain-dgp"/>.</termdef>
<termdef id="key-contain-xgx" term="contains">A model group 
<term>contains</term> the components which it either
<termref def="key-contain-dgp"/>
or <termref def="key-contain-igx"/>.</termdef></phrase>
</p>
    <note role="example">
<eg xml:space="preserve"><phrase diff="add" dg="b7031">&lt;xs:group name="otherPets"&gt;
  &lt;xs:all&gt;
   &lt;xs:element name="birds"/&gt;
   &lt;xs:element name="fish"/&gt;
  &lt;/xs:all&gt;
 &lt;/xs:group&gt;
 
</phrase>&lt;xs:all&gt;
 &lt;xs:element ref="cats"/&gt;
 &lt;xs:element ref="dogs"/&gt;<phrase diff="add" dg="b7031">
 &lt;xs:group ref="otherPets"/&gt;</phrase>
&lt;/xs:all&gt;

&lt;xs:sequence&gt;
 &lt;xs:choice&gt;
  &lt;xs:element ref="left"/&gt;
  &lt;xs:element ref="right"/&gt;
 &lt;/xs:choice&gt;
 &lt;xs:element ref="landmark"/&gt;
&lt;/xs:sequence&gt;
</eg>
<p>XML representations for the three kinds of model group, the third nested
inside the second.</p>
</note>
    <div3 id="Model_Group_details">
     <head>The Model Group Schema Component</head>
    <p>The model group schema component has the following
properties:</p>

<compdef name="Model Group" abbrev="mg" showAKO="true"/>
<p>specifies a sequential (<pt>sequence</pt>),
disjunctive (<pt>choice</pt>) or conjunctive (<pt>all</pt>) interpretation of
the <propref comp="mg" prop="particles"/>.  This in turn 
determines whether the element
information item <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> <termref def="key-vn">validated</termref> by the model group <rfc2119>must</rfc2119>:
<ulist>
<item><p>(<pt>sequence</pt>) correspond, in order, to the specified <propref comp="mg" prop="particles"/>;</p>
</item>
<item><p>(<pt>choice</pt>) correspond<!--*
* material suppressed here by diff group b5141 *
*--> 
to exactly one of the specified <propref comp="mg" prop="particles"/>;</p>
</item>
<item><p>(<pt>all</pt>) <!--*
* material suppressed here by diff group b5161 *
*--><phrase dg="b5161">correspond to the</phrase> specified <!--*
* material suppressed here by diff group b5161 *
*--> <propref comp="mg" prop="particles"/>.  The elements can occur in any
order.  <!--*
* material suppressed here by diff group b5161 *
*--></p>
</item>
</ulist></p>
    <p>When two or more <phrase diff="del" dg="b6008a">particles</phrase>
     <phrase diff="add" dg="b6008a">element declarations</phrase> contained
     <!--*
* material suppressed here by diff group b6008 *
*-->
     <phrase dg="b6008"><termref def="key-contain-dpt">directly</termref>,
      <termref def="key-contain-ipx">indirectly</termref>, or
      <termref def="key-impl-cont">implicitly</termref></phrase> in the
<propref comp="mg" prop="particles"/> of a model group have <phrase diff="del" dg="b6008a">identically named
element declarations as their 
<propref comp="p" prop="term"/>,</phrase><phrase diff="add" dg="b6008a">identical names,</phrase> the type definitions of those declarations <rfc2119>must</rfc2119> be the
same. <!--*
* material suppressed here by diff group b6008 *
*--></p>
<p>See <specref ref="cAnnotations"/> for information on the role of the
<propref comp="mg" prop="annotations"/> property.</p>
    </div3>
<div3 id="declare-contentModel">
     <head><phrase dg="b5159">XML Representation of Model Group Schema Components</phrase><!--*
* material suppressed here by diff group b5159a *
*--><!--*
* material suppressed here by diff group b5159b *
*--></head>
<p>The XML representation for a model group schema component is
either an
<eltref ref="all"/>, a <eltref ref="choice"/> or a <eltref ref="sequence"/>
element information item.    The correspondences between the
properties of those information items and
properties of the component they correspond to are <!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152">given in this section.</phrase></p>
 <!--*
* material suppressed here by diff group b5152-movement *
*-->

     <reprdef dg="b5152-movement">
      <reprelt id="xr.mg0" dg="b5152-movement" eltname="all"/>
      <reprelt id="xr.mg1" dg="b5152-movement" eltname="choice"/>
      <reprelt id="xr.mg2" dg="b5152-movement" eltname="sequence"/>
     </reprdef>
     
     <p id="xr.mg3" dg="b5152-movement">Each of the
      above items corresponds to a particle containing a model group,
      with properties as follows (unless <code>minOccurs=maxOccurs=0</code>,
      in which case the item corresponds to no component at all):</p>
     
     <reprdef dg="b5152-movement">
      <reprcomp id="xr.mg4" dg="b5152-movement" abstract="Particle" ref="Particle_details">
       <propmap comp="p" prop="min occurs">The <termref def="key-vv">actual value</termref> of the <code>minOccurs</code>
	<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise <code>1</code>.</propmap>
       <propmap comp="p" prop="max occurs"><pt>unbounded</pt>, if the <code>maxOccurs</code>
	<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> equals <pt>unbounded</pt>, otherwise the <termref def="key-vv">actual value</termref> of the <code>maxOccurs</code>
	<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise <code>1</code>.</propmap>
       <propmap comp="p" prop="term">A model group as given below<!--*
* material suppressed here by diff group b6008 *
*--><phrase dg="b6008">.</phrase></propmap>
       <propmap comp="p" prop="annotations" dg="bannotations-1">
	The same annotations as the <propref comp="mg" prop="annotations"/> of
	the model group. See below.
       </propmap>
      </reprcomp>
     </reprdef>

     <p dg="b5152">The particle just described has a 
      <compref ref="mg"/> as the value of its <propref comp="p" prop="term"/> property, as follows.</p>

     <reprdef dg="b5152-movement">
      <reprcomp id="xr.mg5" dg="b5152-movement" abstract="Model Group" ref="Model_Group_details">
       <propmap comp="mg" prop="compositor">One of <pt>all</pt>,
	<pt>choice</pt>, <pt>sequence</pt> depending on the element
	information item.</propmap>
       <propmap comp="mg" prop="particles">A sequence of particles
	corresponding to all the <eltref ref="all"/>, <eltref ref="choice"/>,
	<eltref ref="sequence"/>, <eltref ref="any"/>,
	<eltref ref="group"/> or <eltref ref="element"/> items among
	the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, in order.</propmap>

       <!--*
* material suppressed here by diff group b2861cc-1p *
*-->

       <propmap comp="mg" prop="annotations"><!--*
* material suppressed here by diff group bannotations-1 *
*--> <phrase dg="bannotations-2"> The <termref def="key-am-one"/> of the
	 <eltref ref="all"/>, <eltref ref="choice"/>, or <eltref ref="sequence"/> element, whichever is present, as defined
	 in <specref ref="declare-annotation"/>. </phrase>
       </propmap>
      </reprcomp>
     </reprdef>
    </div3>
    <div3 id="sec-src-model_group">
     <head>Constraints on <phrase dg="b5159">XML Representations of Model Groups</phrase><!--*
* material suppressed here by diff group b5159a *
*--><!--*
* material suppressed here by diff group b5159b *
*--></head>
  <!--*
* material suppressed here by diff group b5286 *
*-->
     <p dg="b5286">None<phrase dg="ep99"> as such</phrase>.</p>
    </div3>
    <div3 id="sec-cvc-mgrp">
     <head>Model Group Validation Rules</head>

<p dg="ww-LM">In order to define the validation rules for model
groups clearly, it will be useful to define some basic terminology;
this is done in the next two sections, before the validation rules
themselves are formulated.</p>

<div4 id="group-recognition" dg="ww-LM">
<head>Language Recognition by Groups</head>

<p dg="ww-LM">Each model group <var>M</var> denotes a language
<var>L</var>(<var>M</var>), whose members are the sequences of element information items
<termref def="key-accept">accepted</termref> by <var>M</var>.</p>

<p dg="ww">Within <var>L</var>(<var>M</var>) a smaller language <var>V</var>(<var>M</var>) can be
identified, which is of particular importance for schema-validity
assessment.  The difference between the two languages is that
<var>V</var>(<var>M</var>) enforces some constraints which are ignored in the definition
of <var>L</var>(<var>M</var>).
Informally <var>L</var>(<var>M</var>) is the set of sequences which are accepted by a model
group if no account is taken of the schema component
constraint <specref ref="cos-nonambig"/> or the related provisions 
in the validation rules which specify how to choose a unique <termref def="key-path"/> 
in a non-deterministic <!--*
* material suppressed here by diff group b5142 *
*--><phrase dg="b5142">model group</phrase>. By contrast, <var>V</var>(<var>M</var>) takes
account of those constraints and includes only the sequences which are
<termref def="key-lvip"/> against <var>M</var>.  For all model groups <var>M</var>, <var>V</var>(<var>M</var>) is a
subset of <var>L</var>(<var>M</var>).  <var>L</var>(<var>M</var>) and related concepts are described in this
section; <var>V</var>(<var>M</var>) is described in the next section, <specref ref="group-validation"/>.
</p>

<p dg="ww-p">
<termdef id="key-path" term="path">When a sequence <var>S</var> of element information
items is checked against a model group <var>M</var>, the sequence of 
<!--*
* material suppressed here by diff group ww-1 *
*--><phrase dg="ww-1"><termref def="key-basic-particle">basic particles</termref></phrase> 
which the items of <var>S</var> match, in order, is a
<term>path</term> of <var>S</var> in <var>M</var>.  For a given <var>S</var> and <!--*
* material suppressed here by diff group b5142 *
*-->
<phrase dg="b5142"><var>M</var>,</phrase> the
path of <var>S</var> in <!--*
* material suppressed here by diff group b5142 *
*-->
<phrase dg="b5142"><var>M</var></phrase> is not necessarily unique.
Detailed rules for the matching, and thus for the construction of
paths, are given in <specref ref="group-recognition"/> and <specref ref="particle-validation"/>.
</termdef>
Not every sequence has a path in every <!--*
* material suppressed here by diff group b5142 *
*--><phrase dg="b5142">model group</phrase><!--*
* material suppressed here by diff group ww-1 *
*--><phrase dg="ww-1">, but every
sequence accepted by the <!--*
* material suppressed here by diff group b5142 *
*--><phrase dg="b5142">model group</phrase> does have a path.
<termdef id="key-complete-path" term="complete path">For
a <!--*
* material suppressed here by diff group b5142 *
*--><phrase dg="b5142">model group</phrase> <var>M</var> and a sequence <var>S</var> in <var>L</var>(<var>M</var>), the path
of <var>S</var> in <var>M</var> is a <term>complete path</term>; prefixes of
complete paths which are themselves not complete paths
are <term>incomplete paths</term>.</termdef></phrase>  
<!--* every sequence accepted by the content model, and every prefix
of such a sequence, has a path, as do some other sequences.   *-->
For example, in the <!--*
* material suppressed here by diff group b5142 *
*--><phrase dg="b5142">model group</phrase></p>
<eg xml:space="preserve">   &lt;xs:sequence&gt;
    &lt;xs:element name="a"/&gt;
    &lt;xs:element name="b"/&gt;
    &lt;xs:element name="c"/&gt;
   &lt;/xs:sequence&gt;</eg>
<p>the sequences (<code>&lt;a/&gt;&lt;b/&gt;&lt;c/&gt;</code>)
and (<code>&lt;a/&gt;&lt;b/&gt;</code>) have <termref def="key-path">paths</termref><phrase dg="ww-1">
(the first a <termref def="key-complete-path"/> and the second
an <termref def="key-complete-path">incomplete path</termref>)</phrase>,
but the sequences (<code>&lt;a/&gt;&lt;b/&gt;&lt;c/&gt;&lt;d/&gt;</code>) and
(<code>&lt;a/&gt;&lt;x/&gt;</code>) do not<phrase dg="ww-1"> 
have paths</phrase>.</p>
<note dg="ww-1">
<p>It is possible, but unusual, for a <!--*
* material suppressed here by diff group b5142 *
*--><phrase dg="b5142">model group</phrase> to
have some paths which are neither complete paths, nor
prefixes of complete paths.  For example, the <!--*
* material suppressed here by diff group b5142 *
*--><phrase dg="b5142">model group</phrase>
<eg xml:space="preserve">   &lt;xs:sequence&gt;
    &lt;xs:element name="a"/&gt;
    &lt;xs:element name="b"/&gt;
    &lt;xs:choice/&gt;
   &lt;/xs:sequence&gt;</eg>
accepts no sequences because the empty <el>choice</el> recognizes
no input sequences.  But the sequences (<code>&lt;<!--*
* material suppressed here by diff group b5142 *
*-->a<phrase dg="b5142">/</phrase>&gt;</code>)
and (<code>&lt;<!--*
* material suppressed here by diff group b5142 *
*-->a<phrase dg="b5142">/</phrase>&gt;&lt;b/&gt;</code>) have paths in the <!--*
* material suppressed here by diff group b5142 *
*--><phrase dg="b5142">model group</phrase>.</p>
</note>
<p dg="ww-LM">The definitions of <var>L</var>(<var>M</var>)<phrase dg="ww-p"> and <termref def="key-path">paths</termref> in <var>M</var></phrase>, when <var>M</var> is a <termref def="key-basic-term"/> or
a <termref def="key-basic-particle"/>, are <!--*
* material suppressed here by diff group ww-1 *
*--><phrase dg="ww-1">given</phrase> in
<specref ref="particle-validation"/>.  The definitions for groups are
given below.
</p>

<div5 id="sec-sequences">
<head>Sequences</head>

<p dg="ww-LM">This section defines <var>L</var>(<var>M</var>)<phrase dg="ww">,</phrase><!--*
* material suppressed here by diff group ww *
*--> the set of
<termref def="key-path">paths</termref> in <var>M</var><phrase dg="ww">, and <var>V</var>(<var>M</var>)</phrase>, if <var>M</var>
is a sequence group.</p>

<p dg="ww-LM">If <var>M</var> is a <compref ref="mg"/>,
and the <propref comp="mg" prop="compositor"/> of <var>M</var> is <pt>sequence</pt>, 
and the <propref comp="mg" prop="particles"/> of <var>M</var> is the sequence <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ...,
<var>P</var><sub><phrase><var>n</var></phrase></sub>, then <var>L</var>(<var>M</var>) is the set of sequences <var>S</var> = <var>S</var><sub>1</sub> + <var>S</var><sub>2</sub> + ... +
<var>Sn</var> (taking <quote>+</quote> as the concatenation operator), where
<var>S</var><sub><phrase><var>i</var></phrase></sub> is in <var>L</var>(<var>P</var><sub><phrase><var>i</var></phrase></sub>) for 0 &lt; <var>i</var> ≤ <var>n</var>.
The sequence of sequences <var>S</var><sub>1</sub>, <var>S</var><sub>2</sub>, ..., <var>Sn</var> is a <termref def="key-partition"/> of
<var>S</var>.
Less formally, when <var>M</var> is a sequence of <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ... <var>P</var><sub><phrase><var>n</var></phrase></sub>, then
<var>L</var>(<var>M</var>) is the set of sequences formed by taking one sequence which is
accepted by <var>P</var><sub>1</sub>, then one accepted by <var>P</var><sub>2</sub>, and so on, up through
<var>P</var><sub><phrase><var>n</var></phrase></sub>, and then concatenating them together in order.</p>

<p dg="ww-LM"><termdef id="key-partition" term="partition">A
<term>partition</term> of a sequence is a sequence of sub-sequences,
some or all of which <!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase> be empty, such that concatenating all
the sub-sequences yields the original sequence</termdef>.</p>

<p dg="ww-p">When <var>M</var> is a sequence group
and <var>S</var> is a sequence of input items, the set of <termref def="key-path">paths</termref> of <var>S</var> 
in <var>M</var> is the set of all
paths <var>Q</var> = <var>Q</var><sub>1</sub> + <var>Q</var><sub>2</sub> + ... + <var>Q</var><sub><phrase><var>j</var></phrase></sub>, where<ulist>
<item>
<p><var>j</var> ≤ <var>n</var>, and</p>
</item>
<item>
<p><var>S</var> = <var>S</var><sub>1</sub> + <var>S</var><sub>2</sub> + ... + <var>S</var><sub><phrase><var>j</var></phrase></sub> (i.e. <var>S</var><sub>1</sub>, <var>S</var><sub>2</sub>, ..., <var>S</var><sub><phrase><var>j</var></phrase></sub> is
a <termref def="key-partition"/> of <var>S</var>), and</p>
</item>
<item>
<p><var>S</var><sub><phrase><var>i</var></phrase></sub> is in <var>L</var>(<var>P</var><sub><phrase><var>i</var></phrase></sub>) for 0 &lt; <var>i</var> &lt; <var>j</var>, and</p>
</item>
<item>
<p><var>Q</var><sub><phrase><var>i</var></phrase></sub> is a <termref def="key-path"/> of <var>S</var><sub><phrase><var>i</var></phrase></sub> in <var>P</var><sub><phrase><var>i</var></phrase></sub> for 0 &lt; <var>i</var> ≤ <var>j</var>.</p>
</item>
</ulist>
</p>

<note dg="ww-p">
<p>
By this definition, some sequences which do not satisfy the
entire <!--*
* material suppressed here by diff group b5142 *
*--><phrase dg="b5142">model group</phrase> nevertheless have <termref def="key-path">paths</termref> in a <!--*
* material suppressed here by diff group b5142 *
*--><phrase dg="b5142">model group</phrase>.
For example, given the <!--*
* material suppressed here by diff group b5142 *
*--><phrase dg="b5142">model group</phrase> <!--*
* material suppressed here by diff group b5142 *
*--><phrase dg="b5142"><var>M</var></phrase>
</p>
<eg xml:space="preserve">   &lt;xs:sequence&gt;
    &lt;xs:element name="a"/&gt;
    &lt;xs:element name="b"/&gt;
    &lt;xs:element name="c"/&gt;
   &lt;/xs:sequence&gt;</eg>

<p>and an input sequence <var>S</var></p>

<eg xml:space="preserve">&lt;a/&gt;&lt;b/&gt;</eg>
<p>where <var>n</var> = 3, <var>j</var> = 2, then 
<var>S</var><sub>1</sub> is (<code>&lt;a/&gt;</code>),
<var>S</var><sub>2</sub> is (<code>&lt;b/&gt;</code>),
and
<var>S</var> has a <termref def="key-path"/> in <!--*
* material suppressed here by diff group b5142 *
*--><phrase dg="b5142"><var>M</var></phrase>, even though <var>S</var> is not in
<var>L</var>(<!--*
* material suppressed here by diff group b5142 *
*--><phrase dg="b5142"><var>M</var></phrase>).  The <termref def="key-path"/> has two items, first the <compref ref="p"/>
for the <el>a</el> element, then the <compref ref="p"/> for the
<el>b</el> element.</p>
</note>

<p dg="ww">When <var>M</var> is a sequence group,
the set <var>V</var>(<var>M</var>) (the set of sequences 
<termref def="key-lvip"/> against <var>M</var>) is the set of sequences <var>S</var> which
are in <var>L</var>(<var>M</var>) and which have a <termref def="key-vpath"/> in <var>M</var>.
Informally, <var>V</var>(<var>M</var>) contains those sequences which are
accepted by <var>M</var> and for which no element information item
is ever <termref def="key-att-to"/> a <termref def="key-wp"/> if it can, <phrase dg="ww-oops">in</phrase><!--*
* material suppressed here by diff group ww-oops *
*-->
context, instead be <termref def="key-att-to"/> an <termref def="key-ep"/>.
There will invariably be a <termref def="key-partition"/> of <var>S</var> whose
members are <termref def="key-lvip"/> against <!--*
* material suppressed here by diff group b5142 *
*--><phrase dg="b5142"><propref comp="mg" prop="particles"/>
of <var>M</var>.</phrase>
</p>
<note dg="ww">
<p>For sequences with more than one <termref def="key-path"/> in <var>M</var>,
the <termref def="key-att-to">attributions</termref> of
the <termref def="key-vpath"/> are used in validation and for determining
the contents of the <termref def="key-psvi">post-schema-validation infoset</termref>.  For example, if <var>M</var> is
<eg xml:space="preserve">
  &lt;xs:sequence&gt;
   &lt;xs:any minOccurs="0"/&gt;
   &lt;xs:element name="a" minOccurs="0"/&gt;
  &lt;/xs:sequence&gt;</eg>
then the sequence (<code>&lt;a/&gt;</code>) has two <termref def="key-path">paths</termref>
in <var>M</var>, one containing just the <termref def="key-wp"/> and the other
containing just the <termref def="key-ep"/>.  It is the latter
which is a <termref def="key-vpath"/> and which determines which 
<compref ref="p"/> the item in the input is <termref def="key-att-to"/>.
</p>
</note>
<note dg="ww">
<p>There are model groups for which some members of
<var>L</var>(<var>M</var>) are not in <var>V</var>(<var>M</var>).  For example, if <var>M</var> is
<eg xml:space="preserve">
  &lt;xs:sequence&gt;
   &lt;xs:any minOccurs="0"/&gt;
   &lt;xs:element name="a"/&gt;
  &lt;/xs:sequence&gt;</eg>
then the sequence (<code>&lt;a/&gt;&lt;a/&gt;</code>) is in <var>L</var>(<var>M</var>), but not
in <var>V</var>(<var>M</var>), because the validation rules require that the first 
<el>a</el> be <termref def="key-att-to"/> the <termref def="key-wp"/>.
In a <termref def="key-vpath"/> the initial <el>a</el> will invariably be
<termref def="key-att-to"/> the <termref def="key-ep"/>, and so no sequence
with an initial <el>a</el> <!--*
* material suppressed here by diff group ww-oops *
*--> can be <termref def="key-lvip"/> against
this model group.</p>
</note>
</div5>

<div5 id="sec-choices">
<head>Choices</head>

<p dg="ww-LM">This section defines <var>L</var>(<var>M</var>)<phrase dg="ww">,</phrase><!--*
* material suppressed here by diff group ww *
*--> the set of
<termref def="key-path">paths</termref> in <var>M</var><phrase dg="ww">, and <var>V</var>(<var>M</var>)</phrase>, if <var>M</var>
is a choice group.</p>

<p dg="ww-LM">When the <propref comp="mg" prop="compositor"/> of <var>M</var> is <pt>choice</pt>, and the <propref comp="mg" prop="particles"/> of <var>M</var> is the sequence <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ..., <var>P</var><sub><phrase><var>n</var></phrase></sub>,
then 
<var>L</var>(<var>M</var>) is
<var>L</var>(<var>P</var><sub>1</sub>) ∪ <var>L</var>(<var>P</var><sub>2</sub>) ∪ ... ∪ <var>L</var>(<var>P</var><sub><phrase><var>n</var></phrase></sub>)<phrase dg="ww-p">,
and the set of <termref def="key-path">paths</termref> of <var>S</var> in <var>P</var> is the set
<var>Q</var> = <var>Q</var><sub>1</sub> ∪ <var>Q</var><sub>2</sub> ∪ ... ∪ <var>Q</var><sub><phrase><var>n</var></phrase></sub>, where
<var>Q</var><sub><phrase><var>i</var></phrase></sub> is the set of <termref def="key-path">paths</termref> of <var>S</var> in <var>P</var><sub><phrase><var>i</var></phrase></sub>, for
0 &lt; <var>i</var> ≤ <var>n</var></phrase>.
Less formally, when <var>M</var> is a choice of <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ... <var>P</var><sub><phrase><var>n</var></phrase></sub>, then
<var>L</var>(<var>M</var>) contains any sequence accepted by any of the particles <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ... <var>P</var><sub><phrase><var>n</var></phrase></sub><phrase dg="ww-p">,
and any <termref def="key-path"/> of <var>S</var> in any of the particles <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ... <var>P</var><sub><phrase><var>n</var></phrase></sub>
is a <termref def="key-path"/> of <var>S</var> in <var>P</var></phrase>.
</p>
<!--* <p>For example ...</p> *-->

<p dg="ww">The set <var>V</var>(<var>M</var>) (the set of sequences 
<termref def="key-lvip"/> against <var>M</var>) is the set of sequences <var>S</var> which
are in <var>L</var>(<var>M</var>) and which have a <termref def="key-vpath"/> in <var>M</var>.
In effect, this means that if one of the choices in <var>M</var>
<termref def="key-att-to">attributes</termref> an initial element information item to
a <termref def="key-wp"/>, and another <termref def="key-att-to">attributes</termref> the same
item to an <termref def="key-ep"/>, then the latter choice is used
for validation.</p>
<note dg="ww">
<p>For example, if <var>M</var> is
<eg xml:space="preserve">
  &lt;xs:choice&gt;
   &lt;xs:any/&gt;
   &lt;xs:element name="a"/&gt;
  &lt;/xs:choice&gt;</eg>
then the <termref def="key-vpath"/> for the sequence (<code>&lt;a/&gt;</code>)
contains just the <termref def="key-ep"/> and it is to the
<termref def="key-ep"/> that the input element will be
<termref def="key-att-to">attributed</termref>; the alternate <termref def="key-path"/>
containing just the <termref def="key-wp"/> is not relevant for
validation as defined in this specification.
</p>
</note>
</div5>

<div5 id="all-mg">
<head>All-groups</head>

<p dg="ww-LM">This section defines <var>L</var>(<var>M</var>)<phrase dg="ww">,</phrase><!--*
* material suppressed here by diff group ww *
*--> the set of
<termref def="key-path">paths</termref> in <var>M</var><phrase dg="ww">, and <var>V</var>(<var>M</var>)</phrase>, if <var>M</var>
is an all-group.</p>

<p dg="ww-LM">When the <propref comp="mg" prop="compositor"/> of <var>M</var> is <pt>all</pt>, and the <propref comp="mg" prop="particles"/> of <var>M</var> is the sequence <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ..., <var>P</var><sub><phrase><var>n</var></phrase></sub>,
then 
<var>L</var>(<var>M</var>) is the set of sequences
<var>S</var> = <var>S</var><sub>1</sub> × <var>S</var><sub>2</sub> × ... × <var>Sn</var>
(taking <quote>×</quote> as the interleave operator),
where
for 0 &lt; <var>i</var> ≤ <var>n</var>, <var>S</var><sub><phrase><var>i</var></phrase></sub> is in <var>L</var>(<var>P</var><sub><phrase><var>i</var></phrase></sub>).
The set of sequences
{<var>S</var><sub>1</sub>, <var>S</var><sub>2</sub>, ..., <var>Sn</var>} is a <termref def="key-grouping"/> of <var>S</var>.
<phrase dg="ww-p">The set of <termref def="key-path">paths</termref> of <var>S</var> in <var>P</var> is
the set of all <termref def="key-path">paths</termref>
<var>Q</var> = <var>Q</var><sub>1</sub> × <var>Q</var><sub>2</sub> × ... × <var>Q</var><sub><phrase><var>n</var></phrase></sub>,
where <var>Q</var><sub><phrase><var>i</var></phrase></sub> is a <termref def="key-path"/> of <var>S</var><sub><phrase><var>i</var></phrase></sub> in <var>P</var><sub><phrase><var>i</var></phrase></sub>, 
for 0 &lt; <var>i</var> ≤ <var>n</var>.</phrase>
</p>
<p>
Less formally, when <var>M</var> is an <pt>all</pt>-group of <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ... <var>P</var><sub><phrase><var>n</var></phrase></sub>, then
<var>L</var>(<var>M</var>) is the set of sequences formed by taking one sequence which
is accepted by <var>P</var><sub>1</sub>, 
then one accepted by <var>P</var><sub>2</sub>,
and so on, up through <var>P</var><sub><phrase><var>n</var></phrase></sub>, and then interleaving them
together.  Equivalently, <var>L</var>(<var>M</var>) is the set of sequences <var>S</var>
such that the set {<var>S</var><sub>1</sub>, <var>S</var><sub>2</sub>, ..., <var>Sn</var>} is a 
<termref def="key-grouping"/> of <var>S</var>, and 
for 0 &lt; <var>i</var> ≤ <var>n</var>, <var>S</var><sub><phrase><var>i</var></phrase></sub> is in <var>L</var>(<var>P</var><sub><phrase><var>i</var></phrase></sub>).
</p>

<p dg="ww-LM"><termdef id="key-grouping" term="grouping">A
<term>grouping</term> of a sequence is a set of sub-sequences, some or
all of which may be empty, such that each member of the original
sequence appears once and only once in one of the sub-sequences and
all members of all sub-sequences are in the original
sequence.</termdef> </p>

<p>For example, given the <!--*
* material suppressed here by diff group b5142 *
*--><phrase dg="b5142">model group</phrase> <!--*
* material suppressed here by diff group b5142 *
*--><phrase dg="b5142"><var>M</var></phrase>
<eg xml:space="preserve">  &lt;xs:all&gt;
   &lt;xs:element name="a" minOccurs="0" maxOccurs="5"&gt;
   &lt;xs:element name="b" minOccurs="1" maxOccurs="1"&gt;
   &lt;xs:element name="c" minOccurs="0" maxOccurs="5"&gt;
   &lt;/xs:element&gt;
  &lt;/xs:all&gt;</eg>
and an input sequence <var>S</var> <eg xml:space="preserve">&lt;a/&gt;&lt;b/&gt;&lt;a/&gt;</eg>
where <var>n</var> = 3, then 
<var>S</var><sub>1</sub> is (<code>&lt;a/&gt;&lt;a/&gt;</code>),
<var>S</var><sub>2</sub> is (<code>&lt;b/&gt;</code>)<phrase dg="ww-p">,
and the <termref def="key-path"/> of
<var>S</var> in <!--*
* material suppressed here by diff group b5142 *
*--><phrase dg="b5142"><var>M</var></phrase> is the sequence containing first the <compref ref="p"/>
for the <el>a</el> element, then the <compref ref="p"/> for the
<el>b</el> element, then once more the 
<compref ref="p"/> for the <el>a</el> element.</phrase>
</p>

<p dg="ww">The set <var>V</var>(<var>M</var>) (the set of sequences 
<termref def="key-lvip"/> against <var>M</var>) is the set of sequences <var>S</var> which
are in <var>L</var>(<var>M</var>) and which have a <termref def="key-vpath"/> in <var>M</var>.
In effect, this means that if one of the <compref ref="p" name="Particles"/> in <var>M</var>
<termref def="key-att-to">attributes</termref> an element information item to
a <termref def="key-wp"/>, and a <termref def="key-compete">competing</termref> <compref ref="p"/>
<termref def="key-att-to">attributes</termref> the same item to an <termref def="key-ep"/>, then the
<termref def="key-ep"/> is used for validation.</p>
<note dg="ww">
<p>For example, if <var>M</var> is
<eg xml:space="preserve">
  &lt;xs:all&gt;
   &lt;xs:any/&gt;
   &lt;xs:element name="a"/&gt;
  &lt;/xs:all&gt;</eg>
then <var>M</var> accepts sequences of length two, containing
one <el>a</el> element and one other element.
</p>
<p>
The other element can be anything at all, including a second
<el>a</el> element. After the first <el>a</el>
the <termref def="key-ep"/> accepts no more elements
and so no longer <termref def="key-compete">competes</termref> with the <termref def="key-wp"/>.
So if the sequence (<code>&lt;a/&gt;&lt;a/&gt;</code>)
is checked against <var>M</var>, in the <termref def="key-vpath"/> the
first <el>a</el> element will be <termref def="key-att-to"/>
the <termref def="key-ep"/> and the second to the 
<termref def="key-wp"/>.
</p>
 
<p dg="b2867-2">If the intention is not to allow the second <el>a</el>,
use a wildcard that explicitly disallows it. That is,
<eg xml:space="preserve">
  &lt;xs:all&gt;
   &lt;xs:any notQName="a"/&gt;
   &lt;xs:element name="a"/&gt;
  &lt;/xs:all&gt;</eg>
Now the sequence (<code>&lt;a/&gt;&lt;a/&gt;</code>) is not
accepted by the particle.
</p>

</note>

</div5>

<div5 id="sec-multiplepaths" dg="ww-p">
<head>Multiple Paths in Groups</head>

<p>It is possible for a given sequence of element information items
to have multiple <termref def="key-path">paths</termref> in a given model group <var>M</var>; this is
the case, for example, when <var>M</var> is ambiguous, as for example</p>
<eg xml:space="preserve">  &lt;xs:choice&gt;
   &lt;xs:sequence&gt;
    &lt;xs:element ref="my:a" maxOccurs="unbounded"/&gt;
    &lt;xs:element ref="my:b"/&gt;
   &lt;/xs:sequence&gt;
   &lt;xs:sequence&gt;
    &lt;xs:element ref="my:a"/&gt;
    &lt;xs:element ref="my:b" maxOccurs="unbounded"/&gt;
   &lt;/xs:sequence&gt;
  &lt;/xs:choice&gt;</eg>
<p>which can match the sequence (<code>&lt;a/&gt;&lt;b/&gt;</code>)
in more than one way.
It may also be the case with unambiguous model groups, if
they do not correspond to a <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#determinism">deterministic</xspecref>
expression (as it is termed in <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/>)<phrase dg="wd4.ch">
or a <quote>1-unambiguous</quote> expression, as it
is defined by <bibref ref="ABK-DW"/></phrase>.
For example,</p>
<eg xml:space="preserve">  &lt;xs:sequence&gt;
   &lt;xs:element name="a" minOccurs="0"/&gt;
   &lt;xs:element name="a"/&gt;
  &lt;/xs:sequence&gt;</eg>

<note>
<p>Because these model groups do not obey the
constraint <specref ref="cos-nonambig"/>, they cannot
appear in a <!--*
* material suppressed here by diff group b5435 *
*--><phrase dg="b5435">conforming schema</phrase>.</p>
</note>
<!--*
* material suppressed here by diff group ww-1 *
*-->

</div5>
</div4>

<div4 id="group-validation" dg="ww-p">
<head><!--*
* material suppressed here by diff group ww *
*--><phrase dg="ww">Principles of Validation against Groups</phrase></head>

<p dg="ww">As noted above, each model group <var>M</var> denotes a
language <var>L</var>(<var>M</var>), whose members are sequences of element information
items.  Each member of <var>L</var>(<var>M</var>) has one or more <termref def="key-path">paths</termref> in <var>M</var>, as do
other sequences of element information items.</p>

<p dg="ww">By imposing conditions on <termref def="key-path">paths</termref> in a model group <var>M</var>
it is possible to identify a set of <termref def="key-vpath">validation-paths</termref> in <var>M</var>,
such that if <var>M</var> is a <!--*
* material suppressed here by diff group ww-1 *
*--> 
model group<phrase dg="ww-1"> which obeys the
<specref ref="cos-nonambig"/> constraint</phrase>, then 
any sequence <var>S</var> has at most one <termref def="key-vpath"/> in <var>M</var>.
The language <var>V</var>(<var>M</var>) can then be defined as the set of
sequences which have <termref def="key-vpath">validation-paths</termref> in <var>M</var>.</p>

<p dg="ww-p"><termdef id="key-compete" term="compete">Two
<compref name="Particles" ref="p"/> <var>P</var><sub>1</sub> and <var>P</var><sub>2</sub> contained in some <compref ref="p"/> <var>P</var>
<term>compete</term> with each other if and only if some sequence <var>S</var>
of element information items has two <termref def="key-path">paths</termref> in <var>P</var> which are
identical except that one path has <var>P</var><sub>1</sub> as its last item and the other
has <var>P</var><sub>2</sub>.</termdef></p>
<p dg="ww-p">For example, in the content model</p>
<eg xml:space="preserve">  &lt;xs:sequence&gt;
   &lt;xs:element name="a"/&gt;
   &lt;xs:choice&gt;
    &lt;xs:element name="b"/&gt;
    &lt;xs:any/&gt;
   &lt;/xs:choice&gt;
  &lt;/xs:sequence&gt;</eg>
<p>the sequence (<code>&lt;a/&gt;&lt;b/&gt;</code>) has two paths,
one (<var>Q</var><sub>1</sub>) consisting of the <compref ref="p"/> whose <propref comp="p" prop="term"/> is
the declaration for <el>a</el> followed by the 
<compref ref="p"/> whose <propref comp="p" prop="term"/> is
the declaration for <el>b</el>, and
a second (<var>Q</var><sub>2</sub>) consisting of the <compref ref="p"/> whose <propref comp="p" prop="term"/> is
the declaration for <el>a</el> followed by the 
<compref ref="p"/> whose <propref comp="p" prop="term"/> is
the wildcard.  The sequences <var>Q</var><sub>1</sub> and <var>Q</var><sub>2</sub> are 
identical except for their last items, and so the
two <compref name="Particles" ref="p"/> which are the last items of <var>Q</var><sub>1</sub> and 
<var>Q</var><sub>2</sub> are said to <termref def="key-compete"/> with each other.
</p>
<p dg="ww-p">By contrast, in the content model
<eg xml:space="preserve">
  &lt;xs:choice&gt;
   &lt;xs:sequence&gt;
    &lt;xs:element name="a"/&gt;
    &lt;xs:element name="b"/&gt;
   &lt;/xs:sequence&gt;
   &lt;xs:sequence&gt;
    &lt;xs:element name="c"/&gt;
    &lt;xs:any/&gt;
   &lt;/xs:sequence&gt;
  &lt;/xs:choice&gt;</eg>
the <compref name="Particles" ref="p"/> for <el>b</el> and the 
wildcard do not <termref def="key-compete"/>, because there is no
pair of <termref def="key-path">paths</termref> in <var>P</var> which differ only in one 
having the <termref def="key-ep"/> for <el>b</el> and
the other having the <termref def="key-wp"/>.
</p>

<p dg="ww"><termdef id="key-competing-paths" term="competing paths">Two
(or more) <termref def="key-path">paths</termref> of a sequence <var>S</var> in a <compref ref="p"/> <var>P</var>
are <term>competing paths</term> if and only if
they are identical except for their final items, which 
differ.</termdef></p>

<p dg="ww-1"><termdef id="key-vpath" term="validation-path">For any sequence <var>S</var> of element
information items and any particle <var>P</var>, a <termref def="key-path"/> of <var>S</var> in <var>P</var>
is a <term>validation-path</term> if and only if for each
prefix of the <termref def="key-path"/> which ends with a <termref def="key-wp"/>, the
corresponding prefix of <var>S</var> has no <termref def="key-competing-paths">competing path</termref> which
ends with an <termref def="key-ep"/>.
</termdef></p>

<note dg="ww">
<p>It is a consequence of the definition of <termref def="key-vpath"/> that for
any content model <var>M</var> which obeys constraint
<specref ref="cos-nonambig"/> and for any sequence <var>S</var> of
element information items, <var>S</var> has at most one
<termref def="key-vpath"/> in <var>M</var>.
</p>
</note>

<p dg="ww"><termdef id="key-lvip" term="locally valid">A sequence <var>S</var> of
element information items is <term>locally valid</term> against
a particle <var>P</var> if and only if 
<var>S</var> has a <termref def="key-vpath"/> in <var>P</var>.  The set of all such 
sequences is written <var>V</var>(<var>P</var>).</termdef></p>

</div4>
<div4 id="sec-cvc-model-group">
<head><!--*
* material suppressed here by diff group b5165a *
*--><phrase dg="b5165a">Element Sequence Valid</phrase></head>

<!--*
* material suppressed here by diff group ww-LM *
*-->

<constraintnote type="cvc" id="cvc-model-group" dg="ww-LM">
 <head>Element Sequence Valid</head>

<p>For a sequence <var>S</var> (possibly empty) of element information items to be
locally <termref def="key-vn">valid</termref> with respect to
a model group <var>M</var>, <var>S</var> <rfc2119>must</rfc2119> be in <!--*
* material suppressed here by diff group ww-1 *
*--><phrase dg="ww-1"><var>V</var>(<var>M</var>)</phrase>.
</p>

<note>
<p>It is possible to define groups whose <propref comp="mg" prop="particles"/> 
is empty.  When a <pt>choice</pt>-group <var>M</var> has an empty
<propref comp="mg" prop="particles"/> property, then
<var>L</var>(<var>M</var>) is the empty set.
When <var>M</var> is a <pt>sequence</pt>- or <pt>all</pt>-group with an empty
<propref comp="mg" prop="particles"/> property, then
<var>L</var>(<var>M</var>) is the set containing the empty (zero-length) sequence.
</p>
</note>
</constraintnote>
<!--* !!! Revise the following note to remove the note of sanctimony
and ignorance. *-->
    <!--*
* material suppressed here by diff group ww-1 *
*-->
</div4>
    </div3>
    <div3 id="sec-sic-mgrp">
     <head>Model Group Information Set Contributions</head>
     <p>None<phrase dg="ep99"> as such</phrase>.</p>
    </div3>
    <div3 id="coss-modelGroup">
     <head>Constraints on Model Group Schema Components</head>
  <p>All model groups (see <specref ref="Model_Groups"/>) <rfc2119>must</rfc2119> satisfy the following constraints.</p>

<div4 id="sec-mg-props-correct" dg="b5165a">
<head dg="b5165a">Model Group Correct</head>

  <constraintnote type="cos" id="mg-props-correct">
   <head>Model Group Correct</head>
   <olist role="And">
    <item><p>The values of the properties of a model group <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">are</phrase> as
	  described in the property tableau in
	  <specref ref="Model_Group_details"/>, modulo the impact of <specref ref="conformance-missing"/>.</p></item>
	<item id="no-circular-groups"><p><!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">There are no circular
	   groups.</phrase> That is, within the
	  <propref comp="mg" prop="particles"/> of a group there
	  <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is no
	   particle at any depth</phrase> whose
	  <propref comp="p" prop="term"/> is the group itself.</p></item>
   </olist>   
  </constraintnote>
</div4>
<div4 id="sec-cos-all-limited" dg="b5165a">
<head dg="b5165a">All Group Limited</head>
  <constraintnote type="cos" id="cos-all-limited">
   <head>All Group Limited</head>
   <p>When a model group has <propref comp="mg" prop="compositor"/> <pt>all</pt>, then
    <olist role="and">
     <item dg="all-2506-3">
<p>It appears only as the value of one or <phrase diff="del" dg="b7031">both</phrase><phrase diff="add" dg="b7031">more</phrase> of the following properties:</p>
<olist>
     <item>
      <p>the <propref comp="mgd" prop="model group"/> property of a model group definition.</p>
     </item>
     <item>
      <p>the <propref comp="p" prop="term"/> property of a <compref ref="p"/> with
       <propref comp="p" prop="max occurs"/><code> = 1</code> which is
       <!--*
* material suppressed here by diff group ep01 *
*-->
       <phrase dg="ep01">the <propref comp="ct" prop="particle"/>
       of</phrase> the <propref comp="ctd" prop="content type"/> of a complex
       type definition.</p>
     </item>
     <item diff="add" dg="b7031">
      <p>the <propref comp="p" prop="term"/> property of a <compref ref="p"/> <var>P</var> with
       <propref comp="p" prop="min occurs"/> <code>=</code>
       <propref comp="p" prop="max occurs"/> <code>= 1</code>, where
       <var>P</var> is among the <propref comp="mg" prop="particles"/> of a
       <compref ref="mg"/> whose <propref comp="mg" prop="compositor"/> is
       <pt>all</pt>.</p>
     </item>
    </olist>
     </item>
     <!--*
* material suppressed here by diff group all-2506-1 *
*-->
     <!--*
* material suppressed here by diff group all-2506-3 *
*-->
	 <item diff="add" dg="b7031">
	  <p>For every particle <var>P</var> in its <propref comp="mg" prop="particles"/>,
	   if <var>P</var>.<propref comp="p" prop="term"/> is a model group, 
	   then <var>P</var>.<propref comp="p" prop="term"/>.<propref comp="mg" prop="compositor"/> 
	   = <pt>all</pt>.</p>
	 </item>
    </olist> 
<!--* 
<phrase diff="add" dg="all-2506-1">It 
&must; appear only as the value of one or both of the following properties:</phrase>
<olist diff="add" dg="all-2506-1">
     <item>
      <p>the <propref comp="mgd" prop="model group"/> property of a model group definition.</p>
     </item>
     <item>
      <p>the
<propref comp="p" prop="term"/> property of a &particle0; with <propref comp="p" prop="max occurs"/><code>=1</code>which is <phrase diff="del" dg="ep01">part of a pair which constitutes</phrase><phrase diff="add" dg="ep01">the <propref comp="ct" prop="particle"/> of</phrase> the <propref comp="ctd" prop="content type"/> of a
complex type definition.</p>
     </item>
    </olist>
*-->
   </p>
  </constraintnote>
</div4>
<div4 id="sec-cos-element-consistent" dg="b5165a">
<head dg="b5165a">Element Declarations Consistent</head>
<constraintnote type="cos" id="cos-element-consistent">
<head>Element Declarations Consistent</head>
<!--* <issue id="RQ-146i" role="1.1">
< ! - - * <p><loc href="&reqs;#ElementDeclarationsConsistent" target="reqs">RQ-146 (ElementDeclarationsConsistent)</loc></p> * - - >
<p><loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=2544" target="reqs"
>Issue 2544 (RQ-146 element declarations consistent)</loc></p>
<p>Some corner cases, e.g. involving 'skip' wildcards, have emerged with
respect to this constraint.  It will be restated at a higher level of
abstraction, in terms of desired outcome.  See also <specref ref="RQ-36i"/>.</p>
<resolution>
<p>This constraint will be restated in terms of intended outcome, i.e.
that (modulo the impact of xsi:type) validation of an EII with a type
definition will always assign the same type definitions to elements or
attributes of the same name.</p>
</resolution>
</issue> *-->
<p>If the <propref comp="mg" prop="particles"/> 
<phrase dg="b5144">property</phrase> contains, either
directly, indirectly (that is, within the <propref comp="mg" prop="particles"/> 
<phrase dg="b5144">property</phrase> of a
contained model group, recursively)<phrase dg="ep19">,</phrase> 
or <termref def="key-impl-cont">implicitly</termref><phrase dg="ep19">,</phrase> two or more 
<!--*
* material suppressed here by diff group ep20b *
*--><phrase dg="ep20b">element
declarations with the same <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref></phrase>, then all their type
definitions <rfc2119>must</rfc2119> be the same top-level definition, that is,
<olist role="and">
<item>
<p><!--*
* material suppressed here by diff group cta-ed *
*--><phrase dg="cta-ed">A</phrase>ll 
their <phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/>s <!--*
* material suppressed here by diff group modals *
*--> have a <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals"><termref def="key-null">non-absent</termref></phrase>
 <propref comp="ctd" prop="name"/>.</p>
</item>
<item>
<p><!--*
* material suppressed here by diff group cta-ed *
*--><phrase dg="cta-ed">A</phrase>ll 
their
<phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/>s <!--*
* material suppressed here by diff group modals *
*--> have the same
<propref comp="ctd" prop="name"/>.</p>
</item>
<item>
<p><!--*
* material suppressed here by diff group cta-ed *
*--><phrase dg="cta-ed">A</phrase>ll 
their
<phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/>s <!--*
* material suppressed here by diff group modals *
*--> have the same
<propref comp="ctd" prop="target namespace"/>.</p>
</item>
<item dg="cta-wrap">
<p><phrase dg="cta">All their <propref prop="type table" comp="ed"/>s are either
all <termref def="key-null">absent</termref> or else all are present and <!--*
* material suppressed here by diff group cta-ta *
*-->
<phrase dg="cta-ta">have the same sequence of <propref prop="alternatives" comp="tt"/> and
the same <propref prop="default type definition" comp="tt"/>.</phrase></phrase></p>
</item>
</olist>
</p>
<p dg="cta-r2">If <!--*
* material suppressed here by diff group b5940 *
*-->
<olist role="andtest" dg="b5940">
 <item><p>
  The <propref comp="mg" prop="particles"/> property contains (either directly,
  indirectly, or <termref def="key-impl-cont">implicitly</termref>) one or more 
  element declarations with the same <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> <var>Q</var>; call these element
  declarations <var>EDS</var>.
 </p></item>
 <item><p>
  At least	<olist role="ortest">
   <item><p>
    The <propref comp="mg" prop="particles"/> property contains one or more
    <pt>strict</pt> or <pt>lax</pt> <termref def="key-wp">wildcard particles</termref> which <termref def="key-wc-match">match</termref> <var>Q</var>.
   </p></item>
   <item><p>
    The <compref ref="mg"/> is the <propref comp="p" prop="term"/> of the
    <termref def="key-contentModel"/> of some <compref ref="ctd"/> <var>CTD</var> and
    <var>CTD</var>.<propref comp="ctd" prop="content type"/> has an <propref comp="ct" prop="open content"/>
    with a <pt>strict</pt> or <pt>lax</pt> <compref ref="w"/> which
    <termref def="key-wc-match">matches</termref> <var>Q</var>.
   </p></item>
  </olist>
 </p></item>
 <item><p>
  There exists a top-level element declaration <var>G</var> with the <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref>
  <var>Q</var>.
 </p></item>
</olist>
then the <propref prop="type table" comp="ed"/>s of <!--*
* material suppressed here by diff group b5940 *
*--> <phrase dg="b5940"><var>EDS</var></phrase>
and the <propref prop="type table" comp="ed"/> of <!--*
* material suppressed here by diff group b5940 *
*-->
<phrase dg="b5940"><var>G</var></phrase> <rfc2119>must</rfc2119> either
all be <termref def="key-null">absent</termref> or else all be present and
<!--*
* material suppressed here by diff group cta-ta *
*-->
<phrase dg="cta-ta">have the same sequence of <propref prop="alternatives" comp="tt"/> and
the same <propref prop="default type definition" comp="tt"/>.</phrase>
</p>
<p><termdef id="key-impl-cont" term="implicitly contains">A list
of particles <term>implicitly contains</term> an element declaration if<phrase dg="iff"> and only if</phrase> a
member of the list contains that
element declaration in its <termref def="key-eq">substitution group</termref></termdef>.</p>
</constraintnote>
</div4>

<div4 id="sec-cos-nonambig" dg="b5165a">
<head dg="b5165a">Unique Particle Attribution</head>
<!--*
* material suppressed here by diff group ww-p.add.vm13.del *
*-->

<p dg="ww-p">
<termdef id="key-ep" term="element particle">
An <term>element particle</term> is a <compref ref="p"/> whose <propref comp="p" prop="term"/> is an <compref ref="ed"/>.
</termdef>
<termdef id="key-wp" term="wildcard particle">
A <term>wildcard particle</term> is a <compref ref="p"/> whose <propref comp="p" prop="term"/> is a <compref ref="w"/>.
<phrase dg="b3725">Wildcard particles may be
referred to as <quote>strict</quote>, <quote>lax</quote>,
or <quote>skip</quote><phrase dg="ep99"> particles</phrase>, 
depending on the
<propref comp="w" prop="process contents"/> property
of their <propref comp="p" prop="term"/>.</phrase></termdef>
</p>



<constraintnote type="cos" id="cos-nonambig">
<head>Unique Particle Attribution</head>
<!--*
* material suppressed here by diff group ww-p *
*-->

<p dg="ww-p">A content model <rfc2119>must not</rfc2119> contain two
<!--*
* material suppressed here by diff group ww *
*--><phrase dg="ww"><termref def="key-ep">element particles</termref></phrase> which <termref def="key-compete"/> with each other<phrase dg="ww">, nor two
<termref def="key-wp">wildcard particles</termref> which <termref def="key-compete"/> with each other</phrase>.</p>

<!--*
* material suppressed here by diff group add.ww.b5144 *
*--><!--*
* material suppressed here by diff group ww.b5144.del *
*-->

<!--* <p diff="add" dg="ww-x">Unique determination is <emph>not</emph>
compromised for the purposes of this constraint when a given item
might match either a <compref ref="w"/> or an <compref
ref="ed"/>. <specref ref="cvc-particle"/> resolves such choices in
favor of the <compref ref="ed"/>.</p> *-->

<!--*
* material suppressed here by diff group b5144 *
*-->

</constraintnote>

<note dg="b5144">
<p>Content models in which an <termref def="key-ep"/> and a <termref def="key-wp"/>
<termref def="key-compete"/> with each other are <emph>not</emph> prohibited.
In such cases, the <compref ref="ed"/> is chosen; 
see <!--*
* material suppressed here by diff group ww-1 *
*--><phrase dg="ww-1">the definitions of
<termref def="key-att-to">attribution</termref>
and <termref def="key-vpath"/></phrase>.
</p>
</note>

<!--* <p diff="add" dg="ww-x">Unique determination is <emph>not</emph>
compromised for the purposes of this constraint when a given item
might match either a <compref ref="w"/> or an <compref
ref="ed"/>. <specref ref="cvc-particle"/> resolves such choices in
favor of the <compref ref="ed"/>.</p> *-->

<note dg="b5144">
<p>This constraint reconstructs for <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> the equivalent
constraints of <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/> and SGML.  <!--*
* material suppressed here by diff group ww-p *
*--><phrase dg="ww-p">See</phrase> 
<specref ref="non-ambig"/> for further
discussion.</p>

<p>Since this constraint is expressed at the component level, it
applies to content models whose origins (e.g. via type <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derivation</termref> and
references to named model groups) are no longer evident.  So particles at
different points in the content model are always distinct from one another,
even if they originated from the same named model group.</p>
</note>

<note dg="ww"> 
<p>It is a consequence of <specref ref="cos-nonambig"/>, together with
the definition of <termref def="key-vpath"/>, that any sequence <var>S</var> of element
information items has at most one <termref def="key-vpath"/> in any particle <var>P</var>.
This means in turn that each item in <var>S</var> is attributed to at most one particle in <var>P</var>.
No item can match more than one <compref ref="w"/>
or more than one <compref ref="ed"/> (because no two <termref def="key-wp">wildcard particles</termref>
and no two <termref def="key-ep">element particles</termref> <rfc2119>may</rfc2119> <termref def="key-compete"/>), and if an item matches
both a <termref def="key-wp"/> and an <termref def="key-ep"/>, it is <termref def="key-att-to">attributed</termref> by
the rules for <termref def="key-vpath">validation-paths</termref> to the <termref def="key-ep"/>.</p>
</note>


  <note>
<!--* <ednote diff="add" dg="ww-p">
<edtext>What does the following paragraph mean?</edtext>
</ednote> *-->
    <p>Because locally-scoped element declarations <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">sometimes
have and sometimes do not</phrase> have a
<propref comp="ed" prop="target namespace"/>, the scope of
declarations is <emph>not</emph> relevant to enforcing either 
<!--*
* material suppressed here by diff group ww-p *
*--><phrase dg="ww-p">the
<specref ref="cos-nonambig"/> constraint or the 
<specref ref="cos-element-consistent"/> constraint</phrase>.</p>
   </note>
</div4>

     <div4 id="sec-cos-seq-range" dg="b5165a">
      <head dg="b5165a">Effective Total Range (<pt>all</pt> and <pt>sequence</pt>)</head>
      <p>The following constraints define relations appealed to elsewhere in this specification.</p>

      <constraintnote type="cos" id="cos-seq-range">
       <head>Effective Total Range (<pt>all</pt> and <pt>sequence</pt>)</head>
       <p>The effective total range of a particle <phrase dg="ep22"><var>P</var></phrase>
	whose <propref comp="p" prop="term"/> is a group <phrase dg="ep22"><var>G</var></phrase>
	whose <propref comp="mg" prop="compositor"/> is
	<pt>all</pt> or <pt>sequence</pt> is a pair of minimum and maximum, as follows: </p>
       <glist>
	<gitem>
	 <label>minimum</label>
	 <def>
	  <p>The product of <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>P</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="p" prop="min occurs"/> and the
	   sum of the <propref comp="p" prop="min occurs"/> of every wildcard or element
	   declaration particle in <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>G</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="mg" prop="particles"/> and the minimum
	   part of the effective total range of each of the group particles in 
	   <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>G</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="mg" prop="particles"/> (or <code>0</code> 
	   if there are no 
	   <propref comp="mg" prop="particles"/>).</p>
	 </def>
	</gitem>
	<gitem>
	 <label>maximum</label>
	 <def>
	  <p><pt>unbounded</pt> if the <propref comp="p" prop="max occurs"/> of any wildcard or element
	   declaration particle in <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>G</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="mg" prop="particles"/> or the maximum
	   part of the effective total range of any of the group particles in 
	   <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>G</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="mg" prop="particles"/> is <pt>unbounded</pt>, 
	   or if any of those is non-zero
	   and <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>P</var>.<propref comp="p" prop="max occurs"/> 
	    = <pt>unbounded</pt></phrase>,
	   otherwise the product of <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>P</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="p" prop="max occurs"/> and the
	   sum of the <propref comp="p" prop="max occurs"/> of every wildcard or element
	   declaration particle in <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>G</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="mg" prop="particles"/> and the maximum
	   part of the effective total range of each of the group particles in 
	   <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>G</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="mg" prop="particles"/> 
	   (or <code>0</code> if there are no 
	   <propref comp="mg" prop="particles"/>).</p>
	 </def>
	</gitem>
       </glist>
      </constraintnote>
     </div4>

     <div4 id="sec-cos-choice-range" dg="b5165a">
      <head dg="b5165a">Effective Total Range (<pt>choice</pt>)</head>
      <constraintnote type="cos" id="cos-choice-range">
       <head>Effective Total Range (<pt>choice</pt>)</head>
       <p>The effective total range of a particle <phrase dg="ep22"><var>P</var></phrase>
	whose <propref comp="p" prop="term"/> is a group <phrase dg="ep22"><var>G</var></phrase>
	whose <propref comp="mg" prop="compositor"/> is
	<pt>choice</pt> is a pair of minimum and maximum, as follows:</p>
       <glist>
	<gitem>
	 <label>minimum</label>
	 <def>
	  <p>The product of <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>P</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="p" prop="min occurs"/> and the
	   minimum of the <propref comp="p" prop="min occurs"/> of every wildcard or element
	   declaration particle in <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>G</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="mg" prop="particles"/> and 
	   the minimum part of the effective total range of each of the group particles 
	   in <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>G</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="mg" prop="particles"/> 
	   (or <code>0</code> if there are no <propref comp="mg" prop="particles"/>).</p>
	 </def>
	</gitem>
	<gitem>
	 <label>maximum</label>
	 <def>
	  <p><pt>unbounded</pt> if the <propref comp="p" prop="max occurs"/> of any wildcard or element
	   declaration particle in <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>G</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="mg" prop="particles"/> or the maximum
	   part of the effective total range of any of the group particles in 
	   <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>G</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="mg" prop="particles"/> is <pt>unbounded</pt>, 
	   or if any of those is non-zero and 
	   <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>P</var>.<propref comp="p" prop="max occurs"/> = <pt>unbounded</pt></phrase>,
	   otherwise the product of <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>P</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="p" prop="max occurs"/> and the
	   maximum of the <propref comp="p" prop="max occurs"/> of every wildcard or element
	   declaration particle in <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>G</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="mg" prop="particles"/> and the maximum
	   part of the effective total range of each of the group particles in 
	   <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>G</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="mg" prop="particles"/> 
	   (or <code>0</code> if there are no <propref comp="mg" prop="particles"/>).</p>
	 </def>
	</gitem>
       </glist>
      </constraintnote>
     </div4>
    </div3>
   </div2>
   <div2 id="cParticles">
    <head>Particles</head>
    <p>As described in <specref ref="Model_Groups"/>, particles contribute 
to the definition
of content models.</p>
<p dg="ww-p">When an element is validated against a complex type, 
its sequence of child elements is checked against the content model of
the complex type and the children are <termref def="key-att-to"/> <phrase dg="ww-oops">to</phrase>
<compref name="Particles" ref="p"/> of the content model.
The attribution of items to <compref name="Particles" ref="p"/>
<!--*
* material suppressed here by diff group b3725 *
*-->
determines the calculation of the items' 
<termref def="key-dd">context-determined 
declarations</termref><phrase dg="b3725">
and thus partially determines the <termref def="key-governing-ed">governing
element declarations</termref> for the children</phrase>:
<!--*
* material suppressed here by diff group b3725 *
*--><phrase dg="b3725">w</phrase>hen 
an element information item is <termref def="key-att-to"/> an
<termref def="key-ep"/>, that <compref ref="p"/>'s <compref ref="ed"/>,
or an <compref ref="ed"/> <termref def="key-validly-sub"/> for it,
becomes
the item's <termref def="key-dd">context-determined 
declaration</termref><phrase dg="b3725"> and
thus normally its <termref def="key-governing-ed"/></phrase>; when the item is <termref def="key-att-to"/> a
<termref def="key-wp"/>, the <!--*
* material suppressed here by diff group b3725 *
*--><phrase dg="b3725"><termref def="key-governing-ed"/></phrase> 
depends on the <!--*
* material suppressed here by diff group b3725 *
*--><phrase dg="b3725"><propref comp="w" prop="process contents"/> property</phrase> of the wildcard<phrase dg="b3725"> and
on <specref ref="cvc-resolve-instance"/></phrase>.
</p>
    <note role="example">
     <eg xml:space="preserve">&lt;xs:element ref="egg" minOccurs="12" maxOccurs="12"/&gt;

&lt;xs:group ref="omelette" minOccurs="0"/&gt;

&lt;xs:any maxOccurs="unbounded"/&gt;
     </eg>
     <p>XML representations which all involve particles, illustrating some of
the possibilities for controlling occurrence.</p>
    </note>
    <div3 id="Particle_details">
     <head>The Particle Schema Component</head>
<p>The particle schema component has the following properties:</p>

  <compdef name="Particle" abbrev="p" showAKO="true"/>
<p>In general, multiple element
information item <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, possibly with intervening character <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> if the content type
is <pt>mixed</pt>, can be <termref def="key-vn">validated</termref> with
respect to a single particle.  When the <propref comp="p" prop="term"/> is an element
declaration or wildcard, <propref comp="p" prop="min occurs"/> determines the minimum number of such element <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> that can occur.  The number of such children <rfc2119>must</rfc2119> be greater than or equal to <propref comp="p" prop="min occurs"/>.  If <propref comp="p" prop="min occurs"/> is <pt>0</pt>, then occurrence of such children is optional.</p>
<p>Again, when the <propref comp="p" prop="term"/> is an element
declaration or wildcard, the number of such element <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> <rfc2119>must</rfc2119> be less than or equal to any numeric specification of
<propref comp="p" prop="max occurs"/>; if <propref comp="p" prop="max occurs"/> is <pt>unbounded</pt>, then there is no
upper bound on the number of such children.</p>
     <p>When the <propref comp="p" prop="term"/> is a model group, the permitted
occurrence range is determined by a combination of <propref comp="p" prop="min occurs"/> and <propref comp="p" prop="max occurs"/> and the occurrence ranges of the <propref comp="p" prop="term"/>'s <propref comp="mg" prop="particles"/>.</p>
<p dg="ww-1">
<termdef id="key-contain-dpt" term="directly contains">A particle
<term>directly contains</term> the component which is the value of its
<propref comp="p" prop="term"/> property.</termdef>
<termdef id="key-contain-ipx" term="indirectly contains">A particle 
<term>indirectly contains</term> the particles, groups, wildcards, and
element declarations which are contained by the value of its
<propref comp="p" prop="term"/> property.</termdef>
<termdef id="key-contain-xpx" term="contains">A particle 
<term>contains</term> the components which it either
<termref def="key-contain-dpt"/>
or <termref def="key-contain-ipx"/>.</termdef>
</p>
     <p dg="bannotations">
      See <specref ref="cAnnotations"/> for information on the role of the
      <propref comp="p" prop="annotations"/> property.
     </p>
    </div3>
    <div3 id="declare-particles">
     <head>XML Representation of Particle <phrase diff="add" dg="b5156e">Schema</phrase> Components</head>
     <p>Particles correspond to all three elements (<eltref ref="element" inside="complexType"/> not immediately within
      <eltref ref="schema"/>, <eltref ref="group" inside="complexType"/> not immediately within <eltref ref="schema"/> and <eltref ref="any"/>) which allow
      <code>minOccurs</code> and <code>maxOccurs</code> attributes.
      These in turn correspond to <emph>two</emph> components in each
      case, a particle and its
      <propref comp="p" prop="term"/>.  The appropriate mapping is
      described in <specref ref="declare-element"/>, <specref ref="declare-contentModel"/> and <specref ref="declare-openness"/> respectively.</p>
    </div3>
    <div3 id="sec-src-p">
     <head>Constraints on XML Representations of Particles</head>
     <p>None<phrase dg="ep99"> as such</phrase>.</p>
    </div3>
    <div3 id="sec-cvc-p">
     <head>Particle Validation Rules</head>

<div4 id="particle-validation" dg="ww-LM">
<head>Principles of Validation against Particles</head>
<!--* 
<div4 id="particle-recognition" diff="add" dg="ww-x">
<head>Languages Recognized by Particles, Paths in Particles</head>
*-->
<p>Every particle <var>P</var> <termref def="key-accept">recognizes</termref> some language <var>L</var>(<var>P</var>).
<phrase dg="ww-1">When <propref comp="p" prop="min occurs"/> and <propref comp="p" prop="max occurs"/> of <var>P</var> are
both 1, <var>L</var>(<var>P</var>) is the language of <var>P</var>'s <propref comp="p" prop="term"/><phrase dg="ep21">,
as described in <specref ref="term-recognition"/></phrase>.  The
following section (<specref ref="particle-recognition"/>)
describes how more complicated counts are handled.</phrase></p>
<div5 id="particle-recognition">
<head>Language Recognition for Repetitions</head>
       <p>When <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>P</var>.<propref comp="p" prop="min occurs"/> = <var>P</var>.<propref comp="p" prop="max occurs"/> = <var>n</var></phrase>, 
	and <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>P</var>.<propref comp="p" prop="term"/> = <var>T</var></phrase>, 
	then <var>L</var>(<var>P</var>) is the set  of sequences <var>S</var> = <var>S</var><sub>1</sub><!--*
* material suppressed here by diff group ww-1 *
*--> + <var>S</var><sub>2</sub> + ... + <var>Sn</var><!--*
* material suppressed here by diff group ww-1 *
*--><phrase dg="ww-1"><phrase dg="b5146"> </phrase>such that <var>S</var><sub><phrase><var>i</var></phrase></sub> is in <var>L</var>(<var>T</var>) for 0 &lt; <var>i</var> ≤ <var>n</var>.</phrase>
	<phrase dg="ww-1">Less formally: <var>L</var>(<var>P</var>) is </phrase>
	the
	set of sequences which have <termref def="key-partition">partitions</termref> into <var>n</var> sub-sequences
	<!--*
* material suppressed here by diff group ww-1 *
*--><phrase dg="ww-1">for which each of the <var>n</var> subsequences
	 is in the language accepted by the <propref comp="p" prop="term"/> of <var>P</var></phrase>.
       </p>

<!--*
<p>When &p.min; = &j; and &p.max; is <pt>unbounded</pt>,
and &P1; is the &p.term; of &P;, 
then &L.P; is the set  of sequences &S; = &S_1;, + &S_2; + ... + &Sn;, i.e. the
set of sequences which have &partitions; into &n; sub-sequences
such that &n; &ge; &j;
and &Si; is in &P1; for 0 &lt; &i; &le; &n;.</p>
*-->
<p>When <phrase dg="ep24"><var>P</var>.</phrase><propref comp="p" prop="min occurs"/> = <var>j</var> 
and <phrase dg="ep24"><var>P</var>.</phrase><propref comp="p" prop="max occurs"/> = <var>k</var>,
and <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>P</var>.<propref comp="p" prop="term"/> = <var>T</var></phrase>, 
then <var>L</var>(<var>P</var>) is the set  of sequences <var>S</var> = <var>S</var><sub>1</sub>, + <var>S</var><sub>2</sub> + ... + <var>Sn</var>, i.e. the
set of sequences which have <termref def="key-partition">partitions</termref> into <var>n</var> sub-sequences
such that <var>n</var> ≥ <var>j</var> and <var>n</var> ≤ <var>k</var> (or <var>k</var> is <pt>unbounded</pt>)
and <var>S</var><sub><phrase><var>i</var></phrase></sub> is in <var>L</var>(<var>T</var>) for 0 &lt; <var>i</var> ≤ <var>n</var>.</p>
<p>When <phrase dg="ep24"><var>P</var>.</phrase><propref comp="p" prop="min occurs"/> = 0, 
then <var>L</var>(<var>P</var>) also includes the empty sequence.</p>
<p dg="ww-p">If (1) <compref ref="p"/> <var>P</var> has
<propref comp="p" prop="min occurs"/> = <var>j</var>, <propref comp="p" prop="max occurs"/> = <var>k</var>, and <propref comp="p" prop="term"/> = <var>T</var>, 
and (2) <var>S</var> is a sequence of element information items
such that <var>S</var> = <var>S</var><sub>1</sub> + <var>S</var><sub>2</sub> + ... + <var>Sn</var> (i.e. <var>S</var><sub>1</sub>, <var>S</var><sub>2</sub>, ..., <var>Sn</var> is
a <termref def="key-partition"/> of <var>S</var>), 
and (3) <var>n</var> ≤ <var>k</var> (or <var>k</var> is <pt>unbounded</pt>), 
and (4) <var>S</var><sub><phrase><var>i</var></phrase></sub> is in <var>L</var>(<var>T</var>) for 0 &lt; <var>i</var> &lt; <var>n</var>, 
then:
<ulist>
<item><p>If <var>T</var> is a model group, 
then the set of <termref def="key-path">paths</termref> of <var>S</var> in <var>P</var> is the set of all <termref def="key-path">paths</termref> <var>Q</var> such that
<var>Q</var> = <var>Q</var><sub>1</sub> + <var>Q</var><sub>2</sub> + ... + <var>Q</var><sub><phrase><var>n</var></phrase></sub>, where
<var>Q</var><sub><phrase><var>i</var></phrase></sub> is a <termref def="key-path"/> of <var>S</var><sub><phrase><var>i</var></phrase></sub> in <var>T</var> for 0 &lt; <var>i</var> ≤ <var>n</var>.
(For the definition of <termref def="key-path">paths</termref> in model groups,
see <specref ref="group-recognition"/>.)
</p></item>
<item>
<p>
If <var>T</var> is a <termref def="key-basic-term"/>, then the (sole) <termref def="key-path"/> of <var>S</var> in <var>P</var>
is a sequence of <var>n</var> occurrences of <var>P</var><!--*
* material suppressed here by diff group ww-1 *
*--><phrase dg="ww-1">.</phrase>
</p>
</item>
</ulist>
<note><p>
Informally:  the path of an input sequence <var>S</var> in a 
particle <var>P</var> may go through the <termref def="key-basic-particle">basic particles</termref> in
<var>P</var> as many times as is allowed by 
<!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>P</var>.<propref comp="p" prop="max occurs"/></phrase>.
If the path goes through <var>P</var> more than once, each
time before the last one must correspond to a sequence
accepted by 
<!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>P</var>.<propref comp="p" prop="term"/></phrase>; 
because the last 
iteration<phrase dg="ww-1"> in the path</phrase>
may not be complete, it need not be accepted by the
<propref comp="p" prop="term"/>.</p></note>
</p>
</div5>

<div5 id="term-recognition">
<head>Validation of Basic Terms</head>

<p dg="ep21">In the preceding section (<specref ref="particle-recognition"/>), the language <var>L</var>(<var>P</var>) <termref def="key-accept">accepted</termref> by a
<compref ref="p"/> <var>P</var> is defined in terms of the language <termref def="key-accept">accepted</termref> by <var>P</var>'s
<propref comp="p" prop="term"/>.  This section defines <var>L</var>(<var>T</var>) for <termref def="key-basic-term">basic terms</termref>;
for the definition of <var>L</var>(<var>T</var>) when <var>T</var> is a group, 
see <specref ref="group-recognition"/>.</p>

<p dg="ep21">
<termdef id="key-L.ed" term="L(D)">
For any <compref ref="ed"/> <var>D</var>, the language 
<term><phrase><var>L</var>(<var>D</var>)</phrase></term> <termref def="key-accept">accepted</termref> by <var>D</var> 
is the set of all sequences of
length 1 whose sole member is an element information item which
<termref def="key-e-d-match">matches</termref> <var>D</var>.</termdef></p>

<p><!--*
* material suppressed here by diff group ep21 *
*-->
<termdef id="key-e-d-match" term="match">
An element information item <var>E</var> <term>matches</term> an <compref ref="ed"/> <var>D</var> if and only if<!--*
* material suppressed here by diff group ep20 *
*-->
<olist role="oomtest.xor_ep20" dg="ep20">
<!--* Changed to oomtest (one or more) because if the first
    * clause is true and D is global, then the second is always true 
    * (for all D, D is substitutable for D).
    *-->
<item>
<!--*
* material suppressed here by diff group ep20b *
*-->
<p dg="ep20b"><var>E</var> and <var>D</var> have the same <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref>,</p>
</item>
<item>
<p>The <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> of <var>E</var> <!--*
* material suppressed here by diff group ep-rr *
*--><phrase dg="ep-rr"><termref def="cvc-resolve-instance">resolves</termref></phrase> to an element
declaration <var>D</var><sub>2</sub> which is <!--*
* material suppressed here by diff group b3714 *
*--><phrase dg="b3714"><termref def="key-validly-sub"/></phrase>
for <var>D</var>.</p>
</item>
</olist>
<!--*
* material suppressed here by diff group ep20b *
*-->
</termdef>
<!--*
* material suppressed here by diff group ep20x *
*-->
</p>

<p><termdef id="key-en-match" term="match">An 
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> <var>E</var> <term>matches</term> an
<termref def="gloss-NCName">NCName</termref> <var>N</var> and
a namespace name <var>NS</var> <phrase dg="cta-ed2">(<!--*
* material suppressed here by diff group cta-ed2 *
*--><phrase dg="cta-ed2">or, equivalently, <var>N</var> and <var>NS</var> 
<term>match</term> <var>E</var></phrase>)</phrase>
if and only if all of the following
are true:
<ulist>
<item>
<p>The local name of <var>E</var> is identical to <var>N</var>.</p>
</item>
<item>
<p>Either the namespace name of <var>E</var> is identical to <var>NS</var>,
or else <var>E</var> has no namespace name (<var>E</var> is an unqualified
name) and <var>NS</var> is <termref def="key-null">absent</termref>.</p>
</item>
</ulist>
</termdef>
</p>
<!--* !!! propref tagging here may need work. !!! *-->
<!--* !!! this may be deletable, after ep20 is adopted.  But we have
    * to make sure the usage is no longer present at all, before
    * deleting it.  So I'm not dropping it yet. (MSM 2008-02-15)
    *-->
<note dg="cta-ed2"><p>For convenience, <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded names</xspecref>
are sometimes spoken of as <termref def="key-en-match">matching</termref>
a <compref ref="td"/>, an <compref ref="ed"/>, an <compref ref="ad"/>,
or other schema component which has both a <propref prop="name" role="generic"/>
and a <propref prop="target namespace" role="generic"/> property (or vice versa,
the component is spoken of as <termref def="key-en-match">matching</termref>
the <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref>), when what is meant
is, strictly speaking, that the <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref>
<termref def="key-en-match">matches</termref> the <propref prop="name" role="generic"/>
and <propref prop="target namespace" role="generic"/> 
properties of the component.</p></note>

<p dg="ep21">
<termdef id="key-L.w" term="L(W)">
For any <compref ref="w"/> <var>W</var>, the language
<term><phrase><var>L</var>(<var>W</var>)</phrase></term> <termref def="key-accept">accepted</termref> by <var>W</var>
is the set of all sequences of
length 1 whose sole member is an element information item which
<termref def="key-wc-match">matches</termref> <var>W</var>.</termdef>
</p>
<p><!--*
* material suppressed here by diff group ep21 *
*--><phrase id="anchor6159-2"/>
<termdef id="key-wc-match" term="match">An element information item <var>E</var>
<term>matches</term> a <compref ref="w"/> <var>W</var> 
(or a <termref def="key-wp"/> whose <propref comp="p" prop="term"/> is <var>W</var>)
if and only if <!--*
* material suppressed here by diff group b6159 *
*--> <var>E</var><phrase dg="b6159">
is locally <termref def="key-vn">valid</termref> with respect to <var>W</var></phrase>, as defined in the validation rule
<!--*
* material suppressed here by diff group b6159 *
*--><specref ref="cvc-wildcard" dg="b6159"/>.
</termdef>
</p>
<p><termdef id="key-ns-match" term="match">Two namespace
names <var>N</var><sub>1</sub> and <var>N</var><sub>2</sub> are said to <term>match</term> 
if and only if they are identical or both are <termref def="key-null">absent</termref>.
</termdef></p>
<p>For principles of validation when the <propref comp="p" prop="term"/> is a model group
instead of a <termref def="key-basic-particle"/>, see
<specref ref="group-recognition"/><phrase dg="ww"> and
<specref ref="group-validation"/></phrase>.</p>
</div5>
</div4>

<div4 id="sec-cvc-particle" dg="ww-LM">
<head dg="ww-LM"><!--*
* material suppressed here by diff group b5165a *
*--><phrase dg="b5165a">Element Sequence Locally Valid (Particle)</phrase></head>

<!--*
* material suppressed here by diff group rq146-1.add.rq146-2.del *
*-->
<!--*
* material suppressed here by diff group rq146-1.add.rq146-2.del *
*-->
<!--*
* material suppressed here by diff group rq146-1.add.rq146-2.del *
*-->

<!--*
* material suppressed here by diff group rq146-1.add.rq146-2.del *
*-->
<!-- *
<note diff="add" dg="rq146-1">
<p>The <termref def="key-cdt" diff="del" dg="b4690"/>
<termref def="key-ldtype" diff="add" dg="b4690"/> of an element information item is different
from its &dft-binding;, but related: for any element, the
<termref def="key-cdt" diff="del" dg="b4690"/><termref
def="key-ldtype" diff="add" dg="b4690"/>, if it exists, will be the 
&ed-declared-type.xtd; of the element's &dft-binding;.</p>
</note>
*-->

<constraintnote type="cvc" id="cvc-particle">
<head>Element Sequence Locally Valid (Particle)</head>
<p>For a sequence (possibly empty) of element information items to be
locally <termref def="key-vn">valid</termref> with respect to a
<compref ref="p"/>
 <olist role="and">
  <item><p>The sequence must be accepted by the <compref ref="p"/>, as defined
in <specref ref="cvc-accept"/>.</p></item>
  <!--*
* material suppressed here by diff group rq146-abandoned *
*-->
  <!--*
* material suppressed here by diff group rq146-1.add.rq146-2.del *
*-->
 </olist>

</p>
</constraintnote>
</div4>

<div4 id="sec-cvc-accept" dg="b5165a">
<head dg="b5165a">Element Sequence Accepted (Particle)</head>

      <constraintnote type="cvc" id="cvc-accept">
       <head>Element Sequence Accepted (Particle)</head>
       <p dg="rq146-0">For a sequence (possibly empty) of 
	element information items to be
	accepted by a <compref ref="p"/><phrase dg="ep20"> <var>P</var></phrase>, </p>
       <olist role="case">
	<item id="c-pw">
	 <p role="if"><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>P</var>.</phrase><propref comp="p" prop="term"/> is a
	  wildcard</p>
	 <p role="then">
	  <olist role="andtest">
	   <item>
	    <p>The length of the sequence <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> greater than or
	     equal to <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>P</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase></phrase><propref comp="p" prop="min occurs"/>.</p>
	   </item>
	   <item>
	    <p>If <phrase dg="ep20"><var>P</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase></phrase><propref comp="p" prop="max occurs"/> is a number,
	     <phrase dg="ep20">then</phrase> the length of
	     the sequence <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> less than or equal to the <propref comp="p" prop="max occurs"/>.</p>
	   </item>
	   <item>
	    <p>Each element information item in the sequence <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase>
	     <termref def="key-vn">valid</termref> with respect to the
	     wildcard as defined by <specref ref="cvc-wildcard"/>.</p>
	   </item>
	  </olist> <phrase dg="ww-p">In this case, each
	   element information item in the sequence is <termref def="key-att-to">attributed to</termref> <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>P</var></phrase><phrase dg="b3725"> and has no <termref def="key-dd"/></phrase>.</phrase></p>
	</item>
	<item id="c-cdde">
	 <p role="if"><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>P</var>.</phrase><propref comp="p" prop="term"/> is an
	  element declaration<phrase dg="ep20"> <var>D</var></phrase></p>
	 <p role="then">
	  <olist role="andtest">
	   <item>
	    <p>The length of the sequence <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> greater than or
	     equal to <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>P</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase></phrase><propref comp="p" prop="min occurs"/>.</p>
	   </item>
	   <item>
	    <p>If <phrase dg="ep20"><var>P</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase></phrase><propref comp="p" prop="max occurs"/> is a number,
	     <phrase dg="ep20">then</phrase> the length of
	     the sequence <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> less than or equal to the
	     <propref comp="p" prop="max occurs"/>.</p>
	   </item>
	   <item>
	    <p>For each element information item <phrase dg="ep20"><var>E</var></phrase> in the sequence
	     <olist role="oomtest">
	      <item>
	       <p><!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>D</var></phrase> <!--*
* material suppressed here by diff group ep20c *
*--><!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><!--*
* material suppressed here by diff group ep20b *
*--><phrase dg="ep20b"> 
		  <!--*
* material suppressed here by diff group ep20c *
*-->
		  has the same <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> as <var>E</var></phrase></phrase>.</p>
	       <p>In this case <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>D</var></phrase> is the <termref def="key-dd">context-determined declaration</termref>
		for <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var></phrase> with respect to
		<specref role="xref" ref="cvc-assess-elt"/> and
		<specref role="xref" ref="sic-e-outcome"/>.</p>
	      </item>
	      <!--*
* material suppressed here by diff group ep20c *
*-->
	      <item id="c-psg">
	       <p><!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>D</var></phrase> is top-level (i.e. <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>D</var>.<propref comp="ed" prop="scope"/>.<propref prop="variety" comp="sc_e"/> = </phrase>
		 <pt>global</pt>), its <propref comp="ed" prop="disallowed substitutions"/> does not contain
		<pt>substitution</pt>, <!--*
* material suppressed here by diff group ep20 *
*--> <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var></phrase><phrase dg="ep20">'s
		 <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref></phrase> <!--*
* material suppressed here by diff group ep-rr *
*--><phrase dg="ep-rr"><termref def="cvc-resolve-instance">resolves</termref></phrase> to
		 an element declaration<phrase dg="ep24">
		 <var>S</var></phrase><!--*
* material suppressed here by diff group ep-rr *
*--> —
		<termdef id="key-eqd" term="substituting declaration" role="local">call this declaration the
		 <term>substituting declaration</term><!--*
* material suppressed here by diff group ep24 *
*--></termdef><phrase dg="ep20"> —</phrase> and <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><termref def="key-eqd"><phrase><var>S</var></phrase></termref></phrase> <!--*
* material suppressed here by diff group b5282 *
*--> is
		<termref def="key-validly-sub"/> for <!--* check preceding line; I
		think entification of 'validly * substitutable' is
		part of ww-p, not in status quo. *--> <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>D</var></phrase> as defined in
		<specref ref="cos-equiv-derived-ok-rec"/>.</p>
	       <p>In this case <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><termref def="key-eqd"><phrase><var>S</var></phrase></termref></phrase> is the <termref def="key-dd">context-determined declaration</termref>
		for <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var></phrase> with respect to
		<specref ref="cvc-assess-elt"/> and <specref ref="sic-e-outcome"/>.</p>
	      </item>
	     </olist></p>
	    <p dg="ww-p">In this case <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var></phrase> is <termref def="key-att-to">attributed to</termref> <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>P</var></phrase>.</p>
	    <note dg="ep21"><p>
	     This clause is equivalent to requiring that the sequence
	     of length 1 containing <var>E</var> is in
	     <termref def="key-L.ed"><phrase><var>L</var>(<var>D</var>)</phrase></termref>.
	    </p></note>
	   </item>
	  </olist>
	 </p>
	</item>
	<item>
	 <p role="if"><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>P</var>.</phrase><propref comp="p" prop="term"/> is a model
	  group</p>
	 <p role="then">
	  <olist role="andtest">
	   <item><p>There is a <termref def="key-partition">partition</termref> of the sequence
	     into <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>n</var></phrase> sub-sequences such that
	     <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>n</var></phrase> is greater than or equal to 
	     <phrase dg="ep20"><var>P</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase></phrase><propref comp="p" prop="min occurs"/>.</p></item>
	   <item><p>If <phrase dg="ep20"><var>P</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase></phrase><propref comp="p" prop="max occurs"/> is a
	     number, <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>n</var></phrase> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> less than or equal to
	     <phrase dg="ep24"><var>P</var>.</phrase><propref comp="p" prop="max        occurs"/>.</p></item>
	   <item><p>Each sub-sequence in the <termref def="key-partition">partition</termref> is <termref def="key-vn">valid</termref> with respect to that model
	     group as defined in <specref ref="cvc-model-group"/>.</p></item>
	  </olist> <phrase dg="ww-p">In this case, the
	   element information items in each sub-sequence are <termref def="key-att-to">attributed to</termref> <compref name="Particles" ref="p"/>
	   within the model group which is the <propref comp="p" prop="term"/>, as described in
	   <specref ref="group-recognition"/>.</phrase></p>
	</item>
       </olist>

<!--* 
 <p diff="add" dg="ww-x">Although <specref ref="cos-nonambig"/> means that the
in-principle non-determinism of this formulation will rarely result in any
non-determinism in practice, it does not rule out it out entirely. 
When non-determinism <emph>does</emph> arise, it is always because a particular
element information item may be accepted by either a
<compref ref="w"/> or an <compref ref="ed"/>.  In such situations
implementations <rfc2119>MUST</rfc2119> favor the <compref ref="ed"/>, both in
terms of providing the <termref def="key-dd">context-determined
declaration</termref> for the element information item, and in terms of
choosing alternative paths through a content model.</p>
*-->

<!--* <ednote diff="add" dg="ww">
<edtext>Does following note still make sense?</edtext>
</ednote> *-->
<note dg="ww"><p>The rule just given does not require that the
content model be deterministic.  In practice, however, 
most <!--* although not all *-->
non-determinism in content models is ruled out by the schema
component constraint <specref ref="cos-nonambig"/>.
Non-determinism can occur despite that constraint for
several reasons.
In some such cases, 
some particular element information item may be accepted by either a
<compref ref="w"/> or an <compref ref="ed"/>.  In such situations,
the validation process defined in this specification matches the
element information item against the <compref ref="ed"/>, both in
identifying the <compref ref="ed"/> as the item's 
<termref def="key-dd">context-determined declaration</termref>, 
and in choosing alternative paths through a content model.
Other cases of non-determinism involve nested particles each of
which has <propref comp="p" prop="max occurs"/> greater than 1,
where the input sequence can be partitioned in multiple ways.
In those cases, there is no fixed rule for eliminating the
non-determinism.</p></note>

<note>
<p><clauseref ref="c-pw"/> and <clauseref ref="c-psg"/> do not
interact: an element information item validatable by a declaration
with a substitution group head <!--*
* material suppressed here by diff group b2867-1 *
*-->is
<emph>not</emph> validatable by a wildcard which accepts the head's
<phrase dg="b2867-1">(</phrase>namespace<phrase dg="b2867-1">, name) pair</phrase> but not its own.</p>
</note>

     </constraintnote>
</div4>
    </div3>
    <div3 id="sec-sic-p">
     <head>Particle Information Set Contributions</head>
     <p>None<phrase dg="ep99"> as such</phrase>.</p>
    </div3>
    <div3 id="coss-particle">
     <head>Constraints on Particle Schema Components</head>
  <!--*
* material suppressed here by diff group b6201 *
*-->

<div4 id="sec-p-props-correct" dg="b5165a">
<head dg="b5165a">Particle Correct</head>
  <p dg="b6201">All particles (see <specref ref="cParticles"/>) <rfc2119>must</rfc2119> satisfy the following constraint.</p>
  <constraintnote type="cos" id="p-props-correct">
   <head>Particle Correct</head>
   <olist role="And">
    <item>
   <p>The values of the properties of a particle <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">are</phrase> as described in
the property tableau in
<specref ref="Particle_details"/>, modulo the impact of <specref ref="conformance-missing"/>.</p>
    </item>
    <item>
     <p>If <propref comp="p" prop="max occurs"/> is not <pt>unbounded</pt>, that is, it has a
numeric value, then
    <olist role="andtest">
     <item>
     <p><propref comp="p" prop="min occurs"/> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is not</phrase> greater than <propref comp="p" prop="max occurs"/>.</p>
    </item>
    <!--*
* material suppressed here by diff group cleanup-3 *
*-->
    </olist>
   </p>
    </item>
   </olist>
  </constraintnote>
</div4>

<div4 id="sec-cos-particle-extend" dg="b5165a">
<head dg="b5165a">Particle Valid (Extension)</head>
  <p>The following constraint<!--*
* material suppressed here by diff group b6201 *
*-->
   define<phrase dg="b6201">s a</phrase>
   relation<!--*
* material suppressed here by diff group b6201 *
*-->
   appealed to elsewhere in this specification.</p>
  <constraintnote type="cos" id="cos-particle-extend">
   <head>Particle Valid (Extension)</head>
   <p><termdef id="cd-model-extension" term="valid extension" role="local">For a particle
(call it <local>E</local>, for extension) to be a <term>valid extension</term> of
another particle (call it <local>B</local>, for base)</termdef>
    <olist role="oomtest">
     <item>
      <p>They are the same particle.</p>
     </item>
     <item>
      <!--*
* material suppressed here by diff group ep24 *
*-->
	  <p dg="ep24"><var>E</var>.<propref comp="p" prop="min occurs"/>
	   = <var>E</var>.<propref comp="p" prop="max occurs"/>
	   = 1 and <var>E</var>.<propref comp="p" prop="term"/> is a 
	   <pt>sequence</pt> group whose <propref comp="mg" prop="particles"/>' first member is a
	   particle all of whose properties, recursively, are
	   identical to those of <local>B</local><!--*
* material suppressed here by diff group b5504 *
*-->.</p>
     </item>
     <item dg="all-2506-2">
      <p dg="all-2506-2">
       <olist role="Andtest">
        <item>
         <!--*
* material suppressed here by diff group ep24 *
*-->
         <p dg="ep24">
          <local>E</local>.<propref comp="p" prop="min occurs"/> =
          <local>B</local>.<propref comp="p" prop="min occurs"/>.
         </p>
        </item>
        <item>
         <p>
          Both <local>E</local> and <local>B</local> have <pt>all</pt> groups
          as their <propref comp="p" prop="term"/>s.
         </p>
        </item>
        <item>
         <p>The 
          <propref comp="mg" prop="particles"/> of <local>B</local>'s
          <pt>all</pt> group is a prefix of <phrase dg="ep24">the</phrase>
	      <propref comp="mg" prop="particles"/> of
          <local>E</local>'s <pt>all</pt> group.
         </p>
        </item>
       </olist>
      </p>
     </item>
    </olist>
   </p>
  </constraintnote>
</div4>


<!--*
* material suppressed here by diff group b5165a-dummy *
*-->
   <!--* rq17p adopted April 2006, dead text *-->
   <!--*
* material suppressed here by diff group rq17p *
*-->
   <!--*
* material suppressed here by diff group rq17p *
*-->
     
  <!--*
* material suppressed here by diff group rq17p *
*-->


<!--* dead text *-->
<!--*
* material suppressed here by diff group b5165a-dummy *
*-->
  <!--*
* material suppressed here by diff group rq17p *
*-->


<!--*
* material suppressed here by diff group b5165a-dummy *
*-->
  <!--*
* material suppressed here by diff group rq17p *
*-->

<!--* dead text *-->
<!--*
* material suppressed here by diff group b5165a-dummy *
*-->
  <!--*
* material suppressed here by diff group rq17p *
*-->

<!--* dead text *-->
<!--*
* material suppressed here by diff group b5165a-dummy *
*-->
  <!--*
* material suppressed here by diff group rq17p *
*-->

<!--* dead text *-->
<!--*
* material suppressed here by diff group b5165a-dummy *
*-->
  <!--*
* material suppressed here by diff group rq17p *
*-->

<!--* dead text *-->
<!--*
* material suppressed here by diff group b5165a-dummy *
*-->
  <!--*
* material suppressed here by diff group rq17p *
*-->

<!--* dead text *-->
<!--*
* material suppressed here by diff group b5165a-dummy *
*-->
  <!--*
* material suppressed here by diff group rq17p *
*-->

<!--* dead text *-->
<!--*
* material suppressed here by diff group b5165a-dummy *
*-->
  <!--*
* material suppressed here by diff group rq17p *
*-->

<!--* dead text *-->
<!--*
* material suppressed here by diff group b5165a-dummy *
*-->
  <!--*
* material suppressed here by diff group rq17p *
*-->


<!--* dead text *-->
<!--*
* material suppressed here by diff group b5165a-dummy *
*-->
  <!--*
* material suppressed here by diff group rq17p *
*-->

<div4 id="sec-cos-group-emptiable" dg="b5165a">
<head dg="b5165a">Particle Emptiable</head>
 <p dg="b6201">The following constraint defines a relation appealed
  to elsewhere in this specification.</p>
 <constraintnote id="cos-group-emptiable" type="cos">
  <head>Particle Emptiable</head>
  <p><termdef id="cd-emptiable" term="emptiable" role="local">For a particle to be
<term>emptiable</term></termdef>
   <olist role="oomtest">
    <item>
     <p>Its <propref comp="p" prop="min occurs"/> is <code>0</code>.</p>
    </item>
    <item>
     <p>Its <propref comp="p" prop="term"/> is a group and the minimum part of the
effective total range of that group, as defined by <specref ref="cos-seq-range"/> (if
the group is <pt>all</pt> or <pt>sequence</pt>) or 
<specref ref="cos-choice-range"/> (if it is <pt>choice</pt>), is <code>0</code>.</p>
    </item>
   </olist>
  </p>
 </constraintnote>
</div4> 
    </div3>
   </div2>
   <div2 id="Wildcards">
    <head>Wildcards</head>
    <p>In order to exploit the full potential for extensibility offered by XML
plus namespaces, more provision is needed than DTDs allow for targeted flexibility in content
models and attribute declarations.  A wildcard provides for <termref def="key-vn">validation</termref> of
attribute and element information items dependent on their namespace
name<phrase dg="b2867-1">s</phrase><!--*
* material suppressed here by diff group b2867-1a *
*-->
<!--*
* material suppressed here by diff group b2867-1 *
*--><phrase dg="b2867-1">and optionally on</phrase> their local name<phrase dg="b2867-1">s</phrase>.</p>
<!--* <issue id="RQ-9i" role="1.1" diff="del" dg="b2867-1">
< ! - - * <p><loc href="&reqs;#wildcard-ns-sets" target="reqs">RQ-9
(wildcard-ns-sets)</loc></p> * - - >
<p><loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=2867" target="reqs"
>Issue 2867 (RQ-9 wildcard namespace sets)</loc></p>
<p>In version 1.0 negated wildcards were restricted to negating only
one namespace.  Experience suggests that at least at the component
level this <emph>may</emph> need to be expanded, but no final decision
will be made on this until details of the change in interpretation of wildcards
more generally (see <specref ref="RQ-36i"/>) are worked out.</p>

<p>At the moment wildcards can only negate a single namespace.  To
handle certain cases which become possible because to the change in
interpretation of wildcards as subordinate to explicit elements (see
<specref ref="RQ-36i"/>), it may be necessary to negate/exclude a set
of explicitly enumerated &expanded-names;.  This would be a change at
the component level only.</p>
<p>A related possibility, more likely motivated by versioning needs,
would be to provide, perhaps again only at the component level for
now, for <emph>sets</emph> of namespace names to be negated.</p>
</issue> *-->
<note role="example"><eg xml:space="preserve">&lt;xs:any processContents="skip"/&gt;

&lt;xs:any namespace="##other" processContents="lax"/&gt;

&lt;xs:any namespace="http://www.w3.org/1999/XSL/Transform"<phrase dg="b2867-1">
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        notQName="xsl:comment xsl:fallback"</phrase>/&gt;

<phrase id="anchor6013a"/>&lt;xs:any <!--*
* material suppressed here by diff group b2867-1 *
*--><phrase dg="b2867-1">notN</phrase>amespace="##targetNamespace<phrase diff="add" dg="b6013a"> ##local</phrase>"/&gt;

&lt;xs:anyAttribute namespace="http://www.w3.org/XML/1998/namespace"/&gt;</eg>
    <p>XML representations of the four basic types of wildcard, plus one attribute wildcard.</p>
</note>
    <div3 id="Wildcard_details">
     <head>The Wildcard Schema Component</head>
   <p>The wildcard schema component has the following properties:</p>
     <compdef name="Wildcard" abbrev="w" showAKO="true"/>
    <microCompdef name="Namespace Constraint" abbrev="nc" dg="ep01"/>
     <!--*
* material suppressed here by diff group b5200-en *
*-->
     
     <p><propref comp="w" prop="namespace constraint"/> provides for
      <termref def="key-vn">validation</termref> of attribute and element items that:
      <olist>
       <item>
	<p>(<phrase dg="ep01"><propref comp="nc" prop="variety"/>
	 </phrase><pt>any</pt>) have any namespace or are not
	 namespace-qualified;</p>
       </item>
       <!--*
* material suppressed here by diff group b2867-1 *
*-->
       <!--*
* material suppressed here by diff group b2867-1 *
*-->
       <item dg="b2867-1">
	<p>(<propref comp="nc" prop="variety"/> <pt>not</pt> and
	 <propref comp="nc" prop="namespaces"/> a set whose members are either namespace names or
	 <termref def="key-null">absent</termref>) have any namespace
	 other than the specified namespaces and/or, if <termref def="key-null">absent</termref> is included in the set, are
	 namespace-qualified;<phrase diff="add" dg="b6013a">
	 (see this <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="#anchor6013a">example</loc>, which accepts 
	  only namespace-qualified names distinct from the target namespace; the 
	  <quote><code>##local</code></quote> in the schema document 
	  maps to the value <termref def="key-null">absent</termref> in the
	  <propref comp="w" prop="namespace constraint"/>
	  property)</phrase></p>
       </item>
       <item>
	<p>(<phrase dg="ep01"><propref comp="nc" prop="variety"/>
	  <pt>enumeration</pt> and <propref comp="nc" prop="namespaces"/> </phrase>a set
	 whose members are either namespace names or <termref def="key-null">absent</termref>) have any of the specified
	 namespaces and/or, if <termref def="key-null">absent</termref> is included in the set, are
	 unqualified.</p>
       </item>
       <item dg="b2867-1">
	<p>(<propref comp="nc" prop="disallowed names"/> <!--*
* material suppressed here by diff group f2f0610 *
*--> <phrase dg="f2f0610">contains
	  <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#QName">QName</xtermref>
	  members)</phrase> have any <!--*
* material suppressed here by diff group b5200b *
*--><phrase dg="b5200b"><xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref></phrase>
	 other than the specified names<!--*
* material suppressed here by diff group f2f0610 *
*-->.</p>
       </item>
       <item dg="f2f0610"><p>
	 (<propref comp="nc" prop="disallowed names"/> contains the keyword <pt>defined</pt>) have any
	 <!--*
* material suppressed here by diff group b5200b *
*--><phrase dg="b5200b"><xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref></phrase> 
	 other than those matching the
	 names of global element or attribute declarations.
	</p></item>
       <item dg="b5200"><p>
	 (<propref comp="nc" prop="disallowed names"/> contains the keyword <pt>sibling</pt>) have
	 any <!--*
* material suppressed here by diff group b5200b *
*--><phrase dg="b5200b"><xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref></phrase> other than those
	 matching the names of element or attribute declarations in
	 the containing complex type definition.
	</p></item>
      </olist></p>
    <p><propref comp="w" prop="process contents"/> controls the impact on <termref def="key-va"/>
of the information items allowed by wildcards, as follows:
     <glist>
      <gitem>
       <label>strict</label>
       <def>
        <p>There <rfc2119>must</rfc2119> be a top-level declaration for the item
available, or the item <rfc2119>must</rfc2119> have an <code>xsi:type</code>, and the
item <rfc2119>must</rfc2119> be <termref def="key-vn">valid</termref> as
appropriate.</p>
       </def>
      </gitem>
      <gitem>
       <label>skip</label>
       <def>
        <p>No constraints at all:  the item <rfc2119>must</rfc2119> simply be well-formed XML.</p>
       </def>
      </gitem>
      <gitem>
       <label>lax</label>
       <def>
        <p>If the item has a uniquely
determined declaration available, it <rfc2119>must</rfc2119> be <termref def="key-vn">valid</termref> with respect to
that <!--*
* material suppressed here by diff group b6008 *
*-->
<phrase dg="b6008">declaration,</phrase> that is, <termref def="key-vn">validate</termref>
if you can, don't worry if you can't.</p>
       </def>
      </gitem>
     </glist>
    </p>
     <p>See <specref ref="cAnnotations"/> for information on the role of the
<propref comp="w" prop="annotations"/> property.</p>

     <ednote role="pf" dg="vm19-3">
      <edtext>The keyword<phrase dg="b5200">s</phrase>
       <pt>defined</pt> <phrase dg="b5200">and
	<pt>sibling</pt></phrase> allow<!--*
* material suppressed here by diff group b5200 *
*--> a kind of wildcard which matches only
       elements not declared in the current schema<phrase dg="b5200"> or <phrase dg="b5200b">contained
	 within</phrase> the current complex type,
	respectively</phrase>.  <!--*
* material suppressed here by diff group b5200b *
*--><phrase dg="b5200b">They are</phrase>
       new in this version of this specification. The Working Group is
       uncertain whether <!--*
* material suppressed here by diff group b5200b *
*--><phrase dg="b5200b">their</phrase> value outweighs <!--*
* material suppressed here by diff group b5200b *
*--><phrase dg="b5200b">their</phrase>
       liabilities; we solicit input from implementors and users of
       this specification as to whether <!--*
* material suppressed here by diff group b5200b *
*--><phrase dg="b5200b">they</phrase> should be retained or not.</edtext>
     </ednote>

    </div3>

    <div3 id="declare-openness">
     <head><phrase dg="b5159b">XML Representation of Wildcard Schema Components</phrase><!--*
* material suppressed here by diff group b5159b *
*--></head>

     <p>The XML representation for a wildcard schema component is an
      <eltref ref="any"/> or <eltref ref="anyAttribute"/> element
      information item.    <!--*
* material suppressed here by diff group b5286e2 *
*--></p>
     
     <reprdef dg="b5286e-aux">
      <reprelt id="reprelt_any" eltname="any"/>
     </reprdef>
     <reprdef dg="b6165">
      <reprelt id="xr.ct8" dg="b6165" eltname="anyAttribute"/>
     </reprdef>

     <p id="any_p1" dg="b5286e-aux">A<phrase dg="b5152">n <eltref ref="any"/> information item
       corresponds both to a wildcard component and to
       a</phrase> particle containing <!--*
* material suppressed here by diff group b5286e2 *
*--><phrase dg="b5286e2">that</phrase> wildcard<!--*
* material suppressed here by diff group b5152 *
*-->
      (unless <code>minOccurs=maxOccurs=0</code>, in which case the
      item corresponds to no component at 
      all)<!--*
* material suppressed here by diff group b5152 *
*--><phrase dg="b5152">.
     The mapping rules are given in the following two subsections.</phrase></p>

     <div4 id="dcl.wc.p" dg="b5152-movement">
      <head dg="b5152">Mapping from
       <!--*
* material suppressed here by diff group b6187 *
*-->
       <phrase dg="b6187">&lt;any&gt;</phrase> to a Particle</head>

      <p dg="b5152">The mapping from an <eltref ref="any"/> information item to a particle
      is as follows.  
     </p>

     <reprdef dg="b5286e-aux">
      <reprcomp id="mp_any_particle" abstract="Particle" ref="Particle_details">
       <propmap comp="p" prop="min occurs">The <termref def="key-vv">actual value</termref> of the
	<code>minOccurs</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise
	<code>1</code>.</propmap>
       <propmap comp="p" prop="max occurs"><pt>unbounded</pt>, if 
	<!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">
	<code>maxOccurs</code> = <pt>unbounded</pt></phrase>, 
	otherwise the <termref def="key-vv">actual value</termref> of the
	<code>maxOccurs</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise
	<code>1</code>.</propmap>
       <propmap comp="p" prop="term">A wildcard as given
	below<!--*
* material suppressed here by diff group b6008 *
*--><phrase dg="b6008">.</phrase></propmap>
       <propmap comp="p" prop="annotations" dg="bannotations-1">
	The same annotations as the <propref comp="w" prop="annotations"/> of the wildcard. See below.
       </propmap>
      </reprcomp>
     </reprdef>
     </div4>

     <div4 id="dcl.wc.wc" dg="b5152-movement">
      <head dg="b5152">Mapping from
       <!--*
* material suppressed here by diff group b6187 *
*-->
       <phrase dg="b6187">&lt;any&gt;</phrase>
       <phrase dg="b6165">and
       <!--*
* material suppressed here by diff group b6187 *
*-->
       <phrase dg="b6187">&lt;anyAttribute&gt;</phrase></phrase>
       to a Wildcard Component</head>
      <p dg="b5152">The mapping from an <eltref ref="any"/> information item to a wildcard component 
      is as follows.  This mapping is also used for mapping 
      <eltref ref="anyAttribute"/> information items to wildcards,
      although in some cases the result of the mapping is further
      modified, as specified in the rules for 
      <eltref ref="attributeGroup" inside="simpleContent"/> and
      <eltref ref="complexType"/>.
     </p>

    <reprdef>
      <!--* material moved away by b5286e-aux *-->
      <!--*
* material suppressed here by diff group b5286e-aux *
*-->
      <!--*
* material suppressed here by diff group b5286e-aux *
*-->
      <!--*
* material suppressed here by diff group b5286e-aux *
*-->
      <!--* end of material moved away by b5286e-aux *-->

      <reprcomp abstract="Wildcard" ref="Wildcard_details">
       <propmap comp="w" prop="namespace constraint"><!--*
* material suppressed here by diff group b2867-1 *
*--><!--*
* material suppressed here by diff group b2867-1 *
*--> <phrase dg="b2867-1">A <compref ref="nc"/> with
	 the following properties:</phrase>
	<pvlist dg="b2867-1">
	 <pvpair comp="nc" prop="variety">
	  <olist role="caseval">
	   <item>
	    <p role="if">the <code>namespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is
	     present</p>
	    <p role="then">
	     <olist role="caseval">
	      <item>
	       <p role="if"><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><code>namespace</code> 
		 = <code>"##any"</code></phrase></p>
	       <p role="then"><pt>any</pt>;</p>
	      </item>
	      <item>
	       <p role="if"><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><code>namespace</code>
		 = <code>"##other"</code></phrase></p>
	       <p role="then"><pt>not</pt>;</p>
	      </item>
	      <item>
	       <p role="otherwise"><pt>enumeration</pt>;</p>
	      </item>
	     </olist>
	    </p>
	   </item>
	   <item>
	    <p role="if">the <code>notNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>
	     is present</p>
	    <p role="then">
	     <phrase dg="b2867-1a"><pt>not</pt>;</phrase>
	     <!--*
* material suppressed here by diff group b2867-1a *
*-->
	    </p>
	   </item>
	   <item>
	    <p role="otherwise">(neither <code>namespace</code> nor
	     <code>notNamespace</code> is present) <pt>any</pt>.</p>
	   </item>
	  </olist>
	 </pvpair>        
	 <pvpair comp="nc" prop="namespaces">
	  <olist role="caseval">
	   <item>
	    <p role="if">neither <code>namespace</code> nor
	     <code>notNamespace</code> is present</p>
	    <p role="then">the empty set;</p>
	   </item>
	   <item>
	    <p role="if"><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"> 
	      <code>namespace</code> = <code>"##any"</code></phrase></p>
	    <p role="then">the empty set;</p>
	   </item>
	   <item>
	    <p role="if"><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><code>namespace</code> 
	      = <code>"##other"</code></phrase></p>
	    <p role="then">a set consisting <phrase dg="ep24">of</phrase>
	     <termref def="key-null"/>
	     and, if the <code>targetNamespace</code> [attribute] of
	     the <eltref ref="schema"/> ancestor element
	     information item is present, its <termref def="key-vv">actual value</termref>;</p>
	   </item>
	   <item>
	    <p role="otherwise">a set whose members are namespace
	     names corresponding to the space-delimited substrings of
	     the <termref def="key-vv">actual value</termref> of the <code>namespace</code> or
	     <code>notNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> (whichever is
	     present), except
      <olist>
	      <item>
	       <p>if one such substring is
		<code>##targetNamespace</code>, the corresponding
		member is the <termref def="key-vv">actual value</termref> of the
		<code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of the
		<eltref ref="schema"/> ancestor
		element information item if present, otherwise
		<termref def="key-null"/>;</p>
	      </item>
	      <item>
	       <p>if one such substring is <code>##local</code>, the
		corresponding member is <termref def="key-null"/>.</p>
	      </item>
      </olist>
	    </p>
	   </item>
   </olist>
	 </pvpair>
	 <pvpair comp="nc" prop="disallowed names">
	  <!--*
* material suppressed here by diff group vm19 *
*--><phrase dg="vm19">If the <code>notQName</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is
	   present, then a</phrase> set whose members 
	  <!--*
* material suppressed here by diff group b5200b *
*--><phrase dg="b5200b">correspond to the items in the</phrase>
	  <termref def="key-vv">actual value</termref> of the <code>notQName</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref><!--*
* material suppressed here by diff group vm19 *
*-->, 
	  <phrase dg="b5200b">as follows.</phrase>
	  <!--*
* material suppressed here by diff group b5200b *
*--> 
	  <ulist dg="b5200b">
	   <item>
	    <p>If the item is a <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#QName">QName</xtermref>
	     value (i.e. an <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref>), then that 
	     <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#QName">QName</xtermref>
	     value is a member of the set.</p>
	   </item>
	   <item>
	    <p>If the item is the token <quote><code>##defined</code></quote>, 
	     then the keyword <pt>defined</pt> is a member of the set.</p>
	   </item>
	   <item>
	    <p>If the item is the token <quote><code>##definedSibling</code></quote>, 
	     then the keyword <pt>sibling</pt> is a member of the set.</p>
	   </item>
	  </ulist>
	  <!--*
* material suppressed here by diff group b5200b *
*--><phrase dg="b5200b">If the <code>notQName</code> 
	   <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is not present, then</phrase> 
	  the empty set.
	 </pvpair>
 </pvlist>
       </propmap>
       <propmap comp="w" prop="process contents">The <termref def="key-vv">actual value</termref> of the
	<code>processContents</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present,
	otherwise <pt>strict</pt>.</propmap>
       <propmap comp="w" prop="annotations"><!--*
* material suppressed here by diff group bannotations-1 *
*--> <phrase dg="bannotations-2"> The <termref def="key-am-one"/> of the
	 <eltref ref="any"/> element, as defined in <specref ref="declare-annotation"/>. </phrase>
	<note dg="bannotations-2"><p>
  When this rule is used for an attribute wildcard (see <specref ref="declare-type"/>), the <propref comp="w" prop="annotations"/> is the
	  <termref def="key-am-one"/> of the <eltref ref="anyAttribute"/>
	  element.
	 </p></note>
       </propmap>
      </reprcomp>
     </reprdef>
    <p>Wildcards are subject to the same ambiguity constraints
      (<specref ref="cos-nonambig"/>) as other content model
      particles:
      If an instance element could match<!--*
* material suppressed here by diff group ww *
*--> one
      of two wildcards, within the content model of a type, that model
      is in error.</p>
     </div4>
   </div3>

    <div3 id="sec-src-wildcard">
     <head>Constraints on <phrase dg="b5159b">XML Representations of Wildcards</phrase><!--*
* material suppressed here by diff group b5159b *
*--></head>
     <constraintnote type="src" id="src-wildcard">
      <head>Wildcard Representation OK</head>
      <p>In addition to the conditions imposed on <eltref ref="any"/>
       <phrase dg="b6165">and <eltref ref="anyAttribute"/></phrase>
       element information items by the schema for schema<!--*
* material suppressed here by diff group b2067-2e *
*--><phrase dg="b2067-2e"> documents</phrase>,<!--*
* material suppressed here by diff group b2867-1 *
*--> <phrase dg="b5286b"><code>namespace</code> and
	<code>notNamespace</code> attributes <rfc2119>must not</rfc2119> both be
	present.</phrase>
       <!--*
* material suppressed here by diff group b5286b *
*-->
   </p>
  </constraintnote>
    </div3>
    <div3 id="sec-cvc-w">
     <head>Wildcard Validation Rules</head>

<div4 id="sec-cvc-wildcard" dg="b5165a">
<head dg="b5165a">Item Valid (Wildcard)</head>
    <constraintnote type="cvc" id="cvc-wildcard">
     <head>Item Valid (Wildcard)</head>
     <p><phrase id="anchor6159-1"/>
      For an element or attribute information item <phrase dg="b6159"><var>I</var></phrase> to be locally <termref def="key-vn">valid</termref> with respect to a wildcard
<phrase dg="b6159"><var>W</var></phrase><!--*
* material suppressed here by diff group b6159 *
*-->
      <olist role="and" dg="b6159">
       <item>
        <p>The <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> of <var>I</var> is <termref def="key-vn">valid</termref> with respect to
         <var>W</var>.<propref comp="w" prop="namespace constraint"/>, as defined in
         <specref ref="cvc-wildcard-name"/>.</p>
       </item>
       <item>
        <p role="if"><var>W</var>.<propref comp="w" prop="namespace constraint"/>.<propref comp="nc" prop="disallowed names"/>
         contains the keyword <pt>defined</pt></p>
        <p role="then"><olist role="bothtest">
         <item>
          <p role="if"><var>W</var> is an element wildcard (i.e., <var>W</var> appears in a
           content model)</p>
          <p role="then">the <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> of <var>I</var> does not <termref def="cvc-resolve-instance">resolve</termref>
           to an element declaration. (Informally, no such top-level element is
           declared in the schema.)</p>
         </item>
         <item>
          <p role="if"><var>W</var> is an attribute wildcard</p>
          <p role="then">the <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> of <var>I</var> does not <termref def="cvc-resolve-instance">resolve</termref>
           to an attribute declaration.</p>
         </item>
        </olist></p>        
       </item>
       <item>
        <p role="if"><olist role="andtest">
         <item>
          <p><var>W</var>.<propref comp="w" prop="namespace constraint"/>.<propref comp="nc" prop="disallowed names"/>
           contains the keyword <pt>sibling</pt>;</p>
         </item>
         <item>
          <p><var>W</var> is an element wildcard</p>
         </item>
         <item>
          <p><var>I</var> is an element information item</p>
         </item>
         <item>
          <p><var>I</var> has a <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">parent</xpropref> <var>P</var> that is
           also an element information item</p>
         </item>
         <item>
          <p><var>I</var> and <var>P</var> have the same <propref ref="e-validation_context" role="psvi"/></p>
         </item>
         <item>
          <p><var>P</var> has an <termref def="key-governing-type-elem"/> <var>T</var> (which is always a complex
           type and contains <var>W</var> in its <termref def="key-contentModel"/>)</p>
         </item>
        </olist></p>
        <p role="then">the <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> of <var>I</var> does not <termref def="key-en-match"/> any
         element declaration <termref def="key-contain-xpx">contained</termref>
         in the content model of <var>T</var>, whether
         <termref def="key-contain-dpt">directly</termref>,
         <termref def="key-contain-ipx">indirectly</termref>, or
         <termref def="key-impl-cont">implicitly</termref>.</p>
        <p>Informally, the keyword <pt>sibling</pt> disallows any element declared as
         a possible sibling of the wildcard <var>W</var>.</p>
       </item>
      </olist>
     </p>
     <!--*
* material suppressed here by diff group b3725 *
*-->
    </constraintnote>

     <p dg="b3725">When an element or attribute information
item is <termref def="key-att-to">attributed</termref> to a wildcard and the preceding constraint
(<specref ref="cvc-wildcard"/>) is satisfied, then the item has no
<termref def="key-dd"/>.  Its <termref def="key-governing"/> declaration, if any, is found by matching its
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> as described in <specref ref="cvc-resolve-instance"/>.
Note that QName resolution is performed only if the item is <termref def="key-att-to">attributed</termref> to
a <pt>strict</pt> or <pt>lax</pt> wildcard; if the wildcard has a
<propref comp="w" prop="process contents"/> property of <pt>skip</pt>, 
then the item has no <termref def="key-governing"/> declaration.</p>

     <p dg="idc"><termdef id="key-skipped" term="skipped">
      An element or attribute information item is <term>skipped</term> if it
      is <termref def="key-att-to">attributed</termref> to a <pt>skip</pt> wildcard or if one of its ancestor
      elements is.
     </termdef></p>
</div4>
     
     <div4 id="sec-cvc-wildcard-name" dg="b5165a">
      <head dg="b5165a">Wildcard allows Expanded Name</head>
      
      <constraintnote type="cvc" id="cvc-wildcard-name" dg="b2867-1">
       <head>Wildcard allows Expanded Name</head>
       <p>For a<phrase dg="b5200b">n <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> <var>E</var>, i.e. a</phrase>
	(namespace name, local name) pair<phrase dg="b5200b">,</phrase> 
	to be <termref def="key-vn">valid</termref> with respect to a <!--*
* material suppressed here by diff group b5200 *
*-->
	<phrase dg="b5200">namespace</phrase> constraint <!--*
* material suppressed here by diff group b5200b *
*--><phrase dg="b5200b"><var>C</var></phrase><!--*
* material suppressed here by diff group b6159 *
*-->
	<olist role="and">
	 <item>
	  <p>The namespace name is <termref def="key-vn">valid</termref> with respect to 
	   <!--*
* material suppressed here by diff group b5200b *
*--><phrase dg="b5200b"><var>C</var></phrase>, as defined in <specref ref="cvc-wildcard-namespace"/>;</p>
	 </item>
	 <item>
	  <!--*
* material suppressed here by diff group b5200b *
*-->
	  <p dg="b5200b"><var>C</var>.<propref comp="nc" prop="disallowed names"/> does not
	   contain <var>E</var>.</p>
	 </item>
	 <!--*
* material suppressed here by diff group add.vm19.b5200b *
*-->
	 <!--*
* material suppressed here by diff group vm19.b5200b.del *
*-->
	 <!--*
* material suppressed here by diff group b6159 *
*-->

	 <!--*
* material suppressed here by diff group b5200x *
*-->
	 <!--*
* material suppressed here by diff group b5200bx *
*-->
	 <!--*
* material suppressed here by diff group b6159 *
*-->

	 <!--* Alt form 1 of rule for 'defined' *-->
	 <!--*
* material suppressed here by diff group b5200x *
*-->
	 <!--*
* material suppressed here by diff group b5200x *
*-->
	 <!--* Alt form 2 of rule for 'defined' *-->
	 <!--*
* material suppressed here by diff group b5200x *
*-->
	 <!--*
* material suppressed here by diff group b5200x *
*-->
	 <!--* Alt form 3 of rule for 'defined' *-->
	 <!--*
* material suppressed here by diff group b5200x *
*-->
	 <!--*
* material suppressed here by diff group b5200x *
*-->
	 <!--* Alt form 4 of rule for 'defined' *-->
	 <!--*
* material suppressed here by diff group b5200x *
*-->

	</olist>
       </p>
      </constraintnote>
      <!--*
* material suppressed here by diff group b5200bx *
*-->
      <!--*
* material suppressed here by diff group b5200bx *
*-->
      <!--*
* material suppressed here by diff group b5200bx *
*-->
     </div4>

     <div4 id="sec-cvc-wildcard-namespace" dg="b5165a">
      <head dg="b5165a">Wildcard allows Namespace Name</head>
      <constraintnote type="cvc" id="cvc-wildcard-namespace">
       <head>Wildcard allows Namespace Name</head>
       <p>For a value <phrase dg="ep24"><var>V</var></phrase>
        which is either a namespace name or 
	<termref def="key-null">absent</termref> to be <termref def="key-vn">valid</termref> with respect to 
	a <!--*
* material suppressed here by diff group b5200 *
*-->
 <phrase dg="b5200">namespace</phrase>
 constraint <!--*
* material suppressed here by diff group b5200 *
*-->
 <phrase dg="b5200"><var>C</var></phrase>	(the
	value of a <propref comp="w" prop="namespace constraint"/>)
	<olist role="or">
	 <item>
	  <!--*
* material suppressed here by diff group ep24 *
*-->
	  <p dg="ep24"><!--*
* material suppressed here by diff group b5200 *
*--><phrase dg="b5200"><var>C</var></phrase>.<propref comp="nc" prop="variety"/> = <pt>any</pt>.</p>
	 </item>
	 <item>
	  <!--*
* material suppressed here by diff group b2867-1 *
*-->
	  <!--*
* material suppressed here by diff group ep24 *
*-->
	  <p dg="ep24"><!--*
* material suppressed here by diff group b5200 *
*--><phrase dg="b5200"><var>C</var></phrase>.<propref comp="nc" prop="variety"/> = <pt>not</pt>,
	    and <var>V</var> is not identical to any of the members of 
	   <!--*
* material suppressed here by diff group b5200 *
*--><phrase dg="b5200"><var>C</var></phrase>.<propref comp="nc" prop="namespaces"/>.</p>
	 </item>
	 <item>
	  <!--*
* material suppressed here by diff group ep24 *
*-->
	  <p dg="ep24"><!--*
* material suppressed here by diff group b5200 *
*--><phrase dg="b5200"><var>C</var></phrase>.<propref comp="nc" prop="variety"/> 
	   = <pt>enumeration</pt>, and <var>V</var> is
	   identical to one of the members of <!--*
* material suppressed here by diff group b5200 *
*--><phrase dg="b5200"><var>C</var></phrase>.<propref comp="nc" prop="namespaces"/>.</p>
	 </item>
	</olist>
       </p>
      </constraintnote>
     </div4>
    </div3>
    <div3 id="sec-sic-w">
     <head>Wildcard Information Set Contributions</head>
     <p>None<phrase dg="ep99"> as such</phrase>.</p>
    </div3>
    <div3 id="coss-wildcard">
     <head>Constraints on Wildcard Schema Components</head>

     <div4 id="sec-w-props-correct" dg="b5165a">
      <head dg="b5165a">Wildcard Properties Correct</head>
      <p>All wildcards (see <specref ref="Wildcards"/>) <rfc2119>must</rfc2119> satisfy
       the following constraint.</p>
      <constraintnote type="cos" id="w-props-correct">
       <head>Wildcard Properties Correct</head>
       <olist role="And">
	<item>
	 <p>The values of the properties of a wildcard <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">are</phrase> as
	  described in the property tableau in
	  <specref ref="Wildcard_details"/>, modulo the impact of
	  <specref ref="conformance-missing"/>.</p>
	</item>
	<item dg="ep01"><p>If <propref comp="nc" prop="variety"/> is <pt>not</pt>,
	  <propref comp="nc" prop="namespaces"/> has <!--*
* material suppressed here by diff group b2867-1 *
*--><phrase dg="b2867-1">at least</phrase> one member.</p></item>
	<item dg="b2867-1">
	 <p>If <propref comp="nc" prop="variety"/> is <pt>any</pt>, <propref comp="nc" prop="namespaces"/> is
	  empty.</p>
	</item>
	<item dg="b2867-1">
	 <p>The namespace name of each <phrase dg="vm19"><xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#QName">QName</xtermref></phrase> member
	  in <propref comp="nc" prop="disallowed names"/> is allowed by the
	  <propref comp="w" prop="namespace constraint"/>, as defined in
	  <specref ref="cvc-wildcard-namespace"/>.</p>
	</item>
	<item dg="b6162">
	 <p>Attribute wildcards do not contain <pt>sibling</pt> in their
	  <propref comp="w" prop="namespace constraint"/>.<propref comp="nc" prop="disallowed names"/>.</p>
	</item>
       </olist>
   
      </constraintnote>

     </div4>

     <div4 id="sec-cos-ns-subset" dg="b5165a">
      <head dg="b5165a">Wildcard Subset</head>
      <p>The following constraints define a relation appealed to
       elsewhere in this specification.</p>
      <constraintnote type="cos" id="cos-ns-subset">
       <head>Wildcard Subset</head>
       
       <!--*
* material suppressed here by diff group vm19-1 *
*-->

       <!--*
* material suppressed here by diff group vm19-3 *
*-->
       <p dg="vm19-3"><termdef id="key-wc_subset" term="wildcard subset" role="local"> Given two <compref ref="nc"/>s <local>sub</local> and <local>super</local>,
	 <local>sub</local> is a<!--*
* material suppressed here by diff group vm19-2 *
*--> <!--*
* material suppressed here by diff group f2f0701a *
*--> <term dg="f2f0701a">wildcard subset</term> of <local>super</local>
	 if and only if</termdef>
	<olist role="ortest">
	 <item><p><local>super</local><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="variety"/> =
	   <pt>any</pt>.</p></item>

	 <item><p>Both <local>sub</local> and <local>super</local>
	   have 
	   <propref comp="nc" prop="variety"/> = <pt>enumeration</pt>, and 
	   <local>super</local><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="namespaces"/> 
	   is a superset of <local>sub</local><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="namespaces"/>.</p></item>

	 <item><p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><local>sub</local>.<propref comp="nc" prop="variety"/> =</phrase>
	   <pt>enumeration</pt>, 
	   <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><local>super</local>.<propref comp="nc" prop="variety"/> =</phrase> 
	   <pt>not</pt>, and the
	   <propref comp="nc" prop="namespaces"/> of the two are disjoint.</p></item>

	 <item><p>Both <local>sub</local> and <local>super</local>
	   have 
	   <propref comp="nc" prop="variety"/> = <pt>not</pt>, and 
	   <local>super</local><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="namespaces"/> is a subset of 
	   <local>sub</local><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="namespaces"/>.</p></item>
	</olist>
       </p>
       <p dg="b2867-1"><phrase id="anchor6161"/>
        <!--*
* material suppressed here by diff group b6161-en *
*-->
        And <olist role="andtest">
	 <item>
	  <p>Each <phrase dg="vm19"><xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#QName">QName</xtermref></phrase> member
	   of <local>super</local><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="disallowed names"/> is not
	   allowed
	   by <local>sub</local>, as defined in <specref ref="cvc-wildcard-name"/>.</p>
	 </item>
	 <item dg="vm19"><p>
	   If <local>super</local><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="disallowed names"/> contains
	   <pt>defined</pt>, then <!--*
* material suppressed here by diff group vm19-1 *
*-->
	   <local>sub</local><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="disallowed names"/> also contains
	   <pt>defined</pt><!--*
* material suppressed here by diff group vm19-1 *
*-->.
	  </p>
	 </item>
	 <item dg="b5200"><p>
	  If <local>super</local><!--*
* material suppressed here by diff group b6161 *
*--><phrase dg="b6161">.</phrase><propref comp="nc" prop="disallowed names"/> contains <pt>sibling</pt>, then
	  <local>sub</local>'s <propref comp="nc" prop="disallowed names"/> also contains <pt>sibling</pt>.
	  <!--*
* material suppressed here by diff group b5200x *
*-->
	  </p></item>
   <!--*
* material suppressed here by diff group b5200bx *
*-->
	</olist>
       </p>
      </constraintnote>
     </div4>
<div4 id="sec-cos-aw-union" dg="b5165a">
<head dg="b5165a">Attribute Wildcard Union</head>

<constraintnote id="cos-aw-union" type="cos">
   <head>Attribute Wildcard Union</head>
   <!--*
* material suppressed here by diff group vm19-1 *
*-->
   <!--*
* material suppressed here by diff group vm19-1-silent *
*-->
       <!--*
* material suppressed here by diff group vm19-3 *
*-->


       <!--*
* material suppressed here by diff group add.b2867-1.del.vm19-3 *
*-->


       <p dg="vm19-3">
	<termdef id="key-wc_union" term="wildcard union" role="local">
	 <!--* MSM wishes he could suppress role="local": this belongs
	 in the glossary.  But the specprod vocabulary does not
	 foresee multi-paragraph definitions.  Perhaps we could make
	 'consistent' a termref and termdef ... ?  Bleagh. *--> 
	 Given three <compref ref="nc"/>s <var>O</var>, <var>O1</var>, and <var>O2</var>, <var>O</var> is
	 the <!--*
* material suppressed here by diff group vm19-2 *
*-->
	 <!--*
* material suppressed here by diff group f2f0701a *
*--> <term dg="f2f0701a">wildcard union</term> of <var>O1</var> and
	 <var>O2</var> if and only if, first, the <propref comp="nc" prop="variety"/> and
	 <propref comp="nc" prop="namespaces"/>, and, second, the <propref comp="nc" prop="disallowed names"/> of
	 <var>O</var> are <!--*
* material suppressed here by diff group f2f0701a *
*--> <phrase dg="f2f0701a">consistent
	 with <var>O</var> being the union of <var>O1</var> and <var>O2</var>, as that is defined
	 below.</phrase> </termdef></p>
       <p dg="vm19-3">
	The <propref comp="nc" prop="variety"/> and <propref comp="nc" prop="namespaces"/> of <var>O</var> are consistent
	with <var>O</var> being the <!--*
* material suppressed here by diff group vm19-2 *
*--><phrase dg="f2f0701a">wildcard</phrase> union of <var>O1</var> and <var>O2</var> if and
	only if
	<olist role="oomtest">
	 <item>
	  <p><var>O</var>, <var>O1</var>, and <var>O2</var> all have
	    the same <propref comp="nc" prop="variety"/> and <propref comp="nc" prop="namespaces"/>.</p>
	 </item>
	 <item>
	  <p>Either <var>O1</var><phrase dg="ep24">.<propref comp="nc" prop="variety"/> =
	    <pt>any</pt></phrase> or <var>O2</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="variety"/> =
	   <pt>any</pt>, and <var>O</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="variety"/> = <pt>any</pt>.</p>
	 </item>
	 <item>
	  <p><var>O</var>, <var>O1</var>, and <var>O2</var> all have
	    <propref comp="nc" prop="variety"/> <pt>enumeration</pt>, and
	   <var>O</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="namespaces"/> is the union of
	   <var>O1</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="namespaces"/>
	   and <var>O2</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="namespaces"/>.</p>
	 </item>
	 <!--*
* material suppressed here by diff group vm19-4 *
*-->
	 <!--*
* material suppressed here by diff group vm19-4 *
*-->
	 <item dg="vm19-4">
	  <p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>O1</var>.<propref comp="nc" prop="variety"/> = <var>O2</var>.<propref comp="nc" prop="variety"/> =
	    <pt>not</pt></phrase>, and
	   <olist role="ortest">
	    <item><p>
	      The intersection of the <propref comp="nc" prop="namespaces"/> of <var>O1</var> and <var>O2</var> is the
	      empty set, and <var>O</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="variety"/> = <pt>any</pt>.
	     </p></item>
	    <item><p>
	      <var>O</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="variety"/> =
	      <pt>not</pt>, and <!--*
* material suppressed here by diff group ep24 *
*--> <phrase dg="ep24"><var>O</var>.</phrase><propref comp="nc" prop="namespaces"/> <!--*
* material suppressed here by diff group ep24 *
*--> is the non-empty
	      intersection of <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>O1</var>.<propref comp="nc" prop="namespaces"/> and
	       <var>O2</var>.<propref comp="nc" prop="namespaces"/></phrase>.
	     </p></item>
	   </olist>
	  </p></item>

	 <!--*
* material suppressed here by diff group vm19-4 *
*-->
	 <!--*
* material suppressed here by diff group vm19-4 *
*-->
	 <item dg="vm19-4">
	  <p>Either <var>O1</var> or <var>O2</var> has <propref comp="nc" prop="variety"/> <phrase dg="ep24">=</phrase> <pt>not</pt> and <propref comp="nc" prop="namespaces"/>
	   <phrase dg="ep24">=</phrase> <var>S1</var>, and
	   the other has <propref comp="nc" prop="variety"/> <phrase dg="ep24">=</phrase> <pt>enumeration</pt> and
	   <propref comp="nc" prop="namespaces"/> <phrase dg="ep24">=</phrase> <var>S2</var>, and
	   <olist role="ortest">
	    <item><p>
	      The set difference <var>S1</var> minus <var>S2</var> is the empty set, and
	      <var>O</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="variety"/> = <pt>any</pt>.
	     </p></item>
	    <item><p>
	      <var>O</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="variety"/> = <pt>not</pt> and <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>O</var>.<propref comp="nc" prop="namespaces"/></phrase> is
	      the non-empty set difference <var>S1</var> minus <var>S2</var>.
	     </p></item>
	   </olist>
	  </p></item>
	</olist>
       </p>

<p dg="vm19-3">
	The <propref comp="nc" prop="disallowed names"/> property of <var>O</var> is consistent with <var>O</var> being
	the <!--*
* material suppressed here by diff group vm19-2 *
*--><phrase dg="f2f0701a">wildcard</phrase> union of <var>O1</var> and
	<var>O2</var> if and only if <var>O</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="disallowed names"/> includes
	all and only the
	following:<olist>
	 <item>
	  <p>
	   <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#QName">QName</xtermref> members of
	   <var>O1</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="disallowed names"/> that are not allowed by
	   <var>O2</var>, as
	   defined in
	   <specref ref="cvc-wildcard-name"/>.</p>
	 </item>
	 <item><p><xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#QName">QName</xtermref>
	   members of <var>O2</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="disallowed names"/> that are not
	   allowed by <var>O1</var>.
	  </p></item>
	 <item><p>
	   The keyword <pt>defined</pt> if it is contained in both
	   <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>O1</var>.<propref comp="nc" prop="disallowed names"/> and
	    <var>O2</var>.<propref comp="nc" prop="disallowed names"/></phrase>.
	  </p></item>
	 <!--*
* material suppressed here by diff group b5200x *
*-->
	 <!--*
* material suppressed here by diff group b6163 *
*-->
</olist>
</p>

<note dg="vm19-3">
<p><!--*
* material suppressed here by diff group b6163 *
*--><phrase dg="b6163">When one of the wildcards has
<pt>defined</pt> in <propref comp="nc" prop="disallowed names"/> and the other does not, then
<pt>defined</pt> is <emph>not</emph> included in the union. This may allow
QNames that are not allowed by either wildcard. This is to ensure
that all unions are expressible. If <pt>defined</pt> is intended to be
included, then it is necessary to have it in both wildcards.</phrase></p>
</note>

   <p>In the case where there are more than two <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01"><compref ref="nc"/>s to be combined</phrase>, the <!--*
* material suppressed here by diff group vm19-2 *
*--><phrase dg="f2f0701a">wildcard</phrase>
union is determined by identifying the <!--*
* material suppressed here by diff group vm19-2 *
*--><phrase dg="f2f0701a">wildcard</phrase> union of two
of <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01">them</phrase> as above, then the <!--*
* material suppressed here by diff group vm19-2 *
*--><phrase dg="f2f0701a">wildcard</phrase> union of <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01">the result</phrase> with
the third<!--*
* material suppressed here by diff group b6163 *
*-->, and so on as required.
    <!--*
* material suppressed here by diff group b6163 *
*-->
   </p>
  </constraintnote>
     </div4>

<!--* 2009-07-16 : CMSMcQ : the following div4 is not in fact deleted
    * (b6163a was rejected by the WG, apparently).
    * To make it possible to untag it cleanly for XSD 1.0 3e, I'm retagging it
    * from diff="del" dg="b6163a" to diff="tag" dg=""
    *-->
<div4 id="sec-cos-aw-intersect" dg="b5165a">
<!--* <div4 id="sec-cos-aw-intersect" diff="del" dg="b6163a"> *-->
<head dg="b5165a">Attribute Wildcard Intersection</head>

<constraintnote id="cos-aw-intersect" type="cos">
<head>Attribute Wildcard Intersection</head>
<!--*
* material suppressed here by diff group vm19-1 *
*-->

<!--*
* material suppressed here by diff group vm19-3 *
*-->

<!--*
* material suppressed here by diff group add.b2867-1.del.vm19-3 *
*-->

<p dg="vm19-3"><termdef id="key-wc_intersect" term="wildcard intersection" role="local">
Given three <compref ref="nc"/>s
<var>O</var>, <var>O1</var>, and <var>O2</var>, <var>O</var> is the <!--*
* material suppressed here by diff group vm19-2 *
*-->
<!--*
* material suppressed here by diff group f2f0701a *
*-->
<term dg="f2f0701a">wildcard intersection</term>
of <var>O1</var> and <var>O2</var> if and only if
both its <propref comp="nc" prop="variety"/> and <propref comp="nc" prop="namespaces"/> properties, on the
one hand, and its <propref comp="nc" prop="disallowed names"/> property, on the other, are
<!--*
* material suppressed here by diff group f2f0701a *
*-->
<phrase dg="f2f0701a">consistent with <var>O</var> being the intersection
of <var>O1</var> and <var>O2</var>, as that is defined below.</phrase></termdef></p>
<p dg="vm19-3">
The <propref comp="nc" prop="variety"/> and <propref comp="nc" prop="namespaces"/> of <var>O</var> are consistent
with <var>O</var> being the <!--*
* material suppressed here by diff group vm19-2 *
*--><phrase dg="f2f0701a">wildcard</phrase>
intersection of <var>O1</var> and <var>O2</var> if and only if
<olist role="oomtest">
<item>
<p><var>O</var>, <var>O1</var>, and <var>O2</var> have 
the same <propref comp="nc" prop="variety"/> and <propref comp="nc" prop="namespaces"/>.
</p>
</item>
<item>
<p>Either <var>O1</var> or <var>O2</var> has <propref comp="nc" prop="variety"/> = <pt>any</pt>
and <var>O</var> has <propref comp="nc" prop="variety"/> and <propref comp="nc" prop="namespaces"/> identical
to those of the other.</p>
</item>
<item>
<p><var>O</var>, <var>O1</var>, and <var>O2</var> all have <propref comp="nc" prop="variety"/> = <pt>enumeration</pt>,
and <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>O</var>.<propref comp="nc" prop="namespaces"/></phrase> 
is the intersection of the
<propref comp="nc" prop="namespaces"/> of <var>O1</var> and <var>O2</var>.</p>
</item>
<item>
<p><var>O</var>, <var>O1</var>, and <var>O2</var> all have
<propref comp="nc" prop="variety"/> <phrase dg="ep24">=</phrase> <pt>not</pt>,
and <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>O</var>.<propref comp="nc" prop="namespaces"/></phrase> 
is the union of the
<propref comp="nc" prop="namespaces"/> of <var>O1</var> and <var>O2</var>.</p>
</item>
<item>
<p>Either <var>O1</var> or <var>O2</var> has <propref comp="nc" prop="variety"/> = <pt>not</pt> 
and <propref comp="nc" prop="namespaces"/> = <var>S1</var> and the other has <propref comp="nc" prop="variety"/> =
<pt>enumeration</pt> and <propref comp="nc" prop="namespaces"/> = <var>S2</var>,
and <var>O</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="variety"/> = <pt>enumeration</pt> and 
<phrase dg="ep24"><var>O</var>.</phrase><propref comp="nc" prop="namespaces"/> = the 
set difference <var>S2</var> minus <var>S1</var>.</p>
</item>
</olist>
</p>

<p dg="vm19-3">
The <propref comp="nc" prop="disallowed names"/> property of <var>O</var> is consistent
with <var>O</var> being the <!--*
* material suppressed here by diff group vm19-2 *
*--><phrase dg="f2f0701a">wildcard</phrase>
intersection of <var>O1</var> and <var>O2</var> if and only if
<var>O</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="disallowed names"/>
includes all and only the following:<olist>
<item><p>
<!--*
* material suppressed here by diff group b2867-3 *
*--> <!--*
* material suppressed here by diff group vm19 *
*--> <phrase dg="vm19"><xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#QName">QName</xtermref>
members</phrase> of <var>O1</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="disallowed names"/>
<!--*
* material suppressed here by diff group b6167 *
*-->
<phrase dg="b6167">whose namespace names</phrase>
are allowed by <var>O2</var>, as defined in
<!--*
* material suppressed here by diff group b6167 *
*--><specref ref="cvc-wildcard-namespace" dg="b6167"/><!--*
* material suppressed here by diff group b2867-3 *
*-->.</p></item>
<item dg="b2867-3"><p>
<!--*
* material suppressed here by diff group vm19 *
*--> <phrase dg="vm19"><xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#QName">QName</xtermref>
members</phrase> of <var>O2</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="nc" prop="disallowed names"/>
<!--*
* material suppressed here by diff group b6167 *
*-->
<phrase dg="b6167">whose namespace names</phrase>
are allowed by <var>O1</var>.
</p></item>
<!--*
* material suppressed here by diff group b6167 *
*-->
<item dg="vm19"><p>
The keyword <pt>defined</pt> if it is a member of either
<propref comp="nc" prop="disallowed names"/>.
</p></item>
<!--*
* material suppressed here by diff group b5200x *
*-->
</olist></p>

<p>In the case where there are more than two <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01"><compref ref="nc"/>s to be combined</phrase>, the <!--*
* material suppressed here by diff group vm19-2 *
*--><phrase dg="f2f0701a">wildcard</phrase>
intersection is determined by identifying the <!--*
* material suppressed here by diff group vm19-2 *
*--><phrase dg="f2f0701a">wildcard</phrase> intersection of two
of <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01">them</phrase> as above, then the <!--*
* material suppressed here by diff group vm19-2 *
*--><phrase dg="f2f0701a">wildcard</phrase> intersection of <!--*
* material suppressed here by diff group ep01 *
*--><phrase dg="ep01">the result</phrase> with
the third<!--*
* material suppressed here by diff group f2f0610 *
*-->, and so on as required.
</p>
</constraintnote>
     </div4>
</div3>
</div2>

<div2 id="cIdentity-constraint_Definitions">
    <head>Identity-constraint Definitions</head>
<p>Identity-constraint definition components provide for uniqueness and
reference constraints with respect to the contents of multiple elements and attributes.</p>
 <note role="example">
  <eg xml:space="preserve">&lt;xs:key name="fullName"&gt;
 &lt;xs:selector xpath=".//person"/&gt;
 &lt;xs:field xpath="forename"/&gt;
 &lt;xs:field xpath="surname"/&gt;
&lt;/xs:key&gt;

&lt;xs:keyref name="personRef" refer="fullName"&gt;
 &lt;xs:selector xpath=".//personPointer"/&gt;
 &lt;xs:field xpath="@first"/&gt;
 &lt;xs:field xpath="@last"/&gt;
&lt;/xs:keyref&gt;

&lt;xs:unique name="nearlyID"&gt;
 &lt;xs:selector xpath=".//*"/&gt;
 &lt;xs:field xpath="@id"/&gt;
&lt;/xs:unique&gt;</eg>
  <p>XML representations for the three kinds of identity-constraint definitions.</p>
 </note>
    <div3 id="Identity-constraint_Definition_details">
     <head>The Identity-constraint Definition Schema Component</head>
     <p>The identity-constraint definition schema component has the following
properties:
</p>   

<!--* <issue id="RQ-14i" role="1.1" diff="del" dg="bannotations">
< ! - - * <p><loc href="&reqs;#id-inconsistency" target="reqs">RQ-14 (id-inconsistency)</loc></p> * - - >
<p><loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=2848" target="reqs"
>Issue 2848 (RQ-14 annotations on field and select)</loc></p>
<p>Version 1.0 provided no home for annotations on <code>xs:field</code>
and <code>xs:selector</code>.  The overall reworking of annotation at the
component level described in <specref ref="RQ-131i"/> will take care of this.</p>
<resolution>
<p>See <specref ref="RQ-131i"/>.</p>
</resolution>
</issue> *-->
  <compdef name="Identity-constraint Definition" abbrev="icd" showAKO="true"/>
  <!-- <microCompdef name="XPath Expression" abbrev="x" diff="add" dg="b4419"/>
  <microCompdef name="Namespace Binding" abbrev="nb" diff="add" dg="cta"/> -->

<p>Identity-constraint definitions are identified by their <propref comp="icd" prop="name"/> and <propref comp="icd" prop="target namespace"/>;
<!--*
* material suppressed here by diff group b5144 *
*--><phrase dg="b5144">identity-constraint</phrase>
definition identities <rfc2119>must</rfc2119> be unique within an <!--*
* material suppressed here by diff group b4399 *
*--><termref def="key-schema" dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--> schema</termref>.  See <specref ref="composition-schemaImport"/> for the use of component
identifiers when importing one schema into another.</p>
<p>Informally, <propref comp="icd" prop="identity-constraint category"/> identifies the
<!--*
* material suppressed here by diff group b5144 *
*--><phrase dg="b5144">identity-constraint</phrase>
definition as playing one of
three roles:
<ulist>
 
<item><p>(<pt>unique</pt>) the
<!--*
* material suppressed here by diff group b5144 *
*--><phrase dg="b5144">identity-constraint</phrase>
definition asserts uniqueness, with respect to the content
identified by <propref comp="icd" prop="selector"/>, of the tuples resulting from
evaluation of the <propref comp="icd" prop="fields"/> XPath expression(s). </p></item>
 
<item>
<p>(<pt>key</pt>) the
<!--*
* material suppressed here by diff group b5144 *
*--><phrase dg="b5144">identity-constraint</phrase>
definition asserts uniqueness as for
<pt>unique</pt>.  <pt>key</pt> further asserts that all selected content
actually has such tuples.</p>
</item>
<item><p>(<pt>keyref</pt>) the
<!--*
* material suppressed here by diff group b5144 *
*--><phrase dg="b5144">identity-constraint</phrase>
definition asserts a correspondence, with respect to the content
identified by <propref comp="icd" prop="selector"/>, of the tuples resulting from
evaluation of the <propref comp="icd" prop="fields"/> XPath expression(s), with those of the <propref comp="icd" prop="referenced key"/>. </p></item>
</ulist>
</p>
<p>These constraints are specified along side the specification of types for the
attributes and elements involved, i.e. something declared as of type integer
<!--*
* material suppressed here by diff group may *
*--><phrase dg="may">can</phrase> also serve as a key.  Each constraint declaration has a name, which exists in a
single symbol space for constraints.  The 
<!--*
* material suppressed here by diff group b1915bis *
*--><phrase dg="b1915bis"><!--*
* material suppressed here by diff group wgi-20080530 *
*--><phrase dg="wgi-20080530">equality and inequality</phrase></phrase>
conditions
appealed to in checking these constraints apply to the 
<emph>value<phrase dg="b1915bis">s</phrase></emph> of
the fields selected<phrase dg="b1915bis">, not their
lexical representation</phrase>, so that for example <code>3.0</code> and <code>3</code>
would be conflicting keys if they were both 
<!--*
* material suppressed here by diff group b1915bis *
*--><phrase dg="b1915bis">decimal</phrase>, but non-conflicting if
they were both strings, or one was a string and one a <!--*
* material suppressed here by diff group b1915bis *
*--><phrase dg="b1915bis">decimal</phrase>.  
<phrase dg="wgi-20080530">When equality and
identity differ for the simple types involved, all three
forms of identity-constraint test for equality, not identity,
of values.</phrase>
<!--*
* material suppressed here by diff group b1915bis *
*--></p>
    <p>Overall the augmentations to XML's <code>ID/IDREF</code> mechanism are:</p>
    <ulist>
     <item>
<p>Functioning as a part of an identity-constraint is in addition to, not instead of,
having a type;</p>
     </item>
     <item><p>Not just attribute values, but also element content and combinations
of values and content can be declared to be unique;</p></item>
     <item><p>Identity-constraints are specified to hold within the scope of particular elements;</p></item>
     <item><p>(Combinations of) attribute values and/or element content can be
declared to be keys, that is, not only unique, but always present and non-nillable;</p></item>
     <item>
      <p>The comparison between <pt>keyref</pt> <propref comp="icd" prop="fields"/> and
<pt>key</pt> or <pt>unique</pt> <propref comp="icd" prop="fields"/> is by value equality,
not by string equality.</p>
     </item>
    </ulist>
    <p><propref comp="icd" prop="selector"/> specifies a restricted XPath
(<!--*
* material suppressed here by diff group f2f0701a *
*--><bibref ref="bib-xpath2" dg="f2f0701a"/>) expression relative to
instances of the element being declared.  This <rfc2119>must</rfc2119> identify a
<!--*
* material suppressed here by diff group b4416-3 *
*-->
<phrase dg="b4416-3">sequence of element nodes that are</phrase>
contained within the declared element<!--*
* material suppressed here by diff group b4416-3 *
*-->
to which the constraint applies.</p>
    <p><propref comp="icd" prop="fields"/> specifies XPath expressions relative to each
element selected by a <propref comp="icd" prop="selector"/>.  
<!--*
* material suppressed here by diff group b5144 *
*--><phrase dg="b5144">Each
XPath expression in the <propref comp="icd" prop="fields"/> property</phrase> 
<rfc2119>must</rfc2119> identify
a single node (element or attribute)<phrase dg="b5144">,</phrase> 
whose content or value, which <rfc2119>must</rfc2119> be
of a simple type, is used in the constraint.  It is possible to specify an
ordered list of <propref comp="icd" prop="fields"/>s, to cater to multi-field keys,
keyrefs, and uniqueness constraints.
     </p>
     <p>In order to reduce the burden on implementers, in particular
implementers of streaming processors, only restricted subsets of XPath
expressions are allowed in <propref comp="icd" prop="selector"/> and <propref comp="icd" prop="fields"/>.  The details are given in <specref ref="coss-identity-constraint"/>.</p>
 <note>
      <p>Provision for multi-field keys etc. goes beyond what is supported by <code>xsl:key</code>.</p>
     </note>
<!--*
* material suppressed here by diff group f2f0701b-silent *
*-->
<note dg="f2f0701b"><p>
 In <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">version 1.0 of this specification</phrase>, identity constraints used 
<!--*
* material suppressed here by diff group f2f0701c *
*--> <bibref ref="bib-xpath1"/>. 
<!--*
* material suppressed here by diff group f2f0701c *
*--><phrase dg="f2f0701c">They now</phrase> use <bibref ref="bib-xpath2"/>.
 <!--*
* material suppressed here by diff group f2f0701e *
*-->
</p></note>
     <p>See <specref ref="cAnnotations"/> for information on the role of the
<propref comp="icd" prop="annotations"/> property.</p>
    </div3>

    <div3 id="declare-key">
     <head><phrase dg="b5159b">XML Representation of Identity-constraint Definition Schema Components</phrase><!--*
* material suppressed here by diff group b5159b *
*--></head>
     <p>The XML representation for an identity-constraint definition schema
      component is  either a <eltref ref="key"/>, a <eltref ref="keyref"/> or a <eltref ref="unique"/> element information
      item.  The correspondences between the properties of those
      information items and properties of the component they
      correspond to are as follows:</p>

     <!--*
* material suppressed here by diff group b5152-movement *
*-->

     <reprdef dg="b5152-movement">
      <reprelt id="xr.idc0" dg="b5152-movement" eltname="unique"/>
      <reprelt id="xr.idc1" dg="b5152-movement" eltname="key"/>
      <reprelt id="xr.idc2" dg="b5152-movement" eltname="keyref"/>
      <reprelt id="xr.idc3" dg="b5152-movement" eltname="selector"/>
      <reprelt id="xr.idc4" dg="b5152-movement" eltname="field"/>
     </reprdef>
     
     <p id="xr.idc5.bis" dg="b2850.b5152-move">
      <phrase id="xr.idc5x" dg="b5152-movement">If the <code>ref</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is absent, 
       the corresponding schema
       component is as follows:</phrase></p>
     
     <reprdef dg="b5152-movement">
      <reprcomp id="xr.idc6" dg="b5152-movement" abstract="Identity-constraint Definition" ref="Identity-constraint_Definition_details">
       <propmap comp="icd" prop="name">The <termref def="key-vv">actual value</termref> of the 
	<code>name</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref></propmap>
       <propmap comp="icd" prop="target namespace">The <termref def="key-vv">actual value</termref> of the
	<code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of the
 <phrase dg="b5148"><eltref ref="schema"/></phrase>
 <!--*
* material suppressed here by diff group cleanup-1 *
*--><phrase dg="cleanup-1">ancestor</phrase> <!--*
* material suppressed here by diff group b5148 *
*-->
	element information item<phrase dg="b5148"> if present, otherwise <termref def="key-null">absent</termref></phrase>.</propmap>
       <propmap comp="icd" prop="identity-constraint category">One of <pt>key</pt>, 
	<pt>keyref</pt><!--*
* material suppressed here by diff group ep99 *
*--> or
	<pt>unique</pt>, depending on the item.</propmap>
       <!--*
* material suppressed here by diff group b4419 *
*-->

       <!--*
* material suppressed here by diff group b4419-f1 *
*-->

       <!--*
* material suppressed here by diff group b4419-f2 *
*-->

       <propmap comp="icd" prop="selector" dg="b4419-f3">
	<!--*
* material suppressed here by diff group b4419-fchoices *
*-->
	An <compref ref="x"/> property record, as described in 
	section <specref ref="declare-assertion"/>, with
	<eltref ref="selector"/> as the "host element" and
	<att>xpath</att> as the designated
	expression <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>.
	<!--*
* material suppressed here by diff group b4419-fchoices *
*-->
       </propmap>

       <!--*
* material suppressed here by diff group b4419 *
*-->

       <!--*
* material suppressed here by diff group b4419-f1 *
*-->

       <!--*
* material suppressed here by diff group b4419-f2 *
*-->

       <propmap comp="icd" prop="fields" dg="b4419-f3">
	<!--*
* material suppressed here by diff group b4419-fchoices *
*-->
	A sequence of <compref ref="x"/> property records, corresponding to the
	<eltref ref="field"/> element information item <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, in order,
	following the rules given in <specref ref="declare-assertion"/>,
	with <eltref ref="field"/> as the "host element" 
	and <att>xpath</att> as the designated expression <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>.
	<!--*
* material suppressed here by diff group b4419-fchoices *
*-->
       </propmap>

       <propmap comp="icd" prop="referenced key">If the item is a <eltref ref="keyref"/>, the
	identity-constraint definition <termref def="src-resolve">resolved</termref> to by the
	<termref def="key-vv">actual value</termref> of the <code>refer</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, otherwise 
	<termref def="key-null">absent</termref>.</propmap>
       <propmap comp="icd" prop="annotations"><!--*
* material suppressed here by diff group bannotations-1 *
*-->
	<phrase dg="bannotations-2">
	 The <termref def="key-am-set"/> of the set of elements containing the
	 <eltref ref="key"/>, <eltref ref="keyref"/>, or <eltref ref="unique"/> element,
	 whichever is present, and the <eltref ref="selector"/> and <eltref ref="field"/>
	 <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if present,
	 as defined in <specref ref="declare-annotation"/>.
	</phrase>
       </propmap>
      </reprcomp>
     </reprdef>
     
     <p id="xr.idc7.bis" dg="b2850.b5152-move">
      <phrase id="xr.idc7x" dg="b5152-movement">Otherwise (the <code>ref</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is
       present), the corresponding schema component is the identity-constraint definition
       <termref def="src-resolve">resolved</termref> to by the <termref def="key-vv">actual value</termref> of the
       <code>ref</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>.</phrase></p>
     
     
     <note role="example">
      <eg xml:space="preserve">&lt;xs:element name="vehicle"&gt;
 &lt;xs:complexType&gt;
  . . .
  &lt;xs:attribute name="plateNumber" type="xs:integer"/&gt;
  &lt;xs:attribute name="state" type="twoLetterCode"/&gt;
 &lt;/xs:complexType&gt;
&lt;/xs:element&gt;

&lt;xs:element name="state"&gt;
 &lt;xs:complexType&gt;
  &lt;xs:sequence&gt;
   &lt;xs:element name="code" type="twoLetterCode"/&gt;
   &lt;xs:element ref="vehicle" maxOccurs="unbounded"/&gt;
   &lt;xs:element ref="person" maxOccurs="unbounded"/&gt;
  &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;

 &lt;!-- vehicles are keyed by their plate within states --&gt;
 &lt;xs:key name="reg"&gt;
  &lt;xs:selector xpath=".//vehicle"/&gt;
  &lt;xs:field xpath="@plateNumber"/&gt;
 &lt;/xs:key&gt;
&lt;/xs:element&gt;

&lt;xs:element name="root"&gt;
 &lt;xs:complexType&gt;
  &lt;xs:sequence&gt;
   . . .
   &lt;xs:element ref="state" maxOccurs="unbounded"/&gt;
   . . .
  &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;

 &lt;!-- states are keyed by their code --&gt;
 &lt;xs:key name="state"&gt;
  &lt;xs:selector xpath=".//state"/&gt;
  &lt;xs:field xpath="code"/&gt;
 &lt;/xs:key&gt;

 &lt;xs:keyref name="vehicleState" refer="state"&gt;
  &lt;!-- every vehicle refers to its state --&gt;
  &lt;xs:selector xpath=".//vehicle"/&gt;
  &lt;xs:field xpath="@state"/&gt;
 &lt;/xs:keyref&gt;

 &lt;!-- vehicles are keyed by a pair of state and plate --&gt;
 &lt;xs:key name="regKey"&gt;
  &lt;xs:selector xpath=".//vehicle"/&gt;
  &lt;xs:field xpath="@state"/&gt;
  &lt;xs:field xpath="@plateNumber"/&gt;
 &lt;/xs:key&gt;

 &lt;!-- people's cars are a reference --&gt;
 &lt;xs:keyref name="carRef" refer="regKey"&gt;
  &lt;xs:selector xpath=".//car"/&gt;
  &lt;xs:field xpath="@regState"/&gt;
  &lt;xs:field xpath="@regPlate"/&gt;
 &lt;/xs:keyref&gt;

&lt;/xs:element&gt;

&lt;xs:element name="person"&gt;
 &lt;xs:complexType&gt;
  &lt;xs:sequence&gt;
   . . .
   &lt;xs:element name="car"&gt;
    &lt;xs:complexType&gt;
     &lt;xs:attribute name="regState" type="twoLetterCode"/&gt;
     &lt;xs:attribute name="regPlate" type="xs:integer"/&gt;
    &lt;/xs:complexType&gt;
   &lt;/xs:element&gt;
  &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;
&lt;/xs:element&gt;</eg>
     <p>A <code>state</code> element is defined, which
contains a <code>code</code> child and some <code>vehicle</code> and <code>person</code>
children.  A <code>vehicle</code> in turn has a <code>plateNumber</code> attribute,
which is an integer, and a <code>state</code> attribute.  State's
<code>code</code>s are a key for them within the document.  Vehicle's
<code>plateNumber</code>s are a key for them within states, and
<code>state</code> and
<code>plateNumber</code> is asserted to be a <pt>key</pt> for
<code>vehicle</code> within the document as a whole.  Furthermore, a <code>person</code> element has
an empty <code>car</code> child, with <code>regState</code> and
<code>regPlate</code> attributes, which are then asserted together to refer to
<code>vehicle</code>s via the <code>carRef</code> constraint.  The requirement
that a <code>vehicle</code>'s <code>state</code> match its containing
<code>state</code>'s <code>code</code> is not expressed here.</p>
    </note>
     <note role="example" dg="b4280">
      <eg xml:space="preserve">&lt;xs:element name="stateList"&gt;
 &lt;xs:complexType&gt;
  &lt;xs:sequence&gt;
   . . .
   &lt;xs:element name="state" maxOccurs="unbounded"&gt;
    &lt;xs:complexType&gt;
     &lt;xs:sequence&gt;
      . . .
      &lt;xs:element name="code" type="twoLetterCode"/&gt;
      . . .
     &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
   &lt;/xs:element&gt;
   . . .
  &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;

 &lt;xs:key ref="state"/&gt; &lt;!-- reuse the key constraint from the above example --&gt;
&lt;/xs:element&gt;</eg>
      <p>A list of <code>state</code> elements can appear as child elements
       under <code>stateList</code>. A <pt>key</pt> constraint can be used to
       ensure that there is no duplicate state <code>code</code>. We already
       defined a <pt>key</pt> in the above example for the exact same purpose
       (the key constraint is named "<code>state</code>"). We can reuse it
       directly via the <code>ref</code> attribute on the <code>key</code>
       element.</p>
     </note>
 </div3>
    <div3 id="sec-src-identity-constraint">
     <head>Constraints on <phrase dg="b5159b">XML Representations of Identity-constraint Definitions</phrase><!--*
* material suppressed here by diff group b5159b *
*--></head>
    <constraintnote type="src" id="src-identity-constraint">
   <head>Identity-constraint Definition Representation OK</head>
   <p>In addition to the conditions imposed on <eltref ref="key"/>, <eltref ref="keyref"/> and <eltref ref="unique"/> element
information items by the schema for schema<!--*
* material suppressed here by diff group b2067-2e *
*--><phrase dg="b2067-2e"> documents</phrase>, <!--*
* material suppressed here by diff group b2850 *
*-->
    <olist role="and" dg="b2850">
     <item><p>
      One of <code>ref</code> or <code>name</code> is present, but not both.
     </p></item>
     <item dg="b5004"><p>
      If <code>name</code> is present, then <eltref ref="selector"/> appears in
      <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>.
     </p></item>
     <item><p>
      If <code>name</code> is present on <eltref ref="keyref"/>, then
      <code>refer</code> is also present.
     </p></item>
     <item><p>
      If <code>ref</code> is present, then only <code>id</code>
      and <eltref ref="annotation"/> are
      allowed to appear together with <code>ref</code>.
     </p></item>
     <item><p>
      If <code>ref</code> is present, then the
      <propref comp="icd" prop="identity-constraint category"/> of the identity-constraint
      definition <termref def="src-resolve">resolved</termref> to by the
      <termref def="key-vv">actual value</termref> of the <code>ref</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> matches the name of the
      element information item.
     </p></item>
     <!--*
* material suppressed here by diff group b5286 *
*-->
    </olist>
   </p>
  </constraintnote>
    </div3>
    <div3 id="sec-cvc-identity-constraint">
     <head>Identity-constraint Definition Validation Rules</head>
 <constraintnote type="cvc" id="cvc-identity-constraint">
  <head>Identity-constraint Satisfied</head>
      <p>For an element information item <phrase dg="ep20"><var>E</var></phrase>
       to be locally <termref def="key-vn">valid</termref> with respect to an identity-constraint
   <olist role="and">
    <item>
     <p><phrase dg="b4416-3">A data model instance is constructed
 from the input information set, as described in <bibref ref="bib-xdm"/>.</phrase>
 The <propref comp="icd" prop="selector"/>, with<phrase dg="b4416-3">
 the element node corresponding to </phrase><!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var></phrase> as the
 context node, evaluates to a <!--*
* material suppressed here by diff group b4416-3 *
*-->
 <phrase dg="b4416-3">sequence of element nodes, as defined in
 <specref ref="cvc-xpath"/>.</phrase>
 <!--*
* material suppressed here by diff group b5781 *
*-->
	  <termdef id="key-tns" term="target node set" role="local" dg="b5781">
	   The <term>target node set</term> is the
	   set of nodes in that sequence, after omitting
	   all element nodes corresponding to element
	   information items that are
	   <termref def="key-skipped"/>.</termdef></p>
    </item>
    <item>
     <p>Each node in the <termref def="key-tns">target node set</termref> is
either the context node 
<!--*
* material suppressed here by diff group wd2.silent *
*--><phrase dg="wd2.silent">or an</phrase>
element node among its descendants.</p>
    </item>
    <item>
     <p>For each node in the <termref def="key-tns">target node set</termref> all of the <propref comp="icd" prop="fields"/>, with
that node as the context node, evaluates to
<!--*
* material suppressed here by diff group idc-1 *
*-->
<phrase dg="idc-1">a <!--*
* material suppressed here by diff group b4416-3 *
*-->
<phrase dg="b4416-3">sequence of nodes (as defined in
<specref ref="cvc-xpath"/>)</phrase> that only contains
<termref def="key-skipped"/> nodes and at most one node whose <termref def="key-governing"/>
type definition is either a simple type definition or a complex type
definition with <propref comp="ct" prop="variety"/> <pt>simple</pt>.</phrase>
<termdef id="key-ks" term="key-sequence" role="local">Call the
sequence of the <!--*
* material suppressed here by diff group b2505 *
*-->
<phrase dg="b2505"><xpropref role="psviAnon">schema actual value</xpropref>s</phrase>
of the element and/or attribute information items in
those node-sets in order the <term>key-sequence</term> of the
node</termdef>.</p>

  <note dg="b5144">
   <p>The use of  <xpropref role="psviAnon">schema <!--*
* material suppressed here by diff group b2505 *
*--><phrase dg="b2505">actual</phrase> value</xpropref> in the definition
of <termref def="key-ks">key sequence</termref> above means that
<pt>default</pt> or <pt>fixed</pt> value constraints <!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase> play a part in <termref def="key-ks">key sequence</termref>s.</p>
  </note>
    </item>
    <item>
     <p>
   <!--*
* material suppressed here by diff group b5781 *
*--><termdef id="key-qns" term="qualified node set" role="local" dg="b5781">The <term>qualified node set</term> is the subset
of the <termref def="key-tns">target node set</termref> consisting of those nodes for
which all the <propref comp="icd" prop="fields"/> evaluate to a node sequence
one of whose members is an element or attribute node with a
<termref def="key-null">non-absent</termref> <xpropref role="psviAnon">schema actual value</xpropref></termdef>.
     <olist role="Casetest">
    <item id="c-u">
     <p role="if">the <propref comp="icd" prop="identity-constraint category"/> is <pt>unique</pt></p>
     <p role="then">no two members of the <termref def="key-qns">qualified node set</termref> have <termref def="key-ks">key-sequences</termref> whose members
are pairwise equal, as defined by <!--*
* material suppressed here by diff group fpwd *
*--><xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#equality" dg="fpwd">Equality</xtermref> in <bibref ref="ref-xsp2"/>.</p>
    </item>
      <item id="c-k">
     <p role="if">the <propref comp="icd" prop="identity-constraint category"/> is <pt>key</pt></p>
       <p role="then">
        <olist role="andtest">
         <item>
     <p>The <termref def="key-tns">target node set</termref> and the <termref def="key-qns">qualified node set</termref> are equal, that is, every member of the <termref def="key-tns">target node set</termref> is also a member of the <termref def="key-qns">qualified node set</termref> and <emph>vice versa</emph>.</p>
         </item>
    <item>
     <p>No two members of the <termref def="key-qns">qualified node set</termref> have <termref def="key-ks">key-sequences</termref> whose members
are pairwise equal, as defined by <!--*
* material suppressed here by diff group fpwd *
*--><xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#equality" dg="fpwd">Equality</xtermref> in <bibref ref="ref-xsp2"/>.</p>
    </item>
    <item id="c-nlbl">
     <p>No element member of the <termref def="key-ks">key-sequence</termref> of any
member of the <termref def="key-qns">qualified node set</termref> was assessed as <termref def="key-vn">valid</termref> by reference to an element
declaration whose <propref comp="ed" prop="nillable"/> is <pt>true</pt>.</p>
    </item>
        </olist>
       </p>
    </item>
    <item id="cl-krv">
     <p role="if">the <propref comp="icd" prop="identity-constraint category"/> is <pt>keyref</pt></p>
     <p role="then">for each member of the 
	     <termref def="key-qns">qualified node set</termref> (call this
	     the <local>keyref member</local>), there <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> a
	     <termref def="key-nt">node table</termref> associated
	     with the
	     <propref comp="icd" prop="referenced key"/> in the <propref role="psvi" ref="e-id_constraint_table"/> of <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var></phrase>
	     (see <specref ref="sic-key"/>, which <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> understood
	     as logically prior to this clause of this constraint,
	     below) and there <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> an entry in that table whose
	     <termref def="key-ks">key-sequence</termref> is equal to
	     the <local>keyref member's</local> <termref def="key-ks">key-sequence</termref> member for member,
	     as defined by <!--*
* material suppressed here by diff group fpwd *
*--><xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#equality" dg="fpwd">Equality</xtermref>
	     in <bibref ref="ref-xsp2"/>.</p>
	   </item>
	  </olist>
	 </p>
	</item>
       </olist>
      </p>
      <!--*
* material suppressed here by diff group b5144 *
*-->
      <note dg="b4202"><p>
	For <pt>unique</pt> identity constraints, the <termref def="key-qns">qualified node set</termref> is
	allowed to be different from the <termref def="key-tns">target node set</termref>. That is, a
	selected unique node may have fields that do not have corresponding
	<xpropref role="psviAnon">schema actual value</xpropref>s.
       </p></note>
     </constraintnote>
     <note>
      <p>Because the validation of <pt>keyref</pt> (see <clauseref ref="cl-krv"/>) depends on finding appropriate entries in a
       element information item's <termref def="key-nt">node
	table</termref>, and <termref def="key-nt">node
	tables</termref> are assembled strictly recursively from the
       node tables of descendants, only element information items
       within the sub-tree rooted at the element information item
       being <termref def="key-vn">validated</termref> can be referenced successfully.</p>
     </note>
     <note>
      <p>Although this specification defines a <termref def="key-psvi">post-schema-validation infoset</termref> contribution
       which would enable schema-aware processors to implement
       <clauseref ref="c-nlbl"/> above (<specref ref="sic-elt-decl"/>), processors are not required to provide
       it.  This clause can be read as if in the absence of this
       infoset contribution, the value of the relevant <propref comp="ed" prop="nillable"/>
       property <rfc2119>must</rfc2119> be available.</p>
     </note>
     <p dg="b2047">For purposes of checking
      identity-constraints, single atomic values are not distinguished
      from lists with single items.  An atomic value <var>V</var> and a list
      <var>L</var> with a single item are treated as equal<!--*
* material suppressed here by diff group b6008 *
*--><!--*
* material suppressed here by diff group wgi-20080530 *
*-->, for
      purposes of this specification, if <var>V</var> is equal 
      <!--*
* material suppressed here by diff group wgi-20080530 *
*-->
      to the atomic value which is the single item of <var>L</var>.
     </p>
    </div3>
    <div3 id="sec-sic-key">
     <head>Identity-constraint Definition Information Set Contributions</head>
 <constraintnote type="sic" id="sic-key">
  <head>Identity-constraint Table</head>
  <p><termdef id="key-ec" term="eligible identity-constraint" role="local">An
<term>eligible identity-constraint</term> of an element information item is
one such that <clauseref ref="c-u"/> or <clauseref ref="c-k"/> of
<specref ref="cvc-identity-constraint"/> is satisfied with respect to that
item and that constraint, or such that any of the element information
item <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of that item have an <propref role="psvi" ref="e-id_constraint_table"/> property whose value has an entry for
that constraint</termdef>.</p>
  <p><termdef id="key-nt" term="node table" role="local">A <term>node
table</term> is a set of pairs each consisting of a <termref def="key-ks">key-sequence</termref> and an element node</termdef>.</p>
  <p>Whenever an element information item has one or more <termref def="key-ec">eligible identity-constraints</termref>, in the <termref def="key-psvi">post-schema-validation infoset</termref> that
element information item <phrase dg="opt.144">has</phrase><!--*
* material suppressed here by diff group opt.144 *
*--> a property as follows:</p>
  <proplist item="element" role="psvi">
    <propdef id="e-id_constraint_table" name="identity-constraint table">
     one
<local>Identity-constraint Binding</local>
information item for each <termref def="key-ec">eligible identity-constraint</termref>, with
properties as follows:
     <proplist item="Identity-constraint Binding" role="psvi">
      <propdef id="cb-definition" name="definition">The <termref def="key-ec">eligible identity-constraint</termref>.</propdef>
      <propdef id="cb-node_table" name="node table">A <termref def="key-nt">node table</termref> with one entry for every <termref def="key-ks">key-sequence</termref> (call it <local>k</local>) and
node (call it <local>n</local>) such that
   <olist role="ortest">
    <item id="c-kc">
     <p>There is an entry in one of the <termref def="key-nt">node
tables</termref> associated with the <propref role="psvi" ref="cb-definition"/> in an <local>Identity-constraint Binding</local>
information item in at least one of the <propref role="psvi" ref="e-id_constraint_table"/>s of the element information item
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of the element information item whose <termref def="key-ks">key-sequence</termref> is <local>k</local> and whose node
is <local>n</local>;</p>
    </item>
    <item>
     <p><local>n</local> appears with <termref def="key-ks">key-sequence</termref> <local>k</local> in the <termref def="key-qns">qualified node set</termref> for the <propref role="psvi" ref="cb-definition"/>.</p>
    </item>
   </olist> provided no two entries have the same <termref def="key-ks">key-sequence</termref> but distinct nodes.  Potential
conflicts are resolved by not including any conflicting entries which
would have owed their inclusion to <clauseref ref="c-kc"/> above. Note
that if all the conflicting entries arose under <clauseref ref="c-kc"/> above, this means no entry at all will appear for the
offending <termref def="key-ks">key-sequence</termref>.</propdef>
     </proplist>
    </propdef>
   </proplist>  
    <!--*
* material suppressed here by diff group ep01 *
*-->
  <note>
   <p>The complexity of the above arises from the fact that
<pt>keyref</pt> identity-constraints <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">can</phrase> be defined on domains distinct from the
embedded domain of the identity-constraint they reference, or <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">on domains which are</phrase> the
same but self-embedding at some depth.  In either case the <termref def="key-nt">node
table</termref> for the referenced identity-constraint needs to propagate upwards, with
conflict resolution.</p>
   <p>The <local>Identity-constraint Binding</local> information item, unlike
others in this specification, is essentially an internal bookkeeping
mechanism.  It is introduced to support the definition of <specref ref="cvc-identity-constraint"/>
above.<!--*
* material suppressed here by diff group b4518 *
*-->
</p></note>
 </constraintnote>
    </div3>
    <div3 id="coss-identity-constraint">
     <head>Constraints on Identity-constraint Definition Schema Components</head>

     <div4 id="sec-c-props-correct" dg="b5165a">
      <head dg="b5165a">Identity-constraint Definition Properties Correct</head>  
      <p>All identity-constraint definitions (see <specref ref="cIdentity-constraint_Definitions"/>) <rfc2119>must</rfc2119> satisfy the
       following constraint.</p>
      <constraintnote type="cos" id="c-props-correct">
       <head>Identity-constraint Definition Properties Correct</head>
       <olist role="And">
	<item>
	 <p>The values of the properties of an identity-constraint definition
	  <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">are</phrase> as described in the property tableau in
	  <specref ref="Identity-constraint_Definition_details"/>, modulo the
	  impact of <specref ref="conformance-missing"/>.</p>
	</item>
	<item>
	 <p>If the <propref comp="icd" prop="identity-constraint category"/>
	  is <pt>keyref</pt>, the cardinality of the <propref comp="icd" prop="fields"/> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is equal
	   to</phrase> that of the <propref comp="icd" prop="fields"/>
	  of the <propref comp="icd" prop="referenced     key"/>.</p>
	</item>
       </olist>
      </constraintnote>
     </div4>

<div4 id="sec-c-selector-xpath" dg="b5165a">
<head dg="b5165a">Selector Value OK</head>
     <constraintnote type="cos" id="c-selector-xpath">
      <head>Selector Value OK</head>
      <olist role="And">
       <item>
        <p>The <propref comp="icd" prop="selector"/> 
	 <!--*
* material suppressed here by diff group b4419-4 *
*-->
	 <phrase dg="b4419-4">satisfies the constraint
	  <specref ref="xpath-valid"/>.</phrase>
	</p>
       </item>
       <item>
        <olist role="OoMtest">
         <item>
          <p>It<phrase dg="b4419">s 
	    <propref comp="x" prop="expression"/></phrase> 
	   <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">conforms</phrase> to the following extended BNF:
	   <scrap lang="ebnf" headstyle="show">
	    <head>Selector XPath expressions</head>
	    <prod id="Selector">
	     <lhs>Selector</lhs>
	     <rhs><nt def="Path">Path</nt> ( '|' <nt def="Path">Path</nt> )*</rhs>
	    </prod>
	    <prod id="Path">
	     <lhs>Path</lhs>
	     <rhs>('.//')? <nt def="Step">Step</nt> ( '/' <nt def="Step">Step</nt> )*</rhs>
	    </prod>
	    <prod id="Step">
	     <lhs>Step</lhs>
	     <rhs>'.' | <nt def="NameTest">NameTest</nt></rhs>
	    </prod>
	    <prod id="NameTest">
	     <lhs>NameTest</lhs>
	     <rhs><xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#NT-QName">QName</xnt> | '*' | <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#NT-NCName">NCName</xnt> ':' '*'</rhs>
	    </prod>
	   </scrap>
	  </p>
         </item>
         <item>
          <p>It<phrase dg="b4419">s <propref comp="x" prop="expression"/></phrase> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> an XPath expression
	   involving the <code>child</code> axis whose abbreviated
	   form is as given above.</p>
         </item>
        </olist>
       </item>
      </olist>
      <p>For readability, whitespace <rfc2119>may</rfc2119> be used in selector XPath
       expressions even though not explicitly allowed by the grammar:
       <nt def="whitespace">whitespace</nt> <rfc2119>may</rfc2119> be freely added
       within patterns before or after any <nt def="token">token</nt>.
      <scrap lang="ebnf" headstyle="show">
	<head>Lexical productions</head>
	<prod id="token">
	 <lhs>token</lhs>
	 <rhs>'.' | '/' | '//' | '|' | '@' | <nt def="NameTest">NameTest</nt></rhs>
	</prod>
	<prod id="whitespace">
	 <lhs>whitespace</lhs>
	 <rhs><xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-S">S</xnt></rhs>
	</prod>
        </scrap></p>
      <p>When tokenizing, the longest possible token is always returned.</p>      
     </constraintnote>

      <p dg="b5231">
       <termdef id="key-selector-subset" term="selector subset of XPath">
	The subset of XPath defined in 
	<specref ref="c-selector-xpath"/> is called the
	<term>selector subset</term> of XPath.
       </termdef></p>
     </div4>

<div4 id="sec-c-fields-xpaths" dg="b5165a">
<head dg="b5165a">Fields Value OK</head>
     <constraintnote type="cos" id="c-fields-xpaths">
      <head>Fields Value OK</head>
      <olist role="And">
       <item>
        <p>Each member of the <propref comp="icd" prop="fields"/> 
	 <!--*
* material suppressed here by diff group b4419-4 *
*-->
	 <phrase dg="b4419-4">satisfies the constraint
	  <specref ref="xpath-valid"/>.</phrase>
	</p>
       </item>
       <item>
        <p><phrase dg="b4419">For each member of the <propref comp="icd" prop="fields"/></phrase> <olist role="oomtest">
         <item>
          <p>It<phrase dg="b4419">s <propref comp="x" prop="expression"/></phrase> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">conforms</phrase> to the extended BNF given
above for <nt def="Selector">Selector</nt>, with the following modification:
        <scrap headstyle="show">
         <head>Path in Field XPath expressions</head>
         <prod id="fPath">
          <lhs>Path</lhs>
          <rhs>('.//')? ( <nt def="Step">Step</nt> '/' )* ( <nt def="Step">Step</nt> | '@' <nt def="NameTest">NameTest</nt> )</rhs>
         </prod>
        </scrap>
           This production differs from the one above in allowing the final
step to match an attribute node.
        </p>
         </item>
         <item>
          <p>It<phrase dg="b4419">s <propref comp="x" prop="expression"/></phrase> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> an XPath expression involving the <code>child</code> and/or <code>attribute</code> axes whose abbreviated form is
as given above.</p>
         </item>
        </olist></p>
       </item>
      </olist>
      <p>For readability, whitespace <rfc2119>may</rfc2119> be used in field XPath expressions even though not
explicitly allowed by the grammar: <nt def="whitespace">whitespace</nt> <rfc2119>may</rfc2119> be freely added within patterns before or after any <nt def="token">token</nt>.
      </p>
      <p>When tokenizing, the longest possible token is always returned.</p>
     </constraintnote>

      <p dg="b5231">
       <termdef id="key-field-subset" term="selector subset of XPath">
	The subset of XPath defined in 
	<specref ref="c-fields-xpaths"/> is called the
	<term>field subset</term> of XPath.
       </termdef></p>
     </div4>
    </div3>
   </div2>

   <div2 id="cTypeAlternative" dg="cta-ta">
    <head>Type Alternatives</head>
    <p>Type Alternative components provide associations between boolean
     conditions (as XPath expressions) and <compref ref="td"/>s.
     <phrase dg="cta-ta-2">They are used in conditional type assignment.</phrase>
    </p>
    <div3 id="TA_details">
     <head>The Type Alternative Schema Component</head>
     <p>The type alternative schema component has the following properties:</p>
     <compdef name="Type Alternative" abbrev="tac" showAKO="true"/>
     <p>Type alternatives can be used by an <compref ref="ed"/> to specify a
      condition (<!--*
* material suppressed here by diff group cta-ta *
*--><propref prop="test" comp="tac" dg="cta-ta"/>) under which a particular type (<!--*
* material suppressed here by diff group cta-ta *
*--><propref prop="type definition" comp="tac" dg="cta-ta"/>) is used
      <!--*
* material suppressed here by diff group cta-ta-2 *
*--><phrase dg="cta-ta-2">as the
       <termref def="key-governing-type-elem"/> for element information items governed by that
       <compref ref="ed"/>.  Each <compref ref="ed"/> <rfc2119>may</rfc2119> have multiple
       <compref ref="tac"/>s in its <propref prop="type table" comp="ed"/></phrase>.</p>
    </div3>
    <div3 id="declare-ta">
     <head><phrase dg="b5159b">XML Representation of Type Alternative Schema Components</phrase><!--*
* material suppressed here by diff group b5159b *
*--></head>
     <p>The XML representation for a <phrase dg="cta-ta-2">type 
       alternative schema component</phrase><!--*
* material suppressed here by diff group b6008 *
*--> is an
      <eltref ref="alternative"/> element information item. The correspondences
      between the properties of that information item and properties of the
      component it corresponds to are as follows:</p>

     <!--*
* material suppressed here by diff group b5152-movement *
*-->

     <reprdef dg="b5152-movement">
      <reprelt id="xr.alt0" eltname="alternative" dg="b5152-movement"/>
     </reprdef>
     <p dg="b5152">Each <eltref ref="alternative"/> element
      maps to a <compref ref="tac"/> component as follows.
     </p>
     <reprdef dg="b5152-movement">
      <reprcomp id="xr.alt1" ref="TA_details" abstract="Type Alternative" dg="b5152-movement">
       <!--*
* material suppressed here by diff group b4419-f1 *
*-->
       <!--*
* material suppressed here by diff group b4419-f2 *
*-->
	   <propmap comp="tac" prop="test" dg="b4419-f3">
	    <!--*
* material suppressed here by diff group b4419-fchoices *
*-->
	    If the <code>test</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is not present, then <termref def="key-null">absent</termref>;
	    otherwise an <compref ref="x"/> property record, as described in
	    section
	    <specref ref="declare-assertion"/>, with
	    <eltref ref="alternative"/> as the "host element"
	    and <att>test</att> as the designated expression <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>. <!--*
* material suppressed here by diff group b4419-fchoices *
*-->
	   </propmap>
	   
       <propmap comp="tac" prop="type definition">
The type definition <termref def="src-resolve">resolved</termref> to by the <termref def="key-vv">actual value</termref> of the <code>type</code>
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if one is present, otherwise the type definition corresponding
to the <code>complexType</code> or <code>simpleType</code> among the
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of the <eltref ref="alternative"/> element.
       </propmap>
       <propmap comp="tac" prop="annotations">
        The <termref def="key-am-one"/> of the <eltref ref="alternative"/> element,
        as defined in <specref ref="declare-annotation"/>.
       </propmap>
      </reprcomp>
     </reprdef>
     
    </div3>
    <div3 id="sec-src-ta">
     <head>Constraints on <phrase dg="b5159b">XML Representations of Type Alternatives</phrase><!--*
* material suppressed here by diff group b5159b *
*--></head>
     <constraintnote type="src" id="src-ta">
      <head><!--*
* material suppressed here by diff group cta-ta-2 *
*--><phrase dg="cta-ta-2">Type
	Alternative</phrase> Representation OK</head>
      <!--* MSM proposes reverting to mostly the status-quo text here.
          * Introducing the numbered list is nice, but for a moment I thought
          * the rule was saying the type alternative needs exactly one of
          * EACH item on the list, instead of one and only of the items on the 
          * list.  If we want to use the list, we need to work on the 
          * prose that introduces it.  (2008-03-25)
          *-->
      <p>In addition to the conditions imposed 
       on <eltref ref="alternative"/>
       element information items by the schema for schema<!--*
* material suppressed here by diff group b2067-2e *
*--><phrase dg="b2067-2e"> documents</phrase><!--*
* material suppressed here by diff group b5286b *
*--><phrase dg="b5286b">,
	every <eltref ref="alternative"/> element <rfc2119>must</rfc2119> have 
	<phrase dg="b5286d"> a <code>type</code>
         attribute, or a <code>complexType</code> child element, or a
         <code>simpleType</code> child element. <!--*
* material suppressed here by diff group b6014 *
*--><phrase dg="b6014">Each</phrase>
	 <eltref ref="alternative"/>
         element <!--*
* material suppressed here by diff group b6014 *
*--> 
	 <rfc2119>must</rfc2119> have <!--*
* material suppressed here by diff group b6014 *
*--> 
	 one <phrase dg="b6014">and only one</phrase> of these.</phrase></phrase>
       <!--*
* material suppressed here by diff group b5286b *
*-->
      </p>
     </constraintnote>
    </div3>
    <div3 id="sec-cvc-ta">
     <head>Type Alternative Validation Rules</head>
     <!--*
* material suppressed here by diff group b5003-en *
*-->
     <!--*
* material suppressed here by diff group b5003ab *
*-->
     <p><termdef id="key-cta-ta-select" term="successfully selects">A <!--*
* material suppressed here by diff group cta-ta *
*--><compref ref="tac" dg="cta-ta"/> <var>A</var>
      <term>successfully selects</term> a <compref ref="td"/> <var>T</var> for an
      element information item <var>E</var> if and only if <var>A</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><!--*
* material suppressed here by diff group cta-ta *
*--><propref prop="test" comp="tac" dg="cta-ta"/> evaluates to
      <code>true</code> and <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>A</var>.<!--*
* material suppressed here by diff group cta-ta *
*--><propref prop="type definition" comp="tac" dg="cta-ta"/> = <var>T</var></phrase>.</termdef>
      <phrase id="anchor6465"/>
      The <!--*
* material suppressed here by diff group cta-ta *
*--><propref prop="test" comp="tac" dg="cta-ta"/> is evaluated in the following way:<olist>
       <item id="hack0810-20"><p>
        An instance of the <bibref ref="bib-xdm"/> data model is constructed as
        follows: <olist>
         <item id="hack0810-21"><p>
          An information set is constructed by copying <!--*
* material suppressed here by diff group b5003 *
*-->
          <phrase dg="b5003">the base information set properties
           (and not any of the properties specific to <termref def="key-psvi">post-schema-validation infoset</termref>) of the following
           information items:</phrase>
          <olist dg="b5003">
           <item id="hack0810-22"><p>
            <var>E</var> itself.
           </p></item>
           <item><p>
            <var>E</var>'s <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> (but not its <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>).
           </p></item>
           <!--*
* material suppressed here by diff group b5003a *
*-->
           <!--*
* material suppressed here by diff group b5003a *
*-->
           <!--*
* material suppressed here by diff group b5003b *
*-->
           <item dg="b5003c"><p>
            <!--*
* material suppressed here by diff group b5003-en *
*-->
            <var>E</var>'s <propref role="psvi" ref="e-inherited_attributes"/> which do not
            have the same <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded names</xspecref> as any of <var>E</var>'s <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref>.
            They are copied as if they were among <var>E</var>'s <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> and had
            <var>E</var> as their <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">owner element</xpropref>.
            <phrase dg="b6465"> When an attribute with a non-empty
            <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">namespace name</xpropref> is copied, <termref def="term-ns-fixup"/> may need to be performed on the
            resulting information set to ensure that a prefix <var>P</var> is bound to
            the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">namespace name</xpropref> and the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">prefix</xpropref> of
            the copied attribute is set to <var>P</var>.</phrase>
           </p></item>
          </olist>
         </p></item>
         <item><p>
          An <bibref ref="bib-xdm"/> data model instance is constructed from
          that information set, following the rules given in
          <bibref ref="bib-xdm"/>.
         </p></item>
        </olist> 
       </p></item>
       <item><p>
	 The XPath expression<!--*
* material suppressed here by diff group cta-ta-2 *
*--> 
	 which is the value of the <propref prop="test" comp="tac"/>, is evaluated
	 as described in <specref ref="cvc-xpath"/>.
	 <phrase dg="b4419-4"> If a
	  <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-dynamic-error">dynamic error</loc> or a
	  <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-type-error">type error</loc> is raised during
	  evaluation, then the <propref prop="test" comp="tac"/> is <!--*
* material suppressed here by diff group wg20070803 *
*-->
	  <phrase dg="wg20070803">treated as if it had evaluated (without
	   error) to <code>false</code>.</phrase>
	 </phrase>
	</p>
	<note dg="b4419-4">
	 <p dg="wg20070803">
	  <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-dynamic-error">Dynamic errors</loc> and
	  <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-type-error">type errors</loc> in the evaluation of
	  <propref prop="test" comp="tac"/> expressions cause neither the schema nor the document instance to
	  be invalid. But conforming processors <rfc2119>may</rfc2119> issue a warning if they occur.
	 </p>	
	</note>
       </item>
      </olist></p>
      
     <note><p>
      <!--*
* material suppressed here by diff group b5003-en *
*-->
      As a consequence of the rules just given, the root node of the
      <bibref ref="bib-xdm"/> instance is necessarily constructed from
      <var>E</var><!--*
* material suppressed here by diff group b5003a *
*-->;
      the <phrase dg="b5003a">ancestors,</phrase>
      siblings, children, and descendants of <var>E</var> are
      not represented in the data model instance, and they are thus
      not accessible to the tests expressed in the <!--*
* material suppressed here by diff group cta-ta *
*--><propref prop="test" comp="tac" dg="cta-ta"/>s in the
      <propref prop="type table" comp="ed"/>.  The element <var>E</var><!--*
* material suppressed here by diff group b5003a *
*--> and <phrase dg="b5003a">its</phrase>
      <!--*
* material suppressed here by diff group b5003a *
*--> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> will be
      represented in the data model instance by nodes labeled as
      untyped.  If the <!--*
* material suppressed here by diff group cta-ta *
*--><propref prop="test" comp="tac" dg="cta-ta"/> expressions being evaluated include
      comparisons which require type information, then explicit casts
      will sometimes be necessary.
     </p></note>
    </div3>
    <div3 id="sec-sic-ta">
     <head>Type Alternative Information Set Contributions</head>
     <p>None<!--*
* material suppressed here by diff group cta-ta-2 *
*-->.</p>
    </div3>
    <div3 id="coss-ta">
     <head>Constraints on Type Alternative Schema Components</head>
     <p>All type alternatives (see <specref ref="cTypeAlternative"/>) <rfc2119>must</rfc2119>
      satisfy the following constraint<phrase dg="ep99">s</phrase>.</p>
     <constraintnote type="cos" id="ta-props-correct">
      <head>Type Alternative Properties Correct</head>
      <!--*
* material suppressed here by diff group b5003-en *
*-->
      <olist role="And">
       <item><p>
        The values of the properties of a type alternatives
        <!--*
* material suppressed here by diff group b5426-o *
*-->
        <phrase dg="b5426-o">are</phrase> as
        described in the property tableau in <specref ref="TA_details"/>,
        modulo the impact of <specref ref="conformance-missing"/>.
       </p></item>
       <!--*
* material suppressed here by diff group b5426 *
*-->
       <item dg="b5426" id="c-cta-static"><p>
        If the <!--*
* material suppressed here by diff group cta-ta *
*--><propref prop="test" comp="tac" dg="cta-ta"/> is not <termref def="key-null">absent</termref>, then it satisfies the constraint
        <specref ref="xpath-valid"/>.
	 <phrase dg="b5426w">The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-function-signature">function
	   signatures</loc> in the <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-static-context">static context</loc>
	  <rfc2119>must</rfc2119> include signatures for </phrase>
	 <olist role="all">
	  <item>
	   <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath-functions/#func-not">fn:not</loc><!--*
* material suppressed here by diff group b5003a *
*--> function<!--*
* material suppressed here by diff group b5003a *
*-->
	    defined in the <bibref ref="bib-fno"/> specification.
	   </p>
	  </item>
	  <item>
	   <p>Constructor functions for the built-in datatypes.</p>
	  </item>
	 </olist>
	 The further contents of <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-function-signature">function
	  signatures</loc> are <termref def="key-impl-defined">implementation-defined</termref>.
	</p></item>
      </olist>
      <p dg="b5426">
       A conforming processor <rfc2119>must</rfc2119> accept and process any XPath expression
       conforming to the "required subset" of <bibref ref="bib-xpath2"/> defined
       by the following grammar.
      </p>
      <note dg="b5426"><p>
       Any XPath expression valid according to <bibref ref="bib-xpath2"/> may
       appear in a conforming schema.  Conforming processors <rfc2119>may</rfc2119> but are not
       required to support XPath expressions not belonging to the required
       subset of XPath.
      </p></note>
      <p dg="b5426">
       An XPath expression belongs to the required subset of XPath if and only
       if <olist role="andtest">
        <item><p>
         The <propref comp="x" prop="expression"/> property of the
         <compref ref="x"/> is a valid XPath expression, as defined in
         <bibref ref="bib-xpath2"/>.
        </p></item>
        <item>
         <olist role="OoMtest">
          <item><p>
           It conforms to the following extended BNF:
           <scrap lang="ebnf" headstyle="show">
           <!--
 Test                 ::=  OrExpr
 OrExpr               ::=  AndExpr ( 'or' AndExpr )*
 AndExpr              ::=  BooleanExpr ( 'and' BooleanExpr )*
 BooleanExpr          ::=  QName? '(' OrExpr ')'
                        |  ValueExpr ( Comparator ValueExpr )?
 Comparator           ::=  '=' | '!=' | '<' | '<=' | '>' | '>='
 ValueExpr            ::=  CastExpr | ConstructorFunction 
 CastExpr             ::=  SimpleValue ('cast' 'as' QName "?"?)?
 SimpleValue          ::=  AttrName | Literal
 AttrName             ::=  '@' NameTest
 ConstructorFunction  ::=  QName '(' SimpleValue ')'
           -->
            <head>Test XPath expressions</head>
            <prod id="ta-Test">
             <lhs>Test</lhs>
             <rhs><nt def="ta-OrExpr">OrExpr</nt></rhs>
            </prod>
            <prod id="ta-OrExpr">
             <lhs>OrExpr</lhs>
             <rhs><nt def="ta-AndExpr">AndExpr</nt>
                  ( 'or' <nt def="ta-AndExpr">AndExpr</nt> )*</rhs>
            </prod>
            <prod id="ta-AndExpr">
             <lhs>AndExpr</lhs>
             <rhs><nt def="ta-BooleanExpr">BooleanExpr</nt>
                  ( 'and' <nt def="ta-BooleanExpr">BooleanExpr</nt> )*</rhs>
            </prod>
            <prod id="ta-BooleanExpr">
             <lhs>BooleanExpr</lhs>
             <!--*
* material suppressed here by diff group b5907 *
*-->
             <rhs dg="b5907">'(' <nt def="ta-OrExpr">OrExpr</nt> ')' |</rhs>
             <rhs dg="b5907"><nt def="ta-BooleanFunction">BooleanFunction</nt> |</rhs>
	      <rhs>
	       <nt def="ta-ValueExpr" dg="b5426w.b5907">ValueExpr</nt>
	       <!--*
* material suppressed here by diff group b5426w.b5907 *
*-->
	       ( <nt def="ta-Comparator">Comparator</nt>
	       <nt def="ta-ValueExpr" dg="b5426w.b5907">ValueExpr</nt>
	       <!--*
* material suppressed here by diff group b5426w.b5907 *
*--> )?</rhs>
            </prod>
            <prod id="ta-BooleanFunction" dg="b5907">
             <lhs>BooleanFunction</lhs>
             <rhs><xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#NT-QName">QName</xnt>
                  '(' <nt def="ta-OrExpr">OrExpr</nt> ')'</rhs>
            </prod>
            <prod id="ta-Comparator">
             <lhs>Comparator</lhs>
             <rhs>'=' | '!=' | '&lt;' | '&lt;=' | '&gt;' | '&gt;='</rhs>
            </prod>
	     <prod id="ta-ValueExpr">
	      <lhs>ValueExpr</lhs>
	      <rhs>
	       <!--*
* material suppressed here by diff group b5907 *
*-->
	       <nt def="ta-CastExpr" dg="b5907">CastExpr</nt>
	       <phrase dg="b5426w">|
		<nt def="ta-ConstructorFunction">ConstructorFunction</nt>
		</phrase>
	       <!--*
* material suppressed here by diff group b5003a *
*-->
	      </rhs>
	      <!-- <nt def="ta-SimpleValue">SimpleValue</nt></rhs> -->
	     </prod>
	     <prod id="ta-CastExpr">
	      <lhs>CastExpr</lhs>
	      <rhs>
	       <nt def="ta-SimpleValue">SimpleValue</nt>
	       <phrase dg="b5426w">
		( 'cast' 'as' QName '?'? )?
	       </phrase>
	      </rhs>
	      <!-- <nt def="ta-SimpleValue">SimpleValue</nt></rhs> -->
	     </prod>
            <prod id="ta-SimpleValue">
             <lhs>SimpleValue</lhs>
             <rhs><nt def="ta-AttrName" dg="b5003a">AttrName</nt>
                  <!--*
* material suppressed here by diff group b5003a *
*--> |
                  <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#doc-xpath-Literal">Literal</xnt></rhs>
            </prod>
            <prod id="ta-AttrName" dg="b5003a">
             <lhs>AttrName</lhs>
             <rhs>'@' <nt def="NameTest">NameTest</nt></rhs>
            </prod>
            <!--*
* material suppressed here by diff group b5003a *
*-->
            <!--*
* material suppressed here by diff group b5003a *
*-->
            <prod id="ta-ConstructorFunction" dg="b5426w">
             <lhs>ConstructorFunction</lhs>
             <rhs><xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#NT-QName">QName</xnt>
                  '(' <nt def="ta-SimpleValue">SimpleValue</nt> ')'</rhs>
            </prod>
            <!--*
* material suppressed here by diff group b5003a *
*-->
           </scrap>
           <!--*
* material suppressed here by diff group b5907-en *
*-->
          </p></item>
          <item><p>
           It is an XPath expression involving the <code>attribute</code> axis
           whose abbreviated form is as given above.
          </p></item>
         </olist>
         <note><p>
          For readability, <bibref ref="bib-xpath2"/> allows whitespace to be
          used between tokens in XPath expressions, even though this is not
          explicitly shown in the grammar. For details of whitespace handling,
          consult <bibref ref="bib-xpath2"/>.
         </p></note>
        </item>
        <!--*
* material suppressed here by diff group b5426w.b5003a *
*-->
        <!--*
* material suppressed here by diff group b5003a *
*-->
        <!--*
* material suppressed here by diff group b5003a *
*-->
        <!--*
* material suppressed here by diff group b5426w.b5003a *
*-->
        <item dg="b5426w.b5003a"><!--*
* material suppressed here by diff group b5907 *
*-->
  <p dg="b5907">
   Any strings matching the <nt def="ta-BooleanFunction">BooleanFunction</nt>
   production are function calls to <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath-functions/#func-not">fn:not</loc>
   defined in the <bibref ref="bib-fno"/> specification.
   Any strings matching the <nt def="ta-ConstructorFunction">ConstructorFunction</nt>
   production are function calls to constructor functions for the built-in
   datatypes.
  </p>
	 <note>
	  <p>The minimal content of the <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-function-signature">function
	   signatures</loc> in the <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-static-context">static context</loc>
	   is given in <clauseref ref="c-cta-static"/>
	   of <specref ref="ta-props-correct"/>:  <code>fn:not</code> and
	   constructors for the built-in datatypes.
	  </p>
	 </note>
  <note dg="b5907"><p>
   The above extended BNF is ambiguous. For example, the string
   "<code>a:b('123')</code>" has 2 paths in the grammar, by matching either
   <nt def="ta-BooleanFunction">BooleanFunction</nt> or
   <nt def="ta-ConstructorFunction">ConstructorFunction</nt>. The rules given
   here require different function names for the productions. As a result, the
   ambiguity can be resolved based on the function name.
  </p></note>
	</item>
        <item dg="b5426w"><p>
	  Any explicit casts (i.e. any strings which match
	  the optional <quote><code>cast as</code></quote> <emph>QName</emph> in the
	  <nt def="ta-CastExpr">CastExpr</nt> production)
	  are casts to built-in datatypes.
	 </p>
	</item>
       </olist>
      </p>
      <note dg="b5426"><p>
       Implementations <rfc2119>may</rfc2119> choose to support a bigger subset of
       <bibref ref="bib-xpath2"/>.
      </p></note>
      <note dg="b5426w">
       <p>The rule given above for the construction of the data model
	instance has as a consequence that even when implementations
	support full <bibref ref="bib-xpath2"/> expressions, it is not
	possible to refer successfully to the children, siblings,
	<phrase dg="b5003a">ancestors,</phrase> etc. of the element whose type is being selected.
       </p>
      </note>
     </constraintnote>
    </div3>
   </div2>
   
   <div2 id="cAssertions" dg="b2861cc-1">
    <head>Assertions</head>
    <p>Assertion components constrain the existence and values of related 
    elements and attributes.</p>
    <note role="example">
<eg xml:space="preserve">&lt;xs:assert test="@min le @max"/&gt;<!--*
* material suppressed here by diff group b2861cc-3 *
*--></eg>
     <p>The XML representation<!--*
* material suppressed here by diff group b2861cc-3 *
*--> 
      for <!--*
* material suppressed here by diff group b2861cc-3 *
*--> assertions.</p>
     <p dg="b2861cc-1a">The <eltref ref="assert"/> element requires that the 
     value of the <att>min</att> attribute be less than or equal to that of the
     <att>max</att> attribute, and fails if that is not the case.  
     <!--*
* material suppressed here by diff group b2861cc-3 *
*--></p>
    </note>
    <div3 id="Assertion_details">
     <head>The Assertion Schema Component</head>
     <p>The assertion schema component has the following properties:</p>

     <compdef name="Assertion" abbrev="as" showAKO="true"/>
     <!--* manual intervention may be needed to get the ids x and nb right.
         * At least for a few days.  I think the rule is:  while CTA is
         * status quo and 4419 is not, keep the real IDs "x" and "nb"
         * on the elements at line 6572 or so.  After 4419 goes live,
         * or for further 4419 work, put them here.
         *-->
     <microCompdef name="XPath Expression" abbrev="x" dg="b4419"/>
     <microCompdef name="Namespace Binding" abbrev="nb" dg="b4419"/>
     <!--*
* material suppressed here by diff group b2861cc-3 *
*-->

     <!--*
* material suppressed here by diff group b6314 *
*-->
     <!--*
* material suppressed here by diff group b6314 *
*-->
     <p><phrase dg="trimtree">To check an assertion, 
      an instance of the XPath 2.0 data
      model (<bibref ref="bib-xdm"/>) is constructed, in which the element
      information item being <termref def="key-va">assessed</termref>
      is the root element, and <!--*
* material suppressed here by diff group b4416 *
*--><phrase dg="b4416">
      elements and attributes are assigned types and values according to
      XPath 2.0 data model construction rules, with some exceptions. See
      <specref ref="cvc-assertion"/> for details about how the data model is
      constructed</phrase><!--*
* material suppressed here by diff group ttcommon *
*-->.</phrase>
      <!--*
* material suppressed here by diff group trimtree *
*--><phrase dg="trimtree">When evaluated against this data model 
      instance</phrase>, <propref comp="as" prop="test"/> evaluates to either 
      <code>true</code>
      or <code>false</code> (if any other value is returned, it's converted to
      either <code>true</code> or <code>false</code> as if by a call to the XPath
      <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath-functions/#func-boolean">fn:boolean</loc> function).</p>
     <p>See <specref ref="cAnnotations"/> for information on the role of
      the <propref comp="as" prop="annotations"/> property.</p>
    </div3>
    <div3 id="declare-assertion">
     <head><phrase dg="b5159b">XML Representation of Assertion Schema Components</phrase><!--*
* material suppressed here by diff group b5159b *
*--></head>
     <p>The XML representation for an assertion schema component 
      is <!--*
* material suppressed here by diff group b2861cc-3 *
*-->
      an <eltref ref="assert"/> <!--*
* material suppressed here by diff group b2861cc-3 *
*-->
      element information item.
      The correspondences between the properties of 
      <!--*
* material suppressed here by diff group cta-ta *
*-->
      <phrase dg="cta-ta">that information item</phrase> and
      properties of the component <!--*
* material suppressed here by diff group cta-ta *
*-->
      <phrase dg="cta-ta">it corresponds</phrase> to are as follows:</p>

     <reprdef dg="b5152-movement">
      <reprelt id="xr.assn0" eltname="assert" dg="b5152-movement"/>
      <!--*
* material suppressed here by diff group b2861cc-3.b5152-move *
*-->
     </reprdef>

     <p dg="b5152">The <eltref ref="assert"/> element
      maps to an <compref ref="as"/> component as follows.</p>
     <reprdef>
      <!--*
* material suppressed here by diff group b5152-movement *
*-->
      <!--*
* material suppressed here by diff group del-b2861cc-3.b5152-movement *
*-->

      <reprcomp id="xr.assn2" abstract="Assertion" ref="Assertion_details">
       <!--*
* material suppressed here by diff group b2861cc-3 *
*-->
       <!--*
* material suppressed here by diff group b4419 *
*-->

       <!--*
* material suppressed here by diff group b4419-f2 *
*-->

       <propmap comp="as" prop="test" dg="b4419-f3">
	<!--*
* material suppressed here by diff group b4419-fchoices *
*-->
	An <compref ref="x"/> property record, as described below,
	with <eltref ref="assert"/> as the "host element"
	and <att>test</att> as the designated expression <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>.
	<!--*
* material suppressed here by diff group b4419-fchoices *
*-->
	
       </propmap>

       <propmap comp="as" prop="annotations">
        <!--*
* material suppressed here by diff group bannotations-1 *
*-->
	<phrase dg="bannotations-2">
	 The <termref def="key-am-one"/> of the
	 <eltref ref="assert"/> <!--*
* material suppressed here by diff group b2861cc-3 *
*--> element,
	 <!--*
* material suppressed here by diff group b2861cc-3 *
*-->
	 as defined in <specref ref="declare-annotation"/>.
	</phrase>
       </propmap>
      </reprcomp>
     </reprdef>

     <p dg="b4419-f3">
      <!--*
* material suppressed here by diff group b4419-fchoices *
*-->
      Assertions, like identity constraints and conditional type 
      assignment, use <bibref ref="bib-xpath2"/> expressions.
      The expression itself is recorded, together with relevant parts
      of the context, in an <compref ref="x"/> property record.
      The mapping is as described below; in each case, the XPath
      expression itself is given in a <local>designated attribute</local> of
      the appropriate "<local>host element</local>".
     </p>
     <reprdef dg="b4419-f3">
       <reprcomp id="xr.assn3" ref="x" abstract="XPath Expression">
	<propmap comp="x" prop="namespace bindings">
	 A set of <compref ref="nb"/> property records. Each member
	 corresponds to an entry in the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">in-scope namespaces</xpropref> of
	 the host element, with
	 <propref comp="nb" prop="prefix"/> being the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.namespace">prefix</xpropref> 
	 and <propref comp="nb" prop="namespace"/> the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.namespace">namespace 
	  name</xpropref>.
	</propmap>
	<propmap comp="x" prop="default namespace">
	 Let <local>D</local> be the <termref def="key-vv">actual value</termref> of the
	 <code>xpathDefaultNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if
	 present<phrase dg="b4419-4"> on the host 
	  element</phrase>, otherwise that of the
	 <code><!--*
* material suppressed here by diff group b5274 *
*--><phrase dg="b5274">xp</phrase>athDefaultNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of
	 the <eltref ref="schema"/> ancestor. Then
	 the value is
	 <olist role="caseval">
	  <item>
	   <p role="if"><local>D</local> is
	    <code>##defaultNamespace</code></p>
	   <p role="then"><olist role="caseval">
	     <item>
	      <p role="if">there is an entry in the
	       <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">in-scope namespaces</xpropref> of the host element whose <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.namespace">prefix</xpropref> 
	       is <termref def="key-null">absent</termref></p>
	      <p role="then">the corresponding <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.namespace">namespace 
		name</xpropref>;</p>
	     </item>
	     <item>
	      <p role="otherwise"><termref def="key-null">absent</termref>;</p>
	     </item>
	    </olist></p>
	  </item>
	  <item>
	   <p role="if"><local>D</local> is
	    <code>##targetNamespace</code></p>
	   <p role="then"><olist role="caseval">
	     <item>
	      <p role="if">the <code>targetNamespace</code>
	       <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is present on the <eltref ref="schema"/>
	       ancestor</p>
	      <p role="then">its <termref def="key-vv">actual value</termref>;</p>
	     </item>
	     <item>
	      <p role="otherwise"><termref def="key-null">absent</termref>;</p>
	     </item>
	    </olist></p>
	  </item>
	  <item>
	   <p role="if"><local>D</local> is <code>##local</code></p>
	   <p role="then"><termref def="key-null">absent</termref>;</p>
	  </item>
	  <item>
	   <p role="otherwise">(<local>D</local> is an xs:anyURI
	    value) <local>D</local>.</p>
	  </item>
	 </olist>
	</propmap>
	<propmap comp="x" prop="base URI">
	 The <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">base
	  URI</xpropref> of the host element.
	</propmap>
	<propmap comp="x" prop="expression">
	 An XPath expression corresponding to the <termref def="key-vv">actual value</termref> of the
	 designated <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of the host element.
	</propmap>

       </reprcomp>
      </reprdef>
      <!--*
* material suppressed here by diff group b4419-fchoices *
*-->

     <note role="example">
<eg xml:space="preserve">&lt;xs:complexType name="intRange"&gt;
 &lt;xs:attribute name="min" type="xs:int"/&gt;
 &lt;xs:attribute name="max" type="xs:int"/&gt;
 &lt;xs:assert test="@min le @max"/&gt;
&lt;/xs:complexType&gt;</eg>
      <p>The value of the <code>min</code> attribute must be less than or equal to
       that of the <code>max</code> attribute.<phrase dg="b6804">
	Note that the attributes are validated before the assertion 
	on the parent element is checked, so the typed values of the attributes
	are available for comparison; it is not necessary to cast the values
	to <code>int</code> or some other numeric type before comparing them.
      </phrase></p>
     </note>
     <note role="example">
<eg xml:space="preserve">&lt;xs:complexType name="arrayType"&gt;
 &lt;xs:sequence&gt;
  &lt;xs:element name="entry" minOccurs="0" maxOccurs="unbounded"/&gt;
 &lt;/xs:sequence&gt;
 &lt;xs:attribute name="length" type="xs:int"/&gt;
 &lt;xs:assert test="@length eq fn:count(./entry)"/&gt;
&lt;/xs:complexType&gt;</eg>
      <p>The value of the <code>length</code> attribute must be the same as
       the number of occurrences of <code>entry</code> sub-elements.</p>
     </note>
    </div3>
    <div3 id="sec-src-assertion">
     <head>Constraints on <phrase dg="b5159b">XML Representations of Assertions</phrase><!--*
* material suppressed here by diff group b5159b *
*--></head>
     <!--*
* material suppressed here by diff group b5286 *
*-->
     <p dg="b5286">None<phrase dg="ep99"> as such</phrase>.</p>
    </div3>
    <div3 id="assertion-validation">
     <head>Assertion Validation Rules</head>
<div4 id="sec-cvc-assertion" dg="b5165a">
<head dg="b5165a">Assertion Satisfied</head>
     <constraintnote type="cvc" id="cvc-assertion">
      <head>Assertion Satisfied</head>
      <p><!--*
* material suppressed here by diff group trimtree *
*--><phrase dg="trimtree">An</phrase> element information item
	<phrase dg="b4416"><var>E</var></phrase> <!--*
* material suppressed here by diff group trimtree *
*--><phrase dg="trimtree">is</phrase> locally <termref def="key-vn">valid</termref> with respect to an
	assertion<phrase dg="b2861cc-3"><!--*
* material suppressed here by diff group trimtree *
*--><phrase dg="trimtree"> if
	  and only if</phrase> the <propref comp="as" prop="test"/><!--*
* material suppressed here by diff group b4416-3 *
*-->
	 evaluates to <code>true</code> (see below) without raising
	 any <phrase dg="b2861cc-7"><loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-dynamic-error">dynamic error</loc>
	  or</phrase> <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-type-error">type
	  error</loc>.</phrase>
       <!--*
* material suppressed here by diff group b2861cc-3 *
*-->
      </p>
      <p><!--* diff="del" dg="b4416-3" *-->
	Evaluation of <propref comp="as" prop="test"/> is performed as defined
	in <bibref ref="bib-xpath2"/>, with the following <!--*
* material suppressed here by diff group trimtree *
*--><phrase dg="trimtree">conditions</phrase>:</p>
       <olist>
	<!--*
* material suppressed here by diff group trimtree-x *
*-->

       <item id="c-buildxdm" dg="b4416"><!--* Assertion Satisifed 1 *-->
	 <!--* 4416 adopted August 2007 *-->
	<p><!--*
* material suppressed here by diff group b4416-3 *
*-->
	 <phrase dg="b4416-3">A</phrase> data model
	 instance <phrase dg="b4416-3">(see <bibref ref="bib-xdm"/>)
	  is</phrase> constructed in the following way:
	 <olist>
	  <item><!--* Assertion Satisfied 1.1 *-->
	   <p><!--*
* material suppressed here by diff group ep20 *
*--><var>E</var> is validated 
	    <!--*
* material suppressed here by diff group b4416-2 *
*-->
	    <phrase dg="b4416-2">with respect to its <termref def="key-governing-ed"/>, as defined
	     in <specref ref="cvc-elt"/>, if the <termref def="key-governing-ed"/> exists, otherwise 
	      <!--*
* material suppressed here by diff group ep99 *
*-->
	      against
	     its <termref def="key-governing-type-elem"/>, as defined in <specref ref="cvc-complex-type"/>,
	     except that for <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var></phrase> itself (though not for its element
	     information item descendents), <clauseref ref="c-as"/> 
	     <phrase dg="b4416-4">of <specref ref="cvc-complex-type"/></phrase>
	     is skipped. (Informally, <!--*
* material suppressed here by diff group ep99 *
*-->
	     the element is validated normally, 
	     except that assertions are not checked.)</phrase>
	   </p>
	   <note>
	    <p>It is a consequence of this rule that the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> and <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> 
	     of <var>E</var> will be validated in the usual way.</p>
	   </note>
	  </item>
	   <item id="c-as-partialpsvi"><!--* Assertion Satisfied 1.2 *-->
	   <p>A <quote>partial</quote> <termref def="key-psvi">post-schema-validation infoset</termref> describing the results 
	    of this partial validation
	    of <var>E</var> is constructed.  The <termref def="key-psvi">post-schema-validation infoset</termref> properties
	    of <var>E</var>'s <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> and <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> are defined in the
	    usual way.  On <!--*
* material suppressed here by diff group ep20 *
*--><phrase dg="ep20"><var>E</var></phrase> itself, all <termref def="key-psvi">post-schema-validation infoset</termref>
	    properties are supplied as described elsewhere in this specification
	    if their values are known.  The element's
	    <propref role="psvi" ref="e-validity"/> property is given
	    the value <pt>invalid</pt> if and only if the element is known
	    to be invalid; otherwise it is given the value <pt>notKnown</pt>.
	    The element's <propref role="psvi" ref="e-validation_attempted"/> property 
	    is given the value <pt>partial</pt>.</p>
	   <note>
	    <p>Since the assertions of its <termref def="key-governing-type-elem"/> have not been
	     checked, <var>E</var> has been only partially
	     validated, and can be known to be invalid, but not known to be
	     valid.  The values of the <propref role="psvi" ref="e-validity"/>
	     and <propref role="psvi" ref="e-validation_attempted"/> properties
	     are set accordingly.</p>
	   </note>
	  </item>
	  <item><!--* Assertion Satisfied 1.3 *-->
	    <p>From the <quote>partial</quote> <termref def="key-psvi">post-schema-validation infoset</termref>, a data model
	     instance is constructed as described in <bibref ref="bib-xdm"/>.
	     The root node of the <bibref ref="bib-xdm"/> instance is
	     constructed from <var>E</var>; the data model instance contains only
	     that node and nodes constructed from the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref>,
	     <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, and descendants of <var>E</var>.</p>
	    <note>
	     <p>It is a consequence of this construction that attempts
	      to refer, in an assertion, to the siblings or ancestors of
	      <var>E</var>, or to any part of the input document outside of <var>E</var>
	      itself, will be unsuccessful.
	      <phrase dg="b6009">Such attempted references
	      are not in themselves errors, but the data model instance
	      used to evaluate them does not include any representation
	      of any parts of the document outside of <var>E</var>, so they
	      cannot be referred to.</phrase>
	     </p>
	    </note>
	   </item>
	  <!--*
* material suppressed here by diff group b4416-wrap..b5030tf.del *
*-->
	 </olist>
	</p>
       </item>
	<item dg="b4416-wrap"><!--* Assertion Satisfied 2 *-->
	 <p>
	  <!--*
* material suppressed here by diff group b4416-x *
*--> <phrase dg="b4416-4">The XPath expression <propref comp="as" prop="test"/> is evaluated, following the rules
	   given in <specref ref="cvc-xpath"/>, with the <!--*
* material suppressed here by diff group b5030tf *
*-->
	   <phrase dg="b5030tf">following
	    conditions and modifications:</phrase></phrase>
	  <olist dg="b5030tf">
	   <item><!--* Assertion Satisfied 2.1 *-->
	    <p>The root node of the <bibref ref="bib-xdm"/> instance
	     described in <clauseref ref="c-buildxdm"/> serves as the <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-context-node">context 
	      node</xtermref> for evaluation of the XPath
	     expression.</p>
	   </item>
	   <item dg="b5030tf"><!--* Assertion Satisfied 2.2 *-->
	    <p>The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-static-context">static context</xtermref>
	     is augmented with the variable <quote><code>$value</code></quote>,
	     as described in
	     <specref ref="as-props-correct"/>.
	    </p>
	   </item>
	   <item><p><!--* Assertion Satisfied 2.3 was 2.2 *-->
	    The variable <quote><code>$value</code></quote> appears as a member
	    of the <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-variable-values">variable values</loc> in
	    the <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-dynamic-context">dynamic context</loc>.  The
	    <code>expanded QName</code> of that member has no namespace URI and has
		   <quote><code>value</code></quote> as the local name.
	    The <code>value</code> of the member is determined by <olist role="caseval">
	     <item><p role="if">
	     <olist role="andtest">
	      <item><p>
		<var>E</var>'s <propref role="psvi" ref="e-validity"/> in the <quote>partial</quote>
		<termref def="key-psvi">post-schema-validation infoset</termref> is not <pt>invalid</pt>;
	       </p></item>
	      <item><p>
		<var>E</var>'s <propref ref="e-nil" role="psvi"/> in the <quote>partial</quote> <termref def="key-psvi">post-schema-validation infoset</termref>
		does not exist or has value <pt>false</pt>;
	       </p></item>
	      <item><p>
		the <propref comp="ctd" prop="content type"/> of <var>E</var>'s <termref def="key-governing-type-elem"/>
		has <propref comp="ct" prop="variety"/> <pt>simple</pt>,
	       </p></item>
	     </olist> 
	     </p><p role="then">
	 the <code>value</code> is the 
		<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-xdmrep">XDM representation</xtermref> of
		<var>E</var>.<propref ref="e-schema_actual_value" role="psvi"/>
		under the <propref comp="ctd" prop="content type"/> 
		. <propref comp="ct" prop="simple type definition"/> 
		of <var>E</var>'s <termref def="key-governing-type-elem"/>.
	    </p>
	    <note><p>
	      This clause provides type information to simple contents
	      of elements, to make type-aware comparisons and
	      operations possible without explicit casting in the
	      XPath expressions.
	     </p></note>
	    <note dg="b5030tf">
	     <p>For complex types with simple content, the element node
	      may be referred to as <quote><code>.</code></quote>, while
	      its content may be referred to as
	      <quote><code>$value</code></quote>. Since the element node,
	      as a consequence of <clauseref ref="c-as-partialpsvi"/>, will normally have the type
	      annotation <code>anyType</code>, its <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-atomization">atomized</xtermref> 
	      value will be a single atomic value of type
	      <code>untypedAtomic</code>. By contrast,
	      <code>$value</code> will be a sequence of one or more
	      atomic values, whose types are the most specific
	      (narrowest) built-in types available.</p>
	    </note>
	   </item>
	   <item>
	    <p role="otherwise">(in the <quote>partial</quote> <termref def="key-psvi">post-schema-validation infoset</termref>,
	     <var>E</var>.<propref role="psvi" ref="e-validity"/> = <pt>invalid</pt> 
	     or 
	     <var>E</var>.<propref role="psvi" ref="e-nil"/> = <pt>true</pt> 
	     or 
	     <var>E</var>'s <termref def="key-governing-type-elem"/> does not have 
	     <propref comp="ctd" prop="content type"/>
	     . <propref comp="ct" prop="variety"/> = <pt>simple</pt>)
	     the <code>value</code> is the empty sequence.
	    </p>
	   </item>
	    </olist>
	   </p></item>
	  </olist>
	 </p>
	 
	</item>
	
<!--* temporary holder for old 1.4 with mods *-->

       <item><!--* Assertion Satisifed 3 *-->
	<p><!--*
* material suppressed here by diff group b4416-3 *
*-->
	 <phrase dg="b4416-3">The evaluation result</phrase>
	 is converted to either <code>true</code>
	 or <code>false</code> as if by a call to the XPath
	 <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath-functions/#func-boolean">fn:boolean</loc> function.</p>
       </item>
       
	<!--*
* material suppressed here by diff group trimtree *
*-->
       </olist>
      </constraintnote>
     <note dg="b4416-1"><p>
       Although the <!--*
* material suppressed here by diff group b4416-4 *
*--> rules 
       <phrase dg="b4416-4">just given</phrase> describe 
       how an <termref def="key-psvi">post-schema-validation infoset</termref> and a <bibref ref="bib-xdm"/>
       instance are constructed, processors are not required 
       to <!--*
* material suppressed here by diff group b4416-4 *
*--> construct
       <!--*
* material suppressed here by diff group b4416-4 *
*--><phrase dg="b4416-4">actual data structures representing them</phrase>. 
       However, the result of XPath evaluation <rfc2119>must</rfc2119> be the same as if such
       <termref def="key-psvi">post-schema-validation infoset</termref> and <bibref ref="bib-xdm"/> instance 
       <phrase dg="b4416-4">data structures</phrase> were 
       constructed.
      </p></note>

     <!--*
* material suppressed here by diff group b4416-1 *
*-->
     </div4>
<div4 id="sec-cvc-xpath" dg="b5165a">
<head dg="b5165a">XPath Evaluation</head>

     <constraintnote type="cvc" id="cvc-xpath" dg="b4416-3">
      <head>XPath Evaluation</head>
      <p>An <compref ref="x"/> property record <var>X</var>, with a context node <var>E</var>,
       is evaluated as defined in <bibref ref="bib-xpath2"/><phrase dg="b4419">, 
	<phrase dg="b5030tf-x">with <phrase dg="b4419-4">a 
	 <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-static-context">static context</loc>
	 as described in <specref ref="xpath-valid"/>
	<phrase dg="b5030tf">(unless otherwise specified
	elsewhere)</phrase>
	 and</phrase></phrase> with the following
	<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-dynamic-context">dynamic context</loc><phrase dg="b5030tf">
	(again, unless otherwise specified
	elsewhere)</phrase>: 
       </phrase><olist dg="b4419">
        <item>
         <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-context-item">context item</loc> is
	     <!--*
* material suppressed here by diff group b4419-4 *
*--><phrase dg="b4419-4"><var>E</var></phrase>.</p>
        </item>
        <item>
         <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-context-position">context position</loc>
          is 1.</p>
        </item>
        <item>
         <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-context-size">context size</loc> is
          1.</p>
        </item>
        <item>
         <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-variable-values">variable values</loc> is
          the empty set.</p>
        </item>
        <item>
         <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-function-implementation">function
          implementations</loc> include an implementation of every function
          in <phrase dg="b4419-4">the</phrase>
	  <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-function-signature">function
          signatures</loc><phrase dg="b4419-4"> of the
	   <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-static-context">static context</loc></phrase>. 
	  See <specref ref="xpath-valid"/>.</p>
        </item>
        <item>
         <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-date-time">current dateTime</loc> is
          <termref def="key-impl-defined">implementation-defined</termref>, but is constant during an
          <termref def="key-va"/> episode.</p>
        </item>
        <item>
         <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-timezone">implicit timezone</loc> is
          <termref def="key-impl-defined">implementation-defined</termref>, but is constant during an
          <termref def="key-va"/> episode.</p>
        </item>
        <item>
         <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-available-docs">available documents</loc> is
          <!--*
* material suppressed here by diff group wg20070803 *
*-->
	         <phrase dg="wg20070803">the empty set.</phrase></p>
        </item>
        <item>
         <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-available-collections">available collections</loc> is
          <phrase id="anchor6540"/>
          <!--*
* material suppressed here by diff group b6540 *
*-->
          <phrase dg="b6540">the empty set.</phrase></p>
        </item>
        <item>
         <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-default-collection">default collection</loc> is
          <!--*
* material suppressed here by diff group b6540 *
*-->
          <phrase dg="b6540">the empty sequence.</phrase></p>
        </item>
       </olist>

       <!--* An earlier draft for handling pD in Assertions.
        <item diff="add" dg="b2861cc-6"><p>
        If a node's <loc href="&xdm;#ElementNode">type-name</loc>
        identifies <xtermref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#precisionDecimal">precisionDecimal</xtermref>
        or a type derived from it, then during XPath evaluation, this node
        is treated as if the <loc href="&xdm;#ElementNode">type-name</loc>
        was <code>xs:decimal</code> (see <xtermref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#decimal">decimal</xtermref>)
        and the <loc href="&xdm;#ElementNode">typed-value</loc>
        was the <xtermref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#vp-pd-numVal">numericalValue</xtermref>
        of the <xtermref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#precisionDecimal">precisionDecimal</xtermref>
        value, unless the <xtermref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#vp-pd-numVal">numericalValue</xtermref>
        is not a decimal number<phrase diff="add" dg="b4416-2"> (for example,
        it is <local>positiveInfinity</local>, <local>negativeInfinity</local>,
        or <local>notANumber</local>)</phrase>, in which case this node is treated as if the
        <loc href="&xdm;#ElementNode">type-name</loc>
        was <code>xs:float</code> (see <xtermref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#float">float</xtermref>)
        and the <loc href="&xdm;#ElementNode">typed-value</loc>
        was a <xtermref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#float">float</xtermref> value
        corresponding to the <xtermref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#vp-pd-numVal">numericalValue</xtermref>.
       </p></item> *-->
       <!--*
* material suppressed here by diff group b4419-x *
*-->
      </p>
     </constraintnote>

     <note dg="b2861cc-6">
      <p><bibref ref="bib-xpath2"/> does not currently <!--*
* material suppressed here by diff group b4416-4 *
*--><phrase dg="b4416-4">require support
	for the</phrase> 
       <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#precisionDecimal">precisionDecimal</xtermref><phrase dg="b4416-4"> datatype</phrase>,
       but conforming XPath processors are allowed to support additional primitive
       data types, including precisionDecimal. 
       <!--*
* material suppressed here by diff group b4416-4 *
*-->       
      </p>
      <p dg="b4416-4">
       For interoperability, it is recommended that XPath processors
       intending to support precisionDecimal as an additional
       primitive data type follow the recommendations in <bibref ref="bib-chamberlin-2006"/>.  If the XPath processor used to
       evaluate XPath expressions supports precisionDecimal, then any
       precisionDecimal values in the <termref def="key-psvi">post-schema-validation infoset</termref> <rfc2119>should</rfc2119> be labeled as
       <code>xs:precisionDecimal</code> in the data model instance
       and handled accordingly in XPath.
      </p>

      <p>
       If the XPath processor does not support precisionDecimal, 
       <!--*
* material suppressed here by diff group b4416-4 *
*--> 
       <phrase dg="b4416-4">then any precisionDecimal
	values in the <termref def="key-psvi">post-schema-validation infoset</termref> <rfc2119>should</rfc2119> be mapped into</phrase> 
       <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#decimal">decimal</xtermref>, unless the
       <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#vp-pd-numVal">numericalValue</xtermref> 
       is not a decimal number (for example, it is
       <local>positiveInfinity</local>,
       <local>negativeInfinity</local>, or <local>notANumber</local>),
       in which case 
       <!--*
* material suppressed here by diff group b4416-4 *
*-->
       <phrase dg="b4416-4">they <rfc2119>should</rfc2119> be mapped to</phrase>
       <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#float">float</xtermref>.
       <!--*
* material suppressed here by diff group b4416-4 *
*-->
       <phrase dg="b4416-4">
	Whether this is done by altering the type information in the
	partial <termref def="key-psvi">post-schema-validation infoset</termref>, or by altering the usual rules for mapping
	from a <termref def="key-psvi">post-schema-validation infoset</termref> to an <bibref ref="bib-xdm"/> data model instance,
	or by treating precisionDecimal as an unknown type which is
	coerced as appropriate into decimal or float by the XPath
	processor, is <termref def="key-impl-defined">implementation-defined</termref> and out of scope for this 
	specification.
       </phrase>
      </p>
      <p>As a consequence of the above variability, it is possible
       that XPath expressions that perform various kinds of type
       introspections will produce different results when different
       XPath processors are used. If the schema author wishes to
       ensure interoperable results, such introspections will need to
       be avoided.</p>
     </note>

     <!--*
     <ednote diff="add" dg="b2861cc-6"><edtext>
       Do we need to make the above "use decimal/float instead" more
       formal? Do we need to worry that pD allows "+INF" and
       float/double don't? We could say, for example, that
       precisionDecimal values should be mapped onto a union of
       <code>xs:decimal</code> and <code>xs:float</code> (or onto a
       union of <code>xs:decimal</code>, <code>xs:float</code>, and
       an <code>xs:string</code> enumeration containing
       <quote><code>+INF</code></quote>).  We could specify that the
       target value is found by mapping from the lexical
       representation of the precisionDecimal value into this union.
       Or we could specify a mapping from
       <code>xs:precisionDecimal</code> values to
       <code>xs:decimal</code> or <code>xs:float</code> values. The
       current draft does not attempt more precision because such
       precision seems out of place given that the precise mechanisms
       to be used are implementation-defined.
      </edtext></ednote>
     <ednote diff="add" dg="b4416"><edtext>
       Need to change part 2 to remove "values from different primitive value spaces
       are incomparable".
      </edtext></ednote>
     *-->
     </div4>
    </div3>
    <div3 id="sec-sic-assertion">
     <head>Assertion Information Set Contributions</head>
     <p>None<phrase dg="ep99"> as such</phrase>.</p>
    </div3>
    <div3 id="coss-assertion">
     <head>Constraints on Assertion Schema Components</head>
     <p>All assertions (see <specref ref="cAssertions"/>) <rfc2119>must</rfc2119>
      satisfy the following constraints.</p>
     <div4 id="sec-as-props-correct" dg="b5165a">
      <head dg="b5165a">Assertion Properties Correct</head>
      <constraintnote type="cos" id="as-props-correct">
       <head>Assertion Properties Correct</head>
       <!--*
* material suppressed here by diff group b5426-o *
*-->   
       <olist role="And" dg="b5426-o">
	<item><p>
	  The values of the properties of an assertion are as
	  described in the property tableau in <specref ref="Assertion_details"/>,
	  modulo the impact of <specref ref="conformance-missing"/>.
	 </p></item>
	<item><p><phrase id="anchor6541"/>
	  The <propref comp="as" prop="test"/> satisfies the constraint
	  <!--*
* material suppressed here by diff group b5426 *
*-->
	  <specref ref="xpath-valid" dg="b5426"/><phrase dg="b5030tf">,
	  <!--*
* material suppressed here by diff group b6541 *
*--></phrase><!--*
* material suppressed here by diff group b6541 *
*-->
	 <phrase dg="b6541">with the following modifications to the
	 <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-static-context">static context</xspecref>:</phrase>
	 <olist dg="b6541">
	  <item><p>
	   The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-in-scope-variables">in-scope variables</loc>
	   is a set with a single member. The <code>expanded QName</code> of that
	   member has no namespace URI and has <code>value</code> as the local
	   name. The (static) <code>type</code> of the member is
	   <code>anyAtomicType*</code>.
	  </p></item>
	  <item><p>
	   The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-function-signature">function signatures</loc>
	   includes signatures for	<olist role="all">
	    <item><p>
	     Functions in the <code>http://www.w3.org/2005/xpath-functions</code>
	     namespace as defined in the <bibref ref="bib-fno"/> specification.
	    </p></item>
	    <item><p>
	     Constructor functions for the built-in datatypes.
	    </p></item>
	   </olist>
	  </p></item>
	 </olist>
	</p>
   <note dg="b5030tf">
    <p>The XDM type label <code>anyAtomicType*</code> simply says
     that for static typing purposes the variable <code>$value</code>
     will have a value consisting of a sequence of zero or more
     atomic values.</p>
	  </note>
	 </item>
       </olist>
      </constraintnote>
     </div4>
<!--*
* material suppressed here by diff group b5426 *
*-->
<div4 id="sec-xpath-valid" dg="b5165a">
<head dg="b5165a">XPath Valid</head>

     <constraintnote type="cos" id="xpath-valid" dg="b4419">
      <head>XPath Valid</head>
      <p>For an <compref ref="x"/> property record <phrase dg="ep24"><var>X</var></phrase>
	to be valid,
       <olist role="and">
        <item><p>
	  The <propref comp="x" prop="expression"/> of <var>X</var> <phrase dg="b4419-4">is</phrase> a valid XPath
	  expression, as defined in <bibref ref="bib-xpath2" dg="f2f0701a"/>.
	 </p></item>
        <item><p>
	  <var>X</var> does not produce any <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-static-error">static
	   error</loc>, under the following conditions<phrase dg="b5030tf">
	    (except as specified elsewhere)</phrase>:<olist>
	   <item><p>
	     The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-xpath-static-typing-feature">Static Typing
	      Feature</loc> is disabled.
	    </p></item>
	   <item><p>
	     The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-static-context">static context</loc> is
	     given as follows:
	     <olist>
	      <item>
	       <p><loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-xpath-compat-mode">XPath 1.0
		 compatibility mode</loc> is <pt>false</pt>.</p>
	      </item>
	      <item>
	       <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-static-namespaces">statically
		 known namespaces</loc> is the <!--*
* material suppressed here by diff group wd-200708-1 *
*-->
		<propref comp="x" prop="namespace bindings" dg="wd-200708-1"/> of <var>X</var>.</p>
	      </item>
	      <item>
	       <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-def-elemtype-ns">default element/type
		 namespace</loc> is the <propref comp="x" prop="default namespace"/>
		of <var>X</var>.</p>
	      </item>
	      <item>
	       <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-def-fn-ns">default function
		 namespace</loc> is <code>http://www.w3.org/2005/xpath-functions</code>.</p>
	      </item>
	      <item>
	       <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-issd">in-scope schema definitions</loc>
		are those components that are present in every schema by definition,
		as defined in <specref ref="builtin-ads"/>,
		<specref ref="builtin-ctd"/> and <specref ref="builtin-stds"/>.</p>
	      </item>
	      <item>
	       <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-in-scope-variables">in-scope variables</loc>
		is the empty set.</p>
	      </item>
	      <item>
	       <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-context-item-static-type">context item
		 static type</loc> is not applicable, because the
		<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-xpath-static-typing-feature">Static Typing
		 Feature</loc> is disabled.</p>
	      </item>
	      <item>
	       <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-function-signature">function
		 signatures</loc> are <termref def="key-impl-defined">implementation-defined</termref>.<!--*
* material suppressed here by diff group b6541 *
*-->
	       </p>
		<note dg="b6541"><p>
		  If <var>X</var> belongs to an <compref ref="as"/> or a <compref ref="tac"/>,
		  <specref ref="as-props-correct"/> and <specref ref="ta-props-correct"/>
		  impose additional constraints on the set of required functions.
		 </p></note>
	      </item>
	      <item>
	       <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-static-collations">statically known
		 collations</loc> are <termref def="key-impl-defined">implementation-defined</termref>, but always include the
		<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xquery-operators/#collations">Unicode 
		 codepoint collation</loc>
		(<code>http://www.w3.org/2005/xpath-functions/collation/codepoint</code>)
		defined by <bibref ref="bib-fno"/>.</p>
	      </item>
	      <item><p>
		The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-def-collation">default collation</loc>
		is the Unicode codepoint collation.
	       </p></item>
	      <item>
	       <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-base-uri">base URI</loc> is the
		<propref comp="x" prop="base URI"/> of <var>X</var>.</p>
	      </item>
	      <item>
	       <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-known-docs">statically known
	        documents</loc> is <!--*
* material suppressed here by diff group wg20070803 *
*-->
	        <phrase dg="wg20070803">the empty set.</phrase></p>
	       
	      </item>
	      <item>
	       <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-known-collections">statically known
		 collections</loc> is <termref def="key-impl-defined">implementation-defined</termref>.</p>
	      </item>
	      <item>
	       <p>The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-known-default-collection">statically
		 known default collection type</loc> is <termref def="key-impl-defined">implementation-defined</termref>.</p>
	      </item>
	     </olist>
	    </p></item>
	  </olist>
	 </p></item>
       </olist></p>
     </constraintnote>
     </div4>
     
    </div3>
   </div2>
   <div2 id="cNotation_Declarations">
    <head>Notation Declarations</head>
    <p>Notation declarations reconstruct XML<!--*
* material suppressed here by diff group fpwd *
*--> NOTATION declarations.</p>
    <note role="example">
     <eg xml:space="preserve">&lt;xs:notation name="jpeg" public="image/jpeg" system="viewer.exe"<!--*
* material suppressed here by diff group ep99 *
*-->&gt;</eg>
     <p>The XML representation of a notation declaration.</p>
    </note>
    <div3 id="Notation_Declaration_details">
     <head>The Notation Declaration Schema Component</head>
    <p>The notation declaration schema component has the following
properties:</p>

  <compdef name="Notation Declaration" abbrev="nd" showAKO="true"/>
    <p>Notation declarations do not participate in <termref def="key-vn">validation</termref> as such. They are referenced in the
course of <termref def="key-vn">validating</termref> strings as
members of the <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#NOTATION">NOTATION</xtermref> simple type. <phrase dg="b3054">An element or attribute information item with
its <termref def="key-governing"/> type definition or its
<termref def="a-key-amt">actual member type definition</termref>
derived from the <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#NOTATION">NOTATION</xtermref>
simple type is <termref def="key-vn">valid</termref> only if its
value was among the enumerations of such simple type.
As a consequence such a value is required to be the
<propref comp="nd" prop="name"/>
of a notation declaration.</phrase></p>
     <p>See <specref ref="cAnnotations"/> for information on the role of the
<propref comp="nd" prop="annotations"/> property.</p>
    </div3>
<div3 id="declare-notation">
<head><phrase dg="b5159b">XML Representation of Notation Declaration Schema Components</phrase><!--*
* material suppressed here by diff group b5159b *
*--></head>
<p>The XML representation for a notation declaration schema component is
a
<eltref ref="notation"/>
element information item.    The correspondences between the
properties of that information item and
properties of the component it corresponds to are as follows:</p>
 <!--*
* material suppressed here by diff group b5152-movement *
*-->

     <reprdef dg="b5152-movement">
      <reprelt id="xr.notn0" dg="b5152-movement" eltname="notation"/>
     </reprdef>
     <p dg="b5152">The <eltref ref="notation"/> element
      maps to a <compref ref="nd"/> component as follows.</p>
     <reprdef dg="b5152-movement">
      <reprcomp id="xr.notn1" dg="b5152-movement" abstract="Notation Declaration" ref="Notation_Declaration_details">
       <propmap comp="nd" prop="name">The <termref def="key-vv">actual value</termref> of the
	<code>name</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref></propmap>
       <propmap comp="nd" prop="target namespace">The <termref def="key-vv">actual value</termref> of the
	<code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of the <!--*
* material suppressed here by diff group b5148 *
*-->
 <phrase dg="b5148"><eltref ref="schema"/> <!--*
* material suppressed here by diff group cleanup-1 *
*--><phrase dg="cleanup-1">ancestor</phrase></phrase>
	element information item<phrase dg="b5148"> if present, otherwise <termref def="key-null">absent</termref></phrase>.</propmap>
       <propmap comp="nd" prop="system identifier">The <termref def="key-vv">actual value</termref> of the <code>system</code>
	<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise <termref def="key-null">absent</termref>.</propmap>
       <propmap comp="nd" prop="public identifier">The <termref def="key-vv">actual value</termref> of the <code>public</code>
	<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref><phrase dg="cleanup-3">, if present, otherwise <termref def="key-null">absent</termref>.</phrase></propmap>
       <propmap comp="nd" prop="annotations"><!--*
* material suppressed here by diff group bannotations-1 *
*-->
	<phrase dg="bannotations-2">
	 The <termref def="key-am-one"/> of the
	 <eltref ref="notation"/> element,
	 as defined in <specref ref="declare-annotation"/>.
	</phrase>
       </propmap>
      </reprcomp>
     </reprdef>
<note role="example">
<eg xml:space="preserve">&lt;xs:notation name="jpeg"
             public="image/jpeg" system="viewer.exe" /&gt;

&lt;xs:element name="picture"&gt;
 &lt;xs:complexType&gt;
  &lt;xs:simpleContent&gt;
   &lt;xs:extension base="xs:hexBinary"&gt;
    &lt;xs:attribute name="pictype"&gt;
     &lt;xs:simpleType&gt;
      &lt;xs:restriction base="xs:NOTATION"&gt;
       &lt;xs:enumeration value="jpeg"/&gt;
       &lt;xs:enumeration value="png"/&gt;
       . . .
      &lt;/xs:restriction&gt;
     &lt;/xs:simpleType&gt;
    &lt;/xs:attribute&gt;
   &lt;/xs:extension&gt;
  &lt;/xs:simpleContent&gt;
 &lt;/xs:complexType&gt;
&lt;/xs:element&gt;

&lt;picture pictype="jpeg"&gt;...&lt;/picture&gt;</eg>

</note>
</div3>
    <div3 id="sec-src-notation">
     <head>Constraints on <phrase dg="b5159b">XML Representations of Notation Declarations</phrase><!--*
* material suppressed here by diff group b5159b *
*--></head>
 <!--*
* material suppressed here by diff group b5286 *
*-->
     <p dg="b5286">None<phrase dg="ep99"> as such</phrase>.</p>
    </div3>
    <div3 id="sec-cvc-notation">
     <head>Notation Declaration Validation Rules</head>
     <p>None<phrase dg="ep99"> as such</phrase>.</p>
    </div3>
    <div3 id="sec-sic-notation">
     <head>Notation Declaration Information Set Contributions</head>
    <constraintnote id="sic-notation-used" type="sic">
     <head>Validated with Notation</head>
     <p>Whenever an attribute information item is <termref def="key-vn">valid</termref> with respect to a <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#NOTATION">NOTATION</xtermref>, in the <termref def="key-psvi">post-schema-validation infoset</termref> its
parent element information item <!--*
* material suppressed here by diff group rq144nv *
*--><phrase dg="rq144nv">has the following
properties</phrase>:</p>

<proplist item="element" role="psvi">
<propdef id="e-notation" name="notation">An <termref def="key-iso">item isomorphic</termref> to the notation declaration
<!--*
* material suppressed here by diff group b5286b *
*-->
<phrase dg="b5286b"><termref def="cvc-resolve-instance">resolved</termref> to by</phrase> the
attribute item's <termref def="key-vv">actual value</termref></propdef>

<propdef id="e-notation_system" name="notation system" dg="rq144nv">The value of the <propref comp="nd" prop="system identifier"/> of that notation
declaration.</propdef>
<propdef id="e-notation_public" name="notation public" dg="rq144nv">The value of the <propref comp="nd" prop="public identifier"/> of that notation
declaration.</propdef>

</proplist>

     <!--*
* material suppressed here by diff group rq144nv *
*-->
     <!--*
* material suppressed here by diff group rq144nv *
*-->
     <note>
      <p>For compatibility, only one such attribute <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals"><rfc2119>should</rfc2119></phrase> appear
on any given element.  If more than one such attribute
<emph>does</emph> appear, which one supplies the infoset property or
properties above is not defined.</p>
     </note>
    </constraintnote>
<note dg="b3054">
<p>Element as well as attribute information items may be <termref def="key-vn">valid</termref> with respect to a <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#NOTATION">NOTATION</xtermref>, but only attribute
information items cause a notation declaration to appear in the
<termref def="key-psvi">post-schema-validation infoset</termref> as a property of their parent.</p>
</note>
    </div3>

    <div3 id="coss-notation">
     <head>Constraints on Notation Declaration Schema Components</head>
     <p>All notation declarations (see <specref ref="cNotation_Declarations"/>) <rfc2119>must</rfc2119> satisfy the following
      constraint.</p>
     <constraintnote type="cos" id="n-props-correct">
      <head>Notation Declaration Correct</head>
      <p>The values of the properties of a notation declaration <rfc2119>must</rfc2119>
       be as described in the property tableau in
       <specref ref="Notation_Declaration_details"/>, modulo the impact of
       <specref ref="conformance-missing"/>.</p>   
     </constraintnote>
    </div3>

   </div2>

   <div2 id="cAnnotations">
    <head>Annotations</head>
    <p>Annotations provide for human- and machine-targeted annotations of
schema components.</p>
    <note role="example">
      <eg xml:space="preserve">&lt;xs:simpleType fn:note="special"&gt;
  &lt;xs:annotation&gt;
   &lt;xs:documentation&gt;A type for experts only&lt;/xs:documentation&gt;
   &lt;xs:appinfo&gt;
    &lt;fn:specialHandling&gt;checkForPrimes&lt;/fn:specialHandling&gt;
   &lt;/xs:appinfo&gt;
  &lt;/xs:annotation&gt;
     </eg>
      <p>XML representations of three kinds of annotation.</p>
     </note>
<div3 id="Annotation_details">
     <head>The Annotation Schema Component</head>
    <p>The annotation schema component has the following
properties:</p>
<compdef name="Annotation" abbrev="a" showAKO="true"/>
    <p><propref comp="a" prop="user information"/> is intended for human consumption,
<propref comp="a" prop="application information"/> for automatic processing.  In both
cases, provision is made for an optional URI reference to supplement the local
information, as the value of the <code>source</code> attribute of the
respective element information items.  <termref def="key-vn">validation</termref> does <emph>not</emph> involve dereferencing these URIs, when present.  In the case of <propref comp="a" prop="user information"/>, indication <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals"><rfc2119>should</rfc2119></phrase> be given as to the identity of the (human) language used in the contents, using the <code>xml:lang</code> attribute.</p>
     <p><propref comp="a" prop="attributes"/> ensures that when schema authors take
advantage of the provision for adding attributes from namespaces other than the
<!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> namespace to schema documents, they are available within the components
corresponding to the element items where such attributes appear.</p>
<!--* <issue id="RQ-19i" role="1.1">
< ! - - * <p><loc href="&reqs;#annotation-psvi" target="reqs">RQ-19 (annotation-psvi)</loc></p> * - - >
<p><loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=2851" target="reqs"
>Issue 2851 (RQ-19 annotations in PSVI)</loc></p>
<p>Out-of-band attributes were not always handled properly during component
construction from schema documents.  This is fixed by the overall reworking of
annotation construction described in <specref ref="RQ-131i"/>.</p>
<resolution>
<p>See <specref ref="RQ-131i"/>.</p>
</resolution>
</issue> *-->

<p>Annotations do not participate in <termref def="key-vn">validation</termref> as such.  Provided an annotation
itself satisfies all relevant <termref def="gloss-cos">Schema
Component Constraints</termref> it <emph>cannot</emph> affect the
<termref def="key-vn">validation</termref> of element information
items.</p>

<p>The name <compdef name="Annotated Component" abbrev="ac" role="termdef" showAKO="true"> covers all the different kinds of component which may
have annotations.</compdef></p>

</div3>

<div3 id="declare-annotation">
<head><phrase dg="b5159b">XML Representation of Annotation Schema Components</phrase><!--*
* material suppressed here by diff group b5159b *
*--></head>
 <p>Annotation of schemas and schema components, with material for human or
computer consumption, is provided for by allowing application information and
human information at the beginning of most major schema elements, and anywhere
at the top level of schemas.  The XML representation for an annotation schema component is
an
<eltref ref="annotation"/>
element information item.    The correspondences between the
properties of that information item and
properties of the component it corresponds to are as follows:</p>
<!--*
* material suppressed here by diff group b5152-movement *
*-->
     
     <reprdef dg="b5152-movement">
      <reprelt id="xr.ann0" dg="b5152-movement" eltname="annotation"/>
      <reprelt id="xr.ann1" dg="b5152-movement" eltname="appinfo"/>
      <reprelt id="xr.ann2" dg="b5152-movement" eltname="documentation"/>
     </reprdef>
     <p dg="b5152">The <eltref ref="annotation"/> element and its
      descendants map to an <compref ref="a"/> component as follows.</p>
     <reprdef dg="b5152-movement">
      <reprcomp id="xr.ann3" dg="b5152-movement" abstract="Annotation" ref="Annotation_details">
       <propmap comp="a" prop="application information">A sequence of
	the <eltref ref="appinfo"/> element information items from
	among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, in order, if any, otherwise the empty
	sequence.</propmap>
       <propmap comp="a" prop="user information">A sequence of the
	<eltref ref="documentation"/> element information items from
	among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, in order, if any, otherwise the empty
	sequence.</propmap>
       <propmap comp="a" prop="attributes">A <!--*
* material suppressed here by diff group b2203 *
*--><phrase dg="b2203">set</phrase> of attribute information items,
	namely those allowed by the attribute wildcard in the type
	definition for the <eltref ref="annotation"/> item itself or
	for the
	enclosing items which correspond to the component within which
	the annotation component is located.</propmap>
      </reprcomp>
     </reprdef>
     <p>The annotation component corresponding to the <eltref ref="annotation"/> element in the example above will have one
      element item in each of its <propref comp="a" prop="user        information"/> and <propref comp="a" prop="application information"/> and one attribute
      item in its <propref comp="a" prop="attributes"/>.</p>
     

<p dg="bannotations-2">
Virtually every kind of schema component defined in this specification
has an <xpropref role="anon">annotations</xpropref> property.  When
the component is described in a schema document, the mapping from
the XML representation of the component to the <compref ref="a"/>
components in the appropriate <xpropref role="anon">annotations</xpropref> 
property follows the rules described in the next paragraph.</p>

<p dg="bannotations-2">
<termdef id="key-am-set" term="annotation mapping">The <term>annotation
mapping</term> of a set of element information items <var>ES</var>
is a sequence of annotations <var>AS</var>, with the following properties:
<olist>
<item id="am-set-exp.ann">
<p>
For every <eltref ref="annotation"/> element information item among the
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of any element information item in <var>ES</var>, there
is a corresponding <compref ref="a"/> component in <var>AS</var>.
</p>
<note>
<p>As <phrase diff="del" dg="b7096">described</phrase><phrase diff="add" dg="b7096">noted</phrase> above<phrase diff="del" dg="b7096"> (earlier in this section)</phrase>,
the <propref comp="a" prop="attributes"/> property of
each <compref ref="a"/> component includes 
<phrase diff="del" dg="b7096">any attribute
information items on the parent (and possibly ancestors)
of the <eltref ref="annotation"/>
element which have a
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">namespace name</xpropref>
</phrase><phrase diff="add" dg="b7096">all
the attribute information items on the
<eltref ref="annotation"/> element itself, on the
XML element which represents (and maps to) the
component being annotated, and on any intervening
XML elements, if those attribute information items
have <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">namespace name</xpropref>s</phrase> 
different from the <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> namespace.</p>
</note>
</item>
<item id="am-set-imp.ann">
<p diff="del" dg="b7096">
If there are any attribute information items
among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> of any element information item <var>E</var> in
<var>ES</var> with a
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">namespace name</xpropref>
different from the <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> namespace, 
<!--* this seems unnecessary: the members of E are never
    * annotation elements, so none of their attributes can be 
    * included on any 'normal' annotation.
    * So I'm commenting it out.  If I'm wrong, then (a) put it
    * back and (b) explain why. *-->
<!--* The XML mapping of annotation specifies that it soaks up
    * foreign attributes from its parent.  So I'm restoring the 
    * condition. *-->
which are not included in the <propref comp="a" prop="attributes"/>
of any
<compref ref="a"/> from <clauseref ref="am-set-exp.ann"/>, 
then there is an <compref ref="a"/> component in <var>AS</var> whose
<propref comp="a" prop="application information"/> and
<propref comp="a" prop="user information"/> are the empty sequence and
whose <propref comp="a" prop="attributes"/> contains all and only such
attribute information items among <var>E</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref>.</p>
<p diff="add" dg="b7096">
If any element information item <var>E</var> in <var>ES</var> has any attribute information items
<var>A</var> such that
<olist role="andtest">
<item>
<p><var>A</var> is in <var>E</var>.<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref>.</p>
</item>
<item>
<p><var>A</var>.<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">namespace name</xpropref>
is present and not the XSD namespace.</p>
</item>
<item>
<p><var>A</var> is not included in the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> property 
of any annotation component described in 
<clauseref ref="am-set-exp.ann"/>.
</p>
</item>
</olist>
then for each such <var>E</var>, an <compref ref="a"/> component
<var>C</var> will appear in <var>AS</var>, with
<var>C</var>.<propref comp="a" prop="application information"/>
and
<var>C</var>.<propref comp="a" prop="user information"/>
each being the empty sequence and
<var>C</var>.<propref comp="a" prop="attributes"/>
containing all and only those attribute information
items <var>A</var> among <var>E</var>.<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref>.</p>
</item>
<item>
<p>
<var>AS</var> contains no other <compref ref="a"/> components.</p>
</item>
</olist>
</termdef>
<termdef id="key-am-one" term="annotation mapping">The <term>annotation
mapping</term> of a single element information item is the
<termref def="key-am-set"/> of the singleton set containing that
element.</termdef>
</p>

<note dg="bannotations-2"><p>
The order of <compref ref="a"/> components within the sequence 
is <termref def="key-impl-dep">implementation-dependent</termref>.
<!--*
* material suppressed here by diff group b2203 *
*-->
</p></note>
<note dg="bannotations-2"><p>
When the input set has more than one
member, the <compref ref="a"/> components in the resulting sequence
do not record which element in the set they
correspond to.  The attribute information items in the
<propref comp="a" prop="attributes"/> of any <compref ref="a"/>
similarly do not indicate which element information item in the
schema document was their parent.
</p></note>

</div3>

    <div3 id="sec-src-annotation">
     <head>Constraints on <phrase dg="b5159b">XML Representations of Annotations</phrase><!--*
* material suppressed here by diff group b5159b *
*--></head>
 <!--*
* material suppressed here by diff group b5286 *
*-->
     <p dg="b5286">None<phrase dg="ep99"> as such</phrase>.</p>
    </div3>
    <div3 id="sec-cvc-annotation">
     <head>Annotation Validation Rules</head>
     <p>None<phrase dg="ep99"> as such</phrase>.</p>
    </div3>
    <div3 id="sec-sic-annotation">
     <head>Annotation Information Set Contributions</head>
     <p>None<phrase dg="ep99"> as such</phrase>: 
      the addition of annotations to the <termref def="key-psvi">post-schema-validation infoset</termref> is
      covered by the <termref def="key-psvi">post-schema-validation infoset</termref> contributions of the enclosing components.</p>
    </div3>
    <div3 id="coss-annotation">
     <head>Constraints on Annotation Schema Components</head>
  <p>All annotations (see <specref ref="cAnnotations"/>) <rfc2119>must</rfc2119> satisfy the following constraint.</p>
  <constraintnote type="cos" id="an-props-correct">
   <head>Annotation Correct</head>
   <p>The values of the properties of an annotation <rfc2119>must</rfc2119> be as described in
the property tableau in
<specref ref="Annotation_details"/>, modulo the impact of <specref ref="conformance-missing"/>.</p>
  </constraintnote>

</div3>
   </div2>
<div2 id="Simple_Type_Definitions">
    <head>Simple Type Definitions</head>
 <note>
  <p>This section consists of a combination of <!--*
* material suppressed here by diff group eg-1852 *
*--><phrase dg="eg-1852">copies</phrase> of
normative material from <bibref ref="ref-xsp2"/>, for local cross-reference
purposes, and<!--*
* material suppressed here by diff group eg-1852 *
*--> material
<phrase dg="eg-1852">unique to this specification, </phrase>relating to the interface between schema
components defined in this specification and the simple type definition component.</p>
 </note>
    <p>Simple type definitions provide for constraining character information item <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of element and attribute
information items.</p>
<note role="example">
      <eg xml:space="preserve">&lt;xs:simpleType name="<!--*
* material suppressed here by diff group cleanup-1 *
*--><phrase dg="cleanup-1">celsius</phrase>WaterTemp"&gt;
 &lt;xs:restriction base="xs:<!--*
* material suppressed here by diff group b1915bis *
*--><phrase dg="b1915bis">decimal</phrase>"&gt;
  &lt;xs:fractionDigits value="2"/&gt;
  &lt;xs:minExclusive value="0.00"/&gt;
  &lt;xs:maxExclusive value="100.00"/&gt;
 &lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;</eg>
 <p>The XML representation of a simple type definition.</p>
     </note>
    <div3 id="Simple_Type_Definition_details">
     <head><!--*
* material suppressed here by diff group eg-1852 *
*-->The Simple Type Definition Schema Component</head>
<p>The simple type definition schema component has the following properties:
</p>
 <compdef name="Simple Type Definition" abbrev="std" showAKO="true"/>
 <!--*
* material suppressed here by diff group ep01-part1 *
*-->
   
<p>Simple types are identified by their <propref comp="std" prop="name"/> and <propref comp="std" prop="target namespace"/>.  Except
for anonymous simple types (those with no <propref comp="std" prop="name"/>), since
type definitions (i.e. both simple and complex type definitions taken together) <rfc2119>must</rfc2119> be uniquely identified within an <!--*
* material suppressed here by diff group b4399 *
*--><termref def="key-schema" dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--> schema</termref>, no simple type definition can have the same name as another
simple or complex type definition.  Simple type <propref comp="std" prop="name"/>s and <propref comp="ctd" prop="target namespace"/>s
are provided for reference from
instances (see <specref ref="xsi_type"/>), and for use in the XML
representation of schema components
(specifically in <eltref ref="element"/> and <eltref ref="attribute"/>).  See <specref ref="composition-schemaImport"/> for the use of component
identifiers when importing one schema into another.</p>
<note>
<p>The <propref comp="std" prop="name"/> of a simple type is not <emph>ipso
facto</emph> the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">(local) name</xpropref> of the
  element or attribute information items <termref def="key-vn">validated</termref> by that definition. The connection between a
  name and a type definition is described in <specref ref="cElement_Declarations"/> and <specref ref="cAttribute_Declarations"/>. </p>
</note>
     <p>A simple type definition with an empty specification for <propref comp="std" prop="final"/> can be used as the
<propref comp="std" prop="base type definition"/> for other types <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> by either of
extension or restriction, or as the <propref comp="std" prop="item type definition"/> in
the definition of a list, or in the <propref comp="std" prop="member type definitions"/> of
a union; the explicit values <pt>extension</pt>, <pt>restriction</pt>,
<pt>list</pt> and <pt>union</pt> prevent further
<!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derivations</termref> by extension (to yield a complex type) and restriction (to yield a
simple type) and use in <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-constructed" dg="b1913">constructing</termref> lists and unions respectively.</p>
<p><propref comp="std" prop="variety"/> determines whether the simple type corresponds to
an <pt>atomic</pt>, <pt>list</pt> or <pt>union</pt> type as defined by <bibref ref="ref-xsp2"/>.</p> 
<p>As described in <specref ref="Type_Derivation"/>, every simple type definition is
a <termref def="key-typeRestriction">restriction</termref> of some other simple
type (the <propref comp="std" prop="base type definition"/>), which is <!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase> if and only if the type
definition in question is <!--*
* material suppressed here by diff group eg-1852 *
*--><!--*
* material suppressed here by diff group urtype *
*--><termref def="key-anyAtomicType" dg="urtype"><phrase><code>xs:anyAtomicType</code></phrase></termref> or a list or
union type definition which is not itself <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> by restriction from a
list or union respectively.
<phrase dg="eg-1852">A type definition
has <!--*
* material suppressed here by diff group urtype *
*--><termref def="key-anyAtomicType" dg="urtype"><phrase><code>xs:anyAtomicType</code></phrase></termref> as its <propref comp="std" prop="base type definition"/> if and only if it is one of the <!--*
* material suppressed here by diff group b3251 *
*--> primitive datatypes.</phrase>  Each
<emph>atomic</emph> type is ultimately a restriction of exactly one such
<!--*
* material suppressed here by diff group b3251 *
*--> primitive datatype, which is its <propref comp="std" prop="primitive type definition"/>.</p>

     <!--*
* material suppressed here by diff group b3251 *
*-->

     <p dg="b3251">The <propref comp="std" prop="facets"/> property 
      contains a set of constraining facets which are used to specify
      constraints on the datatype described by the simple type definition.
      For <pt>atomic</pt> definitions, these are restricted
      to those appropriate for the corresponding <propref comp="std" prop="primitive type definition"/>.  Therefore, the value space
      and lexical space (i.e. what is <termref def="key-vn">validated</termref> by any atomic simple
      type) is determined by the pair (<propref comp="std" prop="primitive type definition"/>, <propref comp="std" prop="facets"/>). 
     </p>
     <p dg="b3251">
      Constraining facets are defined in <bibref ref="ref-xsp2"/>. All conforming
      implementations of this specification <rfc2119>must</rfc2119> support all of the
      facets defined in <bibref ref="ref-xsp2"/>.  It is <termref def="key-impl-defined">implementation-defined</termref> whether additional
      facets are supported; if they are, the implementation <rfc2119>must</rfc2119>
      satisfy the rules for <termref def="key-impl-defined">implementation-defined</termref> facets
      described in <bibref ref="ref-xsp2"/>.
     </p>

<p>As specified in <bibref ref="ref-xsp2"/>, <pt>list</pt> simple type definitions <termref def="key-vn">validate</termref> space separated tokens, each of
which conforms to a specified simple type definition, the <propref comp="std" prop="item type definition"/>.  The item type specified
<rfc2119>must not</rfc2119> itself be a <pt>list</pt> type, and <rfc2119>must</rfc2119> be one of the types identified in <bibref ref="ref-xsp2"/> as a
suitable item type for a list simple type.  In this case the <propref comp="std" prop="facets"/>
apply to the list itself, and are restricted to those appropriate for lists.</p>
<p>A <pt>union</pt> simple type definition <termref def="key-vn">validates</termref> strings which satisfy at
least one of its <propref comp="std" prop="member type definitions"/>.  As in the case of
<pt>list</pt>, the <propref comp="std" prop="facets"/>
apply to the union itself, and are restricted to those appropriate for unions.</p>
 
     <p><!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase> <phrase dg="eg-1852">or <!--*
* material suppressed here by diff group urtype *
*--><termref def="key-anyAtomicType" dg="urtype"><phrase><code>xs:anyAtomicType</code></phrase></termref>
      </phrase><rfc2119>must</rfc2119> <emph>not</emph> be named as the <propref comp="std" prop="base type definition"/> of any user-defined
      atomic simple type definitions<phrase dg="ep99">:  
       as <!--*
* material suppressed here by diff group eg-1852 *
*--><phrase dg="eg-1852">they allow</phrase> no constraining facets, this
      would be incoherent</phrase>.</p>
     <!--* No, it would not be incoherent at all. We use name-based
         * subtyping. *-->
     <!--*
* material suppressed here by diff group ep99 *
*-->

     <p>See <specref ref="cAnnotations"/> for information on the role of the
<propref comp="std" prop="annotations"/> property.</p>
    </div3>
 <div3 id="declare-datatype">
  <head><phrase dg="b5159b"><!--*
* material suppressed here by diff group eg-1852 *
*-->XML Representation of Simple Type Definition Schema Components</phrase><!--*
* material suppressed here by diff group b5159b *
*--></head>
<note>
<p>This section reproduces a version of material from <bibref ref="ref-xsp2"/>, for 
local cross-reference purposes.</p>
 </note>
<reprdef dg="b5152-std-movement">
 <reprelt id="reprelt.simpleType" eltname="simpleType" type="simpleType" dg="b5152-std-movement"/>
 <reprelt id="reprelt.restriction" eltname="restriction" dg="b5152-std-movement"/>
 <reprelt id="reprelt.list" eltname="list" dg="b5152-std-movement"/>
 <reprelt id="reprelt.union" eltname="union" dg="b5152-std-movement"/>
</reprdef>
<p dg="b3251">
The <eltref ref="simpleType"/> element and its descendants
normally, when there are no errors, map to a 
<compref ref="std"/> component.  The case in which 
an <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-unknown-f">unknown</xspecref> facet is used in the definition of a simple type
definition is handled specially:  the <eltref ref="simpleType"/> 
in question is not in error, but it does not map to any component at all.  
</p>
<note dg="b3251">
<p>The effect of the special handling of <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-unknown-f">unknown</xspecref> facets is to 
ensure (1) that <termref def="key-impl-defined">implementation-defined</termref> facets which are not supported by 
a particular implementation result in the types which depend upon them
not being present in the schema, and (2) that the presence of 
references to <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-unknown-f">unknown</xspecref> facets in a schema document does not prevent
the rest of the schema document being processed and used.</p>
</note>

<p dg="b5152-std">
The following subsections define one set of common mapping
rules for simple type definitions, and three specialized
sets of mapping rules for atomic, list, and union datatypes,
respectively.
<ulist>
<item>
<p>If the <eltref ref="simpleType"/> element
has a <eltref ref="restriction"/> element among its children,
and the base type definition has <propref comp="std" prop="variety"/> = <pt>atomic</pt>, 
then the mapping rules in 
<specref ref="map.std.common"/>
and <specref ref="map.std.atomic"/>
apply.
</p>
</item>
<item>
<p>If the <eltref ref="simpleType"/> element
has a <eltref ref="list"/> element among its children,
or if it has a <eltref ref="restriction"/> child
and the base type definition has <propref comp="std" prop="variety"/> = <pt>list</pt>, 
then the mapping rules in 
<specref ref="map.std.common"/>
and <specref ref="map.std.list"/>
apply.
</p>
</item>
<item>
<p>If the <eltref ref="simpleType"/> element
has a <eltref ref="union"/> element among its children,
or if it has a <eltref ref="restriction"/> child
and the base type definition has <propref comp="std" prop="variety"/> = <pt>union</pt>, 
then the mapping rules in 
<specref ref="map.std.common"/>
and <specref ref="map.std.union"/>
apply.
</p>
</item>
</ulist>
</p>

<div4 id="map.std.common" dg="b5152-std-movement">
<head dg="b5152">Common mapping rules for Simple Type Definitions</head>

<p dg="b5152-std">The following rules apply to all 
simple type definitions.</p>
 <reprdef>
 <!--*
* material suppressed here by diff group b5152-std-movement *
*-->
 <!--*
* material suppressed here by diff group b5152-std-movement *
*-->
 <!--*
* material suppressed here by diff group b5152-std-movement *
*-->
 <!--*
* material suppressed here by diff group b5152-std-movement *
*-->

 <reprcomp abstract="Simple Type Definition" ref="Simple_Type_Definition_details">
  <propmap comp="std" prop="name">The <termref def="key-vv">actual value</termref> of the <code>name</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> 
if present<phrase dg="std-1915"> on the <eltref ref="simpleType"/> element</phrase>, 
otherwise <termref def="key-null">absent</termref>.</propmap>
  <propmap comp="std" prop="target namespace">The <termref def="key-vv">actual value</termref> of the
<code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of 
the <!--*
* material suppressed here by diff group cleanup-1 *
*--><phrase dg="cleanup-1">ancestor</phrase> <eltref ref="schema"/> 
<!--*
* material suppressed here by diff group std-1915 *
*-->element information item if present, 
otherwise <termref def="key-null">absent</termref>.</propmap>
  <propmap comp="std" prop="base type definition">
   <olist role="Caseval">
    <item>
     <p role="if">the <eltref ref="restriction"/> alternative is chosen</p>
     <p role="then">the type definition <termref def="src-resolve">resolved</termref> to by the
<termref def="key-vv">actual value</termref> of the <code>base</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of <eltref ref="restriction"/>, if present, otherwise the
type definition corresponding to the <eltref ref="simpleType"/> among
the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <eltref ref="restriction"/>.</p>
    </item>
    <item>
     <p role="if">the <eltref ref="list"/> or <eltref ref="union"/> alternative is chosen</p>
     <p role="then"><!--*
* material suppressed here by diff group std-1915 *
*--><phrase dg="std-1915"><!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase></phrase>.</p>
    </item>
   </olist>
  </propmap>
  <!--*
* material suppressed here by diff group std-1915 *
*-->
<propmap comp="std" prop="final" dg="std-1915">
A subset of 
<code>{</code><pt>restriction</pt>, <pt>extension</pt>, <pt>list</pt>,
<pt>union</pt><code>}</code>, determined as follows.
<termdef role="local" term="FS" id="lt-vs">Let
<term>FS</term> be
the <termref def="key-vv">actual value</termref> of the
<att>final</att> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, 
if present, otherwise the <termref def="key-vv">actual value</termref> of the
<att>finalDefault</att> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of the ancestor
<el>schema</el> element, 
if present, otherwise the empty string.</termdef>  Then the property value is
<olist role="caseval">
    <item>
     <p role="if"><termref def="lt-vs">FS</termref> is the empty string</p>
     <p role="then">the empty set;</p>
    </item>
    <item>
     <p role="if"><termref def="lt-vs">FS</termref> is 
<!--* MSM is not sure how to tag '#all' here.  In datatypes, it's tagged 'string',
    * but 'string' appears not to be in the Structures DTD.  I continue to find
    * the lack of any coherent story about phrase-level markup a depressing
    * feature of working on these documents. 
    * For now, I'll tag this 'code' inside 'quote'.
    *-->
<quote><code>#all</code></quote></p>
     <p role="then"><code>{</code><pt>restriction</pt>, <pt>extension</pt>, <pt>list</pt>,
<pt>union</pt><code>}</code>;</p>
    </item>
    <item>
     <p role="otherwise">Consider <termref def="lt-vs">FS</termref> as
a space-separated list, and include <pt>restriction</pt> if
<!--* code / string *-->
<quote><code>restriction</code></quote> is in that list, and similarly for
<pt>extension</pt>, <pt>list</pt> and <pt>union</pt>.
</p>
      <!-- HST doesn't think this is actually true 
       <p>Although the <att>finalDefault</att> &i-attribute; of
       <el>schema</el> may include other values,
       those values
       &must; be ignored in the determination of <propref comp="std" prop="final"/>
       </p> -->
</item>
</olist>
</propmap>
  <propmap comp="std" prop="context" dg="eg-1852">
  <olist role="Caseval">
   <item>
    <p role="if">the
<att>name</att> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is present</p>
    <p role="then"><termref def="key-null">absent</termref></p>
   </item>
   <item>
    <p role="otherwise">
     <olist role="caseval">
     <item>
    <p role="if">the parent element information item is <eltref ref="attribute"/></p>
    <p role="then">the corresponding <compref name="Attribute Declaration" ref="ad"/></p>
   </item>
   <item>
    <p role="if">the parent element information item is <eltref ref="element"/></p>
    <p role="then">the corresponding <compref name="Element Declaration" ref="ed"/></p>
   </item>
   <item>
    <p role="if">the parent element information item is <eltref ref="list"/> or <eltref ref="union"/></p>
    <p role="then">the <compref name="Simple Type Definition" ref="std"/>
corresponding to the grandparent <eltref ref="simpleType"/> element information item</p>
   </item>
      <item>
    <p role="otherwise">(the parent element information item is <eltref ref="restriction"/>), 
     <olist role="caseval">
      <item>
       <p role="if">the grandparent element information item is <eltref ref="simpleType"/></p>
       <p role="then">the <compref name="Simple Type Definition" ref="std"/>
corresponding to the grandparent</p>
      </item>
      <item>
       <p role="otherwise">(the grandparent element information item is <eltref ref="simpleContent"/>), 
     the <compref name="Simple Type Definition" ref="std"/> which is the
<propref comp="ctd" prop="content type"/> of the <compref name="Complex Type Definition" ref="ctd"/>
corresponding to the great-grandparent <eltref ref="complexType"/> element information item.</p>
      </item>
     </olist>
    </p>
   </item>
    </olist>
    </p>
   </item>
  </olist>
 </propmap>
  <propmap comp="std" prop="variety">If the <eltref ref="list"/> alternative is chosen,
then <pt>list</pt>, otherwise if the <eltref ref="union"/> alternative is
chosen, then <pt>union</pt>, otherwise (the <eltref ref="restriction"/>
alternative is chosen), then the <propref comp="std" prop="variety"/>
of the <propref comp="std" prop="base type definition"/>.</propmap>
<propmap comp="std" prop="facets" dg="rec12-map"><olist role="Caseval">
<item>
<p role="if">the <eltref ref="restriction"/> alternative is chosen
</p>
<p role="if" dg="b3251">
<!--* double marking of phrase as add is an attempt to
    * outwit XSLT and force it to be marked.  Or else it's 
    * a sign that XSLT has outwitted me. MSM 2008-04-25 *-->
<phrase> <phrase dg="b3251">
the children of the <eltref ref="restriction"/> element are all
either <eltref ref="simpleType"/> elements,
<eltref ref="annotation"/> elements, 
or elements which <phrase diff="del" dg="b2783">refer to</phrase><phrase diff="add" dg="b2783">specify</phrase> constraining facets 
supported by the processor</phrase></phrase></p>
<p role="then"><!--*
* material suppressed here by diff group b3251 *
*--> 
<phrase diff="del" dg="b2783">a set of
<compref ref="f" name="Constraining Facet"/> components
<termref def="key-facets-restriction">constituting a
restriction</termref> of the <propref comp="std" prop="facets"/> of
the
<propref comp="std" prop="base type definition"/> with respect to a
set of <compref ref="f" name="Constraining Facet"/> components
corresponding to the appropriate element information items among the
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <eltref ref="restriction"/> (i.e. those which specify
facets, if any), as defined in <specref ref="st-restrict-facets"/></phrase><phrase diff="add" dg="b2783">the set of
<compref ref="f" name="Constraining Facet"/> components
obtained by 
<termref def="key-facets-overlay">overlaying</termref> 
the <propref comp="std" prop="facets"/> of the
<propref comp="std" prop="base type definition"/> with the
set of <compref ref="f" name="Constraining Facet"/> components
corresponding to those <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <eltref ref="restriction"/> 
which specify facets, as defined in <specref ref="st-restrict-facets"/></phrase>.</p>
</item>
<item dg="b3251">
<p role="if">the <eltref ref="restriction"/> alternative is chosen
</p>
<p role="if">
the children of the <eltref ref="restriction"/> element
include at least one element of which the processor has no
prior knowledge (i.e. not a <eltref ref="simpleType"/> element,
an <eltref ref="annotation"/> element, or an element
denoting a constraining facet known to and 
supported by the processor)</p>
<p role="then">the <eltref ref="simpleType"/> element
maps to no component at all (but is not in error solely on account of
the presence of the unknown element).</p>
</item>
<item dg="std-1915">
<p role="if">the <eltref ref="list"/> alternative is chosen</p>
<p role="then">a set with one member, a <compref ref="f-w" name="whiteSpace"/> facet with 
<xpropref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#f-w-value" role="comp">value</xpropref> = <pt>collapse</pt> and <xpropref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#f-w-fixed" role="comp">fixed</xpropref> = <pt>true</pt>.</p>
</item>
<item><p role="otherwise">the empty set</p></item></olist>
</propmap>
  <propmap comp="std" prop="fundamental facets" dg="eg-1852">Based on
<propref comp="std" prop="variety"/>, <propref comp="std" prop="facets"/>,
<propref comp="std" prop="base type definition"/> and <propref comp="std" prop="member type definitions"/>, a set of <compref ref="ff" name="Fundamental Facet"/> components, one
each as specified in <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dc-ordered">The ordered Schema Component </xspecref>, <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dc-bounded">The bounded Schema Component </xspecref>,
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dc-cardinality">The cardinality Schema Component </xspecref> and <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dc-numeric">The numeric Schema Component </xspecref>.</propmap>
  <propmap comp="std" prop="annotations">
   <!--*
* material suppressed here by diff group bannotations-1 *
*-->
   <phrase dg="bannotations-2">
    The <termref def="key-am-set"/> of the set of elements containing the
    <eltref ref="simpleType"/>, and <phrase dg="ep99">one of</phrase> 
    the <eltref ref="restriction"/>,
    <eltref ref="list"/><!--*
* material suppressed here by diff group ep99 *
*--> or <eltref ref="union"/> 
    <phrase dg="ep99"><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref></phrase><!--*
* material suppressed here by diff group ep99 *
*-->,
    whichever is present,
    as defined in <specref ref="declare-annotation"/>.
   </phrase>
  </propmap>
</reprcomp>

<!--* std-1915 approved, this is dead text *-->
 <!--*
* material suppressed here by diff group std-1915 *
*-->

<!--* This para added by 1915, moved by 3251-movement. *-->
<!--*
* material suppressed here by diff group add.std-1915.b5152-std *
*-->

<!--*
* material suppressed here by diff group b5152-std-movement *
*-->
<!--*
* material suppressed here by diff group b5152-std-movement *
*-->
<!--*
* material suppressed here by diff group b5152-std-movement *
*-->
<!--*
* material suppressed here by diff group b5152-std-movement *
*-->
<!--*
* material suppressed here by diff group b5152-std-movement *
*-->
<!--*
* material suppressed here by diff group b5152-std-movement *
*-->
</reprdef>
</div4>

<div4 id="map.std.atomic" dg="b5152-std-movement">
<head dg="b5152-std">Mapping Rules for Atomic Simple Type Definitions</head>

<p id="std.atomic.p" dg="b5152-std-movement">
<!--*
* material suppressed here by diff group b5152-std *
*--><phrase dg="b5152-std">The following rule applies if</phrase> the <propref comp="std" prop="variety"/> is <pt>atomic</pt><!--*
* material suppressed here by diff group b5152-std *
*--></p>

<p dg="std-1915.b5152-std-move">
<phrase id="std.ancestors" dg="b5152-std-movement">
<termdef term="ancestor" id="std-ancestor">The
<term>ancestors</term> of a 
<termref def="td">type definition</termref> are its 
<propref comp="std" prop="base type definition"/> and the 
<termref def="std-ancestor">ancestors</termref> of its 
<propref comp="std" prop="base type definition"/>.</termdef>
(The ancestors of a 
<compref ref="std"/> <var>T</var> in the type hierarchy are themselves
<termref def="td">type definitions</termref>; they are distinct from
the XML elements which may be ancestors, in the XML document
hierarchy, of the <eltref ref="simpleType"/> element which 
declares <var>T</var>.)</phrase>
</p>

<reprdef dg="b5152-std-movement">
  <reprcomp id="rc.astd" dg="b5152-std-movement" abstract="Atomic Simple Type Definition" ref="Simple_Type_Definition_details">
   <propmap comp="std" prop="primitive type definition"><!--*
* material suppressed here by diff group rec12-map *
*--><phrase dg="rec12-main"><!--*
* material suppressed here by diff group eg-1852 *
*--><phrase dg="std-1915"><!--*
* material suppressed here by diff group eg-1852 *
*--><phrase dg="eg-1852">From</phrase> among the <termref def="std-ancestor">ancestors</termref> of this <compref ref="std"/>, that <compref ref="std"/> which corresponds to a <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-primitive">primitive</xtermref> datatype</phrase>.</phrase></propmap>
<!--* MSM is puzzled by the fact that this property mapping rule, clearly 
    * labeled del, nevertheless shows up as status quo text in the
    * omnibus proposal of 7 September. 
    * This really does need to go away, as part of std-1915 if for no
    * other reason. *-->
   <!--*
* material suppressed here by diff group rec12-map *
*-->
</reprcomp>
</reprdef>
</div4>

<div4 id="map.std.list" dg="b5152-std-movement">
<head dg="b5152-std">Mapping Rules for Lists</head>

  <p id="std.list.p" dg="b5152-std-movement">If the <propref comp="std" prop="variety"/> is <pt>list</pt>, the following additional
property <!--*
* material suppressed here by diff group rec12-map *
*--><phrase dg="rec12-map">mapping 
<!--*
* material suppressed here by diff group b5152-std *
*-->
applies</phrase>:</p>
<reprdef dg="b5152-std-movement">
  <reprcomp id="rc.lstd" dg="b5152-std-movement" abstract="List Simple Type Definition" ref="Simple_Type_Definition_details">
   <!--* we could just mark the deletion and add of specific item elements, but that
       * confuses diffspec_custom.xsl.  This rude whack is easier than
       * fixing the stylesheet. *-->
   <!--*
* material suppressed here by diff group std-1915 *
*-->
   <propmap comp="std" prop="item type definition" dg="std-1915">
    <olist role="Caseval">
     <item>
      <p role="if">the <propref comp="std" prop="base type definition"/> is <!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase></p>

      <p role="then">the <compref ref="std"/> (a) <termref def="src-resolve">resolved</termref> 
to by the
<termref def="key-vv">actual value</termref> of the <code>itemType</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of <eltref ref="list"/>,
or (b), corresponding to the <eltref ref="simpleType"/> among
the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <eltref ref="list"/>, whichever is present.
      <note>
<p><!--*
* material suppressed here by diff group eg-1852 *
*--><phrase dg="eg-1852">In
this case, a</phrase> <eltref ref="list"/> element will invariably be present; it will
invariably have either an <code>itemType</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> or a <eltref ref="simpleType"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">child</xpropref>, but not both.</p>
</note>
      </p>
     </item>
     <item>

      <p role="otherwise">(that is, the <propref comp="std" prop="base type definition"/> is not <!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase>), the <propref comp="std" prop="item type definition"/> of the <propref comp="std" prop="base type definition"/>.
       <note dg="eg-1852">
        <p>In this case, a <eltref ref="restriction"/> element will invariably
be present.</p>
       </note>
      </p>
     </item>
    </olist>
   </propmap>
   <!--*
* material suppressed here by diff group rec12-map *
*-->
</reprcomp>
</reprdef></div4>

<div4 id="map.std.union" dg="b5152-std-movement">
<head dg="b5152-std">Mapping Rules for Unions</head>

  <p id="std.union.p" dg="b5152-std-movement">If the
<propref comp="std" prop="variety"/> is <pt>union</pt>, the following
additional property <!--*
* material suppressed here by diff group rec12-map *
*--><phrase dg="rec12-map">mapping <!--*
* material suppressed here by diff group b5152-std *
*--> applies</phrase>:</p>
<reprdef dg="b5152-std-movement">
  <reprcomp id="rc.ustd" dg="b5152-std-movement" abstract="Union Simple Type Definition" ref="Simple_Type_Definition_details">
   <!--*
* material suppressed here by diff group std-1915 *
*-->
   <propmap comp="std" prop="member type definitions" dg="std-1915"><olist role="Caseval">
     <item>
      <p role="if">the <propref comp="std" prop="base type definition"/> is <!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase></p>
      <p role="then"><!--*
* material suppressed here by diff group b2333 *
*--><phrase dg="b2333">the</phrase> sequence of 
<!--*
* material suppressed here by diff group b2333 *
*--> <compref ref="std"/>s (a) 
<termref def="src-resolve">resolved</termref> to by the items in the
<termref def="key-vv">actual value</termref> of the <code>memberTypes</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of <eltref ref="union"/>,
if any<phrase dg="b2333">,</phrase> and (b)<!--*
* material suppressed here by diff group b2333 *
*--> 
corresponding to the <eltref ref="simpleType"/>s among
the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <eltref ref="union"/>, if any, in order.  
<!--*
* material suppressed here by diff group b2333 *
*-->
      <note>
<p><!--*
* material suppressed here by diff group eg-1852 *
*--><phrase dg="eg-1852">In
this case, a</phrase> <eltref ref="union"/> element will invariably be present; it will
invariably have either a <code>memberTypes</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> or one or more <eltref ref="simpleType"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, or both.</p>
</note>
</p>
     </item>
     <item>
      <p role="otherwise">(that is, the <propref comp="std" prop="base type definition"/> is not <!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase>), the <propref comp="std" prop="member type definitions"/> of the <propref comp="std" prop="base type definition"/>.
      <note dg="eg-1852">
        <p>In this case, a <eltref ref="restriction"/> element will invariably
be present.</p>
       </note></p>
     </item>
    </olist>
<!--* N.B. the following note appears both here and in Datatypes.
    * Any changes must be made in both places.
    *-->
<!--*
* material suppressed here by diff group add.b2333-feedback.b5152-std *
*-->

   </propmap>
   <!--*
* material suppressed here by diff group rec12-map *
*-->
</reprcomp>
</reprdef>

<!--*
* material suppressed here by diff group add.b2333-feedback.b5152-std-move.cr.del-as-add *
*-->
<!--*
* material suppressed here by diff group add.b2333-feedback.b5152-std-move.cr.del-as-del *
*-->

</div4>

</div3>
    <div3 id="sec-src-simple-type">
     <head>Constraints on <phrase dg="b5159b">XML Representations of Simple Type Definitions</phrase><!--*
* material suppressed here by diff group b5159b *
*--></head>
     <constraintnote type="src" id="src-simple-type">
      <head>Simple Type Definition Representation OK</head>
      <p>In addition to the conditions imposed on <eltref ref="simpleType"/> element information items by the schema for schema<!--*
* material suppressed here by diff group b2067-2e *
*--><phrase dg="b2067-2e"> documents</phrase>,
   <olist role="and">
    <item dg="b5286">
     <p>With the exception of <eltref ref="enumeration"/><!--*
* material suppressed here by diff group b5030 *
*--><phrase dg="b5030">,</phrase> <eltref ref="pattern"/>, <phrase dg="b5030">and <eltref ref="assert"/>,</phrase>
     the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <eltref ref="restriction"/>
<!--*
* material suppressed here by diff group ep19 *
*--><phrase dg="ep19">do
not</phrase> contain more than one element information item with the same
name.</p>
    </item>
    <!--*
* material suppressed here by diff group b5286 *
*-->
    <item><p>If the <eltref ref="restriction"/> alternative is chosen,
<!--*
* material suppressed here by diff group b5286 *
*--> it <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">has</phrase> 
<phrase dg="b5286">either</phrase> a <code>base</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> 
or a <eltref ref="simpleType"/> among its <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, but not
both.</p>
    </item>
    <item><p>If the <eltref ref="list"/> alternative is chosen, 
<!--*
* material suppressed here by diff group b5286 *
*--> it <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">has</phrase> 
<phrase dg="b5286">either</phrase> an <code>itemType</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> 
or a <eltref ref="simpleType"/> among its <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>,
but not both.</p>
    </item>
    <item dg="eg-1852">
     <p>
If the <eltref ref="union"/> alternative is chosen, either it
<!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">has</phrase> a non-empty <code>memberTypes</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> or it
<!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">has</phrase> at least one <code>simpleType</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">child</xpropref>.</p>
    </item>
    <!--*
* material suppressed here by diff group b5286 *
*-->
    <!--*
* material suppressed here by diff group b5286-silent *
*-->
   </olist>
  </p>
     </constraintnote>
     <!--*
* material suppressed here by diff group b5286-en *
*-->
     <!--*
* material suppressed here by diff group b5286-en *
*-->
     <!--*
* material suppressed here by diff group b5286-en *
*-->
    </div3>
    <div3 id="sec-cvc-simple-type">
     <head>Simple Type Definition Validation Rules</head>
     <constraintnote type="cvc" id="cvc-simple-type">
      <head>String Valid</head>
      <p>For a string <phrase dg="b3251i"><var>S</var></phrase>
       to be locally <termref def="key-vn">valid</termref> with respect to a simple type definition 
       <phrase dg="b3251i"><var>T</var></phrase>
       <olist role="and">
	<item dg="b3251i">
	 <p>The <termref def="key-nv">normalized value</termref> of <var>S</var>, <var>N</var>, is calculated using
	  the <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#rf-whiteSpace">whiteSpace facet</xtermref><!--*
* material suppressed here by diff group b3251i *
*-->, and any other <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-pre-lexical">pre-lexical facets</xtermref> associated with <var>T</var>, as described in the definition
	  of the term <quote><termref def="key-nv">normalized value</termref></quote>.</p>
	</item>
	<item>
	 <p><!--*
* material suppressed here by diff group b3251i *
*--><phrase dg="b3251i"><var>N</var></phrase> is schema-valid with respect to 
	  <!--*
* material suppressed here by diff group b3251i *
*--><phrase dg="b3251i"><var>T</var></phrase> as
	  defined by <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#cvc-datatype-valid">Datatype
	   Valid</xtermref> in <bibref ref="ref-xsp2"/>.</p>    
	</item>
	<item>
	 <olist role="Casetest">
	  <item>
	   <p role="if"><!--*
* material suppressed here by diff group b3251i *
*--><phrase dg="b3251i"><var>T</var></phrase> is <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ENTITY">ENTITY</xtermref> or is validly
	    <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> from <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ENTITY">ENTITY</xtermref><!--*
* material suppressed here by diff group cta-gst *
*-->, as
	    defined in <specref ref="cos-st-derived-ok"/></p>
	   <p role="then"><!--*
* material suppressed here by diff group b3251i *
*--><phrase dg="b3251i"><var>N</var></phrase> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> a <termref def="key-vde">declared entity name</termref>.</p>
	  </item>
	  <item>
	   <p role="if"><!--*
* material suppressed here by diff group b3251i *
*--><phrase dg="b3251i"><var>T</var></phrase> is <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ENTITIES">ENTITIES</xtermref> or is
	    validly <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> from <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ENTITIES">ENTITIES</xtermref><!--*
* material suppressed here by diff group cta-gst *
*-->, as
	    defined in <specref ref="cos-st-derived-ok"/></p>
	   <p role="then">every whitespace-delimited substring of 
	    <!--*
* material suppressed here by diff group b3251i *
*--><phrase dg="b3251i"><var>N</var></phrase> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> 
	    a <termref def="key-vde">declared entity
	     name</termref>.</p>
	  </item>
	  <item>
	   <p role="otherwise">no further condition applies.</p>
	  </item>
	 </olist>
	</item>
  </olist>
 </p>
  <p><termdef id="key-vde" term="declared entity name">A string is a
<term>declared entity name</term> if<phrase dg="iff"> and only if</phrase> it is equal to the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.entity.unparsed">name</xpropref> 
of some unparsed entity information item in the value of the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.document">unparsedEntities</xpropref> 
property of the document information item at the root of the infoset
containing the element or attribute information item whose <termref def="key-nv">normalized value</termref>
the string is.</termdef></p>
</constraintnote>
    </div3>
    <div3 id="sec-sic-simple-type">
     <head>Simple Type Definition Information Set
Contributions</head>
     <p>None<phrase dg="ep99"> as such</phrase>.</p>
    </div3>
    <div3 id="coss-st">
     <head>Constraints on Simple Type Definition Schema Components</head>
     <div4 id="sec-st-props-correct" dg="b5165a">
      <head dg="b5165a">Simple Type Definition Properties Correct</head>
      <p>All simple type definitions<!--*
* material suppressed here by diff group eg-1852 *
*--> <rfc2119>must</rfc2119> satisfy both
       the following constraints.</p>
      
  <constraintnote type="cos" id="st-props-correct">
   <head>Simple Type Definition Properties Correct</head>
   <olist role="And">
	<item><p>The values of the properties of a simple type
	  definition <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">are</phrase> as described in the property tableau in
	  <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dc-defn"><!--*
* material suppressed here by diff group rec12-main *
*--><phrase dg="rec12-main">The Simple Type Definition
	    Schema Component</phrase></xspecref>, modulo the impact of
	  <specref ref="conformance-missing"/>.</p></item>
	<item><p>All simple type definitions <phrase dg="consent-1027">are, or</phrase> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">are</phrase> <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref>
	  ultimately from<phrase dg="consent-1027">,</phrase> <!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase> (so circular
	  definitions are disallowed).  That is, it <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> possible
	  to reach a <!--*
* material suppressed here by diff group b3251 *
*--> primitive datatype or <!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase> by
	  <!--*
* material suppressed here by diff group consent-1027 *
*-->
	  following the <propref comp="std" prop="base type     definition"/><phrase dg="consent-1027"> zero or more
	   times</phrase>.</p></item>
	<item>
	 <p>The <propref comp="std" prop="final"/> of the <propref comp="std" prop="base type definition"/> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">does not</phrase>
	  contain <pt>restriction</pt>.</p>
	</item>
	<item dg="rec12-main">
	 <p>There <!--*
* material suppressed here by diff group ep19 *
*--><phrase dg="ep19">is not</phrase>
	  more than one member of <propref comp="std" prop="facets"/>
	  of the same kind.</p>
	</item>
	<item dg="b3251-f">
	 <p>Each member of <propref comp="std" prop="facets"/> is
	  supported by the processor.</p>
	 <!--*
* material suppressed here by diff group pre *
*-->
	 
	 <note>
	  <p>As specified normatively elsewhere, all conforming
	   processors <rfc2119>must</rfc2119> support the facets defined by 
	   <bibref ref="ref-xsp2"/>; support for additional facets is <termref def="key-impl-defined">implementation-defined</termref>.
	   If a schema document applies an <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-unknown-f">unknown</xspecref> facet,
	   the immediate result will be a violation of this constraint,
	   so that the simple type defined by means of that facet
	   will be excluded from the schema, and any references to it
	   will be treated as undischarged references.
	  </p>
	 </note>
	</item>
       </olist>
      </constraintnote>
     </div4>
<div4 id="sec-cos-st-restricts" dg="b5165a">
<head dg="b5165a">Derivation Valid (Restriction, Simple)</head>

  <constraintnote type="cos" id="cos-st-restricts">
<head>Derivation Valid (Restriction, Simple)</head>
       <p dg="ep22">
	<phrase dg="ep22">For any <compref ref="std"/> <var>D</var> whose 
	 <propref comp="std" prop="base type definition"/> is some 
	 <compref ref="std"/> <var>B</var>,</phrase>
	<olist role="case"><!--* ep22 changed this from Case.mxm to case.mxm *-->
	 <item>
	  <p role="if"><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>D</var>.<propref comp="std" prop="variety"/> = </phrase> 
	   <pt>atomic</pt></p>
	  <p role="then">
	   <olist role="andtest">
	    <item id="c-base_atomic">
	     <!--*
* material suppressed here by diff group ep22 *
*-->
	     <p dg="ep22">Either <var>D</var> is 
	      <termref def="key-anyAtomicType"><phrase><code>xs:anyAtomicType</code></phrase></termref>, or else <var>B</var> is an atomic simple type
	      definition. </p>
	     <note dg="ep22"><p>
	      The type
	       <termref def="key-anyAtomicType"><phrase><code>xs:anyAtomicType</code></phrase></termref> is an exception because its 
	      <propref comp="std" prop="base type definition"/> is <termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref>, whose
	       <propref comp="std" prop="variety"/> is <termref def="key-null"/>.</p>
	     </note>
	    </item>
	    <item>
	     <p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>B</var>.<propref comp="std" prop="final"/></phrase> 
	      <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">does not</phrase> contain <pt>restriction</pt>.</p>
	    </item>
	    <item>
	     <p>For each facet in <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>D</var>.<propref comp="std" prop="facets"/></phrase>
	      (call this <local>DF</local>) 
	      <olist role="andtest">
	       <item>
		<p><local>DF</local> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> <!--*
* material suppressed here by diff group b5639 *
*-->	<phrase dg="b5639">applicable to
		 <var>D</var>,</phrase> as specified in <!--*
* material suppressed here by diff group b5639 *
*-->
		 <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#cos-applicable-facets" dg="b5639">Applicable
		 Facets</xspecref> <phrase dg="b3251"> of <bibref ref="ref-xsp2"/><!--*
* material suppressed here by diff group b5639 *
*--></phrase>.</p>
	       </item>
	       <item>
		<!--*
* material suppressed here by diff group b5639 *
*-->
		<!--* Huh?  Where does Datatypes define facets as valid
		* restrictions of facets?! *-->
	        <p dg="b5639"><local>DF</local> satisfies the constraints
	         on facet components given in the appropriate subsection of
	         <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#rf-facets">Constraining Facets</xtermref>
          in <bibref ref="ref-xsp2"/>.
	        </p>
	       </item>
	      </olist>
	     </p>
	    </item>
	   </olist></p>
	 </item>
	 <item>
	  <p role="if"><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>D</var>.<propref comp="std" prop="variety"/> 
	    = <pt>list</pt></phrase></p>
	  <p role="then">
	   <olist role="andtest">
	    <item>
	     <p><phrase dg="ep24">Either</phrase>
	       <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>D</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase></phrase><propref comp="std" prop="item type definition"/><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="std" prop="variety"/> <!--*
* material suppressed here by diff group ep24 *
*-->
	      <phrase dg="ep24">=</phrase>
	      <pt>atomic</pt> or <phrase dg="ep24"><var>D</var>.<propref comp="std" prop="item type definition"/>.<propref comp="std" prop="variety"/> =</phrase>
	      <pt>union</pt> <!--*
* material suppressed here by diff group ep24 *
*-->
	      <phrase dg="ep24">and</phrase>
	      <!--*
* material suppressed here by diff group b2333 *
*--><phrase dg="b2333">there <!--*
* material suppressed here by diff group ep24 *
*-->
	       <phrase dg="ep24">are</phrase> no
	       types whose <propref comp="std" prop="variety"/> is <pt>list</pt> among
	       the union's <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-transitivemembership">transitive
		membership</xtermref></phrase><!--*
* material suppressed here by diff group ep24 *
*-->.</p>
	    </item>
	    <item>
	     <olist role="Casetest">
	      <item>
	       <p role="if"><!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>B</var></phrase>
		is <!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase>
	       </p>
	       <p role="then">
		<olist role="andtest">
		 <item>
		  <p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>D</var>.<propref comp="std" prop="item type definition"/>.<propref comp="std" prop="final"/></phrase>
		    <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">does not</phrase> contain <pt>list</pt>.</p>
		 </item>
		 <item>
		  <p><phrase id="anchor6735"/>
		   <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>D</var>.</phrase><propref comp="std" prop="facets"/> 
		   <!--*
* material suppressed here by diff group modals *
*-->
		   <phrase dg="modals">contains only</phrase> the
		   <pt>whiteSpace</pt> facet component<phrase diff="add" dg="b6735">
		    with <xpropref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#f-w-value" role="comp">value</xpropref>
		    = <pt>collapse</pt> and
		    <xpropref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#f-w-fixed" role="comp">fixed</xpropref>
		    = <pt>true</pt></phrase>.</p>
		 </item>
		</olist>
	       </p>
	      </item>
	      <item>
	       <p role="otherwise">
		<olist role="andtest">
		 <item>
		  <!--*
* material suppressed here by diff group ep24 *
*-->
		  <p dg="ep24"><var>B</var>.<propref comp="std" prop="variety"/> 
		   = <pt>list</pt>.</p>
		 </item>
		 <item>
		  <p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>B</var>.<propref comp="std" prop="final"/></phrase> 
		    <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">does not</phrase> contain <pt>restriction</pt>.</p>
		 </item>
		 <item>
		  <p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>D</var>.</phrase><propref comp="std" prop="item type definition"/>
		   <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> validly <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> from 
		   <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>B</var></phrase><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="std" prop="item type definition"/><!--*
* material suppressed here by diff group cta-gst *
*-->, as defined in 
		   <specref ref="cos-st-derived-ok"/>.</p>
		 </item>
		 <item><!--*
* material suppressed here by diff group b5639 *
*-->
  		<p dg="b5639">All facets in <propref comp="std" prop="facets"/>
  		 are applicable to <var>D</var>, as specified in
		   <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#cos-applicable-facets">Applicable
		   Facets</xspecref>.</p>
		 </item>
		 <item>
		  <!--*
* material suppressed here by diff group b5639 *
*-->
	   <p dg="b5639">All facets in <propref comp="std" prop="facets"/>
	    satisfy the constraints on facet components given in the appropriate subsection
	    of <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#rf-facets">Constraining Facets</xtermref>.
	   </p>
		 </item>
		</olist>
	       </p>
	      </item>
	     </olist>
	     <p>The first case above will apply when a list is <!--*
* material suppressed here by diff group derive-1913 *
*--><phrase dg="derive-1913"><xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-constructed">constructed</xtermref></phrase> by
	      specifying an item type, the second when <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> by restriction from another list.</p>
	    </item>
	   </olist></p>
	 </item>
	 <item>
	  <p role="if"><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>D</var>.<propref comp="std" prop="variety"/></phrase> 
	   is <pt>union</pt></p>
	  <p role="then">
	   <olist role="andtest">
	    <!--*
* material suppressed here by diff group b2333 *
*-->
	    <item>
	     <olist role="Casetest">
	      <item>
	       <p role="if"><!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>B</var></phrase> is <!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase>      
	       </p>
	       <p role="then">
		<olist role="andtest">
		 <item>
		  <p>All of the <propref comp="std" prop="member type       definitions"/> <!--*
* material suppressed here by diff group modals *
*--> have a
		   <propref comp="std" prop="final"/> which does not contain <pt>union</pt>.</p>
		 </item>
		 <item>
		  <p><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>D</var>.</phrase><propref comp="std" prop="facets"/> 
		   <!--*
* material suppressed here by diff group ep24 *
*--> 
		   <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> empty.</p>
            </item>
           </olist>
           </p>
          </item>
	      <item>
	       <p role="otherwise">
		<olist role="andtest">
		 <item>
		  <!--*
* material suppressed here by diff group ep24 *
*-->
		  <p dg="ep24"><var>B</var>.<propref comp="std" prop="variety"/> 
		   = <pt>union</pt>.</p>
		 </item>
		 <item>
		  <p><!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>B</var><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase></phrase><propref comp="std" prop="final"/> 
		   <!--*
* material suppressed here by diff group ep22 *
*--> 
		   <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">does not</phrase> contain
		   <pt>restriction</pt>.</p>
		 </item>
		 <item>
		  <!--*
* material suppressed here by diff group ep24 *
*-->
		  <p dg="ep24">Each type definition in 
		   <var>D</var>.<propref comp="std" prop="member type definitions"/>
		   is validly <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> from the corresponding type definition in 
		   <var>B</var>.<propref comp="std" prop="member type definitions"/>, as
		   defined in <specref ref="cos-st-derived-ok"/>.</p>
		 </item>
		 <item><!--*
* material suppressed here by diff group b5639 *
*-->
  		<p dg="b5639">All facets in <propref comp="std" prop="facets"/>
  		 are applicable to <var>D</var>, as specified in
		   <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#cos-applicable-facets">Applicable
		   Facets</xspecref>.</p>
		 </item>
		 <item>
		  <!--*
* material suppressed here by diff group b5639 *
*-->
	   <p dg="b5639">All facets in <propref comp="std" prop="facets"/>
	    satisfy the constraints on facet components given in the appropriate subsection
	    of <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#rf-facets">Constraining Facets</xtermref>.
	   </p>
		 </item>
		</olist>
	       </p>
	      </item>
	     </olist>
          <p>The first case above will apply when a union is
<!--*
* material suppressed here by diff group derive-1913 *
*--><phrase dg="derive-1913"><xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-constructed">constructed</xtermref></phrase> by specifying one or more member types, the second
when <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> by restriction from another union.</p>
</item>
<!--*
* material suppressed here by diff group b2333-silent *
*-->
<item id="no-self-membership" dg="b2333">
<p><!--*
* material suppressed here by diff group b2182 *
*-->
<phrase dg="b2182">Neither 
<!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22"><var>D</var></phrase> 
nor <!--*
* material suppressed here by diff group ep22 *
*--><phrase dg="ep22">any</phrase> type
<!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> from it is</phrase> a member of its
own <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-transitivemembership">transitive 
membership</xtermref>.</p>
</item>
</olist></p>
</item>
   </olist></p>
   <!--*
* material suppressed here by diff group iff *
*-->
   <!--*
* material suppressed here by diff group b5639-silent *
*-->
</constraintnote>

<p dg="iff"><termdef id="cd-st-restriction" term="valid restriction">A
simple type definition <local>T</local> is a 
<term>valid restriction</term> of its <propref comp="std" prop="base type definition"/>
if and only if <local>T</local> satisfies constraint 
<specref ref="cos-st-restricts"/></termdef>.</p>
     </div4>
     <div4 id="sec-cos-st-derived-ok" dg="b5165a">
      <head dg="b5165a">Type Derivation OK (Simple)</head>

<p>The following constraint defines relations appealed to elsewhere in
this specification.</p>
<constraintnote id="cos-st-derived-ok" type="cos">
<head>Type Derivation OK (Simple)</head>
<p>For a simple type definition (call it <local>D</local>, for
<!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref>) to be validly <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> from a type definition (call this
<local>B</local>, for base) <!--*
* material suppressed here by diff group cta-gst *
*--><phrase dg="cta-gst">subject to a set of blocking keywords
drawn from the set</phrase> {<pt>extension</pt>,
<pt>restriction</pt>, <pt>list</pt>, <pt>union</pt>} (of which only
<pt>restriction</pt> is actually relevant<phrase dg="ep24">; call this set <var>S</var></phrase>)
<olist role="or">
<item id="c-stid"><!--* 1 *-->
<p>They are the same type definition.</p>
</item>
<item><!--* 2 *-->
<olist role="Andtest">     
<item><!--* 2.1 *-->
<p><pt>restriction</pt> is not in <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>S</var></phrase>, or in 
<!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><local>D</local>.<propref comp="std" prop="base type definition"/>.<propref comp="std" prop="final"/></phrase>;</p>
</item>
<item><!--* 2.2 *-->     
<olist role="OoMtest">
<item><!--* 2.2.1 *-->     
<p><local>D</local><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="std" prop="base type definition"/> <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">=</phrase> <local>B</local>.</p>
</item>
<item><!--* 2.2.2 *-->     
<p><local>D</local><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="std" prop="base type definition"/> is not <!--*
* material suppressed here by diff group b6227 *
*-->
<phrase dg="b6227"><!--*
* material suppressed here by diff group wd-200708-1 *
*--><phrase dg="wd-200708-1"><termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref></phrase></phrase> and is validly <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> from <local>B</local>
given <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>S</var></phrase>,
as defined by this constraint.</p>
</item>
<item><!--* 2.2.3 *-->     
<p><local>D</local><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="std" prop="variety"/> 
<!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">=</phrase> <pt>list</pt> or <pt>union</pt> and <local>B</local> is <!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase>.</p>
</item>
<item id="member_as_derived"><!--* 2.2.4 *-->     
<!--*
* material suppressed here by diff group b2333 *
*-->
<olist role="Andtest" dg="b2333">
<item><p><local>B</local><!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">.</phrase><propref comp="std" prop="variety"/> <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24">=</phrase>
<pt>union</pt>.</p>
</item>
<item>
<p><local>D</local> is validly <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> from <phrase dg="rq17-x">a type definition</phrase><!--*
* material suppressed here by diff group rq17-x *
*--> <local>M</local> in <local>B</local>'s
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-transitivemembership">transitive
membership</xtermref> given <!--*
* material suppressed here by diff group ep24 *
*--><phrase dg="ep24"><var>S</var></phrase>, as defined by this
constraint.</p>
</item>
<item>
<p>The <propref comp="std" prop="facets"/> property of <local>B</local>
and of any <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-interveningunion">intervening
union</xtermref> datatypes is empty.</p>
<note>
<p>It is a consequence of this requirement that the <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-value-space">value space</xtermref>, <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-lexical-space">lexical space</xtermref>, and
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-lexical-mapping">lexical
mapping</xtermref> of <local>D</local> will be subsets of those of
<local>B</local>.
</p>
</note><!--*
* material suppressed here by diff group add.b2333-feedback.cr.del-as-add *
*--><!--*
* material suppressed here by diff group add.b2333-feedback.cr.del-as-del *
*-->

</item>
<!--* <item>
<p>The <xtermref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-value-space">value
space</xtermref>, <xtermref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-lexical-space">lexical
space</xtermref>, and <xtermref
href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-lexical-mapping">lexical mapping</xtermref> of
<local>D</local> are subsets of those of <local>B</local>.
<note>
<p>The subset relation on value space, lexical space, and lexical
mapping requires in effect that <local>D</local> must enforce any
restrictions imposed by facets on <local>B</local> itself or on any
other union types through which <local>M</local> is a member of
<local>B</local>'s <xtermref
href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-transitivemembership">transitive
membership</xtermref>.</p>
</note>
</p>
</item>
*-->
</olist>
</item>
</olist> 
</item>
</olist>
</item>
</olist>    
</p>
<!--*
* material suppressed here by diff group rq17-x *
*-->
</constraintnote>
<note>
<p>With respect to <clauseref ref="c-stid"/>, see the Note on identity at
the end of <specref ref="no-identity"/> above.</p>
</note>
<note dg="cta-gst">
<p>When a simple type definition <var>S</var> is said to be 
<quote>validly <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref></quote> from a type definition <var>T</var>,
without mention of any specific set of blocking keywords,
then what is meant is that <var>S</var> is validly derived from
<var>T</var>, subject to the empty set of blocking keywords,
i.e. without any particular limitations.</p>
</note>
<note dg="cta-ed">
<p>It is a consequence of <clauseref ref="member_as_derived"/> that
the constraint <specref ref="cd-st-restriction"/> can hold between
a <compref ref="std"/> in the <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-transitivemembership">transitive membership</xtermref> of a union type, and the union type,
even though neither is actually <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> from the other.  The 
slightly misleading terminology is retained for historical reasons
and for compatibility with version 1.0 of this specification.
</p>
</note>
     </div4>
<div4 id="sec-st-restrict-facets" dg="b5165a">
<head dg="b5165a">Simple Type Restriction (Facets)</head>
  <constraintnote type="cos" id="st-restrict-facets">
   <head>Simple Type Restriction (Facets)</head>
   <p>For a simple type definition (call it <local>R</local>) to restrict another simple type
definition (call it <local>B</local>) with a
set of facets (call this <local>S</local>)
    <olist role="and">
     <item>
      <p>The <propref comp="std" prop="variety"/>  of <local>R</local> is the same as that of <local>B</local>.</p>
     </item>
     <item>
      <p>If <propref comp="std" prop="variety"/> is <pt>atomic</pt>, the 
<propref comp="std" prop="primitive type definition"/> of <local>R</local> is the same as that of <local>B</local>.</p>
     </item>
     <item id="c-fr">

	  <!--*
* material suppressed here by diff group iff *
*-->

	  <p dg="iff">The <propref comp="std" prop="facets"/> of <local>R</local>
	   <phrase diff="del" dg="b2783"><termref def="key-facets-restriction">constitute a restriction</termref> 
	    of the <propref comp="std" prop="facets"/> of
	    <local>B</local> with respect to <local>S</local></phrase><phrase diff="add" dg="b2783">are the <propref comp="std" prop="facets"/> of
	    <var>B</var> <termref def="key-facets-overlay">overlaid</termref> 
	    with <var>S</var></phrase>.</p>

	  <p>Additional constraint(s) <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">sometimes</phrase> apply depending on the kind of
	   facet, see the appropriate sub-section of <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#rf-facets">4.3 Constraining
	    Facets</xspecref>.</p>
     </item>
    </olist>
   </p>
   <!--*
* material suppressed here by diff group iff *
*-->
<p dg="iff"><termdef diff="del" id="key-facets-restriction" term="constitute a restriction" role="local" dg="b2783">  
Given three sets of facets <local>R</local>, <local>B</local>, and <local>S</local>,
<local>R</local> <term>constitutes a restriction</term> of <local>B</local>
with respect to <local>S</local> if and only if<!--*
* material suppressed here by diff group rec12-main *
*-->
</termdef>
<termdef id="key-facets-overlay" term="overlay" dg="b2783">  
<phrase diff="add" dg="b2783">Given two sets of facets <var>B</var> and <var>S</var>,
the result of <term>overlaying</term> <var>B</var> with <var>S</var> is the set of facets <var>R</var>
for which</phrase>
<!--*
* material suppressed here by diff group rec12-main *
*-->
<!--*
* material suppressed here by diff group rec12-main-eg-1852-override *
*-->
 <olist dg="eg-1852" role="andtest">
  <item id="fr1">
   <p>Every facet in <local>S</local> is in <local>R</local>.</p>
  </item>
  <item id="fr2"><p>
   Every facet in <local>B</local> is in <local>R</local>,
   <phrase dg="b4034">unless</phrase>
   <!--*
* material suppressed here by diff group b4034 *
*-->
   it is <!--*
* material suppressed here by diff group b4034 *
*--> of the same kind as some
   facet in <local>S</local><phrase dg="f2f0701a">,
   in which case it is not included in <local>R</local></phrase>.
  </p></item>
  <item>
      <p>Every facet in <local>R</local> is required by <clauseref ref="fr1"/>
or <clauseref ref="fr2"/> above.</p>
     </item>
 </olist>
</termdef>
</p>  </constraintnote>

<!--* I think it would be cleaner to say that F is the sum of
    * G and S, or something, but I think that would take me
    * further afield than I want to go with the iff proposal.
    *-->
     </div4>
</div3>

 <div3 id="builtin-stds">
  <head>Built-in Simple Type Definition<phrase dg="dgaat">s</phrase></head>

<div4 id="sec-anySimpleType">
      <head><code>xs:anySimpleType</code></head>
 <p><!--*
* material suppressed here by diff group std-1915 *
*-->
<phrase dg="std-1915">The <compref ref="std"/> of <!--*
* material suppressed here by diff group eg-1852 *
*--><xspecref xmlns:xlink="http://www.w3.org/1999/xlink" dg="eg-1852" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#anySimpleType">anySimpleType</xspecref>
is</phrase>
present in every schema<!--*
* material suppressed here by diff group std-1915 *
*-->.  
It has the following properties:</p>

 <schemaComp id="simple-ur-type-itself">
     <head>Simple Type Definition of <!--*
* material suppressed here by diff group std-1915 *
*--><phrase dg="std-1915">anySimpleType</phrase></head>

<!--* The WG said to align this "as closely as possible" with Datatypes 4.1.6,
    * so I've resequenced this to agree with the sequence in Datatypes.
    * The resequencing has not been marked.  If you need to reconstruct the
    * old order, check version 1.6.2.69. *-->
     <pvlist>
      <pvpair comp="std" prop="name"><string>anySimpleType</string></pvpair>
      <pvpair comp="std" prop="target namespace"><string>http://www.w3.org/2001/XMLSchema</string></pvpair>
      <pvpair comp="std" prop="final">The empty set</pvpair>
      <!--*
* material suppressed here by diff group std-1915-scope *
*-->
      <pvpair comp="std" prop="context" dg="std-1915"><termref def="key-null"/></pvpair>
      <pvpair comp="std" prop="base type definition"><!--*
* material suppressed here by diff group wd-200708-1 *
*--><termref def="any-type-itself" dg="wd-200708-1"><phrase><code>xs:anyType</code></phrase></termref></pvpair>
      <!--* facets, fundamental facets, and annotations were all added after 200502,
          * so I'm moving the add markup from embedded phrases to the pvpairs.
          *-->
      <pvpair comp="std" prop="facets" dg="rec12-main">The empty set</pvpair>
      <pvpair comp="std" prop="fundamental facets" dg="rec12-main">The empty set</pvpair>
      <pvpair comp="std" prop="variety"><termref def="key-null"/></pvpair>
      <pvpair comp="std" prop="primitive type definition" dg="ast-pim"><termref def="key-null"/></pvpair>
      <pvpair comp="std" prop="item type definition" dg="ast-pim"><termref def="key-null"/></pvpair>
      <pvpair comp="std" prop="member type definitions" dg="ast-pim"><termref def="key-null"/></pvpair>
      <pvpair comp="std" prop="annotations" dg="rec12-main">The empty sequence</pvpair>
     </pvlist>
    </schemaComp>
  <p>The <!--*
* material suppressed here by diff group std-1915 *
*--><phrase dg="std-1915">definition
of <!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase></phrase> is the 
root of the simple type definition
 hierarchy, and as such mediates between the other simple type
 definitions, which all eventually trace back to it via their 
<propref comp="std" prop="base type definition"/> properties, 
and 
<!--*
* material suppressed here by diff group std-1915 *
*--><phrase dg="std-1915"><!--*
* material suppressed here by diff group wd-200708-1 *
*--><phrase dg="wd-200708-1"><termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref></phrase></phrase>, which is
<emph>its</emph> <propref comp="std" prop="base type definition"/>.<!--*
* material suppressed here by diff group eg-1852 *
*--></p>
<!--*
  <issue id="RQ-141i" role="1.1">
	    <p><loc href="&reqs;#anyAtomicType" target="reqs">RQ-141 (anyAtomicType)</loc></p>
   <p>The XML Query Working Group has had to introduce a new high-level simple
type definition into the type hierarchy to have a handle on all and only the
atomic simple type definitions (i.e. no lists or unions).  This will be
added now to this spec. with the name <code>anyAtomicType</code>.</p>
    <resolution>
     <p>Add anyAtomicType as the supertype of all atomics and the
child of anySimpleType.</p>
    </resolution>
	    </issue>
*-->
     </div4>
     <div4 id="sec-anyAtomicType">
      <head><code>xs:anyAtomicType</code></head>
      <p dg="dgaat">
<!--*
* material suppressed here by diff group eg-1852 *
*-->
 <phrase dg="eg-1852">The <compref ref="std"/> of <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" dg="eg-1852" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#anyAtomicType">anyAtomicType</xspecref>
is present in every schema</phrase>.  
It has the following properties:</p>
 <schemaComp id="aat-def" dg="dgaat">
<!--* Properties resequenced to simplify collation between Datatypes and Structures -msm *-->
     <head>Simple Type Definition of anyAtomicType</head>
     <pvlist>
      <pvpair comp="std" prop="name"><string>anyAtomicType</string></pvpair>
      <pvpair comp="std" prop="target namespace"><string>http://www.w3.org/2001/XMLSchema</string></pvpair>
      <pvpair comp="std" prop="final">The empty set</pvpair>
      <!--*
* material suppressed here by diff group std-1915-scope *
*-->
      <pvpair comp="std" prop="context" dg="std-1915"><termref def="key-null"/></pvpair>
      <pvpair comp="std" prop="base type definition"><termref def="simple-ur-type-itself"><!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><code>xs:anySimpleType</code></phrase></termref></pvpair>
      <pvpair comp="std" prop="facets" dg="rec12-main">The empty set</pvpair>
      <pvpair comp="std" prop="fundamental facets" dg="rec12-main">The empty set</pvpair>
      <pvpair comp="std" prop="variety"><pt>atomic</pt></pvpair>
      <pvpair comp="std" prop="primitive type definition" dg="ast-pim"><termref def="key-null"/></pvpair>
      <pvpair comp="std" prop="item type definition" dg="ast-pim"><termref def="key-null"/></pvpair>
      <pvpair comp="std" prop="member type definitions" dg="ast-pim"><termref def="key-null"/></pvpair>
      <pvpair comp="std" prop="annotations" dg="rec12-main">The empty sequence</pvpair>
     </pvlist>
    </schemaComp>
<!--* Here, rec12-main is not only making the text harder to read, it's
    * introducing a deviation from the wording of Datatypes.
    * Bad idea. *-->
     </div4>


     <div4 id="xsd-error" dg="cta-error">
      <head><code>xs:error</code></head>
      
      <p>A <compref ref="std"/> for <termref def="key-error"><phrase><code>xs:error</code></phrase></termref> is present in every schema
       by definition.  It has the following properties:</p>
      
      <schemaComp id="xsd-error-tableau">
       <head>Simple Type Definition of <code>xs:error</code></head>
       <pvlist>
	<pvpair comp="std" prop="name"><string>error</string></pvpair>
	<pvpair comp="std" prop="target namespace"><string>http://www.w3.org/2001/XMLSchema</string></pvpair>
	<pvpair comp="std" prop="final">{<pt>extension</pt>, <pt>restriction</pt>, 
	 <pt>list</pt>, <pt>union</pt>}</pvpair>
      
	<pvpair comp="std" prop="context"><termref def="key-null"/></pvpair>
	<pvpair comp="std" prop="base type definition"><termref def="simple-ur-type-itself"><phrase><code>xs:anySimpleType</code></phrase></termref></pvpair>
	<!--* facets, fundamental facets, and annotations were all added after 200502,
            * so I'm moving the add markup from embedded phrases to the pvpairs.
            *-->
	<pvpair comp="std" prop="facets">The empty set</pvpair>
	<pvpair comp="std" prop="fundamental facets">The empty set</pvpair>
	<pvpair comp="std" prop="variety"><pt>union</pt></pvpair>
	<pvpair comp="std" prop="primitive type definition"><termref def="key-null"/></pvpair>
	<pvpair comp="std" prop="item type definition"><termref def="key-null"/></pvpair>
	<pvpair comp="std" prop="member type definitions">The empty sequence</pvpair>
	<pvpair comp="std" prop="annotations">The empty sequence</pvpair>
       </pvlist>
      </schemaComp>
      
      <note>
       <p>The datatype <code>xs:error</code> has no valid instances
	(i.e. it has an empty value space and an empty lexical space).
	This is a natural consequence of its construction:  a value is
	a value of a union type if and only if it is a value of at
	least one member of the <propref comp="std" prop="member type   definitions"/> of the union.  Since <code>xs:error</code> has
	no member type definitions, there can be no values which are
	values of at least one of its member types.  And since the value
	space is empty, the lexical space is also empty.</p>
       <p>The type <code>xs:error</code> is expected to be used
	mostly in conditional type assignment.  Whenever it serves as the
	<termref def="key-governing"/> type definition for an attribute or element information
	item, that item will be invalid.</p>
      </note>
      
     </div4>

     <div4 id="sec-builtin-primitives">
      <head>Built-in primitive datatypes</head>
      <p>Simple type definitions <!--*
* material suppressed here by diff group rec12-main *
*--><phrase dg="rec12-main">corresponding to</phrase> all the built-in
       primitive datatypes, namely <pt>string</pt>, <pt>boolean</pt>,
       <pt>float</pt>, <pt>double</pt>, <!--*
* material suppressed here by diff group rec12-main *
*--><pt dg="rec12-main">decimal</pt><phrase dg="rec12-main">, <pt>precisionDecimal</pt></phrase>,
       <pt>dateTime</pt>, <pt>duration</pt>, <pt>time</pt>,
       <pt>date</pt>, <pt>gMonth</pt>, <pt>gMonthDay</pt>,
       <pt>gDay</pt>, <pt>gYear</pt>, <pt>gYearMonth</pt>,
       <pt>hexBinary</pt>, <pt>base64Binary</pt>,
       <pt>anyURI</pt><phrase dg="rec12-main">,
	<pt>QName</pt> and <pt>NOTATION</pt></phrase> (see the
       <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#built-in-primitive-datatypes">Primitive
	Datatypes</xtermref> section of <bibref ref="ref-xsp2"/>) are present by
       definition in
       every schema<!--*
* material suppressed here by diff group rec12-main *
*--><phrase dg="rec12-main">
	as follows:</phrase></p>

<schemaComp id="dummy-def" dg="rec12-main">
<head alt="Simple Type Definition corresponding to the built-in primitive datatypes"><compref ref="std"/> corresponding to the built-in primitive datatypes</head>

<pvlist>
<pvpair comp="std" prop="name">[as appropriate]</pvpair>
<pvpair comp="std" prop="target namespace"><string>http://www.w3.org/2001/XMLSchema</string></pvpair>
<pvpair comp="std" prop="base type definition"><termref def="aat-def"><!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><code>xs:anyAtomicType</code></phrase></termref></pvpair>
<pvpair comp="std" prop="final">The empty set</pvpair>
<pvpair comp="std" prop="variety"><pt>atomic</pt></pvpair>
<pvpair comp="std" prop="primitive type definition">[this simple type
definition itself]</pvpair>
<pvpair comp="std" prop="facets">{a <compref ref="f-w" name="whitespace"/> facet with 
<xpropref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#f-w-value">value</xpropref> =
<pt>collapse</pt> and <xpropref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#f-w-fixed">fixed</xpropref> = <pt>true</pt> in all cases except
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#string">string</xtermref>, which has
<xpropref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#f-w-value">value</xpropref> =
<pt>preserve</pt> and <xpropref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#f-w-fixed">fixed</xpropref> = <pt>false</pt>}</pvpair>
<pvpair comp="std" prop="fundamental facets"><p>[as appropriate]</p></pvpair>
<!--*
* material suppressed here by diff group std-1915 *
*-->
<pvpair comp="std" prop="context" dg="std-1915"><termref def="key-null"/></pvpair>
<pvpair comp="std" prop="item type definition"><termref def="key-null"/></pvpair>
<pvpair comp="std" prop="member type definitions"><termref def="key-null"/></pvpair>
<pvpair comp="std" prop="annotations">The empty sequence</pvpair>
</pvlist><!--{<ulist>
<item><p>an <xspecref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ff-o">ordered</xspecref> <compref ref="ff" name="Fundamental Facet"/>
with <propref comp="ff-o" prop="value"/> = <pt>total</pt></p></item>
<item><p>a <xspecref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ff-b">bounded</xspecref> <compref ref="ff" name="Fundamental Facet"/>
with <propref comp="ff-b" prop="value"/> = <pt>false</pt></p></item>
<item><p>a <xspecref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ff-c">cardinality</xspecref> <compref ref="ff" name="Fundamental Facet"/>
with <propref comp="ff-c" prop="value"/> = <pt>countable</pt></p></item>
<item><p>a <compref ref="ff-n"/> <compref ref="ff" name="Fundamental Facet"/>
with <propref comp="ff-n" prop="value"/> = <pt>true</pt></p></item>
</ulist>}-->
</schemaComp>

      <p dg="b3251">
       All conforming implementations of this specification
       <rfc2119>must</rfc2119> support all the primitive datatypes defined in <bibref ref="ref-xsp2"/>.
       It is <termref def="key-impl-defined">implementation-defined</termref> whether additional primitive datatypes
       are supported, and whether, if so, they are automatically
       incorporated in every schema or not.  If <termref def="key-impl-defined">implementation-defined</termref>
       primitives are supported, the implementation <rfc2119>must</rfc2119>
       satisfy the rules for <termref def="key-impl-defined">implementation-defined</termref> primitive datatypes
       described in <bibref ref="ref-xsp2"/>.
      </p>

      <p dg="b3251"><termdef id="key-automatic" term="automatically known">
	A type about which a processor possesses prior knowledge, and 
	which the processor can support without any declaration of the
	type being supplied by the user, is said to be <term>automatically known</term>
	to the processor.	
       </termdef></p>

      <note dg="b3251">
       <p>By their nature, primitive types can be supported by a
	processor only if <termref def="key-automatic">automatically known</termref> to that processor.</p>
       <p>Types <termref def="key-automatic">automatically known</termref> to a processor, whether primitive or
	derived, can be included automatically by that processor in
	all schemas, but need not be.  It is possible, for example,
	for a processor to have built-in prior knowledge of a set of
	primitive and derived types, but to include them in the schema
	only when the relevant namespace is explicitly imported, or a
	given run-time option is selected, or on some other
	conditions; such conditions are not defined by this
	specification.
       </p>
      </note>

      <note dg="b3251">
       <p>The definition of <quote><termref def="key-automatic">automatically known</termref></quote> is not 
	intended to prevent implementations from allowing users
	to specify new primitive types.
	If an implementation defines a mechanism by which users can
	define or supply an implementation of a primitive type, then
	when those mechanisms are successfully used, such user-supplied
	types are <termref def="key-automatic">automatically known</termref> to the implementation, as that term is
	used in this specification.</p>
      </note>

     </div4>
     <div4 id="sec-other-builtins">
      <head>Other built-in datatypes</head>
      <p>Similarly, simple type definitions <!--*
* material suppressed here by diff group rec12-main *
*--><phrase dg="rec12-main">corresponding to</phrase> all the<phrase dg="derive-1913"> other</phrase> built-in<!--*
* material suppressed here by diff group derive-1913 *
*--> datatypes (see the <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ordinary-built-ins"><!--*
* material suppressed here by diff group derive-1913 *
*--><phrase dg="derive-1913">Other Built-in</phrase> Datatypes</xspecref> section
of <bibref ref="ref-xsp2"/>) are present by definition in
every schema, with properties as specified in <bibref ref="ref-xsp2"/> and as
represented in XML in <!--*
* material suppressed here by diff group rec12-main *
*--><!--*
* material suppressed here by diff group eg-1852 *
*--><xspecref xmlns:xlink="http://www.w3.org/1999/xlink" dg="eg-1852" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#drvd.nxsd">Illustrative XML representations for the built-in ordinary type definitions</xspecref>.</p>

<schemaComp id="dummy-ddef" dg="eg-1852">
<head alt="Simple Type Definition corresponding to the built-in ordinary datatypes"><compref ref="std"/> corresponding to the ordinary built-in datatypes</head>

<pvlist>
<pvpair comp="std" prop="name">[as appropriate]</pvpair>
<pvpair comp="std" prop="target namespace"><string>http://www.w3.org/2001/XMLSchema</string></pvpair>
<pvpair comp="std" prop="base type definition">[as specified in the appropriate
sub-section of <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ordinary-built-ins">Other Built-in Datatypes</xspecref>]</pvpair>
<pvpair comp="std" prop="final">The empty set</pvpair>
<pvpair comp="std" prop="variety">[<pt>atomic</pt> or <pt>list</pt>, as specified in the appropriate
sub-section of <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ordinary-built-ins">Other Built-in Datatypes</xspecref>]</pvpair>
<pvpair comp="std" prop="primitive type definition">[if <propref comp="std" prop="variety"/> is
<pt>atomic</pt>, then the <propref comp="std" prop="primitive type definition"/> of the <propref comp="std" prop="base type definition"/>, otherwise <termref def="key-null"/>]</pvpair>
<pvpair comp="std" prop="facets">[as specified in the appropriate
sub-section of <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ordinary-built-ins">Other Built-in Datatypes</xspecref>]</pvpair>
<pvpair comp="std" prop="fundamental facets">[as specified in the appropriate
sub-section of <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ordinary-built-ins">Other Built-in Datatypes</xspecref>]</pvpair>
<pvpair comp="std" prop="context"><termref def="key-null"/></pvpair>
<pvpair comp="std" prop="item type definition">if <propref comp="std" prop="variety"/> is
<pt>atomic</pt>, then <termref def="key-null"/>, otherwise as specified in the appropriate
sub-section of <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ordinary-built-ins">Other Built-in Datatypes</xspecref>]</pvpair>
<pvpair comp="std" prop="member type definitions"><termref def="key-null"/></pvpair>
<pvpair comp="std" prop="annotations">As shown in the XML representations
of the ordinary built-in datatypes in <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" dg="eg-1852" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#drvd.nxsd">Illustrative XML representations for the built-in ordinary type definitions</xspecref></pvpair>
</pvlist>
</schemaComp>

      <p dg="b3251">
       All conforming implementations of this specification
       <rfc2119>must</rfc2119> support all the built-in datatypes defined in <bibref ref="ref-xsp2"/>.
       It is <termref def="key-impl-defined">implementation-defined</termref> whether additional derived types
       are <termref def="key-automatic">automatically known</termref> to the implementation without declaration
       and whether, if so, they are automatically
       incorporated in every schema or not.
      </p>
      <!--*
* material suppressed here by diff group pre *
*-->

     </div4>
 </div3>
   </div2>
   <div2 id="Schemas">
    <head><phrase dg="ep99">Schemas as a Whole</phrase><!--*
* material suppressed here by diff group ep99 *
*--></head>
    <p>A schema consists of a set of schema components.</p>
    <note role="example">
        <eg xml:space="preserve">&lt;xs:schema
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.example.com/example"&gt;
  . . .
&lt;/xs:schema&gt;</eg>
        <p>The XML representation of the skeleton of a schema.</p>
    </note>
    <div3 id="Schema_details">
     <head><phrase dg="ep99">The Schema Itself</phrase><!--*
* material suppressed here by diff group ep99 *
*--></head>
    <p>At the abstract level, the schema itself is just a container
for its components.</p>
<!--* <issue id="RQ-16i" role="1.1">
< ! - - * 
<p>
<loc href="&reqs;#id-components" target="reqs"
>RQ-16 (id-components)</loc>, 
<loc href="&reqs;#scd-accessible-constraints" target="reqs"
>RQ-133 (scd-accessible-constraints)</loc>
</p> * - - >
<p>
<loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=3045" target="reqs"
>Issue 3045 (RQ-16 identity constraints)</loc>, 
<loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=3044" target="reqs"
>Issue 3044 (RQ-133 SCD-accessible constraints)</loc>
</p>
<p>Version 1.0 provides a property of the top-level 'schema'
component for every kind of named component <emph>except</emph>
identity constraints.  This omission will be rectified by giving it an
[identity constraints] property.</p>
<resolution>
<p>Add an [identity constraints] property of the schema
component, which contains all the identity constraint components.</p>
</resolution>
</issue> *-->
    <compdef name="Schema" abbrev="s" showAKO="true"/>
    <!--*
* material suppressed here by diff group b5918a *
*-->
    </div3>
    <div3 id="declare-schema">
      <head><phrase dg="b5159b">XML Representations of Schemas</phrase><!--*
* material suppressed here by diff group b5159b *
*--></head>
     <p>A schema is represented in XML by one or more <termref def="key-schemaDoc">schema documents</termref>, that is, one or more <eltref ref="schema"/> element information items.  A <termref def="key-schemaDoc">schema document</termref> contains representations for a collection of schema components, e.g. type definitions and element declarations, which have a common <xpropref role="anon">target namespace</xpropref>.  A <termref def="key-schemaDoc">schema document</termref> which has one or more <eltref ref="import"/> element information items corresponds to a schema with components with more than one <xpropref role="anon">target namespace</xpropref>, see <specref ref="src-import"/>.</p>
     
     <!--*
* material suppressed here by diff group b5152-movement *
*-->

     <reprdef dg="b5152-movement">
      <reprelt id="xr.sch0" dg="b5152-movement" eltname="schema"/>
      <reprelt id="xr.sch1-bis" eltname="defaultOpenContent" dg="vm13"/>
     </reprdef>
     <p dg="b5152">The <eltref ref="schema"/> element information item
      maps to a <compref ref="s"/> component as follows.</p>
     <reprdef dg="b5152-movement">
      <reprcomp id="xr.sch2" dg="b5152-movement" abstract="Schema" ref="key-schema">
       <propmap comp="s" prop="type definitions"><phrase id="anchor5918"/>The simple and complex type definitions
corresponding to all the <eltref ref="simpleType"/> and <eltref ref="complexType"/> element information items in the
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if any, plus any <!--*
* material suppressed here by diff group b5918 *
*-->
        <phrase dg="b5918">definitions brought in via
         <eltref ref="include"/> (see <specref ref="compound-schema"/>),
         <eltref ref="redefine"/> (see <specref ref="modify-schema"/>) and
         <eltref ref="import"/> (see <specref ref="composition-schemaImport"/>).</phrase>
       </propmap>
       <propmap comp="s" prop="attribute declarations">The (top-level) attribute declarations
corresponding to all the <eltref ref="attribute"/> element information items in the
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if any, plus any <!--*
* material suppressed here by diff group b5918 *
*-->
        <phrase dg="b5918">declarations brought in via
         <eltref ref="include"/>, <eltref ref="redefine"/> and
         <eltref ref="import"/>.</phrase>
       </propmap>
       <propmap comp="s" prop="element declarations">The (top-level) element declarations
corresponding to all the <eltref ref="element"/> element information items in the
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if any, plus any <!--*
* material suppressed here by diff group b5918 *
*-->
        <phrase dg="b5918">declarations brought in via
         <eltref ref="include"/>, <eltref ref="redefine"/> and
         <eltref ref="import"/>.</phrase>
       </propmap>
       <propmap comp="s" prop="attribute group definitions">The attribute group definitions
corresponding to all the <eltref ref="attributeGroup" inside="simpleContent"/> element information items in the
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if any, plus any <!--*
* material suppressed here by diff group b5918 *
*-->
        <phrase dg="b5918">definitions brought in via
         <eltref ref="include"/>, <eltref ref="redefine"/> and
         <eltref ref="import"/>.</phrase>
       </propmap>
       <propmap comp="s" prop="model group definitions">The model group definitions
corresponding to all the <eltref ref="group"/> element information items in the
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if any, plus any <!--*
* material suppressed here by diff group b5918 *
*-->
        <phrase dg="b5918">definitions brought in via
         <eltref ref="include"/>, <eltref ref="redefine"/> and
         <eltref ref="import"/>.</phrase>
       </propmap>
       <propmap comp="s" prop="notation declarations">The notation declarations
corresponding to all the <eltref ref="notation"/> element information items in the
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if any, plus any <!--*
* material suppressed here by diff group b5918 *
*-->
        <phrase dg="b5918">declarations brought in via
         <eltref ref="include"/>, <eltref ref="redefine"/> and
         <eltref ref="import"/>.</phrase>
       </propmap>
       <propmap comp="s" prop="identity-constraint definitions" dg="fpwd">The identity-constraint definitions
corresponding to all the <eltref ref="key"/>, <eltref ref="keyref"/> and
<eltref ref="unique"/> element information items anywhere within the
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if any, plus any <!--*
* material suppressed here by diff group b5918 *
*-->
        <phrase dg="b5918">definitions brought in via
         <eltref ref="include"/>, <eltref ref="redefine"/> and
         <eltref ref="import"/>.</phrase>
       </propmap>
       <propmap comp="s" prop="annotations">
        <!--*
* material suppressed here by diff group bannotations-1 *
*-->
        <phrase dg="bannotations-2">
         The <termref def="key-am-set"/> of the set of elements containing the
         <eltref ref="schema"/> and all the <eltref ref="include"/>,
         <eltref ref="redefine"/>,
         <phrase dg="b4767"><eltref ref="override"/>,</phrase>
         <!--*
* material suppressed here by diff group b4439 *
*-->
         <eltref ref="import"/>
         <phrase dg="b4439"> and <eltref ref="defaultOpenContent"/></phrase>
         <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, if any,
         as defined in <specref ref="declare-annotation"/>.
        </phrase>
       </propmap>
      </reprcomp>
     </reprdef>
     <p>Note that none of the attribute information items displayed above
correspond directly to properties of schemas.  The <code>blockDefault</code>,
<code>finalDefault</code>, <code>attributeFormDefault</code>, <code>elementFormDefault</code> and <code>targetNamespace</code> attributes are appealed to in the sub-sections above, as they provide
global information applicable to many representation/component correspondences.  The
other attributes (<code>id</code> and <code>version</code>) are for user
convenience, and this specification defines no semantics for them.</p>
 <p>The definition of the schema abstract data model in <specref ref="concepts-data-model"/> makes clear that most components have a <xpropref role="anon">target namespace</xpropref>.  Most components corresponding to representations within a given <eltref ref="schema"/> element information item will have a <xpropref role="anon">target namespace</xpropref> which corresponds to the <code>targetNamespace</code> attribute. </p>
     <p>Since the empty string is not a legal namespace name, supplying
an empty string for <code>targetNamespace</code> is incoherent, and is <emph>not</emph> the same
as not specifying it at all.  The appropriate form of schema document
corresponding to a <termref def="key-schema">schema</termref> whose components have no
<propref comp="ed" prop="target namespace"/> is one which has no
<code>targetNamespace</code> attribute specified at all.</p>
     <note><p><!--*
* material suppressed here by diff group b1838 *
*--><phrase dg="b1838"><!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-namespaces-1.1" dg="b1838refs"/></phrase> 
discusses only instance document syntax for
elements and attributes; it therefore provides no direct framework for managing
the names of type definitions, attribute group definitions, and so on.
Nevertheless, the specification applies the target namespace facility uniformly to all
schema components, i.e. not only declarations but also definitions have a <xpropref role="anon">target namespace</xpropref>.</p>
</note>
     <p>Although the example schema at the beginning of this section might be a complete XML document, <eltref ref="schema"/>
need not be the document element, but can appear within other documents.
Indeed there is no requirement that a schema correspond to a (text) document
at all:  it could correspond to an element information item constructed 'by
hand', for instance via a DOM-conformant API.</p>
<p dg="b5918a">Aside from <eltref ref="include"/> and <eltref ref="import"/>,
which do not correspond directly to any schema component at all, each
of the element information items which <!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase> appear in the content
of <eltref ref="schema"/>
corresponds to a schema component, and all except <eltref ref="annotation"/> are
named.  The sections below present each such item in turn, setting out
the components to which it <!--*
* material suppressed here by diff group may *
*-->
correspond<phrase dg="may">s</phrase>.</p>
<!--*
* material suppressed here by diff group b5918a *
*-->

<div4 id="refSchemaConstructs">
<head>References to Schema Components</head>

<p>Reference to schema components from a schema document is managed in
a uniform way, whether the component corresponds to an element
information item from the same schema document or is imported
(<specref ref="composition-schemaImport"/>) from an external schema
(which <!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase>, but need not, correspond to an actual schema
document). The form of all such references is a <termref def="gloss-QName">QName</termref>.</p>
<p><termdef id="gloss-QName" term="QName">A <term>QName</term> is a
name with an optional namespace qualification, as defined in <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-namespaces-1.1" dg="b1838refs"/>.  When used in connection with the XML
representation of schema components or references to them, this refers
to the simple type <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#QName">QName</xtermref>
as defined in <bibref ref="ref-xsp2"/></termdef>.
<phrase dg="b5286b">For brevity, the term <termref def="gloss-QName"/>
is also used to refer to <termref def="key-vv">actual values</termref> in the value space of the
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#QName">QName</xtermref> simple type, which are
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded names</xspecref> with a 
<!--* Why are the following termdefs? *-->
<termdef id="q-local" term="local name" role="local"><term>local name</term></termdef>
and a 
<termdef id="q-uri" term="namespace name" role="local"><term>namespace name</term></termdef>.</phrase>
</p>

<p><termdef id="gloss-NCName" term="NCName">An <term>NCName</term> is
a name with no colon, as defined in <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-namespaces-1.1" dg="b1838refs"/>.  When used in connection with the XML
representation of schema components in this specification, this refers
to the simple type <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#NCName">NCName</xtermref> as defined in <bibref ref="ref-xsp2"/></termdef>.</p>
<note dg="b1838"><p>It is <termref def="key-impl-defined">implementation-defined</termref> whether a
schema processor supports the definitions of <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#NT-QName">QName</xnt> and <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#NT-NCName">NCName</xnt> found in <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-namespaces-1.1" dg="b1838refs"/> or those found in <bibref ref="ref-xml-namespaces-1.0"/> or both.
</p></note>
 <p dg="b5286e"><termdef id="key-resolve" term="resolve">
  A <termref def="gloss-QName">QName</termref> in a schema document
  <term>resolves to</term> a component in a schema if and only if in the
  context of that schema the QName and the component together satisfy the rule
  <specref ref="src-resolve"/>. A <termref def="gloss-QName">QName</termref> in
  an input document, or a pair consisting of a local name and a namespace name, 
  <term>resolves to</term> a component in a schema if and only if in the
  context of that schema the QName (or the name + namespace pair) and the
  component together satisfy the rule <specref ref="cvc-resolve-instance"/>.
 </termdef></p>
<p>In each of the XML
representation expositions in the following sections, an attribute is shown as
having type <code>QName</code> if and only if it is
interpreted as referencing a schema component.</p>

  <note role="example">
    <eg xml:space="preserve">&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns:xhtml="http://www.w3.org/1999/xhtml"
            xmlns="http://www.example.com"
            targetNamespace="http://www.example.com"&gt;
  . . .

  &lt;xs:element name="elem1" type="Address"/&gt;

  &lt;xs:element name="elem2" type="xhtml:blockquote"/&gt;

  &lt;xs:attribute name="attr1"
                type="xsl:quantity"/&gt;
  . . .
&lt;/xs:schema&gt;

</eg>
    <p>The first of these is most probably a local reference, i.e. a reference
to a type
definition corresponding to a <eltref ref="complexType"/> element information item
located elsewhere in the schema document, the other two refer to type
definitions from schemas for other namespaces and assume that their namespaces
have been declared for import.  See <specref ref="composition-schemaImport"/> for a discussion of importing.</p>
</note>
</div4>
    <div4 id="sec-refs-from-elsewhere">
  <head>References to Schema Components from Elsewhere</head>
    <p><phrase id="anchor5167a1"/>
     The names of schema components such as type definitions and element
declarations are not of type <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ID">ID</xtermref>:  they are not
unique within a schema, just within a symbol space.  This means that simple
fragment identifiers <phrase diff="add" dg="b5167a">using these names</phrase>
will not <phrase diff="del" dg="b5167a">always</phrase> work to reference schema components from outside
the context of schema documents.</p>
     <p diff="add" dg="b5167a">The preferred way to refer to schema components
     is to use <bibref ref="ref-scds"/>, which defines a mechanism to designate
     schema components using the <code>xscd()</code> <bibref ref="ref-xpointer"/>
     scheme.</p>
    <p diff="del" dg="b5167a">There is currently no provision in the definition of the interpretation
of fragment identifiers for the <code>text/xml</code> MIME type, which is the
MIME type for schemas, for referencing
schema components as such.  However, 
<bibref ref="ref-xpointer"/> provides a mechanism which maps well onto the
notion of symbol spaces as it is reflected in the XML representation of schema components.
A fragment identifier of the form
<code>#xpointer(xs:schema/xs:element[@name="person"])</code> will uniquely identify
the representation of a top-level element declaration with name <code>person</code>, and similar fragment
identifiers can obviously be constructed for the other global symbol spaces.</p>
  <p diff="del" dg="b5167a">Short-form fragment identifiers <!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase> also be used in some cases, that is
when a DTD or <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--> schema</phrase> is available for the schema in question, and the
provision of an <code>id</code> attribute for the representations of all primary and secondary schema
components, which <emph>is</emph> of type
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ID">ID</xtermref>, has been exploited.</p>
     
  <p><phrase diff="add" dg="b5167a">Alternatively, references to specific
element information items in the schema document can be interpreted as to their
corresponding schema documents. This can be done using mechanisms supported by
<bibref ref="ref-xpointer"/>, for example, by using shorthand pointers.</phrase>
It is a matter for applications to specify whether they interpret
<phrase diff="del" dg="b5167a">document-level</phrase><phrase diff="add" dg="b5167a">these</phrase>
references <phrase diff="del" dg="b5167a">of either of the above varieties</phrase>
as being to the relevant element information item (i.e. without
special recognition of the relation of schema documents to schema components) or as being to the
corresponding schema component.</p>
 </div4>
</div3>

    <div3 id="coxr.schemas">
     <head>Constraints on <phrase dg="b5159b">XML Representations of Schemas</phrase><!--*
* material suppressed here by diff group b5159b *
*--></head>
     <p dg="b5286e">None<phrase dg="ep99"> as such</phrase>.</p>

     <!--*
* material suppressed here by diff group b5286-silent *
*-->

     <!--*
* material suppressed here by diff group b5286b *
*-->
     <!--*
* material suppressed here by diff group b5286e *
*-->
    </div3>
    <div3 id="sec-del-cvc-resolve-instance">
     <head>Validation Rules for Schemas as a Whole</head>
 <!--*
* material suppressed here by diff group b5286e *
*-->
   <!--*
* material suppressed here by diff group b5286e *
*-->
     <p dg="b5286e">None<phrase dg="ep99"> as such</phrase>.</p>
    </div3>
    <div3 id="sec-sic-schema-all">
     <head>Schema Information Set Contributions</head>

<div4 id="sec-sic-schema" dg="b5165b">
<head dg="b5165b">Schema Information</head>
     <constraintnote type="sic" id="sic-schema">
     <head>Schema Information</head>
     <p>Schema components provide a wealth of information about the
basis of <termref def="key-va"/>, which <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">can often be useful for</phrase> subsequent
processing.  Reflecting component structure into a form suitable for
inclusion in the <termref def="key-psvi">post-schema-validation infoset</termref> is the way this specification provides for
making this information available.</p>
     <p>Accordingly, <termdef id="key-iso" term="item isomorphic to a component"> by an <term>item isomorphic</term> to a component is meant
an information item whose type is equivalent to the component's, with
one property per property of the component, with the same name, and
value either the same atomic value, or an information item
corresponding in the same way to its component value, recursively, as
necessary</termdef>.</p>
      <p><!--*
* material suppressed here by diff group rq144nv *
*--><phrase dg="rq144nv">The <termref def="key-vr"/>
has the following properties</phrase>:</p>

      <proplist item="element or attribute" id="schinfo_proplist" role="psvi">
<!--* rq144 adds the 'or attribute' in the item attribute.  Diff markup
    * doesn't show it. *-->
       <propdef id="e-schema_information" name="schema information">A
set of <iiName>namespace schema information</iiName> information
items, one for each namespace name which appears as the <xpropref role="anon">target namespace</xpropref> of any schema component in the
schema used for that assessment, and one for <termref def="key-null">absent</termref> if any schema component in the schema
had no <xpropref role="anon">target namespace</xpropref>.  Each
<iiName>namespace schema information</iiName> information item has the
following properties and values:
        <proplist item="namespace schema information" role="psvi">
         <propdef id="nsi-schema_namespace" name="schema namespace">A
namespace name or <termref def="key-null">absent</termref>.</propdef>
         <propdef id="nsi-schema_components" name="schema components">A (possibly empty) set of schema component information
items, each one an <termref def="key-iso">item isomorphic</termref> to
a component whose <xpropref role="anon">target namespace</xpropref> is
the sibling <propref ref="nsi-schema_namespace" role="psvi"/> property above, drawn from
the schema used for <termref def="key-va"/>.</propdef>
         <propdef name="schema documents" id="nsi-schema_documents">A
(possibly empty) set of <iiName>schema document</iiName> information
items, with properties and values as follows, for each schema document
which contributed components to the schema, and whose
<code>targetNamespace</code> matches the sibling <propref role="psvi" ref="nsi-schema_namespace"/> property above (or whose
<code>targetNamespace</code> was <termref def="key-null">absent</termref> but that contributed components to
that namespace by being <eltref ref="include"/>d by a schema document with that
<code>targetNamespace</code> as per
<specref ref="compound-schema"/>):
          <proplist item="schema document" role="psvi">
           <propdef name="document location" id="sd-document_location">Either a URI reference, if available,
otherwise <termref def="key-null">absent</termref>
           </propdef>
           <propdef name="document" id="sd-document">A document
information item, if available, otherwise <termref def="key-null">absent</termref>.</propdef>
          </proplist>
         </propdef>
        </proplist>
       </propdef>
      </proplist>
     <p>The <propref ref="nsi-schema_components"/> property is provided for
processors which wish to provide a single access point to the
components of the schema which was used during <termref def="key-va"/>.  Lightweight processors are free to leave it empty, but if it <emph>is</emph> provided, it <rfc2119>must</rfc2119> contain at a minimum all the top-level (i.e. named) components which actually figured in the <termref def="key-va"/>, either directly or (because an anonymous component which figured is contained within) indirectly.</p>
    </constraintnote>
     </div4>

<div4 id="sec-sic-id" dg="b5165b">
<head dg="b5165b">ID/IDREF Table</head>
     <constraintnote type="sic" id="sic-id">
  <head>ID/IDREF Table</head>
      <p>In the <termref def="key-psvi">post-schema-validation infoset</termref> a set of <iiName>ID/IDREF binding</iiName> information items 
<phrase dg="opt.144">is</phrase><!--*
* material suppressed here by diff group opt.144 *
*--> 
associated with the <termref def="key-vr"/><!--*
* material suppressed here by diff group rq144si *
*-->:</p>
      <proplist item="element" role="psvi">
       <propdef name="ID/IDREF table" id="e-ii_table">A (possibly empty) set of
<iiName>ID/IDREF binding</iiName> information items, as specified below.</propdef>
      </proplist>
      <p><termdef id="key-eas" term="eligible item set" role="local">Let the
	<term>eligible item set</term> be the set <!--*
* material suppressed here by diff group cleanup-3 *
*--> 
	consisting of every attribute or element
	information item</termdef> for which
       <olist role="andtest">
	<item>
	 <p>its  <xpropref role="psviAnon">validation context</xpropref> is the
	  <termref def="key-vr"/>;</p>
	</item>
	<!--*
* material suppressed here by diff group b2041 *
*-->
	<item dg="b2041"><!--*
* material suppressed here by diff group b2316 *
*--><p dg="b2316">
	  its <xpropref role="psviAnon">schema actual value</xpropref> is
	  not <termref def="key-null">absent</termref> and its <termref def="key-governing"/> type definition
	  is the built-in simple type definition for 
	  <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ID">ID</xtermref>,
	  <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#IDREF">IDREF</xtermref>, or
	  <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#IDREFS">IDREFS</xtermref>,
	  or a simple type definition <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> or <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-constructed" dg="b1913">constructed</termref> 
	  directly (in a single derivation step) or 
	  indirectly (through one or more steps) from any 
	  of these;
	 </p></item>
	<item dg="cleanup-3"><p>
	  if it is an element information item, then <!--*
* material suppressed here by diff group b5195 *
*--><phrase dg="b5195">it is not <termref def="key-nilled"/></phrase>.
	 </p></item>
       </olist></p>
      <note dg="b2041"><p>
	The use of <xpropref role="psviAnon">schema actual value</xpropref>
	in the definition of <termref def="key-eas"/> above means that
	<pt>default</pt> or <pt>fixed</pt> value constraints <!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase> play a
	part in the <termref def="key-eas"/>.
       </p></note>
      <p>Then there is one <iiName>ID/IDREF binding</iiName> in the <propref ref="e-ii_table" role="psvi"/>
       for every distinct string which is </p>
      <olist role="orval">
        <item>
         <p>the <termref def="key-vv">actual value</termref> of a member of the <termref def="key-eas">eligible
          item set</termref> whose <!--*
* material suppressed here by diff group cleanup-3 *
*-->
          <phrase dg="cleanup-3"><xpropref role="psviAnon">type definition</xpropref>
          or <xpropref role="psviAnon">member type definition</xpropref></phrase>
          is or is <!--*
* material suppressed here by diff group cleanup-3 *
*-->
          <phrase dg="cleanup-3"><!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref></phrase>
          from <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ID">ID</xtermref> or <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#IDREF">IDREF</xtermref>;</p>
        </item>
        <item>
         <p><!--*
* material suppressed here by diff group cleanup-3 *
*-->
          <phrase dg="cleanup-3">an item</phrase> in the <termref def="key-vv">actual value</termref> of a member of the <termref def="key-eas">eligible
          item set</termref> whose <!--*
* material suppressed here by diff group cleanup-3 *
*-->
          <phrase dg="cleanup-3"><xpropref role="psviAnon">type definition</xpropref>
          or <xpropref role="psviAnon">member type definition</xpropref> has
          <propref comp="std" prop="variety"/> <pt>list</pt> and either its
          <propref comp="std" prop="item type definition"/> or the item's
          corresponding entry in <xpropref role="psviAnon">member type definitions</xpropref></phrase>
          is or is <!--*
* material suppressed here by diff group cleanup-3 *
*-->
          <phrase dg="cleanup-3"><!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> from 
          <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ID">ID</xtermref> or <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#IDREF">IDREF</xtermref>.</phrase>
         </p>
        </item>
       </olist>
      <p>Each <iiName>ID/IDREF binding</iiName> has properties as follows:</p>
      <proplist item="ID/IDREF binding" role="psvi">
        <propdef name="id" id="iib-id">The string identified above.</propdef>
        <propdef id="iib-binding" name="binding">A set consisting of every element information item for which
          <olist role="andtest">
            <item>
             <p>its <propref role="psvi" ref="e-validation_context"/> is the
<termref def="key-vr"/>;</p>
            </item>
            <item>
             <p dg="b3968">it has an attribute information item in
its <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> or an element information item in its <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>
              <!--*
* material suppressed here by diff group cleanup-3 *
*-->
              <phrase dg="cleanup-3">whose <termref def="key-vv">actual value</termref> is or contains</phrase>
              the <propref role="psvi" ref="iib-id"/> of
this <iiName>ID/IDREF binding</iiName><phrase dg="cleanup-3"> and the
              corresponding type definition is or is <!--*
* material suppressed here by diff group b1913 *
*--><termref def="key-derived" dg="b1913">derived</termref> from
              <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ID">ID</xtermref></phrase>.</p>
             
             <!--*
* material suppressed here by diff group b3968 *
*-->
            </item>
           </olist>
        </propdef>
       </proplist>
<p>The net effect of the above is to have one entry for every string used as an
id, whether by declaration or by reference, associated with those elements, if
any, which actually purport to have that id.  See <specref ref="cvc-id"/> above
for the validation rule which actually checks for errors here.</p>
  <note>
   <p>The <iiName>ID/IDREF binding</iiName>
information item, unlike most other aspects of this
specification, is essentially an internal bookkeeping mechanism.  It is introduced to
support the definition of <specref ref="cvc-id"/> above. 
<!--*
* material suppressed here by diff group b4518 *
*--></p></note>
 </constraintnote>
     </div4>
    </div3>
    <div3 id="coss-schema">
     <head>Constraints on Schemas as a Whole</head>
     <div4 id="sec-sch-props-correct" dg="b5286e">
      <head dg="b5286e">Schema Properties Correct</head>
  <p>All schemas (see <specref ref="Schemas"/>) <rfc2119>must</rfc2119> satisfy the following constraint.</p>
  <constraintnote type="cos" id="sch-props-correct">
   <head>Schema Properties Correct</head>
   <olist role="And">
    <item>
     <p>The values of the properties of a schema <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">are</phrase> as described in
the property tableau in
<specref ref="Schema_details"/>, modulo the impact of <specref ref="conformance-missing"/>;</p>
    </item>
	<item id="c-nmd">
	 <p><!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">None</phrase> of the 
	  <propref comp="s" prop="type definitions"/>,  
	  <phrase dg="b5150b">
	   <propref comp="s" prop="attribute declarations"/>,
	  </phrase>
	  <propref comp="s" prop="element declarations"/>,
	  <propref comp="s" prop="attribute group definitions"/>, 
	  <propref comp="s" prop="model group definitions"/><phrase dg="b5150b">,</phrase>
	  <!--*
* material suppressed here by diff group b5150b *
*-->
	  <propref comp="s" prop="notation declarations"/><phrase dg="b5150b">, or
	   <propref comp="s" prop="identity-constraint definitions"/>
	  </phrase> 
	  <phrase dg="modals">properties</phrase> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">contains</phrase> two or more schema components with the
	  same <!--*
* material suppressed here by diff group ep20b *
*--><phrase dg="ep20b"><xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref></phrase>.</p>
	</item>
   </olist>
  </constraintnote>
     </div4>
 
     <div4 id="sec-src-resolve" dg="b5286e">
      <head>QName resolution (Schema Document)</head>
      <constraintnote type="src" id="src-resolve">
       <head>QName resolution (Schema Document)</head>
       <p>For a <termref def="gloss-QName">QName</termref>
        to resolve to a schema component of a specified kind
        <olist role="and">
         <item>
          <p>That component is a member of the value of the appropriate
           property of the schema which corresponds to the schema
           document within which the <termref def="gloss-QName">QName</termref>
           appears, that is
           <olist role="casetest">
            <item>
             <p role="if">the kind specified is simple or complex type definition</p>
             <p role="then">the property is the <propref comp="s" prop="type definitions"/>.</p>
            </item>
            <item>
             <p role="if">the kind specified is attribute declaration</p>
             <p role="then">the property is the <propref comp="s" prop="attribute declarations"/>.</p> 
            </item>
            <item>
             <p role="if">the kind specified is element declaration</p>
             <p role="then">the property is the <propref comp="s" prop="element declarations"/>.</p> 
            </item>
            <item>
             <p role="if">the kind specified
              is attribute group</p>
             <p role="then">the property is the <propref comp="s" prop="attribute group definitions"/>.</p> 
            </item>
            <item>
             <p role="if">the kind specified is
              model group</p>
             <p role="then">the property is the <propref comp="s" prop="model group definitions"/>.</p>
            </item>
            <item>
             <p role="if">the kind specified is notation declaration</p>
             <p role="then">the property is the <propref comp="s" prop="notation declarations"/>.</p> 
            </item>
            <item dg="b2850aux">
             <p role="if"><phrase dg="b2850">the kind specified is identity-constraint 
               definition</phrase></p>
             <p role="then"><phrase dg="b2850">the property is 
               the <propref comp="s" prop="identity-constraint definitions"/>.</phrase></p> 
            </item>
           </olist>
          </p>
         </item>
         <item>
          <p>The
           component's <xpropref role="anon">name</xpropref> matches the <termref def="q-local">local
            name</termref> of the <termref def="gloss-QName">QName</termref>;</p>
         </item>
         <item>
          <p>The component's <xpropref role="anon">target namespace</xpropref> is identical to the <termref def="q-uri">namespace name</termref> of the <termref def="gloss-QName">QName</termref>;</p>
         </item>
         <item id="cl.qnr.nsdeclared">
          <olist role="Casetest">
           <item>
            <p role="if">the <termref def="q-uri">namespace name</termref> of the <termref def="gloss-QName">QName</termref> is <termref def="key-null">absent</termref></p>
            <p role="then">
             <olist role="ortest">
              <item>
               <p>The <eltref ref="schema"/> element information item of the schema document containing the <termref def="gloss-QName">QName</termref> has no <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>.</p>
              </item>
              <item>
               <p>The <eltref ref="schema"/> element information item of the that schema document contains an <eltref ref="import"/> element
                information item with no <code>namespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>.</p>
              </item>
             </olist>
            </p>
           </item>
           <item dg="b1890-ab">
            <p role="otherwise">
             <!--*
* material suppressed here by diff group b1890-choices *
*-->
             the <termref def="q-uri">namespace name</termref> of the <termref def="gloss-QName">QName</termref> is
             the same as
             <olist role="orval">
              <item>
               <p>The <termref def="key-vv">actual value</termref> of the <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of
                the <eltref ref="schema"/> element information item of the schema document containing the <termref def="gloss-QName">QName</termref>.</p>
              </item>
              <item>
               <p>The <termref def="key-vv">actual value</termref> of the <code>namespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of some
                <eltref ref="import"/> element information item contained in the <eltref ref="schema"/> element information item of that schema document.</p>
              </item>
              <item dg="b1890-c"><p>
                <!--*
* material suppressed here by diff group b1890-choices *
*-->
                <code>http://www.w3.org/2001/XMLSchema</code>.
               </p></item>
              <item dg="b1890-cp"><p>
                <!--*
* material suppressed here by diff group b1890-choices *
*-->
                <code>http://www.w3.org/2001/XMLSchema-instance</code>.
               </p></item>
             </olist></p>
           </item>
           <!--*
* material suppressed here by diff group b1890-ab *
*-->
          </olist>
          
         </item>
        </olist>
       </p>
      </constraintnote>
     </div4>
     <div4 id="sec-cvc-resolve-instance" dg="b5286e">
      <head>QName resolution (Instance)</head>
<p>As the discussion above at <specref ref="components"/> makes clear, 
at the level of schema components and <termref def="key-vn">validation</termref>, 
reference to components by name is normally not involved.  In a
few cases, however, qualified names appearing in information items being
<termref def="key-vn">validated</termref> <rfc2119>must</rfc2119> be resolved to schema 
components by such lookup.  The following
constraint is appealed to in these cases.</p>
   <constraintnote type="cvc" id="cvc-resolve-instance">
  <head>QName resolution (Instance)</head>
  <p>A pair of a local name and a namespace name (or <termref def="key-null">absent</termref>)
resolve to a schema component of a specified kind in the context of <termref def="key-vn">validation</termref> by appeal to the appropriate
property of the schema being used for the <termref def="key-va"/>.  Each such property indexes components by name.  The property to use is determined by the kind of component specified, that is,
   <olist role="case">
    <item>
     <p role="if">the kind specified is simple or complex type definition</p>
     <p role="then">the property is the <propref comp="s" prop="type definitions"/>.</p>
    </item>
    <item>
     <p role="if">the kind specified is attribute declaration</p>
     <p role="then">the property is the <propref comp="s" prop="attribute declarations"/>.</p> 
    </item>
    <item>
     <p role="if">the kind specified is element declaration</p>
     <p role="then">the property is the <propref comp="s" prop="element declarations"/>.</p> 
    </item>
    <item>
     <p role="if">the kind specified
is attribute group</p>
     <p role="then">the property is the <propref comp="s" prop="attribute group definitions"/>.</p> 
    </item>
    <item>
     <p role="if">the kind specified is
model group</p>
     <p role="then">the property is the <propref comp="s" prop="model group definitions"/>.</p>
    </item>
    <item>
     <p role="if">the kind specified is notation declaration</p>
     <p role="then">the property is the <propref comp="s" prop="notation declarations"/>.</p> 
    </item>
   </olist>
   The component resolved to is the entry in the table whose <xpropref role="anon">name</xpropref> matches the local name of the pair and whose <xpropref role="anon">target namespace</xpropref> is identical to the namespace name of the pair.
  </p>
 </constraintnote>
     </div4>
    </div3>
   </div2>
   <!--*
* material suppressed here by diff group ep01-revert *
*-->
  </div1>
   <div1 id="composition">
    <head>Schemas and Namespaces: Access and Composition</head>
      <!--* <issue id="RQ-151i" role="1.1">
< ! - - * <p><loc href="&reqs;#composition" target="reqs">RQ-151 (consistent)</loc></p> * - - >
	<p><loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=2824" target="reqs"
>Issue 2824 (RQ-151 schema composition)</loc></p>
       <p>Experience with version 1.0 has shown that the rules in this section
miss a few cases, and are unclear in others.  A full rewrite taking a more
formal approach, without changing the intended semantics, will be done to
address these problems.</p>
       <resolution>
        <p>Give a complete and formal definition of schema composition, and use it for currently defined (e.g. include) and currently undefined (e.g. schema docs on command line) cases. </p>
       </resolution>
	</issue> *-->
<p>This chapter defines the mechanisms by which this specification establishes the necessary
precondition for <termref def="key-va"/>, namely access to
one or more schemas. This chapter also sets out in detail the relationship
between schemas and namespaces, as well as mechanisms for
modularization of schemas, including provision for incorporating definitions
and declarations from one schema in another, possibly with modifications.</p>
<p><specref ref="concepts-conformance"/> describes three levels of conformance for schema
processors, and <specref ref="conformance"/> provides a formal definition of
<termref def="key-va"/>. This section sets out
in detail the 3-layer architecture implied by the three conformance levels.
The layers
are: </p>
<olist>
  <item><p>The <termref def="key-va"/> core, relating schema components and instance
information items; </p></item>
  <item><p>Schema representation: the connections between XML
representations and schema components, including the
  relationships between namespaces and schema components; </p></item>
  <item><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> web-interoperability guidelines: 
  <phrase diff="del" dg="ep28">instance-&gt;schema and
  schema-&gt;schema connections</phrase><phrase diff="add" dg="ep28">connections
  from instance to schema (or schema document) and from schema document
  to schema (or schema document)</phrase> for the WWW. </p></item></olist>
<p>Layer 1 specifies the manner in which a schema composed of schema components
can be applied to in the <termref def="key-va"/> of an <phrase diff="del" dg="ep28">instance</phrase> 
element information item. Layer 2 specifies the use of <eltref ref="schema"/>
elements in XML documents as the standard XML representation for
schema information in a broad range of computer systems and execution
environments. To support interoperation over the World Wide Web in particular,
layer 3 provides a set of conventions for schema reference on the
Web. Additional details on each of the three layers 
<phrase diff="del" dg="ep28">is</phrase><phrase diff="add" dg="ep28">are</phrase> 
provided in the sections below.</p>
<div2 id="layer1">
<head>Layer 1: Summary of the Schema-validity Assessment Core</head>
<p>The fundamental purpose of the <termref def="key-va"/> core is to define <termref def="key-va"/> for a single
element information item and its descendants<phrase diff="add" dg="ep28">,</phrase> 
with respect to a
complex type
definition. All processors are required to implement this core predicate in a
manner which conforms exactly to this specification. </p>
<p><termref def="key-va"><!--*
* material suppressed here by diff group ep19 *
*--><phrase dg="ep19">A</phrase>ssessment</termref> is defined with reference to
an <!--*
* material suppressed here by diff group b4399 *
*--><termref def="key-schema" dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--> schema</termref> (note <emph>not</emph> a 
<termref def="key-schemaDoc">schema document</termref>)<!--*
* material suppressed here by diff group b5078 *
*-->.</p>
<!--*
* material suppressed here by diff group b5078a *
*-->
<p>As specified above, each schema component is associated directly or
indirectly with a target namespace, or explicitly with no namespace. In the case of multi-namespace documents,
components for more than one target namespace will co-exist in a schema.</p>
<p>Processors have the option to assemble (and perhaps to optimize or
pre-compile) the entire schema prior to the start of an 
<termref def="key-va"/> episode, or to
gather the schema lazily as individual components are required. In all
cases it is required that:</p>
<ulist>
  <item><p>The processor succeed in locating the <termref def="c">schema components</termref>
  transitively required to complete an <termref def="key-va"/> (note that components derived
from <termref def="key-schemaDoc">schema documents</termref> can be integrated
with components obtained through other means);</p></item>
  <item><p>no definition or declaration changes once it has been established;</p></item>
  <item><p>if the processor chooses to acquire declarations and definitions
  dynamically, that there be no side effects of such dynamic acquisition that
  would cause the results of <termref def="key-va"/> to differ from that which would have
  been obtained from the same schema components acquired in bulk.</p></item></ulist>
<note><p> the <termref def="key-va"/> core is defined in terms of schema components at the
abstract level, and no mention is made of the schema definition
syntax (i.e. <eltref ref="schema"/>). Although many processors will acquire
schemas in this format, others <!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase> operate on compiled representations, on a
programmatic representation as exposed in some programming language, etc.
</p></note>
<p>The obligation of a schema-aware processor as far as the <termref def="key-va"/>
core is concerned is to implement one or more of the options for <termref def="key-va"/> given below in <specref ref="validation_outcome"/>. Neither the
choice of element information item for that <termref def="key-va"/>, nor which of the
means of initiating <termref def="key-va"/> are used, is within the scope of this specification.</p>
<p>Although <termref def="key-va"/> is defined recursively, it is also intended to be
implementable in streaming
processors.  Such processors <rfc2119>may</rfc2119> choose to incrementally assemble the schema during
processing in response, for example, to encountering new namespaces. 
The implication of the
invariants expressed above is that such incremental assembly <rfc2119>must</rfc2119>
result in an <termref def="key-va"/> 
outcome that is the 
<emph>same</emph> as would
be given if <termref def="key-va"/> <phrase diff="del" dg="ep28">was</phrase><phrase diff="add" dg="ep28">were</phrase> 
undertaken again
with the final, fully assembled schema. </p>
</div2>
<div2 id="layer2">
<head>Layer 2: Schema Documents, Namespaces and Composition</head>
<p>The sub-sections of <specref ref="components"/> define an
XML representation for type definitions and element declarations and so on,
specifying their target namespace and collecting them into schema documents.
<phrase diff="del" dg="ep28">The two following sections relate 
to assembling a complete schema for <termref def="key-va"/> from multiple sources.  
They should <emph>not</emph> be understood as a form of text substitution, 
but rather as providing mechanisms for distributed definition of schema 
components, with appropriate schema-specific semantics.</phrase>
<phrase diff="add" dg="ep28">The following sections describe how to
assemble a complete schema from multiple sources.</phrase></p>
<note><p> The core <termref def="key-va"/>
architecture requires that a complete schema with all the necessary
declarations and definitions be available. 
This <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">will
sometimes</phrase> involve resolving both instance → schema 
<phrase diff="add" dg="ep28">(or schema document)</phrase>
and schema<phrase dg="b2825-1">-document</phrase> → schema 
<phrase diff="add" dg="ep28">(or schema document)</phrase> references. 
As observed earlier in <specref ref="concepts-conformance"/>,  the
precise mechanisms for resolving such references are expected to
evolve over time. In support of such evolution, this specification
observes the design principle that references from one schema document
to a schema use mechanisms that directly parallel those used to
reference a schema from an instance document.</p></note>
<note><p>In the sections below, "schemaLocation" really belongs at layer 3. 
For convenience, it is documented with the layer 2 mechanisms of import and
include, with which it is closely associated.</p></note>

    <div3 id="composition-concepts" dg="ep28">
     <head diff="add" dg="ep28">Basic concepts of schema construction and composition</head>
     <p diff="add" dg="ep28">
      When a schema is assembled from multiple sources, those sources
      can include both <termref def="key-schemaDoc">schema documents</termref> and other sources of 
      components.  Several of the mechanisms described below
      allow a <termref def="key-schemaDoc">schema document</termref> to refer to a schema, either
      by giving the target namespace of its components,
      or indirectly, by referring to a <termref def="key-schemaDoc">schema document</termref> (and
      thus implicitly to the schema corresponding to that <termref def="key-schemaDoc">schema document</termref>).
     </p>
     <p diff="add" dg="ep28">
      The sections that follow appeal often to the following
      concepts.</p>
      <!--*
      <ednote>
      <edtext>The terms <quote>frob</quote> and
      <quote>&frobnication;</quote>, used below,
      are place-holders, not intended for the spec.</edtext>
     </ednote>
      *-->
     <glist diff="add" dg="ep28">
      <gitem id="key-pre-processing">
       <label>pre-processing</label>
       <def>
	<p>The pre-processing of a schema document before
	 attempting to map its contents into components,
	 or the pre-processing of a set of components
	 before they take their final form among the
	 components of a schema being constructed.
	 The following sections define several forms of
	 pre-processing, including:
	 conditional-inclusion pre-processing,
	 chameleon pre-processing,
	 redefinition pre-processing,
	 and 
	 override pre-processing.
	 Conditional-inclusion pre-processing is always performed first;
	 the sequence in which other forms of pre-processing 
	 are applied varies; details are given below.
	</p>
       </def>
      </gitem>
      <gitem id="key-vc-preprocessing">
       <label>conditional-inclusion pre-processing</label>
       <def>
	<p>The process of applying to a schema document the
	 filtering described in section <specref ref="cip"/>.
	 This pre-processing is usually assumed silently; when
	 it is explicitly described, then 
	 for a <termref def="key-schemaDoc">schema document</termref> <var>D</var>, the result of conditional-inclusion 
	 pre-processing of <var>D</var> is written <quote><var>ci</var>(<var>D</var>)</quote>.
	</p>
       </def>
      </gitem>
      <gitem id="key-imm-components">
       <label>immediate components</label>
       <def>
	<p>The immediate components of a <termref def="key-schemaDoc">schema document</termref> <var>D</var>
	 are the components corresponding to its definition and 
	 declaration <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>; also written
	 <quote><var>immed</var>(<var>D</var>)</quote>.</p>
       </def>
      </gitem>
      <gitem id="key-inter-sc-ref">
       <label>inter-schema-document references</label>
       <def>
	<p>The 
	 <eltref ref="include"/>,
	 <eltref ref="redefine"/>,
	 <eltref ref="override"/>, and
	 <eltref ref="import"/> elements defined below.
	</p>
       </def>
      </gitem>
      <gitem id="key-corresponding-schema">
       <label>corresponding schema</label>
       <def>
	<p>The schema corresponding to a given <termref def="key-schemaDoc">schema document</termref> <var>D</var>
	 is the schema containing the built-in components,
	 the <termref def="key-automatic">automatically known</termref> components automatically included
	 in the schema by the schema processor, 
	 <termref def="key-imm-components"><phrase><var>immed</var>(<var>D</var>)</phrase></termref>,
	 and the 
	 components included by virtue of the inter-schema-document
	 references included in <var>D</var> (for which see the rules below),
	 and no other coponents.
	 Also written
	 <quote><var>schema</var>(<var>D</var>)</quote>.</p>
       </def>
      </gitem>
      <gitem id="key-tns-f">
       <label>target namespace</label>
       <def>
	<p>The target namespace specified in a schema document <var>D</var>;
	 also written
	 <quote><var>tns</var>(<var>D</var>)</quote>.
	</p>
       </def>
      </gitem>
      <gitem id="key-chameleon-pre-processing">
       <label>chameleon pre-processing</label>
       <def>
	<p>The application, to a schema document <var>D</var>, of the 
	 transformation specified in <specref ref="chameleon-xslt"/>,
	 with respect to some namespace <var>N</var>, so as to convert
	 it to use <var>N</var> as its target namespace;
	 also written
	 <quote><var>chameleon</var>(<var>N</var>,<var>D</var>)</quote>.
	</p>
       </def>
      </gitem>
      <gitem id="key-override-pre-processing">
       <label>override pre-processing</label>
       <def>
	<p>The application, to a schema document <var>D</var>, of the 
	 overrides specified in an <eltref ref="override"/>
	 element <var>E</var>, using the rules specified in detail
	 in <specref ref="override-xslt"/>;
	 also written
	 <quote><var>override</var>(<var>E</var>,<var>D</var>)</quote>.
	</p>
       </def>
      </gitem>
      <gitem id="key-redefine-pre-processing">
       <label>redefine pre-processing</label>
       <def>
	<p>The application, to a schema <var>S</var>, of the 
	 redefinitions specified in an <eltref ref="override"/>
	 element <var>E</var>, using the rules specified in detail
	 in <specref ref="modify-schema"/>;
	 also written
	 <quote><var>redefine</var>(<var>E</var>,<var>S</var>)</quote>.
	</p>
       </def>
      </gitem>
     </glist>
     
     <note diff="add" dg="b5163">
      <p>This specification defines several attributes to allow
       schema documents and XML instance documents to provide
       information about the location of relevant schema components.
       Experience has shown that the similarities and differences
       among these attributes can be elusive for some readers; a
       compact overview may be helpful.</p>
      <p>
       The <att>xsi:schemaLocation</att> and
       <att>xsi:noNamespaceSchemaLocation</att> attributes
       may validly appear on elements in an XML instance
       document.  They are technically <term>hints</term>:  
       conforming schema-aware processors <rfc2119>may</rfc2119> but need not
       attempt to dereference the schema documents named
       in these attributes and include the components described
       there in the schema used for validation.
      </p>
      <p>
       The <att>schemaLocation</att> attribute on the 
       <eltref ref="import"/> element in a schema document is
       similarly a hint:  a conformaing schema-aware
       processor <rfc2119>may</rfc2119> but need not attempt to dereference
       the schema document named by the attribute.
      </p>
      <p>
       The <att>schemaLocation</att> attributes on the
       <eltref ref="include"/>, <eltref ref="override"/>, and 
       <eltref ref="redefine"/> elements in a schema document, on the
       other hand, are not hints: conforming processors <rfc2119>must</rfc2119> attempt
       to de-reference the schema document named by the attribute.
       For non-empty <eltref ref="redefine"/> elements, it is
       an error for the attempt to fail; otherwise, the
       attempt <rfc2119>must</rfc2119> be made but it is not an error for it
       to fail.
      </p>
      <p>In all cases, the use of the attribute in a document
       indicates <!--* warrants? suggests? indicates? *-->
       the existence of a suitable schema document
       at the location indicated.  This is stated explicitly
       below for some attributes, but not for all; where not
       stated explicitly, the inference follows implicitly
       from other rules.
      </p>
     </note>
     
    </div3>

    <div3 id="cip" dg="b2825-1">
     <head>Conditional inclusion</head>
     <p>Whenever a conforming XSD<!--*
* material suppressed here by diff group b5266 *
*--> processor reads a
      <termref def="key-schemaDoc">schema document</termref> in order to include the components defined
      in it in a schema, it first performs on the schema document
      the pre-processing described in this section.</p>
     <p>Every element in the <termref def="key-schemaDoc">schema document</termref> is examined to
      see whether <phrase dg="b3251">any of</phrase>
      the attributes <att>vc:minVersion</att><phrase dg="b3251">,</phrase><!--*
* material suppressed here by diff group b3251 *
*-->
      <att>vc:maxVersion</att><phrase dg="b3251">,
       <att>vc:typeAvailable</att>,  
       <att>vc:typeUnavailable</att>,
       <att>vc:facetAvailable</att>, or 
       <att>vc:facetUnavailable</att>
      </phrase>
      appear among its <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref>.
     </p>
     <p>
      Where they appear, the<!--*
* material suppressed here by diff group b3251 *
*-->
      attributes <phrase dg="b3251"><att>vc:minVersion</att> 
       and <att>vc:maxVersion</att></phrase> are treated as if declared
      with type <code>xs:decimal</code>, and their <termref def="key-vv">actual values</termref> are compared to a decimal
      value representing the version of XSD<!--*
* material suppressed here by diff group b5266 *
*--> supported by the
      processor (here represented as a variable <!--*
* material suppressed here by diff group b2825-2 *
*--><phrase dg="b2825-2"><var>V</var></phrase>).  For processors
      conforming to this version of this specification, the value of
      <!--*
* material suppressed here by diff group b2825-2 *
*--><phrase dg="b2825-2"><var>V</var></phrase> is 1.1.
     </p>
     <p>
      If <!--*
* material suppressed here by diff group b2825-2 *
*--><phrase dg="b2825-2"><var>V</var></phrase> is less than the value of 
      <att>vc:minVersion</att>, or
      if <!--*
* material suppressed here by diff group b2825-2 *
*--><phrase dg="b2825-2"><var>V</var></phrase> is greater than <phrase dg="b5168"> or equal to</phrase> the value of 
      <att>vc:maxVersion</att>, 
      then the element on which the attribute appears is
      to be ignored<phrase dg="b2825-2">, along with all its
      <phrase dg="b2825-3">attributes and</phrase>
      descendants<!--*
* material suppressed here by diff group wg20070803 *
*--></phrase>.
      <phrase dg="b6014">The effect is that portions of the
       schema document marked with <att>vc:minVersion</att> and/or
       <att>vc:maxVersion</att> are retained if 
       <att>vc:minVersion</att> ≤ <!--*
* material suppressed here by diff group b2825-2 *
*--><phrase dg="b2825-2"><var>V</var></phrase> &lt; <att>vc:maxVersion</att>.</phrase>
     </p>
     <!--*
* material suppressed here by diff group ep99 *
*-->

     <p dg="b3251">
      Where they appear, the attributes <att>vc:typeAvailable</att>
      and <att>vc:typeUnavailable</att> are treated as if declared
      with type <code>list of xs:QName</code>, and the items in their
      <termref def="key-vv">actual values</termref> are checked to see whether they name types
      <termref def="key-automatic">automatically known</termref> to the processor. The attributes
      <att>vc:facetAvailable</att> and <att>vc:facetUnavailable</att>
      are similarly typed, and checked to see if they name facets
      supported by the processor.
     </p>
     <p dg="b3251">
      If an element in a schema document has any of the following:
      <olist>
       <item>
	<p><att>vc:typeAvailable</att> = <var>T</var>, where any item in the
	 <termref def="key-vv">actual value</termref> <var>T</var> is <emph>not</emph> the <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> of some <!--*
	 <xspecref href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-unknown-dt">unknown</xspecref>
	 *--> <!--* primitive *--> type definition <termref def="key-automatic">automatically known</termref> to the
	 processor
	</p>
       </item>
       <item>
	<p>
	 <att>vc:typeUnavailable</att> = <var>T</var>, where
	 <!--*
* material suppressed here by diff group b5905 *
*-->
	 <phrase dg="b5905">every</phrase> item in the
	 <termref def="key-vv">actual value</termref> <var>T</var> is the <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> of some <!--* primitive *--> type
	 definition <termref def="key-automatic">automatically known</termref> to and supported by the processor
	</p>
       </item>
       <item>
	<p><att>vc:facetAvailable</att> = <var>F</var>, where any item in the
	 <termref def="key-vv">actual value</termref> <var>F</var> is not the <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> of some <!--* <xspecref
	 href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-unknown-f">unknown</xspecref> *--> facet
	 known to and supported by the processor</p>
       </item>
       <item>
	<p>
	 <att>vc:facetUnavailable</att> = <var>F</var>, where
	 <!--*
* material suppressed here by diff group b5905 *
*-->
	 <phrase dg="b5905">every</phrase> item in the
	 <termref def="key-vv">actual value</termref> <var>F</var> is the <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> of some facet known to and supported
	 by the processor</p>
       </item>
      </olist>
      then the element on which the attribute appears is to be
      ignored, along with all its attributes and descendants.</p>

     <note dg="b3251">
      <p>It is expected that <att>vc:typeAvailable</att> etc. will be
       most useful in testing for <termref def="key-impl-defined">implementation-defined</termref> primitive datatypes
       and facets, or for derived types for which the processor
       supplies a definition automatically. The rules just given do
       not, however, attempt to restrict their use to such tests.  If
       the <att>vc:typeAvailable</att> attribute is used with the 
       <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref>
       associated with one of the built-in primitive datatypes, the
       datatype will (in a conforming processor) always be available,
       so the test is unlikely to filter out any elements, ever, from
       the schema document. But such a usage is not in itself an
       error.
      </p>
     </note>

     <note dg="b3251">
      <p>The <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded names</xspecref> of the built-in datatypes are as specified
       in <bibref ref="ref-xsp2"/>; the <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> of any <termref def="key-impl-defined">implementation-defined</termref> datatype
       is required by <bibref ref="ref-xsp2"/> to be specified by the implementation.
      </p>
     </note>
     
     <note dg="b3251">
      <p>The <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded names</xspecref> of the facets (built-in or <termref def="key-impl-defined">implementation-defined</termref>)
       are the <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded names</xspecref> of the elements used in XSD schema documents
       to apply the facets, e.g. <code>xs:pattern</code> for the <pt>pattern</pt>
       facet.
      </p>
     </note>
     
     <note dg="b5905">
      <p>It is a consequence of the rules given above that
       if the <termref def="key-vv">actual value</termref> of <att>vc:typeAvailable</att> is the empty list
       (i.e. <code>vc:typeAvailable=""</code>), then the corresponding element
       is <emph>not</emph> ignored. (It does not list any type that is
       not available.)  Conversely, if the <termref def="key-vv">actual value</termref> of
       <att>vc:typeUnavailable</att> is the empty list, then the corresponding
       element is ignored. Similar results hold for
       <att>vc:facetAvailable</att> and <att>vc:facetUnavailable</att>.</p>
     </note>
     
     <!--*
* material suppressed here by diff group pre *
*-->

     <!--*
* material suppressed here by diff group pre *
*-->

     <p>
      The pre-processing of a schema document <var>S1</var> results
      in a second schema document <var>S2</var>, identical to <var>S1</var>
      except that all elements <phrase dg="b2825-2">and
      attributes</phrase> in <var>S1</var> which are to be ignored
      are absent from <var>S2</var>.  
      <phrase diff="add" dg="ep28">We write <var>S2</var> = <var>ci</var>(<var>S1</var>).</phrase>
      <phrase dg="wg20070803">If the <code>&lt;schema&gt;</code>
      element information item in <var>S1</var> is to be ignored, then <var>S2</var> is identical
      to <var>S1</var> except that any attributes other than <att>targetNamespace</att>,
      <att>vc:minVersion</att> or <att>vc:maxVersion</att> are removed from its
      <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref>, and its <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> is the empty sequence.</phrase>
      It is <var>S2</var>, not <var>S1</var>, which
      is required to conform to this specification.
     </p>
     <note>
      <p>If <var>S1</var> contains no elements <phrase dg="b2825-2">
      or attributes</phrase> to be ignored, then <var>S1</var> and 
       <var>S2</var> are identical.</p>
     </note>
     <p>Except where conditional-inclusion pre-processing is
      explicitly mentioned, references to <termref def="key-schemaDoc">schema documents</termref>
      elsewhere in this specification invariably refer to
      the result of the pre-processing step described here,
      not to its input, which need not, and in the general
      case will not, always conform to the rules for 
      schema documents laid out in this specification.
     </p>

     <note role="example">
      <p>Suppose some future version of XSD<!--*
* material suppressed here by diff group b5266 *
*--> (say, version 3.2)
       introduces a new form of element declaration. A schema author 
       might wish to exploit that new form of declaration if
       possible, but wish also to ensure that the schema
       document can be handled successfully by a processor
       written for XSD<!--*
* material suppressed here by diff group b5266 *
*--> 1.1.  In such a case, a schema document
       of the following form would be handled correctly by a
       conforming XSD<!--*
* material suppressed here by diff group b5266 *
*--> 1.1 processor:</p>

<eg xml:space="preserve">&lt;xs:schema 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"&gt;

  &lt;xs:element name="e" vc:minVersion="3.2"&gt;
    &lt;!--* declaration suitable for 3.2 
        * and later processors *--&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="e" 
    vc:minVersion="1.1"
    vc:maxVersion="3.<!--*
* material suppressed here by diff group b5168 *
*--><phrase dg="b5168">2</phrase>"&gt;
    &lt;!--* declaration suitable for processors
        * supporting versions 1.1 through <!--*
* material suppressed here by diff group b5168 *
*--><phrase dg="b5168">versions
        * up to (but not including) 3.2</phrase>
        *--&gt;
  &lt;/xs:element&gt;
  ...
&lt;/xs:schema&gt;
</eg>
      <p>      
       Even though the schema document as shown has two element
       declarations for element <el>e</el> and thus 
       violates <clauseref ref="c-nmd"/> of constraint
       <specref ref="sch-props-correct"/>, the pre-processing step
       described in this section filters out the first element
       declaration, making it possible for the resulting schema
       document to be valid and to conform to this specification.
      </p>
      <p dg="b5168">
       Note that the semantics of the <att>vc:maxVersion</att> attribute is
       "exclusive". This makes it easier for schema authors to use this feature
       without leaving gaps 
       <!--* between &XSDL; versions covered by alternative
       syntaxes. *-->
       in the numeric ranges used to select version numbers.
      </p>
     </note>


     <example dg="b3251">
      <p>Suppose that a processor supports an <termref def="key-impl-defined">implementation-defined</termref> primitive
       named <code>xpath_expression</code> in namespace
       <quote><code>http://example.org/extension_types</code></quote>,
       and is presented with the following schema document:
      </p>
      <eg xml:space="preserve">&lt;<phrase dg="b4316">xs:</phrase>schema 
 xmlns<phrase dg="b4316">:xs</phrase>="http://www.w3.org/2001/XMLSchema" 
 xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
 xmlns:tns="http://example.org/extension_types"
 targetNamespace="http://example.org/extension_types" &gt;

 &lt;<phrase dg="b4316">xs:</phrase>element vc:typeAvailable="tns:xpath_expression"
          name="e" type="tns:xpath_expression" /&gt;
 &lt;<phrase dg="b4316">xs:</phrase>element vc:typeUnavailable="tns:xpath_expression"
          name="e" type="string" /&gt;
&lt;/<phrase dg="b4316">xs:</phrase>schema&gt;</eg>
      <p>The effect of conditional inclusion is to include the
       first declaration for <el>e</el> and omit the second, so
       that the effective schema document, after pre-processing
       for conditional inclusion, is:
      </p>
      <eg xml:space="preserve">&lt;<phrase dg="b4316">xs:</phrase>schema 
 xmlns<phrase dg="b4316">:xs</phrase>="http://www.w3.org/2001/XMLSchema" 
 xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
 xmlns:tns="http://example.org/extension_types"
 targetNamespace="http://example.org/extension_types" &gt;

 &lt;<phrase dg="b4316">xs:</phrase>element vc:typeAvailable="tns:xpath_expression"
          name="e" type="tns:xpath_expression" /&gt;
&lt;/<phrase dg="b4316">xs:</phrase>schema&gt;</eg>
      <p>A processor which does not support type <quote>tns:xpath_expression</quote>,
       by contrast, will use the other declaration for <el>e</el>:
       type in the namespace in question</p>
      <eg xml:space="preserve">&lt;<phrase dg="b4316">xs:</phrase>schema 
 xmlns<phrase dg="b4316">:xs</phrase>="http://www.w3.org/2001/XMLSchema" 
 xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
 xmlns:tns="http://example.org/extension_types"
 targetNamespace="http://example.org/extension_types" &gt;

 &lt;<phrase dg="b4316">xs:</phrase>element vc:typeUnavailable="tns:xpath_expression"
          name="e" type="string" /&gt;
&lt;/<phrase dg="b4316">xs:</phrase>schema&gt;</eg>
      
     </example>

     <constraintnote type="src" id="src-cip" dg="b2825-2">
      <head>Conditional Inclusion Constraints</head>
      <p>Whenever the attribute <att>vc:minVersion</att> or
       <att>vc:maxVersion</att> appears on an element information item in a
       <termref def="key-schemaDoc">schema document</termref>, its <!--*
* material suppressed here by diff group b3251i *
*--><phrase dg="b3251i"><termref def="key-iv">initial value</termref></phrase> 
       <!--*
* material suppressed here by diff group b2825-3 *
*--><phrase dg="b2825-3"><rfc2119>must</rfc2119> 
       be</phrase> locally <termref def="key-vn">valid</termref>
       with respect to <code>xs:decimal</code> as per
       <specref ref="cvc-simple-type"/>.</p>      
      <p dg="b3251">Whenever any of the attributes 
       <att>vc:typeAvailable</att>,
       <att>vc:typeUnavailable</att>,
       <att>vc:facetAvailable</att>, or
       <att>vc:facetUnavailable</att>,
       appears on an element information item in a
       <termref def="key-schemaDoc">schema document</termref>, its <termref def="key-iv">initial value</termref> 
       <rfc2119>must</rfc2119> 
       be locally <termref def="key-vn">valid</termref>
       with respect to a simple type definition with
       <propref comp="std" prop="variety"/> = <pt>list</pt>
       and
       <propref comp="std" prop="item type definition"/> = 
       <code>xs:QName</code>, as per
       <specref ref="cvc-simple-type"/>.</p>
      <p dg="b5904">
<!--* 
       Any attribute that appears on an element information item in a
       &schema_document;, and whose name is in the schema versioning namespace
       (<code>&vcNS;</code>), &should; have the local name
       <att>minVersion</att>, <att>maxVersion</att>, <att>typeAvailable</att>,
       <att>typeUnavailable</att>, <att>facetAvailable</att>, or
       <att>facetUnavailable.</att>
       <note><p>
        This is a "&should;" and not a "&must;", to preserve the ability for
        future versions of this spec to add new attributes to this namespace.
        Processors are encouraged to issue warnings about attributes other than
        those named.
       </p></note>
*-->
       Any attribute from the <code>vc:</code> namespace that appears 
       on an element information item in a
       <termref def="key-schemaDoc">schema document</termref> <rfc2119>should</rfc2119> be one of the attributes described
       elsewhere in this document (i.e. one of 
       <att>vc:minVersion</att>, <att>vc:maxVersion</att>, <att>vc:typeAvailable</att>,
       <att>vc:typeUnavailable</att>, <att>vc:facetAvailable</att>, or
       <att>vc:facetUnavailable</att>).
       <note><p>
	 Processors are encouraged to issue warnings about
	 <code>vc:</code> attributes other than those named,
  but it is not an error for such
	 attributes to appear in a <termref def="key-schemaDoc">schema document</termref>.  The rule just
	 given is formulated with a <quote><rfc2119>should</rfc2119></quote> and not
	 a <quote><rfc2119>must</rfc2119></quote> in order to preserve the ability of
	 future versions of this specification to add new attributes
	 to the schema-versioning namespace.
       </p></note>
      </p>
     </constraintnote>
    </div3>

    <div3 id="compound-schema">
     <head>Assembling a schema for a single target namespace from
      multiple schema definition documents<phrase dg="imp">
       (<code>&lt;include&gt;</code>)</phrase></head>
     
     <p>Schema components for a single target namespace can be
      assembled from several <termref def="key-schemaDoc">schema documents</termref>, that is several
      <eltref ref="schema"/>
      element information items: </p>
     <reprdef>
      <reprelt eltname="include"/>
     </reprdef>
     <p>A <eltref ref="schema"/> information item <rfc2119>may</rfc2119> contain any
      number of <eltref ref="include"/> elements. Their
      <code>schemaLocation</code> attributes, consisting of a URI reference,
      identify other <termref def="key-schemaDoc">schema documents</termref>, that is <eltref ref="schema"/> information items. 
     </p>
     <p dg="ep29k">If two <eltref ref="include"/> elements 
      specify the same schema location (after resolving
      relative URI references) then they refer to the same schema document. If
      they specify different schema locations, then they refer to different schema
      documents, unless the implementation is able to determine that the two URIs
      are references to the same resource.</p>
     <p><phrase diff="del" dg="ep28">The <!--*
* material suppressed here by diff group b4399 *
*--><termref def="key-schema" dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--> schema</termref> 
       corresponding to <eltref ref="schema"/>
      contains not only the components corresponding to its definition
      and declaration <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, but also all the components of all
      the <!--*
* material suppressed here by diff group b4399 *
*--><termref def="key-schema" dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--> schemas</termref> corresponding to any
      <eltref ref="include"/>d schema documents.</phrase>
      <phrase diff="add" dg="ep28">If a <termref def="key-schemaDoc">schema document</termref> <var>D</var><sub>1</sub>
       contains one or more <eltref ref="include"/> elements,
       then <var>schema</var>(<var>D</var><sub>1</sub>) contains not only
       <var>immed</var>(<var>D</var><sub>1</sub>) but also all the components
       of <var>schema</var>(<var>D</var><sub>2</sub>), for each <termref def="key-schemaDoc">schema document</termref>
       <var>D</var><sub>2</sub> identified by an <eltref ref="include"/> element
       child of <var>D</var><sub>1</sub>.</phrase>
      Such included schema
      documents <phrase diff="add" dg="ep28"><var>D</var><sub>2</sub></phrase>
      <rfc2119>must</rfc2119> either (a) have the same
      <code>targetNamespace</code> as <phrase diff="del" dg="ep28">the 
       <eltref ref="include"/>ing
       schema document</phrase><phrase diff="add" dg="ep28"><var>D</var><sub>1</sub></phrase>, 
      or (b) no <code>targetNamespace</code> at all,
      in which case <phrase diff="del" dg="ep28">the <eltref ref="include"/>d schema document is converted to the <eltref ref="include"/>ing schema document's
       <code>targetNamespace</code></phrase><phrase diff="add" dg="ep28">the
       components included in <var>schema</var>(<var>D</var><sub>1</sub>) are
       not those of <var>schema</var>(<var>D</var><sub>2</sub>) itself,  but instead
       those of <var>schema</var>(<var>chameleon</var>(<var>tns</var>(<var>D</var><sub>1</sub>),<var>D</var><sub>2</sub>)), 
       that is, the schema corresponding to the result of applying
       chameleon pre-processing to <var>D</var><sub>2</sub> to convert it to 
       target namespace <var>tns</var>(<var>D</var><sub>1</sub>).</phrase>
     </p>
     <constraintnote type="src" id="src-include">
      <head>Inclusion Constraints and Semantics</head>
      <p>In addition to the conditions imposed on <eltref ref="include"/> element
       information items by the schema for schema<!--*
* material suppressed here by diff group b2067-2e *
*--><phrase dg="b2067-2e"> documents</phrase>, 
       <olist role="and.apply">
	<item id="c-ins">
	 <p>If the <termref def="key-vv">actual value</termref> of the <code>schemaLocation</code>
	  <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> successfully resolves
	  <olist role="oomtest">
	   <item id="c-vxd">
	    <p>It resolves to (a fragment of) a resource which is an
	     XML document (of type <code>application/xml</code> or
	     <code>text/xml</code> with an XML declaration for
	     preference, but this is not required), which in turn
	     corresponds to a <eltref ref="schema"/> element
	     information item in a well-formed information set<!--*
* material suppressed here by diff group b2067-d3 *
*-->.</p>
	   </item>
	   <item>
	    <p>It resolves to a <eltref ref="schema"/> element
	     information item in a well-formed information set<!--*
* material suppressed here by diff group b2067-d3 *
*-->.</p>
	   </item>
	  </olist> 
	  In either case call the <eltref ref="include"/>d
	  <eltref ref="schema"/> item <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D2</local><!--*
* material suppressed here by diff group b2067-2 *
*--> and the
	  <eltref ref="include"/>ing item's parent <eltref ref="schema"/> item <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D1</local>.</p>
	</item>
	<item>
	 <olist role="Or">
	  <item id="c-normi">
	   <p><!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D2</local> has a <code>targetNamespace</code>
	    <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, and its <termref def="key-vv">actual value</termref> is identical to the
	    <termref def="key-vv">actual value</termref> of the <code>targetNamespace</code>
	    <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D1</local> (which <rfc2119>must</rfc2119> have such an
	    <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>).</p>
	  </item>
	  <item id="c-normi2"><p>Neither <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D2</local> nor <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D1</local> have a
	    <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>.</p></item>
	  <item id="c-chami"><p><!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D2</local> has no
	    <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> (but <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D1</local>
	    does).</p></item>
	  <item diff="add" dg="b5163">
	   <p><local>D2</local> does not exist (e.g. because the <termref def="key-vv">actual value</termref> of the
	    <att>schemaLocation</att> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> does not
	    resolve successfully).</p>
	  </item>
	 </olist>      
	</item>
	<item>
	 <olist role="Case">
	  <item>
	   <p role="if"><clauseref ref="c-normi"/> or <clauseref ref="c-normi2"/> above is satisfied</p>
	   <p role="then"><!--*
* material suppressed here by diff group b2067-d3 *
*-->
	    <olist role="andtest" dg="b2067-d3">
	     <item><p>
	      <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D2</local> corresponds to a <!--*
* material suppressed here by diff group b5435 *
*--><phrase dg="b5435">conforming schema</phrase> (call it <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">S2</local>).
	     </p></item>
	     <item id="c-incl-incl"><p>
	      The schema corresponding to <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D1</local> includes not only definitions or
	      declarations corresponding to the appropriate members of its own
	      <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, but also components identical to all the
	      <termref def="c">schema components</termref> of 
	       <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">S2</local><phrase dg="ep30"> (with the possible
	      exception of its <compref ref="s"/> component)</phrase>.
	     </p></item>
	    </olist></p>
	  </item>
	  <item id="c-docham">
	   <p role="if"><clauseref ref="c-chami"/> above is
	    satisfied</p>
	   <p role="then"><!--*
* material suppressed here by diff group b2067-d3 *
*-->
	    <olist role="andtest" dg="b2067-d3">
	     <item id="c-chamvalidi"><p>
	      Let <local>D2′</local> be a <eltref ref="schema"/> information item
	      <!--*
* material suppressed here by diff group b2067n *
*-->
	      <!--*
* material suppressed here by diff group b2067m *
*--><phrase dg="b2067m">obtained by performing on <local>D2</local> the transformation
		specified in <specref ref="chameleon-xslt"/>;</phrase>
	       <local>D2′</local> corresponds to a <!--*
* material suppressed here by diff group b5435 *
*--><phrase dg="b5435">conforming schema</phrase> (call it <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">S2</local>).
	      </p>
	      <note dg="b2067n">
	       <p>The transformation in <specref ref="chameleon-xslt"/>
		(a) adds a <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> to <local>D2</local>,
		whose value is the same as that of the <code>targetNamespace</code>
		<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of <local>D1</local>, and (b) updates all unqualified
		QName references so that their namespace names become the
		<termref def="key-vv">actual value</termref> of the <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>.
		Implementations need not use the <bibref ref="bib-xslt2"/>
		stylesheet given in <specref ref="chameleon-xslt"/>, 
		as long as <!--*
* material suppressed here by diff group b6021k *
*--><phrase dg="b6021k">an equivalent</phrase> result 
		is produced.
		<phrase dg="b6021k">In particular, different
		 algorithms for generating a unique namespace
		 prefix <rfc2119>may</rfc2119> be used, even if they produce different
		 results.</phrase>
	       </p>
	      </note>
	     </item>
	     <item id="c-incl-ns-capture"><p>
	      The schema corresponding to <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D1</local> includes not only definitions or
	      declarations corresponding to the appropriate members of its own
	      <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, but also components identical to all the
	      <termref def="c">schema components</termref> of <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">S2</local><phrase dg="ep30"> (with the possible
	      exception of its <compref ref="s"/> component)</phrase>.
	     </p></item>
	    </olist>
	    <note dg="b2067-2"><p>
	      The above rule applies recursively. For example, if
	      <local>A</local> includes <local>B</local> and
	      <local>B</local> includes <local>C</local>, where
	      <local>A</local> has a <code>targetNamespace</code>
	      <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, but neither <local>B</local> nor
	      <local>C</local> does, then the effect is as if
	      <local>A</local> included <local>B'</local> and
	      <local>B'</local> included <local>C'</local>, where
	      <local>B'</local> and <local>C'</local> are identical to
	      <local>B</local> and <local>C</local> respectively,
	      except that they both have a
	      <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> the same as
	      <local>A</local>'s.
	     </p></note>
          <!--*
* material suppressed here by diff group b2067-2 *
*-->
	    <!--*
* material suppressed here by diff group b2067-d2 *
*-->
	    <note dg="b2067-d3">
	     <p>In this case, it is <local>D2′</local>, not <local>D2</local>, which is required 
	      by <clauseref ref="c-chamvalidi"/> to correspond to a <!--*
* material suppressed here by diff group b5435 *
*--><phrase dg="b5435">conforming schema</phrase>.
	      In particular, it is not an error for <local>D2</local> to
	      <phrase dg="wg20070803">fail to</phrase> satisfy
	      all of the constraints governing schema documents, while
	      it <emph>is</emph> an error if <local>D2′</local> fails to satisfy them.
	     </p>
	    </note>
	    
	    <note dg="b2067-2">
	     <p>
	      If <local>D2</local> imports the target namespace of <local>D1</local>, then
	      the effect of <clauseref ref="c-docham"/> will be to
	      cause an error owing to the violation of <clauseref ref="src-import-noselfimport"/> of <specref ref="src-import"/> (which forbids a schema document to
	      import its own target namespace).  Other constraint
	      violations may also be brought about; caution is
	      advised.
	     </p>
	    </note>
	   </p>
	  </item>
	 </olist>
	</item>
   </olist>
   </p>
 <p>It is <emph>not</emph> an error for the <termref def="key-vv">actual value</termref> of the
<code>schemaLocation</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> to fail to resolve 
<!--*
* material suppressed here by diff group ep19 *
*--><phrase dg="ep19">at all</phrase>,
in which case <!--*
* material suppressed here by diff group b5150b *
*--><phrase dg="b5150b">the corresponding inclusion <rfc2119>must not</rfc2119> be performed</phrase>.  It
<emph>is</emph> an error for it to resolve but the rest of clause 1
above to fail to be satisfied.  Failure to resolve <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">is likely
to</phrase> cause less than complete <termref def="key-va"/> outcomes, of course.</p>
  
   <p>As discussed in <specref ref="conformance-missing"/>, <termref def="gloss-QName">QName</termref>s in XML representations <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">will
sometimes</phrase> fail to <!--*
* material suppressed here by diff group ep19 *
*--><phrase dg="ep19"><termref def="src-resolve">resolve</termref></phrase>, rendering components incomplete
and unusable because of missing subcomponents.  During schema
construction, implementations <rfc2119>must</rfc2119> retain <termref def="gloss-QName">QName</termref> values for such references, in case
an appropriately-named component becomes available to discharge the
reference by the time it is actually needed.  <termref def="key-null">Absent</termref> target <termref def="q-uri">namespace
name</termref>s of such as-yet unresolved reference <termref def="gloss-QName">QName</termref>s in <eltref ref="include"/>d
components <rfc2119>must</rfc2119> also be converted if <clauseref ref="c-docham"/> is
satisfied.</p>
</constraintnote>


     <note><p><phrase dg="ep99">The above is carefully worded so that</phrase><!--*
* material suppressed here by diff group ep99 *
*-->
	 multiple <eltref ref="include"/>ing of the same schema document will not
       constitute a violation of
       <clauseref ref="c-nmd"/> of <specref ref="sch-props-correct"/>, but
       applications are allowed, indeed encouraged, to avoid <eltref ref="include"/>ing the
       same schema document more than once to forestall the necessity
       of establishing identity component by component.</p></note>

     <p dg="ep29">If there is a sequence of schema documents <var>S1</var>, <var>S2</var>, ... <var>Sn</var>,
      and a sequence of <eltref ref="include"/> elements <var>E1</var>, <var>E2</var>, ... <var>En</var>,
      such that each <var>S</var><sub><phrase><var>i</var></phrase></sub> contains the corresponding <var>E</var><sub><phrase><var>i</var></phrase></sub>, and each <var>E</var><sub><phrase><var>i</var></phrase></sub> 
      <phrase dg="ep29k">(where <var>i</var> &lt; <var>n</var>)</phrase>
      points to
      schema document <var>S</var><sub><phrase><var>i</var> + 1</phrase></sub>, and
      <var>En</var> points to <var>S1</var> (i.e. if there is a cycle in the relation defined by the
      <eltref ref="include"/> element), then the same schema corresponds to all
      of the schema documents <var>S1</var>, ... <var>Sn</var> in the cycle, and it includes the same
      components as <phrase dg="ep29k">the schema corresponding
       to <var>S1</var></phrase> in the similar case <!--*
* material suppressed here by diff group ep29k *
*--><phrase dg="ep29k">where</phrase> 
      <var>Sn</var> has no
      <eltref ref="include"/> element pointing at <var>S1</var>.
     </p>
     <note dg="ep29">
      <p>Informally:  <!--*
* material suppressed here by diff group ep29k *
*-->
       cycles of <eltref ref="include"/> elements are legal, and
       processors should guard against infinite loops.
      </p>
     </note>
</div3>

<div3 id="modify-schema">
<head>Including modified component definitions<phrase dg="imp"> (<code>&lt;redefine&gt;</code>)</phrase></head>

<note dg="b2224">
<p>The redefinition feature described in the remainder of this
section is <termref def="key-deprecated">deprecated</termref> and may be removed from future versions of
this specification.  Schema authors are encouraged to avoid its
use in cases where interoperability or compatibility with later
versions of this specification are important.
</p>
</note>
     <ednote role="pf" dg="wgi-20080606">
      <edtext>The Working Group requests feedback from readers, schema
       authors, implementors, and other users of this specification as
       to the desirability of retaining, removing, deprecating, or not
       deprecating the use of <eltref ref="redefine"/>.  Since the
       <eltref ref="override"/> facility provides similar
       functionality but does not require a restriction or extension
       relation between the new and the old definitions of redefined
       components, the Working Group is particularly interested in
       learning whether users of this specification find that 
       requirement useful or not.
      </edtext>
     </ednote>
 <p>In order to provide some support for evolution and versioning, it is
possible to incorporate components corresponding to a schema document
<emph>with modifications</emph>.  The modifications have a pervasive impact,
that is, only the redefined components are used, even when referenced from
other incorporated components, whether redefined themselves or not.</p>
 <reprdef>
 <reprelt eltname="redefine"/>
</reprdef>
 <p>A <eltref ref="schema"/> information item <rfc2119>may</rfc2119> contain any number of <eltref ref="redefine"/> elements. Their <code>schemaLocation</code> attributes, consisting of a URI reference, identify other <termref def="key-schemaDoc">schema documents</termref>, that is <eltref ref="schema"/> information items. 
</p>
     <p diff="del" dg="ep28">The <!--*
* material suppressed here by diff group b4399 *
*--><termref def="key-schema" dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--> schema</termref> corresponding 
      to <eltref ref="schema"/> contains not only the components 
      corresponding to its definition and declaration <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, 
      but also all the components of all 
      the <!--*
* material suppressed here by diff group b4399 *
*--><termref def="key-schema" dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--> schemas</termref> corresponding to 
      any <eltref ref="redefine"/>d schema documents.
      Such schema documents <rfc2119>must</rfc2119> either 
      (a) have the same <code>targetNamespace</code> 
      as the <eltref ref="redefine"/>ing schema document, or 
      (b) no <code>targetNamespace</code> at all, 
      in which case the <eltref ref="redefine"/>d schema document 
      is converted to the <eltref ref="redefine"/>ing schema document's 
      <code>targetNamespace</code>.
     </p>
     <p diff="add" dg="ep28">If a schema document <var>D</var><sub>1</sub> 
      contains a <eltref ref="redefine"/> element <var>E</var> 
      pointing to some schema document <var>D</var><sub>2</sub>, then 
      <var>schema</var>(<var>D</var><sub>1</sub>) contains not only the components in <var>immed</var>(<var>D</var><sub>1</sub>), but also
      all the components (with the exception, in most cases, 
      of the schema-as-a-whole component) of
      <var>redefine</var>(<var>E</var>,<var>schema</var>(<var>D</var><sub>2</sub>)).  
      For any document <var>D</var><sub>2</sub> pointed at by a <eltref ref="redefine"/> element
      in <var>D</var><sub>1</sub>, it <rfc2119>must</rfc2119> be the case either (a) that <var>tns</var>(<var>D</var><sub>1</sub>) = <var>tns</var>(<var>D</var><sub>2</sub>) 
      or else (b) that <var>tns</var>(<var>D</var><sub>2</sub>) is <termref def="key-null">absent</termref>, in which case <var>schema</var>(<var>D</var><sub>1</sub>) includes not 
      <var>redefine</var>(<var>E</var>,<var>schema</var>(<var>D</var><sub>2</sub>)) itself 
      but <var>redefine</var>(<var>E</var>,<var>schema</var>(<var>chameleon</var>(<var>tns</var>(<var>D</var><sub>1</sub>),<var>D</var><sub>2</sub>))).
      That is, the redefinition pre-processing is applied not to the 
      schema corresponding to <var>D</var><sub>2</sub> but instead to the schema corresponding
      to the schema document <var>chameleon</var>(<var>tns</var>(<var>D</var><sub>1</sub>),<var>D</var><sub>2</sub>),
      which is the result of applying chameleon pre-processing to <var>D</var><sub>2</sub>
      to convert it to target namespace <var>tns</var>(<var>D</var><sub>1</sub>).
     </p>
 <p>The definitions within the <eltref ref="redefine"/> element itself are
restricted to be redefinitions of components from the <eltref ref="redefine"/>d
schema document, <emph>in terms of themselves</emph>.  That is, 
  <ulist>
   <item>
    <p>Type
definitions <rfc2119>must</rfc2119> use themselves as their base type definition;</p>
   </item>
   <item>
    <p>
     Attribute
group definitions and model group definitions <rfc2119>must</rfc2119> be supersets or subsets of their original
definitions, either by including exactly one
reference to themselves or by containing only (possibly restricted) components
which appear in a corresponding way in their <eltref ref="redefine"/>d selves.</p>
   </item>
  </ulist>Not all the components of the <eltref ref="redefine"/>d
schema document need be redefined.</p>
 <p>This mechanism is intended to provide a declarative and modular approach to
schema modification, with functionality no different except in scope from what
would be achieved by wholesale text copying and redefinition by editing.  In
particular redefining a type is not guaranteed to be side-effect free:  it <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">can</phrase>
have unexpected impacts on other type definitions which are based
on the redefined one, even to the extent that some such definitions become
ill-formed.</p>
 <note>
  <p>The pervasive impact of redefinition reinforces the need for
implementations to adopt some form of lazy or 'just-in-time' approach to
component construction, which is also called for in order to avoid
inappropriate dependencies on the order in which definitions and references appear in (collections of) schema documents.</p>
 </note>
 <note role="example">
  <eg xml:space="preserve">v1.xsd:
 &lt;xs:complexType name="personName"&gt;
  &lt;xs:sequence&gt;
   &lt;xs:element name="title" minOccurs="0"/&gt;
   &lt;xs:element name="forename" minOccurs="0" maxOccurs="unbounded"/&gt;
  &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;

 &lt;xs:element name="addressee" type="personName"/&gt;

v2.xsd:
 &lt;xs:redefine schemaLocation="v1.xsd"&gt;
  &lt;xs:complexType name="personName"&gt;
   &lt;xs:complexContent&gt;
    &lt;xs:extension base="personName"&gt;
     &lt;xs:sequence&gt;
      &lt;xs:element name="generation" minOccurs="0"/&gt;
     &lt;/xs:sequence&gt;
    &lt;/xs:extension&gt;
   &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
 &lt;/xs:redefine&gt;

 &lt;xs:element name="author" type="personName"/&gt;
  </eg>
  <p>The schema corresponding to <code>v2.xsd</code> has everything specified
by <code>v1.xsd</code>, with the <code>personName</code> type redefined, as
well as everything it specifies itself.  According to
this schema, elements constrained
by the <code>personName</code> type <!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase> end with a <code>generation</code>
element.  This includes not only the <code>author</code> element, but also the
<code>addressee</code> element.</p>
 </note>
     <constraintnote type="src" id="src-redefine">
      <head>Redefinition Constraints and Semantics</head>
      <p>In addition to the conditions imposed on <eltref ref="redefine"/> element information items by the schema for schema<!--*
* material suppressed here by diff group b2067-2e *
*--><phrase dg="b2067-2e"> documents</phrase>
       <olist role="and.apply">
	<item><p>If there are any element information items among the
	  <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> other than <eltref ref="annotation"/> then the
	  <termref def="key-vv">actual value</termref>
	  of the <code>schemaLocation</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> <rfc2119>must</rfc2119>
	  successfully resolve.</p></item>
	<item id="redef-resolves">
	 <p>If the <termref def="key-vv">actual value</termref> of the <code>schemaLocation</code>
	  <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> successfully resolves
	  <olist role="oomtest">
	   <item>
	    <p>it resolves to (a fragment of) a resource which is an
	     XML document (see <clauseref ref="c-vxd"/><phrase dg="b4767"> of <specref ref="src-include"/></phrase>), which in turn
	     corresponds to a <eltref ref="schema"/> element
	     information item in a well-formed information set<!--*
* material suppressed here by diff group b2067-d3 *
*-->.</p>
	   </item>
	   <item>
	    <p>It resolves to a <eltref ref="schema"/> element
	     information item in a well-formed information set<!--*
* material suppressed here by diff group b2067-d3 *
*-->.</p>
	   </item>
	  </olist> 
	  In either case call the <eltref ref="redefine"/>d
	  <eltref ref="schema"/> item <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D2</local><!--*
* material suppressed here by diff group b2067-2 *
*--> and the
	  <eltref ref="redefine"/>ing item's parent <eltref ref="schema"/>
	  item <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D1</local>.</p>
	</item>
	<item>
	 <olist role="Or">
	  <item id="c-normir">
	   <p><!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D2</local> has a <code>targetNamespace</code>
	    <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, and its <termref def="key-vv">actual value</termref> is identical to the
	    <termref def="key-vv">actual value</termref> of the <code>targetNamespace</code>
	    <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D1</local> (which <rfc2119>must</rfc2119> have such an
	    <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>).</p>
	  </item>
	  <item id="c-normi2r"><p>Neither <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D2</local> nor <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D1</local> have a
	    <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>.</p></item>
	  <item id="c-chamir"><p><!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D2</local> has no
	    <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> (but <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D1</local>
	    does).</p></item>
	 </olist>      
	</item>
	<item>
	 <olist role="Case">
	  <item>
	   <p role="if"><clauseref ref="c-normir"/> or <clauseref ref="c-normi2r"/> above is satisfied</p>
	   <p role="then"><!--*
* material suppressed here by diff group b2067-d3 *
*-->
	    <olist dg="b2067-d3">
	     <item><p>
	      <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D2</local> corresponds to a <!--*
* material suppressed here by diff group b5435 *
*--><phrase dg="b5435">conforming schema</phrase> (call it <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">S2</local>).
	     </p></item>
	     <item><p>
	      The schema corresponding to <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D1</local> includes not only definitions or
	      declarations corresponding to the appropriate members of its own
	      <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, but also components identical to all the
	      <termref def="c">schema components</termref> of <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">S2</local>, with the
	      exception of those explicitly redefined
	       (see <specref ref="src-expredef"/> below<phrase dg="ep30"> 
	      and with the possible
	      exception of the <compref ref="s"/> component
	      of <local>S2</local>)</phrase>).
	     </p></item>
	    </olist>
	   </p>
	  </item>
	  <item id="c-dochamr">
	   <p role="if"><clauseref ref="c-chamir"/> above is
	    satisfied</p>
	   <p role="then"><!--*
* material suppressed here by diff group b2067-d3 *
*-->
	    <olist dg="b2067-d3">
	     <item id="c-chamvalidr"><p>
	       Let <local>D2′</local> be a <eltref ref="schema"/> information item
	       <!--*
* material suppressed here by diff group b2067n *
*-->
	       <!--*
* material suppressed here by diff group b2067m *
*--><phrase dg="b2067m">obtained by performing on <local>D2</local> the transformation
		specified in <specref ref="chameleon-xslt"/>;</phrase>
	       <local>D2′</local> corresponds to a <!--*
* material suppressed here by diff group b5435 *
*--><phrase dg="b5435">conforming schema</phrase> (call it <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">S2</local>).
	      </p></item>
	     <item><p>
	       The schema corresponding to <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D1</local> includes not only definitions or
	       declarations corresponding to the appropriate members of its own
	       <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, but also components identical to all the
	       <termref def="c">schema components</termref> of <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">S2</local>, with the
	       exception of those explicitly redefined
	       (see <specref ref="src-expredef"/> below).
	      </p></item>
	    </olist>
	   </p>
	  </item>
	 </olist>       
	 <!--*
* material suppressed here by diff group b2067-d2 *
*-->
	 <note dg="b2067-d3">
	  <p>In this case, it is <local>D2′</local> and not <local>D2</local>, which is required 
	   by <clauseref ref="c-chamvalidr"/> to correspond to a <!--*
* material suppressed here by diff group b5435 *
*--><phrase dg="b5435">conforming schema</phrase>.
	   In particular, it is not an error for <local>D2</local> to
	   <phrase dg="wg20070803">fail to</phrase> satisfy
	   all of the constraints governing schema documents, while
	   it <emph>is</emph> an error if <local>D2′</local> fails to satisfy them.
	  </p>
	 </note>
	</item>
	<item>
	 <p>Within the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, each <eltref ref="simpleType"/>
	  <rfc2119>must</rfc2119> have a <eltref ref="restriction"/> among its
	  <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> and
	  each <eltref ref="complexType"/> <rfc2119>must</rfc2119> have a
	  <code>restriction</code> or <code>extension</code> among its
	  grand-<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> the <termref def="key-vv">actual value</termref> of whose <code>base</code>
	  <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> <rfc2119>must</rfc2119> be the same as the <termref def="key-vv">actual value</termref> of its own
	  <code>name</code> attribute plus target namespace;</p>
	</item>
	<item>
	 <p>Within the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, for each <eltref ref="group"/>
	  <olist role="case">
	   <item>
	    <p role="if">it has a <eltref ref="group"/> among its
	     contents at some level the <termref def="key-vv">actual value</termref> of whose
	     <code>ref</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is the same as the
	     <termref def="key-vv">actual value</termref> of its own <code>name</code> attribute plus
	     target namespace<phrase dg="b2082">
	     and that <eltref ref="group"/> does not have an <eltref ref="element"/>
	     ancestor</phrase></p>
	    <p role="then">
	     <olist role="andtest">
	      <item>
	       <p>It <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">has</phrase> exactly one such group.</p>
	      </item>
	      <item>
	       <p>The <termref def="key-vv">actual value</termref> of both that group's
		<code>minOccurs</code> and <code>maxOccurs</code>
		<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> <code>1</code> (or <termref def="key-null">absent</termref>).</p>
	      </item>
	     </olist>
	    </p>
	   </item>
	   <item>
	    <p role="if">it has no such self-reference</p>
	    <p role="then">
	     <olist role="andtest">
	      <item>
	       <p>The <termref def="key-vv">actual value</termref> of its own <code>name</code> attribute
		plus target namespace <!--*
* material suppressed here by diff group modals *
*--> successfully <!--*
* material suppressed here by diff group ep19 *
*--><phrase dg="ep19"><termref def="src-resolve">resolves</termref></phrase> to a
		model group definition in <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">S2</local>.</p>
	      </item>
	      <item>
	       <p dg="b6685x"><phrase id="anchor6685D"/>
	        The <propref comp="mgd" prop="model group"/> of the
		model group definition which corresponds to it per
		<specref ref="declare-namedModelGroup"/> <!--*
* material suppressed here by diff group rq17p *
*--><phrase dg="rq17p">accepts a subset of the element
		 sequences accepted by that model group definition in
		 <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">S2</local><!--*
* material suppressed here by diff group b6685 *
*--></phrase>.</p>
	       <!--*
* material suppressed here by diff group b6685x *
*-->
	      </item>
	     </olist></p>
	   </item>
	  </olist></p>
      
	</item>
	<item>
	 <p>Within the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, for each <eltref ref="attributeGroup" inside="simpleContent"/>
	  <olist role="case">
	   <item>
	    <p role="if">it has an <eltref ref="attributeGroup" inside="simpleContent"/>
	     among its contents the <termref def="key-vv">actual value</termref> of whose
	     <code>ref</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is the same as the
	     <termref def="key-vv">actual value</termref> of its own <code>name</code> attribute plus
	     target namespace</p>
	    <p role="then">it <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">has</phrase> exactly one such group.</p>
	   </item>
	   <item id="c-agrere">
	    <p role="if">it has no such self-reference</p>
	    <p role="then">
	     <olist role="andtest">
	      <item>
	       <p>The <termref def="key-vv">actual value</termref> of its own <code>name</code> attribute
		plus target namespace <!--*
* material suppressed here by diff group modals *
*--> successfully <!--*
* material suppressed here by diff group ep19 *
*--><phrase dg="ep19"><termref def="src-resolve">resolves</termref></phrase> to an
		attribute group definition in <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">S2</local>.</p>
	      </item>
	      <item>
	       <p>The <propref comp="agd" prop="attribute uses"/> and 
		<propref comp="agd" prop="attribute wildcard"/> of the attribute group
		definition which corresponds to it per <specref ref="declare-attributeGroup"/> <!--*
* material suppressed here by diff group rq17a2 *
*--> <phrase dg="rq17a2">viewed as the <propref comp="ctd" prop="attribute uses"/> and <propref comp="ctd" prop="attribute wildcard"/> of a <compref ref="ctd"/> and the <propref comp="agd" prop="attribute uses"/> and <propref comp="agd" prop="attribute wildcard"/> of that attribute group
		 definition in <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">S2</local> viewed as the <propref comp="ctd" prop="attribute uses"/> and <propref comp="ctd" prop="attribute wildcard"/> of the
		 <propref comp="ctd" prop="base type definition"/>
		 satisfy <clauseref ref="c-ran"/> of <specref ref="derivation-ok-restriction"/>.</phrase></p>
	      </item>
	     </olist></p>
	   </item>
	  </olist>
	  <note>
	   <p>An attribute group restrictively redefined per
	    <clauseref ref="c-agrere"/> corresponds to an attribute
	    group whose <propref comp="agd" prop="attribute uses"/>
	    consist all and only of those attribute uses corresponding
	    to <eltref ref="attribute"/>s  explicitly present among
	    the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of the <eltref ref="redefine"/>ing
	    <eltref ref="attributeGroup" inside="simpleContent"/>. No inheritance from the
	    <eltref ref="redefine"/>d attribute group occurs.  Its
	    <propref comp="agd" prop="attribute wildcard"/> is
	    similarly based purely on an explicit <eltref ref="anyAttribute"/>, if present.</p>
	  </note>
	 </p>
	</item>
       </olist>
      </p>
     </constraintnote>

 <constraintnote type="src" id="src-expredef">
  <head>Individual Component Redefinition</head>
  <p>Corresponding to each non-<eltref ref="annotation"/> member of the
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of a <eltref ref="redefine"/> there are one or two schema components in
the <eltref ref="redefine"/>ing schema:</p>
  <olist>
   <item>
    <p>The <eltref ref="simpleType"/> and <eltref ref="complexType"/>
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> information items each
correspond to two components:</p>
    <olist>
     <item id="icr-c11">
      <p>One component which corresponds to the top-level definition item with
the same <code>name</code> in
the <eltref ref="redefine"/>d schema document, as defined in <specref ref="components"/>, except that its <xpropref role="anon">name</xpropref> is <termref def="key-null">absent</termref><phrase dg="context-2338"> and its <xpropref role="anon">context</xpropref> is the redefining component, as defined in <clauseref ref="icr-c12"/> below</phrase>;</p>
     </item>
     <item id="icr-c12">
      <p>One component which corresponds to the information item itself, as defined
in <specref ref="components"/>, except that its <xpropref role="anon">base type definition</xpropref> is
the component defined in <clauseref ref="icr-c11"/> above.</p>
     </item>
    </olist>
    <p>This pairing ensures the coherence constraints on type definitions
are respected, while at the same time achieving the desired effect, namely that
references to names of redefined components in both the <eltref ref="redefine"/>ing and
<eltref ref="redefine"/>d schema documents <!--*
* material suppressed here by diff group ep-rr *
*--><phrase dg="ep-rr"><termref def="src-resolve">resolve</termref></phrase> to the redefined component
as specified in 1.2 above.</p>
   </item>
   <item>
    <p>The <eltref ref="group"/> and <eltref ref="attributeGroup" inside="simpleContent"/>
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> each correspond to a single component, as defined in <specref ref="components"/>, except that<phrase dg="b2861cc-1g"> if and when a self-reference based on a  <code>ref</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> whose <termref def="key-vv">actual value</termref> is the same as the item's <code>name</code> plus target namespace is 
<!--*
* material suppressed here by diff group ep-rr *
*--><phrase dg="ep-rr"><termref def="src-resolve">resolved</termref></phrase>, a component which corresponds to the top-level definition item of that name and the appropriate kind in
<!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">S2</local> is used.</phrase></p>
    <!--*
* material suppressed here by diff group b2861cc-1g *
*-->
   </item>
  </olist>
  <p>In all cases there <rfc2119>must</rfc2119> be a top-level definition item of the appropriate name and kind in
the <eltref ref="redefine"/>d schema document.</p>
 </constraintnote>
 <note><p><phrase dg="ep99">The above is carefully worded so that</phrase><!--*
* material suppressed here by diff group ep99 *
*-->
multiple equivalent <eltref ref="redefine"/>ing of the same schema document will not constitute a violation of
<clauseref ref="c-nmd"/> of <specref ref="sch-props-correct"/>, but applications are
allowed, indeed encouraged, to avoid <eltref ref="redefine"/>ing the same
schema document in the same way more than once to forestall the necessity of
establishing identity component by component (although this will have to be
done for the individual redefinitions themselves).</p></note>
</div3>


<div3 id="override-schema" dg="b4767">
 <head>Overriding component definitions (<code>&lt;override&gt;</code>)</head>
 <p>The <code>&lt;redefine&gt;</code> construct defined 
  in <specref ref="modify-schema"/>
  is useful in schema evolution and versioning,
  when it is desirable to have some guaranteed restriction or extension
  relation between the old component and the redefined component. 
  But there are occasions when the schema author simply wants to
  replace old components with new ones without any constraint.
  <phrase dg="b2224">Also, existing XSD processors
  have implemented conflicting and non-interoperable interpretations
  of <eltref ref="redefine"/>, and the <eltref ref="redefine"/>
  construct is <termref def="key-deprecated">deprecated</termref>.</phrase>
  The <eltref ref="override"/> construct defined in this section
  allows such unconstrained replacement.</p>
      <note dg="b4767b">
      <p>The name of the <eltref ref="override"/> element
       has nothing to do with the use of the term 
       <quote><termref def="key-overrides"/></quote>
       to denote the relation between an <termref def="key-itd"/>
       and another type.  The two mechanisms are
       distinct and unrelated.</p>
       <!--*
* material suppressed here by diff group b4767-en *
*-->
      </note>
 <reprdef>
  <reprelt eltname="override"/>
 </reprdef>
 <p>A <eltref ref="schema"/> information item <rfc2119>may</rfc2119> contain any number of
  <eltref ref="override"/> elements. Their <code>schemaLocation</code>
  attributes, consisting of a URI reference, identify 
      <phrase dg="b4767b">(<quote>point to</quote>)</phrase>
  other <termref def="key-schemaDoc">schema documents</termref>,
  that is <eltref ref="schema"/> information items.</p>

 <p diff="del" dg="ep28">The <!--*
* material suppressed here by diff group b4399 *
*--><termref def="key-schema" dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--> schema</termref> corresponding to <eltref ref="schema"/> contains not
  only the components corresponding to its definition and declaration
  <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, but also all <!--*
* material suppressed here by diff group b4767b *
*--><phrase dg="b4767b">the components mapped to by the
  (possibly modified) source declarations in any</phrase> 
  overridden schema documents<phrase dg="b4767b"> (after the
  modifications described below)</phrase>. Overridden schema documents <rfc2119>must</rfc2119>
  either (a) have the same <code>targetNamespace</code> as the
  overriding schema document, or (b) no <code>targetNamespace</code> at all, in
  which case the overridden schema document is converted to the overriding schema
  document's <code>targetNamespace</code>.</p>

     <p diff="add" dg="ep28">If a schema document <!--*
* material suppressed here by diff group b8262 *
*--><phrase dg="b8262"><var>D</var><sub><phrase><var>new</var></phrase></sub></phrase>
      contains an <eltref ref="override"/> element <var>E</var>
      pointing to some schema document <!--*
* material suppressed here by diff group b8262 *
*--><phrase dg="b8262"><var>D</var><sub><phrase><var>old</var></phrase></sub></phrase>, then 
      <var>schema</var>(<!--*
* material suppressed here by diff group b8262 *
*--><phrase dg="b8262"><var>D</var><sub><phrase><var>new</var></phrase></sub></phrase>) contains not only the components in <var>immed</var>(<!--*
* material suppressed here by diff group b8262 *
*--><phrase dg="b8262"><var>D</var><sub><phrase><var>new</var></phrase></sub></phrase>), 
      but also the components in 
      <var>schema</var>(<var>override</var>(<var>E</var>,<!--*
* material suppressed here by diff group b8262 *
*--><phrase dg="b8262"><var>D</var><sub><phrase><var>old</var></phrase></sub></phrase>)).
      For all such schema documents <!--*
* material suppressed here by diff group b8262 *
*--><phrase dg="b8262"><var>D</var><sub><phrase><var>old</var></phrase></sub></phrase>,
      it <rfc2119>must</rfc2119> be the case either (a) that <var>tns</var>(<!--*
* material suppressed here by diff group b8262 *
*--><phrase dg="b8262"><var>D</var><sub><phrase><var>old</var></phrase></sub></phrase>) = <var>tns</var>(<!--*
* material suppressed here by diff group b8262 *
*--><phrase dg="b8262"><var>D</var><sub><phrase><var>new</var></phrase></sub></phrase>),
      or (b) that <var>tns</var>(<!--*
* material suppressed here by diff group b8262 *
*--><phrase dg="b8262"><var>D</var><sub><phrase><var>old</var></phrase></sub></phrase>) is <termref def="key-null">absent</termref>, in which case
      <var>schema</var>(<!--*
* material suppressed here by diff group b8262 *
*--><phrase dg="b8262"><var>D</var><sub><phrase><var>new</var></phrase></sub></phrase>) contains not the components in
      <var>schema</var>(<var>override</var>(<var>E</var>,<!--*
* material suppressed here by diff group b8262 *
*--><phrase dg="b8262"><var>D</var><sub><phrase><var>old</var></phrase></sub></phrase>)), but those in
      <var>schema</var>(<var>override</var>(<var>E</var>,<var>chameleon</var>(<var>tns</var>(<!--*
* material suppressed here by diff group b8262 *
*--><phrase dg="b8262"><var>D</var><sub><phrase><var>new</var></phrase></sub></phrase>),<!--*
* material suppressed here by diff group b8262 *
*--><phrase dg="b8262"><var>D</var><sub><phrase><var>old</var></phrase></sub></phrase>))).
      That is, before the override pre-processsing is applied,
      chameleon pre-processing is applied to <!--*
* material suppressed here by diff group b8262 *
*--><phrase dg="b8262"><var>D</var><sub><phrase><var>old</var></phrase></sub></phrase> to convert it
      to target namespace <var>tns</var>(<!--*
* material suppressed here by diff group b8262 *
*--><phrase dg="b8262"><var>D</var><sub><phrase><var>new</var></phrase></sub></phrase>); the override
      pre-processing is applied to the result, namely
      <var>chameleon</var>(<var>tns</var>(<!--*
* material suppressed here by diff group b8262 *
*--><phrase dg="b8262"><var>D</var><sub><phrase><var>new</var></phrase></sub></phrase>),<!--*
* material suppressed here by diff group b8262 *
*--><phrase dg="b8262"><var>D</var><sub><phrase><var>old</var></phrase></sub></phrase>).
     </p>
     <ednote diff="add" dg="b8262">
      <edtext>Several alternative formattings are possible for the new
       variable names here.  Which is preferable?
       (a) <var>D</var><sub><phrase><var>new</var></phrase></sub> and <var>D</var><sub><phrase><var>old</var></phrase></sub>, or
       (b) <var>D</var>_<var>new</var> and <var>D</var>_<var>old</var>, or
       (c) <var>D_new</var> and <var>D_old</var>, or
       (d) <var>D-new</var> and <var>D-old</var>, or
       (e) <var>Dnew</var> and <var>Dold</var>?
      </edtext>
     </ednote>

     <p dg="b4767b">The <!--*
* material suppressed here by diff group b6021 *
*--> <phrase dg="b6021">children of the <eltref ref="override"/>
       element</phrase> <rfc2119>may</rfc2119> override any source declarations for
      <termref def="key-compName">named</termref> components which
      appear among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of the
      <eltref ref="schema"/>,
      <eltref ref="redefine"/>, or
      <eltref ref="override"/> elements in <!--*
* material suppressed here by diff group b6021 *
*--><phrase dg="b6021">the <termref def="key-targetset"/> of
       the <eltref ref="override"/> element information item.</phrase>.
     </p>
     <p dg="b6021"><termdef id="key-targetset" term="target set">The
       <term>target set</term> of an <eltref ref="override"/> element information       
       item <var>E</var> contains <olist role="all">
	<item>
	 <p>The schema document identified by the <code>schemaLocation</code>
	  attribute of <var>E</var>.</p>
	</item>
	<item>
	 <p>The schema document identified by the <code>schemaLocation</code>
	  attribute of any <eltref ref="override"/> element information item
	  in a schema document contained in the <termref def="key-targetset"/> 
	  of <var>E</var>.</p>
	</item>
	<item>
	 <p>The schema document identified by the <code>schemaLocation</code>
	  attribute of any <eltref ref="include"/> element information item
	  in a schema document contained in the <termref def="key-targetset"/> 
	  of <var>E</var>.</p>
	</item>
	<!--*
* material suppressed here by diff group b6021r *
*-->
       </olist>
       The <term>target set</term> of <var>E</var> contains no other schema documents.
      </termdef></p>
     <!--*
* material suppressed here by diff group add.b4767b.b6021 *
*-->
     <!--*
* material suppressed here by diff group b4767b.b6021.del *
*-->
     <note dg="b6021">
      <p>
       The <termref def="key-targetset"/> of an <eltref ref="override"/> element is
       the transitive closure of the union of the inclusion relation (which contains
       the pair (<var>S1</var>, <var>S2</var>) if and only if <var>S1</var> contains an <eltref ref="include"/> 
       element pointing to <var>S2</var>) and the override relation (which contains
       the pair (<var>S1</var>, <var>S2</var>) if and only if <var>S1</var> contains an <eltref ref="override"/> 
       element pointing to <var>S2</var>).  It does not include schema documents which 
       are pointed to by <eltref ref="import"/> or <eltref ref="redefine"/> elements,
       unless they are also pointed to by <eltref ref="include"/> or
       <eltref ref="override"/> elements in the relevant schema documents.
      </p>
      <p dg="b6021nr">
       Source declarations not present in the target set of <var>E</var> cannot
       be overridden, even if they are present in other schema
       documents consulted in the creation of the schema (e.g. in
       schema documents pointed to by a <eltref ref="redefine"/>
       element).
      </p>
     </note>

     <note dg="b6021">
      <p>It is <emph>not</emph> forbidden for the schema document <var>D</var> containing
       an <eltref ref="override"/> element <var>E</var> to be in the <termref def="key-targetset"/>
       of <var>E</var>.</p>
      <p>If applying the override transformation specified in 
       <specref ref="override-xslt"/> to <var>D</var> and <var>E</var> results in 
       a schema document equivalent to <var>D</var> (e.g. when none of the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>
       of <var>D</var>, or of any <eltref ref="redefine"/> and <eltref ref="override"/>
       elements in <var>D</var> match any of the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <var>E</var>, except 
       for the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <var>E</var> themselves), then the effect is the same
       as for a cyclic set of <eltref ref="include"/> references, or
       as for multiple inclusions of the same document (as
       described in the note at the end of 
       <specref ref="compound-schema"/>).
      </p>
      <p>If applying the override transformation to <var>D</var> and <var>E</var> changes
       any of the XML representations of components, then the effect of
       <var>D</var> being in the <termref def="key-targetset"/> of <var>E</var> is the same
       as if two different schema documents containing conflicting
       definitions for the same components were included.  (<quote>As if</quote>
       is inexact; in this case what happens is, precisely,
       that two schema documents with conflicting contents are
       included.)
      </p>
     </note>

 <p>The definitions within the <eltref ref="override"/> element itself are
  <emph>not</emph> required to be similar in any way to 
  <!--*
* material suppressed here by diff group b4767b *
*--><phrase dg="b4767b">the
  source declarations</phrase> being
  overridden. Not all the <!--*
* material suppressed here by diff group b4767b *
*--><phrase dg="b4767b">source declarations</phrase> 
  of the overridden schema document need be
  overridden.</p>
 <p>As this mechanism is very similar to <eltref ref="redefine"/>, many similar
  kinds of caution need to be taken in using <eltref ref="override"/>. Please
  refer to <specref ref="modify-schema"/> for details.</p>
 <note role="example">
  <eg xml:space="preserve">v1.xsd:
 &lt;xs:complexType name="personName"&gt;
  &lt;xs:sequence&gt;
   &lt;xs:element name="firstName"/&gt;
   &lt;xs:element name="lastName"/&gt;
  &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;

 &lt;xs:element name="addressee" type="personName"/&gt;

v2.xsd:
 &lt;xs:override schemaLocation="v1.xsd"&gt;
  &lt;xs:complexType name="personName"&gt;
   &lt;xs:sequence&gt;
    &lt;xs:element name="givenName"/&gt;
    &lt;xs:element name="surname"/&gt;
   &lt;/xs:sequence&gt;
  &lt;/xs:complexType&gt;
 &lt;/xs:override&gt;

 &lt;xs:element name="author" type="personName"/&gt;
  </eg>
  <p>The schema corresponding to <code>v1.xsd</code> has a complex type named
   <code>personName</code> with a sequence of <code>firstName</code>
   and <code>lastName</code> children. The schema corresponding to <code>v2.xsd</code>
   overrides <code>personName</code>, by providing a different sequence of
   element children. All elements with the <code>personName</code> type are
   now constrained to have the sequence of <code>givenName</code> and
   <code>surname</code>. This includes not only the <code>author</code>
   element, but also the <code>addressee</code> element.</p>
 </note>
 <!--*
* material suppressed here by diff group b6021-promise *
*-->
 <!--*
* material suppressed here by diff group b6021-promise *
*-->

     <constraintnote type="src" id="src-override">
      <head>Override Constraints and Semantics</head>
      <p>In addition to the conditions imposed on <eltref ref="override"/> element
       information items by the schema for schema<!--*
* material suppressed here by diff group b2067-2e *
*--><phrase dg="b2067-2e"> documents</phrase> <olist role="and.apply">
	<!--*
* material suppressed here by diff group b6012 *
*-->
	<item><p>
	  If the <termref def="key-vv">actual value</termref> of the <code>schemaLocation</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>
	  successfully resolves <olist role="oomtest">
	   <item><p>
	     It resolves to (a fragment of) a resource which is an XML document (see
	     <clauseref ref="c-vxd"/> of <specref ref="src-include"/>), which in turn
	     corresponds to a <eltref ref="schema"/> element information item in a
	     well-formed information set.
	    </p></item>
	   <item><p>
	     It resolves to a <eltref ref="schema"/> element information item in a
	     well-formed information set.
	    </p></item>
	  </olist>
	  In either case call the overridden <eltref ref="schema"/> item <phrase diff="del" dg="b8262"><local>D2</local></phrase><phrase diff="add" dg="b8262"><var>D</var><sub><phrase><var>old</var></phrase></sub></phrase>
	  and the overriding item's parent <eltref ref="schema"/> item <phrase diff="del" dg="b8262"><local>D1</local></phrase><phrase diff="add" dg="b8262"><var>D</var><sub><phrase><var>new</var></phrase></sub></phrase>.
	 </p></item>
	<item><olist role="Or">
	  <item id="c-o-normir"><p>
	    <phrase diff="del" dg="b8262"><local>D2</local></phrase><phrase diff="add" dg="b8262"><var>D</var><sub><phrase><var>old</var></phrase></sub></phrase> has a <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, and its
	    <termref def="key-vv">actual value</termref> is identical to the <termref def="key-vv">actual value</termref> of the <code>targetNamespace</code>
	    <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of <phrase diff="del" dg="b8262"><local>D1</local></phrase><phrase diff="add" dg="b8262"><var>D</var><sub><phrase><var>new</var></phrase></sub></phrase> (which <rfc2119>must</rfc2119> have such an <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>).
	   </p></item>
	  <item id="c-o-normi2r"><p>
	    Neither <phrase diff="del" dg="b8262"><local>D2</local></phrase><phrase diff="add" dg="b8262"><var>D</var><sub><phrase><var>old</var></phrase></sub></phrase> nor <phrase diff="del" dg="b8262"><local>D1</local></phrase><phrase diff="add" dg="b8262"><var>D</var><sub><phrase><var>new</var></phrase></sub></phrase> have a <code>targetNamespace</code>
	    <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>.
	   </p></item>
	  <item id="c-o-chamir"><p>
	    <phrase diff="del" dg="b8262"><local>D2</local></phrase><phrase diff="add" dg="b8262"><var>D</var><sub><phrase><var>old</var></phrase></sub></phrase> has no <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> (but <phrase diff="del" dg="b8262"><local>D1</local></phrase><phrase diff="add" dg="b8262"><var>D</var><sub><phrase><var>new</var></phrase></sub></phrase>
	    does).
	   </p></item>
	 </olist></item>
	<item><olist role="Case">
	  <item>
	   <p role="if"><clauseref ref="c-o-normir"/> or <clauseref ref="c-o-normi2r"/>
	    above is satisfied</p>
	   <p role="then"><olist>
	     <item id="c-e1e2"><p>
	       Let <phrase diff="del" dg="b8262"><local>D2′</local></phrase><phrase diff="add" dg="b8262"><var>D<phrase><sub>old</sub>′</phrase></var></phrase> be a <eltref ref="schema"/> information item obtained by
	       <!--*
* material suppressed here by diff group b2067m *
*--><phrase dg="b2067m">performing on <phrase diff="del" dg="b8262"><local>D2</local></phrase><phrase diff="add" dg="b8262"><var>D</var><sub><phrase><var>old</var></phrase></sub></phrase> the transformation
		specified in <specref ref="override-xslt"/></phrase>. Then
	       <phrase diff="del" dg="b8262"><local>D2′</local></phrase><phrase diff="add" dg="b8262"><var>D<phrase><sub>old</sub>′</phrase></var></phrase> corresponds to a conforming schema (call it <phrase diff="del" dg="b8262"><local>S2</local></phrase><phrase diff="add" dg="b8262"><var>S</var><sub><phrase><var>old</var></phrase></sub></phrase>).
	      </p></item>
	     <item>
	      <!--*
* material suppressed here by diff group b4767b *
*-->
	      <p dg="b4767b">
	       The <eltref ref="override"/> element in schema document <phrase diff="del" dg="b8262"><local>D1</local></phrase><phrase diff="add" dg="b8262"><var>D</var><sub><phrase><var>new</var></phrase></sub></phrase> 
	       pointing to <phrase diff="del" dg="b8262"><local>D2</local></phrase><phrase diff="add" dg="b8262"><var>D</var><sub><phrase><var>old</var></phrase></sub></phrase> is replaced by an
	       <eltref ref="include"/> element pointing to <phrase diff="del" dg="b8262"><local>D2′</local></phrase><phrase diff="add" dg="b8262"><var>D<phrase><sub>old</sub>′</phrase></var></phrase>
	       and the inclusion is handled as described in
	       <specref ref="compound-schema"/>.
	      </p>
	      <note dg="b4767b">
	       <p>It is not necessary to perform a literal replacement
		of the <eltref ref="override"/> element in <phrase diff="del" dg="b8262"><local>D1</local></phrase><phrase diff="add" dg="b8262"><var>D</var><sub><phrase><var>new</var></phrase></sub></phrase> with an
		<eltref ref="include"/> element; any implementation technique
		can be used as long as it produces the required result.
	       </p>
	      </note>
	      <note dg="b4767b">
	       <p>One effect of the rule just given is that  
		the schema corresponding to <phrase diff="del" dg="b8262"><local>D1</local></phrase><phrase diff="add" dg="b8262"><var>D</var><sub><phrase><var>new</var></phrase></sub></phrase> includes not only definitions or
		declarations corresponding to the appropriate members of its own
		<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, but also components identical to all the
		<termref def="c">schema components</termref> of <phrase diff="del" dg="b8262"><local>S2</local></phrase><phrase diff="add" dg="b8262"><var>S</var><sub><phrase><var>old</var></phrase></sub></phrase><phrase dg="ep30"> 
		 (with the possible
		 exception of the <compref ref="s"/> component
		 of <phrase diff="del" dg="b8262"><local>S2</local></phrase><phrase diff="add" dg="b8262"><var>S</var><sub><phrase><var>old</var></phrase></sub></phrase>)</phrase>.
	       </p>
              </note>
	      <note dg="b4767b">
	       <p>Another effect is that if schema document <var>A</var> contains
		a source declaration for a component <var>E</var>, and schema document <var>B</var>
		overrides <var>A</var> with its own declaration for <var>E</var>, 
		and schema document <var>C</var> in turn overrides <var>B</var> with a 
		third declaration for <var>E</var>, then 
		<olist>
		 <item>
		  <p>First, the override of <var>B</var> by <var>C</var> is handled.  The
		   resulting schema document still contains an 
		   <eltref ref="override"/> element referring to <var>C</var>,
		   but the declaration for <var>E</var> contained in it has 
		   been replaced by that specified in <var>C</var>.</p>
		 </item>
		 <item>
		  <p>Then, the override of <var>A</var> by (the modified version of) <var>B</var>
		   is handled.</p>
		 </item>
		 <item>
		  <p>The resulting version of <var>A</var>, containing
		   the declaration for <var>E</var> originally present in <var>C</var>,
		   is included by the modified version of <var>B</var>,
		   which is itself included by <var>C</var>.
		  </p>
		 </item>
		 <item>
		  <p>The resulting schema contains
		   the version of <var>E</var> originally specified in 
		   schema document <var>C</var>.
		  </p>
		 </item>
		</olist>
		(The references to <quote>first</quote> and 
		<quote>next</quote> here refer to the logical precedence
		of operations, not to a required order in which implementations
		are required to perform particular tasks.)
	       </p>
	      </note>
	     </item>
	    </olist></p>
	  </item>
	  <item>
	   <p role="if"><clauseref ref="c-o-chamir"/> above is satisfied</p>
	   <p role="then"><olist>
	     <item id="c-o-chamvalidr"><p>
	       Let <phrase diff="del" dg="b8262"><local>D2′</local></phrase><phrase diff="add" dg="b8262"><var>D<phrase><sub>old</sub>′</phrase></var></phrase> be a <eltref ref="schema"/> information item obtained by
	       <!--*
* material suppressed here by diff group b2067m *
*--><phrase dg="b2067m">performing on <phrase diff="del" dg="b8262"><local>D2</local></phrase><phrase diff="add" dg="b8262"><var>D</var><sub><phrase><var>old</var></phrase></sub></phrase> first the transformation
		specified in <specref ref="chameleon-xslt"/> and then the
		transformation specified in <specref ref="override-xslt"/></phrase>. Then
	       <phrase diff="del" dg="b8262"><local>D2′</local></phrase><phrase diff="add" dg="b8262"><var>D<phrase><sub>old</sub>′</phrase></var></phrase> corresponds to a conforming schema (call it <local>S2</local>).
	      </p></item>
	     <item><!--*
* material suppressed here by diff group b4767b *
*-->
	      <p dg="b4767b">
	       The <eltref ref="override"/> element in schema document <phrase diff="del" dg="b8262"><local>D1</local></phrase><phrase diff="add" dg="b8262"><var>D</var><sub><phrase><var>new</var></phrase></sub></phrase> 
	       pointing to <phrase diff="del" dg="b8262"><local>D2</local></phrase><phrase diff="add" dg="b8262"><var>D</var><sub><phrase><var>old</var></phrase></sub></phrase> is replaced by an
	       <eltref ref="include"/> element pointing to <phrase diff="del" dg="b8262"><local>D2′</local></phrase><phrase diff="add" dg="b8262"><var>D<phrase><sub>old</sub>′</phrase></var></phrase>
	       and the inclusion is handled as described in
	       <specref ref="compound-schema"/>.
	      </p>
	     </item>
	    </olist></p>
	  </item>
	 </olist>
	</item>
 <!--*
* material suppressed here by diff group b6012 *
*-->
       </olist></p>
     </constraintnote>
<!--*
 <ednote diff="add" dg="b4767-en"><edtext>
  The above clauses are almost identical to the counter parts for &lt;redefine>.
  Can this be simplified to say "clauses 1-4 of XXX constraint MUST be true,
  where &lt;override> and its derivitives are used in places of &lt;redefine>
  etc."?
 </edtext></ednote>
*-->
<!--* not anymore they're not.  Consider a D2 containing type T and
    * element E of type T.  If we override type T, but not element E,
    * then we want the resulting schema S1 to contain a declaration
    * for element E of type T *as modified*.  
    * If we take the 'small component' view of component identity,
    * in which components have references to other components, not
    * components, as property values, then the declaration for E
    * is the same both in the schema S1 and schema S2.
    * But if we take the 'large component' view, E has a type
    * as its {type definition} value, not a reference to a type.
    * And in that case, the E in the schema of D2 and the E in
    * the schema of D1 are different components.
    * 
    * Either way would work, but the WG has thus far not wanted to
    * do the work of clarifying component identity and choosing
    * (among other things) between the small and large component views.
    *
    * So I've changed the text to perform a textual substitution on 
    * the schema document and then do the usual mapping.
    *-->
 <note>
  <p>The effect of applying the stylesheet in <specref ref="override-xslt"/>
   is to make <phrase diff="del" dg="b8262"><local>D2′</local></phrase><phrase diff="add" dg="b8262"><var>D<phrase><sub>old</sub>′</phrase></var></phrase> identical to <phrase diff="del" dg="b8262"><local>D2</local></phrase><phrase diff="add" dg="b8262"><var>D</var><sub><phrase><var>old</var></phrase></sub></phrase> except that some elements in
   <phrase diff="del" dg="b8262"><local>D2</local></phrase><phrase diff="add" dg="b8262"><var>D</var><sub><phrase><var>old</var></phrase></sub></phrase> are replaced <!--*
* material suppressed here by diff group b6021 *
*--><!--*
* material suppressed here by diff group b6021 *
*-->
       <phrase dg="b6021">or modified, as described in 
	<specref ref="override-xslt"/>.</phrase>
   Implementations do not have to use <bibref ref="bib-xslt2"/>
	  transformation, as long as the same result is produced.</p>
	</note>
 <note>
  <p>It is <phrase diff="del" dg="b8262"><local>D2′</local></phrase><phrase diff="add" dg="b8262"><var>D<phrase><sub>old</sub>′</phrase></var></phrase> and not <phrase diff="del" dg="b8262"><local>D2</local></phrase><phrase diff="add" dg="b8262"><var>D</var><sub><phrase><var>old</var></phrase></sub></phrase>, which is required to correspond to a
   <!--*
* material suppressed here by diff group b5435 *
*--><phrase dg="b5435">conforming schema</phrase>. In particular, it is not an error for <phrase diff="del" dg="b8262"><local>D2</local></phrase><phrase diff="add" dg="b8262"><var>D</var><sub><phrase><var>old</var></phrase></sub></phrase> to fail to
   satisfy all of the constraints governing schema documents, while it
   <emph>is</emph> an error if <phrase diff="del" dg="b8262"><local>D2′</local></phrase><phrase diff="add" dg="b8262"><var>D<phrase><sub>old</sub>′</phrase></var></phrase> fails to satisfy them.
	 </p>
 </note>
 <note><p>
  In <eltref ref="redefine"/>, components are allowed or required to refer to
  themselves. There is no similar special treatment in <eltref ref="override"/>.
  Overriding components are constructed as if the overridden components had never
  existed.
 </p></note>
 <!--*
* material suppressed here by diff group b4767-en *
*-->
 <!--*
* material suppressed here by diff group b4767-en *
*-->
 <note><p>
  <phrase dg="ep99">The above is carefully worded so that</phrase><!--*
* material suppressed here by diff group ep99 *
*-->
  multiple equivalent overrides of the
  same schema document will not constitute a violation of <clauseref ref="c-nmd"/>
  of <specref ref="sch-props-correct"/>, but applications are allowed, indeed
  encouraged, to avoid overriding the same schema document in the same way
  more than once to forestall the necessity of establishing identity component
  by component<!--*
* material suppressed here by diff group b4767b *
*-->.
 </p></note>
 <note>
  <p>
   It is a consequence of the semantics of inclusion, as
   defined in <specref ref="src-include"/> (in particular
   <clauseref ref="c-incl-incl"/> and
   <clauseref ref="c-incl-ns-capture"/>); 
   redefinition, as defined in 
   <specref ref="modify-schema"/>;
   import, as defined in 
   <specref ref="composition-schemaImport"/>;
   and overriding, as defined in this section, 
   that if the same schema document is both (a) included, imported, or
   redefined, and (b) non-vacuously overridden, or if the same
   schema document overridden twice in 
   different ways, then
   the resulting schema will have duplicate and conflicting versions
   of some components and will not be conforming,
   just as if two different schema documents had been
   included, with different declarations for the same
   <termref def="key-compName">named</termref> components.
  </p>
 </note>
 <!--*
* material suppressed here by diff group b4767-en *
*-->
</div3>

<div3 id="composition-schemaImport">
<head>References to schema components across namespaces<phrase dg="imp"> (<code>&lt;import&gt;</code>)</phrase></head>
<p>As described in <specref ref="concepts-data-model"/>, every top-level schema component is associated with
a target namespace (or, explicitly, with none).  <phrase dg="imp">Furthermore,
each schema document carries on its <eltref ref="schema"/> element
at most one <att>targetNamespace</att> attribute associating that document
with a target namespace.</phrase> This section sets out
the <!--*
* material suppressed here by diff group imp *
*-->
<phrase dg="imp">syntax and mechanisms by which references
<!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase> be made from within a <termref def="key-schemaDoc">schema document</termref> to components
<phrase diff="del" dg="b6008a">not within</phrase>
<phrase diff="add" dg="b6008a">outside</phrase> that document's target
namespace.  Also included within the same syntax is an optional
facility for suggesting the URI of a 
<termref def="key-schemaDoc">schema document</termref> containing 
definitions and declarations for components from the foreign 
target namespace.</phrase></p>

<note dg="imp">
<p>
Some users of <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">version 1.0 of this specification</phrase> have mistakenly
<phrase dg="ep99">assumed</phrase><!--*
* material suppressed here by diff group ep99 *
*--> that the
primary purpose of the <eltref ref="import"/> is to cause retrieval of
a resource identified by the <code>schemaLocation</code> attribute.
Although the function of <eltref ref="import"/> is
unchanged in <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">this version</phrase>, the presentation below has been
reorganized to clarify the two separate purposes served by 
<eltref ref="import"/><phrase dg="b5145">, namely
(1) to license references, within a schema document, to
components in the imported namespace, and (2) to provide information
about the location of schema documents for imported namespaces</phrase>.
</p></note>

<!--*
* material suppressed here by diff group imp *
*-->

 <reprdef>
 <reprelt eltname="import"/>
</reprdef>
 <p>The <eltref ref="import"/> element information item identifies namespaces
used in external references, i.e. those whose
<termref def="gloss-QName">QName</termref> identifies them as coming from a
different namespace (or none) than the enclosing schema document's
<code>targetNamespace</code>.</p>
<!--* !!! paragraph split introduced by diff group 'imp' !!! *-->
<!--* For now, I'm going to assume that we plan to ignore 
    * changes like that in producing diff.  But I also assume
    * we may change our minds.  I.e. don't delete the preceding
    * comment until we're sure. Ditto for comments about
    * moving things.
    *-->

<div4 id="composition-importLicenseReferences">
<head>Licensing References to Components Across Namespaces</head>

<p dg="imp">At least two conditions must be satisfied for a
reference to be made to a foreign component: <phrase dg="b5779">(1)</phrase>
there must be <!--*
* material suppressed here by diff group b5779 *
*--> a
means of addressing such foreign components<phrase dg="b5779">,</phrase> 
<!--*
* material suppressed here by diff group b5779 *
*--><phrase dg="b5779">and
(2) there must be</phrase> a signal to
schema-aware processors that a schema document contains such
references. <phrase dg="b5779">The namespace
mechanisms defined by <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-namespaces-1.1" dg="b1838refs"/>
satisfy the first requirement by allowing foreign components
to be addressed.
(How those components are located is governed by the
processor's strategies for locating schema components
in a given namespace, in which the <att>schemaLocation</att> attribute
on the <eltref ref="import"/> element can play a role;
see also <specref ref="var_schema_con"/>.)
</phrase>
<!--*
* material suppressed here by diff group b5779 *
*--><phrase dg="b5779">The</phrase> <eltref ref="import"/> element information item
<!--*
* material suppressed here by diff group b5779 *
*--><phrase dg="b5779">serves
to satisfy the second requirement, by identifying</phrase> 
namespaces used in external component
references, i.e.  those whose 
<termref def="gloss-QName">QName</termref> identifies them as coming 
from a namespace different from that of the enclosing schema
document's <code>targetNamespace</code>. 
<!--* MSM suppresses the "(or none)" after "namespace" two lines up,
    * because it makes the sentence
    * too gnarly.  For purposes of this paragraph, the 'anonymous
    * namespace' is best treated as a namespace. Damn and blast the
    * editors of the spec who too much loved paradox. *-->
By contrast, a namespace used for other purposes in a schema document
       need not be imported. <!--*
* material suppressed here by diff group b6009 *
*-->
</p>
<note dg="b6009">
       <p>
	<phrase id="eg.html" dg="b6009">There is 
	 no need, for example, to import the
	 namespace of a vocabulary such as <phrase dg="b6009">X</phrase>HTML 
	 for use in schema 
	 <eltref ref="documentation"/> elements, unless that same namespace is also
	 used as the target namespace for component references.</phrase>
       </p>
       <p>       
	If the schema document does refer to components in the XHTML
	namespace, then the schema document <rfc2119>must</rfc2119> include an element of the form 
	<eg xml:space="preserve">&lt;xs:import namespace="http://www.w3.org/1999/xhtml"/&gt;</eg>
	(with the  possible addtion of a <att>schemaLocation</att> attribute
	and annotations).  As just described, this explicit import 
	makes it legitimate to refer to components in the XHTML namespace,
	as base type definitions, or from within content models.
       </p>
       <p>
	No import is needed in order to use XHTML to mark up the text
	appearing within <eltref ref="documentation"/> elements, since
	that usage does not require the schema being constructed to
	include components from the XHTML namespace.  (As a 
	practical matter, this saves the processor the effort to
	locate a schema for the XHTML namespace.)  Importing or
	not importing the XHTML namespace in a schema document
	has no effect on the validity of XHTML within <eltref ref="documentation"/>
	elements:  elements in the XHTML
	namespace (or any other namesapce) are allowed within 
	<eltref ref="appinfo"/> or <eltref ref="documentation"/>
	element in the schema document, because the schema for
	schema documents in <specref ref="normative-schemaSchema"/>
	declares the type of those elements with a lax wildcard.
	Also, importing the namespace affects the schema being 
	constructed, not the schema used to validate schema
	documents.  The latter is specified in <specref ref="normative-schemaSchema"/>.
       </p>
      </note>
      <note dg="b6009">
       <p>Different designs for namespace import could of course be
	imagined.  In particular, declaring a prefix for a namespace could
	automatically import that namespace.</p>
       <p>If each use of a foreign namespace within a schema document
	implicitly imported that namespace into the schema being
	constructed, then using XHTML for documentation would automatically
	result in the inclusion of XHTML components in the schema
	described by the schema document.  The same logic would also
	apply to any vocabulary used for documentation. Such automatic import
	would lead processors to expend unnecessary extra effort
	to find components for the documentation namespace and would in many
	cases result in a schema which is not the one intended or desired
	by the schema author.
       </p>
       <p>Additionally, the requirement that the <eltref ref="import"/>
	element be used explicitly provides a modest level of
	redundancy that makes it easier to detect some kinds of errors
	in the schema document.
       </p>       
</note>

<p>The <termref def="key-vv">actual value</termref> of 
<!--*
* material suppressed here by diff group imp *
*--><phrase dg="imp">the</phrase> 
<att>namespace</att>
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> indicates that the containing schema document <rfc2119>may</rfc2119> contain
qualified references to schema components in that namespace (via one or more
prefixes declared with namespace declarations in the normal way).  If that
attribute is absent, then the import allows unqualified reference to components
with no target namespace.
<!--*
* material suppressed here by diff group b5779movement *
*-->
</p>
<p dg="b5779">It is a consequence of rules defined elsewhere
that if references to components in a given namespace <var>N</var>
appear in a schema document <var>S</var>,
then <var>S</var> <rfc2119>must</rfc2119> contain an <eltref ref="import"/> element
importing <var>N</var>.
Otherwise, the references will fail to resolve; see
<clauseref ref="cl.qnr.nsdeclared"/> of
<specref ref="src-resolve"/>.
References in a schema document to foreign namespaces not imported
by that schema document (or otherwise accounted for by
<specref ref="src-resolve"/>) are <emph>not</emph>
<quote>forward references</quote> in the sense of
<specref ref="mapping.xr.c"/> and are <emph>not</emph>
handled as if they referred to
<quote>missing components</quote> in the sense of
<specref ref="conformance-missing"/>.
</p>
<p dg="b5779">
<phrase dg="b5779movement" id="b5779m0">
Note that components to be imported need not be in the form of a
<termref def="key-schemaDoc">schema document</termref><phrase dg="imp"> and 
need not in particular be declared in the particular schema document identified 
by a <code>schemaLocation</code> attribute</phrase>;  the processor
is free to access or construct components using means of its own
choosing<phrase dg="imp">, whether or not a <att>schemaLocation</att> 
hint is provided</phrase>.
</phrase>
</p>

<!--* !!! The following example was originally further down !!! *-->

<note role="example" id="eg.import.html">
<p>The same namespace <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">can</phrase> be used both <!--*
* material suppressed here by diff group b5779 *
*--><phrase dg="b5779">as the namespace
of elements and attributes appearing in the schema document</phrase>, 
and in the course of
defining schema components in terms of foreign 
components<!--*
* material suppressed here by diff group imp *
*--><phrase dg="imp">.
The import in this example is necessary because there is a reference to the element
component <!--*
* material suppressed here by diff group b4316 *
*-->
<phrase dg="b4316"><code>xhtml:p</code>.</phrase>
if there were no component reference, then
the import would be unnecessary;  no import is needed for use of a namespace 
in a <eltref ref="documentation"/> 
or similar schema document element or attribute name.</phrase></p>
<eg xml:space="preserve">&lt;<phrase dg="b4316">xs:</phrase>schema xmlns<phrase dg="b4316">:xs</phrase>="http://www.w3.org/2001/XMLSchema"
        xmlns:<phrase dg="b4316">x</phrase>html="http://www.w3.org/1999/xhtml"
        targetNamespace="uri:mywork" xmlns:my="uri:mywork"&gt;

 &lt;<phrase dg="b4316">xs:</phrase>import namespace="http://www.w3.org/1999/xhtml"/&gt;

 &lt;<phrase dg="b4316">xs:</phrase>annotation&gt;
  &lt;<phrase dg="b4316">xs:</phrase>documentation&gt;<phrase dg="b6009">
   &lt;!--* The XHTML 'p' element below requires us to 
         define a prefix for the XHTML namespace, but it
         does NOT require us to import the XHTML 
         namespace into the schema.  The use of XHTML
         (or other) markup here is allowed by the lax
         wildcard in the schema for schema documents.
       *--&gt;</phrase>
   &lt;<phrase dg="b4316">x</phrase>html:p&gt;[Some documentation for my schema]&lt;/<phrase dg="b4316">x</phrase>html:p&gt;
  &lt;/<phrase dg="b4316">xs:</phrase>documentation&gt;
 &lt;/<phrase dg="b4316">xs:</phrase>annotation&gt;

 . . .

 &lt;<phrase dg="b4316">xs:</phrase>complexType name="myType"&gt;
  &lt;<phrase dg="b4316">xs:</phrase>sequence&gt;
   &lt;<phrase dg="b4316">xs:</phrase>element ref="<phrase dg="b4316">x</phrase>html:p" minOccurs="0"/&gt;
  &lt;/<phrase dg="b4316">xs:</phrase>sequence&gt;
  . . .
 &lt;/<phrase dg="b4316">xs:</phrase>complexType&gt;

 &lt;<phrase dg="b4316">xs:</phrase>element name="myElt" type="my:myType"/&gt;
&lt;/<phrase dg="b4316">xs:</phrase>schema&gt;
</eg>
<p><!--*
* material suppressed here by diff group b5145 *
*--><phrase dg="b5145">Since
component references are given as <termref def="gloss-QName">QNames</termref>,
and since <phrase dg="b5145b">the default namespace declaration can
only be used for one of </phrase> the target namespace and the <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> namespace
<phrase dg="b5145b">(which</phrase> typically differ<!--*
* material suppressed here by diff group b5145b *
*--><phrase dg="b5145b">, </phrase>except
in the case of the schema for schema<!--*
* material suppressed here by diff group b2067-2e *
*--><phrase dg="b2067-2e"> documents</phrase>),
<emph>either</emph> internal references to the names being defined in a schema document
<emph>or</emph> the schema declaration and definition elements themselves 
will normally be explicitly qualified.<!--*
* material suppressed here by diff group b5145b *
*--></phrase>
This example takes the first option — most other
examples in this specification have taken the second.</p>
</note>
</div4>

<div4 id="schemaLocationHints">
<head>Providing Hints for <phrase diff="add" dg="b5163">Imported</phrase> Schema Document Locations</head>

<p>The <termref def="key-vv">actual value</termref> of the <code>schemaLocation</code><phrase dg="imp"><phrase dg="b5146"> </phrase>attribute</phrase>, if present<phrase dg="imp"> on
an <eltref ref="import"/> element</phrase>, gives a hint as to where a
serialization of a <termref def="key-schemaDoc">schema document</termref> with declarations and definitions for <!--*
* material suppressed here by diff group imp *
*--><phrase dg="imp">the
imported</phrase> namespace (or none) <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">can
possibly</phrase> be found.  When no <code>schemaLocation</code>
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is present, the schema author is leaving the
identification of that schema to the instance, application or user,
via the mechanisms described below in <specref ref="composition-instances"/>.  When a
<code>schemaLocation</code> <phrase dg="imp">attribute</phrase> 
is present, it <rfc2119>must</rfc2119> contain a single URI reference which 
the schema author warrants will resolve to a
serialization of a <termref def="key-schemaDoc">schema document</termref> containing 
<phrase diff="add" dg="ep28">definitions and declarations of</phrase>
<!--*
* material suppressed here by diff group imp *
*-->
component(s) in the
<eltref ref="import"/>ed namespace<!--*
* material suppressed here by diff group imp *
*-->.</p>
<!--* same para? new? *-->
<p dg="imp">Conformance profiles may further 
restrict the use of the <code>schemaLocation</code> attribute.   For example, 
one profile might mandate that the hint be 
<!--* <termref def="key-honor">honored</termref>,  *-->
honored by the schema software, perhaps calling for a 
processor-dependent error should the URI fail to resolve, 
or mandating that the hint agree with some expected URI value;  
another profile might mandate that the hint not 
be honored,
<!--* <termref def="key-honor">honored</termref>, *-->
etc.
</p>
 <note>
  <p>Since both the <code>namespace</code> and <code>schemaLocation</code>
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> are optional, a bare <code>&lt;import/&gt;</code> information item
is allowed.  This simply allows unqualified reference to foreign
components with no target namespace without giving any hints as to where to find them.</p>
 </note>

<!--* !!! example eg.import.html was originally located here. *-->

 <constraintnote type="src" id="src-import">
 <head>Import Constraints and Semantics</head>
 <p>In addition to the conditions imposed on <eltref ref="import"/> element
information items by the schema for schema<!--*
* material suppressed here by diff group b2067-2e *
*--><phrase dg="b2067-2e"> documents</phrase>
    <olist role="and.apply">
     <item id="src-import-noselfimport">
      <olist role="Case">
       <item>
        <p role="if">the <code>namespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is present</p>
        <p role="then">its <termref def="key-vv">actual value</termref> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">does not</phrase> match the <termref def="key-vv">actual value</termref> of the
enclosing <eltref ref="schema"/>'s <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>.</p>
       </item>
       <item>
        <p role="if">the <code>namespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is not present</p>
        <p role="then">the enclosing <eltref ref="schema"/> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">has</phrase> a <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref></p>
       </item>
      </olist>
     </item>
    <item id="c-ims">
     <!-- HST rolled back one change here, since I think it forecloses an
          avenue we need to preserve -->
     <p>If the application schema reference strategy<phrase dg="rq144a"><!--* 
, as defined in <specref ref="var_schema_con"/>, *--> succeeds</phrase> using the <termref def="key-vv">actual value</termref>s of
the <code>schemaLocation</code> and <code>namespace</code>
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref><!--*
* material suppressed here by diff group rq144a *
*-->
      <olist role="or">
       <item id="c-ivr">
        <p>The <!--*
* material suppressed here by diff group rq144a *
*--><phrase dg="rq144a">result</phrase> is (a fragment of) a resource which is an XML document
(see <clauseref ref="c-vxd"/>), which in turn corresponds to a <eltref ref="schema"/>
element information item in a well-formed information set, which in turn
corresponds to a <!--*
* material suppressed here by diff group b5435 *
*--><phrase dg="b5435">conforming schema</phrase>.</p>
<!--* N.B. in NM's original proposal, the words "which in
    * turn corresponds to a &conforming_schema.xvs;" were deleted. *-->
<!--* MSM is not sure why NM's proposal deleted the requirement
    * that the infoset correspond to a &conforming_schema.xvs;.  He rather
    * suspects that NM is simply uncomfortable with the idea that
    * the imported schema could be a schema before being imported.
    *-->
       </item>
       <item id="c-ivs">
        <p>The <!--*
* material suppressed here by diff group rq144a *
*--><phrase dg="rq144a">result</phrase> is a <eltref ref="schema"/>
element information item in a well-formed information set, which in turn
corresponds to a <!--*
* material suppressed here by diff group b5435 *
*--><phrase dg="b5435">conforming schema</phrase>.</p>
<!--* N.B. in NM's original proposal, the words "which in
    * turn corresponds to a &conforming_schema.xvs;" were deleted. *-->
       </item>
<!--* following item originally added by ht Feb 2005, struck by WG
Aug 2006
       <item diff="add" dg="rq144a">
        <p>The result is a &conforming_schema.xvs;.</p>
       </item>
*-->
      </olist>
      In either case call the <eltref ref="schema"/> item <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D2</local> and the <!--*
* material suppressed here by diff group b5435 *
*--><phrase dg="b5435">conforming schema</phrase> <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">S2</local>.</p>
<!--* NM suppresses "and the &conforming_schema.xvs; I" *-->
    </item>
     <item>
      <p>If <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D2</local> exists, that is, <clauseref ref="c-ivr"/> or <clauseref ref="c-ivs"/>
above were satisfied, then <olist role="case">
       <item>
        <p role="if">there is a <code>namespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref></p>
        <p role="then">its <termref def="key-vv">actual value</termref> <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">is</phrase> identical to the <termref def="key-vv">actual value</termref> of the <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D2</local>.</p>
       </item>
       <item>
        <p role="if">there is no <code>namespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref></p>
        <p role="then"><!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">D2</local>
<!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals">has</phrase> no <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref></p>
       </item>
      </olist></p>
     </item>
     <!--<item diff="add" dg="imp">
      <olist role="Case.ixm">
       <item>
        <p role="if">The processor is not 
	*- - &lt;termref def="key-honor">honoring&lt;/termref> *- -  honoring
        the <code>schemaLocation</code> hint
        </p>
        <p role="then">the <eltref ref="import"/> is treated as if the <code>schemaLocation</code> was not provided.
        </p>       
       </item>
        <item>
         <p role="otherwise">The processor is 
 	  honoring  - -* &lt;termref def="key-honor">honoring&lt;/termref> *- - 
          the <code>schemaLocation</code> 
         hint; in this case, the element information item &Doc2.x; &must; appear in the 
          - -* &lt;termref def="key-set-of-docs">input-set-of-schema-documents&lt;/termref>. *- - 
         input set of schema documents. 
         </p>    </item>
   </olist>
      </item>-->
   <!--* Ooops.  This has more of a dependency on NM's proposal than I had
       * realized.  -msm
       * HST removes this item altogether, believing it to be mis-conceived
         in any case.
         See also Schema Documentation Location Strategy below *-->
   </olist>
   </p>
<p>It is <emph>not</emph> an error for the application schema<phrase dg="rq144a"> component</phrase> reference strategy to fail.
 It <emph>is</emph> an error for it to <!--*
* material suppressed here by diff group rq144a *
*--><phrase dg="rq144a"> succeed</phrase> but
the rest of <clauseref ref="c-ims"/> above to
fail to be satisfied.  Failure<!--*
* material suppressed here by diff group rq144a *
*--> <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">is likely to</phrase> cause
less than complete <termref def="key-va"/>
outcomes, of course.</p>

<p>The <termref def="c">schema components</termref> (that is
<propref comp="s" prop="type definitions"/>, <propref comp="s" prop="attribute declarations"/>, <propref comp="s" prop="element declarations"/>, <propref comp="s" prop="attribute group definitions"/>, <propref comp="s" prop="model group definitions"/>,
<propref comp="s" prop="notation declarations"/>) of a schema
corresponding to a
<eltref ref="schema"/> element information item with one or more
<eltref ref="import"/> element information items <rfc2119>must</rfc2119> include not
only definitions or declarations corresponding to the appropriate
members of its <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, but also, for each of those <eltref ref="import"/> element information items for which <clauseref ref="c-ims"/> above is satisfied, a set of <termref def="c">schema
components</termref> identical to all the <termref def="c">schema
components</termref> of <!--*
* material suppressed here by diff group b2067-2e *
*--><local dg="b2067-2e">S2</local><phrase dg="ep30"> 
		 (with the possible
		 exception of the <compref ref="s"/> component
		 of <local>S2</local>)</phrase>.</p>
</constraintnote>
<note><p><phrase dg="ep99">The above is carefully worded so that</phrase><!--*
* material suppressed here by diff group ep99 *
*-->
multiple <eltref ref="import"/>ing of the same schema document will not constitute a
violation of
<clauseref ref="c-nmd"/> of <specref ref="sch-props-correct"/>, but
applications are allowed, indeed encouraged, to avoid <eltref ref="import"/>ing the
same schema document more than once to forestall the necessity of
establishing identity component by component.  Given that the
<code>schemaLocation</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is only a hint, it is open
to applications to ignore all but the first <eltref ref="import"/> for
a given namespace, regardless of the
<termref def="key-vv">actual value</termref> of <code>schemaLocation</code>, but such a strategy risks
missing useful information when new <code>schemaLocation</code>s are
offered.</p></note>
</div4>
</div3>
</div2>
<div2 id="composition-instances">
<head>Layer 3: Schema Document Access and Web-interoperability</head>
<p>Layers 1 and 2 provide a framework for <termref def="key-va"/> and XML definition of schemas in a
broad variety of environments. Over time, <phrase dg="modals">it is possible that</phrase> a range of standards and
conventions <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">will</phrase> evolve to support
interoperability of <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> implementations on the World Wide Web.
Layer 3 defines the minimum level of function required of all
conformant processors operating on the Web: it is intended that, over
time, future standards (e.g. XML Packages) for interoperability on the
Web and in other environments can be introduced without the need to
republish this specification.</p>
<div3 id="schema-repr">
<head>Standards for representation of schemas and retrieval of schema documents on the Web</head>
<p>For interoperability, serialized <termref def="key-schemaDoc">schema documents</termref>, like all other Web
resources, <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals"><rfc2119>should</rfc2119></phrase> be identified by URI and
retrieved using the standard mechanisms of the Web (e.g. http, https,
etc.) Such documents on the Web <rfc2119>must</rfc2119> be part of XML documents (see
<clauseref ref="c-vxd"/>), and are represented in the standard XML
schema definition form described by layer 2 (that is as
<eltref ref="schema"/> element information items). </p>
<note><p><phrase id="anchor5167a2"/>
there will often be times when a schema document will be a
complete XML<!--*
* material suppressed here by diff group fpwd *
*--> document whose document element is <eltref ref="schema"/>. There will be
other occasions in which <eltref ref="schema"/> items will be contained in other
documents, perhaps referenced using fragment and/or
<phrase diff="del" dg="b5167a">XPointer</phrase>
<bibref diff="add" ref="ref-xpointer" dg="b5167a"/> notation.
</p></note>
 <note>
  <p>The variations among server software and web site administration policies
make it difficult to recommend any particular approach to retrieval requests
intended to retrieve serialized <termref def="key-schemaDoc">schema documents</termref>.  An <code>Accept</code> header of <code>application/xml,
text/xml; q=0.9, */*</code> is perhaps a reasonable starting point.</p>
 </note>
</div3>

<div3 id="schema-loc">
<head>How schema definitions are located on the Web</head>
<p>As described in <specref ref="layer1"/>, processors are responsible for providing the
schema components (definitions and declarations) needed for <termref def="key-va"/>. This
section introduces a set of <!--*
* material suppressed here by diff group b6008 *
*--> conventions to facilitate interoperability
for instance and schema documents retrieved and processed from the Web.</p>
<note><p> As discussed above in <specref ref="layer2"/>, other non-Web
mechanisms for delivering schemas for <termref def="key-va"/> <!--*
* material suppressed here by diff group modals *
*--> exist, but are outside the scope of this
specification.</p></note>
<p>Processors on the Web are free to undertake <termref def="key-va"/> against arbitrary
schemas in any of the ways set out in <specref ref="validation_outcome"/>. However, it
is useful to have a common convention for determining the schema to use. Accordingly, general-purpose schema-aware processors (i.e. those not
specialized to one or a fixed set of pre-determined schemas)
undertaking <termref def="key-va"/> of a<phrase diff="add" dg="b6008a">n instance</phrase> document on the web
<rfc2119>must</rfc2119> behave as follows:
<ulist>
<item>
<p>unless directed otherwise by the user, <termref def="key-va"/> is undertaken on the document
element information item of the <phrase diff="del" dg="b6008a">specified</phrase>
<phrase diff="add" dg="b6008a">instance</phrase> document;</p>
</item>
<item>
<p>unless directed otherwise by the user, the
processor is required to construct a schema corresponding to a schema document
whose <code>targetNamespace</code> is
identical to the
namespace name, if any, of the element information item on which <termref def="key-va"/> is undertaken.</p>
</item>
</ulist>
</p>
<p>The composition of the complete
schema for use in <termref def="key-va"/> is discussed in <specref ref="layer2"/> above.
The means used to locate appropriate schema document(s) are processor and
application dependent, subject to the following requirements: </p>
<olist>
  <item><p>Schemas are represented on the Web in the form specified above in <specref ref="schema-repr"/>;</p></item>
  <item><p>The author of a document uses namespace declarations to
indicate the intended interpretation of names appearing therein;
<!--*
* material suppressed here by diff group may *
*--><phrase dg="may">it is possible but not guaranteed that</phrase>
a schema <phrase dg="modals">is</phrase> retrievable via
the namespace name.  Accordingly whether a processor's default
behavior is or is not to attempt such dereferencing, it <rfc2119>must</rfc2119> always
provide for user-directed overriding of that default.
</p>
<note><p> Experience suggests that it is not in all cases safe or desirable from
a performance point of view to dereference namespace names as a matter of course.  User community and/or
consumer/provider agreements may <!--* I can't find a way to get rid of this one.
Perhaps I'm too tired. *-->
establish circumstances in which such dereference is a sensible
default strategy:  this specification allows but does not require particular communities to
establish and implement such conventions.  Users are always free to supply namespace names as schema location information when dereferencing <emph>is</emph> desired:  see below.</p></note></item>
<item>
<p>
On the other hand, in case a document author (human or not) created a
document with a particular schema in view, and warrants that some or
all of the document conforms to that schema, the
<code><phrase diff="add" dg="b6008a">xsi:</phrase>schemaLocation</code> 
and <code><phrase diff="add" dg="b6008a">xsi:</phrase>noNamespaceSchemaLocation</code> 
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> <phrase diff="del" dg="b6008a">(in the <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> instance namespace,
that is, <code>http://www.w3.org/2001/XMLSchema-instance</code>) (hereafter
<code>xsi:schemaLocation</code> and
<code>xsi:noNamespaceSchemaLocation</code>)</phrase> are provided.  The first records
the author's warrant with pairs of URI references (one for the namespace name, and
one for a hint as to the location of a schema document defining names for that
namespace name).  The second similarly provides a URI reference as a hint as to
the location of a schema document with no <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>.</p>
<p><!--*
* material suppressed here by diff group b5476 *
*--> <phrase dg="b5476">Processors <rfc2119>may</rfc2119></phrase>
attempt to dereference each schema document location URI in the
<termref def="key-vv">actual value</termref> of such
<code>xsi:schemaLocation</code> and <code>xsi:noNamespaceSchemaLocation</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref><!--*
* material suppressed here by diff group b2218 *
*-->.
<phrase dg="b5476">Schema processors <rfc2119>should</rfc2119> provide an option to
control whether they do so.</phrase>
<phrase dg="b2218">It is <emph>not</emph> an error for such
an attempt to fail, but failure may cause less than complete
<termref def="key-va"/> outcomes.</phrase></p>
       <note dg="b6655">
	<p>Whether schema location information in the document
	 instance should or should not be dereferenced may vary with
	 the purpose in view.
	</p>
	<p>
	 When systems rely on an input document being schema-valid
	 with respect to a particular agreed-upon schema, it is
	 important that they be able to have complete control over the
	 choice of schema used in assessment and in particular that
	 they be able to instruct the processor <emph>not</emph> to
	 follow any <att>schemaLocation</att> hints in the input.
	 Otherwise, the input document could circumvent the agreement
	 and the consumer's validation of the input, by referring to
	 an alternative schema for the same namespaces, which declares
	 the input document schema-valid but which does not adhere to
	 the prior agreement between the data source and the data
	 consumer.
	</p>
	<p>
	 In other cases the purpose of assessment may be not to
	 enforce a prior agreement between data source and consumer,
	 but to annotate the input with type definitions and other
	 useful information from the <termref def="key-psvi">post-schema-validation infoset</termref>.  In such cases it will
	 often be better to follow the <att>schemaLocation</att> hints.
	</p>
	<p>
	 Users who need to exert control over the choice of schema can
	 normally be expected to be aware of the requirement;
	 conversely, users unaware of the issue will typically be
	 those who are not relying on the use of a particular schema
	 to enforce a specific agreement with the data source.  Casual
	 users will often benefit from a default behavior of following
	 <att>schemaLocation</att> hints.
	</p>
	<p>
	 Useful guidance on how to present this and other questions to
	 end users may be found in the W3C's User Agent Accessibility
	 Guidelines <bibref ref="UAAG-1.0"/>, <bibref ref="UAAG-2.0"/>.
	</p>
       </note>
</item>
<item dg="b6011"><p>
 When schema location values (i.e. <code>schemaLocation</code> attributes on
 <eltref ref="include"/>, <eltref ref="redefine"/>, <eltref ref="override"/>,
 and <eltref ref="import"/> in schema documents, or
 <code>xsi:schemaLocation</code> and <code>xsi:noNamespaceSchemaLocation</code>
 attributes in instance documents) are dereferenced and the values are relative
 references, then the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">base URI</xpropref> of the
 <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">owner element</xpropref> <rfc2119>must</rfc2119> be used to resolve the relative references.
</p></item>
<item><p><!--*
* material suppressed here by diff group b4437 *
*--> According to the rules of
  <specref ref="layer1"/>, the corresponding schema <rfc2119>may</rfc2119> be lazily assembled, but is otherwise
  stable throughout <termref def="key-va"/>. Although schema location attributes can occur
  on any element, and can be processed incrementally as discovered, their effect
  is essentially global to the <termref def="key-va"/>. Definitions and declarations remain
  in effect beyond the scope of the element on which the binding is declared.
  </p></item>
</olist>
<note role="example"><p>Multiple schema bindings can be declared using a single
attribute.  For example consider a stylesheet:</p>
<eg xml:space="preserve">
 &lt;<phrase dg="b4316">xsl:</phrase>stylesheet xmlns<phrase dg="b4316">:xsl</phrase>="http://www.w3.org/1999/XSL/Transform"
   xmlns:<phrase dg="b4316">x</phrase>html="http://www.w3.org/1999/xhtml"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.w3.org/1999/XSL/Transform
                       http://www.w3.org/1999/XSL/Transform.xsd
                       http://www.w3.org/1999/xhtml
                       http://www.w3.org/1999/xhtml.xsd"&gt;
</eg><p>The namespace names used in <code>schemaLocation</code> can, but need not
  be identical to those actually qualifying the element within whose start tag
it is found or its other attributes. For example, as above, all
  schema location information can be declared on the document element
of a document, if desired,
  regardless of where the namespaces are actually used. </p></note>
 <!--*
* material suppressed here by diff group rq144sc *
*-->
<p>Improved or alternative conventions for Web interoperability can
be standardized in the future without reopening this specification. For
example, the W3C is currently considering initiatives to standardize the
packaging of resources relating to particular documents and/or namespaces: this
would be an addition to the mechanisms described here for layer 3. This
architecture also facilitates innovation at layer 2: for example, it would be
possible in the future to define an additional standard for the representation of
schema components which allowed e.g. type definitions to be specified piece by
piece, rather than all at once.</p>
</div3>
</div2>

</div1>
<div1 id="conformance">
<head>Schemas and Schema-validity Assessment</head>
 <!--* <issue id="RQ-144i" role="1.1">
  <p><loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=2822" target="reqs"
>Issue 2822 (RQ-144 required properties)</loc>
< ! - - * <loc href="&reqs;#WhichPSVIPropertiesReqd" target="reqs">RQ-144 (WhichPSVIPropertiesReqd)</loc> * - - >
</p>
  <p>A much more systematic and detailed exposition will be provided of what kinds of
processing/processors imply what sorts of requirements for properties and their
values in the PSVI.</p>
  <resolution>
   <p>Several overlapping but distinct positions have been offered on
this issue.  See
<loc href="http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2004Mar/0111.html">http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2004Mar/0111.html</loc>)
and <loc href="http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2004Mar/0124.html">http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2004Mar/0124.html</loc>
(W3C-member-only links) for details.  Summaries follow below:</p>

<glist>
<gitem>
<label>Position 1</label>
<def>
  <olist>
<item>
<p>We should say clearly that like the Infoset REC, our description
     of the PSVI defines, in the first instance, a vocabulary for 
     describing the outcome of schema-validity assessment.</p>
</item>

  <item>
<p>The conformance section should say explicitly what it means to 
     "completely and correctly implement . . . the Schema Information 
     Set Contributions".</p>
  

     <p>What it should say is that a "Minimally conforming" processor
     &must; expose all the specified information.</p>
</item>

  <item>
<p>The existing classes of conformant processors should be renamed</p>

     <olist>
<item><p>Minimally conforming general-purpose;</p></item>
     <item><p>Minimally conforming general-purpose, in conformance to the XML
        Representation of Schemas;</p></item>
     <item><p>Fully conforming general-purpose.</p></item>
</olist>

     <p>And new definitions of corresponding "... special-purpose"
     processors should be added.  These should allow 'self-consistent'
     subsets of Schema Component Constraints, Validation Rules, and
     Schema Information Set Contributions.</p>
</item>
</olist>
</def></gitem>
<gitem><label>Position 2</label>
<def>


  <ulist><item>
<p>Make support of the schema document format and the web media
    type orthogonal to levels of PSVI reporting.  A processor that
    accepts schema documents "conforms to the XML representation 
    of schemas."</p>
</item>

  <item>
<p>Make the processor conformance sections a completely separate
    chapter, to make clear that other people's processor conformance
    specs can appeal to the definition of the language and the PSVI.</p>
</item>

  <item>
<p>Make very clear that different specs can define processor
    conformance for different processor classes, and that our own
    processor classes are ones we recommend but not the only possible
    ones.</p>
</item></ulist></def></gitem>
<gitem><label>Position 3</label>
<def>
    <olist>
<item>
<p>We might say that in order to conform w.r.t. the XML
      transfer syntax, a processor &must; not only accept all
      valid schema documents, but should reject or flag all 
      invalid ones (i.e. it's not enough that the processor
      accept every member of the valid set; it &must; recognize
      the valid set by distinguishing it from its complement).</p>
</item>

    <item>
<p>The crucial bit might be the production of some part of the
      PSVI.  The reason an off the shelf XSLT is not a schema
      processor is that it doesn't produce any actual PSVI output.  If
      it did, it could be.</p>
</item>
</olist></def></gitem>
<gitem><label>Synthesis</label>
<def>
<p>It was proposed to amend RQ-144 to make it say (not necessarily in
these exact words):
</p>
  <ulist><item>
<p>There should be a clean separation between descriptions of the
    language(s) and descriptions of processors.</p>
</item>
  <item>
<p>We should make a good attempt to call out (in a separate
    chapter) a particular specification of processor classes that we
    hope will be useful and widely deployed.</p>
</item>
  <item>
<p>We should make clear that other processor class descs are OK.</p>
</item></ulist></def></gitem></glist>
  </resolution>
 </issue> *-->
 <p>The architecture of schema-aware processing allows for a rich
characterization of XML documents:  schema validity is not a binary
predicate.</p>
 <p>This specification distinguishes between errors in schema
construction and structure, on the one hand, and schema validation
outcomes, on the other.</p>

   <div2 id="conformance-schemaValidity">
    <head>Errors in Schema Construction and Structure</head>
    <p>Before <termref def="key-va"/> can be
     attempted, a schema is required. Special-purpose applications are
     free to determine a schema for use in <termref def="key-va"/> by whatever means are
     appropriate, but general purpose processors <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals"><rfc2119>should</rfc2119></phrase> implement
     <!--*
* material suppressed here by diff group rq144a *
*--><phrase dg="rq144a">and document a strategy for <!--*
* material suppressed here by diff group rq144wg *
*--><phrase dg="rq144wg">assembling a schema</phrase>,
      exploiting at least some if not all of the non-hard-coded
      methods outlined in <specref ref="var_schema_con"/></phrase>,
     starting with the namespaces declared in the document whose
     <termref def="key-va"/> is being undertaken,
     and the <termref def="key-vv">actual value</termref>s of the <code>xsi:schemaLocation</code> and
     <code>xsi:noNamespaceSchemaLocation</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref>
     thereof, if any, along with any other information about schema
     identity or schema document location provided by users in
     application-specific ways, if any.</p>
    <p>It is an error if a schema and all the components which are the
     value of any of its properties, recursively, fail to satisfy all
     the relevant Constraints on Schemas set out in the last section
     of each of the subsections of <specref ref="components"/>.</p>
    <p>If a schema is derived from one or more schema documents (that
     is, one or more <eltref ref="schema"/> element information items)
     based on the
     correspondence rules set out in <specref ref="components"/> and
     <specref ref="composition"/>, two additional conditions 
     hold<phrase dg="b2825-1">; both apply to the
     schema document after the conditional-inclusion
      pre-processing described in <specref ref="cip"/> is
      performed</phrase>:
     <ulist>
      <item>
       <p>It is an error if any such schema document would not be
	fully valid with respect to a schema corresponding to the
	<specref ref="normative-schemaSchema"/>, that is, following
	schema-validation with such a schema, the <eltref ref="schema"/> element information items would have a
	<propref role="psvi" ref="e-validation_attempted"/> property with value
	<pt>full</pt> or <pt>partial</pt> and a
<propref role="psvi" ref="e-validity"/> property with value
	<pt>valid</pt>.</p>
      </item>
      <item>
       <p>It is an error if any such schema document is or contains
	any element information items which violate any of the
	relevant Schema Representation Constraints set out in <specref ref="outcome-src"/>.</p>
      </item>
     </ulist>
    </p>
    <p>The <!--*
* material suppressed here by diff group b6008 *
*--> cases described above are the only types of error
     which this specification defines.  With respect to the processes
     of the checking of schema structure and the construction of
     schemas corresponding to schema documents, this specification
     imposes no restrictions on processors <!--*
* material suppressed here by diff group b3573 *
*--><phrase dg="b3573"> in the
      presence of errors<phrase dg="b3220">, beyond the
       requirement that if there are errors in a schema, or in one
       or more
       schema documents used in constructing a schema, then a 
       conforming processor <rfc2119>must</rfc2119> report 
       <!--*
* material suppressed here by diff group b3220b *
*--><phrase dg="b3220b">the fact</phrase></phrase>. 
      However, any <phrase dg="b3220">further</phrase> 
      operations performed in the
      presence of errors are outside the scope of this specification
      and are not <termref def="key-va">schema-validity
       assessment</termref> as that term is defined here.</phrase></p>

</div2>

<div2 id="validation_outcome">
<head>Assessing Schema-Validity</head>

<p>With a schema which satisfies the conditions expressed in <specref ref="conformance-schemaValidity"/> above, the schema-validity of an
element<phrase dg="rq144si"> or attribute</phrase>
information item <phrase dg="rq144si">(the
<termref def="key-vr"/>)</phrase> can be assessed.  <!--*
* material suppressed here by diff group rq144si *
*--><phrase dg="rq144si">Five</phrase>
primary approaches to this are <!--*
* material suppressed here by diff group rq144si *
*--><phrase dg="rq144si">described
and given names here; conforming processors <rfc2119>may</rfc2119> but are not required
to provide interfaces so that they can be invoked in ways consistent 
with any or all of these approaches.</phrase>
</p>

<!--* The rather awkward tagging below is motivated by the fact that
    * one of the revisions performed in dg rq144 is changing from an
    * olist to a glist while keeping mostly the same text. 
    * Diff group rq144aux should be 'pre' if rq144 is pre,
    * and 'post' otherwise'.
    *-->
<!--* !!! need to add attribute-based entry points.
    *-->
<p><!--* n.b. this p split by b5145, but I don't have a good way
to mark it, so I'm marking it in this bad way. (MSM 3 Mar 2008) *-->
<!--*
* material suppressed here by diff group rq144aux *
*-->
<glist dg="rq144aux">
<!--* In theory, it is the label elements which should be marked
    * as additions, rather than their contents.  But at the moment
    * (Feb. 2005), it is tagging the contents that is given the
    * better formatted results.
    *-->
<gitem>
<label><phrase dg="rq144si">type-driven validation</phrase></label>
<def>
<!--* addition of attributes requested by WG 2005-03.
    * change of 'appeals to' en passant; it's undefined
    * and doesn't seem the right word 
    *-->
<p>The user or application identifies a <!--*
* material suppressed here by diff group rq144si *
*--> type definition from among the <!--*
* material suppressed here by diff group rq144si *
*--><phrase dg="rq144si">type
definitions</phrase> of the schema<!--*
* material suppressed here by diff group rq144si *
*--><phrase dg="rq144si">. If the
<termref def="key-vr"/> is an element, then it is validated as described
in</phrase> <specref ref="cvc-assess-elt"/>
(<!--*
* material suppressed here by diff group b3714 *
*--><phrase dg="b3714">with the stipulated type definition
as the <termref def="key-governing-type-elem"/></phrase>)<!--*
* material suppressed here by diff group rq144si *
*--><phrase dg="rq144si">; if it is an
attribute, then it is validated with respect to that type definition
as described in <specref ref="cvc-simple-type"/>.</phrase></p>
<note dg="rq144wg2">
<p>Top-level (named) types <rfc2119>should</rfc2119> be supported; 
support for local types is optional.</p>
</note>
</def></gitem>

<gitem id="c-res">
<label><phrase dg="rq144si">element-driven validation</phrase></label>
<def>
<!--* change of 'appeals to' for consistency with other items
    *-->
<p>The user or application identifies a<phrase dg="rq144si">n</phrase> element declaration  from among the <!--*
* material suppressed here by diff group rq144si *
*--><phrase dg="rq144si">element
declarations</phrase> of the schema<!--*
* material suppressed here by diff group b5281 *
*--> and <!--*
* material suppressed here by diff group rq144si *
*--><phrase dg="rq144si">the
item is validated as described in</phrase> <specref ref="cvc-assess-elt"/> (<!--*
* material suppressed here by diff group b3714 *
*--><phrase dg="b3714">with
the stipulated element declaration as the <termref def="key-governing"/> declaration</phrase>);</p>
<note dg="rq144wg2">
<p>Top-level element<!--*
* material suppressed here by diff group ep99 *
*-->s 
<rfc2119>should</rfc2119> be supported; support for local elements is optional.</p>
</note>
</def>
</gitem>

<gitem dg="rq144si">
<label>attribute-driven validation</label>
<def>
<!--* attribute-based entry point requested by WG 2006-03
    *-->
<p>The user or application identifies an attribute declaration from
among the <!--*
* material suppressed here by diff group rq144si *
*--><phrase dg="rq144si">attribute declarations</phrase> of the schema<!--*
* material suppressed here by diff group b5281 *
*--> and the item is validated as described in
<specref ref="cvc-assess-attr"/> (<!--*
* material suppressed here by diff group b3714 *
*--><phrase dg="b3714">with
the stipulated attribute declaration as its <termref def="key-governing"/>
declaration</phrase>);</p>
</def>
</gitem>

<gitem>
<label><phrase dg="rq144si">lax wildcard validation</phrase></label>
<def><p>The processor starts from <specref ref="cvc-assess-elt"/> with
no stipulated declaration or definition<!--*
* material suppressed here by diff group rq144si *
*-->. <phrase dg="rq144si">If the <termref def="key-vr"/> and the schema determine an
element declaration (by the name of the element), an attribute
declaration (by the name of the attribute), or a type definition (by
<att>xsi:type</att>), then <termref def="key-sva">strict
validation</termref> is performed.  If they do
not identify any declaration or definition, then 
<termref def="key-lva">lax <phrase diff="del" dg="b5164">validation</phrase><phrase diff="add" dg="b5164">assessment</phrase>
</termref> is
performed.</phrase>
<note dg="rq144si"><p>The name for this method of
invocation reflects the fact that it is analogous to the validation of
an element information item which matches a <pt>lax</pt>
wildcard.</p></note></p>
</def>
</gitem>
<gitem id="key-strict-wc-mode" dg="rq144si">
<!--* strictly speaking we shouldn't need the phrase with diff/dg pair in 
    * the label element, but for now this is the way to get it colored right in
    * diffs. 2005-02-21 *-->
<!--* <label><phrase diff="add" dg="rq144si">strict wildcard validation</phrase></label>
<def>
<p diff="add" dg="rq144si">The processor starts 
from <specref ref="cvc-assess-elt"/> with
no stipulated declaration or definition, and if
the element information and the schema determine 
either an element declaration (by name) or a
type definition (via <code>xsi:type</code>), then 
<termref def="key-sva">strict</termref> assessment ensues;
if they do not identify any declaration or definition,
then no schema-validity assessment is performed (and
in typical cases the invoking process
will report an error to its environment; if no such
error is desired, lax wildcard validation will be used instead).
The name for this method of invocation
reflects the fact that it is analogous to the
validation of an element information item which matches a
<pt>strict</pt> wildcard.</p>
</def>
*-->
<label>strict wildcard validation</label>
<def>
<p>The processor starts from <specref ref="cvc-assess-elt"/> with no
stipulated declaration or definition. If the <termref def="key-vr"/>
and the schema determine an element declaration (by the name of the element),
an attribute declaration (by the name of the attribute), or a
type definition (via <code>xsi:type</code>), then <termref def="key-sva">strict</termref> <!--*
* material suppressed here by diff group rq144wg2 *
*--><phrase dg="rq144wg2">validation </phrase><!--*
* material suppressed here by diff group rq144si *
*--><phrase dg="rq144si">is
performed</phrase>; if they do not identify any declaration or
definition, then <!--*
* material suppressed here by diff group b6014 *
*-->
<termref def="key-lva" dg="b6014">lax assessment</termref> is performed.
</p>
<!--*
* material suppressed here by diff group rq144wg2 *
*-->
<note>
<p>From the point of view of schema-validity assessment and the
resulting <termref def="key-psvi">post-schema-validation infoset</termref>, lax and strict wildcard validation 
<!--*
* material suppressed here by diff group rq144wg2 *
*--><phrase dg="rq144wg2">produce 
the same result</phrase>.  <!--*
* material suppressed here by diff group rq144wg2 *
*-->
The distinction is provided in order to provide two different terms
to express the different expectations of the invoking process.
</p>
<p>
In typical cases strict wildcard validation will be
performed when the invoking process expects the <termref def="key-vr"/>
to be declared and valid and will otherwise 
report an error to its environment.  If the absence of
a declaration for the <termref def="key-vr"/> counts as a successful
outcome of validation, then it is preferable to use
<phrase dg="ep99">lax wildcard 
validation</phrase><!--*
* material suppressed here by diff group ep99 *
*--> instead.
</p>
<p dg="rq144wg2">
The name for this method of invocation
reflects the fact that it is analogous to the
validation of an element information item which matches a
<pt>strict</pt> wildcard.
</p>
</note>
</def>
</gitem>
</glist>
</p>

<note dg="rq144si">
<p>For type-, element-, and attribute-driven validation,
there is no requirement that the declaration or definition
identified by the user or application be a top-level
component of the schema.  Mechanisms for referring to 
other components are out of scope for this specification,
but see <bibref ref="ref-scds"/>.</p>
</note>

<p dg="rq144si"><termdef id="key-vr" term="validation root">The element or attribute information item at which <termref def="key-va"/> begins is called the
<term>validation root</term>.</termdef></p>

<p>The outcome of <!--*
* material suppressed here by diff group rq144si *
*--><phrase dg="rq144si">schema-validity
assessment</phrase> will be manifest in the <xpropref role="psviAnon">validation attempted</xpropref> and <xpropref role="psviAnon">validity</xpropref> properties on the <phrase dg="rq144si"><termref def="key-vr"/>, and if the <termref def="key-vr"/>
is an</phrase> element information item <!--*
* material suppressed here by diff group rq144si *
*--><phrase dg="rq144si">then also
on</phrase> its <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> and <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, recursively, as
defined by <specref ref="sic-e-outcome"/> and <specref ref="sic-a-outcome"/>.  <phrase dg="rq144si">There is no
requirement that input which is not schema-valid be rejected by an
application.</phrase> It is up to applications to decide what
constitutes a successful outcome<phrase dg="rq144si"> of
validation</phrase>.</p>

<p>Note that every element and attribute information item
participating in the <termref def="key-va"/> will
also have a <xpropref role="psviAnon">validation context</xpropref>
property which refers back to the <!--*
* material suppressed here by diff group rq144si *
*--><phrase dg="rq144si"><termref def="key-vr"/></phrase>.  <!--*
* material suppressed here by diff group rq144si *
*--><!--*
* material suppressed here by diff group b6008 *
*--></p>

  <note>
    <p>This specification does not reconstruct the XML<!--*
* material suppressed here by diff group fpwd *
*--> notion of
      <emph>root</emph> in either schemas or instances.  Equivalent
functionality is provided for at <termref def="key-va"/>
invocation, via <clauseref ref="c-res"/> above.</p>
  </note>
  <note>
   <p>This specification has nothing normative to say about multiple
<termref def="key-va"/> episodes.  It should
however be clear from the above that if a processor restarts <termref def="key-va"/> with respect to a <termref def="key-psvi">post-schema-validation infoset</termref> some <termref def="key-psvi">post-schema-validation infoset</termref>
contributions from the previous <termref def="key-va"/> <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">are likely
to</phrase> be overwritten.  Restarting <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">can
nonetheless</phrase> be useful, particularly at a node whose <xpropref role="psviAnon">validation attempted</xpropref> property is
<pt>none</pt>, in which case there are three obvious cases in which
additional useful information <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">could</phrase>
result:
    <ulist>
     <item>
      <p><termref def="key-va"/> was not attempted
because of a <termref def="key-vn">validation</termref> failure, but
declarations and/or definitions are available for at least some of the
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> or <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref>;</p>
     </item>
     <item>
      <p><termref def="key-va"/> was not attempted
because a named definition or declaration was missing, but after
further effort the processor has retrieved it.</p>
     </item>
     <item>
      <p><termref def="key-va"/> was not attempted
because it was <!--*
* material suppressed here by diff group idc *
*-->
<phrase dg="idc"><termref def="key-skipped"/>,</phrase>
but the processor has at least some
declarations and/or definitions available for at least some of the
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> or <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref>.</p>
     </item>
    </ulist>
   </p>
  </note>
 </div2>
 <div2 id="conformance-missing">
  <head>Missing Sub-components</head>
  <p>At the beginning of <specref ref="components"/>, attention is drawn to the
fact that most kinds of schema components have properties which are described therein
as having other components, or sets of other components, as values, but that
when components are constructed on the basis of their correspondence with
element information items in schema documents, such properties usually
correspond to <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#QName">QNames</xtermref>, and the
<termref def="src-resolve">resolution</termref> of such <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#QName">QNames</xtermref> <!--*
* material suppressed here by diff group may *
*--><phrase dg="may">can</phrase> fail, resulting in one or more values of or containing <termref def="key-null">absent</termref> where a component is mandated.</p>
  
<p>If at any time during <termref def="key-va"/>, an element or attribute
information item is being <termref def="key-vn">validated</termref> with respect to a component of
any kind any of whose properties has or contains such an <termref def="key-null">absent</termref> value, 
<phrase dg="b5078ab">the <termref def="key-vn">validation</termref> is modified,
as following</phrase><!--*
* material suppressed here by diff group b5078a *
*--><phrase dg="b5078b">:</phrase>
<!--*
* material suppressed here by diff group b5078b *
*-->
<!--*
* material suppressed here by diff group b5078a *
*-->
</p>
<p><!--*
* material suppressed here by diff group b5078a *
*-->
<ulist dg="b5078b">
<item>
<p>In the case of <!--*
* material suppressed here by diff group b5078ab *
*-->
attribute information items, the effect is as if
<clauseref ref="c-a1"/> of <specref ref="cvc-attribute"/> had
failed;</p>
</item>
<item>
<p>In the case of <!--*
* material suppressed here by diff group b5078ab *
*-->
element information items, the effect is as if
<clauseref ref="c-ea"/> of <specref ref="cvc-elt"/> had
failed;</p>
</item>
<item dg="b5078ab">
<p>In the case of element information items, processors
<!--*
* material suppressed here by diff group b3251 *
*--><phrase dg="b3251"><rfc2119>must</rfc2119> fall back to</phrase>
<termref def="key-lva">lax assessment</termref>.</p>
</item>
</ulist>
</p>
<!--*
* material suppressed here by diff group b5078a *
*-->
<!--*
* material suppressed here by diff group b5078b *
*-->

<!--*
* material suppressed here by diff group b5078a *
*-->

  <p>Because of the value specification for <propref role="psvi" ref="e-validation_attempted"/> in <specref ref="sic-e-outcome"/>, if this situation ever arises, the
document as a whole cannot show a <propref role="psvi" ref="e-validation_attempted"/>
of <pt>full</pt>.</p>

    <p dg="b3251">References in a <compref ref="std"/> to
     <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-unknown-dt">unknown</xspecref>
     <!--* &impl-defined; primitive *--> datatypes, or to 
     <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#dt-unknown-dt">unknown</xspecref>
     <!--* &impl-defined; *--> constraining facets, make the
     simple type definition unusable in ways similar to
     having <termref def="key-null">absent</termref> property values.   Often, such references will 
     result in component properties with <termref def="key-null">absent</termref> values, but 
     not necessarily.  In either case they,
     and likewise any types derived or constructed from them,
     are handled in the same way as described above for components 
     with <termref def="key-null">absent</termref> property values.
    </p>

 </div2>

<div2 id="conformance-processorResponsibilities">
<head>Responsibilities of Schema-aware Processors</head>
 <p>Schema-aware processors are responsible for processing XML documents,
schemas and schema documents, as appropriate given the level of conformance
(as defined in <specref ref="concepts-conformance"/>) they support,
consistently with the conditions set out above.</p>
</div2>
</div1>
</body>

<back>
<div1 id="normative-schemaSchema">
<head>Schema for <!--*
* material suppressed here by diff group rec12-main *
*--><phrase dg="rec12-main">Schema Documents (Structures)</phrase> (normative)</head>

<p>The XML representation of the schema for schema documents is
presented here as a normative part of the specification, and as an
illustrative example of how the <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XML Schema Definition Language</phrase> can define itself
using its own constructs. The names of <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> types,
elements, attributes and groups defined here are evocative of their
purpose, but are occasionally verbose. </p>

<p>There is some annotation in comments, but a fuller annotation will
require the use of embedded documentation facilities or a hyperlinked
external annotation for which tools are not yet readily available.</p>

<!--*
* material suppressed here by diff group std-1915 *
*-->

<p dg="std-1915">Like any other XML document, schema
documents may carry XML and document type declarations. An XML
declaration and a document type declaration are provided here for
convenience. Since this schema document describes the <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase>
language, the <code>targetNamespace</code> attribute on the
<code>schema</code> element refers to the <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> namespace
itself.</p>
<p dg="b1838">
Schema documents conforming to this specification may be in XML
1.0 or XML 1.1.  Conforming implementations may accept input in
XML 1.0 or XML 1.1 or both.  See <specref ref="intro-relatedWork"/>.
</p>

<p diff="add" dg="b6698">
Independent copies of this material are
available in an undated (mutable) version at
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href=""/>
and in a dated (immutable) version at
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href=""/>
— the mutable version will be updated with future revisions of 
this specification, and the immutable one will not.
<!--*
* material suppressed here by diff group wg-internal *
*-->
</p>

<!--*
* material suppressed here by diff group lp *
*-->
<codeScrap dg="lp" id="sdfsd" file="structures.diff-wd.xsd">
<head>Schema for schema documents</head>
<codeBlock><phrase dg="b4398">&lt;?xml version='1.0'?&gt;

</phrase>&lt;!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" [

&lt;!-- provide ID type information even for parsers which only read the
     internal subset --&gt;
&lt;!ATTLIST xs:schema          id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:complexType     id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:complexContent  id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:simpleContent   id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:extension       id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:element         id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:group           id  ID  #IMPLIED&gt; 
&lt;!ATTLIST xs:all             id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:choice          id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:sequence        id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:any             id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:anyAttribute    id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:attribute       id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:attributeGroup  id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:unique          id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:key             id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:keyref          id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:selector        id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:field           id  ID  #IMPLIED&gt;<phrase dg="b2861cc-1">
&lt;!ATTLIST xs:assert          id  ID  #IMPLIED&gt;<!--*
* material suppressed here by diff group b2861cc-3 *
*--></phrase>
&lt;!ATTLIST xs:include         id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:import          id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:redefine        id  ID  #IMPLIED&gt;<phrase dg="b4767">
&lt;!ATTLIST xs:override        id  ID  #IMPLIED&gt;</phrase>
&lt;!ATTLIST xs:notation        id  ID  #IMPLIED&gt;
]&gt;

<!--*
* material suppressed here by diff group b4398 *
*-->&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"<!--*
* material suppressed here by diff group b6120 *
*-->
           elementFormDefault="qualified" xml:lang="EN"
           targetNamespace="http://www.w3.org/2001/XMLSchema"
           version="<!--*
* material suppressed here by diff group lp *
*--><phrase dg="lp">structures.xsd (wd-20091203)</phrase>"&gt;
  &lt;xs:annotation&gt;
    &lt;xs:documentation <!--*
* material suppressed here by diff group  *
*--> <phrase>source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html"&gt;</phrase>
   The schema corresponding to this document is normative,
   with respect to the syntactic constraints it expresses in the
   <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XML Schema Definition Language</phrase>.  The documentation (within &amp;lt;documentation&gt; elements)
   below, is not normative, but rather highlights important aspects of
   the W3C Recommendation of which this is a part<phrase diff="add" dg="b6698">.

      See below (at the bottom of this document) for information about
      the revision and namespace-versioning policy governing this
      schema document.

    </phrase>&lt;/xs:documentation&gt;
  &lt;/xs:annotation&gt;
  &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;
   The simpleType element and all of its members are defined
   in datatypes.xsd&lt;/xs:documentation&gt;
  &lt;/xs:annotation&gt;
  &lt;xs:include schemaLocation="datatypes.xsd"/&gt;
  &lt;xs:import namespace="http://www.w3.org/XML/1998/namespace"
             schemaLocation="http://www.w3.org/2001/xml.xsd"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
       Get access to the xml: attribute groups for xml:lang
       as declared on 'schema' and 'documentation' below
     &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:import&gt;
  &lt;xs:complexType name="openAttrs"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
       This type is extended by almost all schema types
       to allow attributes from other namespaces to be
       added to user schemas.
     &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:anyType"&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="annotated"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
       This type is extended by all types which allow annotation
       other than &amp;lt;schema&gt; itself
     &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:openAttrs"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="id" type="xs:ID"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:group name="schemaTop"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   This group is for the
   elements which occur freely at the top level of schemas.
   All of their types are based on the "annotated" type by extension.&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:choice&gt;
      &lt;xs:group ref="xs:redefinable"/&gt;
      &lt;xs:element ref="xs:element"/&gt;
      &lt;xs:element ref="xs:attribute"/&gt;
      &lt;xs:element ref="xs:notation"/&gt;
    &lt;/xs:choice&gt;
  &lt;/xs:group&gt;
  &lt;xs:group name="redefinable"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   This group is for the
   elements which can self-redefine (see &amp;lt;redefine&gt; below).&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:choice&gt;
      &lt;xs:element ref="xs:simpleType"/&gt;
      &lt;xs:element ref="xs:complexType"/&gt;
      &lt;xs:element ref="xs:group"/&gt;
      &lt;xs:element ref="xs:attributeGroup"/&gt;
    &lt;/xs:choice&gt;
  &lt;/xs:group&gt;
  &lt;xs:simpleType name="formChoice"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   A utility type, not for public use&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:NMTOKEN"&gt;
      &lt;xs:enumeration value="qualified"/&gt;
      &lt;xs:enumeration value="unqualified"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="reducedDerivationControl"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   A utility type, not for public use&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:derivationControl"&gt;
      &lt;xs:enumeration value="extension"/&gt;
      &lt;xs:enumeration value="restriction"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="derivationSet"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   A utility type, not for public use&lt;/xs:documentation&gt;
      &lt;xs:documentation&gt;
   #all or (possibly empty) subset of {extension, restriction}&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:union&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base="xs:token"&gt;
          &lt;xs:enumeration value="#all"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:list itemType="xs:reducedDerivationControl"/&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:union&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="typeDerivationControl"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   A utility type, not for public use&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:derivationControl"&gt;
      &lt;xs:enumeration value="extension"/&gt;
      &lt;xs:enumeration value="restriction"/&gt;
      &lt;xs:enumeration value="list"/&gt;
      &lt;xs:enumeration value="union"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="fullDerivationSet"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   A utility type, not for public use&lt;/xs:documentation&gt;
      &lt;xs:documentation&gt;
   #all or (possibly empty) subset of {extension, restriction, list, union}&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:union&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base="xs:token"&gt;
          &lt;xs:enumeration value="#all"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:list itemType="xs:typeDerivationControl"/&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:union&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:element name="schema" id="schema"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-schema"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:openAttrs"&gt;
          &lt;xs:sequence&gt;
            &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
              &lt;xs:element ref="xs:include"/&gt;
              &lt;xs:element ref="xs:import"/&gt;
              &lt;xs:element ref="xs:redefine"/&gt;<phrase dg="b4767">
              &lt;xs:element ref="xs:override"/&gt;</phrase>
              &lt;xs:element ref="xs:annotation"/&gt;
            &lt;/xs:choice&gt;<phrase dg="b5930">
            &lt;xs:sequence minOccurs="0"&gt;
              &lt;xs:element ref="xs:defaultOpenContent"/&gt;
              &lt;xs:element ref="xs:annotation" minOccurs="0"
                          maxOccurs="unbounded"/&gt;
            &lt;/xs:sequence&gt;</phrase>
            &lt;xs:sequence minOccurs="0" maxOccurs="unbounded"&gt;
              &lt;xs:group ref="xs:schemaTop"/&gt;
              &lt;xs:element ref="xs:annotation" minOccurs="0"
                          maxOccurs="unbounded"/&gt;
            &lt;/xs:sequence&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute name="targetNamespace" type="xs:anyURI"/&gt;
          &lt;xs:attribute name="version" type="xs:token"/&gt;
          &lt;xs:attribute name="finalDefault" type="xs:fullDerivationSet"
                        default="" use="optional"/&gt;
          &lt;xs:attribute name="blockDefault" type="xs:blockSet" default=""
                        use="optional"/&gt;
          &lt;xs:attribute name="attributeFormDefault" type="xs:formChoice"
                        default="unqualified" use="optional"/&gt;
          &lt;xs:attribute name="elementFormDefault" type="xs:formChoice"
                        default="unqualified" use="optional"/&gt;
          <phrase dg="b4314-1">&lt;xs:attribute name="defaultAttributes" type="xs:QName"/&gt;</phrase>
          <phrase dg="b4419">&lt;xs:attribute name="<!--*
* material suppressed here by diff group b5274 *
*--><phrase dg="b5274">xp</phrase>athDefaultNamespace" type="xs:xpathDefaultNamespace"
                        default="##local" use="optional"/&gt;</phrase>
          &lt;xs:attribute name="id" type="xs:ID"/&gt;
          &lt;xs:attribute ref="xml:lang"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
    &lt;xs:key name="element"&gt;
      &lt;xs:selector xpath="xs:element"/&gt;
      &lt;xs:field xpath="@name"/&gt;
    &lt;/xs:key&gt;
    &lt;xs:key name="attribute"&gt;
      &lt;xs:selector xpath="xs:attribute"/&gt;
      &lt;xs:field xpath="@name"/&gt;
    &lt;/xs:key&gt;
    &lt;xs:key name="type"&gt;
      &lt;xs:selector xpath="xs:complexType|xs:simpleType"/&gt;
      &lt;xs:field xpath="@name"/&gt;
    &lt;/xs:key&gt;
    &lt;xs:key name="group"&gt;
      &lt;xs:selector xpath="xs:group"/&gt;
      &lt;xs:field xpath="@name"/&gt;
    &lt;/xs:key&gt;
    &lt;xs:key name="attributeGroup"&gt;
      &lt;xs:selector xpath="xs:attributeGroup"/&gt;
      &lt;xs:field xpath="@name"/&gt;
    &lt;/xs:key&gt;
    &lt;xs:key name="notation"&gt;
      &lt;xs:selector xpath="xs:notation"/&gt;
      &lt;xs:field xpath="@name"/&gt;
    &lt;/xs:key&gt;
    &lt;xs:key name="identityConstraint"&gt;
      &lt;xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/&gt;
      &lt;xs:field xpath="@name"/&gt;
    &lt;/xs:key&gt;
  &lt;/xs:element&gt;
  &lt;xs:simpleType name="allNNI"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   for maxOccurs&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:union memberTypes="xs:nonNegativeInteger"&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base="xs:NMTOKEN"&gt;
          &lt;xs:enumeration value="unbounded"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:union&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:attributeGroup name="occurs"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   for all particles&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:attribute name="minOccurs" type="xs:nonNegativeInteger" default="1"
                  use="optional"/&gt;
    &lt;xs:attribute name="maxOccurs" type="xs:allNNI" default="1" use="optional"/&gt;
  &lt;/xs:attributeGroup&gt;
  &lt;xs:attributeGroup name="defRef"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   for element, group and attributeGroup,
   which both define and reference&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:attribute name="name" type="xs:NCName"/&gt;
    &lt;xs:attribute name="ref" type="xs:QName"/&gt;
  &lt;/xs:attributeGroup&gt;
  &lt;xs:group name="typeDefParticle"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   'complexType' uses this&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:choice&gt;
      &lt;xs:element name="group" type="xs:groupRef"/&gt;
      &lt;xs:element ref="xs:all"/&gt;
      &lt;xs:element ref="xs:choice"/&gt;
      &lt;xs:element ref="xs:sequence"/&gt;
    &lt;/xs:choice&gt;
  &lt;/xs:group&gt;
  &lt;xs:group name="nestedParticle"&gt;
    &lt;xs:choice&gt;
      &lt;xs:element name="element" type="xs:localElement"/&gt;
      &lt;xs:element name="group" type="xs:groupRef"/&gt;
      <!--*
* material suppressed here by diff group all-2506-3 *
*-->
      &lt;xs:element ref="xs:choice"/&gt;
      &lt;xs:element ref="xs:sequence"/&gt;
      &lt;xs:element ref="xs:any"/&gt;
    &lt;/xs:choice&gt;
  &lt;/xs:group&gt;
  &lt;xs:group name="particle"&gt;
    &lt;xs:choice&gt;
      &lt;xs:element name="element" type="xs:localElement"/&gt;
      &lt;xs:element name="group" type="xs:groupRef"/&gt;
      &lt;xs:element ref="xs:all"/&gt;
      &lt;xs:element ref="xs:choice"/&gt;
      &lt;xs:element ref="xs:sequence"/&gt;
      &lt;xs:element ref="xs:any"/&gt;
    &lt;/xs:choice&gt;
  &lt;/xs:group&gt;
  &lt;xs:complexType name="attribute"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attributeGroup ref="xs:defRef"/&gt;
        &lt;xs:attribute name="type" type="xs:QName"/&gt;
        &lt;xs:attribute name="use" default="optional" use="optional"&gt;
          &lt;xs:simpleType&gt;
            &lt;xs:restriction base="xs:NMTOKEN"&gt;
              &lt;xs:enumeration value="prohibited"/&gt;
              &lt;xs:enumeration value="optional"/&gt;
              &lt;xs:enumeration value="required"/&gt;
            &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
        &lt;/xs:attribute&gt;
        &lt;xs:attribute name="default" type="xs:string"/&gt;
        &lt;xs:attribute name="fixed" type="xs:string"/&gt;
        &lt;xs:attribute name="form" type="xs:formChoice"/&gt;
        <phrase dg="b3836-1">&lt;xs:attribute name="targetNamespace" type="xs:anyURI"/&gt;
        </phrase><phrase dg="b5003">  
        &lt;xs:attribute name="inheritable" type="xs:boolean"/&gt;</phrase>
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="topLevelAttribute"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:attribute"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="ref" use="prohibited"/&gt;
        &lt;xs:attribute name="form" use="prohibited"/&gt;
        &lt;xs:attribute name="use" use="prohibited"/&gt;
        <phrase dg="b3836-1">&lt;xs:attribute name="targetNamespace" use="prohibited"/&gt;</phrase>
        &lt;xs:attribute name="name" type="xs:NCName" use="required"/&gt;
        <phrase dg="b5003">&lt;xs:attribute name="inheritable" type="xs:boolean"/&gt;</phrase>
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:group name="attrDecls"&gt;
    &lt;xs:sequence&gt;
      &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
        &lt;xs:element name="attribute" type="xs:attribute"/&gt;
        &lt;xs:element name="attributeGroup" type="xs:attributeGroupRef"/&gt;
      &lt;/xs:choice&gt;
      &lt;xs:element ref="xs:anyAttribute" minOccurs="0"/&gt;
    &lt;/xs:sequence&gt;
  &lt;/xs:group&gt;
  &lt;xs:element name="anyAttribute" <!--*
* material suppressed here by diff group b6162 *
*--> id="anyAttribute"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-anyAttribute"/&gt;
    &lt;/xs:annotation&gt;<phrase dg="b6162">
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:wildcard"&gt;
          &lt;xs:attribute name="notQName" type="xs:qnameListA"
                        use="optional"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;</phrase>
  &lt;/xs:element&gt;
  <phrase dg="b2861cc-1">&lt;xs:group name="assertions"&gt;
    &lt;xs:sequence&gt;<!--*
* material suppressed here by diff group b2861cc-3 *
*-->
      <phrase dg="b2861cc-3">&lt;xs:element name="assert" type="xs:assertion"
                  minOccurs="0" maxOccurs="unbounded"/&gt;</phrase>
    &lt;/xs:sequence&gt;
  &lt;/xs:group&gt;
  &lt;xs:complexType name="assertion"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;<!--*
* material suppressed here by diff group b4416 *
*-->
        <phrase dg="b4416">&lt;xs:attribute name="test" type="<phrase dg="b5052">xs:</phrase>string"/&gt;</phrase>
        <phrase dg="b4419">&lt;xs:attribute name="xpathDefaultNamespace" type="xs:xpathDefaultNamespace"/&gt;</phrase>
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;</phrase>
  &lt;xs:group name="complexTypeModel"&gt;
    &lt;xs:choice&gt;
      &lt;xs:element ref="xs:simpleContent"/&gt;
      &lt;xs:element ref="xs:complexContent"/&gt;
      &lt;xs:sequence&gt;
        &lt;xs:annotation&gt;
          &lt;xs:documentation&gt;
   This branch is short for
   &amp;lt;complexContent&gt;
   &amp;lt;restriction base="xs:anyType"&gt;
   ...
   &amp;lt;/restriction&gt;
   &amp;lt;/complexContent&gt;&lt;/xs:documentation&gt;
        &lt;/xs:annotation&gt;
        <phrase dg="vm13">&lt;xs:element ref="xs:openContent" minOccurs="0"/&gt;</phrase>
        &lt;xs:group ref="xs:typeDefParticle" minOccurs="0"/&gt;
        &lt;xs:group ref="xs:attrDecls"/&gt;
        <phrase dg="b2861cc-1">&lt;xs:group ref="xs:assertions"/&gt;</phrase>
      &lt;/xs:sequence&gt;
    &lt;/xs:choice&gt;
  &lt;/xs:group&gt;
  &lt;xs:complexType name="complexType" abstract="true"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        &lt;xs:group ref="xs:complexTypeModel"/&gt;
        &lt;xs:attribute name="name" type="xs:NCName"&gt;
          &lt;xs:annotation&gt;
            &lt;xs:documentation&gt;
      Will be restricted to required or <!--*
* material suppressed here by diff group cleanup-3 *
*--><phrase dg="cleanup-3">prohibited</phrase>&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
        &lt;/xs:attribute&gt;
        &lt;xs:attribute name="mixed" type="xs:boolean" <!--*
* material suppressed here by diff group b5286b *
*-->use="optional"&gt;
          &lt;xs:annotation&gt;
            &lt;xs:documentation&gt;
      Not allowed if simpleContent child is chosen.
      May be overridden by setting on complexContent child.&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
        &lt;/xs:attribute&gt;
        &lt;xs:attribute name="abstract" type="xs:boolean" default="false"
                      use="optional"/&gt;
        &lt;xs:attribute name="final" type="xs:derivationSet"/&gt;
        &lt;xs:attribute name="block" type="xs:derivationSet"/&gt;
        <phrase dg="b4314-1">&lt;xs:attribute name="defaultAttributesApply" type="xs:boolean"
                      default="true" use="optional"/&gt;</phrase>
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="topLevelComplexType"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:complexType"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:group ref="xs:complexTypeModel"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="name" type="xs:NCName" use="required"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="localComplexType"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:complexType"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:group ref="xs:complexTypeModel"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="name" use="prohibited"/&gt;
        &lt;xs:attribute name="abstract" use="prohibited"/&gt;
        &lt;xs:attribute name="final" use="prohibited"/&gt;
        &lt;xs:attribute name="block" use="prohibited"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="restrictionType"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:choice minOccurs="0"&gt;
            <!--*
* material suppressed here by diff group vm13 *
*-->
            <phrase dg="vm13">&lt;xs:sequence&gt;
              &lt;xs:element ref="xs:openContent" minOccurs="0"/&gt;
              &lt;xs:group ref="xs:typeDefParticle"/&gt;
            &lt;/xs:sequence&gt;</phrase>
            &lt;xs:group ref="xs:simpleRestrictionModel"/&gt;
          &lt;/xs:choice&gt;
          &lt;xs:group ref="xs:attrDecls"/&gt;
          <phrase dg="b2861cc-1">&lt;xs:group ref="xs:assertions"/&gt;</phrase>
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="base" type="xs:QName" use="required"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="complexRestrictionType"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:restrictionType"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:choice minOccurs="0"&gt;
            &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;This choice is added simply to
                   make this a valid restriction per the REC&lt;/xs:documentation&gt;
            &lt;/xs:annotation&gt;
            <!--*
* material suppressed here by diff group vm13 *
*-->
            <phrase dg="vm13">&lt;xs:sequence&gt;
              &lt;xs:element ref="xs:openContent" minOccurs="0"/&gt;
              &lt;xs:group ref="xs:typeDefParticle"/&gt;
            &lt;/xs:sequence&gt;</phrase>
          &lt;/xs:choice&gt;
          &lt;xs:group ref="xs:attrDecls"/&gt;
          <phrase dg="b2861cc-1">&lt;xs:group ref="xs:assertions"/&gt;</phrase>
        &lt;/xs:sequence&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="extensionType"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        &lt;xs:sequence&gt;
          <phrase dg="vm13">&lt;xs:element ref="xs:openContent" minOccurs="0"/&gt;</phrase>
          &lt;xs:group ref="xs:typeDefParticle" minOccurs="0"/&gt;
          &lt;xs:group ref="xs:attrDecls"/&gt;
          <phrase dg="b2861cc-1">&lt;xs:group ref="xs:assertions"/&gt;</phrase>
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="base" type="xs:QName" use="required"/&gt;
        <!--*
* material suppressed here by diff group all-2506-3 *
*-->
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:element name="complexContent" id="complexContent"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-complexContent"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:annotated"&gt;
          &lt;xs:choice&gt;
            &lt;xs:element name="restriction" type="xs:complexRestrictionType"/&gt;
            &lt;xs:element name="extension" type="xs:extensionType"/&gt;
          &lt;/xs:choice&gt;
          &lt;xs:attribute name="mixed" type="xs:boolean"&gt;
            &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;
       Overrides any setting on complexType parent.&lt;/xs:documentation&gt;
            &lt;/xs:annotation&gt;
          &lt;/xs:attribute&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  <phrase dg="vm13">&lt;xs:element name="openContent" id="openContent"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-openContent"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:annotated"&gt;
          <phrase dg="vm13-1">&lt;xs:sequence&gt;
            &lt;xs:element name="any" <phrase dg="vm13-3">minOccurs="0"</phrase> type="xs:wildcard"/&gt;
          &lt;/xs:sequence&gt;</phrase>
          &lt;xs:attribute name="mode" default="interleave" use="optional"&gt;
            &lt;xs:simpleType&gt;
              &lt;xs:restriction base="xs:NMTOKEN"&gt;
                &lt;xs:enumeration value="none"/&gt;
                &lt;xs:enumeration value="interleave"/&gt;
                &lt;xs:enumeration value="suffix"/&gt;
              &lt;/xs:restriction&gt;
            &lt;/xs:simpleType&gt;
          &lt;/xs:attribute&gt;
          <!--*
* material suppressed here by diff group vm13-1 *
*-->
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="defaultOpenContent" id="defaultOpenContent"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-defaultOpenContent"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:annotated"&gt;
          <phrase dg="vm13-1">&lt;xs:sequence&gt;
            &lt;xs:element name="any" type="xs:wildcard"/&gt;
          &lt;/xs:sequence&gt;</phrase>
          &lt;xs:attribute name="appliesToEmpty" type="xs:boolean"
                        default="false" use="optional"/&gt;
          &lt;xs:attribute name="mode" default="interleave" use="optional"&gt;
            &lt;xs:simpleType&gt;
              &lt;xs:restriction base="xs:NMTOKEN"&gt;
                &lt;xs:enumeration value="interleave"/&gt;
                &lt;xs:enumeration value="suffix"/&gt;
              &lt;/xs:restriction&gt;
            &lt;/xs:simpleType&gt;
          &lt;/xs:attribute&gt;
          <!--*
* material suppressed here by diff group vm13-1 *
*-->
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;</phrase>
  &lt;xs:complexType name="simpleRestrictionType"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:restrictionType"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:choice minOccurs="0"&gt;
            &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;This choice is added simply to
                   make this a valid restriction per the REC&lt;/xs:documentation&gt;
            &lt;/xs:annotation&gt;
            &lt;xs:group ref="xs:simpleRestrictionModel"/&gt;
          &lt;/xs:choice&gt;
          &lt;xs:group ref="xs:attrDecls"/&gt;
          <phrase dg="b2861cc-1">&lt;xs:group ref="xs:assertions"/&gt;</phrase>
        &lt;/xs:sequence&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="simpleExtensionType"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:extensionType"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:annotation&gt;
            &lt;xs:documentation&gt;
      No typeDefParticle group reference&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:group ref="xs:attrDecls"/&gt;
          <phrase dg="b2861cc-1">&lt;xs:group ref="xs:assertions"/&gt;</phrase>
        &lt;/xs:sequence&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:element name="simpleContent" id="simpleContent"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-simpleContent"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:annotated"&gt;
          &lt;xs:choice&gt;
            &lt;xs:element name="restriction" type="xs:simpleRestrictionType"/&gt;
            &lt;xs:element name="extension" type="xs:simpleExtensionType"/&gt;
          &lt;/xs:choice&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="complexType" type="xs:topLevelComplexType" id="complexType"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-complexType"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:simpleType name="blockSet"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
    A utility type, not for public use&lt;/xs:documentation&gt;
      &lt;xs:documentation&gt;
    #all or (possibly empty) subset of {substitution, extension,
    restriction}&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:union&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base="xs:token"&gt;
          &lt;xs:enumeration value="#all"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:list&gt;
          &lt;xs:simpleType&gt;
            &lt;xs:restriction base="xs:derivationControl"&gt;
              &lt;xs:enumeration value="extension"/&gt;
              &lt;xs:enumeration value="restriction"/&gt;
              &lt;xs:enumeration value="substitution"/&gt;
            &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
        &lt;/xs:list&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:union&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:complexType name="element" abstract="true"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   The element element can be used either
   at the top level to define an element-type binding globally,
   or within a content model to either reference a globally-defined
   element or type or declare an element-type binding locally.
   The ref form is not allowed at the top level.&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:choice minOccurs="0"&gt;
            &lt;xs:element name="simpleType" type="xs:localSimpleType"/&gt;
            &lt;xs:element name="complexType" type="xs:localComplexType"/&gt;
          &lt;/xs:choice&gt;<phrase dg="cta">
          &lt;xs:element name="alternative" type="xs:altType" 
                    minOccurs="0" maxOccurs="unbounded"/&gt;</phrase>
          &lt;xs:group ref="xs:identityConstraint" minOccurs="0"
                    maxOccurs="unbounded"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attributeGroup ref="xs:defRef"/&gt;
        &lt;xs:attribute name="type" type="xs:QName"/&gt;
        <!--*
* material suppressed here by diff group b2834 *
*-->
        <phrase dg="b2834">&lt;xs:attribute name="substitutionGroup"&gt;
         &lt;xs:simpleType&gt;
          &lt;xs:list itemType="xs:QName"/&gt;
         &lt;/xs:simpleType&gt;
        &lt;/xs:attribute&gt;</phrase>
        &lt;xs:attributeGroup ref="xs:occurs"/&gt;
        &lt;xs:attribute name="default" type="xs:string"/&gt;
        &lt;xs:attribute name="fixed" type="xs:string"/&gt;
        &lt;xs:attribute name="nillable" type="xs:boolean" <phrase diff="del" dg="b7352">default="false"
                      </phrase>use="optional"/&gt;
        &lt;xs:attribute name="abstract" type="xs:boolean" default="false"
                      use="optional"/&gt;
        &lt;xs:attribute name="final" type="xs:derivationSet"/&gt;
        &lt;xs:attribute name="block" type="xs:blockSet"/&gt;
        &lt;xs:attribute name="form" type="xs:formChoice"/&gt;
        <phrase dg="b3836-1">&lt;xs:attribute name="targetNamespace" type="xs:anyURI"/&gt;</phrase>
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="topLevelElement"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:element"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:choice minOccurs="0"&gt;
            &lt;xs:element name="simpleType" type="xs:localSimpleType"/&gt;
            &lt;xs:element name="complexType" type="xs:localComplexType"/&gt;
          &lt;/xs:choice&gt;<phrase dg="cta">
          &lt;xs:element name="alternative" type="xs:altType" 
                    minOccurs="0" maxOccurs="unbounded"/&gt;</phrase>
          &lt;xs:group ref="xs:identityConstraint" minOccurs="0"
                    maxOccurs="unbounded"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="ref" use="prohibited"/&gt;
        &lt;xs:attribute name="form" use="prohibited"/&gt;
        <phrase dg="b3836-1">&lt;xs:attribute name="targetNamespace" use="prohibited"/&gt;</phrase>
        &lt;xs:attribute name="minOccurs" use="prohibited"/&gt;
        &lt;xs:attribute name="maxOccurs" use="prohibited"/&gt;
        &lt;xs:attribute name="name" type="xs:NCName" use="required"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="localElement"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:element"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:choice minOccurs="0"&gt;
            &lt;xs:element name="simpleType" type="xs:localSimpleType"/&gt;
            &lt;xs:element name="complexType" type="xs:localComplexType"/&gt;
          &lt;/xs:choice&gt;<phrase dg="cta">
          &lt;xs:element name="alternative" type="xs:altType" 
                    minOccurs="0" maxOccurs="unbounded"/&gt;</phrase>
          &lt;xs:group ref="xs:identityConstraint" minOccurs="0"
                    maxOccurs="unbounded"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="substitutionGroup" use="prohibited"/&gt;
        &lt;xs:attribute name="final" use="prohibited"/&gt;
        &lt;xs:attribute name="abstract" use="prohibited"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:element name="element" type="xs:topLevelElement" id="element"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-element"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;<phrase dg="cta">
  &lt;xs:complexType name="altType"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
        This type is used for 'alternative' elements.
      &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        &lt;xs:choice minOccurs="0"&gt;
          <!--*
* material suppressed here by diff group b5053 *
*--><phrase dg="b5053">&lt;xs:element name="simpleType" type="xs:localSimpleType"/&gt;
          &lt;xs:element name="complexType" type="xs:localComplexType"/&gt;</phrase>
        &lt;/xs:choice&gt;
        &lt;xs:attribute name="test" type="<phrase dg="b5052">xs:</phrase>string" use="optional"/&gt;
        &lt;xs:attribute name="type" type="<phrase dg="b5052">xs:</phrase>QName" use="optional"/&gt;<phrase dg="b4419">
        &lt;xs:attribute name="xpathDefaultNamespace" type="xs:xpathDefaultNamespace"/&gt;</phrase><!--*
* material suppressed here by diff group b5052 *
*-->
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;<!--*
* material suppressed here by diff group wgi-20080613 *
*--></phrase>
  &lt;xs:complexType name="group" abstract="true"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   group type for explicit groups, named top-level groups and
   group references&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        <!--*
* material suppressed here by diff group b2861cc-1g *
*-->
          &lt;xs:group ref="xs:particle" minOccurs="0" maxOccurs="unbounded"/&gt;
          <!--*
* material suppressed here by diff group b2861cc-1g *
*-->
        &lt;xs:attributeGroup ref="xs:defRef"/&gt;
        &lt;xs:attributeGroup ref="xs:occurs"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="realGroup"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:group"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:choice minOccurs="0" maxOccurs="1"&gt;
            &lt;xs:element ref="xs:all"/&gt;
            &lt;xs:element ref="xs:choice"/&gt;
            &lt;xs:element ref="xs:sequence"/&gt;
          &lt;/xs:choice&gt;
          <!--*
* material suppressed here by diff group b2861cc-1g *
*-->
        &lt;/xs:sequence&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="namedGroup"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:realGroup"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:choice minOccurs="1" maxOccurs="1"&gt;
            &lt;xs:element name="all"&gt;
              &lt;xs:complexType&gt;
                &lt;xs:complexContent&gt;
                  &lt;xs:restriction base="xs:all"&gt;
                    &lt;xs:group ref="xs:allModel"/&gt;
                    &lt;xs:attribute name="minOccurs" use="prohibited"/&gt;
                    &lt;xs:attribute name="maxOccurs" use="prohibited"/&gt;
                    &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
                  &lt;/xs:restriction&gt;
                &lt;/xs:complexContent&gt;
              &lt;/xs:complexType&gt;
            &lt;/xs:element&gt;
            &lt;xs:element name="choice" type="xs:simpleExplicitGroup"/&gt;
            &lt;xs:element name="sequence" type="xs:simpleExplicitGroup"/&gt;
          &lt;/xs:choice&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="name" type="xs:NCName" use="required"/&gt;
        &lt;xs:attribute name="ref" use="prohibited"/&gt;
        &lt;xs:attribute name="minOccurs" use="prohibited"/&gt;
        &lt;xs:attribute name="maxOccurs" use="prohibited"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="groupRef"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:realGroup"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="ref" type="xs:QName" use="required"/&gt;
        &lt;xs:attribute name="name" use="prohibited"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="explicitGroup"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   group type for the three kinds of group&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:group"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="name" <!--*
* material suppressed here by diff group cleanup-3 *
*-->use="prohibited"/&gt;
        &lt;xs:attribute name="ref" <!--*
* material suppressed here by diff group cleanup-3 *
*-->use="prohibited"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="simpleExplicitGroup"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:explicitGroup"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="minOccurs" use="prohibited"/&gt;
        &lt;xs:attribute name="maxOccurs" use="prohibited"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:group name="allModel"&gt;
    &lt;xs:sequence&gt;
      &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
      &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;<phrase dg="ep99">
        &lt;xs:annotation&gt;
          &lt;xs:documentation&gt;This choice with min/max is here to
                          avoid a pblm with the Elt:All/Choice/Seq
                          Particle derivation constraint&lt;/xs:documentation&gt;
        &lt;/xs:annotation&gt;</phrase>
        &lt;xs:element name="element" type="<!--*
* material suppressed here by diff group all-2506-1 *
*--><phrase dg="all-2506-1">xs:localElement</phrase>"/&gt;<phrase dg="all-2506-1">
        &lt;xs:element ref="xs:any"/&gt;</phrase><phrase diff="add" dg="b7031">
        &lt;xs:element name="group"&gt;
          &lt;xs:complexType&gt;
            &lt;xs:sequence&gt;
              &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
            &lt;/xs:sequence&gt;
            &lt;xs:attribute name="ref" type="xs:QName" use="required"/&gt;
            &lt;xs:attribute name="minOccurs" fixed="1" type="xs:nonNegativeInteger"/&gt;
            &lt;xs:attribute name="maxOccurs" fixed="1" type="xs:nonNegativeInteger"/&gt;
            &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
          &lt;/xs:complexType&gt;
        &lt;/xs:element&gt;</phrase>
      &lt;/xs:choice&gt;
    &lt;/xs:sequence&gt;
  &lt;/xs:group&gt;<!--*
* material suppressed here by diff group all-2506-1 *
*-->
  &lt;xs:complexType name="all"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   Only elements allowed inside&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:explicitGroup"&gt;
        &lt;xs:group ref="xs:allModel"/&gt;
        &lt;xs:attribute name="minOccurs" default="1" use="optional"&gt;
          &lt;xs:simpleType&gt;
            &lt;xs:restriction base="xs:nonNegativeInteger"&gt;
              &lt;xs:enumeration value="0"/&gt;
              &lt;xs:enumeration value="1"/&gt;
            &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
        &lt;/xs:attribute&gt;
        &lt;xs:attribute name="maxOccurs" default="1" use="optional"&gt;
          &lt;xs:simpleType&gt;
            &lt;xs:restriction base="xs:allNNI"&gt;<phrase diff="add" dg="b7031">
              &lt;xs:enumeration value="0"/&gt;</phrase>
              &lt;xs:enumeration value="1"/&gt;
            &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
        &lt;/xs:attribute&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:element name="all" type="xs:all" id="all"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-all"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="choice" type="xs:explicitGroup" id="choice"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-choice"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="sequence" type="xs:explicitGroup" id="sequence"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-sequence"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="group" type="xs:namedGroup" id="group"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-group"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  <phrase dg="vm13">&lt;xs:attributeGroup name="anyAttrGroup"&gt;
    &lt;xs:attribute name="namespace" type="xs:namespaceList"
                  use="optional"/&gt;
    &lt;xs:attribute name="notNamespace" <!--*
* material suppressed here by diff group b6166 *
*-->use="optional"<!--*
* material suppressed here by diff group b6166 *
*-->&gt;<phrase dg="b6166">
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base="xs:basicNamespaceList"&gt;
          &lt;xs:minLength value="1"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:attribute&gt;</phrase><!--*
* material suppressed here by diff group b6162 *
*-->
    &lt;xs:attribute name="processContents" default="strict" use="optional"&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base="xs:NMTOKEN"&gt;
          &lt;xs:enumeration value="skip"/&gt;
          &lt;xs:enumeration value="lax"/&gt;
          &lt;xs:enumeration value="strict"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:attribute&gt;
  &lt;/xs:attributeGroup&gt;</phrase>
  &lt;xs:complexType name="wildcard"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        <!--*
* material suppressed here by diff group vm13 *
*-->
         <phrase dg="vm13">&lt;xs:attributeGroup ref="xs:anyAttrGroup"/&gt;</phrase>
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:element name="any" id="any"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-any"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:wildcard"&gt;<phrase dg="b6162">
          &lt;xs:attribute name="notQName" type="xs:qnameList"
                        use="optional"/&gt;</phrase>
          &lt;xs:attributeGroup ref="xs:occurs"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;
   simple type for the value of the 'namespace' attr of
   'any' and 'anyAttribute'&lt;/xs:documentation&gt;
  &lt;/xs:annotation&gt;
  &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;
   Value is
              ##any      - - any non-conflicting WFXML/attribute at all

              ##other    - - any non-conflicting WFXML/attribute from
                              namespace other than targetNS

              ##local    - - any unqualified non-conflicting WFXML/attribute 

              one or     - - any non-conflicting WFXML/attribute from
              more URI        the listed namespaces
              references
              (space separated)

    ##targetNamespace or ##local may appear in the above list, to
        refer to the targetNamespace of the enclosing
        schema or an absent targetNamespace respectively&lt;/xs:documentation&gt;
  &lt;/xs:annotation&gt;
  &lt;xs:simpleType name="namespaceList"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   A utility type, not for public use&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    <!--*
* material suppressed here by diff group b2867-1 *
*-->
    <phrase dg="b2867-1">&lt;xs:union memberTypes="xs:specialNamespaceList xs:basicNamespaceList" /&gt;</phrase>
  &lt;/xs:simpleType&gt;
  <phrase dg="b2867-1">&lt;xs:simpleType name="basicNamespaceList"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   A utility type, not for public use&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:list&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:union memberTypes="xs:anyURI"&gt;
          &lt;xs:simpleType&gt;
            &lt;xs:restriction base="xs:token"&gt;
              &lt;xs:enumeration value="##targetNamespace"/&gt;
              &lt;xs:enumeration value="##local"/&gt;
            &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
        &lt;/xs:union&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:list&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="specialNamespaceList"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   A utility type, not for public use&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:token"&gt;
      &lt;xs:enumeration value="##any"/&gt;
      &lt;xs:enumeration value="##other"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;</phrase>
  <phrase dg="vm19">&lt;xs:simpleType name="qnameList"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
        A utility type, not for public use
      &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:list&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:union memberTypes="xs:QName"&gt;
          &lt;xs:simpleType&gt;
            &lt;xs:restriction base="xs:token"&gt;
              &lt;xs:enumeration value="##defined"/&gt;<phrase dg="b5200">
              &lt;xs:enumeration value="##definedSibling"/&gt;</phrase>
            &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
        &lt;/xs:union&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:list&gt;
  &lt;/xs:simpleType&gt;</phrase>
  <phrase dg="b6162">&lt;xs:simpleType name="qnameListA"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
        A utility type, not for public use
      &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:list&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:union memberTypes="xs:QName"&gt;
          &lt;xs:simpleType&gt;
            &lt;xs:restriction base="xs:token"&gt;
              &lt;xs:enumeration value="##defined"/&gt;
            &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
        &lt;/xs:union&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:list&gt;
  &lt;/xs:simpleType&gt;</phrase>
  <phrase dg="b4419">&lt;xs:simpleType name="xpathDefaultNamespace"&gt;
    &lt;xs:union memberTypes="xs:anyURI"&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base="xs:token"&gt;
          &lt;xs:enumeration value="##defaultNamespace"/&gt;
          &lt;xs:enumeration value="##targetNamespace"/&gt;
          &lt;xs:enumeration value="##local"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:union&gt;
  &lt;/xs:simpleType&gt;</phrase>
  &lt;xs:element name="attribute" type="xs:topLevelAttribute" id="attribute"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-attribute"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:complexType name="attributeGroup" abstract="true"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        <!--*
* material suppressed here by diff group b2861cc-1g *
*-->
          &lt;xs:group ref="xs:attrDecls"/&gt;
          <!--*
* material suppressed here by diff group b2861cc-1g *
*-->
        &lt;xs:attributeGroup ref="xs:defRef"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="namedAttributeGroup"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:attributeGroup"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:group ref="xs:attrDecls"/&gt;
          <!--*
* material suppressed here by diff group b2861cc-1g *
*-->
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="name" type="xs:NCName" use="required"/&gt;
        &lt;xs:attribute name="ref" use="prohibited"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="attributeGroupRef"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:attributeGroup"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="ref" type="xs:QName" use="required"/&gt;
        &lt;xs:attribute name="name" use="prohibited"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:element name="attributeGroup" type="xs:namedAttributeGroup"
              id="attributeGroup"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-attributeGroup"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="include" id="include"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-include"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:annotated"&gt;
          &lt;xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="redefine" id="redefine"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-redefine"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:openAttrs"&gt;
          &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
            &lt;xs:element ref="xs:annotation"/&gt;
            &lt;xs:group ref="xs:redefinable"/&gt;
          &lt;/xs:choice&gt;
          &lt;xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/&gt;
          &lt;xs:attribute name="id" type="xs:ID"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
<phrase dg="b4767">
  &lt;xs:element name="override" id="override"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-override"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:openAttrs"&gt;
          &lt;xs:sequence&gt;
            &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
            &lt;xs:group ref="xs:schemaTop" minOccurs="0" maxOccurs="unbounded"/&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/&gt;
          &lt;xs:attribute name="id" type="xs:ID"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;</phrase>
  &lt;xs:element name="import" id="import"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-import"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:annotated"&gt;
          &lt;xs:attribute name="namespace" type="xs:anyURI"/&gt;
          &lt;xs:attribute name="schemaLocation" type="xs:anyURI"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="selector" id="selector"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-selector"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:annotated"&gt;
          &lt;xs:attribute name="xpath" use="required"&gt;
            &lt;xs:simpleType&gt;
              &lt;xs:annotation&gt;
                &lt;xs:documentation&gt;A subset of XPath expressions for use
in selectors&lt;/xs:documentation&gt;
                &lt;xs:documentation&gt;A utility type, not for public
use&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:restriction base="xs:token"<phrase dg="cleanup-3">/</phrase>&gt;
                <!--*
* material suppressed here by diff group cleanup-3 *
*-->
            &lt;/xs:simpleType&gt;
          &lt;/xs:attribute&gt;<phrase dg="b5273">
          &lt;xs:attribute name="xpathDefaultNamespace" type="xs:xpathDefaultNamespace"/&gt;</phrase>
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="field" id="field"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-field"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:annotated"&gt;
          &lt;xs:attribute name="xpath" use="required"&gt;
            &lt;xs:simpleType&gt;
              &lt;xs:annotation&gt;
                &lt;xs:documentation&gt;A subset of XPath expressions for use
in fields&lt;/xs:documentation&gt;
                &lt;xs:documentation&gt;A utility type, not for public
use&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:restriction base="xs:token"<phrase dg="cleanup-3">/</phrase>&gt;
                <!--*
* material suppressed here by diff group cleanup-3 *
*-->
            &lt;/xs:simpleType&gt;
          &lt;/xs:attribute&gt;<phrase dg="b5273">
          &lt;xs:attribute name="xpathDefaultNamespace" type="xs:xpathDefaultNamespace"/&gt;</phrase>
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:complexType name="keybase"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        &lt;xs:sequence<phrase dg="b5004"> minOccurs="0"</phrase>&gt;
          &lt;xs:element ref="xs:selector"/&gt;
          &lt;xs:element ref="xs:field" minOccurs="1" maxOccurs="unbounded"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="name" type="xs:NCName"<!--*
* material suppressed here by diff group b2850 *
*-->/&gt;
        <phrase dg="b2850">&lt;xs:attribute name="ref" type="xs:QName"/&gt;</phrase><!--*
* material suppressed here by diff group b5273 *
*-->
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:group name="identityConstraint"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;The three kinds of identity constraints, all with
                     type of or derived from 'keybase'.
   &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:choice&gt;
      &lt;xs:element ref="xs:unique"/&gt;
      &lt;xs:element ref="xs:key"/&gt;
      &lt;xs:element ref="xs:keyref"/&gt;
    &lt;/xs:choice&gt;
  &lt;/xs:group&gt;
  &lt;xs:element name="unique" type="xs:keybase" id="unique"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-unique"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="key" type="xs:keybase" id="key"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-key"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="keyref" id="keyref"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-keyref"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:keybase"&gt;
          &lt;xs:attribute name="refer" type="xs:QName"<!--*
* material suppressed here by diff group b2850 *
*-->/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="notation" id="notation"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-notation"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:annotated"&gt;
          &lt;xs:attribute name="name" type="xs:NCName" use="required"/&gt;
          &lt;xs:attribute name="public" type="xs:public"/&gt;
          &lt;xs:attribute name="system" type="xs:anyURI"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:simpleType name="public"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   A utility type, not for public use&lt;/xs:documentation&gt;
      &lt;xs:documentation&gt;
   A public identifier, per ISO 8879&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:token"/&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:element name="appinfo" id="appinfo"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-appinfo"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType mixed="true"&gt;
      &lt;xs:sequence minOccurs="0" maxOccurs="unbounded"&gt;
        &lt;xs:any processContents="lax"/&gt;
      &lt;/xs:sequence&gt;
      &lt;xs:attribute name="source" type="xs:anyURI"/&gt;
      &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="documentation" id="documentation"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-documentation"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType mixed="true"&gt;
      &lt;xs:sequence minOccurs="0" maxOccurs="unbounded"&gt;
        &lt;xs:any processContents="lax"/&gt;
      &lt;/xs:sequence&gt;
      &lt;xs:attribute name="source" type="xs:anyURI"/&gt;
      &lt;xs:attribute ref="xml:lang"/&gt;
      &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="annotation" id="annotation"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/structures.diff-wd.html#element-annotation"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:openAttrs"&gt;
          &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
            &lt;xs:element ref="xs:appinfo"/&gt;
            &lt;xs:element ref="xs:documentation"/&gt;
          &lt;/xs:choice&gt;
          &lt;xs:attribute name="id" type="xs:ID"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;
   notations for use within <!--*
* material suppressed here by diff group b4399 *
*--> schema<phrase dg="b4399"> document</phrase>s&lt;/xs:documentation&gt;
  &lt;/xs:annotation&gt;
  &lt;xs:notation name="XMLSchemaStructures" public="structures"
               system="http://www.w3.org/2000/08/XMLSchema.xsd"/&gt;
  &lt;xs:notation name="XML" public="REC-xml-19980210"
               system="http://www.w3.org/TR/1998/REC-xml-19980210"/&gt;
  &lt;xs:complexType name="anyType" mixed="true"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   Not the real urType, but as close an approximation as we can
   get in the XML representation&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:sequence&gt;
      &lt;xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/&gt;
    &lt;/xs:sequence&gt;
    &lt;xs:anyAttribute processContents="lax"/&gt;
  &lt;/xs:complexType&gt;<phrase diff="add" dg="b6698">

  &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;
      In keeping with the XML Schema WG's standard versioning policy, 
      this schema document will persist at the URI
      http://www.w3.org/2009/12/XMLSchema.xsd.

      At the date of issue it can also be found at the URI
      http://www.w3.org/2009/XMLSchema/XMLSchema.xsd.

      The schema document at that URI may however change in the future, 
      in order to remain compatible with the latest version of XSD 
      and its namespace.  In other words, if XSD or the XML Schema 
      namespace change, the version of this document at 
      http://www.w3.org/2009/XMLSchema/XMLSchema.xsd will change accordingly; 
      the version at http://www.w3.org/2009/12/XMLSchema.xsd will not change.

      Previous dated (and unchanging) versions of this schema document 
      include:

        http://www.w3.org/2009/04/XMLSchema.xsd
          (XSD 1.1 Candidate Recommendation)

        http://www.w3.org/2004/10/XMLSchema.xsd
          (XSD 1.0 Recommendation, Second Edition)

        http://www.w3.org/2001/05/XMLSchema.xsd
          (XSD 1.0 Recommendation, First Edition)

    &lt;/xs:documentation&gt;
  &lt;/xs:annotation&gt;

</phrase>
&lt;/xs:schema&gt;
</codeBlock>
</codeScrap>
<!--*
* material suppressed here by diff group rec12-main *
*-->


</div1>

<!--*
* material suppressed here by diff group ep6553 *
*-->

 <div1 id="outcomes">
  <head>Outcome Tabulations (normative)</head>
  <p>To facilitate consistent reporting of schema errors and <termref def="key-vn">validation</termref>
failures, this section tabulates and provides unique names for all the
constraints listed in this document.  Wherever such constraints have numbered
parts, reports <!--*
* material suppressed here by diff group b3220d *
*--><phrase dg="b3220d"><rfc2119>should</rfc2119></phrase> 
use the name given below plus the part number, separated
by a period ('.').  Thus for example <code>cos-ct-extends.1.2</code> 
<!--*
* material suppressed here by diff group b3220d *
*--><phrase dg="b3220d"><rfc2119>should</rfc2119></phrase> be
used to report a violation of the <clauseref ref="c-cte"/> of
<specref ref="cos-ct-extends"/>.</p>
      <!--* <issue id="RQ-137i" role="1.1">
	<p><loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=2843" target="reqs">RQ-137 (error-codes)</loc></p>
       <p>The promise that each error and failure defined in this
spec. would have a distinct identifier was not systematically delivered on in
version 1.0.  Version 1.1 will do better.</p>
       <resolution>
        <p>Add markup and/or an operational definition to support the
generation of an appropriate error code for any schema error or validation
failure specified outside a named constraint or rule, e.g. uses of &must; and,
in particular, phrases such as "it is an error" in <specref ref="conformance-schemaValidity"/>.</p>
       </resolution>
	</issue> *-->
  <div2 id="validation_failures">
   <head>Validation Rules</head>
   <p/>
  </div2>
  <div2 id="PSVI_contributions">
   <head>Contributions to the post-schema-validation infoset</head>
  </div2>
  <div2 id="outcome-src">
   <head>Schema Representation Constraints</head>
   <p/>
  </div2>
  <div2 id="outcome-cos">
   <head>Schema Component Constraints</head>
  </div2>
 </div1>

<div1 id="var_terminology" dg="rq144">
<head>Terminology for implementation-defined features <phrase dg="b5150b">(normative)</phrase></head>
<p>This section defines some terms for use in describing
choices made by implementations in areas where the 
effect of <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 
features is explicitly <termref def="key-impl-defined">implementation-defined</termref>.</p>
<p>Future versions of this specification are expected to use
the terminology defined here to specify conformance profiles.
Conformance profiles may also be defined by other specifications
without requiring any revision to this specification.</p>

<div2 id="var_psvi" dg="rq144fl">
<head>Subset<!--*
* material suppressed here by diff group ep99 *
*--> of the Post-schema-validation Infoset</head>
<p>This specification defines a number of ways in which the
information set taken as input is augmented in the course
of schema-validity assessment.  Conforming processors <rfc2119>may</rfc2119>
provide access to some or all of this information; in the
interests of simplifying discussion and documentation, this
section defines names for several subsets of the PSVI, with
the intention of simplifying short-hand descriptions of
processors.  These terms <rfc2119>may</rfc2119> be used to describe what parts of
the PSVI a particular schema processor provides access to, or
to specify requirements for processors, or for other purposes.
A processor provides access to a particular subset
of the PSVI if and only if it makes accessible some representation
of the information in question, for information items to which
it is applicable.  (The properties labeled <quote>if applicable</quote>
or <quote>where applicable</quote> below are simply the most obvious
cases of properties which do not apply to every information item;
the same qualification implicitly applies to all properties listed
below.)
<!--* (If a property does not apply to a 
particular item, the inclusion of the property name in a
list below does not constitute an obligation to provide
that property on that item.  *-->
</p>
<p>
If other subsets of the PSVI prove important in practice it is
expected that definitions of those subsets <rfc2119>may</rfc2119> be provided by
other specifications or in later revisions of this one.
</p>
<p>
The definition in this section of a term denoting a particular
subset of the PSVI does not constitute a requirement that
conforming processors provide access to that subset.
</p>
<!--* <p>
The inclusion of an item or property in any list below does
not constitute a requirement to include some representation 
of it in instances where it is not applicable or is undefined.
</p> *-->
<glist>
<gitem id="key-root-validity">
<label>root-validity subset</label><!--* was: red, then minimal *-->
<def>
<p><termdef id="dt-root-validity_subset" term="root-validity subset">The 
<term>root-validity subset</term> of the PSVI consists of the 
following properties of the <termref def="key-vr"/>:

<!--* 
<proplist role="psvi" item="vroot">
<propdef id="vr_validity" name="validity">xyz</propdef>
</proplist> *-->
<!--* <ulist>
<item>
<p><xpropref role="psviAnon">validity</xpropref> (on the validation root only)</p>
</item>
<item>
<p><xpropref role="psviAnon">validation attempted</xpropref> (on the validation root only)</p>
</item>
<item>
<p><xpropref role="psviAnon">error code</xpropref> (if applicable)</p>
</item>
</ulist> *-->
<!--*
* material suppressed here by diff group rq144wg2 *
*--></termdef><ulist>
<item><p><propref ref="e-validity"/></p></item>
<item><p><propref ref="e-validation_attempted"/></p></item>
<item><p><propref ref="e-schema_error_code"/>, if applicable</p></item>
</ulist>
</p>
</def>
</gitem>

<gitem>
<label>instance-validity subset</label><!--* was: yellow *-->
<def><p><termdef id="dt-instance-validity_subset" term="instance-validity subset">
The <term>instance-validity subset</term> of the PSVI consists of
the <termref def="dt-root-validity_subset"/>, plus the following properties on elements,
wherever applicable:
</termdef>
      <ulist>
<item>
<p><propref ref="e-validity"/></p></item>
<item><p><propref ref="e-validation_attempted"/></p></item>
<item><p><propref ref="e-notation_system"/></p></item>
<item><p><propref ref="e-notation_public"/></p></item>
<item><p><propref ref="e-schema_error_code"/></p></item>
</ulist>
and the following properties on attributes, wherever applicable:
<ulist>
<item><p><propref ref="a-validity"/></p></item>
<item><p><propref ref="a-validation_attempted"/></p></item>
<item><p><propref ref="a-schema_error_code"/></p></item>
</ulist>
</p>
<!--* 
<ulist>
<item>
<p><xpropref role="psviAnon">validity</xpropref> (on all items where applicable)</p>
</item>
<item>
<p><xpropref role="psviAnon">validation attempted</xpropref> (on all items where
applicable)</p>
</item>
<item>
<p><xpropref role="psviAnon">error code</xpropref> (where applicable)</p>
</item>
<item>
<p><xpropref role="psviAnon">notation system</xpropref> (where applicable)</p>
</item>
<item>
<p><xpropref role="psviAnon">notation public</xpropref> (where applicable)</p>
</item>
</ulist> *-->
</def>
</gitem>

<gitem>
<label>type-aware subset</label><!--* was: blue *-->
<def>
<p><termdef id="dt-type-aware_subset" term="type-aware subset">The 
<term>type-aware subset</term> of the PSVI consists of the
<termref def="dt-instance-validity_subset"/>, plus the following 
items and properties.</termdef>
It is intended that the type-aware subset of the PSVI include
all the information needed by schema-aware XQuery 1.0 or
XSLT 2.0 processors.
In each case, the information is to be provided in some
<termref def="key-impl-defined">implementation-defined</termref> representation.  For elements:
<ulist>
<item dg="vm3-2"><p><propref ref="e-attribution"/></p></item>
<item><p><propref ref="e-declaration"/></p></item>
<item dg="b2632"><p><propref ref="e-nil"/></p></item>
<item><p><propref ref="e-type_definition"/></p></item>
<item><p><propref ref="e-member_type_definition"/> (where applicable)</p></item>
<item><p dg="b2505-1"><propref ref="e-schema_normalized_value"/> (where applicable)</p></item>
<item><p dg="b2505-1"><propref ref="e-schema_actual_value"/> (where applicable)</p></item>
</ulist>
and for attributes:<ulist>
<item dg="vm3-2"><p><propref ref="a-attribution"/></p></item>
<item><p><propref ref="a-declaration"/></p></item>
<item><p><propref ref="a-type_definition"/></p></item>
<item><p><propref ref="a-member_type_definition"/> (where applicable)</p></item>
<item><p><propref ref="a-schema_normalized_value"/> (where applicable)</p></item>
<item dg="b2505"><p><propref ref="a-schema_actual_value"/> (where applicable)</p></item>
</ulist></p>
<note>
<p>In a future draft of this specification, it is expected that
a list of specific component properties to which access 
<rfc2119>should</rfc2119> or <rfc2119>must</rfc2119> be provided will be included.  No such
list is present in the current draft; input from readers,
users, schema authors, and implementors as to what properties
are most usefully exposed in this subset would be very welcome.</p>
</note>
</def>
</gitem>

<gitem>
<label>lightweight type-aware subset</label><!--* was: blue *-->
<def>
<p><termdef id="dt-lightweight_type-aware_subset" term="type-aware subset">The 
<term>lightweight type-aware subset</term> of the PSVI provides
the same information as the 
<termref def="dt-type-aware_subset"/>, except that instead of providing
direct access to schema components, it provides only their names and
related information.</termdef>
For elements:
<ulist>
<item dg="vm3-2"><p><propref ref="e-match_info"/></p></item>
<item><p><propref ref="e-type_definition_name"/></p></item>
<item><p><propref ref="e-type_definition_namespace"/></p></item>
<item><p><propref ref="e-type_definition_type"/></p></item>
<item><p><propref ref="e-type_definition_anonymous"/></p></item>
<item><p><propref ref="e-member_type_definition_name"/> (where applicable)</p></item>
<item><p><propref ref="e-member_type_definition_namespace"/> (where applicable)</p></item>
<item><p><propref ref="e-member_type_definition_anonymous"/> (where applicable)</p></item>
</ulist>
and for attributes:<ulist>
<item dg="vm3-2"><p><propref ref="a-match_info"/></p></item>
<item><p><propref ref="a-type_definition_name"/></p></item>
<item><p><propref ref="a-type_definition_namespace"/></p></item>
<item><p><propref ref="a-type_definition_type"/></p></item>
<item><p><propref ref="a-type_definition_anonymous"/></p></item>
<item><p><propref ref="a-member_type_definition_name"/> (where applicable)</p></item>
<item><p><propref ref="a-member_type_definition_namespace"/> (where applicable)</p></item>
<item><p><propref ref="a-member_type_definition_anonymous"/> (where applicable)</p></item>
<!--*
* material suppressed here by diff group b2505-1 *
*-->
</ulist></p>
</def>
</gitem>
<gitem>
<label>full instance subset</label><!--* was: indigo *-->
<def><p>
<termdef id="dt-full_instance_subset" term="full instance subset">The 
<term>full instance subset</term> of the PSVI includes almost all
properties defined by this specification as applying to
element and attribute information items, but excludes 
schema components. It
consists of
the <termref def="dt-instance-validity_subset"/>, 
plus the following properties for elements:</termdef>
<ulist>
<item dg="vm3-2"><p><propref ref="e-descendent_validity"/></p></item>
<item dg="vm3-2"><p><propref ref="e-local_elem_validity"/></p></item>
<item dg="vm3-2"><p><propref ref="e-local_type_validity"/></p></item>
<item dg="vm3-1"><p><propref ref="e-subsequence_valid"/></p></item>
<item dg="vm3-2"><p><propref ref="e-match_info"/></p></item>
<!--*
* material suppressed here by diff group b2632 *
*-->
<item><p><propref ref="e-type_definition_name"/></p></item>
<item><p><propref ref="e-type_definition_namespace"/></p></item>
<item><p><propref ref="e-type_definition_type"/></p></item>
<item><p><propref ref="e-type_definition_anonymous"/></p></item>
<item dg="vm3-2"><p><propref ref="e-type_fallback"/></p></item>
<item dg="cta-wrap"><p><phrase dg="cta-r1"><propref ref="e-type_alternative"/></phrase></p></item>
<item><p><propref ref="e-member_type_definition_name"/> (where applicable)</p></item>
<item><p><propref ref="e-member_type_definition_namespace"/> (where applicable)</p></item>
<item><p><propref ref="e-member_type_definition_anonymous"/> (where applicable)</p></item>
<item dg="b2505-1"><p><propref ref="e-schema_normalized_value"/> (where applicable)</p></item>
<item dg="b2505-1"><p><propref ref="e-schema_actual_value"/> (where applicable)</p></item>
<item><p><propref ref="e-schema_default"/> (where applicable)</p></item>
<item><p><propref ref="e-schema_information"/> some <termref def="key-impl-defined">implementation-defined</termref>
representation (including at least the
names of resources from which components were drawn)</p>
</item>
</ulist>
and the following for attributes:
<ulist>
<item dg="vm3-2"><p><propref ref="a-match_info"/></p></item>
<item><p><propref ref="a-type_definition_name"/></p></item>
<item><p><propref ref="a-type_definition_namespace"/></p></item>
<item><p><propref ref="a-type_definition_type"/></p></item>
<item><p><propref ref="a-type_definition_anonymous"/></p></item>
<item><p><propref ref="a-member_type_definition_name"/> (where applicable)</p></item>
<item><p><propref ref="a-member_type_definition_namespace"/> (where applicable)</p></item>
<item><p><propref ref="a-member_type_definition_anonymous"/> (where applicable)</p></item>
<item><p><propref ref="a-schema_normalized_value"/></p></item>
<item dg="b2505"><p><propref ref="a-schema_actual_value"/> (where applicable)</p></item>
<item><p><propref ref="a-schema_default"/> (where applicable)</p></item>
<item><p><propref ref="a-schema_specified"/> (where applicable)</p></item>
</ulist>
</p></def>
</gitem>
<gitem>
<label>full PSVI with components</label><!--* was: violet *-->
<def><p>
The <term>full PSVI with components</term> consists of
every property and information item defined in this
specification.
</p>
<p>
In exposing element declarations, attribute declarations,
type definitions, and other components, processors
providing access to the full subset must provide some
representation for all of the defined properties of the
components.  Note that although the properties are often
redundant with other information, it is not required that
the full subset include more than one representation of
redundant information.  
</p>
<note><p>
The PSVI is a description of an information set,
not a specification of a data structure or an application-programming
interface.  For convenience, this specification defines
in some cases more than one term for denoting a particular
piece of information:  for example, 
the <xpropref role="psviAnon">type definition name</xpropref> 
property of an element and the 
<xpropref role="psviAnon">name</xpropref>
property of the <xpropref role="psviAnon">type definition</xpropref> 
property of that element are the same piece of information.
If the <xpropref role="psviAnon">type definition</xpropref> is 
supplied, then the <xpropref role="psviAnon">type
definition name</xpropref> is necessarily also available.
</p>
<p>Similar observations can be made for other properties present in
the full-instance subset but not mentioned here.  Processors
<rfc2119>should</rfc2119> allow access to the information without requiring
users or applications to distinguish between the different
names or access paths under which it might be described in this
specification.  
</p></note>
</def>
</gitem>
</glist>
</div2>

<div2 id="var_schema_con" dg="rq144sc">
<head>
Terminology of schema construction
</head>
<p>
Conforming processors <rfc2119>may</rfc2119> implement any combination of the
following strategies for locating schema components, in any
order.  They <rfc2119>may</rfc2119> also implement other strategies.
</p>
<p>
The terminology offered here is intended to be useful in
discussions of processor behavior, whether documenting
existing behavior or describing required behavior.  
</p>
<p>
General-purpose processors <rfc2119>should</rfc2119> support multiple
methods for locating schema documents, 
and <!--*
* material suppressed here by diff group b3817 *
*--> 
provide user
control over which methods are used and how to fall back in
case of failure.
</p>
<div3 id="vsc_locations">
<head>Identifying locations where components are sought</head>
<p>
Some terms describe how a processor identifies locations from
which schema components can be sought:
<glist>
<gitem>
<label>hard-coded schemas</label>
<def><p>
	  Full knowledge of one or more schemas is built into the
	  processor.  (Note: all processors are required to have some
	  built-in knowledge of of the built-in components. <termref diff="del" def="key-interchange" dg="b7695">Schema-document
	   aware</termref><termref diff="add" def="key-general-purpose" dg="b7695">General-purpose</termref> processors
	  are additionally required to 
	  <phrase diff="del" dg="b7695">have built-in knowledge of the</phrase><phrase diff="add" dg="b7695">be able to <termref def="key-vn">validate</termref>
	   documents against the</phrase>
	   <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--> schema</phrase> for schema documents.)
</p>
</def>
</gitem>
<gitem dg="b3251">
<label><termref def="key-automatic">automatically known</termref> components</label>
<def><p>
Full knowledge of one or more components is
built into the processor; these components
<rfc2119>may</rfc2119> be made available automatically by being included
by that processor in every schema it constructs,
or they <rfc2119>may</rfc2119> be included only under certain
<termref def="key-impl-defined">implementation-defined</termref> conditions (e.g. an explicit
import of the relevant namespace, or choice of
a specified invocation option).
</p>
<note>
<p>
All processors are
required to have some built-in knowledge of 
of the built-in components.
</p>
</note>
</def>
</gitem>
<gitem>
<label>hard-coded schema locations</label>
<def><p>
A list of locations at which
schema documents will be sought is built into the processor.
Particular locations can be associated with specific
namespaces or can be used to seek any schema document.
</p>

</def>
</gitem>
<gitem>
<label>named pairs</label>
<def><p>
At invocation time, the user passes a set or
sequence of (namespace-name, schema document) pairs to the
processor, e.g. as a command-line option.  (Can be used with
early or slow exit strategy.)  The namespace name is used
as a check on the document, not as an instruction; if the 
schema document has a target namespace which differs from 
the namespace name specified, the processor signals an error.
</p>
</def>
</gitem>
<gitem>
<label>schema documents</label>
<def><p>
At invocation time, the user passes a set or sequence of schema
documents, or identifiers for schema documents (e.g. URIs), to the
processor, e.g. as a command-line option.  Each schema document
is associated with its target namespace, if any.
(Can be used with early or
slow exit strategy.)
</p>
</def>
</gitem>
<gitem>
<label>interactive inquiry</label>
<def><p>
For each namespace, the processor asks
the user interactively (though mechanisms not specified
here) where to seek the required schema components.
<note>
<p>This will perhaps be most useful as a fallback after other methods
have failed.</p>
</note>
</p>
</def>
</gitem>
<gitem>
<label>namespace name</label>
<def><p>
For each namespace, the processor attempts
to dereference the namespace name; if a schema document is
returned, it is processed. If some other kind of resource representation is
returned, processors <rfc2119>may</rfc2119> interpret its content to locate a schema document. 
<note>
<p>For example, if a RDDL document is returned,
a processor <rfc2119>may</rfc2119> search the RDDL document for <el>rddl:resource</el>
elements with the well-known property <att>xlink:role</att>
= <quote><code>http://www.w3.org/2001/XMLSchema</code></quote>
and then attempt to dereference the location(s) indicated on the
<att>xlink:href</att> attribute of the link.
</p>
</note>
</p>
</def>
</gitem>
<gitem>
<label>schemaLocation hints<phrase dg="b3817"> in XML instance document</phrase></label>
<def><p>
For each namespace, if the input
document includes one or more schemaLocation hints for that
namespace, the processor attempts to dereference those
locations.
</p>
</def>
</gitem>
<gitem dg="b3817">
<label>schemaLocation hints in schema documents</label>
<def><p>
For each namespace, if a schema document being processed
includes one or more schemaLocation hints for that
namespace (e.g. on an <code>import</code> element, 
the processor attempts to dereference those
locations.
</p>
</def>
</gitem>
<gitem>
<label>local repository</label>
<def><p>
For each namespace, a local repository of
schema components is consulted.  In some situations the consultation 
will require a key, in which see the terminology for indirection
given below.
</p>
</def>
</gitem>
</glist>
</p>
</div3>
<div3 id="vsc_indirection">
<head>Identifying methods of indirection</head>
<p>
Some terms describe various methods of indirection through
local catalogs, search paths, or local repositories of schema
documents and/or schema components.  In each of these, a
‘search key’ is assumed which helps to control the
indirection.  Terms for different sorts of search key are
defined below.
<glist>
<gitem>
<label>path indirection</label>
<def><p>
The processor has (hard-coded or accepted
as a parameter at invocation time or acquired from the
environment) a series of expressions into which a search key
is substituted.  After substitution, each element of the
series is interpreted as a file-system path and a schema
document is sought at the location indicated by that path.
</p>
</def>
</gitem>
<gitem>
<label>URI indirection</label>
<def><p>
The processor has (hard-coded or accepted
as a parameter at invocation time or acquired from the
environment) a series of expressions into which a search key
is substituted.  After substitution, each element of the
series is interpreted as a URI and a schema document is
sought at the location indicated by that path.
</p></def>
</gitem>
<gitem>
<label>catalog indirection</label>
<def><p>
The processor consults an OASIS catalog
(whose location can be hard-coded, passed as a parameter at
invocation time or acquired from the environment) using a
search key.  The key can be sought for as a namespace name,
as a public identifier, or as a system identifier.
</p></def>
</gitem>
<gitem>
<label>local repository indirection</label>
<def><p>
A local repository of schema
components is consulted using a search key.
</p></def>
</gitem>
<gitem>
<label>recursion</label>
<def><p>
The location(s) returned by a catalog or other
indirection mechanism are not consulted immediately but
instead used as a key in a renewed indirection.  Only after
the indirection mechanism fails to return a value is an
attempt made to dereference the last location returned.
</p></def>
</gitem>
<gitem>
<label>non-recursion</label>
<def><p>
The location(s) returned by a catalog or
other indirection mechanism are consulted immediately; they
are not used in recursive indirections.
</p></def></gitem>
</glist>
</p>
</div3>
<div3 id="vsc_key">
<head>Identifying the key for use in indirection</head>
<p>
Locating schema components by means of any of the ‘indirect’
methods just identified will sometimes involve the specification of a
value of some kind as a search key.  Processors <rfc2119>may</rfc2119> vary in
their choice of values to use as the key:
<glist>
<gitem>
<label>namespace key</label>
<def><p>
The namespace name is used as a key.
</p></def>
</gitem>
<gitem>
<label>location key</label>
<def><p>
A location (e.g. a schema location hint or the
location specified in a catalog or by the user) is used as a
key.
</p></def>
</gitem>
</glist></p>
</div3>
<div3 id="vsc_stopping">
<head>Identifying when to stop searching</head>
<p>
When more than one location is available for a given
namespace, two distinct behaviors can be distinguished; these
are orthogonal to other terms defined here:
<glist>
<gitem>
<label>early-exit</label>
<def><p>
When more than one location is available for a
given namespace, the processor attempts each in turn.  When
a location is successfully dereferenced and a schema
document is obtained, the later locations on the list are
ignored.
</p></def>
</gitem>
<gitem>
<label>slow-exit</label>
<def><p>
When more than one location is available for a
given namespace, the processor attempts each in turn.  All
locations are tried, even if a schema document for the
namespace has been obtained.
</p></def>
</gitem>
</glist></p>
</div3>
<div3 id="vsc_failure" dg="b3817">
<head>Identifying how to react to failure</head>
<p>
When a processor seeks schema components at a particular
location, but fails to find components of the namespace
in question at that location, several different
ways of responding to that failure can be distinguished:
<glist>
<gitem>
<label>error</label>
<def><p>
The processor signals an error in some manner appropriate
to its construction and environment.  Some processors
and some users will find it useful to distinguish fatal errors (which
cause processing to halt) from recoverable errors.
</p></def>
</gitem>
<!--* 
<gitem>
<label>ignore</label>
<def><p>
The processor signals no fatal error but ends its search
for components in the namespace in question.
</p></def>
</gitem>
*-->
<gitem>
<label>continue</label>
<def><p>
The processor signals no fatal error and continues its search
for components in the namespace in question by attempting
another location.
</p></def>
</gitem>
</glist></p>
</div3>
</div2>

<!--*
* material suppressed here by diff group rq144-abandoned *
*-->
   <div2 id="sec-other-idf" dg="b3076">
    <head>Other Implementation-defined Features</head>
    <p>This section defines terms intended to be useful in describing
     other implementation-defined choices.
    </p>
    <glist>
     <gitem id="xml-1.0-based">
      <label>XML-1.0-based datatypes</label>
      <def>
       <p>The datatypes defined by <bibref ref="ref-xsp2"/>, taking 
	the relevant definitions from
	<bibref ref="ref-xml-1.0"/> and <bibref ref="ref-xml-namespaces-1.0"/>,
	for datatypes which depend on definitions from those specifications.
       </p>
      </def>
     </gitem>
     <gitem id="xml-1.1-based">
      <label>XML-1.1-based datatypes</label>
      <def>
       <p>The datatypes defined by <bibref ref="ref-xsp2"/>, taking 
	the relevant definitions from version 1.1 of 
	<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/> and <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-namespaces-1.1" dg="b1838refs"/>,
	for datatypes which depend on definitions from those specifications.
       </p>
      </def>
     </gitem>
    </glist>
   </div2>
</div1>

 <div1 id="infoset">
  <head>Required Information Set Items and Properties (normative)</head>
   <p>This specification requires as a precondition for <termref def="key-va"/>
    an information set as defined in <bibref ref="ref-xmlinfo"/><!--*
* material suppressed here by diff group b6011bis *
*-->
    <phrase dg="b5800-reverted">which <!--*
* material suppressed here by diff group b6011bis *
*--><phrase dg="b6011bis">contains</phrase> 
     at least the following
     information items and properties:</phrase>
    <!--*
* material suppressed here by diff group b5800-reverted *
*--></p>
  <glist>
   <gitem>
    <label>Attribute Information Item</label>
    <def>
     <p><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">local name</xpropref>, <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">namespace name</xpropref>,
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">normalized value</xpropref><phrase dg="b5800">,
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">prefix</xpropref>, <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">attribute type</xpropref>,
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">owner element</xpropref></phrase></p>
    </def>
   </gitem>
   <gitem>
    <label>Character Information Item</label>
    <def>
     <p><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.character">character code</xpropref><phrase dg="b5800">,
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.character">parent</xpropref></phrase></p>
    </def>
   </gitem>
   <gitem dg="b5800">
    <label>Comment  Information Item</label>
    <def>
     <p><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.pi">content</xpropref>, <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.pi">parent</xpropref></p>
    </def>
   </gitem>
   <gitem>
    <label>Element Information Item</label>
    <def>
     <p><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">local name</xpropref>, <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">namespace name</xpropref>,
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>, <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref>, <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">in-scope namespaces</xpropref><!--*
* material suppressed here by diff group b5800 *
*--><phrase dg="b5800">,</phrase>
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">namespace attributes</xpropref><phrase dg="b5800">,
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">prefix</xpropref>, <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">base URI</xpropref>,
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">parent</xpropref></phrase></p>
    </def>
   </gitem>
   <gitem>
    <label>Namespace Information Item</label>
    <def>
     <p><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.namespace">prefix</xpropref>, <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.namespace">namespace name</xpropref></p>
    </def>
   </gitem>
   <gitem dg="b5800">
    <label>Processing Instruction Item</label>
    <def>
     <p><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.pi">target</xpropref>, <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.pi">content</xpropref>,
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.pi">base URI</xpropref>, <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.pi">parent</xpropref></p>
    </def>
   </gitem>
  </glist>
  <p>In addition, infosets <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals"><rfc2119>should</rfc2119></phrase> support the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.document"><!--*
* material suppressed here by diff group b5800 *
*--><phrase dg="b5800">unparsed entities</phrase></xpropref>
   property of the Document Information Item.  Failure to do so will mean all
   items of type <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ENTITY">ENTITY</xtermref> or
   <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ENTITIES">ENTITIES</xtermref> will fail to
   <termref def="key-vn">validate</termref>.<phrase dg="b5800"> If the
   <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.document">unparsed entities</xpropref> property is supported,
   the following is also required:</phrase></p>
  <glist dg="b5800">
   <gitem>
    <label>Unparsed Entity Information Item</label>
    <def>
     <p><xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.entity.unparsed">name</xpropref>,
      <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.entity.unparsed">system identifier</xpropref>,
      <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.entity.unparsed">public identifier</xpropref></p>
    </def>
   </gitem>
  </glist>
  <p>This specification does not require any destructive alterations to the input
information set: all the information set contributions specified herein are additive.</p>
  <p>This appendix is intended to satisfy the requirements for <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2001/WD-xml-infoset-20010316/#conformance">Conformance</xspecref> to the <bibref ref="ref-xmlinfo"/> specification.</p>
 </div1>

<div1 id="impl-def-dep-list" dg="rq144">
<head>Checklist<phrase dg="f2f0701e">s</phrase> of implementation-defined <phrase dg="f2f0701e">and implementation-dependent</phrase> features <phrase dg="b5150b">(normative)</phrase></head>

<div2 id="impl-def-list" dg="rq144">
<head><phrase dg="f2f0701e">Checklist of implementation-defined features</phrase></head>


 <p dg="f2f0701e"><termdef id="key-impl-defined" term="implementation-defined">An <term>implementation-defined</term> 
  feature or behavior <rfc2119>may</rfc2119> vary among processors conforming to this 
  specification; the precise behavior is not specified by
  this specification but <rfc2119>must</rfc2119> be specified by the
  implementor for each particular conforming implementation.</termdef>  
  (In the latter
  respect, <termref def="key-impl-defined"/> features differ
  from <termref def="key-impl-dep"/> features.)
 </p>
<p>
This appendix provides a summary of <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase>
features whose effect is explicitly <termref def="key-impl-defined">implementation-defined</termref>. 
Any software which claims to conform to this specification
<rfc2119>must</rfc2119> describe how these choices have been exercised, in
documentation which accompanies any conformance claim.
</p>
<p>In describing the choices made for a given processor, 
it is hoped that the terminology defined in <specref ref="var_terminology"/>
will be found useful.</p>
<olist>
<item dg="b1838">
<p>For the datatypes defined by
<bibref ref="ref-xsp2"/> which depend on
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/> or <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-namespaces-1.1" dg="b1838refs"/>, it is
<termref def="key-impl-defined">implementation-defined</termref> whether a schema processor 
takes the relevant definitions from
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/> and <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-namespaces-1.1" dg="b1838refs"/>, or
from
<bibref ref="ref-xml-1.0"/> and <bibref ref="ref-xml-namespaces-1.0"/>. 
Implementations <rfc2119>may</rfc2119> support either
the <!--*
* material suppressed here by diff group b3076 *
*--><phrase dg="b3076"><termref def="xml-1.0-based">XML-1.0-based</termref>
datatypes</phrase>, 
or the <!--*
* material suppressed here by diff group b3076 *
*--><phrase dg="b3076"><termref def="xml-1.1-based">XML-1.1-based</termref>
datatypes</phrase>, 
or both.
The same applies to the definition of whitespace.
</p>
</item>
<item dg="rq144cf">
<p>It is <termref def="key-impl-defined">implementation-defined</termref> whether a schema processor
can read schema documents in the <!--*
* material suppressed here by diff group b3589 *
*--><phrase dg="b3589">form of XML documents.</phrase>
<phrase diff="del" dg="b7695">(See 
<specref ref="concepts-conformance"/><!--*
* material suppressed here by diff group b3589 *
*-->
<phrase dg="b3589">for distinction between</phrase>
<quote><termref def="key-minimallyConforming">minimally conforming</termref></quote>
processors <!--*
* material suppressed here by diff group b3589 *
*--> and <quote><termref def="key-interchange"/></quote> 
processors<!--*
* material suppressed here by diff group b3589 *
*-->.)</phrase>
</p>
</item>
<item dg="rq144cf">
<p>Whether a <termref diff="del" def="key-interchange" dg="b7695"/> processor 
is able to retrieve schema documents from the Web
is <termref def="key-impl-defined">implementation-defined</termref>. (See <specref ref="concepts-conformance"/>,
which defines <quote><termref def="key-fullyConforming"/></quote> processors
as <termref diff="del" def="key-interchange" dg="b7695"/> processors 
which can retrieve schema documents from the Web.)</p>
</item>
<item dg="rq144si">
<p>The way in which a processor is invoked, and the way in
which values are specified for the schema to be used,
the information item to be validated,
and the declaration or definition with which to begin
validation, is <termref def="key-impl-defined">implementation-defined</termref>.  (See 
<specref ref="validation_outcome"/>.)</p>
</item>
<item dg="rq144">
<p>The manner in which a processor provides access to the 
information items and properties in the PSVI to any 
downstream or user applications, or to the invoker, 
is <termref def="key-impl-defined">implementation-defined</termref>.</p>
</item>
<item dg="rq144fl">
<p>The <!--*
* material suppressed here by diff group rq144wg2 *
*--> 
information items and properties in the PSVI to which
the processor provides access, if any, is <termref def="key-impl-defined">implementation-defined</termref>.
(See <specref ref="var_psvi"/> for some subsets of the PSVI for
which this specification provides names and definitions.)</p>
</item>
<!--* 
  c They can provide access to different subsets of the PSVI,
    both as will be provided for in our resolution of RQ-144
    and as already documented:

    c.1 They may expose, or not expose, attribute
        declarations (sec. 3.2.5).

    c.2 They may expose either element declarations or the
        [nil] property (sec. 3.3.5).

    c.3 They may expose either type definitions or
        selected properties (name, namespace, anonymous, type)
        of them (sec. 3.2.5, 3.3.5).

    c.4 They may provide names for anonymous type
        definitions (sec. 3.2.5, 3.3.5).

    c.5 They may signal violation of ID uniqueness either
        at (as part of the PSVI representation of) the root
        element or "as it arises" (sec. 3.3.4).

        Strictly speaking, what the draft currently says is
        that processors are allowed to (i.e. MAY) "wish to
        detect and signal" the violation as it arises.  I take
        that to mean they are allowed not only to wish to do
        so, but to do so.

    c.6 They may expose, or not expose, the
        identity-constraint binding info item in the PSVI
        (sec. 3.11.5).

    c.7 They may expose, or not expose, the ID/IDREF
        binding info item in the PSVI (sec. 3.15.5).

    c.8 They may expose either notation components or
        selected properties (system, public)
        of them (sec. 3.12.5).
*-->
<item dg="rq144">
<p>When the <termref def="key-psvi">post-schema-validation infoset</termref> includes
<xpropref role="psviAnon">type definition name</xpropref> and
similar properties, it is <termref def="key-impl-defined">implementation-defined</termref> whether
unique names are provided for anonymous type definitions.
</p></item>
<item dg="rq144sc">
<p>The method used for assembling a set of schema components
for use in validation is <termref def="key-impl-defined">implementation-defined</termref>.
(See <specref ref="schema-loc"/> for the normative prose and
<specref ref="var_schema_con"/> for some terminology which
can be used in describing implementation choices.)</p>
</item>
<!--*
* material suppressed here by diff group rq144-abandoned *
*-->
<!--* 
  f Processors may assemble a schema incrementally (4.1,
    4.3.2).  This is required to have no effect on 
    the results of schema-validity assessment, but the spec
    goes out of its way to stress that processors MAY
    use lazy schema assembly.

  g Processors may have different views on whether two components
    are the same or not (Sec. 3.4.6).
*-->

<!--*
* material suppressed here by diff group b2105b *
*-->
<item dg="f2f0701e">
<p>It is <termref def="key-impl-defined">implementation-defined</termref> whether a schema processor
provides a value for the <xpropref role="psviAnon">type definition name</xpropref>
and <xpropref role="psviAnon">member type definition name</xpropref>
properties of attribute and element information-items.  
If it does so, the choice of name is <termref def="key-impl-dep"/>.</p>
</item>

     <item dg="b3251">
      <p>Everything <termref def="key-impl-defined">implementation-defined</termref> in <bibref ref="ref-xsp2"/> is also
      <termref def="key-impl-defined">implementation-defined</termref> in this specification.</p>
      <note>
       <p>This includes, but is not limited to, the choice
	of <termref def="xml-1.0-based">XML-1.0-based</termref>
	or <termref def="xml-1.1-based">XML-1.1-based</termref>
	datatypes, or both;
	support for <termref def="key-impl-defined">implementation-defined</termref> primitive datatypes; 
	and
	support for <termref def="key-impl-defined">implementation-defined</termref> constraining facets.
	See the <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#idef-idep">appendix</xspecref> on
	implementation-defined and implementation-dependent
	features in <bibref ref="ref-xsp2"/>.
       </p>
      </note>
     </item>
     <item dg="b5293">
      <p>It is <termref def="key-impl-defined">implementation-defined</termref> whether a processor detects
       violations of <clauseref ref="T.ct.restricts.B.ct"/>
       of <specref ref="derivation-ok-restriction"/>
       (a) always by examination of the schema in isolation,
       (b) only when some element information item
       in the input document is valid against its <termref def="key-governing-type-elem"/> 
       <var>T</var> but not against <var>T</var>.<propref comp="ctd" prop="base type definition"/>, or 
       (c) sometimes the one and sometimes the other.
       In case (c), the circumstances
       in which the processor does one or the other are 
       <termref def="key-impl-dep">implementation-dependent</termref>.
      </p>
     </item>
</olist>
</div2>

<div2 id="impl-dep-list" dg="f2f0701b">
 <head>Checklist of implementation-dependent features</head>
 <p dg="f2f0701e"><termdef id="key-impl-dep" term="implementation-dependent">An <term>implementation-dependent</term> 
  feature or behavior <rfc2119>may</rfc2119> vary among processors conforming to this 
  specification; the precise behavior is not specified by
  this or any other W3C specification
  and is not required to be specified by the implementor 
  for any particular implementation.</termdef>  (In the latter
  respect, <termref def="key-impl-dep"/> features differ
  from <termref def="key-impl-defined"/> features.)
 </p>
 <p>This appendix provides a summary of <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> features whose
  effect is explicitly <termref def="key-impl-dep">implementation-dependent</termref>. Choices made by processors
  in these areas are <emph>not</emph> required to be documented.</p>
 <olist>
  <item><p>
   When a default value of type <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#QName">QName</xtermref>
   or <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#NOTATION">NOTATION</xtermref> is applied to an
   element or attribute information item, it is <termref def="key-impl-dep">implementation-dependent</termref>
   whether <termref def="term-ns-fixup"/> occurs to ensure that the
   <propref comp="vc_a" prop="lexical form"/> maps to the
   <propref comp="vc_a" prop="value"/>.
  </p></item>
  <item><p>
   When a default value is supplied for a defaulted attribute and <!--*
* material suppressed here by diff group f2f0701c *
*--><phrase dg="f2f0701c">more than
   one prefix is</phrase>  bound to the namespace of the attribute in the
   <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">in-scope namespaces</xpropref>, it is <termref def="key-impl-dep">implementation-dependent</termref> which prefix is used for the
   attribute.  
  </p></item>
  <item><p>
   When a default value is supplied for a defaulted attribute and
   <termref def="term-ns-fixup"/> is performed, it is <termref def="key-impl-dep">implementation-dependent</termref>
   what prefix <!--*
* material suppressed here by diff group f2f0701c *
*--><phrase dg="f2f0701c">is used</phrase> in the new 
   namespace information item.
  </p></item>
  <item><p>
   When a default value is supplied for a defaulted attribute and
   <termref def="term-ns-fixup"/> is performed, it is <termref def="key-impl-dep">implementation-dependent</termref>
   whether the consistency of the information set is preserved by (a) adding
   the new binding to the descendants of the element on which the defaulted
   attribute occurred, or by (b) undeclaring the new binding on the children
   of that element.  When <bibref ref="ref-xml-namespaces-1.0"/> rather than 
   <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-namespaces-1.1" dg="b1838refs"/> is in use, namespace bindings cannot be
   undeclared, so the behavior is <termref def="key-impl-dep">implementation-dependent</termref> only for those
   implementations which do support <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-namespaces-1.1" dg="b1838refs"/>.
  </p></item>
  <item><p>
   If more than one <compref ref="icd"/> fails to be satisfied, it is
   <termref def="key-impl-dep">implementation-dependent</termref> which of them are included in the
   <propref ref="e-idcs" role="psvi"/> property of PSVI.
  </p></item>
  <item><p>
   If more than one <compref ref="as"/> fails to be satisfied, it is
   <termref def="key-impl-dep">implementation-dependent</termref> which of them are included in the
   <propref ref="e-assertions" role="psvi"/> property of PSVI.
  </p></item>
  <item><p>
   The order of <compref ref="a"/> components within various components'
   {annotations} property is <termref def="key-impl-dep">implementation-dependent</termref>.
  </p></item>
  <item dg="f2f0701c"><p>
   If a name is supplied for anonymous components<phrase dg="f2f0701d">
   (for example, <xpropref role="psviAnon">type definition name</xpropref>
   and <xpropref role="psviAnon">member type definition name</xpropref>
   properties in the <termref def="key-psvi">post-schema-validation infoset</termref>)</phrase>, the choice of name is
   <termref def="key-impl-dep">implementation-dependent</termref>.
  </p></item>
     <item dg="b5293">
      <p>If a processor detects
       some violations of <clauseref ref="T.ct.restricts.B.ct"/>
       of <specref ref="derivation-ok-restriction"/>
       by examination of the schema in isolation,
       and others only when some element information item
       in the input document is valid against its <termref def="key-governing-type-elem"/> 
       <var>T</var> but not against <var>T</var>.<propref comp="ctd" prop="base type definition"/>, 
       then the circumstances
       in which the processor does one or the other are 
       <termref def="key-impl-dep">implementation-dependent</termref>.
      </p>
     </item>
 </olist>
</div2>
</div1>

<div1 id="composition-xslts" dg="b4767">
 <head>Stylesheets for Composing Schema Documents (Normative)</head>
 <p>The transformations specified in the following sections
  in the form of <bibref ref="bib-xslt2"/> stylesheets are used when
  assembling schemas from multiple schema documents. Implementations do not
  have to perform <bibref ref="bib-xslt2"/> transformation, or use
  the stylesheets given here, as long as the
  same result is produced.</p>

   <div2 id="chameleon-xslt" dg="b2067n">
    <head><!--*
* material suppressed here by diff group b2067m *
*--><phrase dg="b2067m">Transformation</phrase> for Chameleon Inclusion</head>
    <p>When a <eltref ref="schema"/> information item <local>D2</local> without a
     <att>targetNamespace</att> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is included
     (<specref ref="compound-schema"/>), redefined
     (<specref ref="modify-schema"/>), or overridden
     (<specref ref="override-schema"/>) by another <eltref ref="schema"/>
     <local>D1</local> with a <att>targetNamespace</att> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, the following
     transformation, specified here as an 
     <bibref ref="bib-xslt2"/> stylesheet, is applied to <local>D2</local>
     before its contents are mapped to schema compnents.  The
     transformation performs two tasks:<olist>
      <item><p>
	Add a <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> to <local>D2</local>, whose value
	is the same as that of the <code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of
	<local>D1</local>.
       </p></item>
      <item><p>
	Update all QName references in <local>D2</local> that do not have a namespace name
	so that their namespace names become the <termref def="key-vv">actual value</termref> of the
	<code>targetNamespace</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>.
       </p></item>
     </olist>
    </p>
    <codeScrap id="xslt-chameleon">
     <head>Stylesheet for Chameleon Inclusion</head>
   <codeBlock>&lt;xsl:transform version="2.0"
               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
               xmlns:xs="http://www.w3.org/2001/XMLSchema"
               xmlns:f="http://www.w3.org/2008/05/XMLSchema-misc"&gt;

  &lt;xsl:param name="newTargetNamespace" as="xs:anyURI" 
      required="yes"/&gt;
  &lt;xsl:param name="prefixForTargetNamespace" as="xs:NCName" 
      select="f:generateUniquePrefix(0)"/&gt;

  &lt;xsl:template match="@*|node()"&gt;
    &lt;xsl:copy&gt;&lt;xsl:apply-templates select="@*|node()"/&gt;&lt;/xsl:copy&gt;
  &lt;/xsl:template&gt;

  &lt;xsl:template match="xs:schema"&gt;
    &lt;xsl:copy&gt;
     &lt;xsl:namespace name="{$prefixForTargetNamespace}" 
       select="$newTargetNamespace"/&gt;
     &lt;xsl:apply-templates select="@*"/&gt;
     &lt;xsl:attribute name="targetNamespace" 
       select="$newTargetNamespace"/&gt;
     &lt;xsl:apply-templates/&gt;
   &lt;/xsl:copy&gt;
  &lt;/xsl:template&gt;

  &lt;xsl:template match="attribute(*, xs:QName)
      [namespace-uri-from-QName(.)='']"&gt;
    &lt;xsl:attribute name="{name()}" 
      select="concat($prefixForTargetNamespace, 
                     ':', 
                     local-name-from-QName(.)"/&gt;
  &lt;/xsl:template&gt;

  &lt;xsl:function name="f:generateUniquePrefix" as="xs:NCName"&gt;
    &lt;xsl:param name="try" as="xs:integer"/&gt;
    &lt;xsl:variable name="disallowed" 
      select="distinct-values(//*/in-scope-prefixes())"/&gt;
    &lt;xsl:variable name="candidate" 
      select="xs:NCName(concat('p', $try))"/&gt;
    &lt;xsl:sequence select="if ($candidate = $disallowed) then 
                                f:generateUniquePrefix($try+1) 
                             else 
                                $candidate"/&gt;
  &lt;/xsl:function&gt;

&lt;/xsl:transform&gt;</codeBlock>
  </codeScrap>
    <!--*
* material suppressed here by diff group b4767-en *
*-->
   </div2>
   <div2 id="override-xslt">
    <head><!--*
* material suppressed here by diff group b2067m *
*--><phrase dg="b2067m">Transformation</phrase> for <code>xs:override</code></head>
    <!--*
* material suppressed here by diff group b6021-movement *
*-->
   <!--*
* material suppressed here by diff group b2067m *
*-->
    <p dg="b6021"><phrase id="ov.desc.intro" dg="b6021-movement">When a <eltref ref="schema"/> 
     information item <local>D1</local> contains
     <eltref ref="override"/> elements, the transformation specified in the following 
     <bibref ref="bib-xslt2"/> stylesheet is performed once for
     each such <eltref ref="override"/> element.  It requires as 
     parameters (a) the <eltref ref="override"/> element in <local>D1</local>
     (call it <var>O1</var>) as the <code>overrideElement</code> parameter 
     and (b)
     the <eltref ref="schema"/> element of the schema document <local>D2</local>
     identified by the <att>schemaLocation</att> attribute of <var>O1</var>
     as the <code>overriddenSchema</code> parameter.
     The transformation 
     produces another <eltref ref="schema"/> <local>D2′</local>, which is equivalent 
     to <local>D2</local> except that some elements in <local>D2</local> are replaced 
      <!--*
* material suppressed here by diff group b6021 *
*--><phrase dg="b6021">
       or modified</phrase>, as follows.</phrase>
    </p>    
    <p id="ov.desc" dg="b6021-movement">
     <!--*
* material suppressed here by diff group b6021-movement *
*-->
     For each element information item <var>E2</var> in the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <local>D2</local>'s
     <eltref ref="schema"/>, <eltref ref="redefine"/>, or
     <eltref ref="override"/> information item, <olist role="casetest">
      <item id="c-override-xslt-match">
       <p role="if"><phrase dg="b6021"><var>E2</var>
	 has element type </phrase><!--*
* material suppressed here by diff group b6021 *
*--><eltref ref="simpleType"/>, <eltref ref="complexType"/>,
	<eltref ref="group"/>, <eltref ref="attributeGroup" inside="simpleContent"/>,
	<eltref ref="element"/>, <eltref ref="attribute"/>, or
	<eltref ref="notation"/><!--*
* material suppressed here by diff group b6021 *
*--><phrase dg="b6021">, and <var>O1</var> has a child 
	 <var>E1</var> with the same element type</phrase> 
	and the same value for its <att>name</att>
	attribute</p>
       <p role="then"> <local>D2′</local> has an element identical to <var>E1</var> in <var>E2</var>'s
	place.</p>
      </item>
      <item id="c-override-xslt-nomatch">
       <p role="if"><phrase dg="b6021"><var>E2</var> has one of the 
	 element types specified in <clauseref ref="c-override-xslt-match"/>,
	 but </phrase><var>O1</var> has no <!--*
* material suppressed here by diff group b6021 *
*--> 
	<phrase dg="b6021">matching</phrase> child</p>
       <p role="then"><local>D2′</local> has an element identical to <var>E2</var> in the same
	place as where <var>E2</var> is in <local>D2</local>.</p>
      </item>
      <item id="c-override-include" dg="b6021">
       <p role="if"><var>E2</var> has element type <eltref ref="include"/></p>
       <p role="then"><local>D2′</local> has an <eltref ref="override"/> element
	with <att>schemaLocation</att> = <var>E2</var>.<att>schemaLocation</att>
	and <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> identical to those of <var>O1</var>.</p>
      </item>
      <item id="c-override-override" dg="b6021">
       <p role="if"><var>E2</var> has element type <eltref ref="override"/></p>
       <p role="then"><local>D2′</local> has an <eltref ref="override"/> element
	<var>O2</var>, 
	with <att>schemaLocation</att> = <var>E2</var>.<att>schemaLocation</att>
	and <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> which are drawn from among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of
	<var>E2</var> and <var>O1</var>, as specified by
	<olist role="caseval">
	 <item id="c-ov-ov-match">
	  <p role="if">a child of <var>E2</var> and a child of <var>O1</var> match as described
	   in <clauseref ref="c-override-xslt-match"/></p>
	  <p role="then"><var>O2</var> has 
	   a child identical to the child of <var>O1</var>.</p>
	 </item>
	 <item id="c-ov-ov-nomatch">
	  <p role="if">a child of <var>E2</var> matches no child of <var>O1</var> as described
	   in <clauseref ref="c-override-xslt-match"/></p>
	  <p role="then">(as described in <clauseref ref="c-override-xslt-nomatch"/>)
	   <var>O2</var> has a child identical to the child of <var>E2</var>.</p>
	 </item>
	 <item id="c-ov-ov-added">
	  <p role="if">a child of <var>O1</var> matches no child of <var>E2</var> as described
	   in <clauseref ref="c-override-xslt-match"/></p>
	  <p role="then">
	   <var>O2</var> has a child identical to the child of <var>O1</var>.</p>
	 </item>
	</olist>
       </p>
       <note>
	<p>Informally, the rule just given has the effect that <var>O2</var>
	 contains (a) all the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <var>O1</var>, as well as (b) all of
	 the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <var>E2</var> which are not overridden by some child
	 of <var>O1</var>.  The elements corresponding to <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <var>E2</var>
	 come first, followed by the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <var>O1</var> which matched
	 nothing in <var>E2</var>.
	</p>
       </note>
      </item>
     </olist></p>
    <p dg="b6021k">The base URI of <local>D2′</local> is the same
    as that of <local>D2</local>.</p>

    <note dg="b6021">
     <p>Informally, <local>D2′</local> is like <local>D2</local> except that
      (a) any elements matched by any <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <var>O1</var> 
      are overridden (replaced) by the corresponding <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <var>O1</var>,
      (b) any schema documents included by means of 
      <eltref ref="include"/> elements
      in <local>D2</local> are overridden (transformed) by <var>O1</var> instead of
      being included without change,
      and (c) any schema documents overridden by means of 
      <eltref ref="override"/> elements
      in <local>D2</local> are to be overridden (transformed) both as
      specified in the <eltref ref="override"/> elements
      in <local>D2</local> and as specified in <var>O1</var>; if both apply,
      the information in <var>O1</var> takes precedence.
     </p>
     <p dg="b6021k">The result is that the transformation 
      described by <var>O1</var> is applied to all the document in the
      <termref def="key-targetset"/> of <var>O1</var>.</p>
    </note>
    <note dg="b6021k">
     <p>Because <local>D2</local> and <local>D2′</local> have
      the same base URI, relative references in <local>D2′</local> will
      be unaffected by the transformation.</p>
    </note>
    
    <codeScrap id="xslt-override" dg="b2067m">
     <head>Stylesheet for <code>xs:override</code></head>
     <codeBlock>&lt;xsl:transform version="2.0" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:f="http://www.w3.org/2008/05/XMLSchema-misc"<!--*
* material suppressed here by diff group b6021 *
*-->
  exclude-result-prefixes="f"&gt;
  
  &lt;xsl:import-schema 
    namespace="http://www.w3.org/2001/XMLSchema" 
    schema-location="./XMLSchema.xsd"/&gt;
   
  &lt;xsl:param name="overrideElement" as="schema-element(xs:override)"/&gt;       
  &lt;xsl:param name="overriddenSchema" as="schema-element(xs:schema)"/&gt;
  
  &lt;xsl:template name="start"&gt;<!--*
* material suppressed here by diff group b6021k *
*--><phrase dg="b6021k">
    &lt;xsl:result-document validation="strict"&gt;
    	&lt;xsl:apply-templates select="$overriddenSchema"/&gt;
    &lt;/xsl:result-document&gt;</phrase>
  &lt;/xsl:template&gt;  
  
  &lt;xsl:template match="schema-element(xs:schema) 
      | <phrase dg="b6021k">schema-element(</phrase>xs:redefine<phrase dg="b6021k">)</phrase>"&gt;
    &lt;xsl:copy&gt;
      &lt;xsl:copy-of select="@*"/&gt;
      &lt;xsl:apply-templates/&gt;
    &lt;/xsl:copy&gt;
  &lt;/xsl:template&gt;
  
  &lt;xsl:template match="<!--*
* material suppressed here by diff group b6021 *
*--><phrase dg="b6021k">schema-element(</phrase>xs:import<phrase dg="b6021k">)</phrase>" priority="5"&gt;
    &lt;xsl:copy-of select="."/&gt;
  &lt;/xsl:template&gt;

<!--* 
  &lt;xsl:template match="xs:override" priority="5">
    &lt;xsl:message terminate="yes">
      Any xs:override elements in the overridden schema
      documents must be expanded before applying this
      transformation; after expansion, the resulting schema
      document will contain no xs:override elements
    &lt;/xsl:message>
  &lt;/xsl:template>
  *-->
<phrase dg="b6021">
  &lt;!--* replace children of xs:schema, xs:redefine, and xs:override
      * which match children of $overrideElement.  Retain others.
      *--&gt;</phrase>
  &lt;xsl:template match="<phrase dg="b6021k">schema-element(</phrase>xs:schema<phrase dg="b6021k">)</phrase>/* 
      | <phrase dg="b6021k">schema-element(</phrase>xs:redefine<phrase dg="b6021k">)</phrase>/*
      | <phrase dg="b6021k">schema-element(</phrase>xs:override<phrase dg="b6021k">)</phrase>/*" 
    priority="3"&gt;
    &lt;xsl:variable name="original" select="."/&gt;
    &lt;xsl:variable name="replacement"
      select="$overrideElement/*
                [node-name(.)=node-name($original) 
                 and 
                 f:componentName(.)=f:componentName($original)]"/&gt;
    &lt;xsl:copy-of select="($replacement, $original)[1]"/&gt;
  &lt;/xsl:template&gt;
<phrase dg="b6021">
  &lt;!--* replace xs:include elements with overrides
      *--&gt;
  &lt;xsl:template match="<phrase dg="b6021k">schema-element(</phrase>xs:include<phrase dg="b6021k">)</phrase>"
    priority="5"&gt;
    &lt;xsl:element name="xs:override"&gt;
      <!--*
* material suppressed here by diff group b6021k *
*--><phrase dg="b6021k">
      &lt;xsl:copy-of select="<phrase dg="b6021k">@schemaLocation, </phrase>$overrideElement/*"/&gt;</phrase>
    &lt;/xsl:element&gt;
  &lt;/xsl:template&gt;

  &lt;!--* change xs:override elements:  children which match 
      * children of $overrideElement are replaced, others are
      * kept, and at the end all children of $overrideElement
      * not already inserted are added.
      *--&gt;
  &lt;xsl:template match="<phrase dg="b6021k">schema-element(</phrase>xs:override<phrase dg="b6021k">)</phrase>"
    priority="5"&gt;
    &lt;xsl:element name="xs:override"&gt;
      &lt;xsl:attribute name="schemaLocation"&gt;
	&lt;xsl:value-of select="@schemaLocation"/&gt;
      &lt;/xsl:attribute&gt;
      &lt;xsl:apply-templates/&gt;
      &lt;xsl:apply-templates select="$overrideElement/*" 
	mode="copy-unmatched"&gt;
	&lt;xsl:with-param name="overriddenOverride" select="."/&gt;
      &lt;/xsl:apply-templates&gt;
    &lt;/xsl:element&gt;
  &lt;/xsl:template&gt;

  &lt;xsl:template match="*" mode="copy-unmatched"&gt;
    &lt;xsl:param name="overriddenOverride"&gt;&lt;/xsl:param&gt;
    &lt;xsl:variable name="overriding" select="."/&gt;
    &lt;xsl:variable name="overridden" select="$overriddenOverride/*[
	node-name(.) = node-name($overriding) 
	and 
	f:componentName(.) = f:componentName($overriding)
      ]"/&gt;
    &lt;xsl:choose&gt;
      &lt;xsl:when test="count($overridden) &gt; 0"&gt;
	&lt;!--* do nothing; this element has already been copied *--&gt;
      &lt;/xsl:when&gt;
      &lt;xsl:when test="count($overridden) = 0"&gt;
	&lt;!--* copy this element, it isn't already there *--&gt;
	&lt;xsl:copy-of select="."/&gt;
      &lt;/xsl:when&gt;
    &lt;/xsl:choose&gt;
  &lt;/xsl:template&gt;
</phrase>  

  &lt;xsl:function name="f:componentName" as="xs:QName"&gt;
    &lt;xsl:param name="component" as="element()"/&gt;
    &lt;xsl:sequence select="
      QName($component/ancestor::xs:schema/@targetNamespace,
            $component/@name)"/&gt;
  &lt;/xsl:function&gt;

&lt;/xsl:transform&gt;</codeBlock>
  </codeScrap>
  
  <!--*
* material suppressed here by diff group b4767-en *
*-->
 </div2>
</div1>

 <div1 id="changes" dg="x1011">
  <head>Changes since version 1.0 <phrase dg="b5150b">(non-normative)</phrase></head>

  <div2 id="done">
   <head>Changes <!--*
* material suppressed here by diff group wd4.ch *
*--> made<phrase dg="wd4.ch"> since version 1.0</phrase></head>

<!--* what follows immediately here is purely historical.
    * The real stuff is at the end of the div2.
    *-->

<!--*
* material suppressed here by diff group ADD.ww1-add-wd4-del *
*-->
<!--*
* material suppressed here by diff group DEL.ww1-add-wd4-del *
*-->

<!--* several paragraphs unintentionally duplicated in WD of August 2006 *-->
<!--*
* material suppressed here by diff group wd4.ch *
*-->

<!--*
* material suppressed here by diff group wd4.ch *
*-->

<!--*
* material suppressed here by diff group wd4.ch *
*-->

<!--*
* material suppressed here by diff group wd4.ch *
*-->

<!--*
* material suppressed here by diff group wd4.ch *
*-->

<!--*
* material suppressed here by diff group wd4.ch *
*-->

<!--*
* material suppressed here by diff group wd4.mv *
*-->


<!--*
* material suppressed here by diff group ADD.b2867-1-add-wd4-del *
*-->
<!--*
* material suppressed here by diff group DEL.b2867-1-add-wd4-del *
*-->

<!--*
* material suppressed here by diff group ADD.b2861cc-1-add-wd4-del *
*-->
<!--*
* material suppressed here by diff group DEL.b2861cc-1-add-wd4-del *
*-->

<!--*
* material suppressed here by diff group wd4.mv *
*-->

<!--*
* material suppressed here by diff group wd4.mv *
*-->

<!--*
* material suppressed here by diff group wd4.mv *
*-->

<!--*
* material suppressed here by diff group wd4.mv *
*-->

<!--*
* material suppressed here by diff group wd4.mv *
*-->

<!--*
* material suppressed here by diff group wd4.mv *
*-->
      
<!--*
* material suppressed here by diff group wd4.mv *
*-->
   
<!--*
* material suppressed here by diff group wd4.mv *
*-->
   
<!--*
* material suppressed here by diff group wd4.mv *
*-->
  
<!--*
* material suppressed here by diff group wd4.mv *
*-->
  
   
<!--*
* material suppressed here by diff group wd4.mv *
*-->

<!--* diff added here to prevent dangling IDREF to Auxiliary_Components
    * when generating versions without ep01, MSM 2005-02-19 *-->
<!--*
* material suppressed here by diff group ADD.ep01-add-wd4-del *
*-->
<!--*
* material suppressed here by diff group DEL.ep01-add-wd4-del *
*-->

<!--*
* material suppressed here by diff group wd4.mv *
*-->

<!--* end of historical interlude *-->

    <note dg="wd4.ch"> 
     <p>The grouping of changes <phrase diff="del" dg="ep33">in the paragraphs</phrase> 
      below is intended to
      make the list easier to scan.  It is an ad hoc grouping for
      convenience to which no great significance should be attached.
      Some changes could have been listed in more than one place; in
      such cases the choice was arbitrary.
     </p>
    </note>

<!--* the lists in this section were changed from ulist to olist
    * as part of ep33.  It's not diff-marked because doing so
    * would be tedious and it doesn't seem to be helpful to anyone.
    *-->

    <div3 id="ch_specs" dg="ep33">
     <head diff="add" dg="ep33">Relationship between XSD and other specifications</head>

    <p dg="wd4.mv"><phrase dg="wd4.ch">Changes to the
      relationship between this and other specifications:</phrase>
     <olist dg="wd4.mv"> 
      <item>
       <p dg="wd4.mv">Support for XML 1.1 has been added.
	It is now implementation defined whether datatypes dependent
	on definitions in XML (<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-1.1" dg="b1838refs"/>, <bibref ref="ref-xml-1.0"/>) and Namespaces in XML 
	(<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="ref-xml-namespaces-1.1" dg="b1838refs"/>, 
	<bibref ref="ref-xml-namespaces-1.0"/>) use the definitions as
	found in version 1.1 or version 1.0 of those specifications.
       </p>
      </item>
     <item dg="b6553">
      <p>To reduce confusion and avert a widespread misunderstanding,
       the normative references to various W3C specifications now state
       explicitly that while the reference describes the particular edition
       of a specification current at the time this specification is
       published, conforming implementations of this specification 
       are not required to ignore later editions of the other
       specification but instead <rfc2119>may</rfc2119> support later editions, thus
       allowing users of this specification to benefit from corrections to other
       specifications on which this one depends.
      </p>
     </item>
     </olist>
    </p>

    </div3>
    <div3 id="ch_versions" dg="ep33">
     <head diff="add" dg="ep33">XSD versions</head>
     
    <p dg="wd4.ch">Schema language versions:<olist>
      <item dg="b2825-1">
	 <p>A conditional inclusion mechanism is defined, roughly
	  analogous to the XSLT 2.0 <att>use-when</att> attribute or
	  to the C preprocessor <code>#ifdef</code> construct. By
	  means of the <att>vc:minVersion</att> and
	  <att>vc:maxVersion</att> attributes, a simple forward-processing
	  mechanism is supplied, so that conforming XSD<!--*
* material suppressed here by diff group b5266 *
*--> 1.1 processors
	  can successfully ignore constructs introduced in 
	  future versions (if any) of XSD<!--*
* material suppressed here by diff group b5266 *
*-->, and so that schema authors
	  can define schemas which use newer constructs when available
	  but can fall back on older constructs when the newer
	  constructs are not available.
	 </p>
	</item>
      <!--*
     <item diff="add" dg="b5905">
      <p>The semantics of attributes <att>vc:typeAvailable</att>
       and <att>vc:typeUnavailable</att> have been revised to make them
       complementary and to ensure that if two constructs in the
       input to conditional inclusion processing are marked
       <code>vc:typeAvailable="A B C"</code> and 
       <code>vc:typeUnavailable="A B C"</code>, respectively, then
       exactly one of the two will be chosen.  This change resolves issue
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5905">5905
       vc:typeAvailable and vc:typeUnavailable</loc>.</p>
     </item>
     <item diff="add" dg="b5904">
      <p>Schema processors are now encouraged to issue warnings for
       unrecognized attributes in the <code>vc</code> namespace. Attributes
       may be added to that namespace in the future, so unrecognized
       attributes are not errors, but until that time, the presence of
       unrecognized attributes is likely to indicate a problem in the input.
       This change resolves issue
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5904">5904
       Unknown attributes in vc namespace</loc>.</p>
     </item>
      *-->
	<item dg="b3948"><p>
	  Identifiers for different versions of XSD<!--*
* material suppressed here by diff group b5266 *
*--> are now defined
	  in section <specref ref="langids"/>.
	 </p></item>
       </olist></p>    

    </div3>
    <div3 id="ch_models" dg="ep33">
     <head diff="add" dg="ep33">Changes to content models</head>

    <p dg="wd4.ch">Content models:
     <olist>
      
      <!--* complex types: content models *-->
      <item>
       <p dg="wd4.mv">The <specref ref="cos-nonambig"/>
	constraint has been relaxed.  While competition between two
	<termref def="key-ep">element particles</termref> is still forbidden, as is competition between
	two <termref def="key-wp">wildcard particles</termref>, competition between an <termref def="key-ep"/> and
	a <termref def="key-wp"/> is no longer forbidden.  In the course of
	making this substantive change, some editorial changes have
	also been made, in order to make the exposition clearer.
	(Readers familiar with version 1.0 of this specification will
	find that the constraint works in almost exactly the same way
	as it did in 1.0, except that content models in which an input
	item matches either a <termref def="key-wp"/> or an <termref def="key-ep"/> are
	now allowed.)
       </p>
      </item>

      <item dg="vm13"><p>Content models may now use the
	<eltref ref="openContent"/> element to specify content
	models with <quote>open content</quote>.  Such content
	models allow elements <!--*
* material suppressed here by diff group b5029 *
*--> 
        not explicitly mentioned in
	the content model to appear in the document instance; it is
	as if wildcards were automatically inserted at appropriate
	points within the content model. By specifying what kind of
	wildcard is implicitly inserted, the schema author can
	adjust the degree of openness and determine what elements
	are accepted by the open content; the schema author can also
	specify that the content model should be open everywhere, or
	only at the end.  A schema-document wide default may be
	set, which causes all content models to be open unless
	otherwise specified.</p>
      </item>
      <item dg="wd4.ch">
       <p>Wildcards may now be defined which allow names in any
	namespace but those in a set of proscribed namespaces.
	(In version 1.0 of this specification, only a single
	namespace, the target namespace of a schema document,
	could be proscribed.)  Also, wildcards can now be written
	which match any element in a set of namespaces but
	which exclude a particular set of qualified names from
	matching the wildcard.
	<phrase dg="wgi-20080613">Finally,
	 the keyword <kw>##definedSibling</kw> can be used
	 to exclude all elements explicitly mentioned in
	 a content model (and all elements substitutable for
	 those elements).</phrase>
       </p>
      </item>	
      <item>
       <p>Wildcards can now be defined which match any element
	(in the specified namespaces) which does <emph>not</emph>
	match an element declaration in the schema (so-called
	<quote>not-in-schema</quote> wildcards).</p>
      </item>
      <item dg="wd4.ch">
      <p>Several of the constraints imposed by version 1.0 of this
       specification on <pt>all</pt>-groups have been relaxed:
       <olist><item>
	 <p>Wildcards are now allowed in <pt>all</pt> groups.</p>
	</item>
	<item>
	 <p>The value of <att>maxOccurs</att> may now be greater than 1 on particles
	  in an <pt>all</pt> group.  The elements which match a particular
	  particle need not be adjacent in the input.</p>
	</item>
	<item dg="all-2506-2">
	 <p><pt>all</pt> groups can now be extended by adding more members to them.</p>
	</item>
       </olist>
      </p></item>
      <item dg="all-2506-2">
       <p>Complex types whose content models are <code>all</code>-groups
	can now be extended; the result is an <code>all</code>-group
	(usually a larger one).
	<!--*
	<loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=2506">2506</loc>
	by allowing the extension of <code>all</code>-groups.
	*-->
       </p>
      </item>
     <item dg="b6685">
      <p>The discussion of checking content-type restriction 
       included in an appendix in earlier drafts of this specification
       has now been removed, as have some references to published algorithms
       for the problem.  Several of the papers referred to are no longer
       publicly accessible on the Web, and the changes made to the
       <specref ref="cos-nonambig"/> have in any case rendered those
       algorithms obsolete.  These changes resolve issue 
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6685">6685
       Appendix I Checking content-type restriction References Not Available</loc>.
      </p>
     </item>
     </olist>
    </p>
    
    </div3>
    <div3 id="ch_xpath" dg="ep33">
     <head diff="add" dg="ep33">Assertions and XPath</head>
    
    <p dg="wd4.ch">Assertions and rules for evaluation of XPaths<olist>
      <!--* assertions *-->
      <item>
       <p dg="wd4.mv">Support for check clauses to
	implement some co-occurrence constraints has been added.  Each
	complex type can carry a list of assertions, which are checked
	when the complex type is used to validate an element
	information item.</p>
      </item>

      <item>
       <p>The facility for assertions defined in the 
	working draft of 31 August 2006 has been revised.
	<olist>
	 <item>
	  <p>The <el>report</el> element described in earlier
	   drafts has been removed.  This involves no loss of functionality:
	   the same effect can be obtained by wrapping the test expression 
	   on an <eltref ref="assert"/> element in a negation.</p>
	 </item>
	 <item><p>The XPath subset defined for assertions has been
	   <!--*
* material suppressed here by diff group wgi-20080613 *
*--><phrase dg="wgi-20080613">
	    eliminated.  (A somewhat smaller subset is now defined
	    for conditional type assignment.)</phrase></p>
	 </item>
	</olist>
       </p>
      </item>
      <item>
       <p>Rules are defined for the evaluation of XPath expressions
	(in assertions, in conditional type assignment, or in
	identity-constraint definitions).  
	<olist>
	 <item>
	  <p>The static and dynamic contexts for XPath evaluation
	   are explicitly specified.
	  </p>
	 </item>
	 <item>
	  <p>Rules are provided for constructing the <bibref ref="bib-xdm"/> data model instance against which the
	   XPath expression<phrase dg="b5029">s</phrase> 
           are to be evaluated.  Different
	   rules apply in different situations:<olist>
	    <item>
	     <p>When assertions on a complex type are evaluated,
	      only the subtree rooted in an element of that type is
	      mapped into the data model instance.  References to
	      ancestor elements or other nodes outside the subtree
	      are not illegal but will not be effective.</p>
	    </item>
	    <item>
	     <p>For conditional type assignment, neither the
	      ancestors nor the children of the element in question
	      are included; the conditions for type assignment are
	      thus effectively restricted to the attributes of the
	      element.</p>
	    </item>
	    <item dg="wgi-20080613">
	     <p>For assertions on simple types, only the value
	      is provided; the dynamic context includes no
	      context item.</p>
	    </item>
	   </olist>
	  </p>
	 </item>
	 <item>
	  <p>Rules for assigning types to the nodes of the
	   data model instance are defined.  Again, the rules
	   differ for the different uses of XPaths:<olist>
	    <item>
	     <p>When assertions are evaluated, all of the elements
	      and attributes descended from the element being
	      validated are typed in the normal way; this has the
	      effect that comparisons among attribute values (for
	      example) are performed in a way consistent with the
	      declarations of the attributes.  The element node
	      itself, however, is not typed (since it has not yet
	      been completely validated).
	     </p>
	    </item>
	    <item>
	     <p>For conditional type assignment, the nodes of the
	      data model instance are untyped.
	     </p>
	    </item>
	   </olist>
	  </p>
	 </item>
	</olist>
       </p>
      </item>

     <item dg="b5023">
      <p>The conceptual overview now included in 
	<specref ref="Constraint_Summary"/> some 
	discussion of the overlap in functionality
	among identity constraints, conditional type assignment,
	and assertions, and identifies some of the factors
	which may be relevant in choosing among them; this
	change resolves issue 
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5023">5023
	Relationship between identity constraints and assertions</loc>.
       </p>
     </item>
     <item dg="b6540">
      <p>The rules for the <quote>available collections</quote> and <quote>default collection</quote>
       properties of the <bibref ref="bib-xpath2"/> 
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-dynamic-context">dynamic context</loc>
       have been simplified; these properties are now
       required to be the empty set instead of being
       <termref def="key-impl-defined">implementation-defined</termref>.  This improves interoperability and
       resolves issue 
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6540">6540
       Available documents in assertions</loc>.</p>
     </item>
     <item dg="b6541">
      <p>The <bibref ref="bib-xpath2"/> 
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-static-context">static context</loc> used
       for the evaluation of assertions has been clarified; it now 
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="#anchor6541">explicitly includes</loc> the functions in the
       <bibref ref="bib-fno"/> <code>fn</code> namespace and 
       constructors for all built-in types.  This resolves issue
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6541">6541
       Assertions and in-scope functions</loc>.</p>
     </item>
     </olist>
    </p>
    
    </div3>
    <div3 id="ch_complex-derivation" dg="ep33">
     <head diff="add" dg="ep33">Derivation of complex types</head>
    
    <p dg="wd4.ch">Derivation of complex types:<olist>
      <!--* complex type derivation:  r, e *-->

      <item dg="wd4.ch">
       <p>The rules for checking validity of complex-type restrictions
	have been simplified by reformulating the constraint in terms
	of local validity:  the set of elements or attributes accepted
	by a restriction as locally valid must be a subset of those accepted by its
	base type.  The rules for attributes have also been changed.</p>
       <p>The complex rules involving matching up particles in the base type
	and particles in the restriction, with their complex case by
	case analysis, have been replaced by a statement of the
	constraint which is shorter and more correct.
       </p>
      </item>    
      <item dg="b3836-1"><p>
	It is now possible to specify a target namespace for
	local elements and attributes which differs from the target
	namespace of the schema document itself, when restricting
	a complex type which has local elements or attributes and
	which itself is in another namespace.  This should
	simplify the reuse of types from other namespaces.
       </p>
      </item>
      <item dg="b2850"><p>
	The rules for complex type restriction now allow identity
	constraints on local elements.  To make this possible,
	identity constraints may now be given names and referred to
	from elsewhere.  Corresponding changes have been made in the
	description of the <compref ref="s"/> component and in the
	rules for <termref def="src-resolve">QName
	 resolution</termref>.</p></item>
      <item dg="b4438-1"><p>
	This draft clarifies the rule requiring that any complex
	type derived by extension could, in principle, be derived in
	three steps from <termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref> (first a restriction step,
	then an extension step, then a restriction step). A
	misleading note about the purpose of this rule has been
	deleted.
       </p></item>
     </olist>
    </p>

    </div3>
    <div3 id="ch_complex" dg="ep33">
     <head diff="add" dg="ep33">Changes to complex type definitions</head>
    
    <p dg="wd4.ch">Complex type definitions (miscellaneous changes):<olist>
      <!--* EDC *-->

       <item dg="rq146-1">
	<p><phrase diff="del" dg="b7787">The constraint 
	  <specref ref="cos-element-consistent"/>
	  has been revised</phrase><phrase diff="add" dg="b7787">Changes
	  have been made to 
	  <specref ref="sec-cdtt"/>,
	  <specref ref="cvc-complex-type"/>, and
	  <specref ref="derivation-ok-restriction"/>
	  </phrase>
	  to require more consistency in type
	  assignment when elements with the same expanded name may
	  match both a local element declaration and a wildcard
	  in the same content model.  
	 <phrase diff="add" dg="b7787">Conceptually, these 
	  changes are related to
	  the constraint expressed in
	  <specref ref="cos-element-consistent"/>.</phrase>
	 XSD<!--*
* material suppressed here by diff group b5266 *
*--> 1.0 allows such content
	  models even if there is a discrepancy between the type
	  assigned to elements by the local element declarations 
	  and by the top-level element declaration which
	  will govern elements which match the wildcard.
	  For compatibility reasons, such content models are still 
	  allowed, but any element instance which matches the wildcard 
	  is required to have a governing type definition compatible with
	  the type assigned by the local element declarations 
	  matched by the element's expanded name.
	</p>
       </item>

      <!--* unsorted *-->

      <item dg="b2197"><p>
	The elements <eltref ref="complexType"/> and <eltref ref="complexContent"/>
	are now <!--*
* material suppressed here by diff group b5029 *
*--><phrase dg="b5029">forbidden</phrase> 
        to have different values for the <att>mixed</att>
	attribute.
       </p></item>

     <item dg="b5940">
      <p>Skip wildcards are now excluded from the 
       <specref ref="cos-element-consistent"/> constraint, and that
       constraint now also takes open content into account; these
       changes resolve issue
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5940">5940
       Element Declarations Consistent</loc>.</p>
     </item>

      <!--* end complex types *-->
     </olist></p>

    </div3>
    <div3 id="ch_id" dg="ep33">
     <head diff="add" dg="ep33">ID, IDREF, and related types</head>

    <p dg="wd4.ch">ID, IDREF, and related types:
     <olist>

      <!--* id/idref et al *-->

      <item>
       <p dg="wd4.mv">Certain constraints involving
	<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ID">ID</xtermref> have been
	extended to include lists of <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ID">ID</xtermref> and unions including
	<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#ID">ID</xtermref>.  See e.g.
	<specref ref="coss-attribute"/>.</p>
      </item>
      <item dg="b4348"><p>
	An element may now have multiple attributes of type
	<code>xs:ID</code>.  Elements have always been able to have
	multiple children of type <code>xs:ID</code>, but XSD<!--*
* material suppressed here by diff group b5266 *
*--> 1.0 forbad
	multiple attributes of this type for compatibility
	with XML DTDs.  (Schemas intended to be translatable into DTD
	form should still avoid the practice.)  This change should make
	it easier for XML vocabularies to support both existing
	ID attributes and <att>xml:ID</att>.
       </p></item>
      <item dg="b2041"><p>
	The validation rules for values of type <code>xs:IDREF</code>,
	<code>xs:ENTITY</code>, or <code>xs:ENTITIES</code>
	are now enforced on default values. 
       </p></item>
      <item dg="b4517">
       <p>Elements and attributes of type <code>xs:ID</code> may now have
	default or fixed values.  XSD<!--*
* material suppressed here by diff group b5266 *
*--> 1.0 had forbidden this, for
	compatibility with XML DTDs.
       </p>
      </item>

      <!--* end id/idref *-->
     </olist>
    </p>
    
    </div3>
    <div3 id="ch_std" dg="ep33">
     <head diff="add" dg="ep33">Simple type definitions</head>

    <p dg="wd4.mv"><phrase dg="wd4.ch">Changes involving
      simple type definitions and
      related constraints:</phrase>
     <olist dg="wd4.mv"> 

      <item>
       <p dg="wd4.mv">A new type definition called
	<code>anyAtomicType</code> has been introduced into the type
	hierarchy between <code>anySimpleType</code> and all the
	<emph>atomic</emph> built-in type definitions.  See <specref ref="builtin-stds"/>.</p>
      </item>
      <item>
	<p dg="wd4.mv">An error in version 1.0 of this
	 specification relating to the construction of union types from
	 other union types has been corrected.  Unions may now appear
	 as members of other unions, and all restrictions of unions are
	 correctly enforced<phrase diff="del" dg="b7796">, even 
	  when <att>xsi:type</att> is used on
	  an element to name a member of the 
	  union.</phrase><phrase diff="add" dg="b7796">;
	  the rule <specref ref="cos-st-derived-ok"/> has been
	  modified to ensure that member types are not 
	  <termref def="key-val-sub-type"/> for facet-restricted unions.
	  As a result, 
	  <att>xsi:type</att> may no longer be used, as in XSD 1.0, 
	  to subvert restrictions of union types.</phrase></p>
      </item>
      <item dg="b2781"><p>
	The requirement that a facet value be a <quote>valid
	 restriction</quote> of another, in the context of simple
	type restriction, has been clarified.
       </p></item>
      <!--*
* material suppressed here by diff group b4034 *
*-->
      <item dg="b2182"><p>
	No union type may be a member of its own transitive membership,
	nor may any type derived from the union.  (XSD<!--*
* material suppressed here by diff group b5266 *
*--> 1.0 forbad
	union datatypes to be members of other unions and thus had
	no need to forbid this explicitly.)
       </p></item>
      <item>
       <p dg="wd4.mv">Since not all datatypes have a
	defined canonical representation for all of their values,
	appeals to the canonical forms of values have been
	eliminated.</p>
      </item>
      <item>
       <p dg="wd4.mv">Changes have been made to ensure that
	the descriptions of the <compref name="Simple Type Definition" ref="std"/> component and of <!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype"><termref def="key-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref></phrase> agree in all
	details with those of <bibref ref="ref-xsp2"/>.</p>
      </item>
      <item dg="wgi-20080613">
       <p>Equality and identity of lists have been clarified.</p>
      </item>

     <item dg="b6204">
      <p>The fact that <termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref> is its own base type 
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="#anchor6204">has been clarified</loc> (addresses issue
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6204">6204
       anyType/ur-Type: inconsistent whether it has a base-type</loc>).</p>
     </item>
     </olist>
    </p>
    </div3>
    <div3 id="ch_elemdecl" dg="ep33">
     <head diff="add" dg="ep33">Element declarations</head>

    <p dg="wd4.ch">Changes to element declarations:
     <olist>
      <item><p>
	A new form of co-occurrence constraint has now been defined,
	by allowing the type assigned to element instances to 
	be conditional on properties of the instance (typically
	attribute values).  The addition of conditional type assignment
	has entailed a number of changes:
	<olist>
	 <item>
	  <p>Introduction of a <compref ref="tt"/> property on element declarations, 
	   to hold a sequence of
	   <compref ref="tac"/>s (condition - selected-type pairs) and a default
	   type definition.</p>
	 </item>
	 <item>
	  <p>Constraints on that table:  all types named in the table (including 
	   the default) must be <termref def="key-val-sub-type"/> for the 
	   <phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/>.</p>
	 </item>
	 <!--*
* material suppressed here by diff group b7787b *
*-->
	 <item>
	  <p>Changes to the XML syntax and XML mapping rules
	   to allow expression of conditional type
	   bindings: the <eltref ref="alternative"/> element is added, 
	   the content model of <eltref ref="element"/> is changed.</p>
	 </item>
	 <item>
	  <p>
	   Validation rules for conditional types:  a validation-time
	   check on restrictions of complex types ensures that the
	   conditionally assigned types of their children are appropriately
	   related to the types assigned by their base type;
	   see
	   <specref ref="cvc-complex-type"/>
	   and
	   <specref ref="vr-cta-substitutable"/>;
	   the definition of <termref def="key-governing-type-elem"/> is also adjusted.
	  </p>
	 </item>
	 <item>
	  <p>
	   Rules for evaluating the conditional typing tests
	   (more specifically, rules for constructing a temporary infoset
	   and then building the XDM instance and evaluating the
	   XPath expressions as defined elsewhere; priority of
	   tests is given by document order / component order).
	  </p>
	 </item>
	 <item>
	  <p>
	   PSVI changes to reflect details of the conditional typing:
	   a {type alternative} property is added, and the discussion of
	   [type fallback] now refers to the <termref def="key-selected-type"/> rather than 
	   to either the
	   <phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/> or to the <termref def="key-governing-type-elem"/> of the
	   element information item
	  </p>
	 </item>
	 <item>
	  <p>Introduction of some terminology for discussing conditional 
	   types
	   (define <termref def="key-selected-type"/>, 
	   <termref def="key-cta-select">conditionally selects</termref>,
	   <termref def="key-val-sub-type-restricts"/>,
	   <termref def="key-cdtat"/>).
	  </p>
	 </item>
	 <item>
	  <p>Rules for checking type restriction in the presence of conditional 
	   types.</p>
	 </item>
	 <item>
	  <p> 
	   Introduction of a special <termref def="key-error"><phrase><code>xs:error</code></phrase></termref> 
           <phrase dg="b5167">type</phrase> for use 
	   in identifying conditionally assigned types which violate
	   restriction rules</p>
	 </item>
	 <item>
	  <p>Miscellaneous supporting editorial changes.</p>
	 </item>
	</olist>
       </p>
      </item>
      <!--*
     <item diff="add" dg="b5907">
      <p>The formal grammar for the XPath expressions used in conditional
       type assignment has been revised to allow both cast expressions
       and constructor functions, and to resolve a formal ambiguity in
       the earlier versions of the grammar; these changes resolve issue
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5907">5907
       Problem with BNF for type alternatives</loc>.</p>
     </item>
      *-->
      <item dg="b2834"><p>
	Element declarations may now specify multiple substitution-group
	heads.
       </p></item>
      <item dg="b4337"><p>
	Abstract elements may now appear in substitution groups.
       </p></item>
     <item dg="b6561">
      <p>The definition of <termref def="key-cdtat"/> now explicitly
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="#anchor6561">excludes</loc>
       <pt>skip</pt> wildcards from consideration and makes clear that
       <termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref> never maps an element information item or an
       <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref> to any <termref def="key-cdtat"/>.  This 
       aligns the treatment of type tables more closely with 
       that of declared types and resolves issue 
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6561">6561
       Type Substitutable in Restriction</loc>.</p>
     </item>
     </olist>
    </p>
    
    </div3>
    <div3 id="ch_attrdecl" dg="ep33">
     <head diff="add" dg="ep33">Attribute declarations</head>
    
    <p dg="wd4.ch">Attributes:
     <olist>
      <!--* attributes *-->
      <item dg="b5003">
       <p>Attribute declarations can now be marked <propref comp="ad" prop="inheritable"/>
	(see <specref ref="Inherited_attributes"/>)
	and the values of inherited attributes are accessible in the XDM
	data model instance constructed for <phrase diff="del" dg="b7242">checking assertions 
	(see <specref ref="cAssertions"/>)
	and for</phrase> conditional type assignment
	(see <specref ref="cTypeAlternative"/>). 
       </p>
       <p>
	Among other consequences, this allows conditional type assignment
	<phrase diff="del" dg="b7242">and assertions</phrase> to be sensitive to the inherited value of
	the <att>xml:lang</att> attribute and thus to the language of
	the element's contents.  This change was introduced to resolve issue
	<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5003">5003
	 Applicability of &lt;alternative&gt; element to xml:lang</loc>,
	raised by the <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/International/core/">W3C Internationalization Core Working Group</loc>.
       </p>
      </item>

      <item dg="b4565"><p>
	The rules for default attribute values now refer to the 
	<termref def="key-evc">effective value constraint</termref>,
	rather than to the <propref ref="vc_a"/>; this resolves a bug
	in the handling of default values for global attribute
	declarations.
       </p></item>
      <item dg="b4363">
       <p>The text now makes clear that it is pointless (although
	not illegal) for schema documents to supply default or fixed
	values for <att>xsi:type</att> and other attributes in the
	namespace <code>http://www.w3.org/2001/XMLSchema-instance</code>, since they
	will not be applied.
       </p>
      </item>
      <item dg="b4314"><p>
	Default attribute groups are now supported.  The
	<eltref ref="schema"/> element can carry a
	<att>defaultAttributes</att> attribute, which identifies a
	named <compref ref="agd"/>; each complex type defined in
	the schema document then automatically includes that
	attribute group, unless this is overridden by the
	<att>defaultAttributesApply</att> attribute on the 
	<eltref ref="complexType"/> element. Default attribute groups
	make it easier to specify attributes which should be accepted
	by every complex type in a schema (e.g. <att>xml:id</att>
	and <att>xml:lang</att>).
       </p></item>
     <item dg="b6163">
	<p>All wildcard unions are now expressible<phrase diff="del" dg="b7818">, 
	  and wildcard union
	  is used to combine multiple attribute wildcards, 
	  rather than wildcard intersection</phrase>; 
	 this change resolves issue
	  <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6163">6163
	   3.10.6.3 Attribute Wildcard Union </loc>.</p>
     </item>

      <!--* end attributes *-->
     </olist></p>

    </div3>
    <div3 id="ch_components" dg="ep33">
     <head diff="add" dg="ep33">Component structure</head>

    <p dg="wd4.mv"><phrase dg="wd4.ch">Changes in the structure
      of schema components:</phrase>
     <olist dg="wd4.mv"> 
      <item>  
       <p dg="wd4.mv">Every component now has an
	{annotations} property whose value is a sequence of annotation
	elements and out-of-band attributes.  See e.g. <specref ref="Complex_Type_Definition_details"/>.</p>
       <p dg="wgi-20080613">Annotations are no longer
	allowed to vary in the part of a content model shared
	by a complex type and its extensions.  (This was never
	possible in components specified using schema documents,
	but was possible in <quote>born-binary</quote> components.)</p>
      </item>
      <item>
       <p dg="wd4.mv">A <propref comp="ctd" prop="context"/>
	property has been defined for the definitions of complex and
	of simple types; this property simplifies testing for the
	identity of anonymous type definitions.  See e.g. <specref ref="Complex_Type_Definition_details"/>.  The {context} property
	replaces the {scope} property found in some earlier drafts of
	this document.</p>
      </item>
      <item>
       <p dg="wd4.mv">The <!--*
* material suppressed here by diff group wd4.ch *
*--> <phrase dg="wd4.ch"><compref ref="s"/> component</phrase> has an
	additional <!--*
* material suppressed here by diff group wd4.ch *
*--><phrase dg="wd4.ch"><propref comp="s" prop="identity-constraint    definitions"/> property</phrase> containing all the identity
	constraints in the corresponding schema.  See <specref ref="Schema_details"/> and <specref ref="declare-schema"/>.</p>
      </item>
      <item>
       <!--* diff added here to prevent dangling IDREF to Auxiliary_Components
       * when generating versions without ep01, MSM 2005-02-19 *-->
       <p dg="wd4.mv">The underlying basis for the
	definition of all the different kinds of components has
	changed to make use of a regular and formal tabulation of
	their properties.  This has been achieved by introducing
	<emph>property records</emph> wherever version 1.0 had complex
	property values.  For example instead of describing the
	{scope} property as having "either <pt>global</pt> or a
	complex type definition" for its value, a <compref ref="sc_e"/> property record is called for, which in turn has its
	own simple properties and values.  See e.g. <specref ref="Element_Declaration_details"/>.</p>
      </item>
     </olist>
    </p>
     
    </div3>
    <div3 id="ch_sva" dg="ep33">
     <head diff="add" dg="ep33">The process of validation</head>

     <p dg="wd4.ch">The process of validation:
       <olist>
	<!--* validation process *-->

	<item dg="vm3-1">
	 <p>
	  When an <code>xsi:type</code> attribute appears on an element,
	  and has a QName as its value, but the QName does not resolve to a known
	  type definition, processors are now required
	  to <quote>fall back</quote> to lax validation,
	  using the <phrase dg="cta-tddtd">declared </phrase><propref prop="type definition" comp="ed"/>
	  of the <termref def="key-governing-ed"/> as the <termref def="key-governing-type-elem"/>.</p>
	</item>
	<item dg="vm3a">
	 <p>Element information items which match no particle in a content
	  model are now to be validated using their <!--*
* material suppressed here by diff group b4690 *
*--><termref def="key-ldtype" dg="b4690"/>.
	  Earlier drafts did not specify what happened in such cases.</p>
	</item>
	<item dg="b2225"><p>
	  <termref def="key-lva">Lax assessment</termref> is now required
	  when an element information item to be validated has neither
	  a <termref def="key-governing-ed"/> nor a <termref def="key-governing-type-elem"/>; also, lax assessment
	  now requires that the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> and <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref> of the element
	  be assessed as well.  In XSD<!--*
* material suppressed here by diff group b5266 *
*--> 1.0 and in earlier drafts, lax
	  assessment was optional and did not require the 
	  <!--*
* material suppressed here by diff group b5167 *
*--><phrase dg="b5167">recursive assessment</phrase> of
	  <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> <!--*
* material suppressed here by diff group b5167 *
*--><phrase dg="b5167">and</phrase> 
          <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref>.
	 </p></item>
	<item dg="b4299">
	 <p>The text now specifies that if an element has an 
	  <att>xsi:type</att> attribute, the <termref def="key-vv">actual value</termref> of that attribute
	  must <termref def="src-resolve">resolve</termref> to a type definition, and that type definition
	  must be the <termref def="key-governing-type-elem"/> of the element.  (This affects
	  only elements without a <termref def="key-governing-ed"/>; other cases were
	  already handled.)
	 </p>
	</item>
	<item dg="b4269"><p>
	  The terminology of assessment has been changed to avoid the
	  suggestion that an element information item can be 
	  <termref def="key-sva"/> without being 
	  <termref def="key-va">assessed</termref>.
	 </p></item>
       <item diff="add" dg="b7913">
	<p>An anomaly in the definition of <termref def="key-governing-ed"/> has been corrected,
	 to ensure that elements matching strict or lax wildcards have
	 the appropriate global element declaration, if it exists, as their 
	 <termref def="key-governing-ed"/>.  (Resolves issue 
	 <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7913">7913
	  Strange result from definition of governing element declaration</loc>.)
	</p>
       </item>
       <item diff="add" dg="b5164">
	<p>The usage of the terms <quote><termref def="key-vn">validation</termref></quote> and 
	 <quote><termref def="key-va"/></quote> has been clarified, and definitions
	 of various forms of document validity have been added
	 for the convenience of users of this specification;
	 see <specref ref="sec-schema-validity-and-docs"/>.
	 (Resolves issues
	 <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5164">5164
	  validation vs assessment</loc> and 
	 <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6015">6015
	  [schema11] valid (and its derivations) vs assessment as used in text</loc>.)
	</p>
       </item>

	<!--* end validation process *-->
       </olist>
       </p>

    </div3>
    <div3 id="ch_psvi" dg="ep33">
     <head diff="add" dg="ep33"><termref def="key-psvi">post-schema-validation infoset</termref></head>

    <p dg="wd4.ch">Changes in the
      description of the <termref def="key-psvi">post-schema-validation infoset</termref>:
     <olist>

     <item dg="wd4.ch"> 
      <p>The presentation of the <termref def="key-psvi">post-schema-validation infoset</termref> has been simplified by removing
       the suggestion that the <termref def="key-psvi">post-schema-validation infoset</termref> varies from processor to processor.
       Instead, the exposition now makes clearer that the body of information 
       available in principle after schema-validity assessment is consistent 
       across all 
       processors; processors may make different subsets of the <termref def="key-psvi">post-schema-validation infoset</termref>
       accessible to downstream applications, but when they do so 
       the variation reflects the implementors' decisions
       about what information to expose, not variation in the information
       in the <termref def="key-psvi">post-schema-validation infoset</termref>.</p>
     </item>
     <item dg="wd4.ch"> 
      <p>Terms have been defined to describe different subsets of the
       <termref def="key-psvi">post-schema-validation infoset</termref> which may be exposed by processors.</p>
     </item>
      <item dg="b2505">
       <p>Provision is made for exposing the 
	<termref def="key-vv">actual values</termref> of elements and 
	attributes in the <termref def="key-psvi">post-schema-validation infoset</termref>, in the
	<propref prop="schema actual value" role="generic"/> property.
       </p>
      </item>
      <item dg="b3054">
       <p>The <propref ref="e-declaration"/> property and various
	other properties in the <termref def="key-psvi">post-schema-validation infoset</termref> are now described as being
	present in the <termref def="key-psvi">post-schema-validation infoset</termref> whenever a <termref def="key-governing"/> declaration
	and/or <termref def="key-governing"/> type definition is known for the item,
	instead of only when the item is valid.</p>
      </item>
      <item dg="b3837"><p>
	When the <termref def="key-governing"/> type definition of an attribute or element 
	information item is a list type whose item type is a union, 
	the <termref def="key-psvi">post-schema-validation infoset</termref> now includes the <termref def="a-key-amt"/> for 
	each item in the list.
       </p></item>
      <item dg="b2105c"><p>
	When default values are supplied for attributes with
	qualified names, <termref def="term-ns-fixup"/> is performed to ensure that the
	<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">in-scope namespaces</xpropref> property of the attribute's host element has an
          appropriate binding for the namespace name.  It is <termref def="key-impl-defined">implementation-defined</termref> 
          whether <termref def="term-ns-fixup"/> is also performed on descendants of that element 
          so as to retain consistency of the infoset. <termref def="term-ns-fixup">Namespace fixup</termref> may also be 
          helpful if the defaulted value is of type 
          <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#QName">QName</xtermref> or 
	  <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html#NOTATION">NOTATION</xtermref>; it is 
	  <termref def="key-impl-dep">implementation-dependent</termref> whether fixup is performed for such values.
	 </p>
	</item> 
     <item dg="b6144">
      <p>Annotations given in the XML form of identity-constraint declarations 
       with <att>ref</att> attributes are now retained in the <termref def="key-psvi">post-schema-validation infoset</termref>
       form of the containing element declaration.  This change resolves
       issue
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6144">6144
       annotation on IDC with a 'ref' attribute is lost</loc>.</p>
     </item>

	<!--* end psvi *-->
       </olist></p>
    
    </div3>
    <div3 id="ch_conformance" dg="ep33">
     <head diff="add" dg="ep33">Conformance</head>

     <p dg="wd4.ch">Changes to the
      description of conformance:
      <olist>
       <item dg="wd4.ch"> 
	<p diff="del" dg="b7695">The 
	 different levels of conformance have been given shorter
	 and more convenient names.</p>
	
	<p diff="add" dg="b7695">The set of conformance classes 
	 has been revised and clarified.  Instead of 
	 <quote>minimally conforming</quote>,
	 <quote>schema-document aware</quote>, and
	 <quote>Web-aware</quote> processors, this specification
	 now defines (in section 
	 <specref ref="concepts-conformance"/>) conformance classes for 
	 <termref def="key-gpval">general-purpose validators</termref>,
	 <termref def="key-gp-assessor">general-purpose schema-validity assessors</termref>,
	 <termref def="key-spval">special-purpose validators</termref>, and
	 <termref def="key-othertools">other special-purpose tools</termref>,
	 together with terminology which may be useful in describing
	 particular processors.
	 This change resolves issue
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7695">7695
	Conformance</loc>.      
     </p>
      </item>
      <item dg="wd4.ch"> 
       <p>A checklist has been included listing ways in which conforming 
	processors may vary from each other, and terminology has been
	provided for some of the more important properties of conforming
	processors, in an attempt to make it easier for implementors to
	describe concisely which options their processors exercise, and
	easier for users to describe what kinds of processor they 
	require.</p>
      </item>
      <!--*
* material suppressed here by diff group wgi-20080613 *
*-->
      <item dg="wgi-20080613">
       <p>The definition of <rfc2119>must</rfc2119> and <termref def="dt-error">error</termref> have been revised to
	specify that conforming processors <rfc2119>must</rfc2119> detect and report
	error in the schema or schema documents.  The quality
	and detail of the error messages are not constrained.</p>
      </item>
      <item dg="wgi-20080613">
       <p>Implementations are now allowed to support primitive datatypes
	and facets beyond those defined in <bibref ref="ref-xsp2"/>.
       </p>
      </item>
      <item dg="wgi-20080613">
       <p>The validity requirements for schema documents are stated more
	fully and correctly.</p>
      </item>
     </olist>
    </p>
    
    </div3>
    <div3 id="ch_schemacomp" dg="ep33">
     <head diff="add" dg="ep33">Schema composition</head>
     
     <p dg="wd4.ch">Schema assembly and composition:
       <olist>
	<!--* composition / marshaling *-->
      <item dg="wgi-20080613">
       <p>The <eltref ref="xs:redefine"/> construct is <termref def="key-deprecated">deprecated</termref>.</p>
      </item>
      <item dg="wgi-20080613">
       <p>An <eltref ref="xs:override"/> construct has been defined;
	in some ways it resembles <eltref ref="xs:redefine"/>,
	but imposes no constraints on the new definitions provided
	for components whose definitions are being overridden.</p>
      </item>

      <!--*
     <item>
      <p>The <eltref ref="override"/> facility has been revised to make the
       new declarations and definitions in the <eltref ref="override"/> element
       override matching declarations and definitions not only in the schema document
       directly pointed to by the <att>schemaLocation</att> attribute, but also 
       in other schema documents referred to using <eltref ref="include"/>
       or <eltref ref="override"/> in that schema document.</p>
      <p>This allows the use of <eltref ref="override"/> even in cases
       where the declarations and definitions to be overridden are 
       spread widely across a tightly interconnected set of schema
       documents, and thus makes it more widely useful.
      </p>
     </item>
      *-->

     <item>
      <p>The discussion of <eltref ref="include"/> and <eltref ref="override"/>
       has been revised to eliminate an ambiguity in earlier versions of
       this spec regarding the meaning of cyclic dependencies formed by
       use of <eltref ref="include"/> and <eltref ref="override"/>:  such
       cyclic dependencies are now clearly allowed and have a well defined
       meaning.
      </p>
     </item>

      <item dg="b4437"><p>
	When an <att>xsi:schemaLocation</att> attribute provides
	information about a schema document location for a
	particular namespace, it is no longer an error for it to be
	encountered after the first occurrence of an element or
	attribute information item in that namespace.
	Note, however, that if processing such an <att>xsi:schemaLocation</att>
	attribute causes new components to be added to the schema, then 
	the new components cannot change the assessment outcome of any
	information items already seen before the element bearing 
	the <att>xsi:schemaLocation</att> attribute.
       </p></item>
	<item dg="b1890"><p>
	  No <eltref ref="import"/> is needed in a schema document
	  in order to refer to components in namespaces
	  <code>http://www.w3.org/2001/XMLSchema</code> or <code>http://www.w3.org/2001/XMLSchema-instance</code>.
	  In XSD<!--*
* material suppressed here by diff group b5266 *
*--> 1.0, the examples showed no such imports, but
	  there was no rule making it legal to omit the <eltref ref="import"/>.
	 </p></item>
	<item dg="b2067-2">
	 <p>The handling of <quote>chameleon</quote> inclusion and redefinition
	  in schema documents has been simplified.  The new target
	  namespace affects any component or property which would have
	  the target namespace if the schema document specified one.
	  This change makes it easier to write assertions in schema
	  documents without a namespace which are intended to be
	  included by schema documents with varying target namespaces.
	 </p>
	</item>
      <item dg="b3817">
       <p>Section <specref ref="vsc_failure"/> has now been added,
	defining the terms <term>error</term> and <term>continue</term>
	for use in specifying what a processor does or should do 
	when it seeks components for a given namespace in a given location 
	but fails to find them there.</p>
      </item>
      <item dg="b5476">
       <p>Schema processors are now explicitly recommended to provide
	a user option to control whether the processor attempts to
	dereference schema locations indicated in <att>schemaLocation</att>
	attributes in the instance document being validated; this resolves
	issue
	<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5476">5476
	 xsi:schemaLocation should be a hint, should be MAY not SHOULD</loc>.</p>
      </item>
     <item dg="b6655">
      <p>The discussion of <att>schemaLocation</att> information in
       <specref ref="schema-loc"/> has been revised to try to make clearer
       the motivation for recommending user control over whether
       schema locations specified in the document instance should
       or should not be dereferenced.  The new text describes some
       circumstances in which such schema locations typically should be
       dereferenced and some in which they should not, and attempts to
       set useful expectations for users and for implementors.
       These changes are intended to resolve issue 
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6655">6655</loc>,
       raised by the W3C Web Accessibility Initiative's 
       <!--*
       <loc href="http://www.w3.org/WAI/PF/">Protocols and
       Formats Working Group</loc>.
       *-->
       Protocols and
       Formats Working Group.
      </p>
     </item>

     <item dg="b5779">
      <p>The discussion of schema import in 
       <specref ref="composition-importLicenseReferences"/> now states more
       clearly that references to components in external
       namespaces are an error if the namespace is not imported;
       this change addresses issue 
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5779">5779
       QName resolution and xs:import</loc>.
      </p>	
     </item>

	<!--* end composition / marshaling *-->
       </olist></p>

    </div3>
    <div3 id="ch_misc_sub" dg="ep33">
     <head diff="add" dg="ep33">Other substantive changes</head>

    <p dg="wd4.ch">Miscellaneous substantive changes:
     <olist>
     <item dg="wd4.ch">
      <p>The discussion of schema-validity assessment and the invocation
       of conforming processors has been revised; additional invocation
       patterns have been identified, and names have been given to
       the different methods of invoking a processor.</p>
     </item>
     <item dg="wd4.ch">
      <p>When an element cannot be strictly validated because no
       element declaration or type definition is available 
       for it, fallback to lax validation (validating the element
       against the built-in type <!--*
* material suppressed here by diff group rq17 *
*--><phrase dg="rq17"><termref def="key-anyType"><phrase><code>xs:anyType</code></phrase></termref></phrase>) is now required;
       in earlier drafts of this document, fallback to lax validation
       was optional.</p>
     </item>
      <item dg="wgi-20080613">
       <p>The XML Representation Constraints no longer refer to the
	component level; this makes it possible to test a schema
	document in isolation to determine whether it conforms or
	fails to conform to these rules.</p>
      </item>

     <item dg="b6235">
      <p>The constraints on the XML representation of schemas have been
       reformulated to allow them to be checked on schema documents in
       isolation, rather than requiring knowledge of the rest of the schema
       into which they will be embedded.  The consequence is that
       some errors are caught not in the XML representation constraints
       but by having the XML mapping rules generate faulty components
       so that the error can be detected at the component level.
       These changes resolve issue
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6235">6235
       Restriction from xs:anySimpleType</loc>.</p>
     </item>

      <!--* this doesn't really go here, it doesn't really go anywhere.
          * But I don't want to delete it, in case we want it again.
          *-->
      <!--*
     <item diff="add" dg="b5293far1">
      <p>Three priority feedback requests have been added in this draft
       (and those in previous drafts have for the most part been retained).
       They concern: 
       <olist>
	<item>
	 <p><loc href="#anchor5293far1">content-model subsumption involving
	   all-groups</loc> (see issue
	  <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5293">5293
	   Subsumption</loc>)</p>
	</item>
	<item diff="add" dg="b5293far2">
	 <p><loc href="#anchor5293far2">detection of certain schema errors
	   at instance-validation time</loc> (see issue
	  <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5293">5293
	   Subsumption</loc>).</p>
	</item>
	<item diff="add" dg="b6382">
	 <p><loc href="#anchor6382">the interaction of <phrase><att>block</att></phrase>
	   and substitution groups</loc> (see issue
	  <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6382">6382
	   Substitution group and "block"</loc>).</p>
	</item>
       </olist>
      </p>
     </item>
      *-->

     <item dg="b5930">
      <p>The <eltref ref="schema"/> element is now declared with open
       content in the schema for schema documents.  This change
       addressess issue
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5930">5930
       defaultOpenContent in the S4SD</loc>.</p>
     </item>
     <item dg="b6120">
      <p>The setting <code>blockDefault="#all"</code> has been removed
       from the schema for schema documents; this change resolves issue
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6120">6120
       Reconsider blockDefault=#all</loc>.</p>
     </item>

     <item dg="b6445">
      <p>Namespace fixup is now explicitly required in some places where
       it is needed but was not mentioned before; these changes resolve
       issue 
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6445">6445
       Namespace fixup and default namespace</loc> and issue
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6465">6465
       Namespace fixup and inherited attributes</loc>.</p>
     </item>
     </olist>
    </p>

    </div3>
    <div3 id="ch_clar" dg="ep33">
     <head diff="add" dg="ep33">Clarifications and editorial changes</head>

    <p dg="wd4.mv"><phrase dg="wd4.ch">Clarifications and other
      editorial changes:</phrase>
     <olist dg="wd4.mv"> 
      <item dg="wgi-20080613">
       <p>Each named constraint is now given in a separate section, to
	simplify reference to them.</p>
      </item> 
      <item dg="wgi-20080613">
       <p>The XML mapping rules have been reorganized to make them 
	more perspicuous.</p>
      </item>
      <item>
       <p dg="wd4.mv">The <!--*
* material suppressed here by diff group wd4.ch *
*--><phrase dg="wd4.ch">keywords defined by <bibref ref="rfc-2119"/> to
	 designate different levels of requirement</phrase> have been
	<!--*
* material suppressed here by diff group wd4.ch *
*-->
	<phrase dg="wd4.ch">marked up to distinguish more
	 consistently between cases where</phrase> their normative
	<!--*
* material suppressed here by diff group wd4.ch *
*--> meaning is
	intended<!--*
* material suppressed here by diff group wd4.ch *
*--><phrase dg="wd4.ch"> (e.g.
	 <quote><rfc2119>must</rfc2119></quote>) and cases where the words are used in
	 its everyday sense without conformance implications (e.g.
	 <quote>must</quote>)</phrase>.  See <specref ref="intro-terminology"/>.</p>
      </item>
      <item>
       <p dg="wd4.mv">A note has been added, warning that
	the <local>replace</local> and <local>collapse</local> values
	for whitespace handling are not a reliable means of
	neutralizing the effects of word-wrapping and pretty-printing
	of natural-language data and should not be used for that
	purpose.</p>
      </item>
      <item>
       <p dg="wd4.mv">Several minor corrections and
	clarifications have been made.  The usage of some technical
	terminology has been clarified, normalized, and aligned where
	appropriate with the usage in
	<bibref ref="ref-xsp2"/>.  Conditionals using
	<quote>if</quote> have been rephrased to use <quote>if and
	 only if</quote> where appropriate.</p>
      </item>
      
      <item dg="b4399">
       <p>The title of the specification has been changed, and the language
	defined here is referred to as XSD<!--*
* material suppressed here by diff group b5266 *
*-->, not using the name
	<quote>XML Schema</quote>.  This may help reduce confusion between
	the language defined here and the broader class of XML schema
	languages in general.
       </p>
      </item>
      
      <item dg="may">
       <p>Conformance-related language has been reviewed
	to avoid confusion between the conformance-related usage of
	the verbs <rfc2119>may</rfc2119>, <rfc2119>must</rfc2119>, and <rfc2119>should</rfc2119>, and other usages.</p>
      </item>
      <item dg="b3725">
       <p>Various new terms have been defined, and some existing terms have
	been redefined, to reduce confusion and improve legibility.  In
	some cases, existing terms which were felt insufficiently
	informative have been replaced by new terms which may be more
	useful.
       </p>
      </item>
      
      <item dg="f2f0701b"><p>Following the example of XQuery
	1.0 and XSLT 2.0, the terms <quote><termref def="key-impl-defined">implementation-defined</termref></quote> and
	<quote><termref def="key-impl-dep">implementation-dependent</termref></quote> have been defined and the two
	concepts distinguished. The appendix contains lists both of
	<termref def="key-impl-defined">implementation-defined</termref> and of <termref def="key-impl-dep">implementation-dependent</termref> features.
       </p>
      </item>
      
      <!--* end editorial *-->


     <item dg="b4690">
      <p>The term <quote>context-determined-declaration</quote> has been
       replaced with the term <termref def="key-ldtype"/>; this resolves
       issue 
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=4690">4690
       Editorial: 'context-determined declarations' needs more work</loc>.</p>
     </item>
     <item dg="b4316">
      <p>The namespace prefixes used to refer to well known namespaces
       have been changed and are now more consistent; this resolves issue
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=4316">4316
       Make sure namespace prefixes are used appropriately throughout
       structures</loc>.</p>
     </item>
     <item dg="b5140">
      <p>Numerous small changes were made in the interests of clarity, 
       completeness, consistency, and precision, and to correct
       typographical errors.  These changes
       resolve a number of issues, including:
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5140">5140
       small editorial changes section 3.3</loc>;
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5148">5148
       inconsistent target ns description</loc>;
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5639">5639
       when is value V a valid restriction of value Y?</loc>;
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5800">5800
       Possibly revise list of required infoset properties</loc>;
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5916">5916
       Obsolete editorial note</loc>;
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5917">5917
        Typo in 3.1.1</loc>;
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5934">5934
       Typo concerning &lt;simpleContent mixed="true"&gt;</loc>;
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6011">6011
       [schema11] base URI comments</loc>;
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6156">6156
       Typo in 3.4.2</loc>;
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6162">6162
       &lt;anyAttribute&gt; allows ##definedSibling</loc>;
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6165">6165
       Constraints on XML representation of anyAttribute</loc>;
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6166">6166
       Schema Component Model for Wildcards</loc>;
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6167">6167
       Attribute Wildcard Intersection</loc>;
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6170">6170
       Wildcards and defaultAttributes</loc>;
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6175">6175
       Wildcard overlap</loc>;
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6227">6227
       Type Derivation OK (simple)</loc>; and
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6233">6233
       Wrong pointer for [nil] PSVI property</loc>.
      </p>
     </item>

     <item dg="b5918">
      <p><!--* Definitions of <termref def="key-global"/> components
       and <termref def="key-toplevel"/> definition items have
       been added and discussions involving them have been
       revised and clarified.  *--><!-- no, they haven't *-->
       Discussions of global components now 
       <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="#anchor5918">take &lt;redefine&gt; into account</loc> (addresses
       issue <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5918">5918
       Top level declarations</loc>).</p>
     </item>
	
     </olist>
    </p>
    
    </div3>
    
   </div2>


   <div2 id="issues">
    <head><!--*
* material suppressed here by diff group wd4.ch *
*--><phrase dg="wd4.ch">Issues not resolved</phrase></head>
    <p><!--*
* material suppressed here by diff group wd4.ch *
*--><phrase dg="wd4.ch"><!--*
* material suppressed here by diff group b5029 *
*--><phrase dg="b5029">It</phrase> may be useful
      to mention <!--*
* material suppressed here by diff group b5029 *
*--><phrase dg="b5029">some</phrase> points 
      <!--*
* material suppressed here by diff group b5167 *
*--><phrase dg="b5167">where</phrase> possible changes to the
      specification have been discussed, but on which no changes have,
      in the end, been made.  In some cases, this resulted from the
      XML Schema Working Group's determination that no change was
      desirable; in other cases, there was no consensus on the
      desirability of change, or no consensus on what change should
      be made.
     </phrase></p>
    <!--* <issue role="tabulate" id="hack"><p/></issue> *-->
    <olist dg="wd4.ch">
     <item>
      <p>As noted above, some restrictions on <pt>all</pt> groups have
       been relaxed; <pt>all</pt> groups, however, must still be
       top-level groups; they are not allowed to appear within
       sequences or choice groups.</p>
     </item>
     <item>
      <p>The namespace-related properties of the basic infoset are
       <termref def="term-ns-fixup">fixed up</termref> when 
       attributes with qualified names are assigned default values.</p>
      <p>
       Other kinds of infoset fixup, however, are still not performed.
       Attributes of type <code>ID</code>, <code>IDREF</code>, 
       <code>IDREFS</code>, and <code>NOTATION</code> do not have
       the same effect on the base infoset as they do if declared
       in a DTD.  (An infoset-to-infoset transformation can be
       used to migrate the appropriate information into the base
       infoset.)</p>
     </item>
     <item>
      <p>Some existing implementations (and specifications) assume that
       elements of type <code>xs:ID</code> uniquely identify themselves,
       instead of uniquely identifying their parent.  This version of
       this specification reaffirms the existing rule, which is that
       elements and attributes of type <code>xs:ID</code> uniquely
       identify the parent element of the ID attribute or element.
      </p>
     </item>
     <item>
      <p>The identity of components is still underspecified (although
       a number of points have been clarified, e.g. by the specification
       of the {scope} property), with the 
       result that some schemas can be interpreted either as conformant
       or as non-conformant, depending on the interpretation of 
       the specification's appeals to component identity.</p>
     </item>
     <item>
      <p>The constraint <specref ref="cos-element-consistent"/> 
       has been recast, but not at the higher level of abstraction
       originally required and expected.</p>
     </item>
     <item>
      <p>The account of schema composition given here has not
       eliminated all the uncertainties present in XSD<!--*
* material suppressed here by diff group b5266 *
*--> 1.0;
       edge cases remain which different conformant implementations
       will treat differently.</p>
     </item>
     <item>
      <p>A systematic tabulation of error conditions and definition of
       a new system of error codes was originally foreseen for XSD<!--*
* material suppressed here by diff group b5266 *
*-->
       1.1, but has not been completed for inclusion here. <phrase dg="b5167">No further work in this area is
	currently anticipated.</phrase>
      </p>
     </item>
    </olist>
   </div2>
  </div1>

  <!--*
* material suppressed here by diff group rq17-x *
*-->

 <!--*
* material suppressed here by diff group b6685b *
*-->

  <div1 id="component-diagram">
   <head>Schema Components Diagram (non-normative)</head>
   <!--*
* material suppressed here by diff group b2753 *
*-->
   <!--*
* material suppressed here by diff group b2753 *
*-->

   <p dg="b2753">The following UML class diagram shows the
    interrelations of element declarations, simple and complex type
    definitions, and related component classes.  In the interests
    of simplicity, a few liberties have been taken with the notation. 
    For example, direct links are shown from Element Declaration to 
    Simple Type Definition and Complex Type Definition, rather than
    a single link to a generic Type Definition class specialized
    by simple and complex types.  Similarly, a particle
    in a content model has exactly one term, which is either
    an element declaration, a wildcard, or a model group, but
    this diagram does not show any class created as a generalization 
    of these three.
    <!--* also, base type definition is just plain wrong here *-->
   </p>
   <graphic xmlns:xlink="http://www.w3.org/1999/xlink" source="components-elemcentric.png" alt="Diagram of schema components" map="elemcentric-map" dg="b2753"/>
   <imagemap source="components-elemcentric-map.html" id="elemcentric-map" dg="b2753"/>

   <p dg="b2753">The following UML class diagram shows the
    relation of various  component classes to the 
    <compref ref="s"/> component.
   </p>
   <graphic xmlns:xlink="http://www.w3.org/1999/xlink" source="components-schemacentric.png" alt="Diagram of schema components" map="schemacentric-map" dg="b2753"/>
   <imagemap source="components-schemacentric-map.html" id="schemacentric-map" dg="b2753"/>
  </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.</edtext>
</ednote>
<!--* do not delete the preceding ednote, unless you wish to suppress
    * the generation of the glossary *-->

</div1>

 <div1 id="nonnormative-schemaDTD">
<head>DTD for Schemas (non-normative)</head>
<p>The DTD for schema documents is given below.  Note there is <emph>no</emph>
implication here that <code>schema</code> <rfc2119>must</rfc2119> be the root element of a
document.</p>

<p diff="add" dg="b6698">
Independent copies of this material are
available in an undated (mutable) version at
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href=""/>
and in a dated (immutable) version at
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href=""/>
— the mutable version will be updated with future revisions of 
this specification, and the immutable one will not.
<!--*
* material suppressed here by diff group wg-internal *
*-->
</p>

<p>Although this DTD is non-normative, any XML document which is
     not valid per this DTD, given redefinitions in its internal subset of the
     'p' and 's' parameter entities below appropriate to its namespace
     declaration of the <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> namespace, is almost certainly not
     a valid schema document, with the exception of documents with multiple namespace
     prefixes for the <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> namespace itself.  Accordingly
authoring <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399"><termref def="key-schemaDoc">schema documents</termref></phrase> using this DTD and DTD-based authoring tools, and
specifying it as the DOCTYPE of documents intended to be <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399"><termref def="key-schemaDoc">schema documents</termref></phrase> and validating them with a validating XML parser, are
sensible development strategies which users are encouraged to adopt
until <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase>-based authoring tools and validators are more widely available.</p>
<!--*
* material suppressed here by diff group lp *
*-->
<codeScrap dg="lp" id="dtdfsd" file="structures.diff-wd.dtd">
<head>DTD for Schema Documents</head>
<codeBlock>&lt;!-- DTD for <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XML Schema Definition Language Part 1: Structures</phrase>
     Public Identifier: "-//W3C//DTD XMLSCHEMA 200102//EN"
     Official Location: http://www.w3.org/2001/XMLSchema.dtd --&gt;
&lt;!-- Id: structures.dtd,v 1.1 2003/08/28 13:30:52 ht Exp  --&gt;
&lt;!-- With the exception of cases with multiple namespace
     prefixes for the <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> namespace, any XML document which is
     not valid per this DTD given redefinitions in its internal subset of the
     'p' and 's' parameter entities below appropriate to its namespace
     declaration of the <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> namespace is almost certainly not
     a valid schema<phrase dg="b5435"> document</phrase>. --&gt;<phrase diff="add" dg="b6698">

&lt;!-- See below (at the bottom of this document) for information about
      the revision and namespace-versioning policy governing this DTD. --&gt;</phrase>
&lt;!-- The simpleType element and its constituent parts
     are defined in XML Schema<!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399"> Definition Language</phrase> Part 2: Datatypes --&gt;
&lt;!ENTITY % xs-datatypes PUBLIC 'datatypes' 'datatypes.dtd' &gt;

&lt;!ENTITY % p 'xs:'&gt; &lt;!-- can be overridden in the internal subset of a
                         schema document to establish a different
                         namespace prefix --&gt;
&lt;!ENTITY % s ':xs'&gt; &lt;!-- if %p is defined (e.g. as foo:) then you must
                         also define %s as the suffix for the appropriate
                         namespace declaration (e.g. :foo) --&gt;
&lt;!ENTITY % nds 'xmlns%s;'&gt;

&lt;!-- Define all the element names, with optional prefix --&gt;
&lt;!ENTITY % schema "%p;schema"&gt;
<phrase dg="vm13">&lt;!ENTITY % defaultOpenContent "%p;defaultOpenContent"&gt;</phrase>
&lt;!ENTITY % complexType "%p;complexType"&gt;
&lt;!ENTITY % complexContent "%p;complexContent"&gt;
<phrase dg="vm13">&lt;!ENTITY % openContent "%p;openContent"&gt;</phrase>
&lt;!ENTITY % simpleContent "%p;simpleContent"&gt;
&lt;!ENTITY % extension "%p;extension"&gt;
&lt;!ENTITY % element "%p;element"&gt;<phrase dg="cta">
&lt;!ENTITY % alternative "%p;alternative"&gt;</phrase>
&lt;!ENTITY % unique "%p;unique"&gt;
&lt;!ENTITY % key "%p;key"&gt;
&lt;!ENTITY % keyref "%p;keyref"&gt;
&lt;!ENTITY % selector "%p;selector"&gt;
&lt;!ENTITY % field "%p;field"&gt;
&lt;!ENTITY % group "%p;group"&gt;
&lt;!ENTITY % all "%p;all"&gt;
&lt;!ENTITY % choice "%p;choice"&gt;
&lt;!ENTITY % sequence "%p;sequence"&gt;
&lt;!ENTITY % any "%p;any"&gt;
&lt;!ENTITY % anyAttribute "%p;anyAttribute"&gt;
&lt;!ENTITY % attribute "%p;attribute"&gt;
&lt;!ENTITY % attributeGroup "%p;attributeGroup"&gt;
&lt;!ENTITY % include "%p;include"&gt;
&lt;!ENTITY % import "%p;import"&gt;
&lt;!ENTITY % redefine "%p;redefine"&gt;<phrase dg="b4767">
&lt;!ENTITY % override "%p;override"&gt;</phrase>
&lt;!ENTITY % notation "%p;notation"&gt;
<phrase dg="b2861cc-1">&lt;!ENTITY % assert   "%p;assert"&gt;
<!--*
* material suppressed here by diff group b2861cc-3 *
*--></phrase>

&lt;!-- annotation elements --&gt;
&lt;!ENTITY % annotation "%p;annotation"&gt;
&lt;!ENTITY % appinfo "%p;appinfo"&gt;
&lt;!ENTITY % documentation "%p;documentation"&gt;

&lt;!-- Customi<phrase dg="ep99">s</phrase><!--*
* material suppressed here by diff group ep99 *
*-->ation entities for the ATTLIST of each element type.
     Define one of these if your schema takes advantage of the
     anyAttribute='##other' in the<phrase dg="b2067-2e">
    </phrase> schema for schema<!--*
* material suppressed here by diff group b2067-2e *
*--><phrase dg="b2067-2e"> documents</phrase> --&gt;

&lt;!ENTITY % schemaAttrs ''&gt;
<phrase dg="vm13">&lt;!ENTITY % defaultOpenContentAttrs ''&gt;</phrase>
&lt;!ENTITY % complexTypeAttrs ''&gt;
&lt;!ENTITY % complexContentAttrs ''&gt;
<phrase dg="vm13">&lt;!ENTITY % openContentAttrs ''&gt;</phrase>
&lt;!ENTITY % simpleContentAttrs ''&gt;
&lt;!ENTITY % extensionAttrs ''&gt;
&lt;!ENTITY % elementAttrs ''&gt;
&lt;!ENTITY % groupAttrs ''&gt;
&lt;!ENTITY % allAttrs ''&gt;
&lt;!ENTITY % choiceAttrs ''&gt;
&lt;!ENTITY % sequenceAttrs ''&gt;
&lt;!ENTITY % anyAttrs ''&gt;
&lt;!ENTITY % anyAttributeAttrs ''&gt;
&lt;!ENTITY % attributeAttrs ''&gt;
&lt;!ENTITY % attributeGroupAttrs ''&gt;
&lt;!ENTITY % uniqueAttrs ''&gt;
&lt;!ENTITY % keyAttrs ''&gt;
&lt;!ENTITY % keyrefAttrs ''&gt;
&lt;!ENTITY % selectorAttrs ''&gt;
&lt;!ENTITY % fieldAttrs ''&gt;
<phrase dg="b2861cc-1">&lt;!ENTITY % assertAttrs ''&gt;
<!--*
* material suppressed here by diff group b2861cc-3 *
*--></phrase>
&lt;!ENTITY % includeAttrs ''&gt;
&lt;!ENTITY % importAttrs ''&gt;
&lt;!ENTITY % redefineAttrs ''&gt;<phrase dg="b4767">
&lt;!ENTITY % overrideAttrs ''&gt;</phrase>
&lt;!ENTITY % notationAttrs ''&gt;
&lt;!ENTITY % annotationAttrs ''&gt;
&lt;!ENTITY % appinfoAttrs ''&gt;
&lt;!ENTITY % documentationAttrs ''&gt;

&lt;!ENTITY % complexDerivationSet "CDATA"&gt;
      &lt;!-- #all or space-separated list drawn from derivationChoice --&gt;
&lt;!ENTITY % blockSet "CDATA"&gt;
      &lt;!-- #all or space-separated list drawn from
                      derivationChoice + 'substitution' --&gt;

&lt;!ENTITY % mgs '%all; | %choice; | %sequence;'&gt;
&lt;!ENTITY % cs '<!--*
* material suppressed here by diff group all-2506-3 *
*-->%choice; | %sequence;'&gt;
&lt;!ENTITY % formValues '(qualified|unqualified)'&gt;


&lt;!ENTITY % attrDecls    '((%attribute;| %attributeGroup;)*,(%anyAttribute;)?)'&gt;

<phrase dg="b2861cc-1">&lt;!ENTITY % assertions   '(%assert;<!--*
* material suppressed here by diff group b2861cc-3 *
*-->)*'&gt;</phrase>

&lt;!ENTITY % particleAndAttrs '(<phrase dg="vm13">%openContent;?, </phrase>(%mgs; | %group;)?,
                              %attrDecls;<phrase dg="b2861cc-1">, %assertions;</phrase>)'&gt;

&lt;!-- This is used in part2 --&gt;
&lt;!ENTITY % restriction1 '((%mgs; | %group;)?)'&gt;

%xs-datatypes;

&lt;!-- the duplication below is to produce an unambiguous content model
     which allows annotation everywhere --&gt;
&lt;!ELEMENT %schema; ((%include; | %import; | %redefine; | <phrase dg="b4767">%override; | </phrase>%annotation;)*,
                    <phrase dg="vm13">(%defaultOpenContent;, (%annotation;)*)?,</phrase>
                    ((%simpleType; | %complexType;
                      | %element; | %attribute;
                      | %attributeGroup; | %group;
                      | %notation; ),
                     (%annotation;)*)* )&gt;
&lt;!ATTLIST %schema;
   targetNamespace      %URIref;               #IMPLIED
   version              CDATA                  #IMPLIED
   %nds;                %URIref;               #FIXED 'http://www.w3.org/2001/XMLSchema'
   xmlns                CDATA                  #IMPLIED
   finalDefault         %complexDerivationSet; ''
   blockDefault         %blockSet;             ''
   id                   ID                     #IMPLIED
   elementFormDefault   %formValues;           'unqualified'
   attributeFormDefault %formValues;           'unqualified'<phrase dg="b4314-1">
   defaultAttributes    CDATA                  #IMPLIED</phrase><phrase dg="b4419">
   <!--*
* material suppressed here by diff group b5274 *
*--><phrase dg="b5274">xp</phrase>athDefaultNamespace    CDATA       '##local'</phrase>
   xml:lang             CDATA                  #IMPLIED
   %schemaAttrs;&gt;
&lt;!-- Note the xmlns declaration is NOT in the<phrase dg="b2067-2e">
    </phrase> schema for schema<!--*
* material suppressed here by diff group b2067-2e *
*--><phrase dg="b2067-2e"> documents</phrase>,
     because at the Infoset level where schemas operate,
     xmlns(:prefix) is NOT <phrase dg="ep99">an</phrase><!--*
* material suppressed here by diff group ep99 *
*--> attribute! --&gt;
&lt;!-- The declaration of xmlns is a convenience for schema authors<!--*
* material suppressed here by diff group ep99 *
*--> --&gt;
 
&lt;!-- The id attribute here and below is for use in external references
     from non-schemas using simple fragment identifiers.
     It is NOT used for schema-to-schema reference, internal or
     external. --&gt;

<phrase dg="vm13">&lt;!ELEMENT %defaultOpenContent; ((%annotation;)?<phrase dg="vm13-1">, %any;</phrase>)&gt;
&lt;!ATTLIST %defaultOpenContent;
          appliesToEmpty  (true|false)           'false'
          mode            (interleave|suffix)    'interleave'
          <!--*
* material suppressed here by diff group vm13-1 *
*-->id              ID                     #IMPLIED
          %defaultOpenContentAttrs;&gt;</phrase>

&lt;!-- a type is a named content type specification which allows attribute
     declarations--&gt;
&lt;!-- --&gt;

&lt;!ELEMENT %complexType; ((%annotation;)?,
                         (%simpleContent;|%complexContent;|
                          %particleAndAttrs;))&gt;

&lt;!ATTLIST %complexType;
          name                    %NCName;                 #IMPLIED
          id                      ID                       #IMPLIED
          abstract                %boolean;                #IMPLIED
          final                   %complexDerivationSet;   #IMPLIED
          block                   %complexDerivationSet;   #IMPLIED
          mixed                   (true|false)             'false'
          <phrase dg="b4314-1">defaultAttributesApply  %boolean;                'true'</phrase>
          %complexTypeAttrs;&gt;

&lt;!-- particleAndAttrs is shorthand for a root type --&gt;
&lt;!-- mixed is disallowed if simpleContent, overridden if complexContent has one too. --&gt;

&lt;!-- If anyAttribute appears in one or more referenced attributeGroups
     and/or explicitly, the intersection of the permissions is used --&gt;

&lt;!ELEMENT %complexContent; ((%annotation;)?, (%restriction;|%extension;))&gt;
&lt;!ATTLIST %complexContent;
          mixed (true|false) #IMPLIED
          id    ID           #IMPLIED
          %complexContentAttrs;&gt;

<phrase dg="vm13">&lt;!ELEMENT %openContent; ((%annotation;)?<phrase dg="vm13-1">, <phrase dg="vm13-3">(</phrase>%any;<phrase dg="vm13-3">)?</phrase></phrase>)&gt;
&lt;!ATTLIST %openContent;
          mode            (none|interleave|suffix)  'interleave'
          <!--*
* material suppressed here by diff group vm13-1 *
*-->id              ID                        #IMPLIED
          %openContentAttrs;&gt;</phrase>

&lt;!-- restriction should use the branch defined above, not the simple
     one from part2; extension should use the full model  --&gt;

&lt;!ELEMENT %simpleContent; ((%annotation;)?, (%restriction;|%extension;))&gt;
&lt;!ATTLIST %simpleContent;
          id    ID           #IMPLIED
          %simpleContentAttrs;&gt;

&lt;!-- restriction should use the simple branch from part2, not the 
     one defined above; extension should have no particle  --&gt;

&lt;!ELEMENT %extension; ((%annotation;)?, (%particleAndAttrs;))&gt;
&lt;!ATTLIST %extension;
          base  %QName;               #REQUIRED
          id    ID                    #IMPLIED
          <!--*
* material suppressed here by diff group all-2506-3 *
*-->
          %extensionAttrs;&gt;

&lt;!-- an element is declared by either:
 a name and a type (either nested or referenced via the type attribute)
 or a ref to an existing element declaration --&gt;

&lt;!ELEMENT %element; ((%annotation;)?, (%complexType;| %simpleType;)?,<phrase dg="cta">
                     (%alternative;)*,</phrase>
                     (%unique; | %key; | %keyref;)*)&gt;
&lt;!-- simpleType or complexType only if no type|ref attribute --&gt;
&lt;!-- ref not allowed at top level --&gt;
&lt;!ATTLIST %element;
            name               %NCName;               #IMPLIED
            id                 ID                     #IMPLIED
            ref                %QName;                #IMPLIED
            type               %QName;                #IMPLIED
            minOccurs          %nonNegativeInteger;   #IMPLIED
            maxOccurs          CDATA                  #IMPLIED
            nillable           %boolean;              #IMPLIED
            substitutionGroup  %QName;                #IMPLIED
            abstract           %boolean;              #IMPLIED
            final              %complexDerivationSet; #IMPLIED
            block              %blockSet;             #IMPLIED
            default            CDATA                  #IMPLIED
            fixed              CDATA                  #IMPLIED
            form               %formValues;           #IMPLIED
            <phrase dg="b3836-1">targetNamespace    %URIref;               #IMPLIED</phrase>
            %elementAttrs;&gt;
&lt;!-- type and ref are mutually exclusive.
     name and ref are mutually exclusive, one is required --&gt;
&lt;!-- In the absence of type AND ref, type defaults to type of
     substitutionGroup, if any, else <!--*
* material suppressed here by diff group urtype *
*--><phrase dg="urtype">xs:anyType</phrase>, i.e. unconstrained --&gt;
&lt;!-- default and fixed are mutually exclusive --&gt;
<phrase dg="cta">
&lt;!ELEMENT %alternative; ((%annotation;)?, 
            (%simpleType; | %complexType;)?) &gt;
&lt;!ATTLIST %alternative; 
            test                     CDATA     #IMPLIED
            type                     %QName;   #IMPLIED<phrase dg="b4419">
            xpathDefaultNamespace    CDATA     #IMPLIED</phrase>
            id                       ID        #IMPLIED &gt;
</phrase>

&lt;!ELEMENT %group; ((%annotation;)?,(%mgs;)?<!--*
* material suppressed here by diff group b2861cc-1g *
*-->)&gt;
&lt;!ATTLIST %group; 
          name        %NCName;               #IMPLIED
          ref         %QName;                #IMPLIED
          minOccurs   %nonNegativeInteger;   #IMPLIED
          maxOccurs   CDATA                  #IMPLIED
          id          ID                     #IMPLIED
          %groupAttrs;&gt;

&lt;!ELEMENT %all; ((%annotation;)?, (%element;<phrase diff="add" dg="b7031">| %group;| %any;</phrase>)*)&gt;
&lt;!ATTLIST %all;
          minOccurs   (<phrase diff="add" dg="b7031">0 | </phrase>1)<!--*
* material suppressed here by diff group  *
*-->                #IMPLIED
          maxOccurs   (<phrase diff="add" dg="b7031">0 | </phrase>1)<!--*
* material suppressed here by diff group  *
*-->                #IMPLIED
          id          ID                     #IMPLIED
          %allAttrs;&gt;

&lt;!ELEMENT %choice; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)&gt;
&lt;!ATTLIST %choice;
          minOccurs   %nonNegativeInteger;   #IMPLIED
          maxOccurs   CDATA                  #IMPLIED
          id          ID                     #IMPLIED
          %choiceAttrs;&gt;

&lt;!ELEMENT %sequence; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)&gt;
&lt;!ATTLIST %sequence;
          minOccurs   %nonNegativeInteger;   #IMPLIED
          maxOccurs   CDATA                  #IMPLIED
          id          ID                     #IMPLIED
          %sequenceAttrs;&gt;

&lt;!-- an anonymous grouping in a model, or
     a top-level named group definition, or a reference to same --&gt;

<phrase diff="del" dg="b7031">&lt;!-- Note that if order is 'all', group is not allowed inside.
     If order is 'all' THIS group must be alone (or referenced alone) at
     the top level of a content model --&gt;
&lt;!-- If order is 'all', minOccurs==maxOccurs==1 on element/any inside --&gt;
&lt;!-- Should allow minOccurs=0 inside order='all' . . . --&gt;
</phrase>
&lt;!ELEMENT %any; (%annotation;)?&gt;
&lt;!ATTLIST %any;
            namespace       CDATA                  <!--*
* material suppressed here by diff group b2867-1 *
*--><phrase dg="b2867-1">#IMPLIED</phrase><phrase dg="b2867-1">
            notNamespace    CDATA                  #IMPLIED
            notQName        CDATA                  ''</phrase>
            processContents (skip|lax|strict)      'strict'
            minOccurs       %nonNegativeInteger;   '1'
            maxOccurs       CDATA                  '1'
            id              ID                     #IMPLIED
            %anyAttrs;&gt;

&lt;!-- namespace is interpreted as follows:
                  ##any      - - any non-conflicting WFXML at all

                  ##other    - - any non-conflicting WFXML from namespace other
                                  than targetNamespace

                  ##local    - - any unqualified non-conflicting WFXML/attribute
                  one or     - - any non-conflicting WFXML from
                  more URI        the listed namespaces
                  references

                  ##targetNamespace ##local may appear in the above list,
                    with the obvious meaning --&gt;
<phrase dg="b2867-1">
&lt;!-- notNamespace is interpreted as follows:
                  ##local    - - any unqualified non-conflicting WFXML/attribute
                  one or     - - any non-conflicting WFXML from
                  more URI        the listed namespaces
                  references

                  ##targetNamespace ##local may appear in the above list,
                    with the obvious meaning --&gt;</phrase>

&lt;!ELEMENT %anyAttribute; (%annotation;)?&gt;
&lt;!ATTLIST %anyAttribute;
            namespace       CDATA              <!--*
* material suppressed here by diff group b2867-1 *
*--><phrase dg="b2867-1">#IMPLIED</phrase><phrase dg="b2867-1">
            notNamespace    CDATA              #IMPLIED
            notQName        CDATA              ''</phrase>
            processContents (skip|lax|strict)  'strict'
            id              ID                 #IMPLIED
            %anyAttributeAttrs;&gt;
&lt;!-- namespace <!--*
* material suppressed here by diff group b2867-1 *
*--><phrase dg="b2867-1">and notNamespace are</phrase> interpreted as for 'any' above --&gt;

&lt;!-- simpleType only if no type|ref attribute --&gt;
&lt;!-- ref not allowed at top level, name iff at top level --&gt;
&lt;!ELEMENT %attribute; ((%annotation;)?, (%simpleType;)?)&gt;
&lt;!ATTLIST %attribute;
          name              %NCName;      #IMPLIED
          id                ID            #IMPLIED
          ref               %QName;       #IMPLIED
          type              %QName;       #IMPLIED
          use               (prohibited|optional|required) #IMPLIED
          default           CDATA         #IMPLIED
          fixed             CDATA         #IMPLIED
          form              %formValues;  #IMPLIED
          <phrase dg="b3836-1">targetNamespace   %URIref;      #IMPLIED</phrase>
          <phrase dg="b5003">inheritable             %URIref;      #IMPLIED</phrase>
          %attributeAttrs;&gt;
&lt;!-- type and ref are mutually exclusive.
     name and ref are mutually exclusive, one is required --&gt;
&lt;!-- default for use is optional when nested, none otherwise --&gt;
&lt;!-- default and fixed are mutually exclusive --&gt;
&lt;!-- type attr and simpleType content are mutually exclusive --&gt;

&lt;!-- an attributeGroup is a named collection of attribute decls, or a
     reference thereto --&gt;
&lt;!ELEMENT %attributeGroup; ((%annotation;)?,
                       (%attribute; | %attributeGroup;)*,
                       (%anyAttribute;)?<!--*
* material suppressed here by diff group b2861cc-1g *
*-->) &gt;
&lt;!ATTLIST %attributeGroup;
                 name       %NCName;       #IMPLIED
                 id         ID             #IMPLIED
                 ref        %QName;        #IMPLIED
                 %attributeGroupAttrs;&gt;

&lt;!-- ref iff no content, no name.  ref iff not top level --&gt;

&lt;!-- better reference mechanisms --&gt;
&lt;!ELEMENT %unique; ((%annotation;)?, %selector;, (%field;)+)&gt;
&lt;!ATTLIST %unique;
          name                     %NCName;       <!--*
* material suppressed here by diff group b2850 *
*--><phrase dg="b2850">#IMPLIED</phrase><phrase dg="b2850">
          ref                      %QName;        #IMPLIED</phrase>
          id                       ID             #IMPLIED<!--*
* material suppressed here by diff group b5273 *
*-->
          %uniqueAttrs;&gt;

&lt;!ELEMENT %key;    ((%annotation;)?, %selector;, (%field;)+)&gt;
&lt;!ATTLIST %key;
          name                     %NCName;       <!--*
* material suppressed here by diff group b2850 *
*--><phrase dg="b2850">#IMPLIED</phrase><phrase dg="b2850">
          ref                      %QName;        #IMPLIED</phrase>
          id                       ID             #IMPLIED<!--*
* material suppressed here by diff group b5273 *
*-->
          %keyAttrs;&gt;

&lt;!ELEMENT %keyref; ((%annotation;)?, %selector;, (%field;)+)&gt;
&lt;!ATTLIST %keyref;
          name                     %NCName;       <!--*
* material suppressed here by diff group b2850 *
*--><phrase dg="b2850">#IMPLIED</phrase><phrase dg="b2850">
          ref                      %QName;        #IMPLIED</phrase>
          refer                    %QName;        <!--*
* material suppressed here by diff group b2850 *
*--><phrase dg="b2850">#IMPLIED</phrase>
          id                       ID             #IMPLIED<!--*
* material suppressed here by diff group b5273 *
*-->
          %keyrefAttrs;&gt;

&lt;!ELEMENT %selector; ((%annotation;)?)&gt;
&lt;!ATTLIST %selector;
          xpath                    %XPathExpr; #REQUIRED<phrase dg="b5273">
          xpathDefaultNamespace    CDATA       #IMPLIED</phrase>
          id                       ID          #IMPLIED
          %selectorAttrs;&gt;
&lt;!ELEMENT %field; ((%annotation;)?)&gt;
&lt;!ATTLIST %field;
          xpath                    %XPathExpr; #REQUIRED<phrase dg="b5273">
          xpathDefaultNamespace    CDATA       #IMPLIED</phrase>
          id                       ID          #IMPLIED
          %fieldAttrs;&gt;

<phrase dg="b2861cc-1">&lt;!-- co-constraint assertions --&gt;
&lt;!ELEMENT %assert; ((%annotation;)?)&gt;
&lt;!ATTLIST %assert;
          test                     %XPathExpr; #REQUIRED
          id                       ID          #IMPLIED<phrase dg="b4419">
          xpathDefaultNamespace    CDATA       #IMPLIED</phrase>
          %assertAttrs;&gt;
<!--*
* material suppressed here by diff group b2861cc-3 *
*--></phrase>

&lt;!-- Schema combination mechanisms --&gt;
&lt;!ELEMENT %include; (%annotation;)?&gt;
&lt;!ATTLIST %include;
          schemaLocation %URIref; #REQUIRED
          id             ID       #IMPLIED
          %includeAttrs;&gt;

&lt;!ELEMENT %import; (%annotation;)?&gt;
&lt;!ATTLIST %import;
          namespace      %URIref; #IMPLIED
          schemaLocation %URIref; #IMPLIED
          id             ID       #IMPLIED
          %importAttrs;&gt;

&lt;!ELEMENT %redefine; (%annotation; | %simpleType; | %complexType; |
                      %attributeGroup; | %group;)*&gt;
&lt;!ATTLIST %redefine;
          schemaLocation %URIref; #REQUIRED
          id             ID       #IMPLIED
          %redefineAttrs;&gt;<phrase dg="b4767">

&lt;!ELEMENT %override; ((%annotation;)?,
                      ((%simpleType; | %complexType; | %group; | %attributeGroup;) |
                       %element; | %attribute; | %notation;)*)&gt;
&lt;!ATTLIST %override;
          schemaLocation %URIref; #REQUIRED
          id             ID       #IMPLIED
          %overrideAttrs;&gt;</phrase>

&lt;!ELEMENT %notation; (%annotation;)?&gt;
&lt;!ATTLIST %notation;
	  name        %NCName;    #REQUIRED
	  id          ID          #IMPLIED
	  public      CDATA       #REQUIRED
	  system      %URIref;    #IMPLIED
	  %notationAttrs;&gt;

&lt;!-- Annotation is either application information or documentation --&gt;
&lt;!-- By having these here they are available for datatypes as well
     as all the structures elements --&gt;

&lt;!ELEMENT %annotation; (%appinfo; | %documentation;)*&gt;
&lt;!ATTLIST %annotation; %annotationAttrs;&gt;

&lt;!-- User must define annotation elements in internal subset for this
     to work --&gt;
&lt;!ELEMENT %appinfo; ANY&gt;   &lt;!-- too restrictive --&gt;
&lt;!ATTLIST %appinfo;
          source     %URIref;      #IMPLIED
          id         ID         #IMPLIED
          %appinfoAttrs;&gt;
&lt;!ELEMENT %documentation; ANY&gt;   &lt;!-- too restrictive --&gt;
&lt;!ATTLIST %documentation;
          source     %URIref;   #IMPLIED
          id         ID         #IMPLIED
          xml:lang   CDATA      #IMPLIED
          %documentationAttrs;&gt;

&lt;!NOTATION XMLSchemaStructures PUBLIC
           'structures' 'http://www.w3.org/2001/XMLSchema.xsd' &gt;
&lt;!NOTATION XML PUBLIC
           'REC-xml-1998-0210' 'http://www.w3.org/TR/1998/REC-xml-19980210' &gt;
<phrase diff="add" dg="b6698">
&lt;!-- 
      In keeping with the XML Schema WG's standard versioning policy, 
      this DTD will persist at the URI
      .

      At the date of issue it can also be found at the URI
      .

      The schema document at that URI may however change in the future, 
      in order to remain compatible with the latest version of XSD 
      and its namespace.  In other words, if XSD or the XML Schema 
      namespace change, the version of this document at 
       will change accordingly; 
      the version at  
      will not change.

      Previous dated (and unchanging) versions of this DTD include:

        http://www.w3.org/2009/04/structures.dtd 
          (XSD 1.1 Candidate Recommendation)

        http://www.w3.org/2004/10/structures.dtd
          (XSD 1.0 Recommendation, Second Edition)

        http://www.w3.org/2001/05/structures.dtd
          (XSD 1.0 Recommendation, First Edition)

--&gt;</phrase>
</codeBlock>
</codeScrap>
</div1>

 <div1 id="non-ambig">
  <head>Analysis of the Unique Particle Attribution Constraint (non-normative)</head>
  <p>A specification of the import of <specref ref="cos-nonambig"/> which does
not appeal to a processing model is difficult.  What follows is intended as
guidance, without claiming to be complete.</p>
   <p><termdef term="overlap" id="key-overlap" role="local">Two non-group
particles <term>overlap</term> if </termdef>
   <ulist>
    <item>
     <p>They are both element declaration particles whose declarations have the
same <!--*
* material suppressed here by diff group ep20b *
*--><phrase dg="ep20b"><xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref></phrase>.</p>
    </item>
   </ulist>
    or
    <ulist>
    <item>
     <p>They are both element declaration particles
      <!--*
* material suppressed here by diff group b5282 *
*-->
      <phrase dg="b5282">and one of them has the same</phrase>
      <!--*
* material suppressed here by diff group ep20b *
*--><phrase dg="ep20b"><xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded name</xspecref></phrase>
      <!--*
* material suppressed here by diff group b5282 *
*--> as 
      <!--*
* material suppressed here by diff group ep20b *
*--> an element declaration in the
other's <termref def="key-eq">substitution group</termref>.</p>
    </item>
   </ulist>
    or
    <ulist dg="b5282"><item><p>
     They are both <pt>global</pt> element declaration particles and their
     <termref def="key-eq">substitution groups</termref> contain the same
     element declaration.
    </p></item></ulist>
    or
    <ulist>
     <item>
      <p>They are both wildcards, and <!--*
* material suppressed here by diff group b6175 *
*--><phrase dg="b6175">any one of the following is true of the </phrase><!--*
* material suppressed here by diff group vm19-2 *
*--><phrase dg="f2f0701a">wildcard</phrase> intersection of their <propref comp="w" prop="namespace constraint"/>s as defined
       in <specref ref="cos-aw-intersect"/><phrase dg="b6175">:</phrase>
	<!--*
* material suppressed here by diff group b6175 *
*-->
	<olist dg="b6175">
<item>
<p>It has <propref comp="nc" prop="variety"/> = <pt>any</pt>.</p>
</item>
<item>
<p>It has <propref comp="nc" prop="variety"/> = <pt>not</pt>.</p>
</item>
<item>
<p>It has <propref comp="nc" prop="variety"/> = <pt>enumeration</pt> and <propref comp="nc" prop="namespaces"/> ≠ the empty set.</p>
</item>
</olist>
</p>
     </item>
    </ulist>
    <!--*
* material suppressed here by diff group ww *
*-->
    <!--*
* material suppressed here by diff group ww *
*-->
   </p>
   <p>A content model will violate the unique attribution constraint if it
contains two particles which <termref def="key-overlap">overlap</termref> and which either
    <ulist>
     <item>
      <p>are both in the <propref comp="mg" prop="particles"/> of a <pt>choice</pt> or
<pt>all</pt> group</p>
     </item>
    </ulist>
    or
    <ulist>
     <item>
      <p>may <termref def="key-vn">validate</termref> adjacent information items and the first has
<propref comp="p" prop="min occurs"/> less than <propref comp="p" prop="max occurs"/>.</p>
     </item>
    </ulist>
   </p>
   <p>Two particles may <termref def="key-vn">validate</termref> adjacent information items if they are
separated by at most epsilon transitions in the most obvious transcription of a
content model into a finite-state automaton.</p>
  <p>A precise formulation of this constraint can also be offered in terms of
operations on finite-state automaton:  transcribe the content model into an
automaton in the usual way using epsilon transitions for optionality and
unbounded maxOccurs, unfolding other numeric occurrence ranges and treating the heads of <!--*
* material suppressed here by diff group b4337 *
*--><termref def="key-eq" dg="b4337">substitution groups</termref> as if
they were choices over all elements in the group, <emph>but</emph> using not
element QNames as transition labels, but rather pairs of element QNames and
positions in the model.  Determinize this automaton, treating wildcard transitions as
<!--*
* material suppressed here by diff group b2162 *
*--><phrase dg="b2162">if
they were distinct from all other edge labels for the purposes of the
determinization.</phrase> Now replace all
QName+position transition labels with the element QNames alone.  If the result has any states
with two or more identical-QName-labeled transitions from it<!--*
* material suppressed here by diff group ww *
*-->, or two
wildcard transitions whose intentional intersection is non-empty, the model does not
satisfy the Unique Attribution constraint.   </p>
 </div1>

  <!--*
* material suppressed here by diff group ep6553 *
*-->

<div1 id="nonnormative-language-ids" dg="b3948">
 <head><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> Language Identifiers (non-normative)</head>
 <glist>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase></p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.0</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.0</p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.1</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.1</p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.0/1e</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.0 First Edition</p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.0/2e</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.0 Second Edition</p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.1/1e</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.1 First Edition</p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.0/1e/19990506</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.0 in 6 May 1999 working draft</p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.0/1e/19990924</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.0 in 24 September 1999 working draft</p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.0/1e/19991105</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.0 in 5 November 1999 working draft</p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.0/1e/19991217</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.0 in 17 December 1999 working draft</p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.0/1e/20000225</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.0 in 25 February 2000 working draft</p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.0/1e/20000407</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.0 in 7 April 2000 working draft</p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.0/1e/20000922</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.0 in 22 September 2000 working draft</p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.0/1e/20001024</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.0 Candidate Recommendation (CR)</p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.0/1e/20010316</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.0 <phrase dg="f2f0701b">first</phrase> Proposed Recommendation (PR)</p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.0/1e/20010330</code></label>
   <def>
    <p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.0 <phrase dg="f2f0701b">second</phrase> Proposed Recommendation (PR)</p>
   </def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.0/1e/20010502</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.0 Recommendation</p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.0/2e/20040318</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.0 Second Edition Proposed Edited Recommendation (PER)</p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.0/2e/20041028</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.0 Second Edition Recommendation</p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.1/1e/20040716</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.1 in 16 July 2004 working draft</p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.1/1e/20050224</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.1 in 24 February 2005 working draft</p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.1/1e/20060116</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.1 in 16 January 2006 working draft</p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.1/1e/20060217</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.1 in 17 February 2006 working draft</p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.1/1e/20060330</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.1 in 30 March 2006 working draft</p></def>
  </gitem>
  <gitem>
   <label><code>http://www.w3.org/<!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">XML</phrase>/XMLSchema/v1.1/1e/20060831</code></label>
   <def><p><!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--></phrase> 1.1 in 31 August 2006 working draft</p></def>
  </gitem>
  <gitem dg="crhax">
   <label><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20070830</code></label>
   <def><p>XSD 1.1 in 30 August 2007 working draft</p></def>
  </gitem>
  <gitem dg="crhax">
   <label><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20080620</code></label>
   <def><p>XSD 1.1 in 20 June 2008 working draft</p></def>
  </gitem>
  <gitem dg="crhax">
   <label><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20090130</code></label>
   <def><p>XSD 1.1 in 30 January 2009 working draft</p></def>
  </gitem>
  <gitem dg="crhax">
   <label><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20090430</code></label>
   <def><p>XSD 1.1 Candidate Recommendation, 30 April 2009</p></def>
  </gitem>
 </glist>
</div1>

  <div1 id="biblio" dg="ep6553m">
   <head dg="ep6553">References</head>

   <div2 id="normative-references">
    <head dg="ep6553">Normative</head>

    <blist id="blist.normative" dg="ep6553m">
     <!--* keep sorted by key, for convenience.
         * The stylesheet will resort, so flaws in the sequencing aren't a problem
         * except for making references harder to find.
         *-->

     <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="Functions and Operators" id="bib-fno" dg="b2861cc-1">
      <phrase dg="ep6553">World Wide Web Consortium.</phrase>
      <emph>XQuery 1.0 and XPath 2.0 Functions and Operators</emph>,
      <phrase dg="ep6553">ed. Ashok Malhotra, Jim Melton, and Norman Walsh.</phrase>
      <!--*
* material suppressed here by diff group ep6553 *
*-->
      <phrase dg="ep6553">W3C Recommendation</phrase>
      <phrase dg="b4419">23 January 2007. See
       <!--*
* material suppressed here by diff group b6553 *
*--><loc href="http://www.w3.org/TR/xpath-functions/" dg="b6553">http://www.w3.org/TR/xpath-functions/</loc></phrase>
      <phrase role="annotation" dg="b6553">
       The edition cited is the one current at the date of publication of this
       specification. Implementations <rfc2119>may</rfc2119> follow the edition cited and/or
       any later edition(s); it is implementation-defined which.
      </phrase>
     </bibl>

     <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="IETF RFC 2119" id="rfc-2119" dg="fpwd">
      <phrase dg="ep6553">Bradner, Scott.</phrase>
      <emph>RFC
       2119: Key words for use in RFCs to Indicate Requirement Levels.</emph>
      <!--*
* material suppressed here by diff group ep6553 *
*--> 
      IETF (Internet Engineering Task Force), 1997. See <loc href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</loc>.</bibl>

     <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XDM" id="bib-xdm" dg="b5059">
      <phrase dg="ep6553">World Wide Web Consortium.</phrase>
      <emph>XQuery 1.0 and XPath 2.0 Data Model (XDM)</emph>, 
      <phrase dg="ep6553">ed. Mary Fernández et al.</phrase>
      <!--*
* material suppressed here by diff group ep6553 *
*--> 
      <!--*
* material suppressed here by diff group b4419 *
*--> 
      <phrase dg="b4419"><phrase dg="ep6553">W3C Recommendation</phrase>
       23 January 2007. See 
       <!--*
* material suppressed here by diff group b6553 *
*--><loc href="http://www.w3.org/TR/xpath-datamodel/" dg="b6553">http://www.w3.org/TR/xpath-datamodel/</loc></phrase>
      <phrase role="annotation" dg="b6553">
       The edition cited is the one current at the date of publication of this
       specification. Implementations <rfc2119>may</rfc2119> follow the edition cited and/or
       any later edition(s); it is implementation-defined which.
      </phrase>
     </bibl>

     <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XML 1.0" id="ref-xml-1.0">
      <?cool-uris id="ref-xml"?>
      <!--* N.B. this bibl element is processed by dg-localhacks.xsl
          * with an ad-hoc template.  If the diff status of the bibl
          * element changes, or if it acquires new attributes, update
          * that template. (2009-07-16, MSM) *-->
      <phrase dg="ep6553">World Wide Web Consortium.</phrase>
      <emph>Extensible Markup Language (XML) 1.0<!--*
* material suppressed here by diff group b6553 *
*--><phrase dg="b6553"> (Fifth Edition)</phrase></emph>, 
      <phrase dg="ep6553">ed.</phrase> Tim Bray et al.<!--*
* material suppressed here by diff group ep6553 *
*--> 
      <phrase dg="b6553">W3C Recommendation 26 November 2008.</phrase>
      <!--*
* material suppressed here by diff group b6553 *
*-->
      <!--*
* material suppressed here by diff group b6553 *
*-->
      <phrase dg="b6553">Available at
       <loc href="http://www.w3.org/TR/xml/">http://www.w3.org/TR/xml/</loc></phrase>
      <phrase role="annotation" dg="b1838"><phrase dg="b6553">
	The edition cited is the one current at the date of publication of this
	specification. Implementations <rfc2119>may</rfc2119> follow the edition cited and/or
	any later edition(s); it is implementation-defined which.
       </phrase>
       For details of the dependency of this specification on XML 1.1, 
       see <specref ref="intro-relatedWork"/>.</phrase>
     </bibl>

     <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XML 1.1" dg="b1838" id="ref-xml-1.1">
      <?cool-uris id="ref-xml"?>
      <phrase dg="ep6553">World Wide Web Consortium.</phrase>
      <emph>Extensible Markup Language (XML) 1.1<phrase dg="b6553">
	(Second Edition)</phrase><!--*
* material suppressed here by diff group b6553 *
*--></emph>, 
      <phrase dg="ep6553">ed.</phrase> Tim Bray et al.<!--*
* material suppressed here by diff group ep6553 *
*--> 
      <phrase dg="b6553">W3C Recommendation 16 August 2006, 
       edited in place 29 September 2006.  Available at</phrase>
      <loc href="http://www.w3.org/TR/xml11/">http://www.w3.org/TR/xml11/</loc> 
      <phrase role="annotation" dg="b1838"><phrase dg="b6553">
	The edition cited is the one current at the date of publication of this
	specification. Implementations <rfc2119>may</rfc2119> follow the edition cited and/or
	any later edition(s); it is implementation-defined which.
       </phrase>
       For 
       details of the dependency of this specification on XML
       1.1, see <specref ref="intro-relatedWork"/>.  </phrase></bibl>

     <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XML Infoset" id="ref-xmlinfo">
      <phrase dg="ep6553">World Wide Web Consortium.</phrase>
      <emph>XML Information Set<phrase dg="b6553">
	(Second Edition)</phrase></emph>, 
      <phrase dg="ep6553">ed.</phrase> John Cowan and Richard Tobin<!--*
* material suppressed here by diff group ep6553 *
*--> 
      <!--*
* material suppressed here by diff group b6553 *
*-->
      <phrase dg="b6553">W3C Recommendation 4 February 2004.</phrase>
      <!--*
* material suppressed here by diff group b6553 *
*-->
      <phrase dg="b6553">Available at
       <loc href="http://www.w3.org/TR/xml-infoset/">http://www.w3.org/TR/xml-infoset/</loc></phrase>
      <phrase role="annotation" dg="b6553">
       The edition cited is the one current at the date of publication of this
       specification. Implementations <rfc2119>may</rfc2119> follow the edition cited and/or
       any later edition(s); it is implementation-defined which.
      </phrase>
     </bibl>

     <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="Namespaces in XML 1.0" id="ref-xml-namespaces-1.0">
      <?cool-uris id="ref-xml-namespaces"?>
      <!--* N.B. this bibl element is processed by dg-localhacks.xsl
          * with an ad-hoc template.  If the diff status of the bibl
          * element changes, or if it acquires new attributes, update
          * that template. (2009-07-16, MSM) *-->
      <phrase dg="ep6553">World Wide Web Consortium.</phrase>
      <emph>Namespaces in XML<phrase dg="b6553">1.0 (Second Edition)</phrase></emph>, 
      <phrase dg="ep6553">ed.</phrase> Tim Bray et al.<!--*
* material suppressed here by diff group ep6553 *
*--> 
      <!--*
* material suppressed here by diff group b6553 *
*-->
      <phrase dg="b6553">W3C Recommendation 16 August 2006.</phrase>
      See <!--*
* material suppressed here by diff group b6553 *
*--><loc href="http://www.w3.org/TR/xml-names/" dg="b6553">http://www.w3.org/TR/xml-names/</loc>
      <phrase role="annotation" dg="b1838"><phrase dg="b6553">
	The edition cited is the one current at the date of publication of this
	specification. Implementations <rfc2119>may</rfc2119> follow the edition cited and/or
	any later edition(s); it is implementation-defined which.
       </phrase>
       For details of the
       dependency of this specification on Namespaces in XML 1.0, see
       <specref ref="intro-relatedWork"/>.  </phrase></bibl>


     <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XML Namespaces 1.1" dg="b1838" id="ref-xml-namespaces-1.1">
      <?cool-uris id="ref-xml-namespaces"?>
      World Wide Web Consortium.
      <emph>Namespaces in XML 1.1<phrase dg="b6553">
	(Second Edition)</phrase></emph><phrase dg="ep6553">,
       ed. Tim Bray et al</phrase>. 
      <phrase dg="b6553">W3C Recommendation 16 August 2006.</phrase>
      Available at: <loc href="http://www.w3.org/TR/xml-names11/">http://www.w3.org/TR/xml-names11/</loc>
      <phrase role="annotation"><phrase dg="b6553">
	The edition cited is the one current at the date of publication of this
	specification. Implementations <rfc2119>may</rfc2119> follow the edition cited and/or
	any later edition(s); it is implementation-defined which.
       </phrase>
       For details of the dependency of this
       specification on Namespaces in XML 1.1, see <specref ref="intro-relatedWork"/>.  </phrase></bibl>

     <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XML Schema: Datatypes" id="ref-xsp2">
      <phrase dg="ep6553">World Wide Web Consortium.</phrase>
      <emph><!--*
* material suppressed here by diff group ep99 *
*-->XML Schema<!--*
* material suppressed here by diff group ep99 *
*--><phrase dg="fpwd"><phrase dg="ep99"> 
	 Version</phrase> 1.1</phrase>
       Part 2: Datatypes</emph>, 
      <phrase dg="ep6553">ed.</phrase>
      <phrase dg="fpwd">Dave Peterson<phrase dg="ep99">,</phrase>
      </phrase><phrase dg="ep99">Paul V. Biron</phrase><!--*
* material suppressed here by diff group ep999 *
*--><phrase dg="ep999"> and</phrase> 
      Ashok Malhotra, 
      <phrase>and C. M. Sperberg-McQueen<!--*
* material suppressed here by diff group ep6553 *
*--></phrase>
      <!--*
* material suppressed here by diff group ep6553 *
*-->
      <!--*
* material suppressed here by diff group ep6553 *
*-->
      <phrase dg="ep6553">W3C Working Draft 3 December 2009.</phrase>
      See <!--*
* material suppressed here by diff group fpwd *
*--><loc id="magic-uri-xsd-part2" dg="fpwd" href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html">http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/datatypes.diff-wd.html</loc> 
	<!--* do not lose the magic ID magic-uri-xsd-part2; it is needed to allow 
            * the stylesheet xmlschema.xsl to know which URI to use for Datatypes.
	    * If this reference is changed further, make sure that magic ID is
            * used on the live loc element.
            *-->
      <phrase role="annotation" dg="b6553">
       The edition cited is the one current at the date of publication of this
       specification. Implementations <rfc2119>may</rfc2119> follow the edition cited and/or
       any later edition(s); it is implementation-defined which.
      </phrase>
     </bibl>

     <!--*
* material suppressed here by diff group fpwd *
*-->

     <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XML Schema 2nd Edition" id="schema2e-1" dg="fpwd"><phrase dg="ep6553">World Wide Web Consortium.</phrase>
      <emph>XML Schema Part 1: Structures</emph>, 
      <phrase dg="ep6553">ed.</phrase> Henry S. Thompson et al.<!--*
* material suppressed here by diff group ep6553 *
*--> 
      <!--*
* material suppressed here by diff group b6553 *
*-->  
      <phrase dg="b6553">W3C Recommendation 28 October 2004.</phrase>
      See <!--*
* material suppressed here by diff group b6553 *
*--><loc href="http://www.w3.org/TR/xmlschema-1/" dg="b6553">http://www.w3.org/TR/xmlschema-1/</loc>.
      <phrase role="annotation" dg="b6553">
       The edition cited is the one current at the date of publication of this
       specification. Implementations <rfc2119>may</rfc2119> follow the edition cited and/or
       any later edition(s); it is implementation-defined which.
      </phrase>
     </bibl>

     <!--*
* material suppressed here by diff group f2f0701b *
*-->

     <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XPath 2.0" id="bib-xpath2" dg="b2861cc-1">
      <phrase dg="ep6553">World Wide Web Consortium.</phrase>
      <emph>XML Path Language 2.0</emph>,
      <phrase dg="ep6553">ed. Anders Berglund et al.</phrase>
      <!--*
* material suppressed here by diff group ep6553 *
*--> 
      <!--*
* material suppressed here by diff group b4419 *
*-->
      <phrase dg="b4419">23 January 2007.
       See <loc href="http://www.w3.org/TR/xpath20/">http://www.w3.org/TR/xpath20/</loc></phrase>
      <phrase role="annotation" dg="b6553">
       The edition cited is the one current at the date of publication of this
       specification. Implementations <rfc2119>may</rfc2119> follow the edition cited and/or
       any later edition(s); it is implementation-defined which.
      </phrase>
     </bibl>

     <!--*
* material suppressed here by diff group fpwd *
*-->

     <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XSLT 2.0" id="bib-xslt2" dg="b4767">
      <phrase dg="ep6553">World Wide Web Consortium.</phrase>
      <emph>XSL Transformations (XSLT) Version 2.0</emph>, 
      <phrase dg="ep6553">ed. Michael Kay.</phrase>
      <!--*
* material suppressed here by diff group ep6553 *
*--> 23 January 2007.
      See <!--*
* material suppressed here by diff group b6553 *
*--><loc href="http://www.w3.org/TR/xslt20/">http://www.w3.org/TR/xslt20/</loc>
      <phrase role="annotation" dg="b6553">
       The edition cited is the one current at the date of publication of this
       specification. Implementations <rfc2119>may</rfc2119> follow the edition cited and/or
       any later edition(s); it is implementation-defined which.
      </phrase>
     </bibl>
    </blist>

   </div2>

   <div2 id="nonnormative-references">
    <head dg="ep6553">Non-normative</head>

    <blist id="blist.nonnormative" dg="ep6553m">
     
     <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="Brüggemann-Klein / Wood 1998" id="ABK-DW" dg="wd4.ch">
      <phrase id="authors.abk.dw" dg="ep6553"><!--*
* material suppressed here by diff group ep6553 *
*-->Brüggemann-Klein<phrase dg="ep6553">, Anne,</phrase> and 
       Derick Wood.</phrase>
      <emph>One-Unambiguous Regular Languages</emph><!--*
* material suppressed here by diff group ep6553 *
*--><phrase dg="ep6553">.</phrase>
      <phrase><!--*
* material suppressed here by diff group ep6553 *
*--></phrase>
      <emph>Information and Computation</emph>
      140 (1998): 229-253.  
      Also appears as 142 (1998): 182-206.
     </bibl>
    
    <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="Chamberlin 2006" id="bib-chamberlin-2006" dg="b4416-4">
     <phrase dg="ep6553">Chamberlin, Don.</phrase>
     <emph>Impact of precisionDecimal on XPath and XQuery</emph><!--*
* material suppressed here by diff group ep6553 *
*--> 
     Email to the W3C XML Query and W3C XSL Working
     Groups, 16 May 2006. Available online at <!--* <loc
     href="http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2006May/0023.html" 
     >http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2006May/0023.html</loc> 
     (member-only link). [N.B. This bibliographic reference is a
     place-holder for a possible publicly accessible document
     containing the material in this email.] *--> <loc href="http://www.w3.org/XML/2007/dc.pd.xml">http://www.w3.org/XML/2007/dc.pd.xml</loc> and <loc href="http://www.w3.org/XML/2007/dc.pd.html">http://www.w3.org/XML/2007/dc.pd.html</loc>
    </bibl>

    <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="DCD" id="ref-dcd">
     <phrase dg="ep6553">Bray, Tim, Charles Frankston, and Ashok Malhotra, ed.,</phrase>
     <emph>Document Content Description
      for XML (DCD)</emph><!--*
* material suppressed here by diff group ep6553 *
*--><phrase dg="ep6553">.</phrase>
     <!--*
* material suppressed here by diff group ep6553 *
*-->
     <!--*
* material suppressed here by diff group ep6553 *
*--> 
     <phrase dg="ep6553">Submission to the World Wide Web Consortium 31-July-1998.</phrase>
      <phrase dg="ep6553">[A submission to W3C from International Business Machines
       Corporation and Microsoft Corporation.]</phrase>
      See <loc href="http://www.w3.org/TR/1998/NOTE-dcd-19980731">http://www.w3.org/TR/1998/NOTE-dcd-19980731</loc> 
    </bibl>

    <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="DDML" id="ref-ddml">
     <phrase dg="ep6553">Bourret, Ronald, et al., ed.,</phrase>
     <emph>Document Definition Markup Language<phrase dg="ep6553">
     (DDML) Specification, Version 1.0</phrase></emph><phrase dg="ep6553">.</phrase><!--*
* material suppressed here by diff group ep6553 *
*-->
     <phrase dg="ep6553">W3C Note, 19-Jan-1999.</phrase>
     <phrase dg="ep6553">[A submission to W3C from 
      GMD - Forschungszentrum Informationstechnik GmbH.]</phrase>
     See <loc href="http://www.w3.org/TR/1999/NOTE-ddml-19990119">http://www.w3.org/TR/1999/NOTE-ddml-19990119 
     </loc></bibl>

    <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="Requirements for XML Schema 1.1" id="ref-xs11req">
     <phrase dg="ep6553">World Wide Web Consortium.</phrase>
     <phrase dg="ep19"> <emph>Requirements for XML
       Schema 1.1</emph>, ed. Charles Campbell, Ashok Malhotra, and
      Priscilla Walmsley. W3C, 21 January 2003. See <!--*
* material suppressed here by diff group ep6553 *
*--><loc dg="ep6553" href="http://www.w3.org/TR/xmlschema-11-req/">http://www.w3.org/TR/xmlschema-11-req/</loc></phrase> 
    </bibl>

    <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="Rule of Least Power" id="ref-rolp" dg="b5023"><emph><phrase dg="b5023">The Rule of Least Power</phrase></emph>, 
     <phrase dg="b5023">ed. Tim Berners-Lee
     and Noah Mendelsohn.
     W3C TAG Finding 23 February 2006.</phrase>
     See <loc href="http://www.w3.org/2001/tag/doc/leastPower.html">http://www.w3.org/2001/tag/doc/leastPower.html</loc>.
    </bibl>

    <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="SchemaPath" dg="wd4.ch" id="bib-schemapath">
     <phrase id="pmcscfv" dg="ep6553"><phrase dg="ep6553">Marinelli, </phrase>Paolo<!--*
* material suppressed here by diff group ep6553 *
*-->, Claudio Sacerdoti Coen, and Fabio Vitali.</phrase>
     <emph>SchemaPath, a
     Minimal Extension to XML Schema for Conditional Constraints</emph><!--*
* material suppressed here by diff group ep6553 *
*--><phrase dg="ep6553">.</phrase>
     <phrase><!--*
* material suppressed here by diff group ep6553 *
*--></phrase>
     In <emph>Proceedings of the Thirteenth International World
     Wide Web Conference</emph>, New York: ACM Press, 2004,
     pp. 164-174.
     <!--* ISBN 1-581139-128.  *-->
     Available on the Web in the ACM Digital Library; citation at
     <loc href="http://portal.acm.org/citation.cfm?doid=988672.988695">
     http://portal.acm.org/citation.cfm?doid=988672.988695</loc>.
     <!--* ISBN:1-58113-844-X *-->
     <emph/>
    </bibl>

    <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="SOX" id="ref-sox"> 
     <phrase dg="ep6553">Fuchs, Matthew, Murray Maloney, and Alex Milowski.</phrase>
     <emph>Schema for Object-oriented XML</emph><!--*
* material suppressed here by diff group ep6553 *
*-->. 
     <phrase dg="ep6553">Submitted to W3C 19980915.</phrase>
     <phrase dg="ep6553">[A submission to W3C by Veo Systems Inc.]</phrase>
     <!--*
* material suppressed here by diff group ep6553 *
*-->
     <phrase dg="ep6553">See
      <loc href="http://www.w3.org/TR/1998/NOTE-SOX-19980930/">http://www.w3.org/TR/1998/NOTE-SOX-19980930/</loc></phrase>
    </bibl>

    <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="SOX-2" id="ref-sox-1.1"> 
     <phrase dg="ep6553">Davidson, Andrew, et al.</phrase>
     <emph>Schema for Object-oriented XML<phrase dg="ep6553"> 2.0</phrase></emph><!--*
* material suppressed here by diff group ep6553 *
*--><phrase dg="ep6553">.</phrase> 
     See <loc href="http://www.w3.org/TR/NOTE-SOX/">http://www.w3.org/TR/NOTE-SOX/</loc></bibl>

    <!--*
* material suppressed here by diff group b6685 *
*-->

    <!--*
* material suppressed here by diff group b6685 *
*-->

    <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="UAAG 1.0" id="UAAG-1.0" dg="b6655">
     <phrase dg="ep6553">World Wide Web Consortium.</phrase>
     <emph><phrase dg="b6655">User Agent Accessibility Guidelines 1.0</phrase></emph>, 
     <phrase dg="b6655">ed. Ian Jacobs, 
      Jon Gunderson, and
      Eric Hansen.
      W3C Recommendation 17 December 2002.</phrase>
     See <loc href="http://www.w3.org/TR/UAAG10/">http://www.w3.org/TR/UAAG10/</loc>.
    </bibl>

    <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="UAAG 2.0" id="UAAG-2.0" dg="b6655"><phrase dg="ep6553">World Wide Web Consortium.</phrase>
     <emph><phrase dg="b6655">User Agent Accessibility Guidelines (UAAG) 2.0</phrase></emph>, 
     <phrase dg="b6655">ed. James Allan, Jan Richards, and
      Jeanne Spellman.
      W3C Working Draft 11 March 2009.</phrase>
     See <loc href="http://www.w3.org/TR/UAAG20/">http://www.w3.org/TR/UAAG20/</loc>.
    </bibl>

    <!--*
* material suppressed here by diff group b6685 *
*-->

    <!-- Added by "consent-1020"; moved to normative reference section. -->
    <!--*
* material suppressed here by diff group b5059 *
*-->

    <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XDR" id="ref-xdr"> 
     <phrase dg="ep6553">Frankston, Charles, and Henry S. Thompson.</phrase>
     <emph>XML-Data Reduced</emph>,
     <!--*
* material suppressed here by diff group ep6553 *
*--> 
     3 July 1998.  
     <phrase role="annotation" dg="ep6553">[<quote>This note is a refinement of 
       the January 1998 XML-Data submission 
       http://www.w3.org/TR/1998/NOTE-XML-data-0105/.</quote>]</phrase>
     See <loc href="http://www.ltg.ed.ac.uk/~ht/XMLData-Reduced.htm">http://www.ltg.ed.ac.uk/~ht/XMLData-Reduced.htm 
     </loc> </bibl>

    <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XML-Data" id="ref-xml-data">
     <phrase dg="ep6553">Layman, Andrew, et al.</phrase>
     <emph>XML-Data</emph><!--*
* material suppressed here by diff group ep6553 *
*-->.
     <phrase dg="ep6553">W3C Note 05 Jan 1998.</phrase>
     <phrase role="annotation" dg="ep6553">[A submission to W3C by
      Microsoft, ArborText, DataChannel, and Inso.]</phrase>
     See <loc href="http://www.w3.org/TR/1998/NOTE-XML-data-0105/">http://www.w3.org/TR/1998/NOTE-XML-data-0105/</loc> 
    </bibl>

    <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XML Schema: Component Designators" id="ref-scds" dg="rq144si">
     <phrase dg="ep6553">World Wide Web Consortium.</phrase>
     <emph>XML Schema: Component Designators</emph>, ed. Mary
     Holstege and Asir Vedamuthu<!--*
* material suppressed here by diff group ep6553 *
*-->.  
     <phrase dg="ep6553">W3C Working Draft 17 November 2008.</phrase>
     See <loc href="http://www.w3.org/TR/xmlschema-ref/">http://www.w3.org/TR/xmlschema-ref/</loc>.
    </bibl>

    <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XML Schema: Primer" id="bib-expo">
     <phrase dg="ep6553">World Wide Web Consortium.</phrase>
     <emph>XML Schema Part 0: Primer<phrase dg="b6553">
     Second Edition</phrase></emph>, 
     <phrase dg="ep6553">ed.</phrase>
     <phrase dg="fpwd">Priscilla Walm<!--*
* material suppressed here by diff group wd2.silent *
*-->sley and
      and</phrase> David C. Fallside<!--*
* material suppressed here by diff group ep6553 *
*-->.<!--*
* material suppressed here by diff group b6553 *
*--><phrase dg="b6553">W3C Recommendation 28 October 2004.</phrase>
     See <!--*
* material suppressed here by diff group b6553 *
*--><phrase dg="b6553"><loc href="http://www.w3.org/TR/xmlschema-0/">http://www.w3.org/TR/xmlschema-0/</loc></phrase></bibl>

    <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XML Schema Requirements" id="ref-xsreq"><phrase dg="fpwd"> 
      <phrase dg="ep6553">World Wide Web Consortium.</phrase>
      <emph>XML Schema Requirements </emph>,
      <phrase dg="ep6553">ed.</phrase> Ashok Malhotra and Murray Maloney<!--*
* material suppressed here by diff group ep6553 *
*--> 
      W3C<!--*
* material suppressed here by diff group ep6553 *
*--><phrase dg="ep6553">
       Note</phrase> 15 February 1999.
      See <!--*
* material suppressed here by diff group b6553 *
*--><loc href="http://www.w3.org/TR/NOTE-xml-schema-req" dg="b6553">http://www.w3.org/TR/NOTE-xml-schema-req</loc></phrase> 
    </bibl>

    <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XPath 1.0" id="bib-xpath1" dg="f2f0701e">
     <phrase dg="ep6553">World Wide Web Consortium.</phrase>
     <emph>XML Path Language</emph>, 
     <phrase dg="ep6553">ed.</phrase> James Clark and Steve DeRose<!--*
* material suppressed here by diff group ep6553 *
*--> 
     <!--*
* material suppressed here by diff group ep6553 *
*-->
     <phrase dg="ep6553">W3C Recommendation 16 November 1999.</phrase>
     See <!--*
* material suppressed here by diff group b6553 *
*--><loc href="http://www.w3.org/TR/xpath" dg="b6553">http://www.w3.org/TR/xpath</loc>
    </bibl>

    <bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XPointer" id="ref-xpointer"><phrase id="anchor5167a3"/>
     <phrase dg="fpwd">
      <phrase dg="ep6553">World Wide Web Consortium.</phrase>
      <phrase diff="del" dg="b5167a"><emph>XML Pointer Language (XPointer)</emph>, 
      <phrase dg="ep6553">ed.</phrase> Steve DeRose et al.<!--*
* material suppressed here by diff group ep6553 *
*--> 
      W3C<!--*
* material suppressed here by diff group ep6553 *
*--><phrase dg="ep6553">Working Draft</phrase> 16 August 2002. See <!--*
* material suppressed here by diff group b6553 *
*--><loc href="http://www.w3.org/TR/xptr/" dg="b6553">http://www.w3.org/TR/xptr/</loc></phrase>
      <phrase diff="add" dg="b5167a"><emph>XPointer Framework</emph>, 
       <phrase dg="ep6553">ed.</phrase> Paul Grosso et al.<!--*
* material suppressed here by diff group ep6553 *
*-->
       W3C Recommendation 25 March 2003. See
       <loc href="http://www.w3.org/TR/xptr-framework/">http://www.w3.org/TR/xptr-framework/</loc></phrase>
     </phrase> 
    </bibl>

    </blist>
   </div2>
  </div1>

<div1 id="acknowledgments">
<head>Acknowledgements (non-normative)</head>
<p>The following contributed material to version 1.0 of this specification:</p>
<slist>
<sitem>David Fallside, IBM</sitem>
<sitem>Scott Lawrence, Agranat Systems</sitem>
<sitem>Andrew Layman, Microsoft</sitem>
<sitem>Eve L. Maler, Sun Microsystems</sitem>
<sitem>Asir S. Vedamuthu, webMethods, Inc</sitem>
</slist>
<p>The Working Group thanks the members of other W3C Working
Groups and industry experts in other forums who have contributed
directly or indirectly to the creation of this document and its
predecessor.</p>
<p dg="ed200902">The work of C. M. Sperberg-McQueen
as a co-editor of this specification was supported by the World
Wide Web Consortium through January 2009, and beginning in 
February 2009 by Black Mesa Technologies LLC.
</p>

<p>At the time this Working Draft is published, the members 
in good standing of the XML Schema Working Group are:</p>
<orglist>
<member>
<name>Paul V. Biron</name>
<affiliation>Invited expert</affiliation>
</member>
<member>
<name>David Ezell</name>
<affiliation>National Association of Convenience Stores (NACS)</affiliation>
<role>chair</role>
</member>
<member>
<name>Shudi (Sandy) Gao 高殊镝</name>
<affiliation>IBM</affiliation>
</member>
<member>
<name>Mary Holstege</name>
<affiliation>Mark Logic</affiliation>
</member>
<member>
<name>Michael Kay</name>
<affiliation>Invited expert</affiliation>
</member>
<member>
<name>Paolo Marinelli</name>
<affiliation>University of Bologna</affiliation>
</member>
<member>
<name>Noah Mendelsohn</name>
<affiliation>IBM</affiliation>
</member>
<member>
<name>Dave Peterson</name>
<affiliation>Invited expert</affiliation>
</member>
<member>
<name>C. M. Sperberg-McQueen</name>
<affiliation>invited expert</affiliation>
</member>
<member>
<name>Henry S. Thompson</name>
<affiliation>University of Edinburgh and W3C</affiliation>
<role>staff contact</role>
</member>
<member>
<name>Scott Tsao</name>
<affiliation>The Boeing Company</affiliation>
</member>
<member>
<name>Fabio Vitali</name>
<affiliation>University of Bologna</affiliation>
</member>
<member>
<name>Stefano Zacchiroli</name>
<affiliation>University of Bologna</affiliation>
</member>
</orglist>
<p>The XML Schema Working Group has benefited in its work from the
participation and contributions of a number of people who are no
longer members of the Working Group in good standing at the time 
of publication of this Working Draft.  Their names are given below.  
In particular we note
with sadness the accidental death of Mario Jeckle shortly before
publication of the first Working Draft of XML Schema 1.1.
Affiliations given are (among) those current at the time of the
individuals' work with the WG.
</p>
<orglist>
<member>
<name>Paula Angerstein</name>
<affiliation>Vignette Corporation</affiliation>
</member>
<member>
<name>Leonid Arbouzov</name>
<affiliation>Sun Microsystems</affiliation>
</member>
<member>
<name>Jim Barnette</name>
<affiliation>Defense Information Systems Agency (DISA)</affiliation>
</member>
<member>
<name>David Beech</name>
<affiliation>Oracle Corp.</affiliation>
</member>
<member>
<name>Gabe Beged-Dov</name>
<affiliation>Rogue Wave Software</affiliation>
</member>
<member>
<name>Laila Benhlima</name>
<affiliation>Ecole Mohammadia d'Ingenieurs Rabat (EMI)</affiliation>
</member>
<member>
<name>Doris Bernardini</name>
<affiliation>Defense Information Systems Agency (DISA)</affiliation>
</member>
<member>
<name>Don Box</name>
<affiliation>DevelopMentor</affiliation>
</member>
<member>
<name>Allen Brown</name>
<affiliation>Microsoft</affiliation>
</member>
<member>
<name>Lee Buck</name>
<affiliation>TIBCO Extensibility</affiliation>
</member>
<member>
<name>Greg Bumgardner</name>
<affiliation>Rogue Wave Software</affiliation>
</member>
<member>
<name>Dean Burson</name>
<affiliation>Lotus Development Corporation</affiliation>
</member>
<member>
<name>Charles E. Campbell</name>
<affiliation>Invited expert</affiliation>
</member>
<member>
<name>Oriol Carbo</name>
<affiliation>University of Edinburgh</affiliation>
</member>
<member>
<name>Wayne Carr</name>
<affiliation>Intel</affiliation>
</member>
<member>
<name>Peter Chen</name>
<affiliation>Bootstrap Alliance and LSU</affiliation>
</member>
<member>
<name>Tyng-Ruey Chuang</name>
<affiliation>Academia Sinica</affiliation>
</member>
<member>
<name>Tony Cincotta</name>
<affiliation>NIST</affiliation>
</member>
<member>
<name>David Cleary</name>
<affiliation>Progress Software</affiliation>
</member>
<member>
<name>Mike Cokus</name>
<affiliation>MITRE</affiliation>
</member>
<member>
<name>Dan Connolly</name>
<affiliation>W3C</affiliation>
<role>staff contact</role>
</member>
<member>
<name>Ugo Corda</name>
<affiliation>Xerox</affiliation>
</member>
<member>
<name>Roger L. Costello</name>
<affiliation>MITRE</affiliation>
</member>
<member>
<name>Joey Coyle</name>
<affiliation>Health Level Seven</affiliation>
</member>
<member>
<name>Haavard Danielson</name>
<affiliation>Progress Software</affiliation>
</member>
<member>
<name>Josef Dietl</name>
<affiliation>Mozquito Technologies</affiliation>
</member>
<member>
<name>Kenneth Dolson</name>
<affiliation>Defense Information Systems Agency (DISA)</affiliation>
</member>
<member>
<name>Andrew Eisenberg</name>
<affiliation>Progress Software</affiliation>
</member>
<member>
<name>Rob Ellman</name>
<affiliation>Calico Commerce</affiliation>
</member>
<member>
<name>Tim Ewald</name>
<affiliation>Developmentor</affiliation>
</member>
<member>
<name>Alexander Falk</name>
<affiliation>Altova GmbH</affiliation>
</member>
<member>
<name>David Fallside</name>
<affiliation>IBM</affiliation>
</member>
<member>
<name>George Feinberg</name>
<affiliation>Object Design</affiliation>
</member>
<member>
<name>Dan Fox</name>
<affiliation>Defense Logistics Information Service (DLIS)</affiliation>
</member>
<member>
<name>Charles Frankston</name>
<affiliation>Microsoft</affiliation>
</member>
<member>
<name>Matthew Fuchs</name>
<affiliation>Commerce One</affiliation>
</member>
<member>
<name>Andrew Goodchild</name>
<affiliation>Distributed Systems Technology Centre (DSTC Pty Ltd)</affiliation>
</member>
<member>
<name>Xan Gregg</name>
<affiliation>TIBCO Extensibility</affiliation>
</member>
<member>
<name>Paul Grosso</name>
<affiliation>Arbortext, Inc</affiliation>
</member>
<member>
<name>Martin Gudgin</name>
<affiliation>DevelopMentor</affiliation>
</member>
<member>
<name>Ernesto Guerrieri</name>
<affiliation>Inso</affiliation>
</member>
<member>
<name>Dave Hollander</name>
<affiliation>Hewlett-Packard Company</affiliation>
<role>co-chair</role>
</member>
<member>
<name>Nelson Hung</name>
<affiliation>Corel</affiliation>
</member>
<member>
<name>Jane Hunter</name>
<affiliation>Distributed Systems Technology Centre (DSTC Pty Ltd)</affiliation>
</member>
<member>
<name>Michael Hyman</name>
<affiliation>Microsoft</affiliation>
</member>
<member>
<name>Renato Iannella</name>
<affiliation>Distributed Systems Technology Centre (DSTC Pty Ltd)</affiliation>
</member>
<member>
<name>Mario Jeckle</name>
<affiliation>DaimlerChrysler</affiliation>
</member>
<member>
<name>Rick Jelliffe</name>
<affiliation>Academia Sinica</affiliation>
</member>
<member>
<name>Marcel Jemio</name>
<affiliation>Data Interchange Standards Association</affiliation>
</member>
<member>
<name>Simon Johnston</name>
<affiliation>Rational Software</affiliation>
</member>
<member>
<name>Kohsuke Kawaguchi</name>
<affiliation>Sun Microsystems</affiliation>
</member>
<member>
<name>Dianne Kennedy</name>
<affiliation>Graphic Communications Association</affiliation>
</member>
<member>
<name>Janet Koenig</name>
<affiliation>Sun Microsystems</affiliation>
</member>
<member>
<name>Setrag Khoshafian</name>
<affiliation>Technology Deployment International (TDI)</affiliation>
</member>
<member>
<name>Melanie Kudela</name>
<affiliation>Uniform Code Council</affiliation>
</member>
<member>
<name>Ara Kullukian</name>
<affiliation>Technology Deployment International (TDI)</affiliation>
</member>
<member>
<name>Andrew Layman</name>
<affiliation>Microsoft</affiliation>
</member>
<member>
<name>Dmitry Lenkov</name>
<affiliation>Hewlett-Packard Company</affiliation>
</member>
<member>
<name>Bob Lojek</name>
<affiliation>Mozquito Technologies</affiliation>
</member>
<member>
<name>John McCarthy</name>
<affiliation>Lawrence Berkeley National Laboratory</affiliation>
</member>
<member>
<name>Matthew MacKenzie</name>
<affiliation>XML Global</affiliation>
</member>

<member>
<name>Eve Maler</name>
<affiliation>Sun Microsystems</affiliation>
</member>
<member>
<name>Ashok Malhotra</name>
<affiliation>IBM, Microsoft, Oracle</affiliation>
</member>
<member>
<name>Murray Maloney</name>
<affiliation>Muzmo Communication, acting for Commerce One</affiliation>
</member>
<member>
<name>Lisa Martin</name>
<affiliation>IBM</affiliation>
</member>
<member>
<name>Jim Melton</name>
<affiliation>Oracle Corp</affiliation>
</member>
<member>
<name>Adrian Michel</name>
<affiliation>Commerce One</affiliation>
</member>
<member>
<name>Alex Milowski</name>
<affiliation>Invited expert</affiliation>
</member>
<member>
<name>Don Mullen</name>
<affiliation>TIBCO Extensibility</affiliation>
</member>
<member>
<name>Ravi Murthy</name>
<affiliation>Oracle</affiliation>
</member>
<member>
<name>Murata Makoto</name>
<affiliation>Xerox</affiliation>
</member>
<member>
<name>Chris Olds</name>
<affiliation>Wall Data</affiliation>
</member>
<member>
<name>Frank Olken</name>
<affiliation>Lawrence Berkeley National Laboratory</affiliation>
</member>
<member>
<name>David Orchard</name>
<affiliation>BEA Systems, Inc.</affiliation>
</member>
<member>
<name>Paul Pedersen</name>
<affiliation>Mark Logic Corporation</affiliation>
</member>
<member>
<name>Shriram Revankar</name>
<affiliation>Xerox</affiliation>
</member>
<member>
<name>Mark Reinhold</name>
<affiliation>Sun Microsystems</affiliation>
</member>
<member>
<name>Jonathan Robie</name>
<affiliation>Software AG</affiliation>
</member>
<member>
<name>Cliff Schmidt</name>
<affiliation>Microsoft</affiliation>
</member>
<member>
<name>John C. Schneider</name>
<affiliation>MITRE</affiliation>
</member>
<member>
<name>Eric Sedlar</name>
<affiliation>Oracle Corp.</affiliation>
</member>
<member>
<name>Lew Shannon</name>
<affiliation>NCR</affiliation>
</member>
<member>
<name>Anli Shundi</name>
<affiliation>TIBCO Extensibility</affiliation>
</member>
<member>
<name>William Shea</name>
<affiliation>Merrill Lynch</affiliation>
</member>
<member>
<name>Jerry L. Smith</name>
<affiliation>Defense Information Systems Agency (DISA)</affiliation>
</member>
<member>
<name>John Stanton</name>
<affiliation>Defense Information Systems Agency (DISA)</affiliation>
</member>
<member>
<name>Tony Stewart</name>
<affiliation>Rivcom</affiliation>
</member>
<member>
<name>Bob Streich</name>
<affiliation>Calico Commerce</affiliation>
</member>
<member>
<name>William K. Stumbo</name>
<affiliation>Xerox</affiliation>
</member>
<member>
<name>Hoylen Sue</name>
<affiliation>Distributed Systems Technology Centre (DSTC Pty Ltd)</affiliation>
</member>
<member>
<name>Ralph Swick</name>
<affiliation>W3C</affiliation>
</member>
<member>
<name>John Tebbutt</name>
<affiliation>NIST</affiliation>
</member>
<member>
<name>Ross Thompson</name>
<affiliation>Contivo</affiliation>
</member>
<member>
<name>Matt Timmermans</name>
<affiliation>Microstar</affiliation>
</member>
<member>
<name>Jim Trezzo</name>
<affiliation>Oracle Corp.</affiliation>
</member>
<member>
<name>Steph Tryphonas</name>
<affiliation>Microstar</affiliation>
</member>
<member>
<name>Mark Tucker</name>
<affiliation>Health Level Seven</affiliation>
</member>
<member>
<name>Asir S. Vedamuthu</name>
<affiliation>webMethods, Inc</affiliation>
</member>
<member>
<name>Scott Vorthmann</name>
<affiliation>TIBCO Extensibility</affiliation>
</member>
<member>
<name>Priscilla Walmsley</name>
<affiliation>XMLSolutions</affiliation>
</member>
<member>
<name>Norm Walsh</name>
<affiliation>Sun Microsystems</affiliation>
</member>
<member>
<name>Cherry Washington</name>
<affiliation>Defense Information Systems Agency (DISA)</affiliation>
</member>
<member>
<name>Aki Yoshida</name>
<affiliation>SAP AG</affiliation>
</member>
<member>
<name>Kongyi Zhou</name>
<affiliation>Oracle</affiliation>
</member>
</orglist> 
</div1>
</back>
</spec>
