<?xml version="1.0" encoding="utf-8"?><!-- Id: structures.xml,v 1.6.2.368 2008/06/17 02:27:48 cmsmcq Exp  --><?xml-stylesheet type='text/xsl' href='xmlschema_nodiffs.xsl'?>
<!DOCTYPE spec
  SYSTEM "local.dgdf.dtd">
<spec dgdf="dg-wd.xml" dgdf_desc="" xml:lang="en" w3c-doctype="wd" status="final" otherSpec="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.html" schemaDump="./XMLSchema.xsd.dmp" schemaProper="./XMLSchema.xsd" datatypeDoc="../WD-xmlschema11-2-20080620/datatypes.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</title>
  <w3c-designation>wd-20080620</w3c-designation>
  <!--* <w3c-doctype>W3C Working Draft</w3c-doctype> *-->
  <w3c-doctype>W3C Working Draft</w3c-doctype>
  <pubdate>
   <day>20</day>
   <month>June</month>
   <year>2008</year>
  </pubdate>
  <publoc> 
   <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/">http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/</loc> 
  </publoc>
  <altlocs><loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/structures.xml">XML</loc>
   <!--*
   <loc href="http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/structures.diff-1.0.html">XHTML with changes since version 1.0 marked</loc>
   <loc href="http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/structures.diff-wd.html">XHTML with changes since previous Working Draft marked</loc>
   *-->
   <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/structures.diff-1.0.html">XHTML with changes since version 1.0 marked</loc>
   <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/structures.diff-wd.html">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">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>
   <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xmlschema11-1/">http://www.w3.org/TR/xmlschema11-1/</loc>
  </latestloc>
  <prevlocs>
   <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2007/WD-xmlschema11-1-20070830/">http://www.w3.org/TR/2007/WD-xmlschema11-1-20070830/</loc>
   <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2006/WD-xmlschema11-1-20060831/">http://www.w3.org/TR/2006/WD-xmlschema11-1-20060831/</loc>
   <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2006/WD-xmlschema11-1-20060330/">http://www.w3.org/TR/2006/WD-xmlschema11-1-20060330/</loc>
   <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2005/WD-xmlschema11-1-20050224/">http://www.w3.org/TR/2005/WD-xmlschema11-1-20050224/</loc>
   <loc xmlns:xlink="http://www.w3.org/1999/xlink" 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">
    <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>World Wide Web Consortium</affiliation>
     <email xmlns:xlink="http://www.w3.org/1999/xlink" href="mailto:cmsmcq@w3.org">cmsmcq@w3.org</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">
    <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">
     <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>
   </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>
   <p>This is a 
    <!--*
* material suppressed here by diff group wg-internal *
*-->
    <phrase dg="wd4.ch">Last Call</phrase>
    Public Working Draft of <!--*
* 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 20 June 2008.
    <phrase dg="wgi-20080613">The  
    <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2007/WD-xmlschema11-1-20070830/">previous
    working draft</loc> of 30 August 2007 was a Last-Call Working Draft which
    elicited numerous comments and suggestions for improvements.  All
    substantive issues have now been resolved, although some editorial
    issues remain open.
    </phrase>
    The major revisions since the previous draft 
    include<phrase dg="wgi-20080613">
     the following</phrase>:
    <!--* Make sure these are in the appendix, too! *-->
    <ulist>

     <item dg="wgi-20080613">
      <p>The minimal subset of XPath which processors were required
       to support for assertions has been eliminated; processors
       must support all of XPath.
      </p>
     </item>
     <item dg="wgi-20080613">
      <p>A new wildcard keyword <kw>##definedSibling</kw> has been
       added to allow a wildcard to match any element except
       one mentioned explicitly elsewhere in the current content model.</p>
     </item>
     <item dg="wgi-20080613">
      <p>The definitions of <rfc2119>must</rfc2119> and <termref def="dt-error">error</termref> have been
       revised to require that processors detect and report
       errors (although the quality and level of detail of
       the error messages are not constrained).
      </p>
     </item>
     <item dg="wgi-20080613">
      <p>An <eltref ref="xs:override"/> element has been defined
       to allow the declarations or definitions of specified
       components in other schema documents to be overridden.
      </p>
     </item>
     <item dg="wgi-20080613">
      <p>The <eltref ref="xs:redefine"/> element has been
       <termref def="key-deprecated">deprecated</termref>.
      </p>
     </item>
     <item dg="wgi-20080613">
      <p>XML Representation Constraints no longer refer to
       the component level; they can now be checked for
       schema documents in isolation.
      </p>
     </item>
     <item dg="wgi-20080613">
      <p>Numerous editorial changes and clarifications have been
       made and numerous small errors corrected.
      </p>
     </item>

    </ulist>
   </p>

   <p>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"><phrase dg="wd-200708-1">The 
     <!--* http://www.w3.org/Consortium/Process/tr#last-call *-->
     <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 12 September 2008.</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">Any feature mentioned in a
     priority feedback note should be considered a <quote>feature
     at risk</quote>:  the feature may be retained as is, modified, or
     dropped, depending on the feedback received from readers,
     schema authors, schema users, and implementors.</phrase>
   </p>

   <p>Publication as a Working Draft does not imply endorsement by the
    W3C Membership. This is a draft document and may be updated, replaced
    or obsoleted by other documents at any time. It is inappropriate to
    cite this document as other than work in progress.</p>

   <p>
    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 
    <phrase dg="b4399a">represented 
     in 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>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</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="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="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-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="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="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="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 dg="b5164">validation</phrase><!--*
* material suppressed here by diff group b5164 *
*--> 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 dg="b5164">validation</phrase><!--*
* material suppressed here by diff group b5164 *
*--> 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 dg="b5164">validation</phrase><!--*
* material suppressed here by diff group b5164 *
*--> 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 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
	 <bibref ref="ref-xml"/> and <bibref ref="ref-xml-namespaces"/>)</p>
       </item>
       <item>
	<p><code>xmlns</code> bound to
	 <code>http://www.w3.org/2000/xmlns/</code> (defined in
	 <bibref ref="ref-xml-namespaces"/>)</p>
       </item>
       <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"/>,
     <bibref ref="ref-xml-namespaces"/>, <!--*
* 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 <bibref ref="ref-xml"/>
     and <bibref ref="ref-xml-namespaces"/>; 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 (<bibref ref="ref-xml"/>, <bibref ref="ref-xml-namespaces"/>) 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.
    </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
	may 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 <bibref ref="ref-xml"/>.
    </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>XML Representation of
     ...</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 dg="b5164"><!--*
* material suppressed here by diff group may *
*--><phrase dg="may"><rfc2119>may</rfc2119></phrase></phrase>
     specify augmentations to those items and their descendants. This
     augmentation makes explicit information <!--*
* material suppressed here by diff group may *
*--> implicit<!--*
* material suppressed here by diff group b5164 *
*--> in the original
     document, 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 dg="b5164">can also be</phrase><!--*
* material suppressed here by diff group b5164 *
*--> 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 b5164 *
*-->

    <!--*
* 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>As it is used in this specification, the
      term <term>schema-validity assessment</term> has <phrase dg="b5164">two</phrase><!--*
* material suppressed here by diff group b5164 *
*--> 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 relevant components of an
	 <!--*
* material suppressed here by diff group b4399 *
*--><phrase dg="b4399">XSD<!--*
* material suppressed here by diff group b5266 *
*--> schema</phrase>;</p></item>
       <item><p><phrase dg="b5164">Synthesizing</phrase><!--*
* material suppressed here by diff group b5164 *
*--> 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></item></olist></p>
    <p>Throughout this specification, <termdef id="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>
    <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,
      schema-validity assessment and infoset
      augmentation</termdef>.</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 <bibref ref="ref-xml"/> and
<bibref ref="ref-xml-namespaces"/>.  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/REC-xml/#sec-well-formed">well-formedness</xtermref> 
     (as defined in <bibref ref="ref-xml"/>) and <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/REC-xml-names/#Conformance">namespace
      conformance</xtermref> (as defined in <bibref ref="ref-xml-namespaces"/>) for all candidates for <termref def="key-va"/> and for all
     <termref def="key-schemaDoc">schema documents</termref>.</p>
    <p>Just as <bibref ref="ref-xml"/> and
     <bibref ref="ref-xml-namespaces"/> 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></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 <bibref ref="ref-xml-namespaces"/></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 <bibref ref="ref-xml-namespaces"/></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
     <bibref ref="ref-xml-namespaces"/>, 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><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.  The graph of these relationships forms
	a tree known as the <term>Type Definition
	 Hierarchy</term></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>.
      </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>

      <!--*
* 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/2008/WD-xmlschema11-2-20080620/datatypes.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/2008/WD-xmlschema11-2-20080620/datatypes.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>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 <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.html#dt-derived">derived</xtermref> to base type.
	 <phrase dg="all-2506-2">A 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> Future versions may allow more kinds
	 of extension, requiring more complex transformations to
	 effect casting.</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"/>.</p>
     </div4>

     <div4 id="Element_Equivalence_Class">
      <head>Element Substitution Group</head>
      <p>In XML<!--*
* material suppressed here by diff group fpwd *
*-->, the name
       and content of an element <rfc2119>must</rfc2119> correspond exactly to the
       element type referenced in the corresponding content model.</p>
      <p><termdef id="key-equivalenceClass" term="element substitution  group">Through the new 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
	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
	 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
	 <bibref ref="ref-xml"/> content models; unlike <bibref ref="ref-xml"/>, <!--*
* 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 within 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>
      <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 *
*-->
      <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"/> <!--*
* 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>
       </div4>

     <div4 id="TypeAlternative" dg="cta-ta">
      <head>Type Alternative</head>
      <p>A <phrase dg="cta-ta-2">type-alternative 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 *
*-->
      <ednote role="pf" dg="trimtree">
       <edtext>
	Assertions are currently only allowed to be specified in
	complex types. It may be deemed useful also to include
	assertions in named model group definitions and/or attribute
	groups, or even simple types. The XML Schema Working Group solicits input from
	implementors and users of this specification on this question.
       </edtext>
      </ednote>
      
     </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 <bibref ref="ref-xml"/> 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.  Located 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"/>.  Located 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.  Located 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 <termref def="key-vn">validation</termref> and/or <termref def="key-va"/>. Located 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>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"/>.</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>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><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><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>
    <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"><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></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 to be <termref def="key-minimallyConforming">minimally conforming</termref>
      but not necessarily <!--*
* material suppressed here by diff group rq144cf *
*--><phrase dg="rq144cf"><termref def="key-interchange"/></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 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>, 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 def="key-interchange"/> 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>
    <note><p>Although this specification provides just these three
      standard levels of conformance, it is anticipated that other
      conventions can be established in the future.  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.  There is no need to modify
      or republish this specification to define such additional levels
      of conformance.</p></note>
    <p>See <specref ref="composition"/> for a more detailed
     explanation of the mechanisms supporting these levels of
     conformance.</p>
   </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. *-->
<!--* http://www.w3.org/TR/REC-xml-names/#ns-breakdown *-->
     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.
    </p>
    <p>Locally scoped attribute and element declarations are special
     with regard to symbol spaces. 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.  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 *
*-->

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

    <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>
    </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>
     <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.  Equality of components for
      the purposes of this specification is always defined as equality
      of names (including target namespaces) within symbol spaces.</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 
       interpret<phrase dg="ep99">ing</phrase><!--*
* material suppressed here by diff group ep99 *
*--> 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/REC-xml/#charsets">legal XML
       characters</xtermref> in <bibref ref="ref-xml"/>.</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 <bibref ref="ref-xml"/> 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>
     <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/2008/WD-xmlschema11-2-20080620/datatypes.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 dg="b5164">validated</phrase><!--*
* material suppressed here by diff group b5164 *
*--></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>
    <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/2008/WD-xmlschema11-2-20080620/datatypes.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/2008/WD-xmlschema11-2-20080620/datatypes.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/2008/WD-xmlschema11-2-20080620/datatypes.html#rf-whiteSpace">whiteSpace facet</xtermref>
	and any other <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.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/2008/WD-xmlschema11-2-20080620/datatypes.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/2008/WD-xmlschema11-2-20080620/datatypes.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/REC-xml/#AVNormalize">Attribute Value Normalization</xspecref> 
in <bibref ref="ref-xml"/> 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/REC-xml/#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>XML Representation of Attribute Declaration Schema
      Components</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 *
*-->

     <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)
    *-->
       <ednote role="pf" id="xr.att2x" dg="b5152-movement">
	<edtext>Earlier versions of this specification did not
	allow a <att>targetNamespace</att> attribute on attribute
	declarations; it has been added in this version to make 
	restriction of complex types easier.  The XML Schema Working Group 
	has designated the <att>targetNamespace</att> attribute
	a ‘feature at risk’:  it may be dropped from future
	drafts of this specification if implementation or usage experience
	shows that its costs outweigh its benefits.
	The XML Schema Working Group solicits input from implementors and 
	users of this specification as to whether the addition of this
	attribute is desirable and acceptable.</edtext>
      </ednote>
     <!--* </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 an
	 <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="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 below) 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="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">The <eltref ref="attribute"/> element also
       maps to the <propref comp="au" prop="attribute declaration"/>
       of the attribute use just described, 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="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="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>
     <head>Constraints on XML Representations of Attribute Declarations</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>
     <head>Attribute Declaration Validation Rules</head>

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

     <div4 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 *
*-->
      <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 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 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 <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 <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 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 <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 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 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 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/2008/WD-xmlschema11-2-20080620/datatypes.html#dt-basicmember">basic
member</xtermref> of its <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.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/2008/WD-xmlschema11-2-20080620/datatypes.html#dt-basicmember">basic member</xtermref> of its
<xtermref href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.html#dt-transitivemembership">transitive
membership</xtermref> which actually <termref
def="key-vn">validated</termref> the attribute item's <xpropref
href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">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/2008/WD-xmlschema11-2-20080620/datatypes.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 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/2008/WD-xmlschema11-2-20080620/datatypes.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 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/2008/WD-xmlschema11-2-20080620/datatypes.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 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 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 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/2008/WD-xmlschema11-2-20080620/datatypes.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 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/2008/WD-xmlschema11-2-20080620/datatypes.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 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/2008/WD-xmlschema11-2-20080620/datatypes.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 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/2008/WD-xmlschema11-2-20080620/datatypes.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 an 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">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>
      <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>Element declarations are potential members of the <!--*
* material suppressed here by diff group b2834 *
*--><phrase dg="b2834"><!--*
* material suppressed here by diff group b4337 *
*--><termref def="key-eq" dg="b4337">substitution groups</termref></phrase>, if any, identified by
      <!--*
* material suppressed here by diff group b2834 *
*--><phrase dg="b2834"><propref comp="ed" prop="substitution group affiliations"/></phrase>. Potential membership is transitive but not
      symmetric; an element declaration is a potential member of any
      group 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> <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.html#dt-derived">derived</xtermref> 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 <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.html#dt-derived">derived</xtermref> 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>XML Representation of Element Declaration Schema Components</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"> *-->
      <ednote role="pf" id="xr.elt2x" dg="b5152-movement">
       <edtext>Earlier versions of this specification did not
	allow a <att>targetNamespace</att> attribute on element
	declarations; it has been added in this version to make 
	restriction of complex types easier.  The XML Schema Working Group 
	 has designated the <att>targetNamespace</att> attribute
	a ‘feature at risk’:  it may be dropped from future
	drafts of this specification if implementation or usage experience
	shows that its costs outweigh its benefits.
	The XML Schema Working Group solicits input from implementors and 
	users of this specification as to whether the addition of this
	attribute is desirable and acceptable.</edtext>
      </ednote>
     <!--* </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><eltref ref="element"/> corresponds to an element declaration, and allows
the type definition of that declaration to be specified either by reference or
by explicit inclusion.</p>
  <p><eltref ref="element"/>s within <eltref ref="schema"/> 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 pre-declared 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>As noted above the 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.  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.</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 below at <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/2008/WD-xmlschema11-2-20080620/datatypes.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>; <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/2008/WD-xmlschema11-2-20080620/datatypes.html#string">string</xtermref> simple
	 type definition).</termdef>
	<pvlist>
	 <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>
       <propmap comp="ed" prop="annotations"><!--*
* material suppressed here by diff group bannotations-1 *
*--> <phrase dg="bannotations-2"> The <termref def="key-am-one"/> of the
	 <eltref ref="element"/> element<!--*
* material suppressed here by diff group cta-ta *
*-->, as defined in <specref ref="declare-annotation"/>. </phrase>
       </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 an <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"><phrase dg="ep01">A
	  <compref ref="sc_e"/> as follows</phrase>
	 <pvlist>
	  <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 Element Declaration. See below.
       </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"><phrase dg="ep01">A
	 <compref ref="sc_e"/> as follows:</phrase>
	<pvlist>
	 <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>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:</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;<!--* 
  &lt;xs:alternative                       type="messageType"/> *-->
&lt;/xs:element&gt;
</eg>

      </note>
     </div4>
    </div3>
    <div3>
     <head>Constraints on XML Representations of Element Declarations</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-ta *
*-->
<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 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/2008/WD-xmlschema11-2-20080620/datatypes.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 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 <termref def="key-cdt"/> 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 <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.html#dt-derived">derived</xtermref> 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 <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.html#dt-derived">derived</xtermref> 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 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 *
*-->

      <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>
	      <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></phrase>
             <!--* identity of D might be thought obvious from context, 
                 * but MK asked about it, so let's make it explicit.
                 *-->
	    </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"/><!--*
* material suppressed here by diff group ep01 *
*--><!--*
* material suppressed here by diff group rq129 *
*--> <!--*
* 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>
		<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> <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 *
*-->

     <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 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
       element declaration, but it is also part of schema-validity
       <termref def="key-va"/> of an element when there is no <termref def="key-governing-ed"/>,
       and when there would otherwise be neither a <termref def="key-governing-ed"/> nor a
       <termref def="key-governing-type-elem"/>, <termref def="key-lva">lax assessment</termref>
       is performed, checking the local validity of an element 
       information item 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>
	    <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 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 <bibref ref="ref-xml"/>'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 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, 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>Its <termref def="key-dd">context-determined
	    declaration</termref>.</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 its <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>it 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
	       it</phrase> </p></item> 
	    <item><p>a <!--*
* material suppressed here by diff group modals *
*--><phrase dg="modals"><termref def="key-null">non-absent</termref></phrase>

	      <termref def="key-cdt"/> exists for it </p></item>
	   </olist> 
	  </p></item> 
	</olist> 
       <!--*
* material suppressed here by diff group vm3a *
*-->
       <phrase dg="vm3a">If none of these apply, there is
	no <termref def="key-governing-ed"/> (or, in equivalent words, it 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 <termref def="key-cdt"/>. </p>
	 </item>
	 <item dg="vm3a">
	  <p>The <termref def="key-cdt"/>.</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 id="cvc-assess-elt" type="cvc">
      <head>Schema-Validity Assessment (Element)</head>
      <p>The schema-validity assessment of an element information item
       depends on its <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="key-sva" term="strictly assessed" role="local" 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</term> 
	 <!--* 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="c-xd">
	   <!--*
* material suppressed here by diff group ep99 *
*-->
	   <p><olist role="Ortest">
	     <item id="c-ed">        
	      <olist role="Andtest">
	       <item>
		<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> <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>
	      <p>The <!--*
* material suppressed here by diff group ep20 *
*--> <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="c-deepa" dg="b4269">
	 <!--*
* material suppressed here by diff group ep99 *
*--><p>
	    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">
	 <!--*
* material suppressed here by diff group ep99 *
*--><p>
        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 *-->
      </p>
      <!--*
* material suppressed here by diff group b4269 *
*-->

      <p><termdef id="key-lva" term="laxly assessed"> If the 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="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 *
*--> 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 dg="b3725"><phrase dg="b2225"> 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><!--*
* 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></termdef>. <!--*
* material suppressed here by diff group rq146-x *
*--></p>

      <ednote role="pf" dg="rq144wg2">
       <edtext>
	In version 1.0 of this specification, the fallback to lax
	validation described in the preceding paragraph was optional,
	not required. 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>

      <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>
     <!--*
* 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 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
		   <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
		   <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 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 have been checked and
	failed on the element information item, as defined by <specref ref="cvc-identity-constraint"/>. <note><p>
	  <!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">If more than one identity
	   constraint fails to be satisfied, it is <termref def="key-impl-dep">implementation-dependent</termref>
	   which of the failed identity constraints are included
	   here.</phrase> As a result, processors <!--*
* material suppressed here by diff group f2f0701a *
*--> <phrase dg="f2f0701a"><rfc2119>may</rfc2119></phrase> produce different values for
	  this property.
	 </p></note>
       </propdef>
       <propdef name="failed assertions" id="e-assertions" dg="b2861cc-4">
       A list of <compref ref="as"/>s that have been checked and
	failed on the element information item, as defined by <specref ref="cvc-assertion"/>. <note><p>
	  <!--*
* material suppressed here by diff group f2f0701a *
*--><phrase dg="f2f0701a">If more than one assertion fails
	   to be satisfied, it is <termref def="key-impl-dep">implementation-dependent</termref> which of the failed
	   assertions are included here.</phrase> As a result,
	  processors <!--*
* material suppressed here by diff group f2f0701a *
*-->
	  <phrase dg="f2f0701a"><rfc2119>may</rfc2119></phrase> produce
	  different values for this property.
	 </p></note>
       </propdef>
      </proplist>
     </constraintnote>
     </div4>

     <div4 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 <clauseref ref="c-nl"/> 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 <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 <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 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 <termref def="td">type definition</termref>.</propdef>
       <propdef id="e-type_definition_namespace" name="type definition namespace" dg="rq144nv">The <xpropref role="anon">target
	 namespace</xpropref> of the <termref def="td">type
	 definition</termref>.</propdef>
       <propdef name="type definition anonymous" id="e-type_definition_anonymous" dg="rq144nv"><pt>true</pt>
	if the <xpropref role="anon">name</xpropref> of the <termref def="td">type definition</termref> is <termref def="key-null">absent</termref>, otherwise
	<pt>false</pt>.</propdef>

       <propdef name="type definition name" id="e-type_definition_name" dg="rq144nv">The <xpropref role="anon">name</xpropref> of
	the <termref def="td">type definition</termref>, if <!--*
* material suppressed here by diff group rq144wgno *
*--><phrase dg="rq144wgno">the <propref comp="std" prop="name"/></phrase>
	is not <termref def="key-null">absent</termref>.  If <!--*
* 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> 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>

<!-- <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 <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 <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/2008/WD-xmlschema11-2-20080620/datatypes.html#QName">QName</xtermref> or <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.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/2008/WD-xmlschema11-2-20080620/datatypes.html#dt-basicmember">basic
	   member</xtermref> of its <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.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/2008/WD-xmlschema11-2-20080620/datatypes.html#dt-basicmember">basic
	member</xtermref> of its <xtermref
	href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.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>
      <p>The first (<termref def="key-iso">item isomorphic</termref>)
       alternative 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 second, 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 <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/2008/WD-xmlschema11-2-20080620/datatypes.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 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>
    </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 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>
	<!--*
* 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 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 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 <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.html#dt-derived">derivation</xtermref> 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 <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.html#dt-derived">derivation</xtermref> 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 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 <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.html#dt-derived">derive</xtermref> 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 <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.html#dt-derived">derive</xtermref> additional types from a given complex type.</p></item>
     <item><p>Controlling the permission to substitute, in an instance, elements of a <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.html#dt-derived">derived</xtermref>
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 <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.html#dt-derived">derived</xtermref> 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 <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.html#dt-derived">derivation</xtermref> 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 <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.html#dt-derived">derived</xtermref> by either of
extension or restriction; the explicit values <pt>extension</pt>, and <pt>restriction</pt> prevent further
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.html#dt-derived">derivations</xtermref> 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 <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.html#dt-derived">derivations</xtermref> are possible</termdef>.  Finality is <emph>not</emph>
inherited, that is, a type definition <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.html#dt-derived">derived</xtermref> 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 <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/datatypes.html#dt-derived">derived</xtermref> 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 
       <clauseref ref="c-ctaw"/>
       <phrase dg="b5152">of the rule for 
	<propref comp="ctd" prop="attribute wildcard"/></phrase>, <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">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>
      </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>

<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>XML Representation of Complex Type Definition<phrase dg="b5156"> Schema Component</phrase>s</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 <eltref ref="simpleType"/> 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>
	 <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"><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>
	   </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, 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"/>, and
	<specref ref="dcl.ctd.anyatt"/></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" eltname="openContent" dg="vm13.b5152-move"/>
     </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
       <specref ref="dcl.ctd.ctcc.explicit"/>).
       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 dg="b5156d">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><!--*
* material suppressed here by diff group b5156d *
*-->
		  </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"