﻿<?xml version="1.0" encoding="UTF-8"?><!-- Id: datatypes.xml,v 1.7.2.479 2012/03/25 17:55:21 cmsmcq Exp  --><?xml-stylesheet type='text/xsl' href='xmlschema_nodiffs.xsl'?>
<!DOCTYPE spec
  SYSTEM "local.dgdf.dtd">
<spec dgdf="dg-approved.xml" dgdf_desc="the status-quo text without adornment" w3c-doctype="rec" status="final" role="TR-copy" schemaProper="./XMLSchema.xsd" schemaDump="./XMLSchema.xsd.dmp" docStatus="final" otherSpec="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html" me="datatypes" suffix="" primSchema="./primitives.nxsd" drvdSchema="./derived.nxsd"><header><title><phrase dg="ep26">W3C</phrase> XML Schema <phrase dg="ep26">Definition Language (XSD)</phrase> 1.1 Part 2: Datatypes</title><w3c-designation>rec-20120405</w3c-designation><!--* <w3c-doctype>W3C Working Draft</w3c-doctype> *--><!--* <w3c-doctype>Editors' Draft</w3c-doctype> *--><w3c-doctype>W3C Recommendation</w3c-doctype><pubdate><day>5</day><month>April</month><year>2012<!--* Id: datatypes.xml,v 1.7.2.479 2012/03/25 17:55:21 cmsmcq Exp  *--></year></pubdate><publoc> 
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/">http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/</loc> 
</publoc><altlocs><loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/datatypes.xml">XML</loc><!--* 
<loc href="http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/datatypes.diff-1.0.html">XHTML with changes since version 1.0 marked</loc>
<loc href="http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/datatypes.diff-wd.html">XHTML with changes since previous Working Draft marked</loc>
*--><!--* old version, for backout or diff *--><!--*
<loc href="http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/datatypes.diff-1.0.html">XHTML with changes since version 1.0 marked</loc>
<loc href="http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/datatypes.diff-wd.html">XHTML with changes since previous Working Draft marked</loc>
*--><loc xmlns:xlink="http://www.w3.org/1999/xlink" href="datatypes.diff-1.0.html">XHTML with changes since version 1.0 marked</loc><loc xmlns:xlink="http://www.w3.org/1999/xlink" href="datatypes.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><!--*
* material suppressed here by diff group dup-2214 *
*--><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="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-2/">http://www.w3.org/TR/xmlschema11-2/</loc></latestloc><prevlocs>
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/PR-xmlschema11-2-20120119/">http://www.w3.org/TR/2012/PR-xmlschema11-2-20120119/</loc>
<!--*
<loc href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/">http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/</loc>
<loc href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/">http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/</loc>
<loc href="http://www.w3.org/TR/2009/CR-xmlschema11-2-20090430/">http://www.w3.org/TR/2009/CR-xmlschema11-2-20090430/</loc>
<loc href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20090130/">http://www.w3.org/TR/2009/WD-xmlschema11-2-20090130/</loc>
<loc href="http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/">http://www.w3.org/TR/2008/WD-xmlschema11-2-20080620/</loc>
<loc href="http://www.w3.org/TR/2006/WD-xmlschema11-2-20060217/">http://www.w3.org/TR/2006/WD-xmlschema11-2-20060217/</loc>
<loc href="http://www.w3.org/TR/2006/WD-xmlschema11-2-20060116/">http://www.w3.org/TR/2006/WD-xmlschema11-2-20060116/</loc>
<loc href="http://www.w3.org/TR/2005/WD-xmlschema11-2-20050224/">http://www.w3.org/TR/2005/WD-xmlschema11-2-20050224/</loc>
<loc href="http://www.w3.org/TR/2004/WD-xmlschema11-2-20040716/">http://www.w3.org/TR/2004/WD-xmlschema11-2-20040716/</loc>
*-->
</prevlocs><authlist><authlist role="1.1"><author><name>David Peterson</name><affiliation>invited expert (SGML<emph>Works!</emph>)</affiliation><email xmlns:xlink="http://www.w3.org/1999/xlink" href="mailto:davep@iit.edu">davep@iit.edu</email></author><author><!--* diff="add" dg="wgi-20080613"> *--><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><name>Ashok Malhotra</name><affiliation>Oracle Corporation</affiliation><email xmlns:xlink="http://www.w3.org/1999/xlink" href="mailto:ashokmalhotra@alum.mit.edu">ashokmalhotra@alum.mit.edu</email></author><author><!--* diff="add" dg="wgi-20080613"> *--><name>C. M. Sperberg-McQueen</name><affiliation>Black Mesa Technologies LLC</affiliation><email xmlns:xlink="http://www.w3.org/1999/xlink" href="mailto:cmsmcq@blackmesatech.com">cmsmcq@blackmesatech.com</email></author><author><!--* diff="add" dg="wgi-20080613"> *--><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"><!--*
* material suppressed here by diff group crhax *
*--><author dg="crhax"><name>Paul V. Biron</name><affiliation>Kaiser Permanente, for Health Level Seven</affiliation><email xmlns:xlink="http://www.w3.org/1999/xlink" href="mailto:paul@sparrow-hawk.org">paul@sparrow-hawk.org</email></author><author><name>Ashok Malhotra</name><affiliation>Oracle Corporation</affiliation><email xmlns:xlink="http://www.w3.org/1999/xlink" href="mailto:ashokmalhotra@alum.mit.edu">ashokmalhotra@alum.mit.edu</email></author></authlist></authlist><errataloc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/XML/XMLSchema/v1.1/1e/errata.html"/><translationloc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2003/03/Translations/byTechnology?technology=xmlschema"/><status><!--* 2012-03-23:  lose most of the diff markup here. *--><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     
    <!--*
* material suppressed here by diff group wg-internal *
*-->
    <phrase dg="wg-internal">
     W3C Recommendation 
     specifies
    </phrase>
    the W3C XML Schema Definition Language (XSD) 1.1 Part 2:
    Datatypes.
    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 wg-internal *
*-->
   </p><!--* Paragraphs specific to individual editorial proposals go here.
    * They should be deleted after the proposal is acted on, but
    * do please keep one here, for use as a template.

<p diff="add" dg="rec12-main">It also includes an editorial proposal
for reconciliation of the treatment of the special simple types
(anySimpleType and anyAtomicType) between Datatypes and Structures.</p>

*--><!--*
* material suppressed here by diff group telltale *
*--><p id="p-changes-since-prev-wd">
    Changes since the previous public Working Draft include the following:
   </p><!--* When any draft is published, clear this list
       * and remove the preceding comment.  Then just copy change records
       * into this list. *--><ulist id="ul-changes-since-prev-wd"><!--* 

    <item>
    <p>[No changes yet; the body of this document is the same
    as that of the most recent public draft.  The list of changes
    made since 1.0 has been edited.]</p>
   </item>
    *--><!--* Big changes, selling points, hurrah *--><!--* Smaller technical issues, user-facing *--><!--* Smaller technical issues, implementor-facing *--><!--* editorial, stylistic *--><!--* not worth individual description *--><item><p>Some minor errors, typographic and otherwise,
      have been corrected.</p></item></ulist><p>For those primarily interested in the changes since version 1.0,
    the appendix <specref ref="changes"/> is the recommended starting
    point.  An accompanying version of this document displays in color
    all changes to normative text since version 1.0; another shows
    changes since the previous Working Draft.</p><p>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>) 
    and note explicitly that you have not made a Bugzilla entry for
    the comment. Each Bugzilla entry and email message should contain
    only one comment.</p><!--*
* material suppressed here by diff group non-final *
*--><!--*
* material suppressed here by diff group non-final *
*--><p dg="final">This document has been reviewed by W3C
   Members, by software developers, and by other W3C groups and
   interested parties, and is endorsed by the Director as a W3C
   Recommendation. It is a stable document and may be used as
   reference material or cited from another document. W3C's role in
   making the Recommendation is to draw attention to the specification
   and to promote its widespread deployment. This enhances the
   functionality and interoperability of the Web.</p><p dg="final">
    An <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://lists.w3.org/Archives/Public/www-archive/2012Mar/0028.html">implementation report</loc> for XSD
    1.1 was prepared and used in the
    Director's decision to publish the previous version of this specification 
    as a Proposed Recommendation.  The Director's decision to publish 
    this document as a W3C Recommendation is based on consideration 
    of reviews of the Proposed Recommendation by the public and by 
    the members of the W3C Advisory committee.
  </p><p dg="final">The W3C XML Schema Working Group intends to process comments
    made about this recommendation, with any approved changes being
    handled as errata to be published separately.</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 the XML Schema language version 1.1 are discussed in the
    <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> document. The authors of this document
    are the members of the XML Schema Working Group.  Different parts
    of this specification have different editors.
   </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" role="disclosure" 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>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><p>
<emph>XML Schema: Datatypes</emph> is part 2 of the specification of
the XML Schema language. It defines facilities for defining datatypes
to be used in XML Schemas as well as other XML specifications. The
datatype language, which is itself represented in XML<!--*
* material suppressed here by diff group rq152a *
*-->, provides a superset of the
capabilities found in XML<!--*
* material suppressed here by diff group rq152a *
*-->
document type definitions (DTDs) for specifying datatypes on elements
and attributes.
<!--* <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><langusage><language id="EN">English</language><language id="ebnf">Extended Backus-Naur Form (formal grammar)</language></langusage><revisiondesc><slist><sitem id="telltale">A 'telltale' diff group is for use labeling phrases
which tell the reader which proposal / requirement / issue a change is
connected with.  It's intended for use when we provide only a single 
version of the spec with diff markup for several relatively small changes.
To distinguish changes related to RQ-nnn from those related to RQ-kkk
in the same display text, use 
<!--*
* material suppressed here by diff group telltale *
*-->
or 
<!--*
* material suppressed here by diff group telltale *
*-->
(or rather dg="rqnnn-telltale)
near the changes.  (This assumes the changes aren't anywhere near each
other; if they are, perhaps they shouldn't be in the same display.)
AFTER THE PRESENTATION FORM OF THE PROPOSALS IS PREPARED, or after the
WG approves the change, THE PHRASE ELEMENTS SHOULD GO AWAY, and
so should the telltale rqnnn-telltale diff group.

The 'telltale' diffgroup is also used (as of 2005-08-25) in the Status
section on the list of proposals included.

This usage proposal is currently (2005-08-25) experimental, but has
been used successfully for a couple of weeks.
For brevity, sometimes the suffix -tt is used instead of -telltale.
</sitem><sitem id="wg-internal">Phrases in status section which apply only to
to WG-internal draft copies.  (Copied into datatypes.xml from structures.xml,
2005-12-14.)</sitem><sitem id="wg-internal-silent">Phrases which apply only to
to WG-internal draft copies but shouldn't be colored because
they throw the change extraction stylesheet off.</sitem><sitem id="diffHacks">Note to the reader: the following 'phrase' elements are 
here for use in supplying diff markup in auto-generated material.  Do not
delete them, and edit them only if you know what you are doing (i.e. if you
have reviewed either the output or the stylesheet or both).

  <phrase diff="add" dg="rec12-tableaux" role="hack" id="odiff_hack">normal</phrase>
  <phrase diff="add" dg="rec12-tableaux" role="hack" id="idiff_hack">normal</phrase>
  <phrase diff="add" dg="rec12-tableaux" role="hack" id="arrow_hack"/>
  <phrase diff="add" dg="rec12-tableaux" role="hack" id="odiff_del_hack">doom</phrase>
  <phrase diff="add" dg="rec12-tableaux" role="hack" id="idiff_del_hack">doom</phrase>
  <phrase diff="add" dg="rec12-tableaux" role="hack" id="del_arrow_hack"/>
  <!--* MSM essays a change to wording.  I'm leaving the old words here because
      * I'm not sure the change is an improvement. 
  <phrase diff="add" dg="rec12-tableaux" id="must_not_prose"> with <pt>fixed</pt> values 
as given &mdash; they <rfc2119>must not</rfc2119> be further restricted:</phrase>
  <phrase diff="add" dg="rec12-tableaux" id="may_prose1"> with values as given &mdash; 
they <rfc2119>may</rfc2119> be further restricted:</phrase>
      *-->
  <phrase dg="rec12-tableaux" id="must_not_prose"> with <pt>fixed</pt> values; these
facets <rfc2119>must not</rfc2119> be changed from the values shown:</phrase>
  <phrase dg="rec12-tableaux" id="may_prose1"> with the values shown; these
facets <rfc2119>may</rfc2119> be <!--*
* material suppressed here by diff group b6734 *
*--><phrase dg="b6734">specified</phrase>
in the derivation of new types<phrase dg="b6734">, if the
value given is at least as restrictive as the one shown</phrase>:</phrase>
  <phrase dg="rec12-tableaux" id="may_prose2"> <rfc2119>may</rfc2119> also
specify values for the
     following</phrase></sitem><sitem id="junk">diff group junk:  a few homeless targets; should
probably ALWAYS BE SHOW unless nothing is, or it is empty</sitem><sitem id="do-not-show">diff group for holding stuff we think we
want to keep (in case we later need it) but which we don't want
to show.</sitem><sitem id="errata-2e">Some changes (assumed to be 2e) which were
marked without a diff group; this diff group added so as to control
them better.</sitem><sitem id="fa1">diff group fa1:  RQ-24 facets proposal, changes
made BEFORE the publication of the first public working draft.
APPROVED SOME TELECON 2004-10</sitem><sitem id="fa1.z">diff group fa1:  RQ-24 facets proposal, changes
made AFTER the publication of the first public working draft. APPROVED
SOME TELECON 2004-10</sitem><sitem id="cvs1">diff group cvs1:  Constructed Values Appendix
(div1)</sitem><sitem id="cvs1_pwd">diff group cvs1_pwd:  Constructed Values Appendix
as a whole (to avoid nested like-named diffs)</sitem><sitem id="num1">diff group num1:  Numerical Values Appendix
(div2); requires cvs1</sitem><sitem id="numap1">diff group numap1:  in-text productions, etc.,
first cut; requires funbase, nu1, num1</sitem><sitem id="funbase">diff group funbase:  The functions appendix
in its entirety.  ALWAYS ACCEPT OR SHOW</sitem><sitem id="nu1">diff group nu1:  basic numerical functions;
requires funbase, num1, cvs1</sitem><sitem id="du0">diff group du0:  first Ph 2 for duration;
requires numap, nu1, num1, funbase. NOT YET MARKED;  APPROVED
pre-FPWD</sitem><sitem id="du0.ysc">year-sec conformance note.  Distinguished from du0
to allow special treatment to preserve links.  The record is sadly
unclear.</sitem><sitem id="du0_prodigal">diff group du0_prodigal marks a paragraph
which was inadvertently marked 11 Jan as added by du1 and thus omitted
from the Feb. draft, since du1 was not status quo in Feb 2005.  It
needs to be distinct from the rest of du0 because it needs to shown as
added against the Feb WD.</sitem><sitem id="du1">diff group du1:  second set of revs for duration
(compare du2)</sitem><sitem id="du2">diff group du2:  second set of revs for
dayTimeDuration and yearMonthDuration (compare du1)</sitem><sitem id="dudt">diff group dudt:  function for adding duration to dateTime</sitem><sitem id="dudt_g">(experimental) diff group dudt_g: movement of prose
commentary from the existing appendix G into the new statement of the
algorithms (the new locations will be marked as add with this diff
group, but I plan to show that diff group as 'post' so as not to color
the paragraphs)</sitem><sitem id="dudt2">(experimental) diff group dudt2: revision of prose
commentary moved from the existing appendix G into the new statement
of the algorithms</sitem><sitem id="rq122d_sg">Corrections suggested by Sandy Gao's review of
proposal RQ-122-d for new duration algorithm.</sitem><sitem id="dt1">diff group dt1:  RQ-13 date/time rewrite, first
part Ph 2 (d/t app and gDay); requires funbase, nu1, num1; APPROVED
2004-08-27 FTF</sitem><sitem id="dt2">diff group dt2:  RQ-13 date/time rewrite, second
part Ph 2 (time and others); requires dt1, funbase, nu1, num1</sitem><sitem id="dtr">diff group dtr:  date/time nonnormative
description (INCLUDES 2 NORMATIVE TABLES); requires dt1</sitem><sitem id="dt3">diff group dt3:  RQ-13 date/time rewrite, third
part Ph 2 (time and others); requires dt1, dt2, funbase, nu1,
num1</sitem><sitem id="dt2-3">diff group dt2-3:  RQ-13 date/time rewrite,
third part of the phase-2 proposal (time and others).  This diff group
marks (as 'del') a single item which was added in dt2 and then delled
in dt3. Accept (i.e. display as "post") as a rule, but reject it (show
as "pre") if dt2 is accepted and dt3 is rejected, and show it
(show="colour") if dt2 is accepted and dt3 is set to 'show'.
[2006-10-06: no longer in use (it shows up now only on an issue 
element which has been commented out).  This entry retained for
historical reasons and sentimentality, but it's probably just 
cruft.]
</sitem><sitem id="dt4">diff group dt4:  RQ-13 date/time rewrite, fourth
part Ph 2 (time and others); requires dt1, dt2, dt3, funbase, nu1,
num1</sitem><sitem id="pd1">diff group pd1:  RQ-31 precisionDecimal first cut
for approval; co-requires pre, pd2, pd3; requires pdf</sitem><sitem id="pdo">diff group pdo:  RQ-31 precisionDecimal first
cut, deletion of old decimal; co-requires pre, pd1 ,pd3; requires pdf.
2005-01-20: WG chooses two-primitive approach, rejects this change.
2005-01-26: MSM removes this diff group to reduce cruft in the
document.
</sitem><sitem id="pd2">diff group pd2:  RQ-31 precisionDecimal first cut, 
addition of new aPDecimal; co-requires pre, pd1, pd2; requires pdf.
2005-01-20: WG chooses two-primitive approach, rejects this change.
2005-01-26: MSM removes this diff group to reduce cruft in the document.
</sitem><sitem id="pre">diff group pre:  Precision Appendix; co-requires pd1, 
requires num1 and cvs1.
Final wording approved (with changes) 2005-02-04.</sitem><sitem id="pdf">diff group pdf:  numerical functions just for 
precisionDecimal (RQ-31); requires num1 (??).
Final wording approved (with changes) 2005-02-04.</sitem><sitem id="pdf_m">diff group pdf:  numerical functions for 
precisionDecimal (RQ-31) in two-primitive form.
Final wording approved (with changes) 2005-02-04.</sitem><sitem id="pdf_u">diff group pdf:  numerical functions for
precisionDecimal (RQ-31) in single-primitive form.  Removed 2005-01-26
after WG chose two-primitive form.</sitem><sitem id="aat">diff group aat:  anyAtomicType (RQ-???); may require fa1 ??    
APPROVED with changes FTF 2004-11-10.
Changes decided by WG entered (as aatf), 2005-01-25.
Draft final wording approved (with changes) 2005-02-04.
</sitem><sitem id="aat1">diff group aat1:  anyAtomicType (RQ-???); requires aat</sitem><sitem id="trm1">diff group trm1:  terminological cleanup begun
with tightening meaning of derived (RQ-120); </sitem><sitem id="rq31facets">diff group rq31facets: with MSM's proposed
changes related to facets of precision decimal.  This takes a
single-primitive ('unitarian') view of precision decimal and legacy
decimal (here under the name aPdecimal). Compatible with both rq31m
and rq31u.</sitem><sitem id="rq31u">diff group rq31u: with changes for a one-primitive
('unitarian') version of precision decimal.  Incompatible with: rq31m,
which takes the manichean view. Assumes: pd1, pd2, pre, pdf, num1,
pdo(which deletes old decimal), pd2 (which inserts new aPDecimal). The
WG chose the Manichean decimal proposal over the Unitarian one,
2005-01-20.  Diffs for group rq31u were removed 2005-01-26.
</sitem><sitem id="rq31m">diff group rq31m: with changes for a two-primitive
('manichean') version of precision decimal.  Incompatible with: rq31u,
which takes the unitarian view, pdo, which deletes old decimal, pd2,
which inserts new aPDecimal. Assumes: pd1, pre, pdf, num1. Final
wording approved (with changes) 2005-02-04.
</sitem><sitem id="fa1-fix">diff group fa1-fix: MSM's proposed changes for
fixing problems (missing term definitions, in particular) caused by
the fact that fa1 was incomplete and left the document in an unstable
state.</sitem><sitem id="iff">diff group iff: with an editorial proposal
(2005-01-01) for being more consistent about the use of conditionals
and biconditionals.  When terms are being defined (whether or not
marked as termdefs) or necessary and sufficient conditions for some
state are being given (e.g. in constraint notes, which define terms
like 'facet valid with respect to X'), this diff group proposes to use
'if' only for conditions which are sufficient but not necessary; if
the conditions are both sufficient and necessary, then use 'if and
only if'.</sitem><sitem id="pdf_tweak">diff group pdf_tweak: for proposed improvements
to diff group pdf (all gone away now, and then come back again). Final
wording approved (with changes) 2005-02-04. </sitem><sitem id="review">diff group review: for marking stuff that is really intended
only for editorial review (usually to be used on ednotes).</sitem><sitem id="wdd">diff group wdd: for working-draft deviations:  changes
between the publication of the first public WD in July and the advent
of thorough and permanent change markup.  (Diff group wdd begun 9
January 2005, but diff not completed.  It was looking like another
three hours work.)  I.e. wdd should mark all and only those
differences between TR/2004/WD-xmlschema11-2-20040716/datatypes.xml
and xse/datatypes/datatypes.xml which are not already marked.  When we
run the result through the dg.xsl filter with wdd set to reject, the
result should be (modulo whitespace and other non-significant
differences) substantively the same as the public WD.
</sitem><sitem id="dpno">diff group dpno: change proposals transferred into
this file from the experimental fork datatypes.newOrg.xml. At the
moment, the quasi-systematic changes of ID have not been
reproduced.</sitem><sitem id="fpwd-rescinded-add">diff group fpwd-rescinded-add: marks
some paragraphs added in the first public working draft but since
deleted again.</sitem><sitem id="fpwd-rescinded-del">diff group fpwd-rescinded-del: marks
some paragraphs marked as deleted in the first public working draft
but since restored.</sitem><sitem id="aatf">diff group aatf: anyAtomicType (RQ-141).  Changes
decided on by WG at Redwood Shores ftf 2004-11-10. Draft final wording
approved (with changes) 2005-02-04.</sitem><sitem id="aatj">diff group aatj: anyAtomicType (RQ-141).  Proposal
for change, submitted to WG at Brisbane, January 2005 (hence the 'j').
Final wording approved (with changes) 2005-02-04. (The single use of
this got commented out later, I suspect because it was merely a change
to a non-sq proposal and doesn't need special processing in future
publications.  I leave this entry here and the commented-out text in
the body of the doc out of a sense of historical piety or something.
Later we'll rip them out.)</sitem><sitem id="aatg">diff group aatg: anyAtomicType (RQ-141).  Changes to
correct errors found in review of aatf, including changes agreed by WG
in telcon of 2005-02-04 when the RQ-141 proposal was approved.</sitem><sitem id="vrd">diff group vrd: make validation rules declarative. Not
yet complete.  Stems from rq31m edits:  first cut at editing the upper
and lower bounds facets included reformulation of the validation rules
to talk about numeric value.  When the order relation for numeric
values and pDecimal values was defined, however, it became clear that
the validation rules didn't need that change, and the remaining change
(making them declarative) didn't really have anything to do with
anyAtomicType.</sitem><sitem id="fpwd">diff group fpwd: used to mark things that changed
between 1.0 2E and the first public working draft of July 2004. (N.B.
issues elements and editorial notes are not consistently marked as
added.  They may consistently be unmarked.)</sitem><sitem id="rq001">diff group rq001: marks a phase-2 proposal to
resolve requirement RQ-001, adopted by the WG on 2 March 2004.</sitem><sitem id="rq31fix">diff group rq31fix: marks some wording changes
intended to address problems identified by Dave Peterson, Sandy Gao,
and Noah Mendelsohn after the draft final wording for RQ-31 went to
the WG.</sitem><sitem id="ep01">Micro-component-related changes (no longer in use
here, I think)</sitem><sitem id="ep01-part2">Micro-component-related changes specifically in
part 2.  Split off from the preceding 2005-06-07, so that the status
quo for Structures can continue to show ep01 as a non-status-quo
change, while for Datatypes it can be suppressed silently.</sitem><sitem id="ep01.add.ep01.del">Hack for section 4.4, added by EP-01 and
then removed from the EP-01 proposal.  On 2005-08-29 MSM believes
section 4.4 was never part of the status quo and can be deleted
entirely. This hack is temporary, and only needs to be kept while we
still have a residue of doubt about the question.</sitem><sitem id="wd2hax">Last-minute hacks to make the Working Draft of
February 2005 be valid and produce valid clean HTML.</sitem><sitem id="rq120">MSM's draft phase-2 proposal for RQ-120, which uses
'ordinary' as the general term for non-special types and 'constructed'
as the general term for types of classes 3 and 4.</sitem><sitem id="rq120c">Bits of the RQ-120 proposal which should only be
included if rq120o is excluded.</sitem><sitem id="rq120o">An alternate form of the phase-2 proposal for
RQ-120, which uses 'ordinary' for classes 3 and 4.</sitem><sitem id="rq120fix">Changes made in the course of our work on RQ-120
that were not marked as changes at the time. Some from version 152
(davep), some from version 144 (cmsmcq). Found and marked 26 August
2005.
</sitem><sitem id="lm.rel">lm.rel:  For making lex maps not functions.</sitem><sitem id="flfix">flfix: value/lexical space and lex/canon mappings
for float and double.</sitem><sitem id="flfix-tt">flfix-tt: comments only for flfix approval
cycle.</sitem><sitem id="lp">lp:  Introduction of 'literate programming' markup. A
purely internal change: no change to presentation or substance of the
material.  Thus no need for WG review or approval; marked here solely
for editorial convenience.</sitem><sitem id="rq20">Addition of type definitions for the two new totally
ordered subtypes of duration; completes satisfaction of RQ-20.</sitem><sitem id="rq20ep">Changes made en passant in the schema document for
schema documents and the DTD for schema documents, while doing
RQ-20.</sitem><sitem id="rq20rb">Changes which had been made in the externally
stored version of the schema document for schema documents and the DTD
for schema documents, which MSM found while doing RQ-20 and which MSM
proposes to roll back (subject to objection from the other editors).
To roll them back, display rq20rb as 'pre'.</sitem><sitem id="rq20ids">Addition of id attributes on the declarations of
the two new totally ordered subtypes of duration, done on editorial
initiative 2006-01-09.</sitem><sitem id="rq123">Changes for RQ-123 (allow year 0000).
Approved 17 June 2005.</sitem><sitem id="wd17">Resolution of issue wd-17 (changes to description of
value space of duration), including amendments of 29 April
2005.</sitem><sitem id="noleap">Changes for task 2-122-a remove leap seconds.
Decided by WG at Tech Plenary, action TP5-4.</sitem><sitem id="rq122a_sg">Corrections arising from Sandy Gao's comments on
proposal RQ-122a.</sitem><sitem id="dt3-del-noleap">Changes originally added by dt3 and deleted
by noleap. It was set as "del" for generating the noleap proposal.
After the proposal was accepted, the single occurrence of this diff
group was changed to "add". The dg-approved file should (and does)
show this dg as "pre"). </sitem><sitem id="idleap">Changes for alternate text: leap second support is
implementation defined.  (Prepared on spec, in case the WG changes
plans.)  The SQL spec says <quote>Whether an SQL-implementation
supports leap seconds, and the consequences of such support for date
and interval arithmetic, is <termref def="key-impl-def"/>.</quote> Short and
sweet.</sitem><sitem id="leapseconds">Addition of proper bibliographic reference to
ITU-R TF.460-6, which defines UTC.</sitem><sitem id="totl">Correction to timeOnTimeline function
(off by one error in step 3b).</sitem><sitem id="wd-2">Fix for wd-2 (add value constraint to list of duties
performed by identity checking).</sitem><sitem id="wd-3">Fix for wd-3 (wording in section 2.2.1 about
identity of values across types)</sitem><sitem id="wd-4">Fix for wd-4.</sitem><sitem id="wd-5">Fix for wd-5.</sitem><sitem id="wd-11">Fix for wd-11 (fundamental facets).</sitem><sitem id="wd-19">Fix for wd-19 (base64).</sitem><sitem id="wd-21">Fix for wd-2 (canonical form health warnings for
QName and NOTATION).</sitem><sitem id="wd-23">Fix for wd-23 (misleading / erroneous labels in the
table of applicable facets). Most changes are actually in dg.xsl and
xmlschema.xsl, not here.  Approved 2005-06-17.</sitem><sitem id="wd25">Fix for wd-25 (pointing to IRI spec).</sitem><sitem id="partialfix">Fix for handling of partial
implementations.</sitem><sitem id="partialfixfix">Post-hoc marking of changes made at the same
time as partialfix (rev 1.7.2.183) which were accidentally left
unmarked.</sitem><sitem id="partialfixfixfix">Minor repair to the partial-fix proposal
agreed on during ftf meeting 30 January 2006.</sitem><!-- never incorporated into SQ; now the fix for bug 6047 --><sitem id="rq150c.add.partial.del">Material introduced by 150c
which was deleted (moved) by partialfix.</sitem><sitem id="decfix">Fix for facet-sensitive canonical mapping for
decimal, and text cleanup. (RQ-150, part of RQ-21)</sitem><sitem id="decfix_movement">Movement of data for decfix diff group.
Show as pre or post, not as colour (unless you want to make it
impossible to follow the fine-grained changes).</sitem><sitem id="rq31m_decfix_movement">Movement of data for decfix diff
group. This paragraph was originally added by rq31m, and moved by
decfix. It was then deleted by rq21-lexmaps. Show accordingly.</sitem><sitem id="context">Lexmaps for context-sensitive QName and ENTITY,
and Canonmap for facet-sensitive decimal.</sitem><sitem id="rec12-main">RQ-141b Changes to reconcile overlap/conflict
between parts 1 and 2 -- various items.  Much of this was accepted by
the WG in Edinburgh 2005-09 as part of the omnibus proposal of 31
August. The parts that were not have been relabeled
rec12-main-excepted.</sitem><sitem id="rec12-main-excepted">RQ-141b Changes to reconcile
overlap/conflict between parts 1 and 2 -- various items which were not
accepted as part of the omnibus proposal of 31 August (they were
'excepted' from the decision to approve the omnibus).</sitem><sitem id="rec12-tableaux">RQ-141b Changes to reconcile
overlap/conflict between parts 1 and 2 -- provide better facet
information in section 3</sitem><sitem id="rec12-map">RQ-141b Changes to reconcile overlap/conflict
between parts 1 and 2 -- fix long-standing problems with mapping rules
in 4.1.2.  Every section in which this diff group appears was excepted
from the approval of the omnibus proposal in Edinburgh.  (That is why
this diff group has not been split in two the way rec12-main has
been.)</sitem><!--* <sitem id="rec12-map">RQ-141b Changes to reconcile overlap/conflict between parts 1 
and 2. Fix long-standing problems with mapping rules in 4.1.2</sitem> *--><sitem id="rec12-map-1853">
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=1853">define
'ancestor'</loc></sitem><sitem id="dpno.del.rec12-map.del">dpno.del.rec12-map.del:
portmanteau hack for paragraphs deleted by dpno (but still not in the
status quo) and deleted (again) by rec12-map; these are currently
marked del, so make this diff group's disposition equal to that of
rec12-map.</sitem><sitem id="dpno.add.rec12-map.del">dpno.add.rec12-map.del:
portmanteau hack for paragraphs added by dpno and deleted by
rec12-map.  These are currently marked 'add', so to show rec12-map,
make this diff group 'pre'.</sitem><sitem id="rec12-tt">A telltale for sections with a lot of rec12-map
and rec12-main changes.</sitem><sitem id="rq100">rq100: changes to achieve requirement RQ-100
canonical form for language.  Approved with changes 2005-08-26.
</sitem><sitem id="wd-23-bis">wd-23-bis: another attempt to fix the table of
applicable facets</sitem><sitem id="wd26">wd26: restore the notion of 'duration' in describing
timezones. Approved 1 July 2005.</sitem><sitem id="wd31">wd31: recast sentences about to Unicode database
changes. Approved 1 July 2005.</sitem><sitem id="sfs-cleaning">sfs-cleaning: trying to synch the schema for
schemas with recent changes found when checking ht's rec12
changes</sitem><sitem id="rq21-lit">rq21-lit: define 'literal' properly and use it to
denote the members of lexical spaces (some diffs are in local.dtd,
specifically the change in the entity declaration 'string' from
'character string' to 'literal'). When this diff group goes to the WG,
we must remember to note that the change proposed includes changing
each occurrence of the word 'literal' in the running prose (not in the
tableaux) to a termref.  Those changes can be reverted easily and we
would like not to show them in the diffed WD. (They also lack any
telltale in the formatted proposal.) Approved by WG 26-28 Sept 2005 in
Edinburgh as part of omnibus proposal of 31 August.
</sitem><sitem id="rq21-lexmaps">rq21-lexmaps:  editorial proposal to make
references to lexical and canonical mappings lighter weight. Approved
by WG 26-28 Sept 2005 in Edinburgh as part of omnibus proposal of 31
August.</sitem><sitem id="rq31m.add.rq21-lexmaps.del">rq31m.add.rq21-lexmaps.del:
special diff group for material added by rq31m and re-deleted by
rq21-lexmaps. For this and the following analogous diff groups, be
careful how you color them. Approved by WG 26-28 Sept 2005 in
Edinburgh as part of omnibus proposal of 31 August.</sitem><sitem id="rq31fix.add.rq21-lexmaps.del">rq31fix.add.rq21-lexmaps.del:
special diff group for material added by rq31fix and re-deleted by
rq21-lexmaps. Approved by WG 26-28 Sept 2005 in Edinburgh as part of
omnibus proposal of 31 August.</sitem><sitem id="du0_prodigal.add.rq21-lexmaps.del">du0.prodigal.add.rq21-lexmaps.del: 
special diff group for material added by du0.prodigal and re-deleted
by rq21-lexmaps. Approved by WG 26-28 Sept 2005 in Edinburgh as part
of omnibus proposal of 31 August.</sitem><sitem id="du0_prodigal.add.rq21-lexmaps.add">du0.prodigal.add.rq21-lexmaps.del: 
special diff group for material added by du0.prodigal and by
rq21-lexmaps. Show as colour for the second of these to be considered.
Approved by WG 26-28 Sept 2005 in Edinburgh as part of omnibus
proposal of 31 August.</sitem><sitem id="du0_prodigal2.add.rq21-lexmaps.del">du0.prodigal2.add.rq21-lexmaps.del: 
special diff group for material added by du0.prodigal2 and re-deleted
by rq21-lexmaps. It could probably have been changed silently, but I
wanted to be careful. Since prodigal2 has not been approved at the
time rq21-lexmaps is proposed, the disposition file will leave this as
pre.  If rq21-lexmaps is approved, this group should never become
colour or post; see next item. rq21-lexmaps WAS approved by WG 26-28
Sept 2005 in Edinburgh as part of omnibus proposal of 31 August, so
this should never be colour or post, always pre. [Correction,
2006-01-10:  the material marked prodigal2 was included in the
duration proposal approved by the WG on 18 December 2003. So today I
have reviewed all the diff groups related to it and made sure
prodigal2 appears in the status quo documents (for the first time in a
long time, if ever) unless later overridden.  Leave this one pre.]
</sitem><sitem id="du0_prodigal2.add.rq21-lexmaps.add">du0.prodigal2.add.rq21-lexmaps.del: 
special diff group for material added by du0.prodigal2 and revised by
rq21-lexmaps. If and when du0_prodigal2 is sent to the WG, make this
show as a colored addition. [No, p2 was approved.  Show this approved
after 200502]</sitem><sitem id="dt3.add.rq21-lexmaps.del">dt3.add.rq21-lexmaps.del: special
diff group for material added by dt3 and re-deleted by rq21-lexmaps.
Approved by WG 26-28 Sept 2005 in Edinburgh as part of omnibus
proposal of 31 August.</sitem><!--* MSM renames old str-bool-fix to rq21-string and -boolean, since
    * they are not actually bug fixes but part of fulfilling a new requirement.
    *--><sitem id="rq21-string">rq21-string: new lexical/canonical mappings
for string; requires moreFunctions DG as well. Approved by WG 26-28
Sept 2005 in Edinburgh.</sitem><sitem id="rq21-string-hack">rq21-string-hack: dummy diff group:  for
some text which has moved, avoid showing it as new text in the new
location, but mark it as an add so that if rq21-string is rejected,
the movement can be rejected.  If rq21-string is set to post, set this
to post. If to pre, set this to pre.  If to colour, set this to
post.</sitem><sitem id="b1902amend">b1902amend: amendments to the proposal for bug
1902 (RQ-21 for string) approved in Edinburgh.</sitem><sitem id="rq21-boolean">rq21-boolean: new lexical/canonical mappings
for boolean; requires moreFunctions DG as well. Approved by WG 26-28
Sept 2005 in Edinburgh as part of omnibus proposal of 31
August.</sitem><sitem id="moreFunctions">moreFunctions: adds another subsection after
numeric and d/t in functions appendix; show this whenever rq21-string,
rq21-boolean, or context are to be shown.</sitem><sitem id="du0_prodigal2">du0_prodigal2: continues resurrection of
lost duration stuff.  [Note, 2006-01-10:  the material marked
prodigal2 was included in the duration proposal approved by the WG on
18 December 2003. It has not been included in recent status-quo
documents, though, because until today it was not clear that the
material was in fact reviewed and approved.]
</sitem><sitem id="rq126">rq126: health warning about restricting away
canonical forms.</sitem><sitem id="rq140">rq-140: distinguishing negative from positive zero.
An attempt at a minimum-needed proposal added by MSM. Approved by WG
26-28 Sept 2005 in Edinburgh as part of omnibus proposal of 31
August.</sitem><sitem id="rq150c">rq-150c: require minimum support in
precisionDecimal. Approved with amendments by WG 26-28 Sept 2005 in
Edinburgh.
</sitem><sitem id="rq152a">rq152a: quick initial change of 'XML 1.0' to 'XML'
in abstract, done long ago (2004?) but not associated with a diff
group til 2005-08-27. (Other appearances of that string are
machine-generated for bibliographic references, don't get diff
markup.)
</sitem><sitem id="ed-pattern">Editorial proposal to replace all occurrences
of 'pattern' as a reference to a defined term with references to the
component.  (Need similar proposal for all the others ...)</sitem><sitem id="pattern-1929">pattern-1929: pattern value as set. Follow-on
proposal from RQ-141 reconciliation effort.  Make pattern facet have a
set-valued {value} in place of a regex-valued {value}, so we can have
just one.</sitem><sitem id="pattern-1929-fix">deletion of cross references to
src-multiple-patterns and src-multiple-enumerations.  The references
should have been deleted as part of pattern-1929, since their targets
were deleted then.</sitem><sitem id="lexMapFacet-1912">Remove lexicalMappings facet. 2006-01-14:
 diff attributes on this diff group changed from del (vis a vis
2005-02) to add (vis a vis 1.0).</sitem><sitem id="rq20rb-1912">Portmanteau for former additions destined for
rollback to actual deletions of lexicalMappings facet, ref. bug
1912</sitem><sitem id="pd1-1912">Portmanteau for former addition for precision to
actual deletion of lexicalMappings facet, ref. bug 1912. 2006-01-14:
The material was first published in February 2005; with the
publication of the new WD in January 2006, we no longer need to be
able to show this as a deletion:  vis-a-vis 1.0 it's not a deletion,
but a rejected addition / an addition later reverted. So I've changed
the polarity of its diff attribute from del to add.
</sitem><sitem id="rq21-specials-1909">RQ-21 (define lexical space and lexical
mappings more precisely) for specials.  Approved with amendments
2006-01-13 (amendments are not marked separately).</sitem><sitem id="context-2337">Replacing {scope} with {context} on stds,
ref. bug 2337.</sitem><sitem id="ep01-p2.add.context-2337.del">Material added by proposal EP-02 part 2,
but deleted by later context-2337 proposal.  This material was never status-quo.
It's shown as an ADD at the moment.
</sitem><sitem id="rec12-map-eff">Amendments to rec12-map agreed at Edinburgh
f2f 2005-09-26</sitem><sitem id="rec12-main-eff">Amendments to rec12-main agreed at
Edinburgh f2f 2005-09-26, in sections which were not, ultimately,
approved in Edinburgh.</sitem><sitem id="rec12-main-eff-ok">Amendments to rec12-main agreed at
Edinburgh f2f 2005-09-26, in sections which were ultimately approved
in Edinburgh (notably appendix A).</sitem><sitem id="enum-2454">Simplify mapping rules for enumeration facet
parallel to changes agreed for pattern</sitem><sitem id="rec12-main-dub">Material in the enumeration sections not
approved in Edinburgh (explicitly excepted) but also not actually
incorporated into the enumeration proposal (it was marked nsq, not
colour).  I'm going to swallow hard, though, and treat it as approved
anyway.</sitem><sitem id="metachar-2531">Correct Char production (was 10, now 51 or
something) of regex grammar to describe metacharacters
correctly.</sitem><sitem id="b2603">Minor editorial change to resolve bug 2603. Approved
by the WG 2005-12-16.</sitem><sitem id="sfs-1933">Remove built-in and derived primitives from sForS
proper, relocate in separate appendices/non-schema-documents</sitem><sitem id="aux-1933">Auxiliary diff group for bug 1933, to mark the
movement of data.  Normally this should be pre if sfs-1933 is pre,
post if sfs-1933 is post or colour.</sitem><sitem id="dup-2214">Deprecate <code>XMLSchema-datatypes</code>.
Wording accepted without change 2006-01-13.</sitem><sitem id="edinburgh.refuses.to.die">27 December, reviewing bugs
marked 'decided', I found some changes which had been agreed on in
Edinburgh which had not been made.  If any of these got re-deleted
after Edinburgh, I don't know about it.</sitem><sitem id="rec12-map-eff-pentimenti">27 December, reviewing bugs
marked 'decided', I found some changes I would like to make in HT's
execution of the instructions from Edinburgh.  These changes should
(aaaughh!) probably go to the WG.</sitem><sitem id="b2533-rq127-r196">Health warning about use of whitespace
facet for tokenizing natural-language data.  Approved for 1.1 in
Toronto (but overlooked by MSM when processing Toronto
minutes).</sitem><sitem id="b2044">Bugzilla 2044, R-198, unions of unions</sitem><sitem id="b2044-feedback">Feedback request for bugzilla 2044, R-198, 
unions of unions</sitem><sitem id="rq152temp">Temporary hack for Bugzilla 1838, RQ-152,
alignment with XML 1.1. We don't have final wording on this yet, but
I've updated the reference to point to XML 1.1, which is at least
consistent with the most recent clear WG decision on the
matter.</sitem><sitem id="b2642">Correct typo in description of double range: 2**53
not 2**57.</sitem><sitem id="wd3hax">Editorial hacks for publication of WD, 2006-01.
These should be shown coloured in diffed versions.</sitem><sitem id="qd3hax">Editorial hacks for publication of WD, 2006-01
which must be silent, NOT shown:  Correct / work around link rot. (We
can't show the old rotten links as links, because they are bad and
will raise linkcheck errors.)</sitem><sitem id="b2313.ieee">Bug 2313 Tie precisionDecimal to IEEE754R more
clearly. Wording approved 13 January 2006.</sitem><sitem id="b2627">Bug 2627 bad reference in appendix D. Wording
approved 13 January 2006.</sitem><sitem id="b2179">Bug 2179 R-185: Question about cardinality of
calendar types (Jeremy Carroll pointed out that gMonthDay, gMonth, and
gDay are not infinite.) Wording approved 13 January 2006.</sitem><sitem id="b1834">Bug 1834: clarification of lexical space of unsigned
types.</sitem><sitem id="dta">Material in *.nxsd which belongs in the files, but not
in the REC</sitem><sitem id="rad-1933">Exploration of removal of annotations from the
builtins in C1 and C2 and consequent fixups.  [N.B. these aren't all
showing as changes in the output, because some of them are within
non-status-quo text.]</sitem><sitem id="b1910-hexbin">RQ-21 / Bugzilla 1910 lexical mapping for
hexBinary</sitem><sitem id="b1910-hexbin-silent">Silent changes (transpositions) for
RQ-21 / Bugzilla 1910 lexical mapping for hexBinary</sitem><sitem id="b1910-hexbin-maybe">Changes for RQ-21 / Bugzilla 1910 which
MSM would rather avoid</sitem><sitem id="b1911-b64b">RQ-21 / Bugzilla 1911 lexical mapping for
base64Binary</sitem><sitem id="b1911-b64b-silent">Silent changes (transpositions) for
RQ-21 / Bugzilla 1911 lexical mapping for base64Binary</sitem><sitem id="b1838">Changes for Bugzilla 1838 = RQ-152 = support for XML
1.1.  Supersedes rq152temp (reverses some of rq152temp, calls out some,
but diffs against status quo without rq152temp, not with it.</sitem><sitem id="b1838refs">Changes to the bibliographic entries for
XML and XMLNS; separate from b1838 to support dg hack.</sitem><sitem id="b2449">Changes for Bugzilla 2449 Datatype valid is broken.
Not sure how close this is to what people had in mind.</sitem><sitem id="b2449-vi">Changes for Bugzilla 2449 take VI.</sitem><sitem id="b2449-silent">Text movement changes for Bugzilla 2449.</sitem><sitem id="eg-1852">End-game resolution of dangling inconsistencies between
parts 1 and 2</sitem><sitem id="e2-67-botchfix">Repair error made July 2004 when resynching
this document with late change to 1.0 2E.</sitem><sitem id="rec12-main-excepted-rescinded">Part of the 1852 proposal
we withdrew before adopting it.  There's only one, and we should
probably delete it entirely, but I want the rescission to be part
of the CVS record first. -MSM</sitem><sitem id="b2250">Resolution of bugzilla 2250, consistency of
formulation for min/max inc/exclusive.  Approved by WG
30 January 2006.</sitem><sitem id="b1893">Resolution of bugzilla 1893, R-203: Inconsistency
with constraints on min/maxExclusive. Approved by WG 30 January
2006.</sitem><sitem id="fpwd-add-lc-del">Material added in first public working
draft and re-deleted for last call.</sitem><sitem id="wd4hax">wd4hax: miscellaneous editorial changes for Last
Call draft</sitem><sitem id="wd4hax-lc">wd4hax-lc: miscellaneous editorial changes for Last
Call draft that should not be carried after that</sitem><sitem id="wd4edhax">wd4edhax: misc editorial changes prior to Last Call, based on 
NM's comments but not approved by WG or other editors</sitem><sitem id="ast-pim">Addition of ptd, itd, and mtd to display
for simple type definitions.  This happened in 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="b2948">Bug 2948: recast bounds-checking validation rules,
to resolve bug 2948.</sitem><sitem id="b3028">Bug 3028: typo in dayTimeDuration lexical space section.</sitem><sitem id="b3029">Bug 3029: typo in D.2.2 rule for dayFrag.</sitem><sitem id="b3030">Bug 3030: typo in dayTimeDuration lexical space section.</sitem><sitem id="b3074">Bug 3074: correction of mis-tagged 'may'.</sitem><sitem id="b3077">Bug 3077: editorial nit</sitem><!--* Decisions made 15 Sept *--><sitem id="b3223">Bug 3223: literals in the value space</sitem><sitem id="b3246">Bug 3246: leading plus sign</sitem><sitem id="b3254">Bug 3254: consistency of document versions
(no changes made here, the error was in dg-statusquo-color-1.0.xml)</sitem><sitem id="b3255">Bug 3255: datatype for seconds component of duration</sitem><sitem id="b3257">Bug 3257: 'order with' in 3.3.8.1</sitem><!--* 3026 and 3078, decided from Bugzilla 2006-09-29 *--><sitem id="b3026">Bug 3026: minimal conf. reqs for duration</sitem><sitem id="b3078">Bug 3078: puzzlement over 'ordered' in ordered durations</sitem><!--* 2911 decided from Bugzilla 2006-10-06 *--><sitem id="b2911">Bug 2911: pattern-valid</sitem><!--* 3736 and 3246 decided from Bugzilla 2006-10-13 *--><sitem id="b3736">Bug 3736: 'canonical representation' sections.
Also normalize the relevant section title for primitive datatypes
to 'Lexical Mapping'; unfortunately, of those expressing an
opinion on this topic, the majority was tone deaf.  The relevant sections for
the derived types have been left at Lexical representation, because they 
don't in fact talk about the mapping, and strictly speaking the WG
did not instruct that they be changed.</sitem><sitem id="rq21-lexmaps.add.b3246.del"/><!-- 14 items from consent agendas 2006-11-17 and -12-01 --><sitem id="dp200701"> All bugs entered from those CAs, and b3077 which was entered
but didn't make SQ listing before.  Should be pre, except nsq to display
the ednotes near each change which indicate which bug the change is for.</sitem><sitem id="b2220">Bug 2220:  change in fractionDigits example</sitem><sitem id="b2408">Bug 2408:  forbidden/must-be-absent consistency</sitem><sitem id="b2989">Bug 2989:  fix oops! in floatingPointRound function</sitem><sitem id="b3225">Bug 3225:  artificial disjointness of primitives explanation</sitem><!-- wdd put an error in, now b3225 has to take it back out, presumably preserving
error for diff-against-last-public displays.  :-(
If wdd is pre and b3225 is pre then b3225-wdd should be pre.
(If wdd is pre then presumably b3225 can't be colour or post.)
If wdd is colour and b3225 is pre then b3225-wdd should be colour.
If wdd is colour and b3225 is colour b3225-wdd should be pre.
(If wdd is colour then presumably b3225 can't be post.)
If wdd is post and b3225 is pre then b3225-wdd should be post.
If wdd is post and b3225 is colour then b3225-wdd should be reverse colour.
If wdd is post and b3225 is post then b3225-wdd should be pre.
In order to make the colour or reverse colour work, b3225-wdd-rev should be pre,
except should be post when reverse colour is wanted.  Glah! --><sitem id="b3225-wdd">Bug 3225 interacting with wdd</sitem><sitem id="b3225-wdd-rev">Bug 3225 interacting with wdd</sitem><!--* actually, none of these wrappers are needed.
    * The text has three states:
    * 1 decimal
    * 2 (changed by wdd) precisionDecimal
    * 3 (changed by 3225) decimal
    *
    * for state 1, set wdd and 3225 to pre
    * for state 2, set wdd to colour or post, 3225 to pre
    * for state 3, set wdd to post and 3225 to colour or post
    * if both are set to colour (as in the diff against 1.0), 
    * 
    *--><sitem id="b3813">Bug 3813:  lexical mapping vs representation nit</sitem><sitem id="b3850">Bug 3850:  two defs of "constraining facet(s)"</sitem><!-- ep01-part2 put in a paragraph, now b3850 has to take it back out.
If ep01-part2 is pre and b3850 is pre then  ep01-b3850 should be pre, epo1-b3850-colours pre, ep01-b3850-rev post.
(When ep01-part2 is pre then presumably b3850 can't be colour or post.)
If ep01-part2 is colour and b3850 is pre then ep01-b3850 should be colour, epo1-b3850-colours pre, ep01-b3850-rev post.
If ep01-part2 is colour and b3850 is colour then ep01-b3850 should be pre, ep01-b3850-colours colour, ep01-b3850-rev post.
(When ep01-part2 is colour then presumably b3850 can't be post.)
If ep01-part2 is post and b3850 is pre then ep01-b3850 should be post, epo1-b3850-colours pre, ep01-b3850-rev post.
If ep01-part2 is post and b3850 is colour then ep-01-b3850 should be pre, epo1-b3850-colours pre, ep01-b3850-rev colour.
If ep01-part2 is post and b3850 is post then epo1-b3850 should be pre, epo1-b3850-colours pre, ep01-b3850-rev post.
   (ep01-b3850-colours should be pre except in one instance above.)
   (ep01-b3850-rev should be post except in one instance above.)
Double glah! --><sitem id="ep01-b3850">Bug 3850 interacting with ep01-part2</sitem><sitem id="ep01-b3850-colours">Bug 3850 interacting with ep01-part2</sitem><sitem id="ep01-b3850-rev">Bug 3850 interacting with ep01-part2</sitem><sitem id="b3247">Bug 3247:  floating point nbrs description oops!</sitem><sitem id="b3252">Bug 3252:  </sitem><sitem id="b3258">Bug 3258:  Minor errors/omissions in 3.3.8.4 (dates and times)</sitem><sitem id="b3259">Bug 3259:  </sitem><sitem id="b3261">Bug 3261:  </sitem><sitem id="b3263">Bug 3263:  </sitem><sitem id="b3587">Bug 3587:  </sitem><sitem id="b3976">Bug 3976:  </sitem><sitem id="b3848">Bug 3848:  </sitem><!-- b4350 first appealed to in dg200701 group but may be used more later. --><sitem id="b4350-1">Bug 4350:  Correcting term to dtref in bulk of datatype defs</sitem><sitem id="b4453">Bug 4453:  fixing assorted style inconsistencies</sitem><sitem id="b4353ednote">Bug 4453:  should be nsq when b4353 is nsq or colour; otherwise pre</sitem><!-- these bugs had fixes approved during the FTF ca 30 Mar 07 --><sitem id="b3859">Bug 3859:  oops! in newDateTime</sitem><sitem id="b3233">Bug 3233:  Space-separation in lists</sitem><sitem id="b2497">Bug 2497:  R-127: Distinction between 00:00:00 and 24:00:00 for time datatype?</sitem><sitem id="b3851">Bug 3851:  bug in newDateTime function</sitem><sitem id="b3027">Bug 3027:  erroneous date example</sitem><sitem id="b3238">Bug 3238:  Unnecessary self-justification</sitem><sitem id="appr070331">notes introducing the bugs above. should be nsq while
reviewing said bugs, otherwise pre</sitem><!-- these bugs had fixes approved during telcon of 17 August 2007 --><sitem id="b3231">Bug 3231:  reference to ISO 11404 deleted</sitem><sitem id="b3234">Bug 3234:  enumeration facets for lists</sitem><sitem id="appr070824">notes introducing the bugs above. should be nsq while
reviewing said bugs, otherwise pre</sitem><!-- bugs fixed during telcon of 7 September 2007 --><sitem id="b2728">Bug 2728:  super-/subset constraints missing for born-binary pattern, 
enumeration respectively</sitem><sitem id="tt-20070907">labels for these bug fixes.</sitem><sitem id="b3224">Draft resolution of issue 3224.</sitem><sitem id="b2728-1">WG-approved partial resolution of issue 2728
(missing subset/superset relation on pattern facets).</sitem><sitem id="b2728-2">Draft note on issue 2728
(missing subset/superset relation on pattern facets),
for editorial review.</sitem><sitem id="b3840">Correct typo in ID of string datatype's whiteSpace facet;
prerequisite for fixing bug 1974.</sitem><sitem id="b2947">Recast discussion of ordering to avoid making
the triviality or non-triviality of an ordering seem like a big deal.
</sitem><sitem id="b2947b">Follow-on to b2947.</sitem><sitem id="b2861">Allow empty unions.</sitem><sitem id="b3228">Clarify lists of unions and unions of lists etc.
in 2.4.1 / 2.6.1.</sitem><!--* 28 September 2007, changes accepted from Bugzilla *--><sitem id="b3230">atomic and decomposability</sitem><sitem id="b3237">programming language types</sitem><sitem id="b3239a">acyclic type derivation (follow-on work needed)</sitem><!--* 26 October 2007, changes accepted from Bugzilla *--><sitem id="b3244">sets of lists</sitem><!--* ca 20071123, addl proposal for 2947 *--><sitem id="d071118">should be nsq during review, pre otherwise</sitem><sitem id="b2947-1"/><sitem id="b4850">Update reference to RFC 3066.  Also resolves 2439
and 3079.</sitem><sitem id="b2576">Clarify relation of xsd:language to xml:lang.</sitem><sitem id="b1889">Michael Kay's regex proposal.</sitem><sitem id="b1889b">MSM's mods to MK.</sitem><sitem id="dg-dgProd">redo of productions used for REs</sitem><sitem id="b3265">Length of QNames</sitem><sitem id="b3869">XML mapping of annotations:  make it harder to
follow but more correct.  Sigh.</sitem><sitem id="b4912">Allow empty unions.  Actually, the only change
still needed is in Structures, but we have an entry here because
we have a tell-tale.</sitem><sitem id="b4839">Fix documentation links in schema for schema 
documents.</sitem><sitem id="b4986">Fix typo in referring to case (in)sensitivity.</sitem><sitem id="b3249">Respond to QT comments on the term 'constant'.</sitem><sitem id="b3249a">Variant 'a': tweak definition.</sitem><sitem id="b3249b">Variant 'b': just say 'special value'.</sitem><sitem id="b3249c">Late amendments, and revision after WG handed it back to us,
including some changes proposed by davep.</sitem><sitem id="b4900">Typo in various paternalistic constraints..</sitem><sitem id="b3256">BC dates and breaking change.</sitem><sitem id="b3266">NOTATION and current schema.</sitem><sitem id="b4033">Restore missing 'facets' section for xs:date.</sitem><sitem id="b4089">Chop dead references from normative refs.</sitem><sitem id="ep26">Misc editorial changes accumulated to date (originally
entered as ep99".

- For "The float [or: double] datatype is the IEEE double-precision
32-bit [64-bit] floating point datatype [IEEE 754-1985] with the minor
exception noted below. Each floating point datatype has a value space
that is a subset of the rational numbers" read "The float [or:
double] datatype is the IEEE double-precision 32-bit [64-bit] floating
point datatype [IEEE 754-1985] with the minor exception noted
below. Its a value space is a subset of the rational numbers".

- others.
</sitem><sitem id="ep99">Misc editorial changes MSM would like to propose at some
point.  (Leave them to accumulate, then relabel them and put them in
an editorial proposal.)  
</sitem><sitem id="ep999">Misc editorial changes MSM may or may not propose at some
point.  Separate from ep99 for convenience.</sitem><sitem id="b5229">delete "with the exception noted below" from
float and double.  Also change 'is' to 'mirrors'.</sitem><sitem id="b5322">s/Char/NormalChar/</sitem><sitem id="b3950">'fixed' is redundant for length</sitem><sitem id="b4764">delete a sentence that should have been deleted by dg 'noleap'.
A casualty of the diffgroup notation and resulting confusions.</sitem><sitem id="b3220">'must' and 'error'</sitem><sitem id="b3220b">'must' and 'error' possibly separable tweaks</sitem><sitem id="b3220c">XML-instance conformance</sitem><sitem id="b3220d">late revisions (doesn't really need to be separate?)</sitem><sitem id="b3220-aux">some text movement</sitem><sitem id="b5062">what facets apply to unions</sitem><sitem id="b5062xx">text deleted by WG from b5062</sitem><sitem id="b5030">Assertions on simple types</sitem><sitem id="b5030a">A: Construct an element node as the XDM</sitem><sitem id="b5030b">B: Construct an attribute node as the XDM</sitem><sitem id="b5030c">C: Construct a text node as the XDM and use variables</sitem><sitem id="b5030d">D: Construct a value and use variables</sitem><sitem id="b5030e">E: Use variables, period.</sitem><sitem id="b5030f">F: Like D, but always provide an item, even for lists.</sitem><sitem id="b5030fx">F: abandoned text for version F.</sitem><sitem id="b5030v">v: include $value.</sitem><sitem id="b5030z">z: "assertions" is both a lexical and a value facet.</sitem><sitem id="b5030m">Tentative additions for b5030 (MSM)</sitem><sitem id="b5030-alpha">Type the node as base type</sitem><sitem id="b5030-beta">Type the node as primitive or aST</sitem><sitem id="b5030-gamma">Type the node as aST</sitem><sitem id="b5030-delta">Type the node as untypedAtomic</sitem><sitem id="b5030-.i.">Type the node as base type</sitem><sitem id="b5030-.ii.">Type the node as primitive or aST</sitem><sitem id="b5030-.iii.">Type the node as aST</sitem><sitem id="b5030-.iv.">Type the node as untypedAtomic</sitem><sitem id="b5030-.v.">Type the node as 'operational type' (nearest built-in)</sitem><sitem id="b5030-en">Editorial notes</sitem><sitem id="b5030mk">Mike Kay's proposals</sitem><sitem id="b5030mk-x">Mike Kay's proposal, abandoned bits (can be deleted later,
but kept for now in case of need)</sitem><sitem id="b5030tf">Task force draft proposal</sitem><sitem id="b5030tf-x">Task force draft proposal</sitem><sitem id="b3251">3251:  <termref def="key-impl-def"/> primitives and facets</sitem><sitem id="b3251-idef">3251:  definition of <termref def="key-impl-def"/></sitem><sitem id="b5585">5585: clarification of conformance</sitem><sitem id="b5150">5150:  clearer statement of normativity</sitem><sitem id="b3025">lexical mappings and functions</sitem><sitem id="b3227">effability</sitem><sitem id="b3243">Definition of anySimpleType</sitem><sitem id="b5058">anySimpleType and anyAtomicType value spaces</sitem><sitem id="b3025-aux">text movement for effability cluster 3025 et al</sitem><sitem id="b3232">type vs datatype</sitem><sitem id="b3262">base64Binary</sitem><sitem id="b5328">enumeration and aST</sitem><sitem id="b2046">list identity and equality</sitem><sitem id="b2046-abandoned">list identity and equality</sitem><sitem id="b3222">identity and equality, i.e. use equality not identity</sitem><sitem id="b3235">acyclic unions</sitem><sitem id="b5625">finite-length</sitem><sitem id="wgi-20080530">WG editorial instructions after the Long Meeting of 30 May 2008</sitem><sitem id="b3659">Regex fixes</sitem><sitem id="b3253">Allow +INF</sitem><sitem id="b4395">QName lexical mapping health warning.</sitem><sitem id="b4451">decimal canonical mapping, fix prose.</sitem><sitem id="wgi-20080606">WG editorial instructions after the call of 6 June 2008</sitem><sitem id="wgi-20080613">WG editorial instructions after the call of 13 June 2008</sitem><sitem id="ep99dp">Unmarked changes perhaps introduced by 
Dave P.</sitem><sitem id="ed-20080621">Editorial changes introduced unilaterally
after the LC WD of 20 June 2008</sitem><sitem id="b3226">Editorial fix of integer, decimal, string
distinctions</sitem><sitem id="b3226note">Ed notes for b3226</sitem><sitem id="b3226div">div introduced by b3226</sitem><sitem id="cvs1.add.b3226.move.src">Stuff added by cvs1, moved by b3226</sitem><sitem id="cvs1.add.b3226.move.ghost"/><sitem id="cvs1.add.b3226.move.tgt"/><sitem id="cvs1.add.b3226.move.guts"/><sitem id="cvs1.add.b3226.del">Stuff added by cvs1, deleted by b3226</sitem><sitem id="b3249b.add.b3226.move.src">Stuff added by b3249b, moved by b3226</sitem><sitem id="b3249b.add.b3226.move.ghost"/><sitem id="b3249b.add.b3226.move.tgt"/><sitem id="b3249b.add.b3226.move.guts"/><sitem id="b3249c.add.b3226.move.src">Stuff added by b3249c, moved by b3226</sitem><sitem id="b3249c.add.b3226.move.ghost"/><sitem id="b3249c.add.b3226.move.tgt"/><sitem id="b3249c.add.b3226.move.guts"/><sitem id="b4642">Bug 4642, most references to "timezone" should be to
"time zone offset".</sitem><sitem id="b3253bis">Bug 3253, yet again:  allow +INF.  This should have
been done when the b3659 proposal was adopted, 7 June 2008.  Error discovered
7 September 2008, fixed then.</sitem><sitem id="b5906">Bug 5906, use a different name for the facet element.</sitem><sitem id="b5929">Bug 5929, remove block on "facet", to allow substitution.</sitem><sitem id="dp0809f">Turn this from pre to colour or post only when producing 
a content-of-changes display:  e.g., turns on ednotes identifying several
different bug fixes.</sitem><sitem id="b6031">Bug 6031, a single add to prose in the algorithm that
does not really impact the algorithm itself.</sitem><sitem id="b6043">Bug 6043, add a new timezone facet and a required-timezone
datatype derived from dateTime.</sitem><sitem id="b6120">Bug 6120, remove blockDefault from SD4SD.</sitem><sitem id="dp081112">Display ednotes for multiple editorial
bugs following:</sitem><sitem id="dp081112post">"post" when "dp081112" is
    "colour"/"nsq", otherwise "pre"</sitem><sitem id="b3239">acyclicity of derivation tree; accepted 081205</sitem><sitem id="b3239b">WG-directed changes to b3239, 081205</sitem><sitem id="b3240b">add Note re before-lexical-mapping preprocessing
(e.g. whitespace); accepted 081205</sitem><sitem id="b3240bb">WG-directed changes to b3240b, 081205</sitem><sitem id="b4350">wrong notation <!-- <termref> ==> <dtref> -->
WG approved 5 Dec</sitem><sitem id="b4913">Revise incomparability story to account
for XPath evaluation</sitem><sitem id="b5948">Bug 5948:  Unicode database references.</sitem><sitem id="b5950">Bug 5950:  Charmod references.</sitem><sitem id="dp081203">Display ednotes for multiple editorial
bugs following:</sitem><sitem id="b5321">RE definition Note</sitem><sitem id="b5321b">WG-requested fixes to RE definition Note</sitem><sitem id="b5431">Normal characters, character references</sitem><sitem id="b5431-x">Parts of 5431-x declined by WG</sitem><sitem id="b6048">Clarify which types the implementation limits apply to</sitem><sitem id="b6048b">Second cut at 6048</sitem><sitem id="b6266">Unify format of references</sitem><sitem id="b6307">equality need not be reflexive</sitem><sitem id="b5948b">Unicode database updates</sitem><sitem id="b5948c">Michael Kay revision proposal for 5948</sitem><sitem id="b5948x">Bug 5948:  text later withdrawn.</sitem><sitem id="b2687">Bug 2687: revamp type hierarchy diagram.</sitem><sitem id="b6473">Bug 6473: prose lags behind on legality of +INF.  Fix it.</sitem><sitem id="ed200902">(Needed to compile; MSM has added a
paragraph mentioning his changed sponsorship, marked by this
dg; I have added one such para for me as well. -DP)</sitem><sitem id="dp090225">Display ednotes for multiple editorial
bugs following</sitem><sitem id="dp090225post">"post" when "dp90225" is
    "colour" or "nsq", otherwise "pre"</sitem><sitem id="b6554">remove list of leap-seconds</sitem><sitem id="b3659-add-b6547-del">remove duplicate RE in dateTime</sitem><sitem id="b3250">explain how to select appropriate operations</sitem><sitem id="b3248">explain precision as used in precisionDecimal</sitem><sitem id="b6664a">update references to 754</sitem><sitem id="b6664b">add stray fix that went missing when b6664 was 
turned off</sitem><sitem id="b6664">update references to 754</sitem><!-- MSM --><sitem id="b6734">correct whitespace facet display on builtin lists, change
wording of value facets lists</sitem><sitem id="b3264">anyURI value space</sitem><sitem id="b4396">note on QName's context dependency</sitem><sitem id="b6522">please undeprecate XMLSchema-datatypes</sitem><sitem id="add.dup-2214.b6522.del.as.add">pentimento</sitem><sitem id="add.dup-2214.b6522.del.as.del">pentimento</sitem><sitem id="b6553">Dated and undated references, also some
normalization of references to W3C</sitem><sitem id="add.leapseconds.ep6553.del.as.del"/><sitem id="add.leapseconds.ep6553.del.as.add"/><sitem id="add.b5030.ep6553.del.as.add"/><sitem id="add.b5030.ep6553.del.as.del"/><sitem id="ep6553">General cleanup of references.  Grows out of
6553, but isn't really part of it.</sitem><sitem id="ep6553aa">Hack.  Show these as post, even though
they're not really status quo, in order to let some of the
deletions of ep6553 make better sense.</sitem><sitem id="b4602">NOTATION clarification</sitem><sitem id="b6695">make ws=collapse a bit tighter, rephrase</sitem><sitem id="crhax">last-minute changes for CR publication</sitem><sitem id="add.b2044-feedback.cr.del-as-del"/><sitem id="postcr">changes made (unilaterally) in change summary, after CR publication</sitem><sitem id="b6707">bug 6707, complaint about description of lexical space for
positiveInteger.  Applied unilaterally to negativeInteger as well.</sitem><sitem id="b6230">bug 6230, some tweaks to termdef for anySimpleType and
anyAtomicType.</sitem><sitem id="add.wd4hax.6522.del">Description, in the appendis, of the deprecation 
of the Datatypes namespace.  Should have been reverted with 6522.  Change made
unilaterally by MSM in cleanup after CR.</sitem><!--* changes agreed 29 May 2009 *--><sitem id="b6938">6938 Incorrect note for "time"</sitem><sitem id="b6943">6943 Minor editorial issue: nontimezoned or untimezoned</sitem><sitem id="b6945">6945 Oops! in algorithm of normalizeMonth</sitem><!--* changes agreed 26 June 2009 *--><sitem id="b6908">6908 Definition of pattern facet</sitem><sitem id="b6939">6939 "time" value comparison</sitem><sitem id="b6944">6944 Oops! in algorithm of timeOnTimeline</sitem><sitem id="ap090709">Display ednotes for multiple editorial
bugs following</sitem><!-- those bug items removed --><sitem id="b6909edn">Display ednote for bug 6909</sitem><sitem id="b6909">6909 is a pre-lexical facet magic?</sitem><sitem id="b2783">lose the phrase 'constituting a restriction'</sitem><sitem id="ep33">subdivide change list</sitem><sitem id="b7756edn">Display ednote for bug 7756</sitem><sitem id="b7756">correct botched parens in charGroup rule</sitem><sitem id="b7758edn">Display ednote for bug 7758</sitem><sitem id="b7758">subdivide change list</sitem><sitem id="ep00dpedn">Display ednote for editorial proposal ep00dp</sitem><sitem id="ep00dp">fix incorrectly displayed variables and a few other
display problems in App G</sitem><sitem id="b7678">correct remark about leap seconds</sitem><sitem id="b3027a">properly add correction that was messed up
with original fix</sitem><sitem id="b3027b">alternate version (MSM) of 3027a</sitem><sitem id="b3027c">common text (both version a and version b) 3027 revision</sitem><sitem id="b6698">6698: dated and undated schema document</sitem><sitem id="b6698x">6698: drafted but tentatively withdrawn</sitem><sitem id="LC.200912">Last call of Dec 2009</sitem><sitem id="b8744">8744:  deal with undefined "C" character category</sitem><sitem id="b8785">8785:  corrects a copy/paste oops! in pD value space
discussion.</sitem><sitem id="edn8744">ednote for b8744 and b8785</sitem><sitem id="b9005">9005:  minus sign should be multiplication</sitem><sitem id="b9009">9009:  corrects maxScale and minScale corresponding
to IEEE decimal128.</sitem><sitem id="edn9005">ednote for b9005 and b9009</sitem><sitem id="b10005">Correct typo noticed by Mukul Gandhi in bug 10005</sitem><sitem id="b10658">Correct missing handling of '24:00' in
lexical mapping of dateTime and time; also fix the typo
mentioned in bug 10650.  2010-11-23 checking the changes instructed 
by the WG, MSM retagged parts of this.</sitem><sitem id="edn10658">ednotes for b10658</sitem><sitem id="b11006">Fix for bug 11006, botched statement about 
transitive members of a union as list item type, when basic
members were meant.</sitem><sitem id="b11093">Fix for bug 11093, dumb error in documentation
element of schema for schema documents.</sitem><sitem id="b10374">Fix for bug 10374:  mention explicitly that
anySimpleType is the base type of ENTITIES, IDREFS, and 
NMTOKENS.</sitem><!--* Jan 2011, trying to get to CR again *--><sitem id="b11421">Fix for bug 11421:  align definition of \i
with XML 1.0 5e, not 4e and earlier.  (No separate proposal;
very simple change, made proposal in Bugzilla.)</sitem><sitem id="b9196">Bug 9196, use equality AND identity for most
things.</sitem><sitem id="b9196idc">Bug 9196, identity constraints.</sitem><sitem id="b9196e">Bug 9196, enumerations.</sitem><sitem id="b9196vc">Bug 9196, value constraints.</sitem><sitem id="add.wgi-20080530.b9196e">9196 reverses parts of wgi-20080530.</sitem><sitem id="wgi-20080530.b9196e.del">9196 reverses parts of wgi-20080530.</sitem><sitem id="b11103">11103 special types, lists, unions.</sitem><sitem id="b11961">11961 typo in whitespace description
(word dropped).</sitem><sitem id="b11125">Modifying character class grammar to try to 
accommodate more hyphens.</sitem><sitem id="b8732">Move Unicode version-sensitive material out.</sitem><sitem id="b8732-restructuring">Subsection-tagging in regex appendix,
not really relevant to 8732, just done at the same time.</sitem><sitem id="b11531">Changes to description of pD to align better with
IEEE 754 (and with some implementors' heads)</sitem><sitem id="b11859">Fix unclear words about ^ and [^]</sitem><sitem id="b12300">Removal of precisionDecimal.  Nothing in the main
body of the spec should carry this label, because for each item we
need an explicit decision on whether it should be colored in the
diff against 1.0 or not.</sitem><sitem id="b12300-diff10-silent">precisionDecimal deletions that should be silent 
in the diff against 1.0</sitem><sitem id="b12300-diff10-colour">precisionDecimal deletions that should be
coloured in the diff against 1.0</sitem><sitem id="add.b2687.b12300.del.as.add"/><sitem id="add.b2687.b12300.del.as.del"/><sitem id="b12572">Add pointer to precisionDecimal.</sitem><sitem id="b12573">Tweak definition of 'user option'.</sitem><sitem id="b12657">Fix bug in non-normative regex for duration.</sitem><sitem id="b12626">Add note about {member type definitions} 
and member types.</sitem><sitem id="b2044-feedback.add.del.cr-2011-06.del.as.del">
We no longer have priority feedback issues in Datatypes.
Lose the paragraph.
</sitem><sitem id="cr-2011-06">changes as part of CR of June 2011.</sitem><sitem id="dg-201112">changes restarting after CR of June
2011.</sitem><sitem id="b13749">correct typo in hexDigitCanonical.</sitem><sitem id="pr-201201">changes for PR draft (clerical).</sitem><sitem id="ep35">editorial proposal 35 (miscellaneous).</sitem><sitem id="b15648">Bug 15648, review of implementation-defined features.</sitem><sitem id="ep36">Public identifiers for DTDs.</sitem><sitem id="ep37">Last minute reference updates</sitem><sitem id="final">Text for Rec.</sitem><sitem id="non-final">Text for non-Rec versions of document.</sitem><!--* Dummy IDs, solely for validation; any actual use of these _should_ be
        accompanied by a name attribute allowing an xtermref to
        Part 1 to be generated. *--><sitem id="td">Type Definition component</sitem><sitem id="a">Annotations component</sitem><sitem id="ctd">Complex Type Definition component</sitem><sitem id="ad">Attribute Declaration</sitem><sitem id="ed">Element Declaration</sitem></slist></revisiondesc></header><body><div1 role="1.0" id="Intro"><head>Introduction</head><!--* <issue id="RQ-21i" role="1.1">
<p><loc href="&reqs;#bnf" target="reqs">RQ-21 (regex/BNF for all primitive types)</loc></p>
<p>Current plan is that all datatypes defined herein will have EBNF
productions at least approximately defining their lexical space, and
will include a nonnormative regex derived from the EBNF if a user
wishes to copy it directly.</p>
</issue> *--><!--* <issue id="RQ-24-2i" role="1.1">
<p><loc href="&reqs;#fundamentals" target="reqs">RQ-24 (systematic
facets: canonical representations for all datatypes)</loc></p>
<p>It is not possible for all datatypes to have 
&canonical_representations; of all values without violating the rules of
derivation or adding special-purpose &cfacets; which the WG does not
deem appropriate.&nbsp; The WG has not yet decided how to deal with
datatypes whose lexical and/or &canonical_mappings; are context
sensitive.</p>
</issue> *--><!--* <issue id="RQ-148i" role="1.1">
<p><loc href="&reqs;#Truncation-not-defined" target="reqs">RQ-148
(clarify use of "truncation)</loc></p>
<p>The word will probably be removed.</p>
</issue> *--><!--* <issue id="RQ-120i" role="1.1">
<p><loc href="&reqs;#term-derived" target="reqs">RQ-120 (consistent
use of "derived)</loc></p>
<p>"Derivations" other than "derivations by restriction" will be
renamed "constructions".</p>
</issue> *--><!--* <issue id="RQ-24-4i" role="1.1">
<p><loc href="&reqs;#fundamentals" target="reqs">RQ-24 (systematic
facets: assignment of datatype to nodes without components)</loc></p>
</issue> *--><div2 id="intro1.1" dg="fpwd"><head>Introduction to Version 1.1</head><p>The Working Group has two 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 the XML Schema specification, including the XML transfer syntax
for schemas itself.</p></item></ulist><p>These goals are slightly in tension with one another -- the
following summarizes the Working Group's strategic guidelines for
changes between versions 1.0 and 1.1:</p><olist><item><p>Add support for versioning (acknowledging that this
<emph>may</emph> be slightly disruptive to the XML transfer syntax at
the margins)</p></item><item><p>Allow bug fixes (unless in specific cases we decide that the
fix is too disruptive for a point release)</p></item><item><p>Allow editorial changes</p></item><item><p>Allow design cleanup to change behavior in edge
cases</p></item><item><p>Allow relatively non-disruptive changes to type hierarchy (to
better support current and forthcoming international standards and W3C
recommendations)</p></item><item><p>Allow design cleanup to change component structure (changes
to functionality restricted to edge cases)</p></item><item><p>Do not allow any significant changes in functionality</p></item><item><p>Do not allow any changes to XML transfer syntax except those
required by version control hooks and bug fixes</p></item></olist><p>The overall aim as regards 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 validation behavior 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, and
when they are conformant to version 1.0 (or are made conformant by the
removal of versioning information), should have the same validation
behavior across 1.0 and 1.1 implementations (again except possibly in
edge cases and in the details of the resulting PSVI);
</p></item></ulist></div2><div2 role="1.0" id="purpose"><head>Purpose</head><p>
The <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/> specification defines limited
facilities for applying datatypes to document content in that documents
may contain or refer to DTDs that assign types to elements and attributes.
However, document authors, including authors of traditional
<emph>documents</emph> and those transporting <emph>data</emph> in XML,
often require a higher degree of type checking to ensure robustness in
document understanding and data interchange.
</p><p>
The table below offers two typical examples of XML instances
in which datatypes are implicit: the instance on the left
represents a billing invoice, the instance on the
right a memo or perhaps an email message in XML.
</p><table class="dtdemo" border="1"><thead><tr><th rowspan="1" colspan="1">Data oriented</th><th rowspan="1" colspan="1">Document oriented</th></tr></thead><tbody><tr><td rowspan="1" colspan="1">
<eg xml:space="preserve">&lt;invoice&gt;
  &lt;orderDate&gt;1999-01-21&lt;/orderDate&gt;
  &lt;shipDate&gt;1999-01-25&lt;/shipDate&gt;
  &lt;billingAddress&gt;
   &lt;name&gt;Ashok Malhotra&lt;/name&gt;
   &lt;street&gt;123 Microsoft Ave.&lt;/street&gt;
   &lt;city&gt;Hawthorne&lt;/city&gt;
   &lt;state&gt;NY&lt;/state&gt;
   &lt;zip&gt;10532-0000&lt;/zip&gt;
  &lt;/billingAddress&gt;
  &lt;voice&gt;555-1234&lt;/voice&gt;
  &lt;fax&gt;555-4321&lt;/fax&gt;
&lt;/invoice&gt;</eg>
</td><td rowspan="1" colspan="1">
<eg xml:space="preserve">&lt;memo importance='high'
      date='1999-03-23'&gt;
  &lt;from&gt;Paul V. Biron&lt;/from&gt;
  &lt;to&gt;Ashok Malhotra&lt;/to&gt;
  &lt;subject&gt;Latest draft&lt;/subject&gt;
  &lt;body&gt;
    We need to discuss the latest
    draft &lt;emph&gt;immediately&lt;/emph&gt;.
    Either email me at &lt;email&gt;
    mailto:paul.v.biron@kp.org&lt;/email&gt;
    or call &lt;phone&gt;555-9876&lt;/phone&gt;
  &lt;/body&gt;
&lt;/memo&gt;</eg>
</td></tr></tbody></table><p>
The invoice contains several dates and telephone numbers, the postal
abbreviation for a state (which comes from an enumerated list of
sanctioned values), and a ZIP code (which takes a definable regular
form).  The memo contains many of the same types of information:
a date, telephone number, email address and an "importance" value
(from an enumerated list, such as "low", "medium" or "high"). 
Applications which process invoices and memos need to raise exceptions
if something that was supposed to be a date or telephone number does
not conform to the rules for valid dates or telephone numbers.
</p><p>
In both cases, validity constraints exist on the content of the
instances that are not expressible in XML DTDs.  The limited
datatyping facilities in XML have prevented validating XML processors
from supplying the rigorous type checking required in these
situations.  The result has been that individual applications
writers have had to implement type checking in an ad hoc manner. 
This specification addresses the need of both document authors and
applications writers for a robust, extensible datatype system for XML
which could be incorporated into XML processors.  As discussed
below, these datatypes could be used in other XML-related standards as
well.
</p></div2><div2 id="intro-relatedWork" dg="b1838"><head>Dependencies on Other Specifications</head><p>Other specifications on which this one depends
are listed in <specref ref="biblio"/>.</p><p>This specification defines some datatypes which depend on
definitions in <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/> and <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XMLNS" dg="b1838refs"/>; those
definitions, and therefore the datatypes based on them, vary between
version 1.0 (<bibref ref="XML1.0"/>,
<bibref ref="XMLNS1.0"/>) and version 1.1 (<bibref ref="XML"/>,
<bibref ref="XMLNS"/>) of those specifications.  In any given use
of this specification, the choice of the 1.0 or the 1.1 definition of
those datatypes is <termref def="key-impl-def"/>.
</p><p>
Conforming implementations of this specification 
<phrase dg="b3074">may</phrase><!--*
* material suppressed here by diff group b3074 *
*--> 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> <!--* &may; *--> be under user control.
</p><note><p>
When this specification is used to check the datatype validity of XML
input, implementations <rfc2119>may</rfc2119> provide the heuristic of using the 1.1
datatypes if the input is labeled as XML 1.1, and using the 1.0 datatypes if
the input is labeled 1.0, but this 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><p dg="b5321" id="loc5321">This specification
makes use of the EBNF notation used in the 
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/> specification<!--*
* material suppressed here by diff group b5321b *
*-->. <phrase dg="b5321b">Note
that some constructs of the EBNF notation used here
resemble the regular-expression syntax defined in this specification
(<specref ref="regexs"/>), but that they are not
identical: there are differences.
</phrase> For a fuller description of the EBNF notation, see
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#sec-notation">Section
6. Notation</xspecref> of the <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/> specification.</p></div2><div2 id="requirements"><head>Requirements</head><p>
The <bibref ref="schema-requirements"/> document spells out
concrete requirements to be fulfilled by this specification,
which state that the XML Schema Language must:
</p><olist><item><p>
provide for primitive data typing, including byte, date,
integer, sequence, SQL and Java primitive datatypes, etc.;
</p></item><item><p>
define a type system that is adequate for import/export
from database systems (e.g., relational, object, OLAP);
</p></item><item><p>
distinguish requirements relating to lexical data representation
<phrase dg="ep99">vs.</phrase><!--*
* material suppressed here by diff group ep99 *
*--> 
those governing an underlying information set;
</p></item><item><p>
allow creation of user-defined datatypes, such as
datatypes that are derived from existing datatypes and which
may constrain certain of its properties (e.g., range,
precision, length, format).
</p></item></olist></div2><div2 role="1.0" id="scope"><head>Scope</head><p>
This <!--*
* material suppressed here by diff group ep26 *
*--><phrase dg="ep26">specification
defines</phrase> datatypes that can be used in an XML Schema. 
These datatypes can be specified for element content that would be
specified as <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#dt-chardata">#PCDATA</xspecref>
and attribute values of <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#sec-attribute-types">various types </xspecref> in a
DTD.  It is the intention of this specification that it be usable
outside of the context of XML Schemas for a wide range of other
XML-related activities such as <bibref ref="XSL"/> and
<bibref ref="RDFSchema"/>.
</p></div2><div2 role="1.0" id="terminology"><head>Terminology</head><p>
The terminology used to describe XML Schema Datatypes is defined in
the body of this specification. The terms defined in the following
list are used in building those definitions and in describing the
actions of a datatype processor:
</p><glist><gitem><label>
       <termdef id="dt-compatibility" term="for compatibility">for compatibility</termdef>
      </label><def><p>
	A feature of this specification included solely to ensure that
	schemas which use this feature remain compatible with <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/><phrase dg="b3220">.</phrase>
       </p></def></gitem><gitem dg="b3220-aux"><label>
       <termdef id="dt-match" term="match"><term>match</term></termdef>
      </label><def><p><phrase id="match-p1" dg="b3220">
	<emph>(Of strings or names:)</emph> 
	Two strings or names being compared must be
	identical. Characters with multiple possible representations in
	ISO/IEC 10646 (e.g. characters with both precomposed and
	base+diacritic forms) match only if they have the same representation
	in both strings. No case folding is performed. </phrase>
       </p><p><phrase id="match-p2" dg="b3220"><emph>(Of strings and rules
	 in the grammar:)</emph> 
	A string matches a grammatical production 
	if <phrase dg="iff">and only if</phrase> it belongs to the language
	generated by that production.</phrase>
       </p></def></gitem><gitem><label>
       <termdef id="dt-may" term="may"><!--*
* material suppressed here by diff group b3220 *
*--><phrase dg="b3220"><rfc2119>may</rfc2119></phrase></termdef>
      </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></gitem><!--*
* material suppressed here by diff group b3220-aux *
*--><gitem dg="b3220"><label><termdef id="dt-should" term="should"><rfc2119>should</rfc2119></termdef></label><def><p>It is recommended that schemas, schema documents, and
	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>
       <termdef id="dt-must" term="must"><!--*
* material suppressed here by diff group b3220 *
*--><phrase dg="b3220"><rfc2119>must</rfc2119></phrase></termdef>
      </label><def><p>
	<phrase dg="b3220"><emph>(Of schemas and 
	  schema documents:)</emph></phrase>
	<!--*
* material suppressed here by diff group b3220 *
*--> 
	<phrase dg="b3220">Schemas and documents</phrase>
	are required to behave as described; otherwise they are in <termref def="dt-error"/>.
       </p><p dg="b3220"><emph>(Of processors:)</emph>
	Processors are required to behave as described.
       </p></def></gitem><gitem dg="b3220"><label><termdef id="dt-mustnot" term="must not"><rfc2119>must not</rfc2119></termdef></label><def><p>Schemas, schema documents<!--*
* material suppressed here by diff group b3220c *
*-->
	and processors are forbidden to behave as
	described; schemas and documents which nevertheless
	do so are in <termref def="dt-error"/>.</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><label>
       <termdef id="dt-error" term="error"><term>error</term></termdef>
      </label><def><!--*
* material suppressed here by diff group b3220 *
*--><p dg="b3220">A failure of a 
	<!--*
* material suppressed here by diff group b3220c *
*--><phrase dg="b3220c">schema or schema 
	 document</phrase> 
	to conform to the rules of this specification.</p><p dg="b3220">
	Except as otherwise specified, 
	processors <rfc2119>must</rfc2119> distinguish
	error-free (conforming) schemas and schema documents
	from those with errors;
	<!--*
* material suppressed here by diff group b3220b *
*-->
	<phrase dg="b3220b">if a schema
	 used in type-validation or a schema document
	 used in constructing a schema
	 is in error, processors <rfc2119>must</rfc2119>
	 report the fact;
	 if more than one is in error, it is <termref def="key-impl-dep"/>
	 whether more than one is reported as being in error.
	 If more than one of the constraints given in 
	 this specification is violated, it 
	 is <termref def="key-impl-dep"/> how many of the violations, and which, are
	 reported.</phrase>
       </p><note dg="b3220"><p>Failure of an XML element or attribute to be
	 datatype-valid against a particular
	 datatype in a particular schema is not in itself a failure 
	 to conform to this specification and thus,
	 for purposes of this specification, not an error.  
	</p></note></def></gitem><gitem dg="b8732"><label>
       <termdef id="dt-useroption" term="user option"><term>user option</term></termdef>
      </label><def><p>A choice left under the control of the user of a processor,
	rather than being fixed for all users or uses of the processor.	
	</p><p>Statements in this specification that <quote>Processors
	<rfc2119>may</rfc2119> at user option</quote> behave in a certain way mean that
	processors <rfc2119>may</rfc2119> provide mechanisms to allow users
	(i.e. invokers of the processor) to enable or disable the
	behavior indicated.  Processors which do not provide such
	user-operable controls <rfc2119>must not</rfc2119> behave in the way indicated.
	<phrase dg="b12573">Processors which do provide such 
	user-operable controls <rfc2119>must</rfc2119> make it possible for the user 
	to disable the optional behavior.</phrase>
	</p><!--* No need for this at the moment, there are no
	    * statements of this form.  So use a dummy diff group.
	    *--><!--*
* material suppressed here by diff group do-not-show *
*--><note><p>The normal expectation is that the default setting for
	  such options will be to disable the 
	  <phrase dg="b12573">optional</phrase>
	  behavior in question,
	  enabling it only when the user explicitly requests it.  This
	  is not, however, a requirement of conformance: if the
	  processor's documentation makes clear that the user can
	  disable the <phrase dg="b12573">optional</phrase>
	  behavior, then invoking the processor without
	  requesting that it be disabled can be taken as equivalent to
	  a request that it be enabled.
	  <phrase dg="b12573">It is required,
	  however, that it in fact be possible for the user to disable the
	  optional behavior.</phrase>
	  </p></note><note><p>Nothing in this specification constrains the manner
	  in which processors allow users to control user options.
	  Command-line options, menu choices in a graphical user
	  interface, environment variables, alternative call patterns
	  in an application programming interface, and other 
	  mechanisms may all be taken as providing user options.
	  </p></note></def></gitem></glist></div2><div2 role="1.0" id="constraints-and-contributions"><head>Constraints and Contributions</head><p>
This specification provides three different kinds of normative
statements about schema components, their representations in XML and
their contribution to the schema-validation of information items:
</p><glist><gitem><label>
<termdef id="dt-cos" term="Constraint on Schemas">
<term>Constraint on Schemas</term>
</termdef>
</label><def><p>
Constraints on the schema components themselves, i.e. conditions
components <termref def="dt-must"/> satisfy to be components at all.
Largely to be found in <specref ref="datatype-components"/>.
</p></def></gitem><gitem><label>
<termdef id="dt-src" term="Schema Representation Constraint">
<term>Schema Representation Constraint</term>
</termdef>
</label><def><p>
Constraints on the representation of schema components in XML. 
Some but not all of these are expressed in <specref ref="schema"/> and
<specref ref="dtd-for-datatypeDefs"/>.
</p></def></gitem><gitem><label>
<termdef id="dt-cvc" term="Validation Rule">
<term>Validation Rule</term>
</termdef>
</label><def><p>
Constraints expressed by schema components which information items
<termref def="dt-must"/> satisfy to be schema-valid.  Largely to
be found in <specref ref="datatype-components"/>.
</p></def></gitem></glist></div2></div1><div1 id="typesystem"><head><!--*
* material suppressed here by diff group fa1 *
*--><phrase dg="fa1">Datatype</phrase> System</head><!-- ednote><edtext>I don't want to use the word
<mention>type</mention> without some prefix or
adjective.&emsp;&mdash;DP</edtext></ednote --><p>This section describes the conceptual framework behind the <phrase dg="fa1">data</phrase>type system defined in this
specification.  The framework has been influenced by the
<bibref ref="ISO11404"/> standard on language-independent datatypes as
well as the datatypes for <bibref ref="SQL"/> and for programming
languages such as Java.</p><!-- ednote><edtext>Our datatypes are <emph>not</emph>
<unusual>computer representations</unusual>.&nbsp; Our value spaces
are the abstract concepts; appropriate computer representations are
determined by the implementers.</edtext></ednote --><p>The datatypes discussed in this specification are <!--*
* material suppressed here by diff group fa1 *
*--><phrase dg="fa1">for the most part</phrase> well known abstract
concepts such as <emph>integer</emph> and <emph>date</emph>. It is not
the place of this specification to <phrase dg="fa1">thoroughly </phrase>define these abstract concepts; many
other publications provide excellent definitions.<phrase dg="fa1">  However, this specification will attempt to describe the
abstract concepts well enough that they can be readily recognized and
distinguished from other abstractions with which they may be
confused.</phrase></p><!--*
* material suppressed here by diff group dp090225 *
*--><note dg="fa1"><p>Only those operations and relations needed for schema processing
are defined in this specification. Applications using these datatypes
are generally expected to implement appropriate additional functions
and/or relations to make the datatype generally useful.  For
example, the description herein of the <dtref ref="float"/> datatype
does not define addition or multiplication, much less all of the
operations defined for that datatype in <!--*
* material suppressed here by diff group b6664a *
*--><phrase dg="b6664a"><bibref ref="ieee754-2008"/></phrase> on
which it is based. 
<phrase dg="rq100">For some datatypes (e.g. 
<dtref ref="language"/> or <dtref ref="anyURI"/>) defined in part by
reference to other specifications which impose constraints not part of
the datatypes as defined here, applications may also wish to check
that values conform to the requirements given in the current version
of the relevant external specification.</phrase>
</p></note><!--* rq100: this would be a good place to add that applications may want
    * to check for RFC conformance
    *--><div2 id="datatype"><head>Datatype</head><!--* !!! newOrg assigns the id 'datatypes' to the section that contains
    * the following paragraphs.  At the moment, I have not followed that 
    * change.  -msm
    *--><!--*
* material suppressed here by diff group fa1 *
*--><p dg="fa1"><termdef term="datatype" id="dt-datatype">In
this specification, a <term>datatype</term> <!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">has
three</phrase> properties:

<ulist><item><p>A <termref def="dt-value-space"/>, which is <!--*
* material suppressed here by diff group wdd *
*-->a set<phrase dg="wdd"> of
values</phrase>. <!--*
* material suppressed here by diff group wdd *
*--></p></item><item><p>A <termref def="dt-lexical-space"/>, which is <!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">a set of
<!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase></phrase> used to denote the values</phrase>.</p></item><item><p>A small collection of <emph>functions, relations, and
procedures</emph> associated with the datatype.  Included are
equality and <phrase dg="b2947b">(for some datatypes)</phrase>
order relations on the <termref def="dt-value-space"/>, and a
<termref def="dt-lexical-mapping"/>, which is a <!--*
* material suppressed here by diff group ep26 *
*--><phrase dg="ep26">mapping from</phrase> the <termref def="dt-lexical-space"/> 
<!--*
* material suppressed here by diff group ep26 *
*--><phrase dg="ep26">into</phrase> 
the <termref def="dt-value-space"/>.</p></item><!--*
* material suppressed here by diff group wdd *
*--></ulist>
</termdef>
</p><!--* This note about simple type definitions added to allow
    * the discussion in section 4 to speak of 'the value
    * space of the {base type definition}, etc.
    * Deleted 2005-08-31.  Rationale:  the crucial bit (simple typedef
    * uniquely identifies a datatype; vs/ls/etc of simple type (def)
    * are those of the datatype thus identified) is also stated in 
    * 4.4.1.  Some graf like this is required as a heads-up before
    * terms like 'facet' and so on are used, but that graf needs
    * careful drafting and must be based on a careful reading of
    * the first three sections of the spec.  No time for that today; 
    * postpone.
    *--><!--*
<p diff="add" dg="rec12-main">When this specification is used in
conjunction with &XSP1;, 
&simple_type_definition;s are used to define datatypes.  In the
context of a valid schema, any &simple_type_definition; identifies
exactly one datatype.  More than one &simple_type_definition;
may identify the same datatype.
*--><!--* 
In what follows, references to the 
&value_space; or &lexical_space; of a &simple_type_definition;
mean the &value_space; or &lexical_space; of the datatype
uniquely identifed by that &simple_type_definition;.
*--><!--* </p> *--><!--* !!! N.B. in the WD, the following note was in the penultimate list item, 
    * not after the list. We don't have good transposition markup, so I am 
    * leaving the movement unmarked.  -MSM *--><!--* <ednote diff="add" dg="wdd"><edtext>Do we want to delete the
following Note?</edtext></ednote> *--><!--* 2005-08-26.  Reviewing our diffs from 1.0 again, MSM sees
    * that whether we mark this as new vis-a-vis the WD of July 2004
    * or not, it needs to be marked as new vis-a-vis 1.0.
    *--><note dg="fa1"><p>This specification only defines the operations and relations needed
for schema processing.  The choice of terminology for
describing/naming the datatypes is selected to guide users and
implementers in how to expand the datatype to be generally
useful—i.e., how to recognize the <quote>real world</quote>
datatypes and their variants for which the datatypes defined herein
are meant to be used for data interchange.</p></note><p dg="fa1">Along with the <termref def="dt-lexical-mapping"/> it is
often useful to have an inverse which provides a standard 
<termref def="dt-lexical-representation"/> for each value.  Such
a <termref def="dt-canonical-mapping"/> is not required for
schema processing, but is described herein for the benefit of users of
this specification, and other specifications which might find it
useful to reference these descriptions normatively.
<phrase dg="wd-21">For some datatypes, notably
<dtref ref="QName"/> and <dtref ref="NOTATION"/>, the mapping from
lexical representations to values is context-dependent; for these
types, no <termref def="dt-canonical-mapping"/> is defined.</phrase></p><note dg="rq126"><p>
Where <termref def="dt-canonical-mapping">canonical mappings</termref> are defined in this specification, they are
defined for <termref def="dt-primitive"/> datatypes. When a datatype is derived <!--* by
&fb.restriction; *--> using facets which directly
constrain the <termref def="dt-value-space"/>, then for each value eliminated from the
<termref def="dt-value-space"/>, the corresponding lexical representations are dropped
from the lexical space.  The <termref def="dt-canonical-mapping"/> for such a datatype is
a subset of the <termref def="dt-canonical-mapping"/> for its <termref def="dt-primitive"/> type and
provides a <termref def="dt-canonical-representation"/> for each value remaining in the
<termref def="dt-value-space"/>.
</p><p>
The <phrase dg="ed-pattern"><termref def="dt-pattern"/></phrase><!--*
* material suppressed here by diff group ed-pattern *
*-->
facet, on the other hand, <phrase dg="b3251">and
any other <phrase dg="b5030z">(<termref def="key-impl-def"/>)</phrase> 
<termref def="dt-lexical"/> facets<!--*
* material suppressed here by diff group b5030z *
*-->,</phrase>
restrict<!--*
* material suppressed here by diff group b3251 *
*-->
the <termref def="dt-lexical-space"/> directly.  When more than one lexical
representation is provided for a given value, 
<!--*
* material suppressed here by diff group b3251 *
*--><phrase dg="b3251">such facets</phrase>
may 
remove the <termref def="dt-canonical-representation"/> while
permitting a different lexical representation; in this case, the value
remains in the <termref def="dt-value-space"/> but has no <termref def="dt-canonical-representation"/>.
This specification provides no recourse in such situations.
Applications are free to deal with it as they see fit.
</p></note><note dg="b3232"><p>This specification sometimes uses the shorter form <quote>type</quote>
where one might strictly speaking expect the longer form
<quote>datatype</quote> (e.g. in the phrases 
<quote>union type</quote>, <quote>list type</quote>, 
<quote>base type</quote>, <quote>item type</quote>, etc.
No systematic distinction is intended between
the forms of these phrase with <quote>type</quote> and
those with <quote>datatype</quote>;
the two forms are used interchangeably.</p><p>The distinction between <quote>datatype</quote>
and <quote>simple type definition</quote>, by contrast,
carries more information:  the datatype is characterized by its
<termref def="dt-value-space"/>, <termref def="dt-lexical-space"/>, <termref def="dt-lexical-mapping"/>, etc., as
just described, independently of the specific facets or
other definitional mechanisms used in the simple type 
definition to describe that particular <termref def="dt-value-space"/>
or <termref def="dt-lexical-space"/>.  Different simple type definitions
with different selections of facets can describe the
same datatype.
</p><!--*
<ednote>
<edtext>N.B. the association of the &basetype; with the
datatype and not with the simple type definition is a
prominent exception to the story just outlined.</edtext>
</ednote>
*--></note></div2><div2 id="value-space"><head>Value space</head><!--*
* material suppressed here by diff group fa1 *
*--><p dg="fa1"><termdef term="value space" id="dt-value-space">The <term>value space</term> <emph>of a
datatype</emph> is the set of values for that
datatype.</termdef>  Associated with each value space are
selected operations and relations necessary to permit proper schema
processing.  Each value in the value space of a 
<phrase dg="b3025"><termref def="dt-primitive"/> or <termref def="dt-ordinary"/></phrase>
datatype is
denoted by one or more character strings in its <termref def="dt-lexical-space"/>,
according to <termref role="the" def="dt-lexical-mapping">the lexical
mapping</termref><phrase dg="b3025">; <termref def="dt-special"/>
datatypes, by contrast, may include <unusual>ineffable</unusual>
values not mapped to by any lexical representation</phrase>. 
(If the mapping is restricted during a
derivation in such a way that a value has no denotation, that value is
dropped from the value space.)</p><p dg="fa1">The value spaces of datatypes are abstractions,
and are defined in <specref ref="built-in-datatypes"/> 
<!--* n.b. newOrg deletes 'built-in-datatypes' and inserts a
    * section with ID builtinSTDs, changing some but not all
    * pointers to built-in-datatypes to the new ID.
    * For the moment, I've left all of them at 'built-in-datatypes'. -msm
    *-->
to the extent needed to clarify them for readers.  For example,
in defining the numerical datatypes, we assume some general numerical
concepts such as number and integer are known.  In many cases we
provide references to other documents providing more complete
definitions.</p><note dg="fa1"><p><emph>The value spaces and the values therein are
abstractions.</emph>  This specification does not prescribe any
particular internal representations that must be used when
implementing these datatypes.  In some cases, there are
references to other specifications which do prescribe specific
internal representations; these specific internal representations must
be used to comply with those other specifications, but need not be
used to comply with this specification.</p><p>In addition, other applications are expected to define additional
appropriate operations and/or relations on these value spaces (e.g.,
addition and multiplication on the various numerical datatypes'
value spaces), and are permitted where appropriate to even redefine
the operations and relations defined within this specification,
provided that <emph>for schema processing the relations and operations
used are those defined herein</emph>.</p></note><!--ednote><edtext>Could we do away with the following
paragraph?&nbsp; Does it really add anything?</edtext></ednote--><p>The <termref def="dt-value-space"/> of a <!--*
* material suppressed here by diff group fa1 *
*-->datatype can
be defined in one of the following ways:
<ulist><item><p>defined<phrase dg="fa1"> elsewhere</phrase>
axiomatically from fundamental notions (intensional definition) [see
<termref def="dt-primitive"/>]</p></item><item><p>enumerated outright<phrase dg="fa1"> from values
of an already defined datatype</phrase> (extensional definition) [see
<termref def="dt-enumeration"/>]</p></item><item><p>defined by restricting the <termref def="dt-value-space"/> of an already
defined datatype to a particular subset with a given set of properties
[see <termref def="dt-derived"/>]</p></item><item><p>defined as a combination of values from one or more already
defined <termref def="dt-value-space"/>(s) by a specific construction procedure [see
<termref def="dt-list"/> and <termref def="dt-union"/>]</p></item></ulist></p><!--*
* material suppressed here by diff group fa1 *
*--><p dg="fa1">The relations of <emph>identity</emph><!--*
* material suppressed here by diff group b2947 *
*--><phrase dg="b2947">
and</phrase>
<emph>equality</emph><!--*
* material suppressed here by diff group b2947 *
*--> 
are required for each
value space.  <phrase dg="b2947">An 
order relation is specified for some value spaces, but not 
all.</phrase>
A very few datatypes have other relations or
operations prescribed for the purposes of this specification.</p><div3 dg="fa1" id="identity"><head>Identity</head><!--* <ednote diff="add" dg="wdd"><edtext>IIRC, someone in the WG
pointed out a third situation where identity is used, but I can't find
any reference.</edtext></ednote> *--><p>The identity relation is always defined. Every value space
inherently has an identity relation. Two things are
<emph>identical</emph> if <phrase dg="iff">and only
if</phrase> they are actually the same thing: i.e., if there is no way
whatever to tell them apart.  
<!--*
* material suppressed here by diff group b3222 *
*--></p><note><p>This does not preclude implementing datatypes by using more than
one <emph>internal</emph> representation for a given value, provided
no mechanism inherent in the datatype implementation (i.e., other than
bit-string-preserving "casting" of the datum to a different
datatype) will distinguish between the two representations.</p></note><p>In the identity relation defined herein, values from different
<termref def="dt-primitive"/> datatypes' <termref def="dt-value-space">value spaces</termref> are made artificially
distinct if they might otherwise be considered identical.  For
example, there is a number <emph>two</emph> in the <dtref ref="decimal"/> datatype and a number <emph>two</emph> in the <dtref ref="float"/> datatype.  In the identity relation defined herein,
these two values are considered distinct.  Other applications
making use of these datatypes may choose to consider values such as
these identical, but for the view of <termref def="dt-primitive"/> datatypes'
<termref def="dt-value-space">value spaces</termref> used herein, they are distinct.</p><p><emph>WARNING:</emph>  Care must be taken when identifying
values across distinct primitive datatypes.  <!--*
* material suppressed here by diff group wd-3 *
*--><phrase dg="wd-3">The
<!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase> <string>0.1</string> and <string>0.10000000009</string> map
to the same value in <dtref ref="float"/> (neither <phrase dg="b3223">0.1 nor 0.10000000009</phrase> is in the value space, and
each <phrase dg="b3223">literal</phrase> is mapped to the
nearest value, namely 0.100000001490116119384765625), but map to
distinct values in <dtref ref="decimal"/>.</phrase></p><note dg="b2046"><p>Datatypes <termref def="dt-constructed"/> by <termref def="dt-fb-restriction"/> do not create new
values; they define subsets of some <termref def="dt-primitive"/> datatype's
<termref def="dt-value-space"/>.  A consequence of this fact is that the <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase>
<string>+2</string>, treated as a <dtref ref="decimal"/>,
<string>+2</string>, treated as an <dtref ref="integer"/>, and
<string>+2</string>, treated as a <dtref ref="byte"/>, all denote the
same value.  They are not only equal but identical.</p></note><p dg="b2046">Given a list <var>A</var> and a list <var>B</var>, <var>A</var> and <var>B</var>
are the same list if they are the same sequence of atomic values.
The necessary and sufficient conditions for this identity are
that <var>A</var> and <var>B</var> have the same length and that the items of <var>A</var>
are pairwise identical to the items of <var>B</var>.
</p><note dg="b2046"><p>It is a consequence of the rule just given for list identity
that there is only one empty list.  An empty list declared as
having <termref def="dt-itemType"/> <dtref ref="decimal"/> and an empty
list declared as having <termref def="dt-itemType"/> <dtref ref="string"/> 
are not only equal but identical.
</p></note><!--*
* material suppressed here by diff group b2046-abandoned *
*--></div3><div3 dg="fa1" id="equality"><head>Equality</head><p>Each <termref def="dt-primitive"/> datatype has prescribed an equality relation for
its value space.  The equality relation for most datatypes is the
identity relation.  In the few cases where it is not, 
<!--*
* material suppressed here by diff group wd-5 *
*--><phrase dg="wd-5">equality</phrase> 
has been carefully defined so <!--*
* material suppressed here by diff group wd-5 *
*--><phrase dg="wd-5">that</phrase> for
most <!--*
* material suppressed here by diff group wd-5 *
*--> operations of
interest to the datatype<!--*
* material suppressed here by diff group wd-5 *
*--><phrase dg="wd-5">,</phrase> if
two values are equal and one is substituted for the other as an
argument to any of the operations, the results will always also be
equal.<!--*
* material suppressed here by diff group wd-5 *
*--></p><!--*
* material suppressed here by diff group d071118 *
*--><p>On the other hand, equality need not cover the entire value space
of the datatype (though it usually does). <phrase dg="wd-4">In 
particular, <!--*
* material suppressed here by diff group b3224 *
*--><phrase dg="b3224">NaN
is not equal to itself</phrase> in the 
<!--*
* material suppressed here by diff group b12300-diff10-silent *
*--><phrase dg="b12300-diff10-silent"> 
<dtref ref="float"/></phrase> and 
<dtref ref="double"/> datatypes.</phrase></p><!--*
* material suppressed here by diff group b2947-1 *
*--><!--*
* material suppressed here by diff group dp081112 *
*--><p><!--*
* material suppressed here by diff group b4913 *
*--><phrase dg="b4913">This</phrase>
equality relation is used <phrase dg="b9196">in
conjunction with identity</phrase><phrase dg="b3222"> when
making <!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><termref def="dt-fb-restriction">facet-based restrictions</termref></phrase> by <emph>enumeration</emph>, 
when checking identity constraints (in the context of
<bibref ref="structural-schemas"/>)<!--*
* material suppressed here by diff group b9196 *
*--><phrase dg="b9196">
and</phrase> when checking value 
constraints<!--*
* material suppressed here by diff group b9196 *
*--></phrase><phrase dg="b9196">.  It is used </phrase>in 
conjunction with order when making
<!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><termref def="dt-fb-restriction">facet-based restrictions</termref></phrase> involving order<phrase dg="b4913"><!--*
* material suppressed here by diff group b9196 *
*--><phrase dg="b9196">.  The 
equality relation used in the evaluation of XPath expressions
may differ.</phrase>  When
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#id-expression-processing">processing
XPath expressions</xtermref> as part of XML schema-validity
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-va">assessment</xtermref> or
otherwise testing membership in the <termref def="dt-value-space"/>
of a datatype whose derivation involves <termref def="dt-assertions"/>,
equality (like all other relations) within those expressions is interpreted
using the rules of XPath (<bibref ref="XPATH2"/>)</phrase>.  
<!--*
* material suppressed here by diff group b3222 *
*-->
<phrase dg="b3222">All comparisons for
<quote>sameness</quote> prescribed by this specification
test for <phrase dg="b9196">either</phrase> 
equality<phrase dg="b9196"> or identity</phrase>, 
not for identity<phrase dg="b9196"> alone</phrase>.</phrase></p><note><p>In the prior version of this specification (1.0), equality was
always identity.  This has been changed to permit the datatypes
defined herein to more closely match the <unusual>real world</unusual>
datatypes for which  they are intended to be used as transmission
formats.</p><p>For example, the <dtref ref="float"/> datatype has an equality
which is not the identity ( −0 = +0 , but
they are not identical—although they <emph>were</emph> identical
in the 1.0 version of this specification), and whose domain excludes
one value, NaN, so that  NaN ≠ NaN .</p><p>For another example, the <dtref ref="dateTime"/> datatype
previously lost any <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time-zone offset</phrase> information in the
<termref def="dt-lexical-representation"/> as the value was converted to
<!--*
* material suppressed here by diff group dt2 *
*--><phrase dg="dt2"><!--*
* material suppressed here by diff group dt2 *
*--><termref dg="dt2" def="dt-utc"/></phrase>;
now the <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offset</phrase>
is retained and two values representing the same <unusual>moment in
time</unusual> but with different remembered <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offsets</phrase> are now
<emph>equal</emph> but not <emph>identical</emph>.</p></note><p>In the equality relation defined herein, values from different
primitive data spaces are made artificially unequal even if they might
otherwise be considered equal.  For example, there is a number
<emph>two</emph> in the <dtref ref="decimal"/> datatype and a number
<emph>two</emph> in the <dtref ref="float"/> datatype.  In the
equality relation defined herein, these two values are considered
unequal.  Other applications making use of these datatypes may
choose to consider values such as these equal<!--*
* material suppressed here by diff group b6307 *
*-->;
nonetheless, in the equality relation defined herein, they are unequal.</p><p dg="b2046">Two lists <var>A</var> and <var>B</var> are equal if and
only if they have the same length and their items are pairwise equal.
A list of length one containing a value <var>V1</var> and an atomic value
<var>V2</var> are equal if and only if <var>V1</var> is equal to <var>V2</var>.
</p><p>For the purposes of this specification, there is one equality
relation for all values of all datatypes (the union of the various
datatype's individual equalities, if one consider relations to be
sets of ordered pairs).  The <emph>equality</emph> relation is
denoted by <mention>=</mention> and its negation by
<mention>≠</mention>, each used as
a<!--*
* material suppressed here by diff group wdd *
*--> binary infix predicate: 
<var>x</var> = <var>y</var>  and 
<var>x</var> ≠ <var>y</var> .  On the other
hand, <emph>identity</emph> relationships are always described in
words.</p></div3><div3 dg="fa1" id="order"><head>Order</head><p><!--*
* material suppressed here by diff group b2947 *
*--><phrase dg="b2947">For some 
datatypes, an order relation is prescribed<!--*
* material suppressed here by diff group ep26 *
*--> 
for use in checking
upper and lower bounds of the <termref def="dt-value-space"/>.</phrase>  This order may be
a <emph>partial</emph> order, which means that there may be values in
the <termref def="dt-value-space"/> which are neither equal, less-than, nor
greater-than.  Such value pairs are
<emph>incomparable</emph>.  <phrase dg="b2947-1">In many cases, 
<!--*
* material suppressed here by diff group b2947 *
*--><phrase dg="b2947">no order
is prescribed</phrase>; <!--*
* material suppressed here by diff group b2947 *
*--><phrase dg="b2947">each pair of values is either</phrase>
equal or <termref def="dt-incomparable"/>. 
</phrase><termdef term="incomparable" id="dt-incomparable" dg="wdd">Two
values that are neither equal, less-than, nor greater-than are
<term>incomparable</term>. <phrase dg="fa1-fix">Two values
that are not <termref def="dt-incomparable"/> are
<term>comparable</term>.</phrase></termdef></p><!--*
* material suppressed here by diff group d071118 *
*--><!--*
* material suppressed here by diff group b2947-1 *
*--><!--*
* material suppressed here by diff group dp081112 *
*--><p>The order relation is used
in conjunction with equality when making <!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><termref def="dt-fb-restriction">facet-based restrictions</termref></phrase>
involving order.  This is the only use of
<!--*
* material suppressed here by diff group b4913 *
*--><phrase dg="b4913">this
order relation</phrase> for schema
processing.<phrase dg="b4913">  Of course, when
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#id-expression-processing">processing
XPath expressions</xtermref> as part of XML schema-validity
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-va">assessment</xtermref> or
otherwise testing membership in the <termref def="dt-value-space"/>
of a datatype whose derivation involves <termref def="dt-assertions"/>,
order (like all other relations) within those expressions is interpreted
using the rules of XPath (<bibref ref="XPATH2"/>).</phrase></p><p>In this specification, this less-than order relation is denoted by
<mention>&lt;</mention> (and its inverse by <mention>&gt;</mention>),
the weak order by <mention>≤</mention> (and its inverse by
<mention>≥</mention>), and the resulting <termref def="dt-incomparable"/> relation by
<mention>&lt;&gt;</mention>, each used as a<!--*
* material suppressed here by diff group wdd *
*--> binary infix predicate: 
<var>x</var> &lt; <var>y</var> , 
<var>x</var> ≤ <var>y</var> , 
<var>x</var> &gt; <var>y</var> , 
<var>x</var> ≥ <var>y</var> , and 
<var>x</var> &lt;&gt; <var>y</var> .</p><note><p>The weak order <unusual>less-than-or-equal</unusual> means
<unusual>less-than</unusual> or <unusual>equal</unusual> <emph>and one
can tell which</emph>.  For example, the <dtref ref="duration"/> P1M (one month) is <emph>not</emph>
less-than-or-equal P31D (thirty-one days) because P1M is not less than
P31D, nor is P1M equal to P31D.  Instead, P1M is <termref def="dt-incomparable"/> with P31D.)  The formal
definition of order for <dtref ref="duration"/> (<specref ref="duration"/>) 
<!--*
* material suppressed here by diff group ep26 *
*--><phrase dg="ep26">ensures</phrase> 
that this is true.</p></note><!--*
* material suppressed here by diff group dp200701 *
*--><p><!--*
* material suppressed here by diff group b3225 *
*--><phrase dg="b3225">For
purposes of this specification, the</phrase> value spaces of primitive datatypes are
<!--*
* material suppressed here by diff group b3225 *
*--><phrase dg="b3225">disjoint, even in cases where the
abstractions they represent might be thought of as having</phrase> 
values in common.  In the order 
relation<phrase dg="ep26">s</phrase> defined <!--*
* material suppressed here by diff group b3225 *
*--><phrase dg="b3225">in this specification, values from
different</phrase> value spaces are <!--*
* material suppressed here by diff group b3225 *
*--><phrase dg="b3225"><!--*
* material suppressed here by diff group ep26 *
*--><!--* no causality here, lose the 'thus'! *--></phrase>
<termref def="dt-incomparable"/>.  For example, the numbers two
and three are values in both the
<!--* 
<phrase diff="del" dg="b3225-wdd-rev">
  <phrase diff="del" dg="b3225-wdd">decimal</phrase>
  <phrase diff="add" dg="b3225-wdd">&pD;</phrase>
</phrase>
<phrase diff="add" dg="b3225-wdd-rev">
  <phrase diff="del" dg="b3225-wdd">&pD;</phrase>
  <phrase diff="add" dg="b3225-wdd">decimal</phrase>
</phrase> *-->
<!--*
* material suppressed here by diff group b3225 *
*--><phrase dg="b3225">decimal</phrase>
datatype and the float datatype.  In the order relation defined
here<!--*
* material suppressed here by diff group b3225 *
*-->,
<phrase dg="b3225">the </phrase>two in the decimal datatype
<!--*
* material suppressed here by diff group b3225 *
*--><phrase dg="b3225">is
not less than the</phrase> three in the float datatype<phrase dg="b3225">;
the two values</phrase> are
incomparable<!--*
* material suppressed here by diff group b3225 *
*-->.  Other
applications making use of these
datatypes may choose to consider values such as these comparable.</p><!--*
* material suppressed here by diff group b3224 *
*--><note dg="b3224"><p>Comparison of values from different <termref def="dt-primitive"/> datatypes
can sometimes be an error and sometimes not, depending on context.
</p><p>
When made for purposes of checking an enumeration constraint,
such a comparison is not in itself an error, but since
<!--*
* material suppressed here by diff group wgi-20080530 *
*--><phrase dg="wgi-20080530">no
two values from different <termref def="dt-primitive"/> <termref def="dt-value-space">value spaces</termref> are 
equal</phrase>, any 
comparison of <termref def="dt-incomparable"/> values will invariably be false.
</p><p>
Specifying an upper or lower bound which is of the wrong primitive
datatype (and therefore <termref def="dt-incomparable"/> with the values of the datatype
it is supposed to restrict) is, by contrast, always an error.
It is a consequence of the rules for
<termref def="dt-fb-restriction"/> that in conforming simple type definitions, the
values of upper and lower bounds, and enumerated values, <rfc2119>must</rfc2119> be
drawn from the value space of the <termref def="dt-basetype"/>, which necessarily means
from the same <termref def="dt-primitive"/> datatype.
</p><p>
Comparison of <termref def="dt-incomparable"/> values in the context of an XPath
expression (e.g. in an assertion or in the rules for conditional type
assignment) can raise a dynamic error in the evaluation of the XPath
expression; see <bibref ref="F_O"/> for details.</p></note></div3></div2><!--*
* material suppressed here by diff group fa1 *
*--><div2 id="lexical-space" dg="fa1"><head>The Lexical Space and Lexical Mapping</head><!--
<p><termdef term="lexical mapping" id="dt-lexical-mapping">A
<term>lexical mapping</term> for a datatype is a function whose domain
is a set of character strings and whose range is a subset of the set
of values of that datatype.</termdef> Lexical mappings are designated
<emph>active</emph> or <emph>inactive</emph>.&nbsp; Two lexical
mappings active at the same time must have disjoint domains, or at
least must agree on the intersection of their domains; this assures
that <termref role="the" def="dt-lexical-mapping">the (combined)
lexical mapping</termref> is a function: it does not map one lexical
representation to more than one value.</p>

<p><termdef term="lexical representation"
id="dt-lexical-representation">The members of the domain of a lexical
mapping are <term>lexical representations</term> (under that mapping)
of the values to which they are mapped.</termdef></p>

<p><termdef term="the lexical mapping"
id="dt-the-lexical-mapping"><term><emph>The</emph> lexical
mapping</term> of a datatype is the union of all active lexical
mappings for that datatype.</termdef>&nbsp; The union of the active
lexical mappings will necessarily have as its range the
&value_space;.&nbsp; This assures that each value has at least one
&lexical_representation;.</p>

<p><termdef term="lexical space" id="dt-lexical-space">The
<term>lexical space</term> of a datatype is the domain of <termref
role="the" def="dt-lexical-mapping">the lexical mapping</termref> for
that datatype.</termdef>&nbsp; A datatype may have more than
one&lexical_mapping;, and more than one may be active, subject to the
constraints given above.</p>

<p>Should a datatype have &lexical_mappings; whose domains overlap and
which do not give the same value for character strings in the overlap,
then there must be a fixed algorithm (possibly dependent on facet
values) which selects which lexical mappings are active (subject to
the constraints above); otherwise there <emph>may</emph> be such an
algorithm and facet(s).&nbsp; In the absence of such an algorithm all
of the datatype's mappings are active.</p> --><!--* <ednote><edtext>Some things in this section and elsewhere will
need to be rewritten once we decide just how to deal with
context-dependent lexical mappings and lexical
spaces.</edtext></ednote> *--><p><termdef term="lexical mapping" id="dt-lexical-mapping">The
<term>lexical mapping</term> for a datatype is a prescribed 
<!--*
* material suppressed here by diff group b3227 *
*--><phrase dg="b3227">relation
which maps from the <termref def="dt-lexical-space"/> of the datatype
into its <termref def="dt-value-space"/></phrase>.</termdef></p><p><termdef term="lexical space" id="dt-lexical-space">The
<term>lexical space</term> of a datatype is 
<!--*
* material suppressed here by diff group b3227 *
*--><phrase dg="b3227">the prescribed set of strings
which</phrase>
<termref role="the" def="dt-lexical-mapping">the lexical
mapping</termref> for that datatype<phrase dg="b3227">
maps to values of that datatype</phrase>.</termdef><!-- &nbsp;  A datatype
may have more than one&lexical_mapping;, and more than one may be
active, subject to the constraints given above. --></p><p><termdef term="lexical representation" id="dt-lexical-representation">The members of the <termref def="dt-lexical-space"/> are
<term>lexical representations</term> of the values to which they are
mapped.</termdef></p><note dg="ep26"><p>For the <termref def="dt-special"/> datatypes, the <termref def="dt-lexical-mapping">lexical mappings</termref> defined
here map from the <termref def="dt-lexical-space"/> into, but not onto, the <termref def="dt-value-space"/>.
The <termref def="dt-value-space">value spaces</termref> of the <termref def="dt-special"/> datatypes
include <unusual>ineffable</unusual> values for which the <termref def="dt-lexical-mapping">lexical mappings</termref> defined
in this specification provide no lexical representation.</p><p>For the <termref def="dt-primitive"/> and <termref def="dt-ordinary"/> <phrase dg="b3025">atomic</phrase> datatypes, the <termref def="dt-lexical-mapping"/> is a 
(total)
function on the entire <termref def="dt-lexical-space"/> <emph>onto</emph> (not merely
<emph>into</emph>) the <termref def="dt-value-space"/>:  every member of the
<termref def="dt-lexical-space"/> maps into the <termref def="dt-value-space"/>, and every value is mapped
to by some member of the <termref def="dt-lexical-space"/>.</p><p dg="b3025">For <termref def="dt-union"/> datatypes, the <termref def="dt-lexical-mapping"/>
is not necessarily a function, since the same <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase> may map to
different values in different member types.  For <termref def="dt-list"/> datatypes,
the <termref def="dt-lexical-mapping"/> is a function if and only if the <termref def="dt-lexical-mapping"/>
of the list's <termref def="dt-itemType"/> is a function.
</p></note><p dg="rq21-lit">
<termdef term="literal" id="dt-literal">A sequence of zero or more
characters in the Universal Character Set (UCS) which may or may not
prove upon inspection to be a member of the <termref def="dt-lexical-space"/> of a given
datatype and thus a <termref def="dt-lexical-representation"/> of a given value in that datatype's
<termref def="dt-value-space"/>, is referred to as a <term>literal</term>.</termdef> The
term is used indifferently both for character sequences which are
members of a particular <termref def="dt-lexical-space"/> and for those which are
not.</p><!--*
* material suppressed here by diff group b6909edn *
*--><p dg="b6909">If a derivation introduces a
<termref def="dt-pre-lexical"/> facet value (a new value for
<compref ref="f-w"/> or an implementation-defined
<termref def="dt-pre-lexical"/> facet), the corresponding
<termref def="dt-pre-lexical"/> transformation of a character string,
if indeed it changed that string, could prevent that string from ever
having the <termref def="dt-lexical-mapping"/> of the derived datatype
applied to it.  Character strings that a
<termref def="dt-pre-lexical"/> transformation blocks in this way
(i.e., they are not in the range of the <termref def="dt-pre-lexical"/>
facet's transformation) are always dropped from the derived datatype's 
<termref def="dt-lexical-space"/>.</p><!--*
* material suppressed here by diff group dp081112 *
*--><note dg="b3240b"><p>One should be aware that in the context of XML
<!--*
* material suppressed here by diff group b3240bb *
*--><phrase dg="b3240bb">schema-validity
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-va">assessment</xtermref></phrase>,
there are <termref def="dt-pre-lexical"/> transformations of the
input character string<!--*
* material suppressed here by diff group b3240bb *
*--> 
<phrase dg="b3240bb">(</phrase>controlled by the
<compref ref="f-w"/> facet and any implementation-defined
<termref def="dt-pre-lexical"/>
facets<!--*
* material suppressed here by diff group b3240bb *
*--><phrase dg="b3240bb">)</phrase>
which result in the intended <termref def="dt-literal"/>. 
<!--*
* material suppressed here by diff group b6909 *
*--><phrase dg="b6909">Systems other than
XML schema-validity
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-va">assessment</xtermref></phrase>
utilizing this specification may or may not implement these
transformations.  If they do not, then input character strings
that would have been transformed into correct
<termref def="dt-lexical-representation">lexical representations</termref>,
when taken <unusual>raw</unusual>, may not be
correct <termref def="dt-lexical-representation">lexical
representations</termref>.</p></note><p>Should a derivation be made using a derivation mechanism that
removes <termref def="dt-lexical-representation">lexical representations</termref> from the<termref def="dt-lexical-space"/> to the
extent that one or more values cease to have any
<termref def="dt-lexical-representation"/>, then those values are dropped from the
<termref def="dt-value-space"/>.</p><note><p>This could happen by means of a <compref ref="f-p"/><!--*
* material suppressed here by diff group b5030z *
*-->
<phrase dg="b3251">or other <termref def="dt-lexical"/></phrase>
facet<!-- or a
<phrase role="UNSURE"><compref ref="NOTATION-facets"/></phrase>
facet--><phrase dg="b6909">, or by a
<termref def="dt-pre-lexical"/> facet as described above</phrase>.</p></note><p>Conversely, should a derivation remove values then their
<termref def="dt-lexical-representation">lexical representations</termref> are dropped from the <termref def="dt-lexical-space"/> unless
there is a facet value whose impact is defined to cause the
otherwise-dropped <termref def="dt-lexical-representation"/> to be mapped to another
value instead.</p><note><p>There are currently no facets with such an impact.  There may
be in the future.</p></note><p>For example, '100' and '1.0E2' are two
different <termref def="dt-lexical-representation">lexical representations</termref> from the <dtref ref="float"/>
datatype which
both denote the same value.  The datatype system defined in this
specification provides mechanisms for schema designers to control the
<termref def="dt-value-space"/> and the corresponding set of acceptable
<termref def="dt-lexical-representation">lexical representations</termref> of those values for a datatype.</p><div3 id="canonical-lexical-representation"><head>Canonical Mapping</head><!--* <issue id="RQ-129i" role="1.1">
<p><loc href="&reqs;#eliminate-canonical" target="reqs">RQ-129 (remove
dependency on canonical representations)</loc></p>
<p>The dependencies are in Part 1; they will be resolved there.&nbsp;
Text in this Part will reflect that &canonical_representation; are
provided for the benefit of other users, including other
specifications that might want to reference these datatypes.</p>
</issue> *--><!--* <issue id="RQ-126i" role="1.1">
<p><loc href="&reqs;#restrict-can-forms" target="reqs">RQ-126
(restricting away canonical representations)</loc></p>
<p>Given the "pattern" &cfacet;, restricting away &canonical_representations; 
cannot be prohibited without undue processing
expense.&nbsp; A warning will be inserted, and RQ-129 will insure that
loss of &canonical_representations; will not affect schema
processing.</p>
</issue> *--><p>While the datatypes defined in this specification <!--*
* material suppressed here by diff group b3227 *
*--><phrase dg="b3227">often</phrase> have a single <termref def="dt-lexical-representation"/> for
each value (i.e., each value in the datatype's <termref def="dt-value-space"/> is
denoted by a single <termref def="dt-lexical-representation">representation</termref> in its
<termref def="dt-lexical-space"/>), this is not always the case.  The example in
the previous section shows two <termref def="dt-lexical-representation">lexical representations</termref> from the
<dtref ref="float"/> datatype which denote the same value.</p><p><termdef id="dt-canonical-mapping" term="canonical mapping">The 
<term>canonical mapping</term> is a prescribed subset of the inverse of a
<termref def="dt-lexical-mapping"/> which is 
one-to-one and whose domain (where possible) is the entire range of the
<termref def="dt-lexical-mapping"/> (the
<termref def="dt-value-space"/>).</termdef>  Thus a 
<termref def="dt-canonical-mapping"/> selects one
<termref def="dt-lexical-representation"/> for each
value in the <termref def="dt-value-space"/>.<!-- 

&nbsp; <phrase role="UNSURE">Most lexical mappings have an associated
canonical mapping; the exceptions are a few lexical mappings that are
context dependent.</phrase>&nbsp; If two <termref
def="dt-canonical-mapping">canonical mappings</termref> with
intersecting domains, for a given &lexical_mapping;, are associated
with a datatype, then there will be a fixed algorithm (possibly
dependent on facet values) associated with the datatype which resolves
any ambiguity of &canonical_mapping; in the intersection.

--></p><p><termdef term="canonical representation" id="dt-canonical-representation">The <term>canonical
representation</term> of a value in the <termref def="dt-value-space"/> of a datatype is
the <termref def="dt-lexical-representation"/> associated with that value by the
datatype's <termref def="dt-canonical-mapping"/></termdef>.</p><!-- <p><termdef id="dt-the-canonical-mapping" term="the canonical
mapping"><term><emph>The</emph> canonical mapping</term> of a datatype
is essentially the union of the <termref
def="dt-canonical-mapping">canonical mappings</termref> associated
with the active &lexical_mappings;, with values (if any) in the
pairwise intersection of the domains of those mappings selected
according to a fixed algorithm (possibly having facet values as
parameters) associated with the datatype.</termdef></p> --><p><termref role="the" def="dt-canonical-mapping">Canonical
mappings</termref> are not available for datatypes whose
<termref def="dt-lexical-mapping">lexical mappings</termref> are context dependent (i.e., mappings for which the
value of a <termref def="dt-lexical-representation"/> depends on the context in which it
occurs, or for which a character string may or may not be a valid
<termref def="dt-lexical-representation"/> similarly depending on its context)</p><note><p><termref def="dt-canonical-representation">Canonical
representations</termref> are provided where feasible for the use of
other applications; they are not required for schema processing
itself.  <emph>A conforming schema processor implementation is
not required to implement <termref def="dt-canonical-mapping">canonical
mappings</termref>.</emph></p></note></div3></div2><!--*
* material suppressed here by diff group fa1.z *
*--><div2 role="1.0" id="datatype-dichotomies" dg="trm1"><head>Datatype
<!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">Distinctions</phrase></head><p>It is useful to categorize the datatypes defined in this
specification along various dimensions, <!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">defining terms which
can be used to characterize datatypes and the <dtref ref="std"/>s
which define them</phrase>.</p><div3 role="1.0" id="atomic-vs-list"><head>Atomic vs. List vs. Union Datatypes</head><!--*
* material suppressed here by diff group rq120 *
*--><p dg="rq120">First, we distinguish <termref def="dt-atomic"/>,
<termref def="dt-list"/>, and <termref def="dt-union"/> datatypes.</p><p dg="b3244"><termdef id="dt-atomic-value" term="atomic value">An
<term>atomic value</term> is an elementary value, not
constructed from simpler values by any <phrase dg="ep26">user-accessible</phrase>
means defined by this specification.</termdef></p><ulist><item><p><termdef id="dt-atomic" term="atomic"><term>Atomic</term> datatypes
are those <!--*
* material suppressed here by diff group b3244 *
*--><phrase dg="b3244">whose
<termref def="dt-value-space">value spaces</termref> contain only <termref def="dt-atomic-value">atomic values</termref></phrase>.<phrase dg="aat">  
<term>Atomic</term> datatypes are <!--* <phrase diff="del" dg="aatj">those derived from
<dtref ref="anyAtomicType"/></phrase> *--> <dtref ref="anyAtomicType"/> and all 
datatypes 
<!--*
* material suppressed here by diff group rq120 *
*--><termref def="dt-derived" dg="rq120"/> from it.</phrase></termdef></p></item><item><p><termdef id="dt-list" term="list"><term>List</term> datatypes are
those having values each of which consists of a finite-length
(possibly empty) sequence of <!--*
* material suppressed here by diff group b3244 *
*--><phrase dg="b3244"><termref def="dt-atomic-value">atomic values</termref>.  The values in a list are
drawn from some</phrase>
<termref def="dt-atomic"/> datatype<phrase dg="rq120"> (or <phrase dg="b3244">from</phrase>
a <termref def="dt-union"/> of <termref def="dt-atomic"/> datatypes), which is
the <termref def="dt-itemType"/> of the <term>list</term></phrase>. <!--*
* material suppressed here by diff group aat1 *
*--> </termdef></p><note dg="b3228"><p>It is a consequence of constraints normatively specified elsewhere
in this document <phrase dg="b11103"> (in particular,
the component properties specified in
<specref ref="dc-defn"/>)</phrase>
that the <termref def="dt-itemType"/> of a list <rfc2119>may</rfc2119> be any <termref def="dt-atomic"/>
datatype, or any <termref def="dt-union"/> datatype whose <!--*
* material suppressed here by diff group b11006 *
*--><phrase dg="b11006"><termref def="dt-basicmember">basic members</termref> are all</phrase> 
<termref def="dt-atomic"/> datatypes
(so a <termref def="dt-list"/> of a <termref def="dt-union"/> of <termref def="dt-atomic"/> datatypes is possible, but not a
<termref def="dt-list"/> of a <termref def="dt-union"/> of <termref def="dt-list">lists</termref>).  The <termref def="dt-itemType"/> of a list <rfc2119>must not</rfc2119>
itself be a list datatype.</p></note></item><item><p><termdef id="dt-union" term="union"><term>Union</term> datatypes
are <phrase dg="b2044">(a) </phrase>those whose <!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><termref def="dt-value-space">value spaces</termref><phrase dg="b2044">,</phrase><!--*
* material suppressed here by diff group b2044 *
*-->
<termref def="dt-lexical-space">lexical spaces</termref><phrase dg="b2044">, and
<termref def="dt-lexical-mapping">lexical mappings</termref></phrase> are the union of the <!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><termref def="dt-value-space">value spaces</termref><phrase dg="b2044">,</phrase><!--*
* material suppressed here by diff group b2044 *
*-->
<termref def="dt-lexical-space">lexical spaces</termref><phrase dg="b2044">, and
<termref def="dt-lexical-mapping">lexical mappings</termref></phrase> of one or more other datatypes<phrase dg="rq120">, which are the <termref def="dt-memberTypes"/> of the
union</phrase><phrase dg="b2044">, or (b) those derived by
<termref def="dt-fb-restriction"/> of another union datatype</phrase>.<!--*
* material suppressed here by diff group aat1 *
*--> </phrase></phrase></termdef></p><note dg="b3228"><p>It is a consequence of constraints normatively specified
elsewhere in this document <phrase dg="b11103"> (in particular,
the component properties specified in
<specref ref="dc-defn"/>)</phrase>
that any <termref def="dt-primitive"/> or <termref def="dt-ordinary"/> datatype <rfc2119>may</rfc2119> occur
among the <termref def="dt-memberTypes"/> of a <termref def="dt-union"/>.  (In particular,
<termref def="dt-union"/> datatypes may themselves be members of 
<termref def="dt-union">unions</termref>, as may <termref def="dt-list">lists</termref>.)  The only prohibition is that no <termref def="dt-special"/>
datatype may be a member of a <termref def="dt-union"/>.
</p></note></item></ulist><p>For example, a single token which <termref def="dt-match">matches</termref> <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-Nmtoken">Nmtoken</xspecref> from
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/> <!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">is in the value
space</phrase> of <!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">the</phrase> <termref def="dt-atomic"/> datatype <!--*
* material suppressed here by diff group rq120 *
*--><dtref ref="NMTOKEN"/><!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">,</phrase> while a sequence of such tokens <!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">is in the value space of the</phrase> <termref def="dt-list"/>
datatype <!--*
* material suppressed here by diff group rq120 *
*--><dtref ref="NMTOKENS"/><!--*
* material suppressed here by diff group rq120 *
*-->.
</p><div4 role="1.0" id="atomic"><head>Atomic Datatypes</head><!--*
* material suppressed here by diff group b3230 *
*--><p dg="b3230">An <termref def="dt-atomic"/> datatype has a <termref def="dt-value-space"/>
consisting of a set of <unusual>atomic</unusual> or elementary values.</p><note dg="b3230"><p>Atomic values are sometimes regarded, and described, as <quote>not
decomposable</quote>, but in fact the values in several datatypes
defined here are described with internal structure, which is appealed
to in checking whether particular values satisfy various constraints
(e.g. upper and lower bounds on a datatype).  Other specifications
which use the datatypes defined here may define operations which
attribute internal structure to values and expose or act upon that
structure.</p></note><p dg="b3230">
The <termref def="dt-lexical-space"/> of an <termref def="dt-atomic"/> datatype is a set of <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase>
whose internal structure is specific to the datatype in
question.</p><p dg="b3230">There is one <termref def="dt-special"/> <termref def="dt-atomic"/> datatype
(<dtref ref="anyAtomicType"/>), and a number of <termref def="dt-primitive"/> <termref def="dt-atomic"/>
datatypes which have <dtref ref="anyAtomicType"/> as their
<termref def="dt-basetype"/>.  All other <termref def="dt-atomic"/> datatypes are <termref def="dt-derived"/> either
from one of the <termref def="dt-primitive"/> <termref def="dt-atomic"/> datatypes or from another
<termref def="dt-ordinary"/> <termref def="dt-atomic"/> datatype.  No <termref def="dt-user-defined"/> datatype <rfc2119>may</rfc2119> have
<dtref ref="anyAtomicType"/> as its <termref def="dt-basetype"/>.</p></div4><div4 role="1.0" id="list-datatypes"><head>List Datatypes</head><!-- question: are lists ordered? answer should be NO...the sequence
within a single value is ordered, but the value space is a list type
is not ordered
--><!--*
* material suppressed here by diff group appr070824 *
*--><!--*
* material suppressed here by diff group b3231 *
*--><p><!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><termref def="dt-list">List</termref></phrase> datatypes are always <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-constructed"/><phrase dg="rq120"> from some other type; they are never
<termref def="dt-primitive"/></phrase>.  The <termref def="dt-value-space"/> of a <termref def="dt-list"/> datatype is
<!--*
* material suppressed here by diff group b3227 *
*--><phrase dg="b3227">the</phrase> set of finite-length sequences of
<!--* WG suppresses this 'ordinary', 2005-02-04 *-->
<!--* <phrase diff="add" dg="aatf">ordinary </phrase> *-->
<phrase dg="b5625">zero or more</phrase>
<termref def="dt-atomic"/>
values<phrase dg="b3227">
where each <termref def="dt-atomic"/> value is drawn from the <termref def="dt-value-space"/> of the lists's <termref def="dt-itemType"/>
and has a <termref def="dt-lexical-representation"/> containing no
whitespace</phrase>. 
The <termref def="dt-lexical-space"/> of a
<termref def="dt-list"/> datatype is a set of 
<!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase> <!--* <phrase dg="rq120" diff="add">&lexical_representations;</phrase>  *-->
<!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">each
of which</phrase> 
is a space-separated sequence of
<!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase>
<!--* <phrase dg="rq120" diff="add">&lexical_representations;</phrase> *-->
of the
<!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><termref def="dt-itemType"/></phrase>.</p><p><termdef id="dt-itemType" term="item type">
The <termref def="dt-atomic"/> or <termref def="dt-union"/>
datatype that participates in the definition of a <termref def="dt-list"/> datatype
is <!--*
* material suppressed here by diff group rq120 *
*-->the 
<!--*
* material suppressed here by diff group rq120 *
*--><term dg="rq120">item type</term> 
of that <termref def="dt-list"/> datatype.</termdef><phrase dg="rq120">  If 
the <termref def="dt-itemType"/> is a <termref def="dt-union"/>, each of its 
<!--*
* material suppressed here by diff group b2044 *
*--><phrase dg="b2044"><termref def="dt-basicmember">basic members</termref></phrase> <rfc2119>must</rfc2119> be 
<termref def="dt-atomic"/>.</phrase></p><note role="example"><eg xml:space="preserve">
&lt;simpleType name='sizes'&gt;
  &lt;list itemType='decimal'/&gt;
&lt;/simpleType&gt;
</eg><eg xml:space="preserve">
&lt;cerealSizes xsi:type='sizes'&gt; 8 10.5 12 &lt;/cerealSizes&gt;
</eg></note><!--*
* material suppressed here by diff group appr070331 *
*--><p>A <termref def="dt-list"/> datatype can be 
<!--*
* material suppressed here by diff group rq120 *
*--><termref def="dt-constructed" dg="rq120"/>
from an <phrase dg="aatf">ordinary 
</phrase><phrase dg="rq120o">or
<termref def="dt-primitive"/> </phrase><termref def="dt-atomic"/> 
datatype whose <termref def="dt-lexical-space"/> allows
<!--*
* material suppressed here by diff group b3233 *
*--><phrase dg="b3233">whitespace</phrase>
(such as <dtref ref="string"/> or <dtref ref="anyURI"/>) or a
<termref def="dt-union"/> datatype any of whose 
<propref comp="std" prop="member type definitions"/>'s
<termref def="dt-lexical-space"/> allows space.
<!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">Since <termref def="dt-list"/>
items are separated at whitespace before the
<termref def="dt-lexical-representation">lexical representations</termref>
of the items are mapped to values, no whitespace will ever occur
in the <termref def="dt-lexical-representation"/>
of a <termref def="dt-list"/> item, even when the item
type would in principle allow it.  
<!--* For the same reason, when whitespace is
<emph>required</emph> in every &lexical_representation; of a
value in the &value_space; of the &itemType;,
that value can never occur as an item of any of the
<termref def="dt-list">list&apos;s</termref> values</phrase>.
*-->
For the same reason, when every possible
<termref def="dt-lexical-representation"/> of a given
value in the <termref def="dt-value-space"/> of the <termref def="dt-itemType"/>
includes whitespace,
that value can never occur as an item in any value of the
<termref def="dt-list"/> datatype.</phrase></p><!--* wouldn't 'value in the item type' be more concise? *--><!--*
* material suppressed here by diff group pre *
*--><note role="example"><eg xml:space="preserve">
&lt;simpleType name='listOfString'&gt;
  &lt;list itemType='string'/&gt;
&lt;/simpleType&gt;
</eg><eg xml:space="preserve">
&lt;someElement xsi:type='listOfString'&gt;
this is not list item 1
this is not list item 2
this is not list item 3
&lt;/someElement&gt;
</eg><p>In the above example, the value of the <emph>someElement</emph> element
is not a <termref def="dt-list"/> of <termref def="dt-length"/> 3;
rather, it is a <termref def="dt-list"/> of <termref def="dt-length"/>
18.</p></note><!--
     somehow need to get the <has-facets> concept for abstract lists
	 into built-in.xsd, so that the following can be auto-generated
  --><p>When a datatype is <termref def="dt-derived"/> 
<!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">by 
<termref def="dt-fb-restriction">restricting</termref></phrase> a
<termref def="dt-list"/> datatype, the following
<termref def="dt-constraining-facet">constraining facets</termref> apply:
<ulist><item><p><termref def="dt-length"/></p></item><item><p><termref def="dt-maxLength"/></p></item><item><p><termref def="dt-minLength"/></p></item><item><p><termref def="dt-enumeration"/></p></item><item><p><phrase dg="ed-pattern"><termref def="dt-pattern"/></phrase><!--*
* material suppressed here by diff group ed-pattern *
*--></p></item><item><p><termref def="dt-whiteSpace"/></p></item><item dg="b5030"><p><termref def="dt-assertions"/></p></item></ulist>
</p><p>For each of <termref def="dt-length"/>, <termref def="dt-maxLength"/>
and <termref def="dt-minLength"/>, the 
<emph><!--*
* material suppressed here by diff group rq120 *
*-->length</emph> is
measured in number 
of list 
items.  The value of <termref def="dt-whiteSpace"/>
is fixed to the value <pt>collapse</pt>.</p><!--*
* material suppressed here by diff group appr070824 *
*--><p>For <termref def="dt-list"/> datatypes the <termref def="dt-lexical-space"/>
is composed of space-separated
<!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase>
of <!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">the</phrase> 
<termref def="dt-itemType"/>.  
<!--* Hence, any
&pattern.tc; specified when a new datatype is
&derived; from a &list; datatype is matched against
<phrase diff="del" dg="rq120">each literal of the &list; 
datatype and not against the literals of the datatype that serves as its
&itemType;</phrase><phrase diff="add" dg="rq120">the 
&lexical_representations; of the &list; as a whole, 
not against the &lexical_representations; of the individual list items</phrase>.
*-->
<!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">A</phrase>ny 
<phrase dg="ed-pattern"><termref def="dt-pattern"/></phrase><!--*
* material suppressed here by diff group ed-pattern *
*--> specified when a new datatype is
<termref def="dt-derived"/> from a <termref def="dt-list"/> datatype 
<!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">applies
to the members of the <termref def="dt-list"/> datatype's
<termref def="dt-lexical-space"/>, not to the members of the <termref def="dt-lexical-space"/>
of the <termref def="dt-itemType"/>.<phrase dg="b3234">  Similarly, 
<!--*
* material suppressed here by diff group ep26 *
*--><phrase dg="ep26">enumerated
values are compared to the entire <termref def="dt-list"/></phrase>, not <phrase dg="ep26">to
individual</phrase> list items<phrase dg="b5030">,
and <compref ref="f-a"/> apply to the entire <termref def="dt-list"/> too</phrase>.</phrase></phrase>
<phrase dg="b2046">Lists are identical if and only if they have the
same length and their items are pairwise identical; they are
equal if and only if they have the same length and their items
are pairwise equal.  And <!--*
* material suppressed here by diff group wgi-20080530 *
*-->
a list of length one whose item is an atomic value <var>V1</var> is
<!--*
* material suppressed here by diff group wgi-20080530 *
*--><!--*
* material suppressed here by diff group b9196 *
*--><phrase dg="b9196">equal or identical</phrase> 
to an atomic value <var>V2</var> 
if and only if <var>V1</var> is 
<!--*
* material suppressed here by diff group wgi-20080530 *
*--><!--*
* material suppressed here by diff group b9196 *
*--><phrase dg="b9196">equal or identical</phrase> 
to <var>V2</var>.
</phrase></p><note role="example"><eg xml:space="preserve">&lt;xs:simpleType name='myList'&gt;
	&lt;xs:list itemType='xs:integer'/&gt;
&lt;/xs:simpleType&gt;
&lt;xs:simpleType name='myRestrictedList'&gt;
	&lt;xs:restriction base='myList'&gt;
		&lt;xs:pattern value='123 (\d+\s)*456'/&gt;
	&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;someElement xsi:type='myRestrictedList'&gt;123 456&lt;/someElement&gt;
&lt;someElement xsi:type='myRestrictedList'&gt;123 987 456&lt;/someElement&gt;
&lt;someElement xsi:type='myRestrictedList'&gt;123 987 567 456&lt;/someElement&gt;

</eg></note><!--*
* material suppressed here by diff group rq120 *
*--><p dg="rq120">The <termref def="dt-canonical-mapping"/> of a 
<termref def="dt-list"/> datatype maps each value onto the 
space-separated concatenation of the 
<!--*
* material suppressed here by diff group rq120o *
*--><phrase dg="rq120o"><termref def="dt-canonical-representation">canonical 
representations</termref> of all the items in the value</phrase>
(in order), using the <termref def="dt-canonical-mapping"/> of the 
<termref def="dt-itemType"/>.</p><!--* MSM finds this wordier, but not clearer or more precise.  Sigh. *--></div4><div4 role="1.0" id="union-datatypes"><head>Union datatypes</head><p>
<!--*
* material suppressed here by diff group b3025-aux *
*--> 
<phrase dg="b2044"><!--*
* material suppressed here by diff group b3025-aux *
*--> 
<!--*
* material suppressed here by diff group b3025-aux *
*--></phrase> 
<!--*
* material suppressed here by diff group b3025-aux *
*-->
</p><p dg="b3025-aux"><phrase id="p2413a" dg="b3025-aux"><!--*
* material suppressed here by diff group b2044 *
*--> </phrase> <phrase dg="b2044"><phrase id="p2413b" dg="b3025-aux">Union types
may be defined in either of two ways.  When a union type is
<termref def="dt-constructed"/> by <termref def="dt-union"/>, its <termref def="dt-value-space"/>, <termref def="dt-lexical-space"/>, and
<termref def="dt-lexical-mapping"/> are the <unusual>ordered unions</unusual> of the
<termref def="dt-value-space">value spaces</termref>, <termref def="dt-lexical-space">lexical spaces</termref>, and <termref def="dt-lexical-mapping">lexical mappings</termref> of its
<termref def="dt-memberTypes"/>.</phrase></phrase></p><p>It will be observed that the <termref def="dt-lexical-mapping"/> of a union, so
defined, is not necessarily a function: a given <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase> may map to
one value or to several values of different <termref def="dt-primitive"/> datatypes, and
it may be indeterminate which value is to be preferred in a particular
context.  When the datatypes defined here are used in the context of
<bibref ref="structural-schemas"/>, the <att>xsi:type</att> attribute defined by that
specification in section <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#xsi_type">xsi:type</xspecref> can be used to indicate
which value a <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase> which is the content of an element should map
to.  In other contexts, other rules (such as type coercion rules) may
be employed to determine which value is to be used.</p><p dg="b3025-aux"><phrase dg="b2044"><phrase id="p2413c" dg="b3025-aux">When a union type is defined by
<termref def="dt-fb-restriction">restricting</termref> another <termref def="dt-union"/>, its <termref def="dt-value-space"/>, <termref def="dt-lexical-space"/>,
and <termref def="dt-lexical-mapping"/> are subsets of the <termref def="dt-value-space">value spaces</termref>,
<termref def="dt-lexical-space">lexical spaces</termref>, and <termref def="dt-lexical-mapping">lexical mappings</termref> of its
<termref def="dt-basetype"/>.</phrase></phrase></p><p dg="b3025-aux"><phrase id="p2413d" dg="b3025-aux"><termref def="dt-union">Union</termref> datatypes are always <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-constructed"/><phrase dg="rq120"><phrase dg="rq120o"> from other
datatypes</phrase>; they are never <termref def="dt-primitive"/></phrase>. Currently,
there are no <termref def="dt-built-in"/> <termref def="dt-union"/> datatypes.</phrase></p><note role="example"><p>A prototypical example of a <termref def="dt-union"/> type is the
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#p-max_occurs">maxOccurs attribute</xspecref> on the
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#element-element">element element</xspecref>
in XML Schema itself: it is a union of nonNegativeInteger
and an enumeration with the single member, the string "unbounded", as shown below.</p><eg xml:space="preserve">
  &lt;attributeGroup name="occurs"&gt;
    &lt;attribute name="minOccurs" type="nonNegativeInteger"
    	use="optional" default="1"/&gt;
    &lt;attribute name="maxOccurs"use="optional" default="1"&gt;
      &lt;simpleType&gt;
        &lt;union&gt;
          &lt;simpleType&gt;
            &lt;restriction base='nonNegativeInteger'/&gt;
          &lt;/simpleType&gt;
          &lt;simpleType&gt;
            &lt;restriction base='string'&gt;
              &lt;enumeration value='unbounded'/&gt;
            &lt;/restriction&gt;
          &lt;/simpleType&gt;
        &lt;/union&gt;
      &lt;/simpleType&gt;
    &lt;/attribute&gt;
  &lt;/attributeGroup&gt;
</eg></note><p>Any number <!--*
* material suppressed here by diff group b2861 *
*--><phrase dg="b2861">(zero or more)</phrase> 
<!--* !!! N.B. substantive change (perhaps should not be in rq120, but I'll
    * leave it here for now):  the rest of the spec does NOT say unions have
    * to have at least two members.  Me, I don't see why they should be
    * required to have any at all.  When the WG discusses rq120, this
    * substantive change should be called out.
    *-->
of <phrase dg="aatf">ordinary
</phrase><phrase dg="rq120o"> or
<termref def="dt-primitive"/> </phrase><!--*
* material suppressed here by diff group b2044 *
*-->
<!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><termref def="dt-datatype">datatypes</termref></phrase>
can participate in a <termref def="dt-union"/> type.</p><p><termdef id="dt-memberTypes" term="member types">
The datatypes that participate in the
definition of a <termref def="dt-union"/> datatype are known as the
<!--*
* material suppressed here by diff group rq120 *
*--><term dg="rq120">member types</term> 
of that <termref def="dt-union"/> datatype.</termdef></p><note dg="b12626"><p>When datatypes are represented using XSD schema components, as
described in <specref ref="datatype-components"/>, the member types of
a union are those simple type definitions given in the <propref comp="std" prop="member type definitions"/> property.
</p></note><p dg="b2044"><termdef id="dt-transitivemembership" term="transitive membership">The <term>transitive membership</term> of
a <termref def="dt-union"/> is the set of its own <termref def="dt-memberTypes"/>, and the <termref def="dt-memberTypes"/>
of its members, and so on. More formally, if <var>U</var> is a
<termref def="dt-union"/>, then (a) its <termref def="dt-memberTypes"/> are in the transitive membership
of <var>U</var>, and (b) for any datatypes <var>T1</var> and
<var>T2</var>, if <var>T1</var> is in the transitive membership of
<var>U</var> and <var>T2</var> is one of the <termref def="dt-memberTypes"/> of
<var>T1</var>, then <var>T2</var> is also in the transitive membership
of <var>U</var>.</termdef></p><p dg="b3235">The <termref def="dt-transitivemembership"/>
of a <termref def="dt-union"/> <rfc2119>must not</rfc2119> contain the <termref def="dt-union"/> itself, nor
any datatype <termref def="dt-derived"/> or <termref def="dt-constructed"/> from the <termref def="dt-union"/>.
</p><p dg="b2044"><termdef id="dt-basicmember" term="basic member">Those members of the <termref def="dt-transitivemembership"/>
of a <termref def="dt-union"/> datatype <var>U</var> which are themselves not <termref def="dt-union"/>
datatypes<!--* , but &atomic; or &list; datatypes, *-->
are the <term>basic members</term> of <var>U</var>.</termdef></p><!--* <ednote diff="add" dg="b2044">
<edtext>If <dtref ref="anySimpleType"/> is allowed as a member
of a &union;, the preceding definition will need to be revised
slightly to avoid the restriction to lists and atomics.</edtext>
</ednote> *--><!--ednote><edtext>I hope to rewrite the following para somehow in terms of the 
STD itself rather than a schema document fragment.&emsp;&mdash;DP</edtext></ednote>
I hope to do better but the current fix below will do for now. --><p dg="b2044"><termdef id="dt-interveningunion" term="intervening union">If a datatype <var>M</var> is in the
<termref def="dt-transitivemembership"/> of a <termref def="dt-union"/>
datatype <var>U</var>, but not one of <var>U</var>'s <termref def="dt-memberTypes"/>,
then a sequence of one or more <termref def="dt-union"/> datatypes necessarily exists,
such that the first is one of the <termref def="dt-memberTypes"/> <!--*
* material suppressed here by diff group ep26 *
*--><phrase dg="ep26">of</phrase> <var>U</var>, each
is one of the <termref def="dt-memberTypes"/> of its predecessor in the sequence, and
<var>M</var> is one of the <termref def="dt-memberTypes"/> of the last in the sequence.
The <termref def="dt-union"/> datatypes in this sequence are said to
<term>intervene</term> between <var>M</var> and <var>U</var>. When
<var>U</var> and <var>M</var> are given by the context, the datatypes
in the sequence are referred to as the <term>intervening unions</term>.
When <var>M</var> is one of the <termref def="dt-memberTypes"/> of <var>U</var>,
the set of <term>intervening unions</term> is the empty set.
</termdef>
</p><p dg="b2449-vi">
<termdef id="dt-active-member" term="active member type">In a valid
instance of any <termref def="dt-union"/>, the first of its members in order which
accepts the instance as valid is the <term>active member
type</term>.</termdef> 
<termdef id="dt-active-basic-member" term="active basic member">If the <termref def="dt-active-member"/> is
itself a <termref def="dt-union"/>, one of <emph>its</emph> members will be
<emph>its</emph> <termref def="dt-active-member"/>, and so on, until
finally a <termref def="dt-basicmember">basic (non-union)
member</termref> is reached. That <termref def="dt-basicmember"/> is
the <term>active basic member</term> of the union.</termdef>
</p><p>The order in which the <termref def="dt-memberTypes"/> are specified in the
definition (that is, <phrase dg="rq120">in the case of
datatypes defined in a schema document, </phrase>the order of the
&lt;simpleType&gt; children of the &lt;union&gt; element, or the order
of the <dtref ref="QName"/>s in the <!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><att>memberTypes</att> </phrase> attribute) is
significant. During validation, an element or attribute's value is
validated against the <termref def="dt-memberTypes"/> in the order in which they appear
in the definition until a match is found.  <!--*
* material suppressed here by diff group b3227 *
*--> <phrase dg="b3227">As noted above,
the</phrase> evaluation order can be overridden with the use of
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#xsi_type">xsi:type</xspecref>.</p><note><p>For example, given the definition below, the first instance of the &lt;size&gt; element
validates correctly as an <specref ref="integer"/>, the second and third as
<specref ref="string"/>.</p><eg xml:space="preserve">
  &lt;xs:element name='size'&gt;
    &lt;xs:simpleType&gt;
      &lt;xs:union&gt;
        &lt;xs:simpleType&gt;
          &lt;xs:restriction base='integer'/&gt;
        &lt;/xs:simpleType&gt;
        &lt;xs:simpleType&gt;
          &lt;xs:restriction base='string'/&gt;
        &lt;/xs:simpleType&gt;
      &lt;/xs:union&gt;
    &lt;/xs:simpleType&gt;
  &lt;/xs:element&gt;
</eg><eg xml:space="preserve">
  &lt;size&gt;1&lt;/size&gt;
  &lt;size&gt;large&lt;/size&gt;
  &lt;size xsi:type='xs:string'&gt;1&lt;/size&gt;
</eg></note><!--*
* material suppressed here by diff group rq120 *
*--><p dg="rq120">The <termref def="dt-canonical-mapping"/> of 
a <termref def="dt-union"/> datatype maps each value onto the 
<termref def="dt-canonical-representation"/> of that value obtained 
using the <termref def="dt-canonical-mapping"/> of the first 
<termref def="dt-memberTypes">member type</termref> in whose value space it lies.</p><!--* Longer, yes.  Clearer?  More precise? Oh, well. *--><!--*
* material suppressed here by diff group b3237 *
*--><p dg="b5062">
When a datatype is <termref def="dt-derived"/> by <termref def="dt-fb-restriction">restricting</termref> a
<termref def="dt-union"/> datatype, the following
<termref def="dt-constraining-facet">constraining facets</termref> apply:
<ulist><item><p><termref def="dt-enumeration"/></p></item><item><p><phrase dg="ed-pattern"><termref def="dt-pattern"/></phrase><!--*
* material suppressed here by diff group ed-pattern *
*--></p></item><item dg="b5030tf"><p><termref def="dt-assertions"/></p></item></ulist>
</p><!--*
* material suppressed here by diff group b5062xx *
*--></div4></div3><!--*
* material suppressed here by diff group rq120c *
*--><!--* !!! this was not marked as deleted in WD of July 2004.
    * When fa1 is split, this is post-wd
    *--><div3 id="primitive-vs-derived"><head><phrase dg="rq120o">Special vs. </phrase>Primitive vs.
<!--*
* material suppressed here by diff group fa1.z *
*--><phrase dg="fa1.z"><!--*
* material suppressed here by diff group rq120o *
*--><phrase dg="rq120o">Ordinary</phrase>
Datatypes</phrase></head><!--*
* material suppressed here by diff group rq120o *
*--><!--*
* material suppressed here by diff group appr070331 *
*--><p dg="rq120o">Next, we distinguish <termref def="dt-special"/>,
<termref def="dt-primitive"/>, and <termref def="dt-ordinary"/> 
(or <termref def="dt-constructed"/>) datatypes.<phrase dg="b3238"> 
<!--*
* material suppressed here by diff group ep26 *
*--><phrase dg="ep26">Each
datatype</phrase> defined by <phrase dg="ep26">or in accordance
with</phrase> this specification fall<phrase dg="ep26">s</phrase> 
into <phrase dg="ep26">exactly one of</phrase> these
categories.</phrase></p><ulist><item dg="rq120o"><p><termdef id="dt-special" term="special">The <term>special</term>
datatypes are <dtref ref="anySimpleType"/> and 
<dtref ref="anyAtomicType"/>.</termdef> They are special by virtue of their
position in the type hierarchy<!--*
* material suppressed here by diff group lm.rel *
*-->.</p></item><item><p><termdef id="dt-primitive" term="primitive"><term>Primitive</term>
datatypes are those 
<phrase dg="rq120"><!--*
* material suppressed here by diff group rq120o *
*-->datatypes</phrase> that are not
<phrase dg="rq120o"><termref def="dt-special"/> and are
not</phrase> defined in terms of other datatypes;
they exist <emph>ab initio</emph>.</termdef>
<phrase dg="rq120">All <termref def="dt-primitive"/> datatypes have 
<dtref ref="anyAtomicType"/> as their
<termref def="dt-basetype"/>, but their <termref def="dt-value-space">value</termref>
and <termref def="dt-lexical-space">lexical spaces</termref>
must be given in prose; they cannot be described as 
<termref def="dt-fb-restriction">restrictions</termref> of
<dtref ref="anyAtomicType"/> by the application of particular 
<termref def="dt-constraining-facet">constraining facets</termref>.</phrase></p><note dg="b3251"><p>As normatively specified elsewhere, 
conforming processors <rfc2119>must</rfc2119> support all the
primitive datatypes defined in this specification; it is
<termref def="key-impl-def"/> whether other primitive datatypes are
supported.</p><p dg="b12572">Processors <rfc2119>may</rfc2119>, for example,
support the floating-point decimal datatype specified in
<bibref ref="pd-note"/>.
</p></note></item><item dg="rq120o"><p><termdef id="dt-ordinary" term="ordinary"><term>Ordinary</term>
datatypes are all datatypes other than the <termref def="dt-special"/> 
and <termref def="dt-primitive"/> datatypes.</termdef> 
<!--* 'dt-constructed' used to be here. ... *-->
<termref def="dt-ordinary">Ordinary</termref> datatypes
can be understood fully in terms of their <compref ref="std"/> and 
the properties of the datatypes from which they are <termref def="dt-constructed"/>.</p></item><!--*
* material suppressed here by diff group rq120o *
*--></ulist><p>For example, in this specification, <dtref ref="float"/> is a 
<phrase dg="rq120"><termref def="dt-primitive"/> datatype based on 
a </phrase>well-defined mathematical concept
<!-- find example other than float -->
<!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">and
not</phrase> 
defined in terms of other datatypes, while<!--*
* material suppressed here by diff group rq120 *
*-->
<dtref ref="integer"/> is <!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><termref def="dt-constructed"/>
from</phrase> the more general datatype <dtref ref="decimal"/>.</p><!--* <issue id="diff-RQ-141i" role="1.1" diff="del" dg="aat">
<p><loc href="&reqs;#anyAtomicType" target="reqs">RQ-141 (add abstract
anyAtomicType)</loc> <loc href="&reqs;#fundamentals" target="reqs">RQ-24
(systematic facets: status and value space of
anySimpleType)</loc></p>
<p>A new <term>special</term> datatype will be introduced as a child
of anySimpleType and the base type of all primitive atomic datatypes.</p>
</issue> *--><!--* <ednote diff="add" dg="rq120">
<edtext>The definition of anySimpleType has not been deleted, only
moved to a more appropriate location.</edtext>
</ednote> *--><!--*
* material suppressed here by diff group rq120 *
*--><!--*
* material suppressed here by diff group b3238 *
*--><!--*
* material suppressed here by diff group rq120 *
*--><!--* MSM reverted proposed change from 'derived' to 'constructed'.
Both are true as the terms are now defined, but for definitions which
derive by restriction we elsewhere prefer the term 'derived'. 
MSM then deleted it on the grounds that in the last three days alone
the paragraph has caused more trouble than it's worth. *--><!--*
* material suppressed here by diff group b3237 *
*--><!-- We just said what follows above; why repeat it?  We should get rid of
     the internal diffs; I don't want to deal with it now. --><!--*
* material suppressed here by diff group rq120 *
*--><div4 role="1.0" id="restriction"><head><!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">Facet-based Restriction</phrase></head><!--* 2006-01-08 del_dt-restriction does not work as ID here, because
    * it causes an ID of 'restriction' to be emitted in the HTML,
    * when dg rq120 is shown coloured.
    * del-dt-restriction doesn't work either because it causes an
    * ID of dt-restriction to be emitted.  Both are duplicate IDs.
    * This section is processed by dg.xsl in id-cleanup mode because
    * diff group trm1 (not approved) proposed to delete it, and has
    * show="pre".
    * A word to the wise.
    *--><!--*
* material suppressed here by diff group rq120 *
*--><p dg="rq120"><termdef id="dt-fb-restriction" term="facet-based restriction">A 
datatype is defined by <term>facet-based restriction</term> of another datatype
(its <termref def="dt-basetype"/>),
when values for zero or more <termref def="dt-constraining-facet">constraining facets</termref> are specified
that serve to constrain its <termref def="dt-value-space"/> and/or its
<termref def="dt-lexical-space"/> to a subset of those of the
<termref def="dt-basetype"/>.</termdef>
The <termref def="dt-basetype"/> of a <termref def="dt-fb-restriction"/>
<rfc2119>must</rfc2119> be a <termref def="dt-primitive"/> or <termref def="dt-ordinary"/> datatype.</p><!--* 
On the other hand, all datatypes except <dtref ref="anySimpleType"/>
are &derived; by <term>restriction</term>, since no means
exists to expand the &lexical_space; or
&lexical_space; of a &derived; datatype
over that of its &basetype;.</termdef>&nbsp; All
&ordinary; datatypes not explicitly &constructed;
as a &list; or &union; are
&constructed; as
&restrictions;.&nbsp;
Datatypes &constructed; as
&restrictions;
do <emph>not</emph> have either &special;
datatype as their &basetype;</p>
*--><!--*
* material suppressed here by diff group rq120 *
*--><!--* <termdef id="trm1-dt-immediately-derived" term="immediately
derived">A datatype is <term>immediately derived</term> from another
if <phrase diff="add" dg="iff">and only if</phrase> it is immediately
below the other (i.e., away from the root) in the derivation
hierarchy.</termdef> *--><!-- NO NO NO !!!  This definition says derivation by restriction is
     the same as derivation, period.  But elsewhere derivation by restriction
     is used to mean the same as derivation from ordinary (or primitive).
     This *must* be fixed.  I don't know how, offhand, but this is not
     acceptable. --><!--* dp deletes the following *--><!-- FOLLOWING STATEMENT IS FALSE.  derivation by restriction is
     by definition just derivation, and anySimpleType is not
     derived from itself. --><!--* Nice catch.  Let's make it true, then. *--><!--* dp deletes the following paragraph *--><!--*  *--><!--* *--></div4><div4 id="list"><head><!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">Construction by List</phrase></head><p>A <termref def="dt-list"/> datatype can be <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-constructed"/>
from another datatype (its <termref def="dt-itemType"/>) by creating
a <termref def="dt-value-space"/> that consists of <!--*
* material suppressed here by diff group b5625 *
*--> 
finite-length sequence<phrase dg="b5625">s</phrase>
of <phrase dg="b5625">zero or more</phrase> values of its <termref def="dt-itemType"/>.
<phrase dg="rq120">Datatypes so <termref def="dt-constructed"/>
have <dtref ref="anySimpleType"/> as their <termref def="dt-basetype"/>.
Note that since the <termref def="dt-value-space"/> and <termref def="dt-lexical-space"/> of any <termref def="dt-list"/> 
datatype are necessarily subsets of the <termref def="dt-value-space"/> and <termref def="dt-lexical-space"/> of
<dtref ref="anySimpleType"/>, any datatype <termref def="dt-constructed"/> as a <termref def="dt-list"/> is a 
<termref def="dt-restriction"/> of its base type.
</phrase></p></div4><div4 id="union"><head><!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">Construction by Union</phrase></head><p>One datatype can be <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-constructed"/> from one or more 
<!--*
* material suppressed here by diff group rq120fix *
*-->datatypes
<!--*
* material suppressed here by diff group rq120fix *
*-->by
<!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">unioning</phrase>
their <!--*
* material suppressed here by diff group b2044 *
*--><phrase dg="b2044"><termref def="dt-lexical-mapping">lexical mappings</termref></phrase>
and<phrase dg="rq120fix">, consequently, their</phrase>
<phrase dg="b2044"><termref def="dt-value-space">value spaces</termref> and</phrase>
<!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><termref def="dt-lexical-space">lexical spaces</termref></phrase>. 
<phrase dg="rq120">Datatypes so <termref def="dt-constructed"/>
also have <dtref ref="anySimpleType"/> as their <termref def="dt-basetype"/>.
Note that since the <termref def="dt-value-space"/> and <termref def="dt-lexical-space"/> of any <termref def="dt-union"/> 
datatype are necessarily subsets of the <termref def="dt-value-space"/> and <termref def="dt-lexical-space"/> of
<dtref ref="anySimpleType"/>, any datatype <termref def="dt-constructed"/> as a <termref def="dt-union"/> is a 
<termref def="dt-restriction"/> of its base type.
</phrase></p></div4></div3><div3 dg="rq120" id="derivation"><head>Definition, Derivation, Restriction, and Construction</head><p>Definition, derivation, restriction, and construction
are conceptually distinct, although in practice
they are frequently performed by the same mechanisms.</p><p>By <mention>definition</mention> is meant the explicit
identification of the relevant properties of a datatype,
in particular its
<termref def="dt-value-space"/>,
<termref def="dt-lexical-space"/>, and
<termref def="dt-lexical-mapping"/>. 
</p><p>The properties of the <termref def="dt-special"/> and <phrase dg="b3251">the
standard</phrase>
<termref def="dt-primitive"/> datatypes are defined by this 
specification.  A <compref ref="std"/> is present for each of these 
datatypes in every valid schema; it serves as a representation of the
datatype, but by itself it does not capture all the relevant 
information and does not suffice (without knowledge
of this specification) to <emph>define</emph> the datatype.</p><note dg="b3251"><p>The properties of any <termref def="key-impl-def"/> <termref def="dt-primitive"/>
datatypes are given not here but in the documentation for
the implementation in question.
<phrase dg="b12572">Alternatively, a primitive datatype
not specified in this document can be specified in a document
of its own not tied to a particular implementation; 
<bibref ref="pd-note"/> is an example of such a document.</phrase>
</p></note><p>For all other datatypes, a <compref ref="std"/> does suffice.
The properties of an <!--*
* material suppressed here by diff group rq120c *
*--><termref dg="rq120o" def="dt-ordinary"/> datatype can be inferred
from the datatype's <compref ref="std"/> and the properties of
the <termref def="dt-basetype"/>, <termref def="dt-itemType"/>
if any, and <termref def="dt-memberTypes"/> if any.
All <!--*
* material suppressed here by diff group rq120c *
*--><termref dg="rq120o" def="dt-ordinary"/> datatypes can be defined in this way.</p><p>By <mention>derivation</mention> is meant the relation of
a datatype to its <termref def="dt-basetype"/>, or to the
<termref def="dt-basetype"/> of its <termref def="dt-basetype"/>,
and so on.</p><!--*
* material suppressed here by diff group dp081112 *
*--><p><termdef id="dt-basetype" term="base type">Every datatype
<phrase dg="b3239">other than <dtref ref="anySimpleType"/>
</phrase>is associated with another datatype, its <term>base type</term>. 
<term>Base types</term> can be <termref def="dt-special"/>, 
<termref def="dt-primitive"/>, or 
<!--*
* material suppressed here by diff group rq120o *
*--><termref dg="rq120o" def="dt-ordinary"/>.
</termdef>
</p><!--* ??? revisit; MSM leans toward keeping the definition of base type
    * where it was ??? *--><p><termdef id="dt-immediately-derived" term="derived">A datatype 
<var>T</var> is <term>immediately derived</term> from another datatype 
<var>X</var> if and only if <var>X</var> is the 
<termref def="dt-basetype"/> of <var>T</var>.</termdef>
</p><note dg="b3239"><p>The above does not preclude the <compref ref="std"/>
for <dtref ref="anySimpleType"/> from having a value for
its <propref comp="std" prop="base type definition"/>. 
(It does, and its value is
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#any-type-itself">anyType</xtermref>.)</p></note><p>
More generally, 
<termdef id="dt-derived" term="derived">A datatype <var>R</var> 
is <term>derived</term> from another 
datatype <var>B</var> if and only if one of the following is true:
 <ulist><item><p><var>B</var> is the <termref def="dt-basetype"/> 
of <var>R</var>.
</p></item><item><p>There is some datatype <var>X</var>
such that <var>X</var> is the <termref def="dt-basetype"/> 
of <var>R</var>, and <var>X</var> is derived from
<var>B</var>.</p></item></ulist>
</termdef>
</p><p dg="b3239a">A datatype <rfc2119>must not</rfc2119> be 
<termref def="dt-derived"/> from itself.  That is, the
base type relation must be acyclic.</p><!--* 
Since every &simple_type_definition; has a &basetype;,
it is a consequence of this definition fhat <emph>every</emph>
datatype defined by a &simple_type_definition; is a 
&derived; datatype.</p>
*--><p>It is a consequence of <!--*
* material suppressed here by diff group b3239a *
*--><phrase dg="b3239a">the above</phrase>
that every datatype other than <dtref ref="anySimpleType"/> is
<termref def="dt-derived"/>
from <dtref ref="anySimpleType"/>.</p><p>Since each datatype has exactly one <termref def="dt-basetype"/>,
and every datatype <phrase dg="b3239">other
than <dtref ref="anySimpleType"/>
</phrase>is <termref def="dt-derived"/> directly or
indirectly from <dtref ref="anySimpleType"/>, it follows that
the <termref def="dt-basetype"/> relation arranges all
simple types into a tree structure, which is conventionally
referred to as the <emph>derivation hierarchy</emph>.</p><p>By <mention>restriction</mention> is meant the definition
of a datatype whose <termref def="dt-value-space"/> and <termref def="dt-lexical-space"/> are 
subsets of those of its <termref def="dt-basetype"/>.</p><p dg="rq120">Formally,
<termdef id="dt-restriction" term="restriction">A datatype <var>R</var> 
is a <term>restriction</term> of another 
datatype <var>B</var> when</termdef>
 <ulist><item><p>the <termref def="dt-value-space"/> of <var>R</var> is a subset of the <termref def="dt-value-space"/>
of <var>B</var>, and 
</p></item><item><p>the <termref def="dt-lexical-space"/> of <var>R</var> is a subset of the 
<!--*
* material suppressed here by diff group rec12-main *
*--><termref def="dt-lexical-space"/> of <var>B</var>.
</p></item></ulist>
</p><p>
Note that all three forms of datatype <termref def="dt-constructed">construction</termref> produce 
<termref def="dt-restriction">restrictions</termref> of the <termref def="dt-basetype"/>:
<termref def="dt-fb-restriction"/> does so by means of 
<termref def="dt-constraining-facet">constraining facets</termref>, 
while <termref def="dt-constructed">construction</termref> by <termref def="dt-list"/> or <termref def="dt-union"/> does so because those 
<termref def="dt-constructed">constructions</termref> take 
<dtref ref="anySimpleType"/> as the <termref def="dt-basetype"/>. It follows that all
datatypes are <termref def="dt-restriction">restrictions</termref> 
of <dtref ref="anySimpleType"/>.
This specification provides no means by which a datatype may be
defined so as to have a larger <termref def="dt-lexical-space"/> or <termref def="dt-value-space"/> 
than its <termref def="dt-basetype"/>.
</p><!--* <p diff="add" dg="rec12-tt">[RQ-141b]</p> *--><p dg="rq120"><!--*
* material suppressed here by diff group rec12-main *
*--></p><p>By <mention>construction</mention> is meant the creation of a
datatype by defining it in terms of another.</p><!--* 
<p>Every definition of a datatype
as a &fb.restriction; of another datatype,
every use of &list;
&construction; to define a datatype 
in terms of a particular &itemType;,
every use of &union;
&construction; to define a datatype 
in terms of a particular set of &member_types;,
may be said to <emph>construct</emph> a datatype.</p>
*--><p>
<termdef id="dt-constructed" term="constructed">All
<termref def="dt-ordinary"/> datatypes are defined in terms of, or
<term>constructed</term> from, other datatypes, either by 
<termref def="dt-fb-restriction">restricting</termref> the 
<termref def="dt-value-space"/> or <termref def="dt-lexical-space"/> 
of a <termref def="dt-basetype"/> using zero or more
<termref def="dt-constraining-facet">constraining facets</termref>
or by specifying the new datatype as a <termref def="dt-list"/> of items of some
<termref def="dt-itemType"/>,
or by defining it as a <termref def="dt-union"/> of some specified 
sequence of <termref def="dt-memberTypes"/>.</termdef>
These three forms of <termref def="dt-constructed">construction</termref>
are often called <quote><termref def="dt-fb-restriction"/></quote>,
<quote><termref def="dt-constructed">construction</termref> 
by <termref def="dt-list"/></quote>, and <quote><termref def="dt-constructed">construction</termref> by 
<termref def="dt-union"/></quote>, respectively.
Datatypes so constructed may be understood fully (for
purposes of a type system) in terms of (a) the properties
of the datatype(s) from which they are constructed, and
(b) their <compref ref="std"/>.  This distinguishes
<!--*
* material suppressed here by diff group rq120o *
*--><phrase dg="rq120o"><termref def="dt-ordinary"/>
datatypes</phrase>
from the <termref def="dt-special"/> and 
<termref def="dt-primitive"/> datatypes, which can be understood 
only in the light of documentation (namely, their descriptions 
elsewhere in this specification<phrase dg="b3251">,
or, for <termref def="key-impl-def"/> <termref def="dt-primitive">primitives</termref>, in the appropriate
implementation-specific documentation</phrase>).
<phrase dg="rq120o">All <termref def="dt-ordinary"/>
datatypes are <termref def="dt-constructed"/>, and all
<termref def="dt-constructed"/> datatypes are 
<termref def="dt-ordinary"/>.</phrase>
</p></div3><div3 role="1.0" id="built-in-vs-user-derived"><head>Built-in vs. User-<!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">Defined</phrase> Datatypes</head><ulist><item><p>
<termdef id="dt-built-in" term="built-in"><term>Built-in</term>
datatypes are those which are defined in this 
specification<!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">; they</phrase> can 
be <!--*
* material suppressed here by diff group rq120 *
*--> 
<phrase dg="rq120"><termref def="dt-special"/>,</phrase>
<termref def="dt-primitive"/><phrase dg="rq120">,</phrase> or
<!--*
* material suppressed here by diff group rq120 *
*--><!--*
* material suppressed here by diff group rq120c *
*--><termref dg="rq120o" def="dt-ordinary"/><phrase dg="rq120"> datatypes
</phrase>.
</termdef>
</p></item><item><!--*
* material suppressed here by diff group rq120 *
*--><p dg="rq120">
<termdef id="dt-user-defined" term="user-defined">
<term>User-defined</term> datatypes are those 
datatypes that are defined by individual schema designers.
</termdef>
</p></item></ulist><p dg="b3251">The <termref def="dt-built-in"/> datatypes are intended to be
available automatically whenever this specification is implemented or
used, whether by itself or embedded in a host language.  In the
language defined by <bibref ref="structural-schemas"/>, 
the <termref def="dt-built-in"/> datatypes are automatically
included in every valid schema.  Other host languages <rfc2119>should</rfc2119> specify
that all of the datatypes decribed here as built-ins are automatically
available; they <rfc2119>may</rfc2119> specify that additional datatypes are also made
available automatically.</p><note dg="b3251"><p><termref def="key-impl-def">Implementation-defined</termref> datatypes, whether <termref def="dt-primitive"/> or <termref def="dt-ordinary"/>,
may sometimes
be included automatically in any schemas processed
by that implementation; nevertheless, they are not built in
to <emph>every</emph> schema, and are thus not included
in the term <mention>built-in</mention>, as that term is
used in this specification.
</p></note><p dg="b3251">The mechanism for making <termref def="dt-user-defined"/>
datatypes available for use is not defined in this specification; if
<termref def="dt-user-defined"/> datatypes are to be available, some such mechanism
<rfc2119>must</rfc2119> be specified by the host language.</p><p dg="b3251"><termdef id="dt-unknown-dt" term="unknown">A
datatype which is not available for use is said to be
<term>unknown</term>.</termdef>  </p><note dg="b3251"><p>From the schema author's perspective, a reference to
a datatype which proves to be <termref def="dt-unknown-dt"/> might reflect
any of the following causes, or others:
<olist><item id="unkown.type"><p>An error has been made in giving the name of the datatype.</p></item><item id="unkown.sdoc"><p>The datatype is a <termref def="dt-user-defined"/> datatype which has not been made
available using the means defined by the host language (e.g.
because the appropriate schema document has not been
consulted).</p></item><item id="unkown.id-primitive"><p>The datatype is an <termref def="key-impl-def"/>
<termref def="dt-primitive"/> datatype not supported by the implementation being
used.</p></item><item id="unkown.id-derived"><p>The datatype is an <termref def="key-impl-def"/> <termref def="dt-ordinary"/>
datatype which is made automatically available by some
implementations, but not by the implementation being
used.</p></item><item id="unkown.contaminated"><p>The datatype is a <termref def="dt-user-defined"/> <termref def="dt-ordinary"/> datatype
whose base type is <termref def="dt-unknown-dt"/></p></item></olist>
From the point of view of the implementation, these cases
are likely to be indistinguishable.
</p></note><note dg="b3251"><p>In the terminology of <bibref ref="structural-schemas"/>,
the datatypes here called <termref def="dt-unknown-dt"/> are referred to as
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-null">absent</xspecref>.
</p></note><p>
Conceptually there is no difference between the <!--*
* material suppressed here by diff group rq120c *
*--><termref dg="rq120o" def="dt-ordinary"/>
<termref def="dt-built-in"/> <!--*
* material suppressed here by diff group rq120 *
*--> 
datatypes included in this specification and the <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-user-defined"/>
datatypes which will be created by individual schema designers.
The <termref def="dt-built-in"/> <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-constructed"/> datatypes
are those which are believed to be so common that if they were not
defined in this specification many schema designers would end up
<!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">reinventing</phrase> them.  Furthermore, including these
<!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-constructed"/> datatypes in this specification serves to
demonstrate the mechanics and utility of the datatype generation
facilities of this specification.
</p><!--*
* material suppressed here by diff group b3237 *
*--></div3></div2></div1><div1 id="built-in-datatypes"><head><!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">Built-in Datatypes and Their Definitions</phrase></head><!--* !!! temporary / experimental change from type-hierarchy.gif to 
    * type-hierarchy.png.  Revert when appropriate.
    *--><!--* 
<graphic source="type-hierarchy.gif" 
  alt="Diagram of built-in type hierarchy" 
  map="typeImage"/> 
*--><!--*
* material suppressed here by diff group b2687 *
*--><!--*
* material suppressed here by diff group add.b2687.b12300.del.as.add *
*--><!--*
* material suppressed here by diff group add.b2687.b12300.del.as.del *
*--><graphic xmlns:xlink="http://www.w3.org/1999/xlink" map="built-in-datatype-hierarchy-image-map" id="type-hierarchy-diagram" source="type-hierarchy-201104.svg" alt="Diagram of built-in type hierarchy" dg="b12300-diff10-colour"/><!--* N.B. stylesheet xmlspec_additions.xsl hard-codes special treatment
    * for this graphic; if you change the graphic or the markup here, 
    * you may also need to change the responsible templates there.
    * In particular that template provides a caption and links to 
    * the long description.
    *--><!--
	thanx to Asir S Vedamuthu for creating this image map
  --><!--*
  <imagemap source="image-map.html" id="typeImage"/>
  <imagemap source="image-map_fullsize.html" id="typeImage"/>
*--><!--*
* material suppressed here by diff group b2687 *
*--><!--*
* material suppressed here by diff group add.b2687.b12300.del.as.add *
*--><!--*
* material suppressed here by diff group add.b2687.b12300.del.as.del *
*--><imagemap source="type-hierarchy-201104-map.html" id="built-in-datatype-hierarchy-image-map" dg="b12300-diff10-colour"/><p>Each built-in datatype <phrase dg="b3251">defined</phrase>
in this specification <!--*
* material suppressed here by diff group rq120 *
*--> can be uniquely addressed via a
URI Reference constructed as follows:
<olist><item><p>the base URI is the URI of the XML Schema namespace</p></item><item><p>the fragment identifier is the name of the datatype</p></item></olist>
</p><p>For example, to address the <dtref ref="int"/> datatype, the URI is:
<ulist><item><p><code>http://www.w3.org/2001/XMLSchema#int</code></p></item></ulist>
</p><p>Additionally, each facet definition element can be uniquely
addressed via a URI constructed as follows:
<olist><item><p>the base URI is the URI of the XML Schema namespace</p></item><item><p>the fragment identifier is the name of the facet</p></item></olist>
</p><p>For example, to address the maxInclusive facet, the URI is:
<ulist><item><p><code>http://www.w3.org/2001/XMLSchema#maxInclusive</code></p></item></ulist>
</p><!--* <p diff="add" dg="rec12-tt">[RQ-141b]</p> *--><p>Additionally, each facet usage in a built-in <!--*
* material suppressed here by diff group rec12-main *
*-->
<phrase dg="rec12-main"><compref ref="std"/></phrase>
can be uniquely addressed via a URI constructed as follows:
<olist><item><p>the base URI is the URI of the XML Schema namespace</p></item><item><p>the fragment identifier is the name of the 
<!--*
* material suppressed here by diff group rec12-main *
*--><phrase dg="rec12-main"><compref ref="std"/></phrase>, followed
by a period (<string>.</string>) followed by the name of the facet</p></item></olist>
</p><p>For example, to address the usage of the maxInclusive facet in
the definition of int, the URI is:
<ulist><item><p><code>http://www.w3.org/2001/XMLSchema#int.maxInclusive</code></p></item></ulist>
</p><div2 role="1.0" id="namespaces"><head>Namespace considerations</head><p>
The <termref def="dt-built-in"/> datatypes defined by this specification
are designed to be used with the XML Schema definition language as well as other
XML specifications.
To facilitate usage within the XML Schema definition language, the <termref def="dt-built-in"/>
datatypes in this specification have the namespace name:
</p><ulist><item><p>http://www.w3.org/2001/XMLSchema</p></item></ulist><p>
To facilitate usage in specifications other than the XML Schema definition language,
such as those that do not want to know anything about aspects of the
XML Schema definition language other than the datatypes, each 
<!--*
* material suppressed here by diff group b6522 *
*--> <termref def="dt-built-in"/>
datatype is also defined in the namespace whose URI is:
</p><ulist><item><p>http://www.w3.org/2001/XMLSchema-datatypes</p></item></ulist><!--*
* material suppressed here by diff group rq120 *
*--><p dg="rq120">
<!--*
* material suppressed here by diff group dup-2214 *
*--></p><!--*
* material suppressed here by diff group add.dup-2214.b6522.del.as.add *
*--><!--*
* material suppressed here by diff group add.dup-2214.b6522.del.as.del *
*--><p>
Each <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-user-defined"/> datatype <!--*
* material suppressed here by diff group ep26 *
*--><phrase dg="ep26">may also be</phrase> associated with a
<!--*
* material suppressed here by diff group ep26 *
*--><phrase dg="ep26">target</phrase> 
namespace.  <!--*
* material suppressed here by diff group ep26 *
*--><phrase dg="ep26">If it is constructed
from a schema document, then its namespace is typically the
target namespace of that schema document. (See</phrase> 
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#declare-schema">XML Representation of
Schemas</xspecref> in <bibref ref="structural-schemas"/><!--*
* material suppressed here by diff group ep26 *
*--><phrase dg="ep26">.)</phrase>
</p></div2><div2 id="special-datatypes" dg="rq120"><head>Special Built-in Datatypes</head><p>The two datatypes at the root of the hierarchy of simple
types are <dtref ref="anySimpleType"/> and <dtref ref="anyAtomicType"/>.</p><div3 id="anySimpleType"><head>anySimpleType</head><p><termdef id="dt-anySimpleType" term="anySimpleType">
<!--* msm removed role="local" 2009-05-08 *-->
The definition of <!--*
* material suppressed here by diff group b6230 *
*--><phrase dg="b6230"><term>anySimpleType</term></phrase> is a special
<termref def="dt-restriction"/> of <dtref ref="anyType"/>. 
<!--*
* material suppressed here by diff group b3244 *
*--><phrase dg="b3244"><!--*
* material suppressed here by diff group b6230 *
*--><phrase dg="b6230">The</phrase>
<termref def="dt-lexical-space"/> <phrase dg="b6230">of <term>anySimpleType</term></phrase>
is the set of all sequences of Unicode
characters, <!--* ep99:  unicode?  ucs?  what? *-->
and its <termref def="dt-value-space"/> includes all <termref def="dt-atomic-value">atomic values</termref>
and all finite-length lists of 
<phrase dg="b5625">zero or more</phrase>
<termref def="dt-atomic-value">atomic values</termref>.</phrase></termdef></p><!--* <p diff="add" dg="rec12-tt">[RQ-141b]</p> *--><p dg="rec12-main">For further details of <dtref ref="anySimpleType"/>
and its representation as a <compref ref="std"/>, see
<specref ref="builtin-stds"/>.</p><!--*
* material suppressed here by diff group rec12-main *
*--><div4 id="sec-ast-vs" dg="rq21-specials-1909"><head>Value space</head><!--*
* material suppressed here by diff group b3244 *
*--><p dg="b3244">The <termref def="dt-value-space"/> of <dtref ref="anySimpleType"/>
is the set of all <termref def="dt-atomic-value">atomic values</termref> and of all finite-length
lists of <phrase dg="b5625">zero or more</phrase>
<termref def="dt-atomic-value">atomic values</termref>.</p><note dg="b3243"><p>It is a consequence of this definition, together with the
definition of the <termref def="dt-lexical-mapping"/> in the next section, that some
values of this datatype have no <termref def="dt-lexical-representation"/> using the
<termref def="dt-lexical-mapping">lexical mappings</termref> defined by this specification. That is, the
<quote>potential</quote> <termref def="dt-value-space"/> and the <quote>effable</quote>
or <quote>nameable</quote> <termref def="dt-value-space"/> diverge for this datatype.
As far as this specification is concerned, there is no operational
difference between the potential and effable <termref def="dt-value-space">value spaces</termref> and the
distinction is of mostly formal interest.  Since some host languages
for the type system defined here may allow means of construction
values other than mapping from a <termref def="dt-lexical-representation"/>, the
difference may have practical importance in some contexts. In those
contexts, the term <termref def="dt-value-space"/> should unless otherwise qualified be
taken to mean the potential <termref def="dt-value-space"/>.
</p></note></div4><div4 id="sec-ast-lex" dg="rq21-specials-1909"><head>Lexical mapping</head><p>The <termref def="dt-lexical-space"/> of <dtref ref="anySimpleType"/> is the set of
all finite-length sequences of <phrase dg="b5625">zero or more</phrase>
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#dt-character">character</xtermref>s (as 
defined in <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>) that <termref def="dt-match"/> the 
<xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-Char">Char</xnt> production from 
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>.  This is equivalent to the union of the 
<termref def="dt-lexical-space">lexical spaces</termref> of all 
<termref def="dt-primitive"/> and all possible <termref def="dt-ordinary"/> datatypes.
</p><p dg="b1838">It is <termref def="key-impl-def"/> whether an
implementation of this specification supports the 
<xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-Char">Char</xnt> production from 
<bibref ref="XML"/>, or that from 
<bibref ref="XML1.0"/>, or both.  See 
<specref ref="intro-relatedWork"/>.
</p><p>The <termref def="dt-lexical-mapping"/> of <dtref ref="anySimpleType"/> is the union
of the <termref def="dt-lexical-mapping">lexical mappings</termref> of
all <termref def="dt-primitive"/> datatypes and all list datatypes.
It will be noted that this mapping is not a function: a given
<!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase> may map to one value or to several values of different
<termref def="dt-primitive"/> datatypes, and it may be indeterminate which value is to
be preferred in a particular context.  When the datatypes defined here
are used in the context of <bibref ref="structural-schemas"/>, the
<att>xsi:type</att> attribute defined by that specification in section
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#xsi_type">xsi:type</xspecref> can be used
to indicate which value a <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase> which is the content of an element
should map to.  In other contexts, other rules (such as type coercion
rules) may be employed to determine which value is to be used.</p></div4><div4 id="sec-ast-f" dg="rq21-specials-1909"><head>Facets</head><p>When a new datatype is defined 
by <termref def="dt-fb-restriction"/>,
<dtref ref="anySimpleType"/> <rfc2119>must not</rfc2119> be used
as the <termref def="dt-basetype"/>.
So no 
<termref def="dt-constraining-facet">constraining facets</termref> are
directly applicable to <dtref ref="anySimpleType"/>.
</p></div4></div3><div3 id="anyAtomicType"><head>anyAtomicType</head><p><termdef id="dt-anyAtomicType" term="anyAtomicType">
<!--*  role="local" removed by msm 2009-05-08 *-->
<!--*
* material suppressed here by diff group b6230 *
*--><phrase dg="b6230"><term>anyAtomicType</term></phrase>
is a special <termref def="dt-restriction"/> of <dtref ref="anySimpleType"/>.
The <termref def="dt-value-space">value</termref>
and <termref def="dt-lexical-space">lexical spaces</termref> 
of <term>anyAtomicType</term> are the unions of the 
<termref def="dt-value-space">value</termref>
and <termref def="dt-lexical-space">lexical spaces</termref>
of all the <termref def="dt-primitive"/> datatypes, and
<term>anyAtomicType</term> is their <termref def="dt-basetype"/>.
</termdef>
</p><!--* <p diff="add" dg="rec12-tt">[RQ-141b]</p> *--><p dg="rec12-main">For further details of <dtref ref="anyAtomicType"/>
and its representation as a <compref ref="std"/>, see
<specref ref="builtin-stds"/>.</p><!--*
* material suppressed here by diff group rec12-main *
*--><div4 id="sec-aat-vs" dg="rq21-specials-1909"><head>Value space</head><p>The <termref def="dt-value-space"/> of <dtref ref="anyAtomicType"/> is the union of the
<termref def="dt-value-space">value spaces</termref> of all the
<termref def="dt-primitive"/> datatypes defined here<phrase dg="b3251">
or supplied as <termref def="key-impl-def"/> <termref def="dt-primitive">primitives</termref></phrase>.</p></div4><div4 id="sec-aat-lex" dg="rq21-specials-1909"><head>Lexical mapping</head><p>The <termref def="dt-lexical-space"/> of <dtref ref="anyAtomicType"/> is the set of
all finite-length sequences of <phrase dg="b5625">zero or more</phrase>
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#dt-character">character</xtermref>s (as 
defined in <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>) that <termref def="dt-match"/> the 
<xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-Char">Char</xnt> production from 
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>.  This is equivalent to the union of the 
<termref def="dt-lexical-space">lexical spaces</termref> of all 
<termref def="dt-primitive"/> datatypes.
</p><p dg="b1838">It is <termref def="key-impl-def"/> whether an
implementation of this specification supports the <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-Char">Char</xnt> production from 
<bibref ref="XML"/>, or that from 
<bibref ref="XML1.0"/>, or both.  See 
<specref ref="intro-relatedWork"/>.
</p><p>The <termref def="dt-lexical-mapping"/> of <dtref ref="anyAtomicType"/> is the union
of the <termref def="dt-lexical-mapping">lexical mappings</termref> of
all <termref def="dt-primitive"/> datatypes.
It will be noted that this mapping is not a function: a given
<!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase> may map to one value or to several values of different
<termref def="dt-primitive"/> datatypes, and it may be indeterminate which value is to
be preferred in a particular context.  When the datatypes defined here
are used in the context of <bibref ref="structural-schemas"/>, the
<att>xsi:type</att> attribute defined by that specification in section
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#xsi_type">xsi:type</xspecref> can be used
to indicate which value a <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase> which is the content of an element
should map to.  In other contexts, other rules (such as type coercion
rules) may be employed to determine which value is to be used.</p></div4><div4 id="sec-aat-f" dg="rq21-specials-1909"><head>Facets</head><p>When a new datatype is defined 
by <termref def="dt-fb-restriction"/>,
<dtref ref="anyAtomicType"/> <rfc2119>must not</rfc2119> be used
as the <termref def="dt-basetype"/>.
So no 
<termref def="dt-constraining-facet">constraining facets</termref> are
directly applicable to <dtref ref="anyAtomicType"/>.
</p></div4></div3></div2><div2 role="1.0" id="built-in-primitive-datatypes"><head>Primitive Datatypes</head><p>
The <termref def="dt-primitive"/> datatypes defined by this specification
are described below.  For each datatype, the
<termref def="dt-value-space"/> 
<phrase dg="b1902amend">is described;
</phrase><!--*
* material suppressed here by diff group b1902amend *
*--><phrase dg="b1902amend">the
</phrase><termref def="dt-lexical-space"/>
<!--*
* material suppressed here by diff group b1902amend *
*--><phrase dg="b1902amend">is</phrase>
defined<!--*
* material suppressed here by diff group b1902amend *
*--> 
<phrase dg="b1902amend">using
an extended Backus Naur Format grammar 
(and in most cases also a regular expression using the
regular expression language of 
<specref ref="regexs"/>);</phrase>
<termref def="dt-constraining-facet">constraining facets</termref> which apply
to the datatype are listed<phrase dg="b1902amend">;</phrase> 
and any datatypes 
<!--*
* material suppressed here by diff group rq120 *
*--><termref def="dt-constructed" dg="rq120"/>
from this datatype are specified.
</p><p>
<phrase dg="b3251">Conforming processors <rfc2119>must</rfc2119> support
the <termref def="dt-primitive">primitive</termref> datatypes defined
in this specification; it is <termref def="key-impl-def"/> whether they
support others.</phrase> <!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><termref def="dt-primitive">Primitive</termref></phrase> datatypes <!--*
* material suppressed here by diff group b3251 *
*--><phrase dg="b3251">may</phrase> be added by revisions to this specification.
</p><note dg="b12572"><p>Processors <rfc2119>may</rfc2119>, for example, support the
floating-point decimal datatype specified in
<bibref ref="pd-note"/>.</p></note><div3 id="string"><!--* !!! newOrg replaces 'string' in the following head with a dtref.
    * Similarly the 'term' in the termdef (which it deletes).
    * I'm leaving it alone for now; a single change where
    * this change is applied to all datatypes is better than a
    * piecemeal change.
    *--><!-- And of course that insures it'll never get done.  :-(  --><!--* Up to you.  It's not hard to do the change for all types,
    * if one wants to do the change.
    *--><head>string</head><!--* Hmm.  Should the rq2-string deletion below really be labeled
    * rq21-string-hack?  The text is moved, not changed. *--><p><termdef id="dt-string" term="string" role="local">The <term>string</term> datatype
represents character strings in XML.<!--*
* material suppressed here by diff group rq21-string *
*-->
</termdef></p><note><p>Many human languages have writing systems that require
child elements for control of aspects such as bidirectional formatting or
ruby annotation (see <bibref ref="ruby"/> and Section 8.2.4
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/html401/struct/dirlang.html#h-8.2.4">Overriding the
bidirectional algorithm: the BDO element</xspecref> of <bibref ref="html4"/>). 
Thus, <!--*
* material suppressed here by diff group rq21-string *
*--><dtref ref="string" dg="rq21-string"/>, as a simple type that can contain only
characters but not child elements, is often not suitable for representing text.
In such situations, a complex type that allows mixed content should be considered.
For more information, see Section 5.5
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2001/REC-xmlschema-0-20010502/#textType">Any
Element, Any Attribute</xspecref> of <bibref ref="schema-primer"/>.</p></note><!--*
* material suppressed here by diff group rq21-string-hack *
*--><div4 id="sec-vs-string" dg="rq21-string-hack"><head dg="rq21-string">Value Space</head><!--* MSM munges the diff markup to avoid showing the old text 
    * which follows as old text.  rq21-string-hack should be rejected when
    * rq21-string is rejected, accepted when it is accepted.  But when
    * rq21-string is shown in color, rq21-string-hack should be accepted silently.
    *--><p>The <termref def="dt-value-space"/>
of <dtref ref="string"/> is the set of finite-length sequences of
<phrase dg="b5625">zero or more</phrase>
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#dt-character">character</xtermref>s (as defined in
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>) that <termref def="dt-match"/> the
<xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-Char">Char</xnt> production from <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>.
<!--* herein called simply <quote>&literals.xcss;</quote>.&nbsp; *-->
<!--* MSM finds 'herein' awkward, and our usage of the term 'character
    * string' includes a lot of places where we do not want to be
    * making the commitment or claim that the things in question are to be
    * regarded as *values* in the value space of the string type.
    * Not because there is some magic distinction (we are talking
    * in any case about sequences of UCS characters), but because
    * our system neither relies on nor provides tools to exploit
    * the identity of the value and lexical spaces of xsd:string
    * with the set of literals that might represent values in
    * any arbitrary simple type.
    *-->
A <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#dt-character">character</xtermref> is an atomic unit of
communication; it is not further specified except to note that every
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#dt-character">character</xtermref> has a corresponding
Universal Character Set (UCS) code point, which is an integer.</p><p dg="b1838">It is <termref def="key-impl-def"/> whether an
implementation of this specification supports the <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-Char">Char</xnt> production from 
<bibref ref="XML"/>, or that from 
<bibref ref="XML1.0"/>, or both.  See 
<specref ref="intro-relatedWork"/>.
</p><p dg="b1902amend">Equality for <dtref ref="string"/> is
identity.  No order is prescribed.</p><note><p>As noted in <compref ref="ff-o"/>, the fact that this specification does
not specify an 
<phrase dg="dpno"><!--*
* material suppressed here by diff group fa1-fix *
*--><phrase dg="fa1-fix">order relation</phrase>
for <termref def="dt-string"/></phrase><!--*
* material suppressed here by diff group dpno *
*-->
does not preclude other applications from treating 
<phrase dg="dpno">strings</phrase><!--*
* material suppressed here by diff group dpno *
*-->
as being ordered.</p></note></div4><div4 id="string-lexical-mapping" dg="rq21-string"><head>Lexical Mapping</head><p>The <termref def="dt-lexical-space"/> of <dtref ref="string"/> is the set of 
finite-length sequences of <phrase dg="b5625">zero or more</phrase>
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#dt-character">character</xtermref>s (as defined in
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>) that <termref def="dt-match"/> the
<xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-Char">Char</xnt> production from <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>.

<!--* <ednote>
<edtext>An alternative design would (a) change this
definition and that of the value space to read <quote>The xxx space of
<dtref ref="string"/> is the set of finite-length sequences of UCS
characters</quote> (i.e. drop the restriction to characters matching
the Char production of XML, thus aligning with the Infoset spec);
(b) add a Note saying <quote>When literals of
type <dtref ref="string"/> stem from an XML document or information
set, all characters in the string will match the <xnt href="&xmlspec;#NT-Char">Char</xnt> production of &bibref-xml.xx;; not all UCS characters are allowed by the XML spec</quote>;
and
(c) change the initial description of the type to read
<quote>The string datatype represents strings of characters.</quote>
</edtext>
</ednote> *-->

<defset role="prod"><head>Lexical Space</head><prod id="nt-stringRep"><lhs>stringRep</lhs><rhs><xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-Char">Char</xnt>*  <com>(as defined in <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>)</com></rhs></prod></defset>

<!--*
* material suppressed here by diff group b1902amend *
*--></p><p dg="b1838">It is <termref def="key-impl-def"/> whether an
implementation of this specification supports the <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-Char">Char</xnt> production from 
<bibref ref="XML"/>, or that from 
<bibref ref="XML1.0"/>, or both.  See 
<specref ref="intro-relatedWork"/>.
</p><!--*
* material suppressed here by diff group rq21-lexmaps *
*--><p dg="rq21-lexmaps">The <termref def="dt-lexical-mapping"/> 
for <dtref ref="string"/> is <pfref ref="f-stringLexmap"/>, and
the <termref def="dt-canonical-mapping"/> is <pfref ref="f-stringCanmap"/>;
each is a subset of the identity function.
</p></div4><div4 role="1.0" id="string-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><!--*
* material suppressed here by diff group dp081112 *
*--><facets role="rec12-tableaux-post"/></div4><div4 role="1.0" id="string-derived-types"><head><phrase dg="dpno">Derived
datatypes</phrase><!--*
* material suppressed here by diff group dpno *
*--></head><!--* Blecch!  Is there some reason this heading has to be unreadable?
    * Why not 'Related types'? *--><subtypes/></div4></div3><div3 id="boolean"><head>boolean</head><p><termdef id="dt-boolean" term="boolean" role="local"><term>boolean</term>
<!--*
* material suppressed here by diff group rq21-boolean *
*--><phrase dg="rq21-boolean">represents the 
values of two-valued logic</phrase>.</termdef></p><div4 id="sec-vs-boolean" dg="rq21-boolean"><head>Value Space</head><p><dtref ref="boolean"/> has the <termref def="dt-value-space"/> of
two-valued logic:  {<pt>true</pt>, <pt>false</pt>}.</p></div4><!--*
* material suppressed here by diff group rq21-boolean *
*--><!--*
* material suppressed here by diff group rq21-boolean *
*--><div4 id="boolean-lexical-mapping" dg="rq21-boolean"><head>Lexical Mapping</head><p><dtref ref="boolean"/>'s lexical space is a set of four <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase></phrase>:

<defset role="prod"><head>Lexical Space</head><prod id="nt-booleanRep"><lhs>booleanRep</lhs><rhs><string>true</string> | <string>false</string> |
<string>1</string> | <string>0</string></rhs></prod></defset>
<!--* This is equivalent to the regular expression <string>true|false|0|1</string>. *-->
</p><!--*
* material suppressed here by diff group rq21-lexmaps *
*--><p dg="rq21-lexmaps">The <termref def="dt-lexical-mapping"/>
for <dtref ref="boolean"/> is <pfref ref="f-booleanLexmap"/>;
the <termref def="dt-canonical-mapping"/> is <pfref ref="f-booleanCanmap"/>.
</p></div4><div4 role="1.0" id="boolean-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4></div3><div3 id="decimal"><head>decimal</head><!--* <issue id="RQ-150i" role="1.1" diff="del" dg="decfix">
<p><loc href="&reqs;#composition" target="reqs">RQ-150 (minimum number of digits for decimal)</loc></p>
<p>The minimum number of digits implementations are required to support
will be lowered to 16 digits; a health warning will be added to note 
that implementations of derived datatypes may support more digits of
precision than the base decimal type does, but that they are not required
to do so.</p>
</issue> *--><p><termdef id="dt-decimal-datatype" term="decimal" role="local"><term>decimal</term>
represents
<phrase dg="decfix">a</phrase><!--*
* material suppressed here by diff group decfix *
*-->
subset of the real numbers<phrase dg="decfix">,</phrase> which
can be represented by
<!--*
* material suppressed here by diff group decfix *
*-->decimal numerals.
<!--* ah, how about "the subset of the real numbers which can
be represented by finite-length decimal numerals" ? *-->
<phrase dg="decfix">The <termref def="dt-value-space"/> of <term>decimal</term>
is the set of numbers that can be obtained by 
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">dividing</phrase> 
an integer by a non-<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">negative</phrase>
power of ten, i.e., expressible as 
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m"><var>i</var> / 10<sup><var>n</var></sup></phrase>
where <var>i</var> and <var>n</var> are integers
and 
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m"><var>n</var> ≥ 0</phrase>.
Precision is not reflected in this value space;
the number 2.0 is not distinct from the number 2.00.
<!--*
* material suppressed here by diff group b12300-diff10-silent *
*-->
The <!--*
* material suppressed here by diff group fa1-fix *
*--><phrase dg="fa1-fix">order relation</phrase> on <term>decimal</term>
is the order relation on real numbers, restricted
to this subset.</phrase></termdef></p><note dg="b12572"><p>For a decimal datatype whose values do reflect precision, see
<bibref ref="pd-note"/>.</p></note><!--*
* material suppressed here by diff group partialfix *
*--><!--*
* material suppressed here by diff group decfix *
*--><div4 id="decimal-lexical-representation"><head>Lexical
<!--*
* material suppressed here by diff group rq21-lexmaps *
*--><phrase dg="rq21-lexmaps">Mapping</phrase></head><!--ednote diff="add" dg="b4453ednote"><edtext>Bug b4453 fix.</edtext></ednote--><!--*
* material suppressed here by diff group dp200701 *
*--><p><phrase dg="b4453"><term>decimal</term></phrase><!--*
* material suppressed here by diff group b4453 *
*-->
has
<phrase dg="b4453">a lexical representation</phrase><!--*
* material suppressed here by diff group b4453 *
*-->
consisting of <phrase dg="b4453">a</phrase>
<phrase dg="b5625">non-empty</phrase> finite-length
sequence<!--*
* material suppressed here by diff group b4453 *
*--> of 
decimal
digits (#x30–#x39) separated
by a period as a decimal indicator. 
An optional leading sign is allowed. 
If the sign is omitted,
<phrase dg="b4453">"+"</phrase><!--*
* material suppressed here by diff group b4453 *
*-->
is assumed.  Leading and trailing zeroes are optional. 
If the fractional part is zero, the period and following zero(es) can
be omitted.
For example: 
<!--*
* material suppressed here by diff group b3587 *
*--><phrase dg="b3587"><string>-1.23</string>,
<string>12678967.543233</string>, <string>+100000.00</string>,
<string>210</string></phrase>.
</p><p dg="rq31m"><defset><head>The <dtref ref="decimal"/> Lexical Representation</head><prod id="nt-decimalRep"><lhs>decimalLexicalRep</lhs><rhs><nt def="nt-decNuml"/> | <nt def="nt-noDecNuml"/></rhs></prod></defset></p><p dg="rq31m">The lexical space of decimal is the set of
lexical representations which match the grammar given above, or
(equivalently) the regular expression<!--*
* material suppressed here by diff group b3659 *
*-->
<display dg="b3659">
<code>(\+|-)?([0-9]+(\.[0-9]*)?|\.[0-9]+)</code></display>
</p><!--*
* material suppressed here by diff group pre *
*--><!--*
* material suppressed here by diff group rq31m.add.rq21-lexmaps.del *
*--><p dg="rq21-lexmaps">
The mapping from lexical representations to values is the usual
one for decimal numerals; it is given formally in 
<pfref ref="f-decimalLexmap"/>.
</p><!--* <ednote diff="add" dg="decfix_movement"><edtext>The following paragraphs were
moved from the deleted section that follows into this one to align the
organization of this datatype description with that of others that are
newly rewritten for 1.1.</edtext></ednote> *--><!--*
* material suppressed here by diff group dp200701 *
*--><!--*
* material suppressed here by diff group decfix_movement *
*--><!--*
* material suppressed here by diff group rq31m_decfix_movement *
*--><!--*
* material suppressed here by diff group rq21-lexmaps.add.b3246.del *
*--><p dg="b3736">The <phrase dg="b3247">definition
of the </phrase><termref def="dt-canonical-representation"/> <!--*
* material suppressed here by diff group b3247 *
*--><phrase dg="b3247">has the
effect of</phrase> prohibiting certain options from the
<phrase dg="decfix"><specref ref="decimal-lexical-representation"/></phrase><!--*
* material suppressed here by diff group decfix *
*-->. 
Specifically, <phrase dg="b4451">
for integers, the decimal point and fractional part are prohibited.
For other values, 
</phrase>
the preceding optional
<phrase dg="decfix">"+"</phrase><!--*
* material suppressed here by diff group decfix *
*-->
sign is prohibited.  The decimal point is required.  
<!--*
* material suppressed here by diff group b4451 *
*--><phrase dg="b4451">In
all cases, leading</phrase> and
trailing zeroes are prohibited subject to the following:  there
<phrase diff="del" dg="ep35">must</phrase><phrase diff="add" dg="ep35"><rfc2119>must</rfc2119></phrase>
be at least one digit to the right and to the left of the decimal
point<!--*
* material suppressed here by diff group decfix *
*--> which may be a
zero.</p><p dg="b3736">
The mapping from values to <termref def="dt-canonical-representation">canonical representations</termref> 
is given formally in 
<pfref ref="f-decimalCanmap"/>.
</p></div4><!--*
* material suppressed here by diff group b3736 *
*--><!--*
* material suppressed here by diff group decfix *
*--><div4 id="decimal-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4><div4 role="1.0" id="decimal-derived-types"><head><!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">Datatypes based on decimal</phrase></head><subtypes/></div4></div3><!--* the following div3 was added by pd1, deleted again
    * by b12300.  There isn't a good way to handle that with
    * our current diff markup.
    *--><!--*
* material suppressed here by diff group b12300-diff10-silent *
*--><div3 role="1.0" id="float"><head>float</head><!--* <issue id="RQ-1i" role="1.1" diff="del" dg="flfix">
<p><loc href="&reqs;#canonical-float" target="reqs">RQ-1 (canonical
representation of float, double)</loc></p>
<p>The description of &canonical_representations; for float and double
needs to be cleaned up.</p>
</issue> *--><!--* <issue id="RQ-140i" role="1.1" diff="del" dg="flfix">
<p><loc href="&reqs;#negative-positive-zero" target="reqs">RQ-140
(positive and negative zero in float and double)</loc></p>
<p>Two zeroes will be provided similar to those in precisionDecimal</p>
</issue> *--><!--*
* material suppressed here by diff group dp200701 *
*--><!--*
* material suppressed here by diff group dp090225 *
*--><p><termdef id="dt-float" term="float" role="local"><phrase dg="flfix">The
</phrase><term>float</term><phrase dg="flfix"> datatype</phrase>
is<!--*
* material suppressed here by diff group flfix *
*--><phrase dg="b5229"> 
patterned after</phrase> the IEEE 
single-precision 32-bit floating point <phrase dg="flfix">data</phrase>type
<!--*
* material suppressed here by diff group b6664a *
*--><phrase dg="b6664a"><bibref ref="ieee754-2008"/></phrase><!--*
* material suppressed here by diff group b5229 *
*-->.<!--*
* material suppressed here by diff group flfix *
*--></termdef><phrase dg="flfix"> 
<phrase dg="b3252"><!--*
* material suppressed here by diff group ep26 *
*--><phrase dg="ep26">Its</phrase> 
value space <!--*
* material suppressed here by diff group ep26 *
*--> is a subset of the
rational numbers.  </phrase>Floating point numbers <!--*
* material suppressed here by diff group b3252 *
*-->are often used to 
approximate arbitrary real numbers.</phrase></p><!--*
* material suppressed here by diff group flfix *
*--><!--*
* material suppressed here by diff group flfix *
*--><div4 id="sec-vs-float" dg="flfix"><head>Value Space</head><p>The <termref def="dt-value-space"/> of <dtref ref="float"/> contains the
non-zero numbers  <var>m</var> × 2<sup><var>e</var></sup> ,
where <var>m</var> is an integer whose absolute value is less than 2<sup>24</sup>,
and <var>e</var> is an integer between −149 and 104, inclusive.  In addition to
these values, the <termref def="dt-value-space"/> of <dtref ref="float"/> also contains
the following <!--*
* material suppressed here by diff group b3249b *
*--><phrase dg="b3249b"><termref def="dt-specialvalue">special values</termref></phrase>:  <pt>positiveZero</pt>,
<pt>negativeZero</pt>, <pt>positiveInfinity</pt>,
<pt>negativeInfinity</pt>, and <pt>notANumber</pt>.</p><!--*
* material suppressed here by diff group dp200701 *
*--><note><p>As explained below, the
<!--*
* material suppressed here by diff group b3813 *
*--><phrase dg="b3813"><termref def="dt-lexical-representation"/></phrase>
of the <dtref ref="float"/>
value <pt>notANumber</pt> is <string>NaN</string>.  Accordingly, in English
text we generally use <mention>NaN</mention> to refer to that value.  Similarly,
we use <mention>INF</mention> and <mention>−INF</mention> to refer to the two
values <pt>positiveInfinity</pt> and <pt>negativeInfinity</pt>,
and <mention>0</mention> and <mention>−0</mention> to refer to
<pt>positiveZero</pt> and <pt>negativeZero</pt>.</p></note><p>Equality and order for <dtref ref="float"/> are defined as follows:
<ulist><item><p>Equality is identity, except that  0 = −0  (although
they are not identical) and  NaN ≠ NaN  
(although NaN is of course identical to itself).</p><p>0 and −0 are thus <!--*
* material suppressed here by diff group b3222 *
*--><phrase dg="b3222">equivalent</phrase>
for purposes of enumerations and
identity constraints, <!--*
* material suppressed here by diff group b3222 *
*--><phrase dg="b3222">as well as for</phrase> minimum and maximum values.</p></item><item><p>For the basic values, the order relation
on float is the order relation for rational numbers.  INF is greater
than all other non-NaN values; −INF is less than all other non-NaN
values.  NaN is <termref def="dt-incomparable"/> with any value
in the <termref def="dt-value-space"/> including itself.  0 and −0
are greater than all the negative numbers and less than all the positive
numbers.</p></item></ulist>
</p><!--*
* material suppressed here by diff group edn8744 *
*--><note><p>Any value <termref def="dt-incomparable"/> with the value used for the four
bounding facets (<termref def="dt-minInclusive"/>, <termref def="dt-maxInclusive"/>,
<termref def="dt-minExclusive"/>, and <termref def="dt-maxExclusive"/>) will be
excluded from the resulting restricted <termref def="dt-value-space"/>. 
In particular, when NaN is used as a facet value for a bounding facet, since no
<dtref ref="float"/> values are <termref def="dt-incomparable">comparable</termref>
with it, the result is a <termref def="dt-value-space"/> that is empty. 
If any other value is used for a bounding facet,
NaN will be excluded from the resulting restricted <termref def="dt-value-space"/>;
to add NaN back in requires union with the NaN-only space (which
may be derived <!--*
* material suppressed here by diff group wgi-20080530 *
*--><phrase dg="wgi-20080530">using
<!--*
* material suppressed here by diff group b8785 *
*--><phrase dg="b8785">the
pattern <string>NaN</string></phrase></phrase>).</p></note><note><p>The Schema 1.0 version of this datatype did not differentiate between
0 and −0 and NaN was equal to itself.  The changes were
made to make the datatype more closely mirror <!--*
* material suppressed here by diff group b6664a *
*--><phrase dg="b6664a"><bibref ref="ieee754-2008"/></phrase>.</p></note><!--*
* material suppressed here by diff group add.wgi-20080530.b9196e *
*--><!--*
* material suppressed here by diff group wgi-20080530.b9196e.del *
*--></div4><!--*
* material suppressed here by diff group flfix *
*--><!--*
* material suppressed here by diff group flfix *
*--><div4 id="sec-lex-float" dg="flfix"><head>Lexical Mapping</head><p>The <termref def="dt-lexical-space"/> of <dtref ref="float"/> is
the set of all decimal numerals with or without a decimal
point, numerals in scientific (exponential) notation, and
the <termref def="dt-literal">literals</termref> 
<string>INF</string>, <phrase dg="b6473"><string>+INF</string>,</phrase>
<string>-INF</string>, 
and <string>NaN</string>

<defset role="prod"><head>Lexical Space</head><prod id="nt-floatRep"><lhs>floatRep</lhs><rhs><nt def="nt-noDecNuml"/> | <nt def="nt-decNuml"/> |
<nt def="nt-sciNuml"/> | <!--*
* material suppressed here by diff group b3253bis *
*--><nt def="nt-numSpecReps" dg="b3253bis"/></rhs></prod></defset>

The <nt def="nt-floatRep"/> production is equivalent to this regular 
expression<phrase dg="b3659"> (after whitespace is
removed from the regular expression)</phrase>:

<!--*
* material suppressed here by diff group b3659 *
*-->
<display dg="b3659" role="shrink"><code>(\+|-)?([0-9]+(\.[0-9]*)?|\.[0-9]+)([Ee](\+|-)?[0-9]+)?<br/>
|(\+|-)?INF|NaN</code></display>
</p><!--*
* material suppressed here by diff group pre *
*--><p>The <dtref ref="float"/> datatype is designed to implement for schema
processing the single-precision floating-point datatype of
<!--*
* material suppressed here by diff group b6664a *
*--><phrase dg="b6664a"><bibref ref="ieee754-2008"/></phrase>.  That specification does not specify specific
<termref def="dt-lexical-representation">lexical representations</termref>,
but does prescribe requirements on any <termref def="dt-lexical-mapping"/>
used.  Any <termref def="dt-lexical-mapping"/>
that maps the <termref def="dt-lexical-space"/> just described onto the
<termref def="dt-value-space"/>, <phrase dg="b3025">is a function,</phrase>
satisfies the requirements of
<!--*
* material suppressed here by diff group b6664a *
*--><phrase dg="b6664a"><bibref ref="ieee754-2008"/></phrase>, and correctly handles the 
<phrase dg="b3249b">mapping of the literals
<string>INF</string>, <string>NaN</string>, etc., to the</phrase>
<!--*
* material suppressed here by diff group b3249b *
*--><phrase dg="b3249b"><termref def="dt-specialvalue">special values</termref></phrase><!--*
* material suppressed here by diff group b3249b *
*-->,
satisfies the conformance requirements of this specification.</p><p>Since IEEE allows some variation in rounding of values, processors
conforming to this specification may exhibit some variation in their
<termref def="dt-lexical-mapping">lexical mappings</termref>.</p><p>The <termref def="dt-lexical-mapping"/> <pfref ref="f-floatLexmap"/> is 
provided as an example of a simple algorithm that yields a conformant mapping,
and that provides the most accurate rounding possible—and is thus useful
for insuring inter-implementation reproducibility and inter-implementation
round-tripping.  The simple rounding
algorithm used in <pfref ref="f-floatLexmap"/> may be more efficiently
implemented using the algorithms of <bibref ref="clinger1990"/>.</p><note><p>The Schema 1.0 version of this datatype did not permit rounding
algorithms whose results differed from <bibref ref="clinger1990"/>.</p></note><p>The <termref def="dt-canonical-mapping"/> <pfref ref="f-floatCanmap"/> is 
provided as an example of a mapping that does not produce unnecessarily long
<termref def="dt-canonical-representation">canonical representations</termref>. 
Other algorithms which do not yield identical results for mapping from float
values to character strings are permitted by <!--*
* material suppressed here by diff group b6664a *
*--><phrase dg="b6664a"><bibref ref="ieee754-2008"/></phrase>.</p></div4><!-- The Simple Type definition for float was never accepted, so we don't need HT's
cute <head/> trickery to remove it.  I'm commenting it out to eliminate the spurious
empty Division (number w/o head) that otherwise results.  -DP 051016

<div4 dg="flfix" diff="add"><head/>
<div5 diff="del" dg="rec12-tableaux"><head>Simple Type Definition for float</head>
<p>The &simple_type_definition; of <dtref ref="float"/> is present in every
schema.&nbsp; It has the following properties:</p>

<schemaComp id="float-def">
<head alt="Simple Type Definition of float">&simple_type_definition; of 
<dtref ref="float"/></head>

<pvlist>
<pvpair comp="std" prop="name"><string>float</string></pvpair>
<pvpair comp="std" prop="target namespace"><string>http://www.w3.org/2001/XMLSchema</string></pvpair>
<pvpair comp="std" prop="base type definition">The
<dtref ref="anyAtomicType" role="def"/></pvpair>
<pvpair comp="std" prop="final">The empty set</pvpair>
<pvpair comp="std" prop="variety"><pt>atomic</pt></pvpair>
<pvpair comp="std" prop="primitive type definition"><dtref ref="float"/></pvpair>
<pvpair comp="std" prop="facets">{a &whiteSpace; facet with 
<propref comp="f-w" prop="value"/> = <pt>collapse</pt> and
<propref comp="f-w" prop="fixed"/> = <pt>true</pt>}
</pvpair>
<pvpair comp="std" prop="fundamental facets"><p>{<ulist>
<item><p>an <compref ref="ff-o"/> facet
with <propref comp="ff-o" prop="value"/> = <pt>total</pt></p></item>
<item><p>a <compref ref="ff-b"/> facet
with <propref comp="ff-b" prop="value"/> = <pt>true</pt></p></item>
<item><p>a <compref ref="ff-c"/> facet
with <propref comp="ff-c" prop="value"/> = <pt>finite</pt></p></item>
<item><p>a <compref ref="ff-n"/> facet
with <propref comp="ff-n" prop="value"/> = <pt>true</pt></p></item>
</ulist>}</p>
</pvpair>
<pvpair comp="std" prop="scope"><pt>global</pt></pvpair>
<pvpair comp="std" prop="item type definition"><pt>absent</pt></pvpair>
<pvpair comp="std" prop="member type definitions"><pt>absent</pt></pvpair>
<pvpair comp="std" prop="annotations">The empty sequence</pvpair>
</pvlist>
</schemaComp>
</div5></div4>
--><div4 id="float-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4></div3><div3 id="double"><head>double</head><!--*
* material suppressed here by diff group dp200701 *
*--><!--*
* material suppressed here by diff group dp090225 *
*--><p>
<termdef id="dt-double" term="double" role="local">The <term>double</term>
datatype is<!--*
* material suppressed here by diff group flfix *
*--><phrase dg="b5229"> 
patterned after</phrase> the
IEEE double-precision 64-bit floating point <phrase dg="flfix">data</phrase>type
<!--*
* material suppressed here by diff group b6664a *
*--><phrase dg="b6664a"><bibref ref="ieee754-2008"/></phrase><!--*
* material suppressed here by diff group b5229 *
*-->.<!--*
* material suppressed here by diff group flfix *
*--></termdef><phrase dg="flfix"> 
<phrase dg="b3252">Each floating
point datatype has a value space that is a subset of the
rational numbers.  </phrase>Floating point numbers <!--*
* material suppressed here by diff group b3252 *
*-->are often used to 
approximate arbitrary real numbers.</phrase></p><note dg="flfix"><p>The only significant differences between float and double are
the three defining constants 53 (vs 24), −1074 (vs −149),
and 971 (vs 104).</p></note><!--*
* material suppressed here by diff group flfix *
*--><!--*
* material suppressed here by diff group flfix *
*--><div4 id="sec-vs-double" dg="flfix"><head>Value Space</head><p>The <termref def="dt-value-space"/> of <dtref ref="double"/> contains the
non-zero numbers  <var>m</var> × 2<sup><var>e</var></sup> ,
where <var>m</var> is an integer whose absolute value is less than <!--*
* material suppressed here by diff group b2642 *
*--><phrase dg="b2642">2<sup>53</sup></phrase>,
and <var>e</var> is an integer between −1074 and 971, inclusive.  In addition to
these values, the <termref def="dt-value-space"/> of <dtref ref="double"/> also contains
the following <!--*
* material suppressed here by diff group b3249b *
*--><phrase dg="b3249b"><termref def="dt-specialvalue">special values</termref></phrase>:  <pt>positiveZero</pt>,
<pt>negativeZero</pt>, <pt>positiveInfinity</pt>,
<pt>negativeInfinity</pt>, and <pt>notANumber</pt>.</p><!--*
* material suppressed here by diff group dp200701 *
*--><note><p>As explained below, the
<!--*
* material suppressed here by diff group b3813 *
*--><phrase dg="b3813"><termref def="dt-lexical-representation"/></phrase>
of the <dtref ref="double"/>
value <pt>notANumber</pt> is <string>NaN</string>.  Accordingly, in English
text we generally use <mention>NaN</mention> to refer to that value.  Similarly,
we use <mention>INF</mention> and <mention>−INF</mention> to refer to the two
values <pt>positiveInfinity</pt> and <pt>negativeInfinity</pt>,
and <mention>0</mention> and <mention>−0</mention> to refer to
<pt>positiveZero</pt> and <pt>negativeZero</pt>.</p></note><p>Equality and order for <dtref ref="double"/> are defined as follows:
<ulist><item><p>Equality is identity, except that  0 = −0  (although
they are not identical) and  NaN ≠ NaN  
(although NaN is of course identical to itself).</p><p><!--*
* material suppressed here by diff group b3222 *
*--><phrase dg="b3222">0 and −0 are thus equivalent for purposes of enumerations,
identity constraints, and minimum and maximum values.</phrase>
</p></item><item><p>For the basic values, the order relation
on double is the order relation for rational numbers.  INF is greater
than all other non-NaN values; −INF is less than all other non-NaN
values.  NaN is <termref def="dt-incomparable"/> with any value
in the <termref def="dt-value-space"/> including itself.  0 and −0
are greater than all the negative numbers and less than all the positive
numbers.</p></item></ulist>
</p><!--*
* material suppressed here by diff group edn8744 *
*--><note><p>Any value <termref def="dt-incomparable"/> with the value used for the four
bounding facets (<termref def="dt-minInclusive"/>, <termref def="dt-maxInclusive"/>,
<termref def="dt-minExclusive"/>, and <termref def="dt-maxExclusive"/>) will be
excluded from the resulting restricted <termref def="dt-value-space"/>. 
In particular, when NaN is used as a facet value for a bounding facet, since no
<dtref ref="double"/> values are <termref def="dt-incomparable">comparable</termref>
with it, the result is a <termref def="dt-value-space"/> that is empty. 
If any other value is used for a bounding facet,
NaN will be excluded from the resulting restricted <termref def="dt-value-space"/>;
to add NaN back in requires union with the NaN-only space (which
may be derived <!--*
* material suppressed here by diff group wgi-20080530 *
*--><phrase dg="wgi-20080530">using
<!--*
* material suppressed here by diff group b8785 *
*--><phrase dg="b8785">the
pattern <string>NaN</string></phrase></phrase>).</p></note><note><p>The Schema 1.0 version of this datatype did not differentiate between
0 and −0 and NaN was equal to itself.  The changes were
made to make the datatype more closely mirror <!--*
* material suppressed here by diff group b6664a *
*--><phrase dg="b6664a"><bibref ref="ieee754-2008"/></phrase>.</p></note><!--*
* material suppressed here by diff group add.wgi-20080530.b9196e *
*--><!--*
* material suppressed here by diff group wgi-20080530.b9196e.del *
*--></div4><!--*
* material suppressed here by diff group flfix *
*--><!--*
* material suppressed here by diff group flfix *
*--><div4 id="sec-lex-double" dg="flfix"><head>Lexical Mapping</head><p>The <termref def="dt-lexical-space"/> of <dtref ref="double"/> is
the set of all decimal numerals with or without a decimal
point, numerals in scientific (exponential) notation, and
the <termref def="dt-literal">literals</termref> 
<string>INF</string>, <phrase dg="b6473"><string>+INF</string>,</phrase>
<string>-INF</string>, and <string>NaN</string>

<defset role="prod"><head>Lexical Space</head><prod id="nt-doubleRep"><lhs>doubleRep</lhs><rhs><nt def="nt-noDecNuml"/> | <nt def="nt-decNuml"/> |
<nt def="nt-sciNuml"/> | <!--*
* material suppressed here by diff group b3253bis *
*--><nt def="nt-numSpecReps" dg="b3253bis"/></rhs></prod></defset>

The <nt def="nt-doubleRep"/> production is equivalent to this regular 
expression<phrase dg="b3659">
(after whitespace is eliminated from the expression)</phrase>:

<!--*
* material suppressed here by diff group b3659 *
*-->
<display dg="b3659" role="shrink">
<code>(\+|-)?([0-9]+(\.[0-9]*)?|\.[0-9]+)([Ee](\+|-)?[0-9]+)?
|(\+|-)?INF|NaN</code>
</display>
</p><!--*
* material suppressed here by diff group pre *
*--><p>The <dtref ref="double"/> datatype is designed to implement for schema
processing the double-precision floating-point datatype of
<!--*
* material suppressed here by diff group b6664a *
*--><phrase dg="b6664a"><bibref ref="ieee754-2008"/></phrase>.  That specification does not specify specific
<termref def="dt-lexical-representation">lexical representations</termref>,
but does prescribe requirements on any <termref def="dt-lexical-mapping"/>
used.  Any <termref def="dt-lexical-mapping"/>
that maps the <termref def="dt-lexical-space"/> just described onto the
<termref def="dt-value-space"/>, <phrase dg="b3025">is a function,</phrase>
satisfies the requirements of
<!--*
* material suppressed here by diff group b6664a *
*--><phrase dg="b6664a"><bibref ref="ieee754-2008"/></phrase>, and correctly handles the 
<phrase dg="b3249b">mapping of the literals
<string>INF</string>, <string>NaN</string>, etc., to the</phrase>
<!--*
* material suppressed here by diff group b3249b *
*--><phrase dg="b3249b"><termref def="dt-specialvalue">special values</termref></phrase><!--*
* material suppressed here by diff group b3249b *
*-->,
satisfies the conformance requirements of this specification.</p><p>Since IEEE allows some variation in rounding of values, processors
conforming to this specification may exhibit some variation in their
<termref def="dt-lexical-mapping">lexical mappings</termref>.</p><p>The <termref def="dt-lexical-mapping"/> <pfref ref="f-doubleLexmap"/> is 
provided as an example of a simple algorithm that yields a conformant mapping,
and that provides the most accurate rounding possible—and is thus useful
for insuring inter-implementation reproducibility and inter-implementation
round-tripping.  The simple rounding
algorithm used in <pfref ref="f-doubleLexmap"/> may be more efficiently
implemented using the algorithms of <bibref ref="clinger1990"/>.</p><note><p>The Schema 1.0 version of this datatype did not permit rounding
algorithms whose results differed from <bibref ref="clinger1990"/>.</p></note><p>The <termref def="dt-canonical-mapping"/> <pfref ref="f-doubleCanmap"/> is 
provided as an example of a mapping that does not produce unnecessarily long
<termref def="dt-canonical-representation">canonical representations</termref>. 
Other algorithms which do not yield identical results for mapping from float values
to character strings are permitted by <!--*
* material suppressed here by diff group b6664a *
*--><phrase dg="b6664a"><bibref ref="ieee754-2008"/></phrase>.</p></div4><!-- The Simple Type definition for float was never accepted, so we don't need HT's
cute <head/> trickery to remove it.  I'm commenting it out to eliminate the spurious
empty Division (number w/o head) that otherwise results.  -DP 051016

<div4 dg="flfix" diff="add"><head/>
<div5 diff="del" dg="rec12-tableaux"><head>Simple Type Definition for double</head>
<p>The &simple_type_definition; of <dtref ref="double"/> is present in every
schema.&nbsp; It has the following properties:</p>

<schemaComp id="double-def">
<head alt="Simple Type Definition of &pD;">&simple_type_definition; of 
<dtref ref="double"/></head>

<pvlist>
<pvpair comp="std" prop="name"><string>double</string></pvpair>
<pvpair comp="std" prop="target namespace"><string>http://www.w3.org/2001/XMLSchema</string></pvpair>
<pvpair comp="std" prop="base type definition">The
<dtref ref="anyAtomicType" role="def"/></pvpair>
<pvpair comp="std" prop="final">The empty set</pvpair>
<pvpair comp="std" prop="variety"><pt>atomic</pt></pvpair>
<pvpair comp="std" prop="primitive type definition"><dtref ref="double"/></pvpair>
<pvpair comp="std" prop="facets">{a &whiteSpace; facet with 
<propref comp="f-w" prop="value"/> = <pt>collapse</pt> and
<propref comp="f-w" prop="fixed"/> = <pt>true</pt>}
</pvpair>
<pvpair comp="std" prop="fundamental facets"><p>{<ulist>
<item><p>an <compref ref="ff-o"/> facet
with <propref comp="ff-o" prop="value"/> = <pt>total</pt></p></item>
<item><p>a <compref ref="ff-b"/> facet
with <propref comp="ff-b" prop="value"/> = <pt>true</pt></p></item>
<item><p>a <compref ref="ff-c"/> facet
with <propref comp="ff-c" prop="value"/> = <pt>finite</pt></p></item>
<item><p>a <compref ref="ff-n"/> facet
with <propref comp="ff-n" prop="value"/> = <pt>true</pt></p></item>
</ulist>}</p>
</pvpair>
<pvpair comp="std" prop="scope"><pt>global</pt></pvpair>
<pvpair comp="std" prop="item type definition"><pt>absent</pt></pvpair>
<pvpair comp="std" prop="member type definitions"><pt>absent</pt></pvpair>
<pvpair comp="std" prop="annotations">The empty sequence</pvpair>
</pvlist>
</schemaComp>

</div5></div4>
--><div4 id="double-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4></div3><div3 id="duration"><head>duration</head><!--*
* material suppressed here by diff group du0 *
*--><!--* !!! this note was not expressly deleted by du0 as approved 19 Dec 2003
    * http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2003Dec/att-0042/durationsProposal3.html
    * but also not shown as retained.
    *--><!--*
* material suppressed here by diff group du0.ysc *
*--><!--* n.b. newOrg removes the termdef here and retags the term
    * as a dtref.  As with string, I have foreborne to follow
    * suit, just yet. -msm 2005-01-09
    *--><!--*
* material suppressed here by diff group dp200701 *
*--><p dg="du0">
<termdef id="dt-duration" term="duration" role="local"><term>duration</term> 
is a datatype that represents
durations of time.</termdef>  The concept of duration being captured is
drawn from those of <bibref ref="ISO8601"/>, specifically
<emph>durations without fixed endpoints</emph>.  For example,
<unusual>15 days</unusual> (whose most common lexical representation
in <dtref ref="duration"/> is <quote><string>P15D</string></quote>) is
a <dtref ref="duration"/> value; <unusual>15 days beginning 12 July
1995</unusual> and <unusual>15 days ending 12 July 1995</unusual> are
not<phrase dg="b3077"> <dtref ref="duration"/> 
values</phrase>.  <dtref ref="duration"/> can provide addition and
subtraction operations between <dtref ref="duration"/> values and
between <dtref ref="duration"/>/<dtref ref="dateTime"/> value pairs,
and can be the result of subtracting <dtref ref="dateTime"/>
values.  However, only addition to <!--*
* material suppressed here by diff group dudt *
*--><dtref ref="dateTime"/>
is required for XML Schema processing and is
defined <!--*
* material suppressed here by diff group dudt *
*--><phrase dg="dudt">in
the function <pfref ref="vp-dt-dateTimePlusDuration"/></phrase>.</p><!--* !!! n.b. newOrg suppresses the specref above, substituting TBD.
    * I've left it as is for now.  -msm 2005-01-09 *--><!--*
* material suppressed here by diff group dpno *
*--><div4 id="sec-vs-duration" dg="du0"><head>Value Space</head><!--* !!! this paragraph is not quite the same as was adopted by the WG in
    * December 2003; editorial changes have been made.
    *--><p><!--*
* material suppressed here by diff group wd17 *
*-->
<phrase dg="wd17">Duration values can be modelled as
two-property tuples.  Each value consists of an integer number of
months and a decimal number of seconds.  The 
<vpropref ref="vp-du-second"/> value <rfc2119>must not</rfc2119> be negative if the 
<vpropref ref="vp-du-month"/> value is positive and <rfc2119>must not</rfc2119> be 
positive if the <vpropref ref="vp-du-month"/> is negative.</phrase>

<!--* !!! n.b. the display of this material is not, in the status quo document,
    * the same as in the proposal adopted by the WG in December 2003.
    * It is the same as was published as SQ text in July 2004.
    *-->
<defset><head>Properties of <dtref ref="duration"/> Values</head><vpropdef><name id="vp-du-month">months</name><limits dg="wd17"><dtref ref="integer"/></limits></vpropdef><vpropdef><name id="vp-du-second">seconds</name><limits>a <!--*
* material suppressed here by diff group b3255 *
*--><phrase dg="b3255"><dtref ref="decimal"/></phrase> value;
<!--*
* material suppressed here by diff group wd17 *
*--><phrase dg="wd17"><rfc2119>must not</rfc2119></phrase> 
be negative if <vpropref ref="vp-du-month"/> is positive, and 
<!--*
* material suppressed here by diff group wd17 *
*--><phrase dg="wd17"><rfc2119>must not</rfc2119></phrase>
be positive if <vpropref ref="vp-du-month"/> is negative.</limits></vpropdef></defset>

<dtref ref="duration"/> is partially ordered.  
<!--*
* material suppressed here by diff group wd17 *
*--><phrase dg="wd17">Equality of <dtref ref="duration"/> 
is defined in terms of equality of <dtref ref="dateTime"/>;  order for 
<dtref ref="duration"/> is defined in terms of the order of 
<dtref ref="dateTime"/>.  Specifically, the equality or order of 
two <dtref ref="duration"/> values is determined by adding each 
<dtref ref="duration"/> in the pair to each of</phrase> the following 
four <dtref ref="dateTime"/> values:

<ulist><item><p>1696-09-01T00:00:00Z</p></item><item><p>1697-02-01T00:00:00Z</p></item><item><p>1903-03-01T00:00:00Z</p></item><item><p>1903-07-01T00:00:00Z</p></item></ulist>

If all four resulting <dtref ref="dateTime"/> value pairs are ordered
the same way (less than, equal, or greater than), then the original
pair of <dtref ref="duration"/> values is ordered the same way;
otherwise the original pair is <termref def="dt-incomparable"/>.</p><note><p>These four values are chosen so as to maximize 
the possible differences in results that could occur, 
such as the difference when adding P1M and P30D:  
1697-02-01T00:00:00Z + P1M &lt; 1697-02-01T00:00:00Z + P30D , 
but 
1903-03-01T00:00:00Z + P1M &gt; 1903-03-01T00:00:00Z + P30D , 
so that  P1M &lt;&gt; P30D .  
If two <dtref ref="duration"/> values are ordered the same way 
when added to each of these four <dtref ref="dateTime"/> values, 
they will retain the same order when added 
to <emph>any</emph> other <dtref ref="dateTime"/> 
values<!--*
* material suppressed here by diff group noleap *
*-->.  Therefore, 
two <dtref ref="duration"/> values are incomparable if and only 
if they can <emph>ever</emph> result in different orders when added to <emph>any</emph> 
<dtref ref="dateTime"/> value<!--*
* material suppressed here by diff group noleap *
*-->.</p><!--*
* material suppressed here by diff group noleap *
*--></note><p><!--*
* material suppressed here by diff group noleap *
*--><phrase dg="noleap">U</phrase>nder the definition just given, 
two <dtref ref="duration"/> values are equal if and only if they are identical.</p><!--* !!! n.b. newOrg moves the following paragraph to another location. *--><note id="two_totally_ordered_subtypes"><p>Two totally ordered datatypes (<dtref ref="yearMonthDuration"/> and
<dtref ref="dayTimeDuration"/>) are derived from <dtref ref="duration"/> in
<specref ref="ordinary-built-ins"/>.</p></note><note><p>There are many ways to implement <dtref ref="duration"/>,
some of which do not base the implementation on the two-component
model.  This specification does not prescribe any particular
implementation, as long as the visible results are isomorphic to those
described herein.</p></note><note dg="partialfix"><p>See the conformance notes in <specref ref="partial-implementation"/>, which
apply to this datatype.</p></note><!--* !!! n.b. newOrg moves the note 'two_totally_ordered_subtypes' from another
    * location to this point.  I'm leaving it alone for now. *--></div4><!--*
* material suppressed here by diff group du0 *
*--><div4 id="duration-lexical-space" dg="du0"><head>Lexical <!--*
* material suppressed here by diff group b3736 *
*--><phrase dg="b3736">Mapping</phrase></head><p>The <termref def="dt-lexical-representation">lexical representations</termref>
of <dtref ref="duration"/> are 
more or less based on the pattern:
<display role="shrink"><code>P<var>n</var>Y<var>n</var>M<var>n</var>DT<var>n</var>H<var>n</var>M<var>n</var>S</code></display>
</p><p>More precisely, the <termref def="dt-lexical-space"/> of <dtref ref="duration"/>
is the set of character 
strings that satisfy <nt def="nt-durationRep"/> as defined by the following productions:
<defset><head> Lexical Representation Fragments</head><prod id="nt-duYrFrag"><lhs>duYearFrag</lhs><rhs><nt def="nt-unsNoDecNuml"/> <string>Y</string></rhs></prod><prod id="nt-duMoFrag"><lhs>duMonthFrag</lhs><rhs><nt def="nt-unsNoDecNuml"/> <string>M</string></rhs></prod><prod id="nt-duDaFrag"><lhs>duDayFrag</lhs><rhs><nt def="nt-unsNoDecNuml"/> <string>D</string></rhs></prod><prod id="nt-duHrFrag"><lhs>duHourFrag</lhs><rhs><nt def="nt-unsNoDecNuml"/> <string>H</string></rhs></prod><prod id="nt-duMiFrag"><lhs>duMinuteFrag</lhs><rhs><nt def="nt-unsNoDecNuml"/> <string>M</string></rhs></prod><prod id="nt-duSeFrag"><lhs>duSecondFrag</lhs><rhs>(<nt def="nt-unsNoDecNuml"/> | <nt def="nt-unsDecNuml" dg="du1"/><!--*
* material suppressed here by diff group du1 *
*-->) <string>S</string></rhs></prod><prod id="nt-duYMFrag"><lhs>duYearMonthFrag</lhs><rhs>(<nt def="nt-duYrFrag"/> <nt def="nt-duMoFrag"/>?) | <nt def="nt-duMoFrag"/></rhs></prod><prod id="nt-duTFrag"><lhs>duTimeFrag</lhs><rhs><string>T</string> ((<nt def="nt-duHrFrag"/> <nt def="nt-duMiFrag"/>? <nt def="nt-duSeFrag"/>?) |
(<nt def="nt-duMiFrag"/> <nt def="nt-duSeFrag"/>?) |
<nt def="nt-duSeFrag"/>)</rhs></prod><prod id="nt-duDTFrag"><lhs>duDayTimeFrag</lhs><rhs>(<nt def="nt-duDaFrag"/> <nt def="nt-duTFrag"/>?) | <nt def="nt-duTFrag"/></rhs></prod></defset>

<defset><head>Lexical Representation</head><prod id="nt-durationRep"><lhs>durationLexicalRep</lhs><rhs><string>-</string>? <string>P</string> ((<nt def="nt-duYMFrag"/> <nt def="nt-duDTFrag"/>?) | <nt def="nt-duDTFrag"/>)</rhs></prod></defset>
</p><p>Thus, a <nt def="nt-durationRep"/> consists of one or more of a <nt def="nt-duYrFrag"/>, 
<nt def="nt-duMoFrag"/>, <nt def="nt-duDaFrag"/>, <nt def="nt-duHrFrag"/>, 
<nt def="nt-duMiFrag"/>, and/or <nt def="nt-duSeFrag"/>, in order, with letters 
<string>P</string> and <string>T</string> (and perhaps a <string>-</string>)
where appropriate.</p><!--*
* material suppressed here by diff group rq20 *
*--><p dg="rq20">The language accepted by the <nt def="nt-durationRep"/> 
production is the set of strings which satisfy all of the following
three regular expressions:
<ulist><item><p>The expression 
<!--*
* material suppressed here by diff group b3659 *
*-->
<display dg="b3659" role="shrink">
<code>-?P[0-9]+Y?([0-9]+M)?([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+(\.[0-9]+)?S)?)?</code>
</display>
matches only strings in which the fields occur in the proper order.</p></item><item><p>The expression <string>.*[YMDHS].*</string> matches only
strings in which at least one field occurs.</p></item><item><p>The expression <string>.*[^T]</string> matches
only strings in which <string>T</string> is not the final character, so that
if <string>T</string> appears, something follows it.  The first rule
ensures that what follows <string>T</string> will be an hour,
minute, or second field.</p></item></ulist>
The intersection of these three regular expressions is equivalent to
the following (after removal of the white space inserted here for
legibility):
<!--*
* material suppressed here by diff group b3659 *
*-->
</p><p dg="b3659">
<!--*
* material suppressed here by diff group b12657 *
*-->
<eg dg="b12657" xml:space="preserve">
-?P( ( ( [0-9]+Y([0-9]+M)?([0-9]+D)?
       | ([0-9]+M)([0-9]+D)?
       | ([0-9]+D)
       )
       (T ( ([0-9]+H)([0-9]+M)?([0-9]+(\.[0-9]+)?S)?
          | ([0-9]+M)([0-9]+(\.[0-9]+)?S)?
          | ([0-9]+(\.[0-9]+)?S)
          )
       )?
    )
  | (T ( ([0-9]+H)([0-9]+M)?([0-9]+(\.[0-9]+)?S)?
       | ([0-9]+M)([0-9]+(\.[0-9]+)?S)?
       | ([0-9]+(\.[0-9]+)?S)
       )
    )
  )
</eg>

</p><!--* !!! The text following the regex is not exactly what was approved
    * by the WG in December 2003.  It is the same as appeared in the draft
    * of July 2004.
    *--><!--* !!! The following paragraph was approved by the WG in December 2003
    * as part of the same proposal as the paragraph above.  It's not
    * clear why they are marked with different diff groups.
    *--><!--* du0_prodigal2 has not yet been considered by the WG, so unlike
    * the other diff groups where additions are changed by rq21-lexmaps,
    * it doesn't get reversed from an add to an del. MSM 2005-08-25
    * Correction 2006-01-10: approved as part of RQ-20 proposal
    * on 18 Dec 2003.
    *--><!--*
* material suppressed here by diff group du0_prodigal2.add.rq21-lexmaps.del *
*--><p dg="du0_prodigal2.add.rq21-lexmaps.add">The
<termref def="dt-lexical-mapping"/> for <dtref ref="duration"/> is <pfref ref="f-durationMap"/>.
</p><!--* !!! The following note and paragraph were not part of the proposal approved 
    * by the WG in December 2003.  At the moment, it's not clear whether 
    * or when it has been considered by the WG.
    * The note appeared, marked as non-status-quo text, in July 2004.
    *--><!--*
* material suppressed here by diff group du1 *
*--><!--* changed the following from du1 to du0, 2005-04-28.  The assignment
    * to du1 was added in 1.7.2.98, for which the comment says that some
    * things that depend on du1 were marked as du1.  I infer now that
    * this was mis-identified as dependent on the preceding paragraph.
    * In reality, a full description of the canonical mapping was part of
    * the wording approved 18 Dec 2003 (proposal for rq-20).
    *--><!--*
* material suppressed here by diff group du0_prodigal.add.rq21-lexmaps.del *
*--><p dg="du0_prodigal.add.rq21-lexmaps.add"><termref role="the" def="dt-canonical-mapping">The canonical
mapping</termref> for <dtref ref="duration"/>
is <pfref ref="f-durationCanMap"/>.
</p></div4><!--*
* material suppressed here by diff group du0 *
*--><!--*
* material suppressed here by diff group du0 *
*--><!--* The following section was shown as deleted by the proposal 
    * approved by the WG in December 2003.  It was restored in
    * version 1.7.2.140 as part of making a more complete diff
    * against 1.0, but was erroneously not marked deleted.
    * As a result, it was wrongly included without diff coloring
    * in the Working Draft of 24 February 2005.
    *--><!--*
* material suppressed here by diff group du0 *
*--><div4 id="duration-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4><div4 role="1.0" id="duration-derived-types" dg="rq20"><head>Related Datatypes</head><subtypes/></div4></div3><div3 id="dateTime"><head>dateTime</head><!--*
* material suppressed here by diff group dt2 *
*--><!--* MSM reverted from &pD; to decimal 3ll up, since paragraph is now gone anyway.
    * If change appeared in Feb WD we'll need to mark it as a change, but for now
    * I'm busy rechecking against 1.0, not the WD yet. *--><!--*
<ednote><edtext>I'm not sure how UTC and TAI are handled&mdash;as
termrefs or just plain text.  Michael, please fix appropriately
once we converge</edtext></ednote>
*--><p dg="dt2"><dtref ref="dateTime"/> represents
instants of time, optionally marked
with a particular <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offset</phrase>.  Values representing
the same instant but having
different <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offsets</phrase> are equal but not
identical.</p><!--*
* material suppressed here by diff group dt2 *
*--><!--*
* material suppressed here by diff group dt2 *
*--><!--*
* material suppressed here by diff group dt2 *
*--><!--*
* material suppressed here by diff group dt2 *
*--><div4 id="dateTime-value-space" dg="dt2"><head>Value Space</head><p><dtref ref="dateTime"/> uses the
<dtref ref="dt-dt-7PropMod"/>, with no properties 
except <pfref ref="vp-dt-timezone"/>
permitted 
to be <pt>absent</pt>.  The <pfref ref="vp-dt-timezone"/> property remains
<termref def="dt-optional"/>.</p><!--* This note duplicates on in the appendix; see that they remain in synch. *--><note dg="rq123"><p>In version 1.0 of this specification, the 
<pfref ref="vp-dt-year"/> property was not permitted to have the value
zero. The year <phrase dg="b3256">before the year 1
in the proleptic Gregorian calendar, traditionally referred to as 
1 BC or as</phrase>
1 BCE<phrase dg="b3256">,</phrase> was represented by a 
<pfref ref="vp-dt-year"/> value of −1, 2 BCE by −2, and so
forth. <phrase dg="b3256">Of course, many, perhaps most,
references to 1 BCE (or 1 BC) actually refer not 
to a year in the proleptic Gregorian calendar but to a year in the
Julian or <quote>old style</quote> calendar; the two correspond
approximately but not exactly to each other.</phrase>
</p><p>
In this version of this specification,
two changes are made in order to agree with existing usage. 
First, <pfref ref="vp-dt-year"/> is permitted to have the value zero.
Second, the interpretation of
<pfref ref="vp-dt-year"/> values is changed accordingly: a <pfref ref="vp-dt-year"/> value of zero represents 1 BCE, −1
represents 2 BCE, etc. This representation simplifies interval
arithmetic and leap-year calculation for dates before the common 
era<phrase dg="b3256"> (which may be why astronomers
and others interested in such calculations with the proleptic
Gregorian calendar have adopted it), and is consistent with the
current edition of <bibref ref="ISO8601"/></phrase>.
</p><p>
Note that 1 BCE, 5 BCE, and so on (years 0000, -0004, etc. in the
lexical representation defined here) are leap years in the proleptic
Gregorian calendar used for the date/time datatypes defined here.
Version 1.0 of this specification was unclear about the treatment of
leap years before the common era<phrase dg="b3256">.</phrase><!--*
* material suppressed here by diff group b3256 *
*-->
<phrase dg="b3256">If</phrase> existing
schemas or data specify dates of 29 February for any years before the
common era<phrase dg="b3256">, then some values giving
a date of 29 February which were valid under a plausible
interpretation of XSD 1.0 will be invalid under this specification,
and some which were invalid will be valid</phrase>.  With that possible 
exception, schemas and data valid
under the old interpretation remain valid under the new.
</p></note><constraintnote id="con-dateTime-dayValue" type="value"><head>Day-of-month Values</head><p>The <pfref ref="vp-dt-day"/> value <!--* is limited to *-->
<rfc2119>must</rfc2119> be
no more than 30 if <pfref ref="vp-dt-month"/>
is one of 4, 6, 9, or 11; <!--* , to *-->
no more than 28
if <pfref ref="vp-dt-month"/> is 2 and
<pfref ref="vp-dt-year"/> is not divisible by 4,
or is divisible by 100 but not by 400;
and no more than 29 if <pfref ref="vp-dt-month"/>
is 2 and <pfref ref="vp-dt-year"/>
is divisible by 400, or by 4 but not by 100.</p></constraintnote><!--*
* material suppressed here by diff group noleap *
*--><note><p>See the conformance note in 
<!--*
* material suppressed here by diff group partialfix *
*--><phrase dg="partialfix"><specref ref="partial-implementation"/></phrase>
which applies to the <pfref ref="vp-dt-year"/> and <pfref ref="vp-dt-second"/>
values of this datatype.</p></note><p>Equality and order are as prescribed
in <specref ref="theSevenPropertyModel"/>. 
<dtref ref="dateTime"/> values are ordered
by their <pfref ref="vp-dt-timeOnTimeline"/> value.</p><note><p>Since the order of a <dtref ref="dateTime"/>
value having a <pfref ref="vp-dt-timezone"/>
<!--*
* material suppressed here by diff group b3257 *
*--><phrase dg="b3257">relative to</phrase> another value whose
<pfref ref="vp-dt-timezone"/> is <pt>absent</pt> is determined
by imputing <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offsets</phrase> of both +14:00
and −14:00 to the <!--*
* material suppressed here by diff group b4642 *
*-->
value<phrase dg="b4642"> with no time zone offset</phrase>, many such
combinations will be
<termref def="dt-incomparable"/> because the two imputed
<!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offsets</phrase> yield different orders.</p><!-- moved up from MSM's experiment in the later delled subsection --><p>Although <dtref ref="dateTime"/> and other
types related to dates and times have only a partial order, it
is possible for datatypes derived from <dtref ref="dateTime"/> to have
total orders, if they are restricted (e.g. using the
<compref ref="f-p"/> facet) to the subset of values with, or
the subset of values without, <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offsets</phrase>.  Similar restrictions
on other date- and time-related types will similarly produce
totally ordered subtypes.  Note, however, that
such restrictions do not affect the value shown, for a given 
<compref ref="std"/>, in the <compref ref="ff-o"/> facet.</p></note><note><p>Order and equality are essentially the same for
<dtref ref="dateTime"/> in this version of this specification as
they were in version 1.0.  However, since values
now distinguish <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offsets</phrase>, equal
values with different <pfref ref="vp-dt-timezone"/>s
are not <emph>identical</emph>, and values with extreme
<pfref ref="vp-dt-timezone"/>s may no longer be equal
to any value with a smaller <pfref ref="vp-dt-timezone"/>.</p></note></div4><!--*
* material suppressed here by diff group dt2 *
*--><!--*
* material suppressed here by diff group dt2 *
*--><div4 id="dateTime-lexical-mapping" dg="dt2"><head>Lexical Mapping<!--*
* material suppressed here by diff group b3736 *
*--></head><!--
<p diff="add" dg="rq123">
Informally, the &lexical_space; of <dtref ref="dateTime"/> consists of
literals of the form:
<code>'-'? yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s+)? (zzzzzz)?</code>,
where 
</p>
<ulist diff="add" dg="rq123">
  <item><p><code>'-'? yyyy</code> denotes the year. There must
be at least four digits; leading zeroes are prohibited if the numeral
is more than four digits long, and non-positive numbers represent
years before the common era (<string>0000</string> represents the
year 1 BCE, <string>-0001</string> is 2 BCE, etc.); no plus sign is
permitted.</p>
<note>
<p>Version 1.0 of this specification described a different
interpretation of negative years, in which 1 BCE was
represented <string>-0001</string>, etc.  That interpretation
however, is inconsistent with existing established usage of
negative year numbers.  Note that existing schemas and XML data valid
under the old interpretation remain valid under the new.</p>
</note>
</item>
  <item><p><code>'-' mm '-' dd</code> represents the month and day
of the month; both <var>mm</var> and <var>dd</var> are two-digit
numerals.</p></item>
  <item><p><string>T</string> is a separator indicating that 
time-of-day follows.</p></item>
  <item><p><string>hh ':' mm ':' ss ('.' s+)?</string> denotes
the time of day.  <var>hh</var> is a two-digit numeral
representing the hour. <var>hh</var> may be
<string>24</string> if and only if <var>hh</var>
and <var>mm</var> are each <string>00</string>;
the <dtref ref="dateTime"/> value so represented is the first 
instant of the following day. <var>mm</var> and <var>ss</var> 
are two-digit numerals representing the minute and the
integral number of seconds, respectively; the <string>.</string>
and trailing <var>s</var> digits (if any) represent fractional
seconds.</p></item>
  <item><p><string>zzzzzz</string> (if present) represents
the &timezone; either as <string>Z</string> or
in the format <code>('+'|'-') hh ':' mm</code>,
giving the offset from UTC in hours and minutes.</p></item>
</ulist>

<p diff="add" dg="rq123">
For example, 2002-10-10T12:00:00-05:00 
(noon on 10 October 2002, Central Daylight
Savings Time as well as Eastern Standard Time
in the U.S.) is 2002-10-10T17:00:00Z,
five hours later than 2002-10-10T12:00:00Z.
</p>
--><p>The lexical representations for <dtref ref="dateTime"/> are as follows:

<defset><head>Lexical Space</head><prod id="nt-dateTimeRep"><lhs>dateTimeLexicalRep</lhs><rhs><nt def="nt-yrFrag"/> <string>-</string> <nt def="nt-moFrag"/> <string>-</string> <nt def="nt-daFrag"/> <string>T</string> ((<nt def="nt-hrFrag"/> <string>:</string> <nt def="nt-miFrag"/> <string>:</string> <nt def="nt-seFrag"/>) |
<nt def="nt-eodFrag"/>) <nt def="nt-tzFrag"/>?</rhs><constraint def="con-dateTime-day"/><!--*
* material suppressed here by diff group noleap *
*--></prod></defset>

<constraintnote id="con-dateTime-day" type="lexical"><head>Day-of-month Representations</head><p>Within a <nt def="nt-dateTimeRep"/>, a <nt def="nt-daFrag"/> <rfc2119>must not</rfc2119>
begin with the digit <string>3</string> or be <string>29</string>
unless the value to
which it would map would satisfy the value constraint on
<pfref ref="vp-dt-day"/> values
<!-- The 2 <quote>s following should be a ref of some sort.  I don't know
how to link to <constraintnote>s. -->
(<quote>Constraint: Day-of-month Values</quote>) given above.</p></constraintnote>

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

<phrase dg="rq123">In such representations:</phrase>
<ulist dg="rq123"><item><p><nt def="nt-yrFrag"/> is a numeral consisting
of at least four decimal digits, optionally preceded by a minus sign;
leading <string>0</string> digits are prohibited except to bring the
digit count up to four. 
It represents the <pfref ref="vp-dt-year"/> value.</p></item><item><p>Subsequent <string>-</string>, <string>T</string>, and
<string>:</string>, separate the various numerals.</p></item><item><p><nt def="nt-moFrag"/>, <nt def="nt-daFrag"/>, <nt def="nt-hrFrag"/>,
and <nt def="nt-miFrag"/> are numerals consisting
of exactly two decimal digits. 
They represent<!--*
* material suppressed here by diff group rq123 *
*--> 
the <pfref ref="vp-dt-month"/>, <pfref ref="vp-dt-day"/>,
<pfref ref="vp-dt-hour"/>, and <pfref ref="vp-dt-minute"/> values
respectively.</p></item><item><!--*
* material suppressed here by diff group dp200701 *
*--><p><!--*
* material suppressed here by diff group b3258 *
*--><phrase dg="b3258"><nt def="nt-seFrag"/></phrase>
is a numeral consisting
of exactly two decimal digits, or two decimal digits,
a decimal point, and one or more trailing digits. 
It represents the <pfref ref="vp-dt-second"/> value.</p></item><item><p>Alternatively, <nt def="nt-eodFrag"/> combines the <nt def="nt-hrFrag"/>,
<nt def="nt-miFrag"/>, <nt def="nt-miFrag"/>, and their separators to
represent midnight of the day, which is the first moment of the next
day.</p></item><item><p><nt def="nt-tzFrag"/>, if present, specifies <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">an
offset between UTC and local time</phrase>. 
<!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">Time zone offsets</phrase> are a count of minutes (expressed in
<nt def="nt-tzFrag"/> as a count of hours and minutes) that are added
or subtracted from UTC time to get the <unusual>local</unusual> time. 
<string>Z</string> is an alternative representation of the <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offset</phrase> 
<!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642"><string>00:00</string></phrase>, 
which is, of course, zero minutes from UTC.</p><p>For example, 2002-10-10T12:00:00−05:00 
(noon on 10 October 2002, Central Daylight
Savings Time as well as Eastern Standard Time
in the U.S.) is equal to 2002-10-10T17:00:00Z,
five hours later than 2002-10-10T12:00:00Z.</p><note dg="b4642"><p>For the most part, this specification adopts the distinction between
<mention>timezone</mention> and <mention>timezone offset</mention> laid
out in <bibref ref="ref-timezones"/>.  
Version 1.0 of this specification did not make this distinction,
but used the term <mention>timezone</mention> for the time zone
offset information associated with date- and time-related datatypes.
Some traces of the earlier usage remain visible in this and other
specifications.  The name<phrase dg="b6043">s</phrase> 
<nt def="nt-tzFrag"/><phrase dg="b6043">
and <compref ref="f-tz"/></phrase>
<!--*
* material suppressed here by diff group b6043 *
*--><phrase dg="b6043">are such traces </phrase>;
others will be found in the names of functions defined in 
<bibref ref="F_O"/>, or in references in this specification to
<unusual>timezoned</unusual> and <unusual><!--*
* material suppressed here by diff group b6943 *
*--><phrase dg="b6943">non-</phrase>timezoned</unusual>
values.</p></note></item></ulist>
</p><!--*
* material suppressed here by diff group dp090225 *
*--><p>The <nt def="nt-dateTimeRep"/> <phrase dg="dt3">production
</phrase>is equivalent to this regular expression
once whitespace is removed<!--*
* material suppressed here by diff group dt3 *
*-->.
<!--*
* material suppressed here by diff group b3659 *
*-->
<!--*
* material suppressed here by diff group b3659-add-b6547-del *
*-->
<eg dg="b3659" xml:space="preserve">
-?([1-9][0-9]{3,}|0[0-9]{3})
-(0[1-9]|1[0-2])
-(0[1-9]|[12][0-9]|3[01])
T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?|(24:00:00(\.0+)?))
(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?</eg>
<!--*
* material suppressed here by diff group pre *
*-->
Note that neither the <!--*
* material suppressed here by diff group dt3 *
*--><nt def="nt-dateTimeRep"/> <phrase dg="dt3">production
</phrase>nor this regular
expression alone enforce the constraint<!--*
* material suppressed here by diff group noleap *
*-->
<phrase dg="dt3">on <nt def="nt-dateTimeRep"/> </phrase>given above.</p><!--*
* material suppressed here by diff group rq21-lexmaps *
*--><p dg="rq21-lexmaps">The <termref def="dt-lexical-mapping"/>
for <dtref ref="dateTime"/> is <pfref ref="vp-dateTimeLexRep"/>.
The <termref def="dt-canonical-mapping"/> is <pfref ref="vp-dateTimeCanRep"/>.
</p></div4><!--*
* material suppressed here by diff group dt2 *
*--><!--*
* material suppressed here by diff group dt2 *
*--><!--*
* material suppressed here by diff group dt2 *
*--><div4 id="dateTime-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4><div4 role="1.0" id="dateTime-derived-types" dg="b6043"><head>Related Datatypes</head><subtypes/></div4></div3><div3 id="time"><head>time</head><!--*
* material suppressed here by diff group dt2 *
*--><p dg="wdd"><dtref ref="time"/>
represents instants of time that recur at the same point in each
calendar day<phrase dg="dt2">, or that occur in some arbitrary calendar day.</phrase></p><!--*
* material suppressed here by diff group dt2 *
*--><!--*
* material suppressed here by diff group dt2 *
*--><div4 id="time-value-space" dg="dt2"><head>Value Space</head><p><dtref ref="time"/> uses the <dtref ref="dt-dt-7PropMod"/>, with
<pfref ref="vp-dt-year"/>, <pfref ref="vp-dt-month"/>,
and <pfref ref="vp-dt-day"/> required 
to be <pt>absent</pt>.  <pfref ref="vp-dt-timezone"/> remains
<termref def="dt-optional"/>.</p><!--*
* material suppressed here by diff group noleap *
*--><note><p>See the conformance note in 
<!--*
* material suppressed here by diff group partialfix *
*--><phrase dg="partialfix"><specref ref="partial-implementation"/></phrase>
which applies to the <pfref ref="vp-dt-second"/> value of this datatype.</p></note><!--* <issue id="RQ-13i-time-copy" role="1.1" diff="del" dg="dt2-3">
<p><loc href="&reqs;#time" target="reqs">RQ-13 (time 
zone crosses date line)</loc></p>

<p>The "seven property model" rewrite of
date/time datatype descriptions includes 
a carefully crafted definition of order
that insures that for repeating datatypes (time, gDay, etc.), &timezoned; values 
will be compared as though they are on the same <unusual>calendar day</unusual> 
(<unusual>local</unusual> property values) so that in any given &timezone;, 
the days start at <unusual>local</unusual> 
00:00:00 and end immediately before <unusual>local</unusual> 24:00:00.  
Days in timezones other than Z do not run from 00:00:00Z to 24:00:00Z.</p>
</issue> *--><p>Equality and order are as prescribed in
<specref ref="theSevenPropertyModel"/>.  <dtref ref="time"/> values
(points in time in an <unusual>arbitrary</unusual> day) are ordered
taking into account their <pfref ref="vp-dt-timezone"/>.<!--* &nbsp;
This was not true of the
<dtref ref="time"/> datatype as defined in the 1.0 version of this
specification, where <dtref ref="time"/> values were not
<unusual>&timezone; aware</unusual>. *--></p><p>A calendar (<!--*
* material suppressed here by diff group b4642 *
*-->or 
<unusual>local time</unusual>) day with <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">a larger positive 
time zone offset</phrase> begins earlier than the same calendar day with 
a <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">smaller (or negative)
time zone offset</phrase>.  Since the <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offsets</phrase> allowed spread over 28 hours,
<!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">it is
possible for the period denoted by a given calendar day with one
time zone offset to be completely disjoint from the period denoted by
the same calendar day with a different offset</phrase>
— the earlier day ends before the
<!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">later one starts</phrase>.  
The moments in time
represented by a single calendar day are spread over a 52-hour
interval, from the beginning of the day in the +14:00 <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offset</phrase> to the
end of that day in the −14:00 <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offset</phrase>.</p><note><p><!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">The relative
order of two <dtref ref="time"/> values, one of which has a <pfref ref="vp-dt-timezone"/> of <pt>absent</pt></phrase> is determined by imputing
<!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offsets</phrase> of both +14:00 and −14:00 to <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">the value without an offset</phrase><!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">.</phrase> <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">Many</phrase> such combinations will be <termref def="dt-incomparable"/> because the two imputed <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offsets</phrase> yield
different orders.  However, for a given <!--*
* material suppressed here by diff group b6943 *
*--><phrase dg="b6943">non-</phrase>timezoned value,
there will always be timezoned values at one or both ends of the
52-hour interval that are <termref def="dt-incomparable">comparable</termref> (because the interval of
<termref def="dt-incomparable">incomparability</termref> is only
<!--*
* material suppressed here by diff group b6939 *
*--><phrase dg="b6939">28</phrase>
hours wide).</p><!--*
* material suppressed here by diff group b3027 *
*--><p dg="b3027">
<!--*
* material suppressed here by diff group b3027b *
*--><phrase dg="b3027b">Some pairs of <dtref ref="time"/> literals
<!--* with different &tz_offsets;, *-->
which 
in the 1.0 version of this specification
denoted the same value
now (in this version) denote distinct values instead,
because values now include time zone offset information.
Some such pairs, 
such as <string>05:00:00-03:00</string> and <string>10:00:00+02:00</string>,
now denote equal though distinct values 
(because they identify the same points on the time line); 
others, 
such as <string>23:00:00-03:00</string> and <string>02:00:00Z</string>, 
now denote unequal values (23:00:00−03:00 &gt; 02:00:00Z
because 23:00:00−03:00 on any given day is equal to
02:00:00Z on <emph>the next day</emph>).
</phrase></p></note></div4><!--*
* material suppressed here by diff group dt2 *
*--><!--*
* material suppressed here by diff group dt2 *
*--><div4 id="time-lexical-mapping" dg="dt2"><head>Lexical Mappings</head><p>The lexical representations for <dtref ref="time"/>
are <unusual>projections</unusual> of 
those of <dtref ref="dateTime"/>, as follows:

<defset><head>Lexical Space</head><prod id="nt-timeRep"><lhs>timeLexicalRep</lhs><rhs>((<nt def="nt-hrFrag"/> <string>:</string> <nt def="nt-miFrag"/> <string>:</string> <nt def="nt-seFrag"/>) |
<nt def="nt-eodFrag"/>) <nt def="nt-tzFrag"/>?</rhs><!--*
* material suppressed here by diff group noleap *
*--></prod></defset>

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

The <nt def="nt-timeRep"/> <phrase dg="dt3">production
</phrase>is equivalent to this
regular expression, once whitespace is
removed<!--*
* material suppressed here by diff group dt3 *
*-->:
<!--*
* material suppressed here by diff group rq122a_sg *
*-->
<display dg="rq122a_sg"><code><!--*
* material suppressed here by diff group b3659 *
*-->
<phrase dg="b3659">(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?|(24:00:00(\.0+)?))(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?</phrase></code></display>
<phrase dg="dt3">Note that neither
the <nt def="nt-timeRep"/> production
nor this regular
expression alone enforce the constraint
on <nt def="nt-timeRep"/> given above.</phrase>
</p><!--*
* material suppressed here by diff group pre *
*--><!--*
* material suppressed here by diff group rq21-lexmaps *
*--><p dg="rq21-lexmaps">The <termref def="dt-lexical-mapping"/>
for <dtref ref="time"/> is
<pfref ref="vp-timeLexRep"/>; the <termref def="dt-canonical-mapping"/> is
<pfref ref="vp-timeCanRep"/>.
</p><!--*
* material suppressed here by diff group appr070331 *
*--><note dg="b2497"><p>The <termref def="dt-lexical-mapping"/> maps <string>00:00:00</string> and
<string>24:00:00</string> to the same value, namely midnight
(<pfref ref="vp-dt-hour"/> = 0 ,
<pfref ref="vp-dt-minute"/> = 0 , 
<pfref ref="vp-dt-second"/> = 0).</p></note></div4><div4 id="time-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4></div3><div3 id="date"><head>date</head><p><termdef id="dt-date" term="date" role="local">
<!--*
* material suppressed here by diff group dt2 *
*--><phrase dg="dt2"><term>date</term>
represents top-open intervals of exactly one day in length on the timelines of
<dtref ref="dateTime"/>, beginning on the beginning moment of each 
day<!--*
* material suppressed here by diff group b4642 *
*-->, up to but not including the beginning
moment</phrase> of the next day).  For non<phrase dg="b6943">-</phrase>timezoned values, the top-open
intervals disjointly cover the non<phrase dg="b6943">-</phrase>timezoned timeline,
one per day.  For timezoned
values, the intervals begin at every minute and therefore overlap.
</termdef>
</p><!--*
* material suppressed here by diff group dt2 *
*--><!--*
* material suppressed here by diff group dt2 *
*--><!--*
* material suppressed here by diff group dt2 *
*--><!--*
* material suppressed here by diff group dt2 *
*--><!--* strictly speaking, dt2 didn't delete this, just moved it into
    * the new section immediately following.  (Silently at first;
    * I found it missing when I collated 1.0 against a reconstruction
    * of 1.0 based on our diff markup, 26 August 2005.)
    * We could hack around this the way we do in rq21-string-hack,
    * but it's late, I'm tired, and I won't do it tonight.
    *--><!--*
* material suppressed here by diff group dt2 *
*--><div4 id="date-value-space" dg="dt2"><head>Value Space</head><p><dtref ref="date"/> uses the <dtref ref="dt-dt-7PropMod"/>, with
<pfref ref="vp-dt-hour"/>, <pfref ref="vp-dt-minute"/>,
and <pfref ref="vp-dt-second"/> required 
to be <pt>absent</pt>.  <pfref ref="vp-dt-timezone"/> remains
<termref def="dt-optional"/>.</p><constraintnote id="con-date-dayValue" type="value"><head>Day-of-month Values</head><p>The <pfref ref="vp-dt-day"/> value <rfc2119>must</rfc2119> be
no more than 30 if <pfref ref="vp-dt-month"/>
is one of 4, 6, 9, or 11, no more than 28
if <pfref ref="vp-dt-month"/> is 2 and
<pfref ref="vp-dt-year"/> is not divisible by 4,
or is divisible by 100 but not by 400,
and no more than 29 if <pfref ref="vp-dt-month"/>
is 2 and <pfref ref="vp-dt-year"/>
is divisible by 400, or by 4 but not by 100.</p></constraintnote><note><p>See the conformance note in 
<!--*
* material suppressed here by diff group partialfix *
*--><phrase dg="partialfix"><specref ref="partial-implementation"/></phrase>
which applies to the <!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd"><pfref ref="vp-dt-year"/>
value</phrase> of this datatype<!--*
* material suppressed here by diff group wdd *
*-->.</p></note><p>Equality and order are as prescribed in
<specref ref="theSevenPropertyModel"/>.</p><note><p>In version 1.0 of this specification, <dtref ref="date"/> values 
did not retain a <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offset</phrase> explicitly, but for 
<!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">offsets</phrase> 
not too far from  
<!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">zero</phrase> 
their <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offset</phrase> could be recovered based on
their value's first moment on the timeline.  The
<dtref ref="dt-dt-7PropMod"/> retains all <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offsets</phrase>.</p><!--*
* material suppressed here by diff group b3027c *
*--><p dg="b3027c"><!--*
* material suppressed here by diff group b3027b *
*--><phrase dg="b3027b">Some <dtref ref="date"/></phrase> 
values with
different time zone offsets that were identical in the 1.0 version
of this specification, such as 2000-01-01+13:00
and 1999-12-31−11:00, are in this version
of this specification equal (because they begin
at the same moment on the time line) but are
not identical (because they have and retain different
<!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offsets</phrase>).  This situation will arise for
dates only if one has a far-from-zero time zone offset and
hence in 1.0 its <unusual>recoverable time zone offset</unusual>
was different from the the time zone offset which is retained
in the <dtref ref="dt-dt-7PropMod"/> used in this version
of this specification.</p></note></div4><!--*
* material suppressed here by diff group dt2 *
*--><!--*
* material suppressed here by diff group dt2 *
*--><div4 id="date-lexical-mapping" dg="dt2"><head>Lexical Mapping<!--*
* material suppressed here by diff group b3736 *
*--></head><p>The lexical representations for <dtref ref="date"/>
are <unusual>projections</unusual> of 
those of <dtref ref="dateTime"/>, as follows:

<defset><head>Lexical Space</head><prod id="nt-dateRep"><lhs>dateLexicalRep</lhs><rhs><nt def="nt-yrFrag"/> <string>-</string> <nt def="nt-moFrag"/> <string>-</string> <nt def="nt-daFrag"/> <nt def="nt-tzFrag"/>?</rhs><constraint def="con-date-day"/></prod></defset>

<constraintnote id="con-date-day" type="lexical"><head>Day-of-month Representations</head><p>Within a
<!--*
* material suppressed here by diff group dt4 *
*--><phrase dg="dt4"><nt def="nt-dateRep"/></phrase>,
a <nt def="nt-daFrag"/> <rfc2119>must not</rfc2119>
begin with the digit <string>3</string> or be <string>29</string>
unless the value to
which it would map would satisfy the value constraint on
<pfref ref="vp-dt-day"/> values
<!-- The <quote> following should be a ref of some sort.  I don't know
how to link to <constraintnote>s. -->
(<quote>Constraint: Day-of-month Values</quote>) given above.</p></constraintnote>

The <nt def="nt-dateRep"/> <phrase dg="dt3">production
</phrase>is equivalent to this
regular expression<!--*
* material suppressed here by diff group dt3 *
*-->:
<!--*
* material suppressed here by diff group b3659 *
*-->
<display dg="b3659" role="shrink">
<code>-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?</code>
</display>
<!--*
* material suppressed here by diff group pre *
*-->
<phrase dg="dt3">Note that neither
the <nt def="nt-dateRep"/> production
nor this regular
expression alone enforce the constraint
on <nt def="nt-dateRep"/> given above.</phrase></p><!--*
* material suppressed here by diff group rq21-lexmaps *
*--><p dg="rq21-lexmaps">The <termref def="dt-lexical-mapping"/>
for <dtref ref="date"/> is <pfref ref="vp-dateLexRep"/>.
The <termref def="dt-canonical-mapping"/> is <pfref ref="vp-dateCanRep"/>.
</p></div4><div4 id="date-facets" dg="b4033"><head>Facets</head><facets role="rec12-tableaux-post"/></div4></div3><div3 id="gYearMonth"><head>gYearMonth</head><!--*
* material suppressed here by diff group dt2 *
*--><p dg="dt2">
<term>gYearMonth</term> <!--* is a datatype that *--> 
represents specific whole Gregorian months in specific 
Gregorian years.</p><!--*
* material suppressed here by diff group dt2 *
*--><note><p>Because month/year combinations in one calendar only rarely correspond
to month/year combinations in other calendars, values of this type
are not, in general, convertible to simple values corresponding to month/year
combinations in other calendars.  This type should therefore be used
with caution in contexts where conversion to other calendars is desired.</p></note><!--*
* material suppressed here by diff group dt2 *
*--><div4 id="gYearMonth-value-space" dg="dt2"><head>Value Space</head><p><dtref ref="gYearMonth"/> uses the <dtref ref="dt-dt-7PropMod"/>, with
<pfref ref="vp-dt-day"/>, <pfref ref="vp-dt-hour"/>,
<pfref ref="vp-dt-minute"/>, and <pfref ref="vp-dt-second"/> required 
to be <pt>absent</pt>.  <pfref ref="vp-dt-timezone"/> remains
<termref def="dt-optional"/>.</p><note><p>See the conformance note in 
<!--*
* material suppressed here by diff group partialfix *
*--><phrase dg="partialfix"><specref ref="partial-implementation"/></phrase>
which applies to the <pfref ref="vp-dt-year"/> value of this datatype.</p></note><p>Equality and order are as prescribed in
<specref ref="theSevenPropertyModel"/>.</p><!--* <ednote dg="review" diff="add"><edtext>The following note and example
are true, but unlike for date, 1.0 2E did not spell
out the fact.</edtext></ednote> *--><!--*
* material suppressed here by diff group b4642 *
*--></div4><div4 id="gYearMonth-lexical-repr"><head>Lexical
<!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3">Mapping<!--*
* material suppressed here by diff group b3736 *
*--></phrase></head><!--ednote diff="add" dg="dt2" diff="del" dg="dt3"><edtext>This "Lexical representation"
section will be replaced by a "Lexical Mappings" section similar in
spirit to that for <dtref ref="date"/> and others above, as soon as
the appropriate mappings are written.</edtext></ednote--><!--*
* material suppressed here by diff group dt2 *
*--><!--*
* material suppressed here by diff group dt2 *
*--><p dg="dt2">The lexical representations for
<dtref ref="gYearMonth"/> are <unusual>projections</unusual> of 
those of <dtref ref="dateTime"/>, as follows:

<defset><head>Lexical Space</head><prod id="nt-gYearMonthRep"><lhs>gYearMonthLexicalRep</lhs><rhs><nt def="nt-yrFrag"/> <string>-</string> <nt def="nt-moFrag"/> <nt def="nt-tzFrag"/>?</rhs></prod></defset>

The <nt def="nt-gYearMonthRep"/> is equivalent to this regular expression:
<!--*
* material suppressed here by diff group b3659 *
*-->
<display dg="b3659" role="shrink">
<code>-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?</code>
</display>
</p><!--*
* material suppressed here by diff group pre *
*--><!--*
* material suppressed here by diff group dt3.add.rq21-lexmaps.del *
*--><p dg="rq21-lexmaps">The <termref def="dt-lexical-mapping"/>
for <dtref ref="gYearMonth"/> is <pfref ref="vp-gYearMonthLexRep"/>.
The <termref def="dt-canonical-mapping"/> is <pfref ref="vp-gYearMonthCanRep"/>.
</p></div4><div4 id="gYearMonth-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4></div3><div3 id="gYear"><head>gYear</head><!--*
* material suppressed here by diff group dt2 *
*--><p dg="dt2"><term>gYear</term>
represents Gregorian calendar years.</p><!--*
* material suppressed here by diff group dt2 *
*--><note><p>
Because years in one calendar only rarely correspond to years
in other calendars, values of this type
are not, in general, convertible to simple values corresponding to years
in other calendars.  This type should therefore be used with caution
in contexts where conversion to other calendars is desired.
</p></note><!--*
* material suppressed here by diff group dt2 *
*--><div4 id="gYear-value-space" dg="dt2"><head>Value Space</head><p><dtref ref="gYear"/> uses the <dtref ref="dt-dt-7PropMod"/>, with
<pfref ref="vp-dt-month"/>, <pfref ref="vp-dt-day"/>, <pfref ref="vp-dt-hour"/>,
<pfref ref="vp-dt-minute"/>, and <pfref ref="vp-dt-second"/> required 
to be <pt>absent</pt>.  <pfref ref="vp-dt-timezone"/> remains
<termref def="dt-optional"/>.</p><note><p>See the conformance note in 
<!--*
* material suppressed here by diff group partialfix *
*--><phrase dg="partialfix"><specref ref="partial-implementation"/></phrase>
which applies to the <pfref ref="vp-dt-year"/> value of this datatype.</p></note><p>Equality and order are as prescribed in
<specref ref="theSevenPropertyModel"/>.</p><!--*
* material suppressed here by diff group b4642 *
*--></div4><div4 id="gYear-lexical-repr"><head>Lexical 
<!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3">Mapping<!--*
* material suppressed here by diff group b3736 *
*--></phrase></head><!--* <ednote diff="del" dg="dt3"><edtext>The editors intend to replace this "Lexical
representation" section with a "Lexical Mappings" section in
the spirit of that in "date" and others above, as soon as the
appropriate mappings can be written.</edtext></ednote> *--><!--*
* material suppressed here by diff group dt2 *
*--><!--*
* material suppressed here by diff group dt2 *
*--><!--*
* material suppressed here by diff group dp200701 *
*--><p dg="dt2">The lexical representations for
<dtref ref="gYear"/> are <unusual>projections</unusual> of 
those of <dtref ref="dateTime"/>, as follows:

<defset><head>Lexical Space</head><prod id="nt-gYearRep"><lhs>gYearLexicalRep</lhs><rhs><nt def="nt-yrFrag"/><!--*
* material suppressed here by diff group b3848 *
*--> <nt def="nt-tzFrag"/>?</rhs></prod></defset>

The <nt def="nt-gYearRep"/> is equivalent to this regular expression:
<!--*
* material suppressed here by diff group b3659 *
*-->
<display dg="b3659" role="shrink">
<code>-?([1-9][0-9]{3,}|0[0-9]{3})(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?</code>
</display>
</p><!--*
* material suppressed here by diff group pre *
*--><!--*
* material suppressed here by diff group dt3.add.rq21-lexmaps.del *
*--><p dg="rq21-lexmaps">The <termref def="dt-lexical-mapping"/>
for <dtref ref="gYear"/> is <pfref ref="vp-gYearLexRep"/>.
The <termref def="dt-canonical-mapping"/>
is <pfref ref="vp-gYearCanRep"/>.
</p></div4><div4 id="gYear-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4></div3><div3 id="gMonthDay"><head>gMonthDay</head><!--*
* material suppressed here by diff group dt2 *
*--><!--*
* material suppressed here by diff group dp200701 *
*--><p dg="wdd"><dtref ref="gMonthDay"/> represents whole calendar 
days that recur at the same point in each calendar year, or that occur 
in some arbitrary calendar year.<phrase dg="b3259">  (Obviously,
days beyond 28 cannot occur in all Februaries; 29 is nonetheless
permitted.)</phrase></p><p dg="dt2">This datatype can be used, for example, to record
birthdays; an instance of the datatype could be used to say that 
someone's birthday occurs on the 14th of September every year.</p><!--*
* material suppressed here by diff group dt3 *
*--><note><p>
Because day/month combinations in one calendar only rarely correspond
to day/month combinations in other calendars, values of this type do not,
in general, have any straightforward or intuitive representation
in terms of most other calendars. This type should therefore be
used with caution in contexts where conversion to other calendars
is desired.
</p></note><div4 id="gMonthDay-value-space" dg="dt2"><head>Value Space</head><p><dtref ref="gMonthDay"/> uses the <dtref ref="dt-dt-7PropMod"/>, with
<pfref ref="vp-dt-year"/>, <pfref ref="vp-dt-hour"/>, <pfref ref="vp-dt-minute"/>, and <pfref ref="vp-dt-second"/> required 
to be <pt>absent</pt>.  <pfref ref="vp-dt-timezone"/> remains
<termref def="dt-optional"/>.</p><constraintnote id="con-gMonthDay-dayValue" type="value"><head>Day-of-month Values</head><p>The <pfref ref="vp-dt-day"/> value <rfc2119>must</rfc2119> be no more than 30 if <pfref ref="vp-dt-month"/>
is one of 4, 6, 9, or 11, and no more than 29 if <pfref ref="vp-dt-month"/> is 2.</p></constraintnote><p>Equality and order are as prescribed in
<specref ref="theSevenPropertyModel"/>.</p><note><p>In version 1.0 of this specification, <dtref ref="gMonthDay"/> values 
did not retain a <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offset</phrase> explicitly, but for <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offsets</phrase> not too far from 
<!--*
* material suppressed here by diff group dt2 *
*--><termref dg="dt2" def="dt-utc"/> their <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offset</phrase> could be recovered based on
their value's first moment on the timeline.  The
<dtref ref="dt-dt-7PropMod"/> retains all <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offsets</phrase>.</p><p>An example that shows the difference from version 1.0 (see 
<specref ref="gMonthDay-lexical-repr"/> for the notations):
<ulist><item><p>A day is a calendar (or <unusual>local time</unusual>) day 
<!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">offset from <!--*
* material suppressed here by diff group dt2 *
*--><termref dg="dt2" def="dt-utc"/>
by the appropriate interval;</phrase>
<!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">this is now true for all <vpropref ref="vp-dt-day"/><!--*<dtref ref="day"/>*-->
values, including those with time zone offsets outside the range</phrase>
+12:00 through -11:59 inclusive:</p><p>--12-12+13:00 &lt; --12-12+11:00 
(just as --12-12+12:00 has always been less than
--12-12+11:00, but in version 1.0 
--12-12+13:00 &gt; --12-12+11:00 , since
--12-12+13:00's <unusual>recoverable
<!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offset</phrase></unusual> was −11:00)</p></item></ulist>
</p></note></div4><div4 id="gMonthDay-lexical-repr"><head>Lexical 
<!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3">Mapping<!--*
* material suppressed here by diff group b3736 *
*--></phrase></head><!--*
* material suppressed here by diff group dt2 *
*--><p dg="dt2">The lexical representations for 
<dtref ref="gMonthDay"/> are <unusual>projections</unusual> 
of those of <dtref ref="dateTime"/>, as follows:

<defset><head>Lexical Space</head><prod id="nt-gMonthDayRep"><lhs>gMonthDayLexicalRep</lhs><rhs><string>--</string> <nt def="nt-moFrag"/> <string>-</string> <nt def="nt-daFrag"/> <nt def="nt-tzFrag"/>?</rhs><constraint def="con-gMonthDay-day" dg="dt4"/></prod></defset>

<constraintnote id="con-gMonthDay-day" type="lexical" dg="dt4"><head>Day-of-month Representations</head><p>Within a <nt def="nt-gMonthDayRep"/>, a <nt def="nt-daFrag"/> <rfc2119>must not</rfc2119>
begin with the digit <string>3</string> or be <string>29</string>
unless the value to
which it would map would satisfy the value constraint on
<pfref ref="vp-dt-day"/> values
<!-- The <quote> following should be a ref of some sort.  I don't know
how to link to <constraintnote>s. -->
(<quote>Constraint: Day-of-month Values</quote>) given above.</p></constraintnote>

The <nt def="nt-gMonthDayRep"/> is equivalent to this regular 
expression<!--*
* material suppressed here by diff group dt4 *
*-->:
<!--* <ednote diff="del" dg="dt3"><edtext>Note initial escape hyphen does not appear on 
most other d/ts; check them out.</edtext></ednote> *-->
<!--* er, why ARE we escaping the initial hyphen? 
    * It's not a reserved character, is it?
YES  AFAIK, we didn't ever agree to making it part-time reserved.  -DP
    *-->
<!--*
* material suppressed here by diff group b3659 *
*-->
<!--* also, if role="shrink" does what I think it does, it renders
    * the thing unreadable in my browser; is it expendable?
It's forced one line, so without shrink the line is quite long. -DP
    *-->
<display dg="b3659" role="shrink">
<code>--(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?</code></display>
<phrase dg="dt4">Note that neither
the <nt def="nt-gMonthDayRep"/> production
nor this regular
expression alone enforce the constraint
on <nt def="nt-gMonthDayRep"/> given above.</phrase></p><!--*
* material suppressed here by diff group pre *
*--><!--*
* material suppressed here by diff group dt2 *
*--><!--*
* material suppressed here by diff group dt3.add.rq21-lexmaps.del *
*--><p dg="rq21-lexmaps">The <termref def="dt-lexical-mapping"/>
for <dtref ref="gMonthDay"/> is <pfref ref="vp-gMonthDayLexRep"/>.
The <termref def="dt-canonical-mapping"/> is <pfref ref="vp-gMonthDayCanRep"/>.
</p></div4><div4 id="gMonthDay-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4></div3><div3 id="gDay"><head>gDay</head><!--*
* material suppressed here by diff group dt1 *
*--><p><termdef dg="dt1" id="dt-gday" role="local" term="dDay"><term>gDay</term> 
<!--*
* material suppressed here by diff group dt2 *
*--> represents 
whole days within an arbitrary month—days that recur at the same
point in each (Gregorian) month.</termdef>  This datatype <!--*
* material suppressed here by diff group dt1 *
*--><phrase dg="dt1">is</phrase> used to represent a specific day of the month.
To <!--*
* material suppressed here by diff group dt1 *
*--><phrase dg="dt1">indicate, for example, that an employee gets a paycheck</phrase> on the 15th of each month.  <phrase dg="dt1">(Obviously, days
beyond 28 cannot occur in <emph>all</emph> months; they are nonetheless permitted, up to 31.)</phrase></p><!--*
* material suppressed here by diff group dt1 *
*--><!--*
* material suppressed here by diff group dp081112 *
*--><!-- F27Aug FTF--><!--* MSM doesn't know what the August ftf said about this, but I'm
    * restoring the note because it's as true for gDay as for gMonth
    * and the others. *--><!-- FTF Directed that this note be removed.  Probably should go
in all cases, and I missed the others. --><!--* <note dg="dt2" diff="del"> *--><note><p>Because days in one calendar only rarely
correspond to days in other calendars,
<phrase dg="dt1"><!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="gDay"/></phrase>
</phrase>values<!--*
* material suppressed here by diff group dt1 *
*--> do not, in general, have any straightforward or
intuitive representation in terms of most 
<!--*
* material suppressed here by diff group dt1 *
*--><phrase dg="dt1">non-Gregorian</phrase> 
calendars. 
<!--*
* material suppressed here by diff group dt1 *
*--><phrase dg="dt1"><!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="gDay"/></phrase>
</phrase> should therefore be used with caution in contexts where conversion to 
other calendars is desired.</p></note><div4 id="sec-vs-gDay" dg="dt1"><head>Value Space</head><p><dtref ref="gDay"/> uses the <dtref ref="dt-dt-7PropMod"/>, with
<pfref ref="vp-dt-year"/>, <pfref ref="vp-dt-month"/>,
<pfref ref="vp-dt-hour"/>, <pfref ref="vp-dt-minute"/>,
and <pfref ref="vp-dt-second"/> required to be
<pt>absent</pt>.  <pfref ref="vp-dt-timezone"/> remains
<termref def="dt-optional"/> and <pfref ref="vp-dt-day"/>
<phrase diff="del" dg="ep35">must</phrase><phrase diff="add" dg="ep35"><rfc2119>must</rfc2119></phrase>
be between 1 and 31 inclusive.</p><!--* <issue id="del-RQ-13i" role="1.1" diff="del" dg="dt2">
<p><loc href="&reqs;#time" target="reqs">RQ-13 (time zone crosses date line)</loc></p>
<p>The "seven property model" rewrite of date/time datatype descriptions includes a carefully crafted definition of order
that insures that for repeating datatypes (time, gDay, etc.), &timezoned; values will be compared as though they are on the same "calendar day" ("local"
property values) so that in any given &timezone;, the days start at "local" 00:00:00 and end not quite including "local" 24:00:00.  Days are not
00:00:00Z to 24:00:00Z in &timezones; other than Z.</p>
</issue> *--><p>Equality and order are as prescribed in
<specref ref="theSevenPropertyModel"/>.  Since <dtref ref="gDay"/>
values (days) are ordered by their first moments, it is possible
for apparent anomalies to appear in the order when
<pfref ref="vp-dt-timezone"/> values
<!--*
* material suppressed here by diff group dt3 *
*-->differ by at least 24
hours.  (It is possible for <pfref ref="vp-dt-timezone"/>
values to differ by up to 28 hours.)</p><p>
Examples that may appear anomalous (see <specref ref="gDay-lexical-mapping"/> for the notations):
<ulist><item><p>---15 &lt; ---16 , but  ---15−13:00 &gt; ---16+13:00</p></item><item><p>---15−11:00 = ---16+13:00</p></item><item><p>---15−13:00 &lt;&gt; ---16 ,
because  ---15−13:00 &gt; ---16+14:00 
and ---15−13:00 &lt; 16−14:00</p></item></ulist>
</p><note><p><!-- 2004-08-27 FTF-->
<!--* <phrase diff="del" dg="dt2">&timezones;</phrase><phrase diff="add" dg="dt2">
Because of the definition in <specref ref="theSevenPropertyModel"/>,
&timezones;</phrase> *-->
<!--* I don't know what the ftf said, but it says here I'm suggesting 
    * we go back to 'Timezones do not cause wrap-around'.
    *-->
<!--* If we have to mention the 7-property model, then we should
    * recast the sentence.  Because of the definition of WHAT? in the
    * model?  Because of the way XXX is defined in the 7-property model ...
    *-->
<!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">Time zone offsets</phrase> do not cause wrap-around at the end of the month:  
<!--*
* material suppressed here by diff group dt2 *
*--><phrase dg="dt2">the last day of a 
given month <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">with a time zone offset of</phrase> 
−13:00 may start after the first 
day of the <emph>next</emph> month 
<!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">with offset</phrase> +13:00, as 
measured on the global timeline,</phrase>
but nonetheless 
---01+13:00 &lt; ---31−13:00 .</p></note></div4><!--*
* material suppressed here by diff group dt1 *
*--><div4 id="gDay-lexical-mapping" dg="dt1"><head>Lexical Mapping<!--*
* material suppressed here by diff group b3736 *
*--></head><p>
The lexical representations for <dtref ref="gDay"/> are 
<unusual><!--*
* material suppressed here by diff group dt2 *
*--><phrase dg="dt2">projections</phrase></unusual> 
of those of <dtref ref="dateTime"/>, as follows:

<defset><head>Lexical Space</head><prod id="nt-gDayRep"><lhs>gDayLexicalRep</lhs><rhs><string>---</string> <nt def="nt-daFrag"/> <nt def="nt-tzFrag"/>?</rhs></prod></defset>

The <nt def="nt-gDayRep"/> is equivalent to this regular expression:
<!--*
* material suppressed here by diff group b3659 *
*-->
<display dg="b3659" role="shrink">
<code>---(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?</code>
</display>
</p><!--*
* material suppressed here by diff group rq21-lexmaps *
*--><p dg="rq21-lexmaps">The <termref def="dt-lexical-mapping"/> 
for <dtref ref="gDay"/> is <pfref ref="vp-gDayLexRep"/>.
The <termref def="dt-canonical-mapping"/> is <pfref ref="vp-gDayCanRep"/>.
</p></div4><div4 id="gDay-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4></div3><div3 id="gMonth"><head>gMonth</head><!--*
* material suppressed here by diff group dt2 *
*--><p><!--*
* material suppressed here by diff group dt2 *
*--><phrase dg="dt2"><term><!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3">gMonth</phrase></term>
represents whole (Gregorian) months
within an arbitrary year—months that recur at the same point in 
each year.  It might be used, for example, to say what
month annual Thanksgiving celebrations fall in different countries
(--11 in the United States, --10 in Canada, and possibly other months in
other countries).</phrase></p><!-- I think Oct in Germany as well -DP --><!--*
* material suppressed here by diff group dt2 *
*--><note><p>
Because months in one calendar only rarely correspond
to months in other calendars, values of this type do not,
in general, have any straightforward or intuitive representation
in terms of most other calendars. This type should therefore be
used with caution in contexts where conversion to other calendars
is desired.
</p></note><div4 id="gMonth-value-space" dg="dt2"><head>Value Space</head><p><dtref ref="gMonth"/> uses the <dtref ref="dt-dt-7PropMod"/>, with
<pfref ref="vp-dt-year"/>, <pfref ref="vp-dt-day"/>, <pfref ref="vp-dt-hour"/>, <pfref ref="vp-dt-minute"/>, and <pfref ref="vp-dt-second"/> required 
to be <pt>absent</pt>.  <pfref ref="vp-dt-timezone"/> remains
<termref def="dt-optional"/>.</p><p>Equality and order are as prescribed in
<specref ref="theSevenPropertyModel"/>.</p><!--*
* material suppressed here by diff group b4642 *
*--></div4><div4 id="gMonth-lexical-repr"><head>Lexical 
<!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3">Mapping<!--*
* material suppressed here by diff group b3736 *
*--></phrase></head><!--*
* material suppressed here by diff group dt2 *
*--><p dg="dt2">The lexical representations for <dtref ref="gMonth"/> are <unusual>projections</unusual> of 
those of <dtref ref="dateTime"/>, as follows:

<defset><head>Lexical Space</head><prod id="nt-gMonthRep"><lhs>gMonthLexicalRep</lhs><rhs><string>--</string> <nt def="nt-moFrag"/> <nt def="nt-tzFrag"/>?</rhs></prod></defset>

The <nt def="nt-gMonthRep"/> is equivalent to this regular expression:
<!--*
* material suppressed here by diff group b3659 *
*-->
<display dg="b3659" role="shrink">
<code>--(0[1-9]|1[0-2])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?</code>
</display>
</p><!--*
* material suppressed here by diff group pre *
*--><!--*
* material suppressed here by diff group dt3.add.rq21-lexmaps.del *
*--><p dg="rq21-lexmaps">
The <termref def="dt-lexical-mapping"/> for <dtref ref="gMonth"/> is <pfref ref="vp-gMonthLexRep"/>.
The <termref def="dt-canonical-mapping"/> is <pfref ref="vp-gMonthCanRep"/>.
</p></div4><div4 id="gMonth-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4></div3><div3 role="1.0" id="hexBinary"><head>hexBinary</head><p><termdef id="dt-hexBinary" term="hexBinary" role="local"><term>hexBinary</term>
represents arbitrary hex-encoded binary data. 
<!--*
* material suppressed here by diff group b1910-hexbin-silent *
*--></termdef>
</p><div4 id="sec-vs-hexbin" dg="b1910-hexbin-silent"><head dg="b1910-hexbin">Value Space</head><!--*
* material suppressed here by diff group dp200701 *
*--><p>The <termref def="dt-value-space"/> of
<!--*
* material suppressed here by diff group b4350-1 *
*--><phrase dg="b4350-1"><dtref ref="hexBinary"/></phrase>
is the set of <!--*
* material suppressed here by diff group b3264 *
*-->
finite-length sequences of <phrase dg="b3264">zero or more</phrase>
binary octets.<phrase dg="b3263">  The
length of a value is the number of octets.</phrase></p></div4><div4 role="1.0" id="hexBinary-lexical-representation"><head>Lexical <!--*
* material suppressed here by diff group b3736 *
*--><phrase dg="b3736">Mapping</phrase></head><!--*
* material suppressed here by diff group dp200701 *
*--><!--*
* material suppressed here by diff group b3261 *
*--><p dg="b3261"><dtref ref="hexBinary"/>'s <termref def="dt-lexical-space"/>
consists of strings of hex (hexadecimal) digits, two consecutive digits
representing each octet in the corresponding value (treating the octet
as the binary representation of a number between 0 and 255).  For
example, <string>0FB7</string> is a <termref def="dt-lexical-representation"/> of the
two-octet value 00001111 10110111.</p><p dg="b1910-hexbin">More formally, the <termref def="dt-lexical-space"/> of
<dtref ref="hexBinary"/> is the set of literals matching the <nt def="nt-hexBinary"/> production.
<defset><head>Lexical space of hexBinary</head><prod id="nt-hexDigit"><lhs>hexDigit</lhs><rhs><charclass>0-9a-fA-F</charclass></rhs></prod><prod id="nt-hexOctet"><lhs>hexOctet</lhs><rhs><nt def="nt-hexDigit"/> <nt def="nt-hexDigit"/></rhs></prod><prod id="nt-hexBinary"><lhs>hexBinary</lhs><rhs><nt def="nt-hexOctet"/>*</rhs></prod></defset>
</p><p dg="b1910-hexbin">The set recognized by <nt def="nt-hexBinary"/> is the same as that recognized by the regular
expression <string>([0-9a-fA-F]{2})*</string>.</p><p dg="b1910-hexbin">The <termref def="dt-lexical-mapping"/> of
<dtref ref="hexBinary"/> is <pfref ref="f-hexBinaryMap"/>.</p><!--*
* material suppressed here by diff group b3736 *
*--><p dg="b3736">The <termref def="dt-canonical-mapping"/> of
<dtref ref="hexBinary"/> is given formally in <pfref ref="f-hexBinaryCanonical"/>.</p></div4><!--*
* material suppressed here by diff group b3736 *
*--><div4 role="1.0" id="hexBinary-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4></div3><div3 id="base64Binary"><head>base64Binary</head><p><termdef id="dt-base64Binary" term="base64Binary" role="local">
<term>base64Binary</term> represents <phrase dg="b1911-b64b">arbitrary</phrase>
Base64-encoded <!--*
* material suppressed here by diff group b1911-b64b *
*--> binary
data.  <!--*
* material suppressed here by diff group b1911-b64b *
*--> 
For <term>base64Binary</term> data the entire binary stream is encoded
using the Base64 <!--*
* material suppressed here by diff group wd-19 *
*--><phrase dg="wd-19">Encoding
defined in <bibref ref="RFC3548"/>, which is derived from the encoding
described in <bibref ref="RFC2045"/></phrase>.</termdef></p><div4 id="sec-vs-b46b" dg="b1911-b64b-silent"><head><phrase dg="b1911-b64b">Value Space</phrase></head><!--*
* material suppressed here by diff group dp200701 *
*--><p dg="b1911-b64b-silent">The <termref def="dt-value-space"/> of
<dtref ref="base64Binary"/> is the set of <!--*
* material suppressed here by diff group b3264 *
*--> finite-length sequences of
<phrase dg="b3264">zero or more</phrase>
binary octets.<phrase dg="b3263">  The
length of a value is the number of octets.</phrase></p></div4><div4 id="sec-lex-b64b"><head><phrase dg="b1911-b64b">Lexical
<!--*
* material suppressed here by diff group b3736 *
*--><phrase dg="b3736">Mapping</phrase></phrase></head><!--*
* material suppressed here by diff group dp081112 *
*--><p>The <!--*
* material suppressed here by diff group b1911-b64b *
*--><phrase dg="b1911-b64b"><termref def="dt-lexical-representation">lexical representations</termref></phrase> of
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="base64Binary"/></phrase>
values are limited to the 65 characters of the Base64 Alphabet defined in 
<!--*
* material suppressed here by diff group wd-19 *
*--><bibref ref="RFC3548" dg="wd-19"/>,
i.e., <code>a-z</code>, <code>A-Z</code>,
<code>0-9</code>, the plus sign (+), the forward slash (/) and the
equal sign (=), together with 
<!--*
* material suppressed here by diff group b1911-b64b *
*--><phrase dg="b1911-b64b">the space character
(#x20)</phrase>. No other characters are allowed.
</p><p>
For compatibility with older mail gateways, <bibref ref="RFC2045"/>
suggests that <!--*
* material suppressed here by diff group b1911-b64b *
*--><phrase dg="b1911-b64b">B</phrase>ase64 data should have lines limited to at most 76
characters in length.  This line-length limitation is not
<phrase dg="wd-19">required by <bibref ref="RFC3548"/>
and is not</phrase> mandated in the <!--*
* material suppressed here by diff group b1911-b64b *
*--><phrase dg="b1911-b64b"><termref def="dt-lexical-representation">lexical representations</termref></phrase> of
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="base64Binary"/></phrase>
data<!--*
* material suppressed here by diff group wd-19 *
*--><phrase dg="wd-19">.  It</phrase>
<!--*
* material suppressed here by diff group wd-19 *
*--><phrase dg="wd-19"><rfc2119>must not</rfc2119></phrase>
be enforced by XML Schema processors.</p><p>The <termref def="dt-lexical-space"/> of
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="base64Binary"/></phrase>
is <!--*
* material suppressed here by diff group b1911-b64b *
*--><phrase dg="b1911-b64b">the
set of literals which <termref def="dt-match"/></phrase> the
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="base64Binary"/></phrase>production.</p><!--*
* material suppressed here by diff group b1911-b64b *
*--><p dg="b1911-b64b">
<defset><head>Lexical space of base64Binary</head><prod id="nt-Base64Binary"><lhs>Base64Binary</lhs><rhs>(<nt def="nt-B64quad"/>* <nt def="nt-B64final"/>)?</rhs></prod><prod id="nt-B64quad"><lhs>B64quad</lhs><rhs>(<nt def="nt-B64"/> <nt def="nt-B64"/> <nt def="nt-B64"/> 
<nt def="nt-B64"/>)
<!-- I quietly changed 'B64quad' to a non-terminal reference.
Same with a few others follo -davep, 081118 -->
<com><phrase><nt def="nt-B64quad"/></phrase> represents three octets of binary data.</com>
</rhs></prod><prod id="nt-B64final"><lhs>B64final</lhs><rhs><nt def="nt-B64finalquad"/> | <nt def="nt-Padded16"/> | <nt def="nt-Padded8"/></rhs></prod><prod id="nt-B64finalquad"><lhs>B64finalquad</lhs><rhs>(<nt def="nt-B64"/> <nt def="nt-B64"/> <nt def="nt-B64"/> 
<nt def="nt-B64char"/>)
<com><phrase><nt def="nt-B64finalquad"/></phrase> represents three octets
of binary data without trailing space.</com>
</rhs></prod><prod id="nt-Padded16"><lhs>Padded16</lhs><rhs><nt def="nt-B64"/> <nt def="nt-B64"/> <nt def="nt-B16"/> <string>=</string>
<com><phrase><nt def="nt-Padded16"/></phrase> represents a two-octet
at the end of the data.</com>
</rhs></prod><prod id="nt-Padded8"><lhs>Padded8</lhs><rhs><nt def="nt-B64"/> <nt def="nt-B04"/> <string>=</string> #x20? <string>=</string>
<com><phrase><nt def="nt-Padded8"/></phrase> represents a single octet at the end of the data.</com>
</rhs></prod><prod id="nt-B64"><lhs>B64</lhs><rhs><nt def="nt-B64char"/> #x20?</rhs></prod><prod id="nt-B64char"><lhs>B64char</lhs><rhs>[A-Za-z0-9+/]</rhs></prod><prod id="nt-B16"><lhs>B16</lhs><rhs><nt def="nt-B16char"/> #x20?</rhs></prod><prod id="nt-B16char"><lhs>B16char</lhs><rhs>[AEIMQUYcgkosw048]
<com>Base64 characters whose bit-string value ends in '00'</com></rhs></prod><prod id="nt-B04"><lhs>B04</lhs><rhs><nt def="nt-B04char"/> #x20?</rhs></prod><prod id="nt-B04char"><lhs>B04char</lhs><rhs>[AQgw]
<com>Base64 characters whose bit-string value ends in
<phrase><mention>0000</mention></phrase></com></rhs></prod></defset>
</p><p dg="b3659">
The <nt def="nt-Base64Binary"/> production is equivalent 
to the following regular expression.
<display role="shrink">
<code>((([A-Za-z0-9+/] ?){4})*(([A-Za-z0-9+/] ?){3}[A-Za-z0-9+/]|([A-Za-z0-9+/] ?){2}[AEIMQUYcgkosw048] ?=|[A-Za-z0-9+/] ?[AQgw] ?= ?=))?</code>
</display>
Note that each <string>?</string> except the last is preceded by a
single space character.</p><p>Note that this grammar requires the number of non-whitespace
characters in the <!--*
* material suppressed here by diff group b1911-b64b *
*--><phrase dg="b1911-b64b"><termref def="dt-lexical-representation"/></phrase> to be a multiple of four, and
for equals signs to appear only at the end of the
<!--*
* material suppressed here by diff group b1911-b64b *
*--><phrase dg="b1911-b64b"><termref def="dt-lexical-representation"/></phrase>;
<!--*
* material suppressed here by diff group b1911-b64b *
*--><phrase dg="b1911-b64b">literals</phrase>
which do not meet these constraints
are not legal <!--*
* material suppressed here by diff group b1911-b64b *
*--><phrase dg="b1911-b64b"><termref def="dt-lexical-representation">lexical representations</termref></phrase> of
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="base64Binary"/></phrase><!--*
* material suppressed here by diff group b3262 *
*-->.</p><p dg="b1911-b64b">The <termref def="dt-lexical-mapping"/> for
<dtref ref="base64Binary"/> is as given in 
<bibref ref="RFC2045"/> and <bibref ref="RFC3548"/>.</p><note><p>The above definition of the <termref def="dt-lexical-space"/> is more restrictive than
that given in <bibref ref="RFC2045"/> as regards whitespace —
<phrase dg="wd-19">and less restrictive than <bibref ref="RFC3548"/>.</phrase>
<!--*
* material suppressed here by diff group wd-19 *
*--><phrase dg="wd-19">This</phrase> is
not an issue in practice.  Any string compatible with
<!--*
* material suppressed here by diff group wd-19 *
*--><phrase dg="wd-19">either</phrase>
RFC can occur in an element or attribute
validated by this type, because the <termref def="dt-whiteSpace"/>
facet of this type is fixed to <pt>collapse</pt>, which means that all
leading and trailing whitespace will be stripped, and all internal
whitespace collapsed to single space characters, <emph>before</emph>
the above grammar is enforced. <phrase dg="wd-19">The
possibility of ignoring whitespace in <!--*
* material suppressed here by diff group b1911-b64b *
*--><phrase dg="b1911-b64b">B</phrase>ase64 data is foreseen in
clause 2.3 of <bibref ref="RFC3548"/>, but for the reasons given there
this specification does not allow implementations to ignore
non-whitespace characters which are not in the Base64
Alphabet.</phrase></p></note><!-- *** It should have been changed to 'canonical representation'
rather than 'canonical lexical representation'.  *** --><p>The canonical <!--*
* material suppressed here by diff group b1911-b64b *
*--><phrase dg="b1911-b64b"><termref def="dt-lexical-representation"/></phrase> 
of a
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="base64Binary"/></phrase>
data value is the <!--*
* material suppressed here by diff group b1911-b64b *
*--><phrase dg="b1911-b64b">B</phrase>ase64 encoding of the value which matches the
Canonical-base64Binary production in the following grammar:
</p><!--*
* material suppressed here by diff group b1911-b64b *
*--><p dg="b1911-b64b">
<defset><head>Canonical representation of base64Binary</head><prod id="nt-Canonical-base64Binary"><lhs>Canonical-base64Binary</lhs><rhs><nt def="nt-CanonicalQuad"/>* <nt def="nt-CanonicalPadded"/>?</rhs></prod><prod id="nt-CanonicalQuad"><lhs>CanonicalQuad</lhs><rhs><nt def="nt-B64char"/> <nt def="nt-B64char"/> <nt def="nt-B64char"/> <nt def="nt-B64char"/></rhs></prod><prod id="nt-CanonicalPadded"><lhs>CanonicalPadded</lhs><rhs><nt def="nt-B64char"/> <nt def="nt-B64char"/> <nt def="nt-B16char"/> <string>=</string>
| <nt def="nt-B64char"/> <nt def="nt-B04char"/> <string>==</string></rhs></prod></defset></p><p dg="b1911-b64b">That is, the <termref def="dt-canonical-representation"/>
of a <dtref ref="base64Binary"/> value is the <termref def="dt-lexical-representation"/>
which maps to that value and contains no whitespace. The
<termref def="dt-canonical-mapping"/> for <dtref ref="base64Binary"/> is
thus the encoding algorithm for Base64 data given in <bibref ref="RFC2045"/>
and <bibref ref="RFC3548"/>, with the proviso that no
characters except those in the Base64 Alphabet are to be written
out.</p><note><p>For some values the <termref def="dt-canonical-representation">canonical <!--*
* material suppressed here by diff group b1911-b64b *
*--><phrase dg="b1911-b64b">representation</phrase></termref> defined above does
not conform to <bibref ref="RFC2045"/>, which requires breaking with
linefeeds at appropriate intervals. <phrase dg="wd-19">It
does conform with <bibref ref="RFC3548"/>.</phrase></p></note><!--*
* material suppressed here by diff group dp200701 *
*--><p>The length of a
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="base64Binary"/></phrase>
value <!--*
* material suppressed here by diff group b3263 *
*-->may be calculated from the <!--*
* material suppressed here by diff group b1911-b64b *
*--><phrase dg="b1911-b64b"><termref def="dt-lexical-representation"/></phrase> by
removing whitespace and padding characters and performing the
calculation shown in the pseudo-code below:</p><!-- the paragraph that begins "The length of a base64Binary value is
the number of octets it contains.  This may be calculated..." is changed to
read "The length of a base64Binary value may be calculated..." --><!-- I couldn't resist quietly making the following display wordwrap
a bit better for accessibility (i.e., very large fonts).  -DP --><p>
<code>
lex2   := killwhitespace(lexform) 
  -- remove whitespace characters<br/>
lex3   := strip_equals(lex2)      
  -- strip padding characters at end<br/>
length := floor (length(lex3) * 3 / 4)      
  -- calculate length
</code>
</p><p>
Note on encoding:  <bibref ref="RFC2045"/> <phrase dg="wd-19">and
<bibref ref="RFC3548"/></phrase> explicitly 
reference<!--*
* material suppressed here by diff group wd-19 *
*--> US-ASCII encoding.  However,
decoding of <term>base64Binary</term> data in an XML entity is to be performed on the
Unicode characters obtained after character encoding processing as specified by
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>.
</p></div4><div4 id="base64Binary-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4></div3><div3 role="1.0" id="anyURI"><head>anyURI</head><p><termdef id="dt-anyURI" term="anyURI" role="local">
<term>anyURI</term> represents <!--*
* material suppressed here by diff group wd25 *
*--><phrase dg="wd25">an
Internationalized Resource Identifier Reference
(IRI)</phrase>.  An <term>anyURI</term> value can be absolute or relative, and may
have an optional fragment identifier (i.e., it may be 
<!--*
* material suppressed here by diff group wd25 *
*--><phrase dg="wd25">an
IRI</phrase> Reference).  This type should be used 
<!--*
* material suppressed here by diff group wd25 *
*--><phrase dg="wd25">when</phrase> 
the value fulfills the role of 
<!--*
* material suppressed here by diff group wd25 *
*--><phrase dg="wd25">an IRI,
as defined in <bibref ref="RFC3987"/> or its successor(s) in the IETF
Standards Track</phrase>.</termdef></p><!--*
* material suppressed here by diff group dp081112 *
*--><note><p><phrase dg="wd25">IRIs may be used to locate resources
or simply to identify them. In the case where they are used to locate
resources using a URI, applications should use
the</phrase><!--*
* material suppressed here by diff group wd25 *
*--> mapping from
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="anyURI"/></phrase>
values to URIs <!--*
* material suppressed here by diff group wd25 *
*--><phrase dg="wd25">given</phrase> 
by the <!--*
* material suppressed here by diff group b3264 *
*--> 
reference escaping procedure defined in
<phrase dg="b3264"><bibref ref="LEIRIs"/> and in</phrase>
<!--*
* material suppressed here by diff group wd25 *
*--><phrase dg="wd25">Section 
3.1 <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.ietf.org/rfc/rfc3987.txt">Mapping
of IRIs to URIs</xspecref> of <bibref ref="RFC3987"/>
or its successor(s) in the IETF Standards Track</phrase>. 
This means that a wide range of internationalized resource identifiers
can be specified when an
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="anyURI"/></phrase>
is called for, and still be understood as URIs per 
<!--*
* material suppressed here by diff group wd25 *
*--><phrase dg="wd25"><bibref ref="RFC3986"/>
and its successor(s)</phrase>.</p></note><!--*
* material suppressed here by diff group wd25 *
*--><!--*
* material suppressed here by diff group wd25 *
*--><div4 id="anyURI-vs" dg="b3264"><head>Value Space</head><p>The value space of <dtref ref="anyURI"/> is the set of finite-length
sequences of zero or more 
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#dt-character">character</xtermref>s (as defined in
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>) that <termref def="dt-match"/> the
<xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-Char">Char</xnt> production from <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>.</p></div4><div4 id="anyURI-lexical-representation"><head>Lexical
<!--*
* material suppressed here by diff group wd25 *
*--><phrase dg="wd25">Mapping</phrase></head><p>The <termref def="dt-lexical-space"/> of
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="anyURI"/></phrase>
is <!--*
* material suppressed here by diff group b3264 *
*--><phrase dg="b3264">the set of finite-length
sequences of zero or more 
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#dt-character">character</xtermref>s (as defined in
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>) that <termref def="dt-match"/> the
<xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-Char">Char</xnt> production from <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/></phrase>.</p><note dg="wd25"><p>For an <dtref ref="anyURI"/> value to be 
usable in practice as an IRI, the result of applying to it 
the algorithm defined in Section 3.1 of <bibref ref="RFC3987"/>
should <!--* NOT &should;, this is not a conformance criterion *-->
be a string which is a legal URI according
to <bibref ref="RFC3986"/>. (This is true at the time this document is published;
if in the future 
<bibref ref="RFC3987"/> and <bibref ref="RFC3986"/> are replaced by other specifications
in the IETF Standards Track, the relevant constraints will be those
imposed by those successor specifications.)</p><p>Each URI scheme imposes specialized syntax rules
for URIs in that scheme, including restrictions on the syntax of
allowed fragment identifiers. Because it is impractical for processors
to check that a value is a context-appropriate URI reference, 
neither the syntactic constraints defined by the definitions of individual
schemes nor the generic syntactic constraints defined by
<bibref ref="RFC3987"/> and <bibref ref="RFC3986"/> and their
successors are part of this datatype as defined here.
Applications which depend on <dtref ref="anyURI"/> values
being legal according to the rules of 
<!--* <bibref ref="RFC3987"/>, <bibref ref="RFC3986"/> and their
successor(s) *-->
the relevant specifications <!--* ? check with NM *-->
should make arrangements to check values against the appropriate 
definitions of IRI, URI, and specific schemes.</p></note><note><p>Spaces are, in principle, allowed in the <termref def="dt-lexical-space"/> of
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="anyURI"/></phrase>,
however, their use is highly discouraged
(unless they are encoded by <string>%20</string>).</p></note><p dg="wd25">The <termref def="dt-lexical-mapping"/> for <dtref ref="anyURI"/> is
the identity mapping.</p><note dg="wd25"><p>The definitions of URI in the current
IETF specifications define certain URIs as equivalent to each other.
Those equivalences are not part of this datatype as defined here:
if two <unusual>equivalent</unusual> URIs or IRIs are different character
sequences, they map to different values in this datatype.</p></note></div4><div4 role="1.0" id="anyURI-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4></div3><div3 id="QName"><head>QName</head><p><termdef id="dt-QName" term="QName" role="local">
<term>QName</term> represents
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#dt-qualname">XML qualified
names</xspecref><phrase dg="context">.
The <termref def="dt-value-space"/> of <term>QName</term> is the set of
tuples {<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#dt-NSName">namespace name</xspecref>,
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#dt-localname">local part</xspecref>},
where <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#dt-NSName">namespace name</xspecref>
is an <dtref ref="anyURI"/>
and <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#dt-localname">local part</xspecref> is
an <dtref ref="NCName"/>.
The <termref def="dt-lexical-space"/> of <term>QName</term> is the set
of strings that <termref def="dt-match"/> the <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#NT-QName">
QName</xnt> production of</phrase><!--*
* material suppressed here by diff group context *
*--> <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XMLNS" dg="b1838refs"/>.</termdef></p><p dg="b1838">It is <termref def="key-impl-def"/> whether an
implementation of this specification supports the
<xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#NT-QName">QName</xnt> production from 
<bibref ref="XMLNS"/>, or that from 
<bibref ref="XMLNS1.0"/>, or both.  See 
<specref ref="intro-relatedWork"/>.
</p><!--*
* material suppressed here by diff group dp081112 *
*--><p dg="b4395">
The mapping from lexical space to value space for a particular
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="QName"/></phrase>
<!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase> depends on the namespace bindings in scope where the literal occurs.
<!--*
* material suppressed here by diff group wgi-20080606 *
*--></p><p dg="b4395">When 
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="QName"/>s</phrase>
appear in an XML context, the bindings to be used in
the <termref def="dt-lexical-mapping"/> are those in the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">in-scope namespaces</xpropref> property of the
relevant element<!--*
* material suppressed here by diff group wgi-20080606 *
*-->.
<!--* e.g. XPointer *-->
<!--* Dude, XPointer values don't have type QName. *-->
<!--* d'oh!. *-->
When this datatype is used in a non-XML host language, 
the host language <rfc2119>must</rfc2119> specify what namespace bindings
are to be used.</p><p dg="b4395">
The host language, whether XML-based or otherwise, <rfc2119>may</rfc2119> specify whether
unqualified names are bound to the default namespace (if any)
or not; the host language may also place this under user control.
<!--* Like the QT specs *-->
If the host language does not specify otherwise,
unqualified names are bound to the default namespace.
</p><note dg="b4395"><p><!--*
* material suppressed here by diff group wgi-20080606 *
*--><phrase dg="wgi-20080606">The default</phrase> treatment of
unqualified names parallels that specified in
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XMLNS" dg="b1838refs"/> for element names (as opposed to that specified
for attribute names).
</p></note><note dg="context"><!--* context not approved, this is live text (2008-06) *--><p>
The mapping between <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase> in the <termref def="dt-lexical-space"/> and
values in the <termref def="dt-value-space"/> of
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="QName"/></phrase>
<!--*
* material suppressed here by diff group b4396 *
*--><phrase dg="b4396">depends on the set of
namespace declarations</phrase>
in scope for the context 
in which
<phrase dg="ep99"><!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="QName"/></phrase></phrase><!--*
* material suppressed here by diff group ep99 *
*--> 
is used. 
<!--*
* material suppressed here by diff group ep99 *
*--></p><p dg="wd-21">Because the lexical representations available for
any value of type <dtref ref="QName"/> vary with context, no 
<termref def="dt-canonical-representation"/> is defined for
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="QName"/></phrase>
in this specification.</p></note><!--*
* material suppressed here by diff group context *
*--><!--*
* material suppressed here by diff group context *
*--><!--*
* material suppressed here by diff group context *
*--><div4 id="QName-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/><!--*
* material suppressed here by diff group crhax *
*--></div4></div3><div3 id="NOTATION"><head>NOTATION</head><p><termdef id="dt-NOTATION" term="NOTATION" role="local"><term>NOTATION</term>
represents the <xnt xmlns:xlink="http://www.w3.org/1999/xlink" role="nt" href="http://www.w3.org/TR/xml11/#NT-NotationType">NOTATION</xnt>
attribute
type from <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>.<phrase dg="context">
The <termref def="dt-value-space"/>
of <term>NOTATION</term> is the set of <dtref ref="QName"/>s
of notations declared in the current schema.
The <termref def="dt-lexical-space"/> of <term>NOTATION</term> is the set
of all names of <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#declare-notation">notations</xspecref>
declared in the current schema (in the form of
<dtref ref="QName"/>s).</phrase></termdef></p><note dg="b3266"><p>Because its <termref def="dt-value-space"/> depends on the notion of a 
<quote>current schema</quote>, as instantiated for example 
by <bibref ref="structural-schemas"/>, the <dtref ref="NOTATION"/> datatype is 
unsuitable for use in other contexts which lack the notion of a
current schema.
</p></note><p dg="wgi-20080606">
The lexical mapping rules for <dtref ref="NOTATION"/> are as given for
<dtref ref="QName"/> in 
<specref ref="QName"/>.
</p><!--*
* material suppressed here by diff group dp081112 *
*--><constraintnote type="cos" id="enumeration-required-notation"><head>enumeration facet value required for NOTATION</head><!--*
* material suppressed here by diff group b4602 *
*--><p dg="b4602">It is  (with one exception) an <termref def="dt-error"/> for 
<dtref ref="NOTATION"/> to be used
directly to validate a literal as described in 
<specref ref="cvc-datatype-valid"/>:
only datatypes <termref def="dt-derived"/> from <dtref ref="NOTATION"/> by specifying
a value for <termref def="dt-enumeration"/> can be used to validate literals.</p><p dg="b4602">
The exception is that in the <termref def="dt-derived">derivation</termref> of a new type the
<!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase> used to enumerate the allowed values <rfc2119>may</rfc2119> be (and in
the context of [XSD 1.1 Part 1: Structures] will be)
validated directly against <dtref ref="NOTATION"/>; this amounts to
verifying that the value is a <dtref ref="QName"/> and that the 
<dtref ref="QName"/> is the
name of a <kw>NOTATION</kw> declared in the current schema.
</p></constraintnote><p><phrase dg="context">For compatibility (see <specref ref="terminology"/>)
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="NOTATION"/></phrase>
</phrase><!--*
* material suppressed here by diff group context *
*-->
should be used only on attributes
and should only be used in schemas with no
target namespace.</p><p dg="context">
<note dg="wd-21"><p>Because the lexical representations available for any given value
of <dtref ref="NOTATION"/> vary with context, this specification defines
no <termref def="dt-canonical-representation"/> for <dtref ref="NOTATION"/> values.</p></note>
</p><!--*
* material suppressed here by diff group context *
*--><!--*
* material suppressed here by diff group context *
*--><!--*
* material suppressed here by diff group context *
*--><div4 id="NOTATION-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/><p>

The use of <termref def="dt-length"/>, <termref def="dt-minLength"/> and <termref def="dt-maxLength"/>
on <phrase dg="rq120"><dtref ref="NOTATION"/> or</phrase>
datatypes <termref def="dt-derived"/> from <dtref ref="NOTATION"/> is
deprecated.  Future versions of this specification may
remove these facets for this datatype.

</p></div4></div3></div2><div2 role="1.0" id="ordinary-built-ins"><!--* !!! n.b. newOrg gives this section the ID other-builtin-STDs.
    * I'm leaving the old ID for now. -msm 2005-01-09 *--><head><!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">Other Built-in Datatypes</phrase></head><p>
This section gives conceptual definitions for all
<termref def="dt-built-in"/> <!--*
* material suppressed here by diff group rq120 *
*--><!--*
* material suppressed here by diff group rq120c *
*--><termref dg="rq120o" def="dt-ordinary"/>
datatypes defined by this specification. The XML representation used to define
<!--*
* material suppressed here by diff group rq120 *
*--> 
<phrase dg="ep26"><termref def="dt-ordinary"/></phrase>
datatypes (whether
<termref def="dt-built-in"/> or <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-user-defined"/>) is
given in <!--*
* material suppressed here by diff group rq120 *
*--><specref ref="xr-defn"/> 
and the complete
definitions of the <termref def="dt-built-in"/> <!--*
* material suppressed here by diff group rq120 *
*--><!--*
* material suppressed here by diff group rq120c *
*--><termref dg="rq120o" def="dt-ordinary"/>
datatypes are provided in <!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">the appendix</phrase> <specref ref="schema"/>.
<!--* MSM reverts a change here.  I'd recast to avoid the point of
    * disagreement, but I don't see how.  But the specref without
    * introductory words 'the appendix' reads more awkwardly than
    * I'm willing to let stand.
    *-->
</p><div3 role="1.0" id="normalizedString"><head>normalizedString</head><p>
<termdef id="dt-normalizedString" term="normalizedString" role="local">
<term>normalizedString</term>
represents white space normalized strings. 
The <termref def="dt-value-space"/> of <term>normalizedString</term> is the
set of strings that do not
contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters. 
The <termref def="dt-lexical-space"/> of <term>normalizedString</term> is the
set of strings that do not
contain the carriage return (#xD),
line feed (#xA)
nor tab (#x9) characters. 
The <termref def="dt-basetype"/> of <term>normalizedString</term> is <baseref/>.
</termdef>
</p><div4 id="normalizedString-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4><div4 role="1.0" id="normalizedString-derived-types"><head>Derived datatypes</head><subtypes/></div4></div3><div3 role="1.0" id="token"><head>token</head><p>
<termdef id="dt-token" term="token" role="local">
<term>token</term>
represents tokenized strings.
The <termref def="dt-value-space"/> of <term>token</term> is the
set of strings that do not
contain the
carriage return (#xD),
line feed (#xA) nor tab (#x9) characters, that have no
leading or trailing spaces (#x20) and that have no internal sequences
of two or more spaces.
The <termref def="dt-lexical-space"/> of <term>token</term> is the
set of strings that do not contain the
carriage return (#xD),
line feed (#xA) nor tab (#x9) characters, that have no
leading or trailing spaces (#x20) and that have no internal sequences
of two or more spaces.
The <termref def="dt-basetype"/> of <term>token</term> is <baseref/>.
</termdef>
</p><div4 role="1.0" id="token-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4><div4 role="1.0" id="token-derived-types"><head>Derived datatypes</head><subtypes/></div4></div3><div3 role="1.0" id="language"><head>language</head><!--*
* material suppressed here by diff group dp081112 *
*--><p><termdef id="dt-language" term="language" role="local"><term>language</term>
represents <phrase dg="rq100">formal</phrase> 
natural language identifiers<phrase dg="rq100">,</phrase> 
as defined 
by <!--*
* material suppressed here by diff group b4850 *
*--><phrase dg="b4850"><bibref ref="BCP47"/> 
(currently represented by 
<bibref ref="RFC4646"/> and 
<bibref ref="RFC4647"/>)
or its successor(s)</phrase>.
</termdef>
<!--*
* material suppressed here by diff group rq100 *
*-->The 
<phrase dg="rq100"><termref def="dt-value-space"/>
and </phrase><termref def="dt-lexical-space"/> of
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="language"/></phrase>
<!--*
* material suppressed here by diff group rq100 *
*--><phrase dg="rq100">are</phrase> 
the set of all strings that conform to the pattern 
<display><code>[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*</code></display>
<phrase dg="rq100">This is the set of strings
accepted by the grammar given in
<bibref ref="RFC3066"/></phrase><phrase dg="b4850">,
which is now obsolete; the current specification of language
codes is more restrictive</phrase>.  The <termref def="dt-basetype"/> of
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="language"/></phrase>
is <baseref/>.
<!--* MSM moved end of termdef away from here because termdef cannot
contain a 'display' element.  That may have been The Wrong Thing;
if anyone thinks so, let us discuss it. *--></p><note dg="rq100"><p>The regular expression above provides the only normative
  constraint on the lexical and value spaces of this type.  The
  additional constraints imposed on language identifiers by 
  <!--*
* material suppressed here by diff group b4850 *
*--><phrase dg="b4850"><bibref ref="BCP47"/></phrase>
  and its successor(s), and in particular their requirement that language
  codes be registered with IANA or ISO if not given in ISO 639, are 
  not part of this datatype as defined here.</p></note><!--* (sniff)

<note diff="add" dg="rq100">
<p><bibref ref="RFC3066"/> imposes additional constraints on language codes
  which are not part of this datatype as defined here.  In particular,
  as defined here this datatype does not require that values not given 
  in ISO 639 be registered with the Internet Assigned Numbers Authority (IANA).
  Applications with that requirement should make appropriate arrangements
  at the application level.
</p>
</note>

*--><note dg="rq100"><p><!--*
* material suppressed here by diff group b4850 *
*--><phrase dg="b4850"><bibref ref="BCP47"/></phrase> specifies 
that language codes <quote>are to be treated as case insensitive; there
exist conventions for capitalization of some of 
<!--*
* material suppressed here by diff group b4850 *
*--><phrase dg="b4850">the
subtags</phrase>, but these <!--*
* material suppressed here by diff group b4850 *
*--><phrase dg="b4850">MUST NOT</phrase> be taken 
to carry meaning.<!--*
* material suppressed here by diff group b4850 *
*--></quote>
Since the <dtref ref="language"/> datatype is
derived from <dtref ref="string"/>, it inherits from 
<dtref ref="string"/> a one-to-one mapping from lexical
representations to values. The literals <string>MN</string> and
<string>mn</string> <phrase dg="b4850">(for 
Mongolian)</phrase>
therefore correspond to distinct values and
have distinct canonical forms.  Users of this specification should be
aware of this fact, the consequence of which is that the
case-insensitive treatment of language values prescribed by 
<!--*
* material suppressed here by diff group b4850 *
*--><phrase dg="b4850"><bibref ref="BCP47"/></phrase> 
does not follow from the definition of
this datatype given here; applications which require
case-<phrase dg="b4986">in</phrase>sensitivity 
should make appropriate adjustments.</p></note><note dg="b2576" id="xml.lang.and.language"><p>The empty string is not a member of the <termref def="dt-value-space"/>
of <dtref ref="language"/>.  Some constructs which normally
take language codes as their values, however, also allow the
empty string. The attribute <att>xml:lang</att> defined by 
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/> is one example; there, the empty string
overrides a value which would otherwise be inherited, but
without specifying a new value.</p><p>One way to define the desired set of possible values is
illustrated by the schema document for the XML namespace
at <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2001/xml.xsd">http://www.w3.org/2001/xml.xsd</loc>, which defines the
attribute <att>xml:lang</att> as having a type which is a union
of <dtref ref="language"/> and an anonymous type whose
only value is the empty string:<eg xml:space="preserve">
 &lt;xs:attribute name="lang"&gt;
   &lt;xs:annotation&gt;
     &lt;xs:documentation&gt;
       See RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt 
       and the IANA registry at 
       http://www.iana.org/assignments/lang-tag-apps.htm for
       further information.

       The union allows for the 'un-declaration' of xml:lang with
       the empty string.
     &lt;/xs:documentation&gt;
   &lt;/xs:annotation&gt;
   &lt;xs:simpleType&gt;
     &lt;xs:union memberTypes="xs:language"&gt;
       &lt;xs:simpleType&gt;    
         &lt;xs:restriction base="xs:string"&gt;
           &lt;xs:enumeration value=""/&gt;
         &lt;/xs:restriction&gt;
       &lt;/xs:simpleType&gt;
     &lt;/xs:union&gt;
   &lt;/xs:simpleType&gt;
 &lt;/xs:attribute&gt;
</eg></p></note><div4 role="1.0" id="language-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4></div3><div3 role="1.0" id="NMTOKEN"><head>NMTOKEN</head><p><termdef id="dt-NMTOKEN" term="NMTOKEN" role="local">
<term>NMTOKEN</term> represents
the <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-TokenizedType">NMTOKEN attribute type</xnt>
from <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>. The <termref def="dt-value-space"/> of
<term>NMTOKEN</term> is the set of tokens that <termref def="dt-match"/>
the <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-Nmtoken">Nmtoken</xnt> production in
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>. The <termref def="dt-lexical-space"/> of
<term>NMTOKEN</term> is the set of strings that <termref def="dt-match"/>
the <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-Nmtoken">Nmtoken</xnt> production in
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>.  The <termref def="dt-basetype"/> of
<term>NMTOKEN</term> is <baseref/>.
</termdef></p><p dg="b1838">It is <termref def="key-impl-def"/> whether an
implementation of this specification supports the
<xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-Nmtoken">NMTOKEN</xnt> production from 
<bibref ref="XML"/>, or that from 
<bibref ref="XML1.0"/>, or both.  See 
<specref ref="intro-relatedWork"/>.</p><!--*
* material suppressed here by diff group dp081112 *
*--><p>For compatibility (see <specref ref="terminology"/>
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="NMTOKEN"/></phrase>
should be used only on attributes.</p><div4 role="1.0" id="NMTOKEN-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4><div4 role="1.0" id="NMTOKEN-derived-types"><head><!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">Related</phrase> datatypes</head><subtypes/></div4></div3><div3 role="1.0" id="NMTOKENS"><head>NMTOKENS</head><p><termdef id="dt-NMTOKENS" term="NMTOKENS" role="local"><term>NMTOKENS</term>
represents the <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-TokenizedType">NMTOKENS attribute
type</xnt> from <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>. The <termref def="dt-value-space"/>
of <term>NMTOKENS</term> is the set of finite, non-zero-length sequences of
<termref def="dt-NMTOKEN"/>s.  The <termref def="dt-lexical-space"/>
of <term>NMTOKENS</term> is the set of space-separated lists of tokens,
of which each token is in the <termref def="dt-lexical-space"/> of
<dtref ref="NMTOKEN"/>.  The <termref def="dt-itemType"/> of
<term>NMTOKENS</term> is <dtref ref="NMTOKEN"/>.
<phrase dg="b10374"><dtref ref="NMTOKENS"/> is derived
from <termref def="dt-anySimpleType"><phrase><code>anySimpleType</code></phrase></termref> in two steps:  an anonymous list type
is defined, whose <termref def="dt-itemType"/> is <dtref ref="NMTOKEN"/>; this is
the <termref def="dt-basetype"/> of <dtref ref="NMTOKENS"/>, which restricts
its value space to lists with at least one item.</phrase>
</termdef></p><!--*
* material suppressed here by diff group dp081112 *
*--><p>
For compatibility (see <specref ref="terminology"/>)
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="NMTOKENS"/></phrase>
should be used only on attributes.
</p><div4 role="1.0" id="NMTOKENS-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4></div3><div3 role="1.0" id="Name"><head>Name</head><p>
<termdef id="dt-Name" term="Name" role="local">
<term>Name</term>
represents <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#dt-name">XML Names</xspecref>.
The <termref def="dt-value-space"/> of <term>Name</term> is
the set of all strings which <termref def="dt-match"/> the
<xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-Name">Name</xnt> production of
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>.  The <termref def="dt-lexical-space"/> of
<term>Name</term> is the set of all strings which <termref def="dt-match"/>
the <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-Name">Name</xnt> production of
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>. The <termref def="dt-basetype"/> of <term>Name</term>
is <baseref/>.
</termdef>
</p><p dg="b1838">It is <termref def="key-impl-def"/> whether an
implementation of this specification supports the <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-Name">Name</xnt> production from 
<bibref ref="XML"/>, or that from 
<bibref ref="XML1.0"/>, or both.  See 
<specref ref="intro-relatedWork"/>.
</p><div4 role="1.0" id="Name-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4><div4 role="1.0" id="Name-derived-types"><head>Derived datatypes</head><subtypes/></div4></div3><div3 role="1.0" id="NCName"><head>NCName</head><p>
<termdef id="dt-NCName" term="NCName" role="local">
<term>NCName</term> represents XML
"non-colonized" Names.  The <termref def="dt-value-space"/> of
<term>NCName</term> is the set of all strings which <termref def="dt-match"/>
the <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#NT-NCName">NCName</xnt> production of
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XMLNS" dg="b1838refs"/>.  The <termref def="dt-lexical-space"/> of
<term>NCName</term> is the set of all strings which <termref def="dt-match"/>
the <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#NT-NCName">NCName</xnt> production of
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XMLNS" dg="b1838refs"/>.  The <termref def="dt-basetype"/> of
<term>NCName</term> is <baseref/>.
</termdef>
</p><p dg="b1838">It is <termref def="key-impl-def"/> whether an
implementation of this specification supports the <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#NT-NCName">NCName</xnt> production from 
<bibref ref="XMLNS"/>, or that from 
<bibref ref="XMLNS1.0"/>, or both.  See 
<specref ref="intro-relatedWork"/>.
</p><div4 role="1.0" id="NCName-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4><div4 role="1.0" id="NCName-derived-types"><head>Derived datatypes</head><subtypes/></div4></div3><div3 role="1.0" id="ID"><head>ID</head><p><termdef id="dt-ID" term="ID" role="local"><term>ID</term>
represents the
<xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-TokenizedType">ID attribute type</xnt> from
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>.  The <termref def="dt-value-space"/> of
<term>ID</term> is the set of all strings that <termref def="dt-match"/>
the <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#NT-NCName">NCName</xnt> production in
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XMLNS" dg="b1838refs"/>.  The
<termref def="dt-lexical-space"/> of <term>ID</term> is the set of all
strings that <termref def="dt-match"/> the
<xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#NT-NCName">NCName</xnt> production in
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XMLNS" dg="b1838refs"/>.
The <termref def="dt-basetype"/> of <term>ID</term> is <baseref/>.
</termdef></p><note dg="b1838"><p>It is <termref def="key-impl-def"/> whether an
implementation of this specification supports 
the <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#NT-NCName">NCName</xnt> production from 
<bibref ref="XMLNS"/>, or that from 
<bibref ref="XMLNS1.0"/>, or both.  See 
<specref ref="intro-relatedWork"/>.</p></note><!--*
* material suppressed here by diff group dp081112 *
*--><p>For compatibility (see <specref ref="terminology"/>),
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="ID"/></phrase>
should be used only on attributes.</p><note dg="rec12-main"><!--* <p diff="add" dg="rec12-tt">[RQ-141b]</p> *--><p>Uniqueness of items validated as <dtref ref="ID"/> is not
part of this datatype as defined here.  
When this specification is used in conjunction with
<bibref ref="structural-schemas"/>, uniqueness is enforced at a
different level, not as part of datatype validity;
see <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#cvc-id">Validation Rule: Validation Root Valid (ID/IDREF)</xspecref> 
in <bibref ref="structural-schemas"/>.</p></note><div4 role="1.0" id="ID-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4></div3><div3 role="1.0" id="IDREF"><head>IDREF</head><p>
<termdef id="dt-IDREF" term="IDREF" role="local">
<term>IDREF</term> represents the
<xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-TokenizedType">IDREF attribute type</xnt> from
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>.  The <termref def="dt-value-space"/> of
<term>IDREF</term> is the set of all strings that <termref def="dt-match"/>
the <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#NT-NCName">NCName</xnt> production in
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XMLNS" dg="b1838refs"/>.  The
<termref def="dt-lexical-space"/> of <term>IDREF</term> is the set of
strings that <termref def="dt-match"/> the
<xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#NT-NCName">NCName</xnt> production in
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XMLNS" dg="b1838refs"/>.
The <termref def="dt-basetype"/> of <term>IDREF</term> is <baseref/>.
</termdef>
</p><note><p dg="b1838">It is <termref def="key-impl-def"/> whether an
implementation of this specification supports 
the <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#NT-NCName">NCName</xnt> production from 
<bibref ref="XMLNS"/>, or that from 
<bibref ref="XMLNS1.0"/>, or both.  See 
<specref ref="intro-relatedWork"/>.
</p></note><p>
For compatibility (see <specref ref="terminology"/>) this datatype
should be used only on attributes.
</p><note dg="rec12-main"><!--* <p diff="add" dg="rec12-tt">[RQ-141b]</p> *--><p>Existence of referents for items validated as 
<dtref ref="IDREF"/> is not part of this
datatype as defined here.
When this specification is used in conjunction with
<bibref ref="structural-schemas"/>, referential integrity is enforced at a
different level, not as part of datatype validity;
see <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#cvc-id">Validation Rule: Validation
Root Valid (ID/IDREF)</xspecref> in <bibref ref="structural-schemas"/>.</p></note><div4 role="1.0" id="IDREF-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4><div4 role="1.0" id="IDREF-derived-types"><head><!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">Related</phrase> datatypes</head><subtypes/></div4></div3><div3 role="1.0" id="IDREFS"><head>IDREFS</head><p><termdef id="dt-IDREFS" term="IDREFS" role="local">
<term>IDREFS</term> represents the
<xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-TokenizedType">IDREFS attribute type</xnt> from
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>.  The <termref def="dt-value-space"/> of
<term>IDREFS</term> is the set of finite, non-zero-length sequences of
<dtref ref="IDREF"/>s.
The <termref def="dt-lexical-space"/> of <term>IDREFS</term> is the
set of space-separated lists of tokens, of which each token is in the
<termref def="dt-lexical-space"/> of <dtref ref="IDREF"/>. 
The <termref def="dt-itemType"/> of <term>IDREFS</term> 
is <!--*
* material suppressed here by diff group crhax *
*--><phrase dg="crhax"><dtref ref="IDREF"/></phrase>.
<phrase dg="b10374"><dtref ref="IDREFS"/> is derived
from <termref def="dt-anySimpleType"><phrase><code>anySimpleType</code></phrase></termref> in two steps:  an anonymous list type
is defined, whose <termref def="dt-itemType"/> is <dtref ref="IDREF"/>; this is
the <termref def="dt-basetype"/> of <dtref ref="IDREFS"/>, which restricts
its value space to lists with at least one item.</phrase>
</termdef></p><!--*
* material suppressed here by diff group dp081112 *
*--><p>For compatibility (see <specref ref="terminology"/>)
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="IDREFS"/></phrase>
should be used only on attributes.</p><note dg="rec12-main"><!--* <p diff="add" dg="rec12-tt">[RQ-141b]</p> *--><p>Existence of referents for items validated as 
<dtref ref="IDREFS"/> is not
part of this datatype as defined here.  
When this specification is used in conjunction with
<bibref ref="structural-schemas"/>, referential integrity is enforced at a
different level, not as part of datatype validity;
see <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#cvc-id">Validation Rule: 
Validation Root Valid (ID/IDREF)</xspecref> in <bibref ref="structural-schemas"/>.</p></note><div4 role="1.0" id="IDREFS-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4></div3><div3 role="1.0" id="ENTITY"><head>ENTITY</head><p>
<termdef id="dt-ENTITY" term="ENTITY" role="local">
<term>ENTITY</term> represents the
<xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-TokenizedType">ENTITY</xnt> attribute type from
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>.  The <termref def="dt-value-space"/> of
<term>ENTITY</term> is the set of all strings that <termref def="dt-match"/>
the <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#NT-NCName">NCName</xnt> production in
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XMLNS" dg="b1838refs"/> and have been declared as an
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#dt-unparsed">unparsed entity</xspecref> in
a <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#dt-doctype">document type definition</xspecref>.
The <termref def="dt-lexical-space"/> of <term>ENTITY</term> is the set
of all strings that <termref def="dt-match"/> the
<xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#NT-NCName">NCName</xnt> production in
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XMLNS" dg="b1838refs"/>.
The <termref def="dt-basetype"/> of <term>ENTITY</term> is <baseref/>.
</termdef>
</p><note dg="b1838"><p>It is <termref def="key-impl-def"/> whether an
implementation of this specification supports 
the <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-names11/#NT-NCName">NCName</xnt> production from 
<bibref ref="XMLNS"/>, or that from 
<bibref ref="XMLNS1.0"/>, or both.  See 
<specref ref="intro-relatedWork"/>.
</p></note><!--*
* material suppressed here by diff group dp081112 *
*--><note><p>The <termref def="dt-value-space"/> of
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="ENTITY"/></phrase>
is scoped to a specific instance document.</p></note><p>For compatibility (see <specref ref="terminology"/>)
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="ENTITY"/></phrase>
should be used only on attributes.</p><div4 role="1.0" id="ENTITY-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4><div4 role="1.0" id="ENTITY-derived-types"><head><!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">Related</phrase> datatypes</head><subtypes/></div4></div3><div3 role="1.0" id="ENTITIES"><head>ENTITIES</head><p><termdef id="dt-ENTITIES" term="ENTITIES" role="local"><term>ENTITIES</term>
represents the <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-TokenizedType">ENTITIES attribute
type</xnt> from <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>.  The <termref def="dt-value-space"/>
of <term>ENTITIES</term> is the set of finite, non-zero-length sequences of
<!-- bug 10277 fix:  'values' quietlys changed to 'value' below.  DP, 100801 -->
<termref def="dt-ENTITY"/><phrase dg="crhax"> value</phrase>s that have been declared as
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#dt-unparsed">unparsed entities</xspecref>
in a <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#dt-doctype">document type definition</xspecref>. 
The <termref def="dt-lexical-space"/> of <term>ENTITIES</term> is the
set of space-separated lists of tokens, of which each token is in the
<termref def="dt-lexical-space"/> of <dtref ref="ENTITY"/>. 
The <termref def="dt-itemType"/> of <term>ENTITIES</term> is
<!--*
* material suppressed here by diff group crhax *
*--><phrase dg="crhax"><dtref ref="ENTITY"/></phrase>.
<phrase dg="b10374"><dtref ref="ENTITIES"/> is derived
from <termref def="dt-anySimpleType"><phrase><code>anySimpleType</code></phrase></termref> in two steps:  an anonymous list type
is defined, whose <termref def="dt-itemType"/> is <dtref ref="ENTITY"/>; this is
the <termref def="dt-basetype"/> of <dtref ref="ENTITIES"/>, which restricts
its value space to lists with at least one item.</phrase>
</termdef>
</p><!--*
* material suppressed here by diff group dp081112 *
*--><note><p>The <termref def="dt-value-space"/> of
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="ENTITIES"/></phrase>
is scoped to a specific instance document.</p></note><p>For compatibility (see <specref ref="terminology"/>)
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="ENTITIES"/></phrase>
should be used only on attributes.</p><div4 role="1.0" id="ENTITIES-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4></div3><div3 role="1.0" id="integer"><head>integer</head><p><termdef id="dt-integer-datatype" term="integer" role="local">
<term>integer</term> is
<termref def="dt-derived"/> from <dtref ref="decimal"/> by fixing the
value of <termref def="dt-fractionDigits"/> to be 0 and
disallowing the trailing decimal point. 
This results in the standard
mathematical concept of the integer numbers.  The
<termref def="dt-value-space"/> of <term>integer</term> is the infinite
set {...,-2,-1,0,1,2,...}.  The <termref def="dt-basetype"/> of
<term>integer</term> is <baseref/>.</termdef></p><!--*
* material suppressed here by diff group dp081112 *
*--><div4 role="1.0" id="integer-lexical-representation"><head>Lexical representation</head><p><!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="integer"/></phrase>
has a lexical representation consisting of a finite-length sequence
of <phrase dg="b5625">one or more</phrase> 
decimal digits (#x30-#x39) with an optional leading sign.  If the sign is omitted,
"+" is assumed.  For example: -1, 0, 12678967543233, +100000.
</p></div4><div4 role="1.0" id="integer-canonical-repr"><head>Canonical representation</head><p>The <termref def="dt-canonical-representation"/> for
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="integer"/></phrase>
is defined by prohibiting certain options from the
<specref ref="integer-lexical-representation"/>. 
Specifically, the preceding optional "+" sign is prohibited
and leading zeroes are prohibited.</p></div4><div4 role="1.0" id="integer-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*--><phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4><div4 role="1.0" id="integer-derived-types"><head>Derived datatypes</head><subtypes/></div4></div3><div3 role="1.0" id="nonPositiveInteger"><head>nonPositiveInteger</head><p><termdef id="dt-nonPositiveInteger" term="nonPositiveInteger" role="local">
<term>nonPositiveInteger</term> is <termref def="dt-derived"/> from
<dtref ref="integer"/> by setting the value of
<termref def="dt-maxInclusive"/> to be 0.  This results in the
standard mathematical concept of the non-positive integers.
The <termref def="dt-value-space"/> of <term>nonPositiveInteger</term>
is the infinite set {...,-2,-1,0}.  The <termref def="dt-basetype"/>
of <term>nonPositiveInteger</term> is <baseref/>.</termdef></p><div4 role="1.0" id="nonPositiveInteger-lexical-representation"><head>Lexical representation</head><p><!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="nonPositiveInteger"/></phrase>
has a lexical representation consisting of
an optional preceding sign
followed by a <phrase dg="b5625">non-empty</phrase>
finite-length sequence of decimal digits (#x30-#x39). 
The sign may be "+" or may be omitted only for
lexical forms denoting zero; in all other lexical forms, the negative
sign (<string>-</string>) <phrase diff="del" dg="ep35">must</phrase><phrase diff="add" dg="ep35"><rfc2119>must</rfc2119></phrase> be present. 
For example: -1, 0, -12678967543233, -100000.</p></div4><div4 role="1.0" id="nonPositiveInteger-canonical-repr"><head>Canonical representation</head><p>The <termref def="dt-canonical-representation"/> for
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="nonPositiveInteger"/></phrase>
is defined by prohibiting certain options from the
<specref ref="nonPositiveInteger-lexical-representation"/>. 
In the canonical form for zero, the sign 
<phrase diff="del" dg="ep35">must</phrase><phrase diff="add" dg="ep35"><rfc2119>must</rfc2119></phrase>
be
omitted.  Leading zeroes are prohibited.</p></div4><div4 role="1.0" id="nonPositiveInteger-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4><div4 role="1.0" id="nonPositiveInteger-derived-types"><head>Derived datatypes</head><subtypes/></div4></div3><div3 role="1.0" id="negativeInteger"><head>negativeInteger</head><p><termdef id="dt-negativeInteger" term="negativeInteger" role="local">
<term>negativeInteger</term> is <termref def="dt-derived"/> from
<dtref ref="nonPositiveInteger"/> by setting the value of
<termref def="dt-maxInclusive"/> to be -1.  This results in the
standard mathematical concept of the negative integers.  The
<termref def="dt-value-space"/> of <term>negativeInteger</term>
is the infinite set {...,-2,-1}.  The <termref def="dt-basetype"/>
of <term>negativeInteger</term>  is <baseref/>.
</termdef></p><div4 role="1.0" id="negativeInteger-lexical-representation"><head>Lexical representation</head><p><!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="negativeInteger"/></phrase>
has a lexical representation consisting
of a negative sign (<string>-</string>) followed by a <phrase dg="b5625">non-empty</phrase> finite-length sequence of
decimal digits (#x30-#x39)<phrase dg="b6707">,
at least one of which <rfc2119>must</rfc2119> be a digit other than <string>0</string></phrase>.  
For example: -1, -12678967543233,
-100000.</p></div4><div4 role="1.0" id="negativeInteger-canonical-repr"><head>Canonical representation</head><p>The <termref def="dt-canonical-representation"/> for
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="negativeInteger"/></phrase>
is defined by prohibiting certain options from the
<specref ref="negativeInteger-lexical-representation"/>. 
Specifically,  leading zeroes are prohibited.</p></div4><div4 role="1.0" id="negativeInteger-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4></div3><div3 role="1.0" id="long"><head>long</head><p><termdef id="dt-long" term="long" role="local">
<term>long</term>
is <termref def="dt-derived"/> from <dtref ref="integer"/> by setting the
value of <termref def="dt-maxInclusive"/> to be 9223372036854775807
and <termref def="dt-minInclusive"/> to be -9223372036854775808.
The <termref def="dt-basetype"/> of <term>long</term> is
<baseref/>.
</termdef>
</p><div4 role="1.0" id="long-lexical-representation"><head>Lexical Representation</head><p><!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="long"/></phrase>
has a lexical representation consisting
of an optional sign followed by a <phrase dg="b5625">non-empty</phrase> finite-length
sequence of decimal digits (#x30-#x39).  If
the sign is omitted, "+" is assumed. 
For example: -1, 0,
12678967543233, +100000.</p></div4><div4 role="1.0" id="long-canonical-repr"><head>Canonical Representation</head><p>The <termref def="dt-canonical-representation"/> for
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="long"/></phrase>
is defined by prohibiting certain options from the
<specref ref="long-lexical-representation"/>.  Specifically, the
the optional "+" sign is prohibited and leading zeroes are prohibited.</p></div4><div4 role="1.0" id="long-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4><div4 role="1.0" id="long-derived-types"><head>Derived datatypes</head><subtypes/></div4></div3><div3 role="1.0" id="int"><head>int</head><p><termdef id="dt-int" term="int" role="local">
<term>int</term>
is <termref def="dt-derived"/> from <dtref ref="long"/> by setting the
value of <termref def="dt-maxInclusive"/> to be 2147483647 and
<termref def="dt-minInclusive"/> to be -2147483648.  The
<termref def="dt-basetype"/> of <term>int</term> is <baseref/>.</termdef></p><div4 role="1.0" id="int-lexical-representation"><head>Lexical Representation</head><p><!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="int"/></phrase>
has a lexical representation consisting
of an optional sign followed by a <phrase dg="b5625">non-empty</phrase> finite-length
sequence of decimal digits (#x30-#x39).  If the sign is omitted, "+" is assumed.
For example: -1, 0, 126789675, +100000.</p></div4><div4 role="1.0" id="int-canonical-repr"><head>Canonical representation</head><p>The <termref def="dt-canonical-representation"/> for
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="int"/></phrase>
is defined by prohibiting certain options from the
<specref ref="int-lexical-representation"/>.  Specifically, the
the optional "+" sign is prohibited and leading zeroes are prohibited.
</p></div4><div4 role="1.0" id="int-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4><div4 role="1.0" id="int-derived-types"><head>Derived datatypes</head><subtypes/></div4></div3><div3 role="1.0" id="short"><head>short</head><p><termdef id="dt-short" term="short" role="local">
<term>short</term> is
<termref def="dt-derived"/> from <dtref ref="int"/> by setting the
value of <termref def="dt-maxInclusive"/> to be 32767 and
<termref def="dt-minInclusive"/> to be -32768.  The
<termref def="dt-basetype"/> of <term>short</term> is
<baseref/>.</termdef></p><div4 role="1.0" id="short-lexical-representation"><head>Lexical representation</head><p><!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="short"/></phrase>
has a lexical representation consisting
of an optional sign followed by a <phrase dg="b5625">non-empty</phrase> finite-length sequence of decimal
digits (#x30-#x39).  If the sign is omitted, "+" is assumed.
For example: -1, 0, 12678, +10000.</p></div4><div4 role="1.0" id="short-canonical-repr"><head>Canonical representation</head><p>The <termref def="dt-canonical-representation"/> for
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="short"/></phrase>
is defined by prohibiting certain options from the
<specref ref="short-lexical-representation"/>.  Specifically, the
the optional "+" sign is prohibited and leading zeroes are prohibited.</p></div4><div4 role="1.0" id="short-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4><div4 role="1.0" id="short-derived-types"><head>Derived datatypes</head><subtypes/></div4></div3><div3 role="1.0" id="byte"><head>byte</head><p><termdef id="dt-byte" term="byte" role="local">
<term>byte</term>
is <termref def="dt-derived"/> from <dtref ref="short"/>
by setting the value of <termref def="dt-maxInclusive"/> to be 127
and <termref def="dt-minInclusive"/> to be -128.
The <termref def="dt-basetype"/> of <term>byte</term> is
<baseref/>.</termdef></p><div4 role="1.0" id="byte-lexical-representation"><head>Lexical representation</head><p><!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="byte"/></phrase>
has a lexical representation consisting
of an optional sign followed by a <phrase dg="b5625">non-empty</phrase> finite-length
sequence of decimal digits (#x30-#x39).  If the sign is omitted, "+" is assumed.
For example: -1, 0, 126, +100.</p></div4><div4 role="1.0" id="byte-canonical-repr"><head>Canonical representation</head><p>The <termref def="dt-canonical-representation"/> for
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="byte"/></phrase>
is defined by prohibiting certain options from the
<specref ref="byte-lexical-representation"/>.  Specifically, the
the optional "+" sign is prohibited and leading zeroes are prohibited.</p></div4><div4 role="1.0" id="byte-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4></div3><div3 role="1.0" id="nonNegativeInteger"><head>nonNegativeInteger</head><p><termdef id="dt-nonNegativeInteger" term="nonNegativeInteger" role="local">
<term>nonNegativeInteger</term> is <termref def="dt-derived"/> from
<dtref ref="integer"/> by setting the value of
<termref def="dt-minInclusive"/> to be 0.  This results in the
standard mathematical concept of the non-negative integers. The
<termref def="dt-value-space"/> of <term>nonNegativeInteger</term>
is the infinite set {0,1,2,...}.  The <termref def="dt-basetype"/> of
<term>nonNegativeInteger</term> is <baseref/>.</termdef></p><div4 role="1.0" id="nonNegativeInteger-lexical-representation"><head>Lexical representation</head><p><!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="nonNegativeInteger"/></phrase>
has a lexical representation consisting of
an optional sign followed by a <phrase dg="b5625">non-empty</phrase> finite-length
sequence of decimal digits (#x30-#x39).  If the sign is omitted,
the positive sign (<string>+</string>) is assumed.
If the sign is present, it <phrase diff="del" dg="ep35">must</phrase><phrase diff="add" dg="ep35"><rfc2119>must</rfc2119></phrase> be "+" except for lexical forms
denoting zero, which may be preceded by a positive (<string>+</string>) or a negative (<string>-</string>) sign.
For example:
1, 0, 12678967543233, +100000.
</p></div4><div4 role="1.0" id="nonNegativeInteger-canonical-repr"><head>Canonical representation</head><p>The <termref def="dt-canonical-representation"/> for
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="nonNegativeInteger"/></phrase>
is defined by prohibiting certain options from the
<specref ref="nonNegativeInteger-lexical-representation"/>.  Specifically, the
the optional "+" sign is prohibited and leading zeroes are prohibited.</p></div4><div4 role="1.0" id="nonNegativeInteger-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4><div4 role="1.0" id="nonNegativeInteger-derived-types"><head>Derived datatypes</head><subtypes/></div4></div3><div3 role="1.0" id="unsignedLong"><head>unsignedLong</head><p>
<termdef id="dt-unsignedLong" term="unsignedLong" role="local">
<term>unsignedLong</term> is <termref def="dt-derived"/> from
<dtref ref="nonNegativeInteger"/> by setting the value of
<termref def="dt-maxInclusive"/> to be 18446744073709551615. 
The <termref def="dt-basetype"/> of <term>unsignedLong</term> is
<baseref/>.
</termdef>
</p><div4 role="1.0" id="unsignedLong-lexical-representation"><head>Lexical representation</head><p><!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="unsignedLong"/></phrase>
has a lexical representation consisting of
<phrase dg="b1834">an optional sign followed by</phrase> a
<phrase dg="b5625">non-empty</phrase>
finite-length sequence of decimal digits (#x30-#x39). 
<phrase dg="b1834">If the sign is omitted, the positive sign
(<string>+</string>) is assumed.  If the sign is present, it 
<phrase diff="del" dg="ep35">must</phrase><phrase diff="add" dg="ep35"><rfc2119>must</rfc2119></phrase>
be
<string>+</string> except for lexical forms denoting zero, which may
be preceded by a positive (<string>+</string>) or a negative
(<string>-</string>) sign.</phrase> For example: 0, 12678967543233,
100000.</p></div4><div4 role="1.0" id="unsignedLong-canonical-repr"><head>Canonical representation</head><p>The <termref def="dt-canonical-representation"/> for
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="unsignedLong"/></phrase>
is defined by prohibiting certain options from the
<specref ref="unsignedLong-lexical-representation"/>.  Specifically,
leading zeroes are prohibited.</p></div4><div4 id="unsignedLong-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4><div4 id="unsignedLong-derived-types"><head>Derived datatypes</head><subtypes/></div4></div3><div3 role="1.0" id="unsignedInt"><head>unsignedInt</head><p><termdef id="dt-unsignedInt" term="unsignedInt" role="local">
<term>unsignedInt</term> is <termref def="dt-derived"/> from
<dtref ref="unsignedLong"/> by setting the value of
<termref def="dt-maxInclusive"/> to be 4294967295.  The
<termref def="dt-basetype"/> of <term>unsignedInt</term> is
<baseref/>.
</termdef>
</p><div4 role="1.0" id="unsignedInt-lexical-representation"><head>Lexical representation</head><p><!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="unsignedInt"/></phrase>
has a lexical representation consisting
of <phrase dg="b1834">an optional sign followed by</phrase> a
<phrase dg="b5625">non-empty</phrase>
finite-length sequence of decimal digits (#x30-#x39). 
<phrase dg="b1834">If the sign is omitted, the positive sign
(<string>+</string>) is assumed.  If the sign is present, it 
<phrase diff="del" dg="ep35">must</phrase><phrase diff="add" dg="ep35"><rfc2119>must</rfc2119></phrase>
be
<string>+</string> except for lexical forms denoting zero, which may
be preceded by a positive (<string>+</string>) or a negative
(<string>-</string>) sign.</phrase>  For example: 0,
1267896754, 100000.</p></div4><div4 role="1.0" id="unsignedInt-canonical-repr"><head>Canonical representation</head><p>The <termref def="dt-canonical-representation"/> for
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="unsignedInt"/></phrase>
is defined by prohibiting certain options from the
<specref ref="unsignedInt-lexical-representation"/>.  Specifically,
leading zeroes are prohibited.
</p></div4><div4 role="1.0" id="unsignedInt-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4><div4 role="1.0" id="unsignedInt-derived-types"><head>Derived datatypes</head><subtypes/></div4></div3><div3 role="1.0" id="unsignedShort"><head>unsignedShort</head><p><termdef id="dt-unsignedShort" term="unsignedShort" role="local">
<term>unsignedShort</term> is <termref def="dt-derived"/> from
<dtref ref="unsignedInt"/> by setting the value of
<termref def="dt-maxInclusive"/> to be 65535.  The
<termref def="dt-basetype"/> of <term>unsignedShort</term> is
<baseref/>.</termdef></p><div4 role="1.0" id="unsignedShort-lexical-representation"><head>Lexical representation</head><p><!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="unsignedShort"/></phrase>
has a lexical representation consisting of
<phrase dg="b1834">an optional sign followed by</phrase> a
<phrase dg="b5625">non-empty</phrase> finite-length
sequence of decimal digits (#x30-#x39). <phrase dg="b1834">If the sign is omitted, the positive sign
(<string>+</string>) is assumed.  If the sign is present, it 
<phrase diff="del" dg="ep35">must</phrase><phrase diff="add" dg="ep35"><rfc2119>must</rfc2119></phrase>
be
<string>+</string> except for lexical forms denoting zero, which may
be preceded by a positive (<string>+</string>) or a negative
(<string>-</string>) sign.</phrase>  For example: 0, 12678, 10000.</p></div4><div4 role="1.0" id="unsignedShort-canonical-repr"><head>Canonical representation</head><p>The <termref def="dt-canonical-representation"/> for
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="unsignedShort"/></phrase>
is defined by prohibiting certain options from the
<specref ref="unsignedShort-lexical-representation"/>. 
Specifically, the leading zeroes are prohibited.</p></div4><div4 id="unsignedShort-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4><div4 id="unsignedShort-derived-types"><head>Derived datatypes</head><subtypes/></div4></div3><div3 role="1.0" id="unsignedByte"><head>unsignedByte</head><p><termdef id="dt-unsignedByte" term="unsignedByte" role="local">
<term>unsignedByte</term> is <termref def="dt-derived"/> from
<dtref ref="unsignedShort"/> by setting the value of
<termref def="dt-maxInclusive"/> to be 255.  The
<termref def="dt-basetype"/> of <term>unsignedByte</term> is
<baseref/>.</termdef></p><div4 role="1.0" id="unsignedByte-lexical-representation"><head>Lexical representation</head><p><!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="unsignedByte"/></phrase>
has a lexical representation consisting of
<phrase dg="b1834">an optional sign followed by</phrase> a
<phrase dg="b5625">non-empty</phrase> finite-length
sequence of decimal digits (#x30-#x39). <phrase dg="b1834">If the sign is omitted, the positive sign
(<string>+</string>) is assumed.  If the sign is present, it 
<phrase diff="del" dg="ep35">must</phrase><phrase diff="add" dg="ep35"><rfc2119>must</rfc2119></phrase>
be <string>+</string> except for lexical forms denoting zero, which may
be preceded by a positive (<string>+</string>) or a negative
(<string>-</string>) sign.</phrase>  For example: 0, 126, 100.</p></div4><div4 role="1.0" id="unsignedByte-canonical-repr"><head>Canonical representation</head><p>
The <termref def="dt-canonical-representation"/> for
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="unsignedByte"/></phrase>
is defined by prohibiting certain options from the
<specref ref="unsignedByte-lexical-representation"/>.  Specifically,
leading zeroes are prohibited.</p></div4><div4 role="1.0" id="unisngedByte-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4></div3><div3 role="1.0" id="positiveInteger"><head>positiveInteger</head><p><termdef id="dt-positiveInteger" term="positiveInteger" role="local">
<term>positiveInteger</term> is <termref def="dt-derived"/> from
<dtref ref="nonNegativeInteger"/> by setting the value of
<termref def="dt-minInclusive"/> to be 1.  This results in the standard
mathematical concept of the positive integer numbers. 
The <termref def="dt-value-space"/> of <term>positiveInteger</term>
is the infinite set {1,2,...}.  The <termref def="dt-basetype"/> of
<term>positiveInteger</term> is <baseref/>.</termdef></p><div4 role="1.0" id="positiveInteger-lexical-representation"><head>Lexical representation</head><p><!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="positiveInteger"/></phrase>
has a lexical representation consisting
of an optional positive sign (<string>+</string>) followed by a 
<phrase dg="b5625">non-empty</phrase> finite-length
sequence of decimal digits (#x30-#x39)<phrase dg="b6707">,
at least one of which <rfc2119>must</rfc2119> be a digit other than <string>0</string></phrase>. 
For example: 1, 12678967543233, +100000.</p></div4><div4 role="1.0" id="positiveInteger-canonical-repr"><head>Canonical representation</head><p>
The <termref def="dt-canonical-representation"/> for
<!--*
* material suppressed here by diff group b4350 *
*--><phrase dg="b4350"><dtref ref="positiveInteger"/></phrase>
is defined by prohibiting certain options from the
<specref ref="positiveInteger-lexical-representation"/>.  Specifically, the
optional "+" sign is prohibited and leading zeroes are prohibited.
</p></div4><div4 id="positiveInteger-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/></div4></div3><div3 id="yearMonthDuration" dg="fpwd"><head>yearMonthDuration</head><p><termdef id="dt-yearMonthDuration" term="yearMonthDuration" role="local">
<term>yearMonthDuration</term> is a datatype <termref def="dt-derived"/> from
<dtref ref="duration"/> by restricting its <termref def="dt-lexical-representation">lexical representations</termref> to instances of
<nt def="nt-yearMonthDurationRep"/>.</termdef>  The <termref def="dt-value-space"/> of
<term>yearMonthDuration</term> is therefore that of <dtref ref="duration"/>
restricted to those whose <vpropref ref="vp-du-second"/>
property is 0.  This results in a duration datatype which is totally ordered.</p><note><p>The always-zero <vpropref ref="vp-du-second"/> is formally retained in order that
<dtref ref="yearMonthDuration"/>'s (abstract) value space truly be a subset of that of
<dtref ref="duration"/>  An obvious implementation optimization is to ignore the zero and implement
<dtref ref="yearMonthDuration"/> values simply as <dtref ref="integer"/> values.</p></note><div4 id="yearMonthDuration-lexical-mapping"><head>The <dtref ref="yearMonthDuration"/> Lexical Mapping</head><p>The lexical space is reduced from that of <dtref ref="duration"/> by
disallowing <nt def="nt-duDaFrag"/> and <nt def="nt-duTFrag"/>
fragments in the <termref def="dt-lexical-representation">lexical representations</termref>. 
<!--*
* material suppressed here by diff group du1 *
*-->

<defset><head>The <dtref ref="yearMonthDuration"/> Lexical
Representation</head><prodgroup><prod id="nt-yearMonthDurationRep"><lhs>yearMonthDurationLexicalRep</lhs><rhs><string>-</string>? <string>P</string> <nt def="nt-duYMFrag"/></rhs></prod></prodgroup></defset></p><p><!--*
* material suppressed here by diff group rq20 *
*--><phrase dg="rq20">The lexical 
space of <dtref ref="yearMonthDuration"/> consists of
strings which match the regular expression
<string>-?P((([0-9]+Y)([0-9]+M)?)|([0-9]+M))</string> or the
expression <string>-?P[0-9]+(Y([0-9]+M)?|M)</string>, but the
formal definition of <dtref ref="yearMonthDuration"/> uses a
simpler regular expression in its <phrase dg="ed-pattern"><termref def="dt-pattern"/></phrase><!--*
* material suppressed here by diff group ed-pattern *
*-->
facet: <string>[^DT]*</string>.  This pattern matches only 
strings of characters which contain no <mention>D</mention>
and no <mention>T</mention>, thus restricting the <termref def="dt-lexical-space"/>
of <dtref ref="duration"/> to strings with no day, hour,
minute, or seconds fields.</phrase>

<!--*
* material suppressed here by diff group du1 *
*-->
</p><!--* <p diff="add" dg="rec12-tt">[RQ-141b]</p> *--><!--*
* material suppressed here by diff group du2 *
*--><p>The <termref def="dt-canonical-mapping"/> is that of <dtref ref="duration"/> restricted in its 
range to the <termref def="dt-lexical-space"/> (which reduces its domain to omit any 
values not in the <dtref ref="yearMonthDuration"/> value space).

<!--*
* material suppressed here by diff group du1 *
*-->
</p><note><p>The <dtref ref="yearMonthDuration"/> value whose <vpropref ref="vp-du-month"/> and
  <vpropref ref="vp-du-second"/>
are both zero has no <termref def="dt-canonical-representation"/> in this datatype since its
<termref def="dt-canonical-representation"/> in <dtref ref="duration"/> (<string>PT0S</string>)
 is not in the 
<termref def="dt-lexical-space"/> of <dtref ref="yearMonthDuration"/>.</p></note></div4><div4 id="YearMonthDuration-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/><note dg="b3078"><p>The <compref ref="ff-o"/> facet has the value
<pt>partial</pt> even though the datatype is
in fact totally ordered, because (as explained in
<specref ref="rf-ordered"/><!--* 4.2.1 ordered *-->),
the value of that facet is unchanged by derivation.
</p></note></div4></div3><div3 id="dayTimeDuration" dg="fpwd"><head>dayTimeDuration</head><p>
<termdef id="dt-dayTimeDuration" term="dayTimeDuration" role="local">
<term>dayTimeDuration</term> is a datatype <termref def="dt-derived"/> from
<dtref ref="duration"/> by restricting its <termref def="dt-lexical-representation">lexical representations</termref> to instances of
<nt def="nt-dayTimeDurationRep"/>.</termdef>  The <termref def="dt-value-space"/> of 
<term>dayTimeDuration</term>
is therefore that of <dtref ref="duration"/> restricted to those whose <vpropref ref="vp-du-month"/>
property is 0.  This results in a duration datatype which is totally ordered.</p><div4 id="dayTimeDuration-lexical-mapping"><head>The <dtref ref="dayTimeDuration"/> Lexical Space</head><p>
The lexical space is reduced from that of <dtref ref="duration"/> by
disallowing <nt def="nt-duYrFrag"/> and <nt def="nt-duMoFrag"/>
fragments in the <termref def="dt-lexical-representation">lexical representations</termref>. 
<!--*
* material suppressed here by diff group du1 *
*-->
</p><p><defset><head>The <dtref ref="dayTimeDuration"/> Lexical Representation</head><prodgroup><prod id="nt-dayTimeDurationRep"><lhs>dayTimeDurationLexicalRep</lhs><rhs><string>-</string>? <string>P</string> <nt def="nt-duDTFrag"/></rhs></prod></prodgroup></defset></p><p><!--*
* material suppressed here by diff group rq20 *
*--><phrase dg="rq20">The lexical space of 
<dtref ref="dayTimeDuration"/> consists of
strings in the <termref def="dt-lexical-space"/> of <dtref ref="duration"/> which 
<!--* match the regular expression <string>[^YM]*(T.*)?</string>; *-->
match the regular expression <string>[^YM]*[DT].*</string>;
this pattern eliminates all durations with year or month fields,
leaving only those with day, hour, minutes, and/or seconds
fields.</phrase>

<!--*
* material suppressed here by diff group du1 *
*-->
</p><!--* <p diff="add" dg="rec12-tt">[RQ-141b]</p> *--><!--*
* material suppressed here by diff group du2 *
*--><p>
The <termref def="dt-canonical-mapping"/> is that of <dtref ref="duration"/> restricted 
<phrase dg="du2">in its 
range to the <termref def="dt-lexical-space"/> (which reduces its domain to omit any 
values not in</phrase><!--*
* material suppressed here by diff group du2 *
*--> 
the <!--*
* material suppressed here by diff group b3028 *
*--><phrase dg="b3028"><dtref ref="dayTimeDuration"/></phrase> value 
space<phrase dg="du2">)</phrase>.

<!--*
* material suppressed here by diff group du1 *
*--></p></div4><div4 id="dayTimeDuration-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/><note dg="b3078"><p>The <compref ref="ff-o"/> facet has the value
<pt>partial</pt> even though the datatype is
in fact totally ordered, because (as explained in
<specref ref="rf-ordered"/><!--* 4.2.1 ordered *-->),
the value of that facet is unchanged by derivation.
</p></note></div4></div3><!-- ****************************** END NEW 1.1 MATERIAL (duration derivatives) ********************************* --><div3 id="dateTimeStamp" dg="b6043"><head>dateTimeStamp</head><p>
<termdef id="dt-dateTimeStamp" term="dateTimeStamp" role="local"> 
The <term>dateTimeStamp</term> datatype is <termref def="dt-derived"/> from 
<dtref ref="dateTime"/> by giving the value <pt>required</pt> to its 
<compref ref="f-tz"/> facet.</termdef> The result is that all values of 
<dtref ref="dateTimeStamp"/> are required to have explicit time zone offsets
and the datatype is totally ordered.
</p><div4 id="dateTimeStamp-lexical-mapping"><head>The <dtref ref="dateTimeStamp"/> Lexical Space</head><p>As a consequence of requiring an explicit time zone offset, the
lexical space of <dtref ref="dateTimeStamp"/> is reduced from that
of <dtref ref="dateTime"/> by requiring a <nt def="nt-tzFrag"/>
fragment in the <termref def="dt-lexical-representation">lexical representations</termref>.</p><p><defset><head>The <dtref ref="dateTimeStamp"/> Lexical Representation</head><prodgroup><prod id="nt-dateTimeStampRep"><lhs>dateTimeStampLexicalRep</lhs><rhs><nt def="nt-yrFrag"/> <string>-</string> <nt def="nt-moFrag"/> <string>-</string> <nt def="nt-daFrag"/> <string>T</string> ((<nt def="nt-hrFrag"/> <string>:</string> <nt def="nt-miFrag"/> <string>:</string> <nt def="nt-seFrag"/>) |
<nt def="nt-eodFrag"/>) <nt def="nt-tzFrag"/></rhs><constraint def="con-dateTime-day"/></prod></prodgroup></defset></p><note><p>
For details of the <specref ref="con-dateTime-day"/> constraint, see
<dtref ref="dateTime"/>, from which the constraint is inherited.
</p></note><p>In other words, the lexical space of <dtref ref="dateTimeStamp"/> consists of strings which are in the
<termref def="dt-lexical-space"/> of <dtref ref="dateTime"/> and which
also match the regular expression
<string>.*(Z|(\+|-)[0-9][0-9]:[0-9][0-9])</string>.</p><p>The
<termref def="dt-lexical-mapping"/> is that of <dtref ref="dateTime"/> restricted to 
the <dtref ref="dateTimeStamp"/> lexical space.</p><p>The <termref def="dt-canonical-mapping"/> is that of <dtref ref="dateTime"/> restricted 
to the <dtref ref="dateTimeStamp"/> value 
space.</p></div4><div4 id="dateTimeStamp-facets"><head><!--*
* material suppressed here by diff group rec12-tableaux *
*-->
<phrase dg="rec12-tableaux">Facets</phrase></head><facets role="rec12-tableaux-post"/><note dg="b3078"><p>The <compref ref="ff-o"/> facet has the value
<pt>partial</pt> even though the datatype is
in fact totally ordered, because (as explained in
<specref ref="rf-ordered"/>),
the value of that facet is unchanged by derivation.
</p></note></div4></div3></div2></div1><div1 role="1.0" id="datatype-components"><!--* !!! n.B. newOrg assigns this the id components-datatypes.
    * For now I've left the ID unchanged.
    *--><head>Datatype components</head><!--* <p diff="add" dg="rec12-tt">[RQ-141b]</p> *--><p dg="rec12-main">The preceding sections of this
specification have described datatypes in a way largely 
independent of their use in the particular context of 
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-va">schema-aware processing</xtermref> as 
defined in <bibref ref="structural-schemas"/>.</p><p dg="rec12-main">
This section presents the mechanisms necessary to integrate datatypes into 
the context of <bibref ref="structural-schemas"/>, mostly in terms of
the <!--*
* material suppressed here by diff group wgi-20080613 *
*--><phrase dg="wgi-20080613"><xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#c">schema
component</xtermref></phrase>
abstraction introduced there.  The account of datatypes given in this
specification is also intended to be useful in other contexts.
Any specification or other formal system intending to use datatypes as
defined above, particularly if definition of new datatypes via
facet-based restriction is envisaged, will need to provide analogous
mechanisms for some, but not necessarily all, of what follows below.
For example, the <propref comp="std" prop="target namespace"/> and
<propref comp="std" prop="final"/> properties are required because of
particular aspects of <bibref ref="structural-schemas"/> which are not
in principle necessary for the use of datatypes as defined here.</p><p>The following sections provide full details on the properties and
significance of each kind of schema component involved in datatype
definitions. For each property, the kinds of values it is allowed to have is
specified.  Any property not identified as optional is required to
be present; optional properties which are not present have
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-null">absent</xspecref> as their value.
Any property identified as a having a set, subset or <termref def="dt-list"/>
value may have an empty value unless this is explicitly ruled out: this is
not the same as <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-null">absent</xspecref>.
Any property value identified as a superset or a subset of some set may
be equal to that set, unless a proper superset or subset is explicitly
called for.
</p><p>
For more information on the notion of <!--*
* material suppressed here by diff group rec12-main *
*-->schema<!--*
* material suppressed here by diff group rec12-main *
*--> components,
see <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#components">Schema Component Details</xspecref>
of <bibref ref="structural-schemas"/>.
</p><p><termdef term="owner" id="dt-owner" dg="pattern-1929">A
component may be referred to as the <term>owner</term> of its properties, and of the values of
those properties.</termdef></p><div2 role="1.0" id="rf-defn"><head>Simple Type Definition</head><p>
Simple Type Definitions provide for:
</p><!--*
* material suppressed here by diff group fa1.z *
*--><ulist dg="fa1.z"><item><p>In the case of 
<termref def="dt-primitive"/> datatypes, 
identifying a datatype with its definition in this specification.</p></item><item><p>In the case of <termref def="dt-constructed"/> datatypes, 
defining the datatype in terms of other datatypes.</p></item><item><p>Attaching a <dtref ref="QName"/> to the datatype.</p></item></ulist><div3 role="1.0" id="dc-defn"><head>The Simple Type Definition Schema Component</head><p>The Simple Type Definition schema component has the following properties:</p><!--*
* material suppressed here by diff group dp200701 *
*--><!-- the change is actually in the "real" <compdef> in compDefs.xml --><compdef name="Simple Type Definition" abbrev="std" showAKO="false"/><!--*
* material suppressed here by diff group ep01-p2.add.context-2337.del *
*--><!--* diff group changed from diff='del' dg='context-2337'.
    * context-2337 cannot delete something that has never been status-quo.
    * -MSM
    *--><!--* <p diff="add" dg="rec12-tt">[RQ-141b]</p> *--><p>
<!--*
* material suppressed here by diff group rec12-main *
*--><phrase dg="rec12-main">Simple type definitions</phrase> are
identified by their <propref comp="std" prop="name"/> and <propref comp="std" prop="target namespace"/>.  Except for
anonymous <!--*
* material suppressed here by diff group rec12-main *
*--><phrase dg="rec12-main"><compref ref="std"/>s</phrase> (those
with no
<propref comp="std" prop="name"/>), <!--*
* material suppressed here by diff group rec12-main *
*--><phrase dg="rec12-main"><compref ref="std"/>s</phrase> <!--*
* material suppressed here by diff group rec12-main *
*--><phrase dg="rec12-main"><rfc2119>must</rfc2119></phrase> be uniquely identified within a
schema.
<phrase dg="rec12-main">Within a valid schema, 
each <compref ref="std"/> uniquely determines
one datatype.  The <termref def="dt-value-space"/>, <termref def="dt-lexical-space"/>,
<termref def="dt-lexical-mapping"/>, etc., of a <compref ref="std"/>
are the <termref def="dt-value-space"/>, <termref def="dt-lexical-space"/>, etc., of the datatype
uniquely determined (or <unusual>defined</unusual>) 
by that <compref ref="std"/>.</phrase>
</p><p>
If <propref comp="std" prop="variety"/> is <termref def="dt-atomic"/>
then the <termref def="dt-value-space"/> of the datatype 
<!--* MSM notes that value space and lexical space are 
    * characteristic of datatypes; it was to be able to
    * talk about them extensionally (as here) that the 
    * current definition of 'datatype' was introduced.
    *
    * On the other hand, this graf would be much knarlier
    * if we forced ourselves not to say 'the value space of
    * the {base type definition}, insisting instead on
    * 'the value space of the datatype uniquely identified
    * by the {base type definition} in the context of a given
    * valid schema'.
    * To license the usage here, a paragraph was added to
    * section 2 after the definition of 'datatype.'
    *-->
defined will be a subset of the <termref def="dt-value-space"/> of
<propref comp="std" prop="base type definition"/> (which is a subset
of the <termref def="dt-value-space"/> of 
<propref comp="std" prop="primitive type definition"/>). If 
<propref comp="std" prop="variety"/> is <termref def="dt-list"/>
then the <termref def="dt-value-space"/> of the datatype 
defined will be the set of
<phrase dg="b5625">(possibly empty)</phrase>
finite-length sequence<phrase dg="rec12-map-eff">s</phrase> 
of values from the 
<termref def="dt-value-space"/> of <propref comp="std" prop="item type definition"/>. 
If <propref comp="std" prop="variety"/> is <termref def="dt-union"/>
then the <termref def="dt-value-space"/> of the datatype
defined will be<phrase dg="b2044"> a subset
(possibly an improper subset) of</phrase> 
the union of the <termref def="dt-value-space">value spaces</termref> 
of each 
<!--*
* material suppressed here by diff group rec12-main *
*--><phrase dg="rec12-main"><compref ref="std"/></phrase> 
in <propref comp="std" prop="member type definitions"/>.
</p><p>
If <propref comp="std" prop="variety"/> is <termref def="dt-atomic"/>
then the <propref comp="std" prop="variety"/> of <propref comp="std" prop="base type definition"/>
<phrase diff="del" dg="ep35">must</phrase><phrase diff="add" dg="ep35"><rfc2119>must</rfc2119></phrase>
be <termref def="dt-atomic"/><phrase dg="rec12-main">,
unless the <propref comp="std" prop="base type definition"/>
is <dtref ref="anySimpleType"/></phrase>.
If <propref comp="std" prop="variety"/> is <termref def="dt-list"/>
then the <propref comp="std" prop="variety"/> of <propref comp="std" prop="item type definition"/>
<phrase diff="del" dg="ep35">must</phrase><phrase diff="add" dg="ep35"><rfc2119>must</rfc2119></phrase>
be either <termref def="dt-atomic"/> or <termref def="dt-union"/><phrase dg="b2044">, and if <propref comp="std" prop="item type definition"/> is <termref def="dt-union"/>
then all its <termref def="dt-basicmember">basic members</termref>
<rfc2119>must</rfc2119> be <termref def="dt-atomic"/></phrase>.
If <propref comp="std" prop="variety"/> is <termref def="dt-union"/>
then
<propref comp="std" prop="member type definitions"/> 
<phrase diff="del" dg="ep35">must</phrase><phrase diff="add" dg="ep35"><rfc2119>must</rfc2119></phrase>
be a list of <!--*
* material suppressed here by diff group rec12-main *
*--><phrase dg="rec12-main"><compref ref="std"/>s</phrase>.</p><!--* <ednote diff="del" dg="dpno">
<edtext>The definition of &facets; causes
it to contain both <termref def="dt-fundamental-facet">fundamental
facets</termref> and <termref def="dt-constraining-facet">constraining
facets</termref>.&ensp; I doubt this was
intended.&emsp;&mdash;DP</edtext>
</ednote> *--><!--* <p diff="add" dg="rec12-tt">[RQ-141b]</p> *--><!--*
* material suppressed here by diff group rec12-main *
*--><!--*
* material suppressed here by diff group rec12-main *
*--><p dg="rec12-main">The <propref comp="std" prop="facets"/> property
determines the <termref def="dt-value-space"/> and <termref def="dt-lexical-space"/> of the datatype
being defined by imposing constraints which 
<phrase diff="del" dg="ep35">must be satisfied by</phrase>
<phrase diff="add" dg="ep35">are to be satisfied by all valid</phrase> 
values and
<termref def="dt-lexical-representation">lexical representations</termref>.
</p><p dg="rec12-main">
The <propref comp="std" prop="fundamental facets"/> property provides some
basic information about the datatype being defined: its cardinality,
whether an ordering is defined for it by this specification,
whether it has upper and lower bounds, and whether it is numeric.
</p><p>
If <propref comp="std" prop="final"/> is the empty set then the type can be used
in deriving other types; the explicit values <pt>restriction</pt>,
<pt>list</pt> and <pt>union</pt> prevent further derivations<phrase dg="rec12-main"> of <compref ref="std"/>s</phrase>
by <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-fb-restriction"/>, <termref def="dt-list"/> and
<termref def="dt-union"/> respectively<!--*
* material suppressed here by diff group rec12-main *
*--><phrase dg="rec12-main">; the explicit value <pt>extension</pt> prevents any derivation of <compref ref="ctd" name="Complex Type Definitions"/> by extension.</phrase>
<!--* Problem: ctd is not an ID in this document, so we can't use 
    * <compref ref="ctd"/>, which would be the normal thing :-( (HST)
    *--> 
</p><p dg="context-2337">The <propref comp="std" 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 comp="std" prop="item type definition"/> or <propref comp="std" prop="base type definition"/>.</p></div3><div3 role="1.0" id="xr-defn"><head>XML Representation of Simple Type Definition Schema Components</head><p>
The XML representation for a <compref ref="std"/> schema component
is a <eltref ref="simpleType"/> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><reprdef><reprelt eltname="simpleType" type="simpleType" dg="rec12-map"/><!--*
* material suppressed here by diff group rec12-map *
*--><reprelt eltname="restriction" dg="rec12-map"/><reprelt eltname="list" dg="rec12-map"/><reprelt eltname="union" dg="rec12-map"/><reprcomp abstract="Simple Type Definition" ref="dc-defn"><propmap comp="std" prop="name">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the 
<!--*
* material suppressed here by diff group rec12-map *
*--><phrase dg="rec12-map"><att>name</att></phrase> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if 
present<phrase dg="rec12-map"> on the <eltref ref="simpleType"/> element</phrase>,
otherwise <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-null"><!--*
* material suppressed here by diff group rec12-map *
*--><phrase dg="rec12-map">absent</phrase></xtermref>
</propmap><propmap comp="std" prop="target namespace">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the 
<!--*
* material suppressed here by diff group rec12-map *
*--><phrase dg="rec12-map"><att>targetNamespace</att></phrase> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>
of the parent <!--*
* material suppressed here by diff group rec12-map *
*--><phrase dg="rec12-map"><el>schema</el></phrase> element information 
item<phrase dg="rec12-map">, if present,
otherwise <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-null">absent</xtermref></phrase>.</propmap><propmap comp="std" prop="base type definition" dg="rec12-map">
<olist role="Caseval"><item><p role="if">the <eltref ref="restriction"/> alternative is chosen</p><p role="then">the type definition <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#src-resolve">resolved</xtermref> to by the
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>base</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of <eltref ref="restriction"/>, 
if present, otherwise the
type definition corresponding to the <eltref ref="simpleType"/> among
the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <eltref ref="restriction"/>.</p></item><item><p role="if">the <eltref ref="list"/> or <eltref ref="union"/> alternative is chosen</p><p role="then"><termref def="anySimpleType-def">anySimpleType</termref>.</p></item></olist>
</propmap><!--*
* material suppressed here by diff group rec12-map *
*--><propmap comp="std" prop="final" dg="rec12-map">
A subset of 
<code>{</code><pt>restriction</pt>, <pt>extension</pt>, <pt>list</pt>,
<pt>union</pt><code>}</code>, determined as follows.
<termdef role="local" term="FS" id="lt-vs">Let
<term>FS</term> be
the <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the
<att>final</att> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, 
if present, otherwise the <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the
<att>finalDefault</att> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of the ancestor
<el>schema</el> element, 
if present, otherwise the empty string.</termdef>  Then the property value is
<olist role="caseval"><item><p role="if"><termref def="lt-vs">FS</termref> is the empty string</p><p role="then">the empty set;</p></item><item><p role="if"><termref def="lt-vs">FS</termref> is <string>#all</string></p><p role="then"><code>{</code><pt>restriction</pt>, <pt>extension</pt>, <pt>list</pt>,
<pt>union</pt><code>}</code>;</p></item><item><p role="otherwise">Consider <termref def="lt-vs">FS</termref> as
a space-separated list, and include <pt>restriction</pt> if
<string>restriction</string> is in that list, and similarly for
<pt>extension</pt>, <pt>list</pt> and <pt>union</pt>.
</p><!-- HST doesn't think this is actually true <p>Although the <att>finalDefault</att> &i-attribute; of
       <el>schema</el> may include other values,
       those values
       &must; be ignored in the determination of <propref comp="std" prop="final"/>
       </p> --></item></olist>
</propmap><propmap comp="std" prop="context" dg="context-2337">
  <olist role="Caseval"><item><p role="if">the
<att>name</att> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is present</p><p role="then"><xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-null">absent</xtermref></p></item><item><p role="otherwise">
     <olist role="caseval"><item><p role="if">the parent element information item is <eltref ref="attribute"/></p><p role="then">the corresponding <compref name="Attribute Declaration" ref="ad"/></p></item><item><p role="if">the parent element information item is <eltref ref="element"/></p><p role="then">the corresponding <compref name="Element Declaration" ref="ed"/></p></item><item><p role="if">the parent element information item is <eltref ref="list"/> or <eltref ref="union"/></p><p role="then">the <compref name="Simple Type Definition" ref="std"/>
corresponding to the grandparent <eltref ref="simpleType"/> element information item</p></item><item><p role="otherwise">(the parent element information item is <eltref ref="restriction"/>), 
     <olist role="caseval"><item><p role="if">the grandparent element information item is <eltref ref="simpleType"/></p><p role="then">the <compref name="Simple Type Definition" ref="std"/>
corresponding to the grandparent</p></item><item><p role="otherwise">(the grandparent element information item is <eltref ref="simpleContent"/>), 
     the <compref name="Simple Type Definition" ref="std"/> which is the
<xpropref href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#ctd-content_type" role="comp">content type</xpropref> of the <compref name="Complex Type Definition" ref="ctd"/>
corresponding to the great-grandparent <eltref ref="complexType"/> element information item.</p></item></olist>
    </p></item></olist>
    </p></item></olist>
 </propmap><propmap comp="std" prop="variety" dg="rec12-map">If 
the <eltref ref="list"/> alternative is chosen,
then <pt>list</pt>, otherwise if the <eltref ref="union"/> alternative is
chosen, then <pt>union</pt>, otherwise (the <eltref ref="restriction"/>
alternative is chosen)<!--*
* material suppressed here by diff group rec12-map-eff *
*--> the <propref comp="std" prop="variety"/>
of the <propref comp="std" prop="base type definition"/>.</propmap><!--*
* material suppressed here by diff group rec12-map *
*--><propmap comp="std" prop="facets" dg="rec12-map">
    <olist role="Caseval"><item><p role="if">the <eltref ref="restriction"/> alternative is chosen</p><p role="then"><!--*
* material suppressed here by diff group b2783 *
*--><phrase dg="b2783">the set of <compref ref="f"/> components 
obtained by 
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-facets-overlay">overlaying</xtermref>
the <propref comp="std" prop="facets"/> of the
<propref comp="std" prop="base type definition"/> with the
set of <compref ref="f"/> components corresponding to those
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <eltref ref="restriction"/> which specify facets</phrase>, as
defined in <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#st-restrict-facets">Schema Component Constraint: Simple Type Restriction (Facets)
</xspecref>.</p></item><item dg="rec12-map-eff"><p role="if">the <eltref ref="list"/> alternative is chosen</p><p role="then">a set with one member, a <compref ref="f-w"/> facet with 
<propref comp="f-w" prop="value"/> = <pt>collapse</pt> and <propref comp="f-w" prop="fixed"/> = <pt>true</pt>.</p></item><item><p role="otherwise">the empty set</p></item></olist>
</propmap><propmap comp="std" prop="fundamental facets" dg="eg-1852">Based on
<propref comp="std" prop="variety"/>, <propref comp="std" prop="facets"/>,
<propref comp="std" prop="base type definition"/> and <propref comp="std" prop="member type definitions"/>, a set of <compref ref="ff"/> components, one
each as specified in <specref ref="dc-ordered"/>, <specref ref="dc-bounded"/>,
<specref ref="dc-cardinality"/> and <specref ref="dc-numeric"/>.</propmap><propmap comp="std" prop="annotations" dg="rec12-map">
<!--*
* material suppressed here by diff group b3869 *
*-->
<!--*
* material suppressed here by diff group b3869 *
*-->
<!--* MSM notes a certain amount of inconsistency and uncertainty
    * about tagging things 'el' or 'eltref' or ... 
    * HST observes that 'el' is for when the thing is not defined in part
    * 2, 'eltref' otherwise.
    *-->
<phrase dg="b3869">
    The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-am-set">annotation mapping</xtermref> of the set of elements containing the
    <eltref ref="simpleType"/>, and  
    the <eltref ref="restriction"/>, the
    <eltref ref="list"/>, or the <eltref ref="union"/> 
    <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">child</xpropref>,
    whichever is present,
    as defined in section <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#declare-annotation">XML Representation of Annotation Schema Components</xspecref>
    of <bibref ref="structural-schemas"/>.
</phrase>
</propmap></reprcomp><p dg="rec12-map"><!--*
* material suppressed here by diff group rec12-map-1853 *
*-->
<termdef term="ancestor" id="std-ancestor" dg="rec12-map-1853">The
<term>ancestors</term> of a 
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#td">type definition</xtermref> are its 
<!--* <xtermref href="&xsdl;#key-typeDefn">type definition</xtermref> are its  *-->
<propref comp="std" prop="base type definition"/> and the 
<termref def="std-ancestor">ancestors</termref> of its 
<propref comp="std" prop="base type definition"/>.</termdef>
<phrase dg="rec12-map-1853">(The ancestors of a 
<compref ref="std"/> <var>T</var> in the type hierarchy are themselves
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#td">type definitions</xtermref>; they are distinct from
<!--* <xtermref href="&xsdl;#key-typeDefn">type definitions</xtermref>; they are distinct from *-->
the XML elements which may be ancestors, in the XML document
hierarchy, of the <eltref ref="simpleType"/> element which 
declares <var>T</var>.)
</phrase></p><p dg="rec12-map">If the <propref comp="std" prop="variety"/> is <pt>atomic</pt>, the following additional property
<!--*
* material suppressed here by diff group rec12-map *
*--><phrase dg="rec12-map">mapping also applies</phrase>:</p><reprcomp abstract="Atomic Simple Type Definition" ref="xr-defn" dg="rec12-map"><propmap comp="std" prop="primitive type definition"><!--*
* material suppressed here by diff group sfs-1933 *
*--><!--*
* material suppressed here by diff group rec12-map-eff *
*--><phrase dg="rec12-map-eff"><!--*
* material suppressed here by diff group sfs-1933 *
*--><phrase dg="sfs-1933">From among</phrase> the <termref def="std-ancestor">ancestors</termref> of this <compref ref="std"/>, that <compref ref="std"/> which corresponds to a <termref def="dt-primitive"/> datatype</phrase>.</propmap></reprcomp><note role="example" dg="rec12-map"><p>
An electronic commerce schema might define a datatype called
<!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><string>SKU</string></phrase>
(the barcode number that appears on products) from the
<termref def="dt-built-in"/> datatype <dtref ref="string"/> by
supplying a value for the <phrase dg="ed-pattern"><termref def="dt-pattern"/></phrase><!--*
* material suppressed here by diff group ed-pattern *
*--> facet.
</p><eg xml:space="preserve">&lt;simpleType name='<!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">SKU</phrase>'&gt;
    &lt;restriction base='string'&gt;
      &lt;pattern value='\d{3}-[A-Z]{2}'/&gt;
    &lt;/restriction&gt;
&lt;/simpleType&gt;</eg><p>
In this case, <!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><string>SKU</string></phrase> is the name of the new
<!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-user-defined"/> datatype, <dtref ref="string" role="def"/> is
its <phrase dg="dpno"><termref def="dt-basetype"/></phrase><!--*
* material suppressed here by diff group dpno *
*--> 
and 
<phrase dg="dpno"><phrase dg="ed-pattern"><termref def="dt-pattern"/></phrase><!--*
* material suppressed here by diff group ed-pattern *
*--> is the facet.</phrase>
<!--*
* material suppressed here by diff group dpno *
*-->
</p></note><p dg="rec12-map">If the <propref comp="std" prop="variety"/> is <pt>list</pt>, the following
additional property mappings also apply:</p><reprcomp abstract="List Simple Type Definition" ref="xr-defn" dg="rec12-map"><propmap comp="std" prop="item type definition">
    <olist role="Caseval"><!--*
* material suppressed here by diff group rec12-map-eff *
*--><item dg="rec12-map-eff"><p role="if">the <propref comp="std" prop="base type definition"/> is <termref def="anySimpleType-def">anySimpleType</termref></p><p role="then">the <compref ref="std"/> (a) <!--*
* material suppressed here by diff group rec12-map *
*--><phrase dg="rec12-map"><xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#src-resolve">resolved</xtermref></phrase> to by the
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>itemType</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of <eltref ref="list"/>,
or (b) <!--* , MSM silently deletes stray comma inserted by mistake in WG-approved text *-->
corresponding to the <eltref ref="simpleType"/> among
the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <eltref ref="list"/>, whichever is present.
      <note><p><!--*
* material suppressed here by diff group rec12-map-eff-pentimenti *
*--><phrase dg="rec12-map-eff-pentimenti">In this
case, a</phrase> <eltref ref="list"/> element will invariably be present; it will
invariably have either an <code>itemType</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> or a <eltref ref="simpleType"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">child</xpropref>, but not both.</p></note>
      </p></item><!--*
* material suppressed here by diff group rec12-map-eff *
*--><item dg="rec12-map-eff"><p role="otherwise">(that is, the <propref comp="std" prop="base type definition"/> is not <termref def="anySimpleType-def">anySimpleType</termref>), the <propref comp="std" prop="item type definition"/> of the <propref comp="std" prop="base type definition"/>.
<note dg="edinburgh.refuses.to.die"><p>In this case, a <eltref ref="restriction"/> element will invariably be present.</p></note></p></item></olist>
   </propmap></reprcomp><note role="example" dg="rec12-map"><p>
A system might want to store lists of floating point values.
</p><eg xml:space="preserve">&lt;simpleType name='listOfFloat'&gt;
  &lt;list itemType='float'/&gt;
&lt;/simpleType&gt;
</eg><p>
In this case, <emph>listOfFloat</emph> is the name of the new
<!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-user-defined"/> datatype, <dtref ref="float"/> is its
<termref def="dt-itemType"/> and <termref def="dt-list"/> is the
derivation method.
</p></note><p dg="rec12-map">If the <propref comp="std" prop="variety"/> is 
<pt>union</pt>, the following
additional property mappings also apply:</p><reprcomp abstract="Union Simple Type Definition" ref="xr-defn" dg="rec12-map"><propmap comp="std" prop="member type definitions">
<olist role="Caseval"><!--*
* material suppressed here by diff group rec12-map-eff *
*--><item dg="rec12-map-eff"><p role="if">the <propref comp="std" prop="base type definition"/> is
<termref def="anySimpleType-def">anySimpleType</termref></p><p role="then"><!--*
* material suppressed here by diff group b2044 *
*--><!--* ... to here,
where it does make sense, and appears to be valid. *--><phrase dg="b2044">the sequence of (a) the <compref ref="std"/>s
(a) <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#src-resolve">resolved</xtermref> to by the items in the <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the
<code>memberTypes</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of <eltref ref="union"/>, if
any, and (b) those corresponding to the <eltref ref="simpleType"/>s
among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <eltref ref="union"/>, if any, in order.
</phrase> <!--*
* material suppressed here by diff group b2044 *
*-->
<note><p><!--*
* material suppressed here by diff group rec12-map-eff-pentimenti *
*--><phrase dg="rec12-map-eff-pentimenti">In this case, a</phrase>
<eltref ref="union"/> element will invariably be
present; it will invariably have either a <code>memberTypes</code>
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> or one or more <eltref ref="simpleType"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>,
or both.</p></note>
</p></item><!--*
* material suppressed here by diff group rec12-map-eff *
*--><item dg="rec12-map-eff"><p role="otherwise">(that is, the <propref comp="std" prop="base type definition"/> is not <termref def="anySimpleType-def">anySimpleType</termref>), the <propref comp="std" prop="member type definitions"/> of the <propref comp="std" prop="base type definition"/>.
<note dg="edinburgh.refuses.to.die"><p>In this case, a <eltref ref="restriction"/> element will invariably
be present.</p></note></p></item></olist>

<!--* N.B. the following note appears both here and in Structures.
    * Any changes must be made in both places.
    * Modified 2006-02-11 after consultation with HST.
    *-->
<!--*
* material suppressed here by diff group add.b2044-feedback.cr.del-as-del *
*-->

</propmap></reprcomp><note role="example" dg="rec12-map"><p>As an example, taken from a typical display oriented text markup language,
one might want to express font sizes as an integer between 8 and 72, or with
one of the tokens "small", "medium" or "large".  The <termref def="dt-union"/>
<!--*
* material suppressed here by diff group rq120 *
*--><compref ref="std"/>
below would accomplish that.</p><eg xml:space="preserve">
&lt;xs:attribute name="size"&gt;
  &lt;xs:simpleType&gt;
    &lt;xs:union&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base="xs:positiveInteger"&gt;
          &lt;xs:minInclusive value="8"/&gt;
          &lt;xs:maxInclusive value="72"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base="xs:NMTOKEN"&gt;
          &lt;xs:enumeration value="small"/&gt;
          &lt;xs:enumeration value="medium"/&gt;
          &lt;xs:enumeration value="large"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:union&gt;
  &lt;/xs:simpleType&gt;
&lt;/xs:attribute&gt;
</eg><eg xml:space="preserve">
&lt;p&gt;
&lt;font size='large'&gt;A header&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size='12'&gt;this is a test&lt;/font&gt;
&lt;/p&gt;
</eg></note></reprdef><!--* MSM untags the following div4 2005-08-27 in the belief that it's
    * artefactual, a hack to work around the deficiencies of our diff
    * markup.  MSM substitutes a different hack, making the diff groups
    * on all the following paragraphs into portmanteaus.
    *--><!--* <div4 diff="del" dg="rec12-map"><head>missing</head> *--><p dg="dpno.del.rec12-map.del">
A <!--*
* material suppressed here by diff group rq120 *
*--> datatype can be 
<!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-constructed"/> 
from <phrase dg="rq120c">a <termref def="dt-primitive"/> datatype or 
<!--*
* material suppressed here by diff group rq120o *
*--></phrase><phrase dg="rq120">an
<termref def="dt-ordinary"/></phrase> datatype by one of three means:
by <emph><!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><termref def="dt-fb-restriction"/></phrase></emph>, 
by <emph><!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><termref def="dt-list"/></phrase></emph> 
or by 
<emph><!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><termref def="dt-union"/></phrase></emph>.</p><!--*
* material suppressed here by diff group dpno.add.rec12-map.del *
*--><!--*
* material suppressed here by diff group dpno.add.rec12-map.del *
*--><!--* </div4> *--><!--*
* material suppressed here by diff group rec12-map *
*--><!--*
* material suppressed here by diff group rec12-map *
*--><!--*
* material suppressed here by diff group rec12-map *
*--></div3><div3 role="1.0" id="defn-rep-constr"><head>Constraints on XML Representation of Simple Type Definition<!--*
* material suppressed here by diff group rec12-main-excepted-rescinded *
*--></head><!--*
* material suppressed here by diff group eg-1852 *
*--><constraintnote type="src" id="src-list-itemType-or-simpleType"><head>itemType attribute or simpleType child</head><p>
Either the <code>itemType</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> or the
<eltref ref="simpleType"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">child</xpropref> of the <eltref ref="list"/> element
<phrase diff="del" dg="ep35">must</phrase><phrase diff="add" dg="ep35"><rfc2119>must</rfc2119></phrase>
be present, but not both.
</p></constraintnote><constraintnote type="src" id="src-restriction-base-or-simpleType"><head>base attribute or simpleType child</head><p>
Either the <code>base</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> or the
<code>simpleType</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">child</xpropref> of the <eltref ref="restriction"/>
element 
<phrase diff="del" dg="ep35">must</phrase><phrase diff="add" dg="ep35"><rfc2119>must</rfc2119></phrase>
be present, but not both.
</p></constraintnote><constraintnote type="src" id="src-union-memberTypes-or-simpleTypes"><head>memberTypes attribute or simpleType children</head><p>
Either the <code>memberTypes</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> of the <eltref ref="union"/>
element 
<phrase diff="del" dg="ep35">must</phrase><phrase diff="add" dg="ep35"><rfc2119>must</rfc2119></phrase>
be non-empty or
there 
<phrase diff="del" dg="ep35">must</phrase><phrase diff="add" dg="ep35"><rfc2119>must</rfc2119></phrase>
be at least one <code>simpleType</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">child</xpropref>.
</p></constraintnote></div3><div3 role="1.0" id="defn-validation-rules"><head>Simple Type Definition Validation Rules</head><constraintnote type="cvc" id="cvc-facet-valid"><head>Facet Valid</head><p>
A value in a <termref def="dt-value-space"/> is facet-valid with
respect to a <termref def="dt-constraining-facet">constraining facet</termref> component 
if <phrase dg="iff">and only if</phrase>:
</p><olist><item><p>
the value is facet-valid with respect to the particular
<termref def="dt-constraining-facet">constraining facet</termref> as specified below.
</p></item></olist></constraintnote><constraintnote type="cvc" id="cvc-datatype-valid"><head>Datatype Valid</head><!--*
* material suppressed here by diff group b2449 *
*--><!--*
* material suppressed here by diff group b2449 *
*--><p dg="b2449">
A <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase> is datatype-valid with respect to a <compref ref="std"/>
if and only if it is a member of the <termref def="dt-lexical-space"/> of the
corresponding datatype.</p></constraintnote><note dg="b2449"><p>
Since every value in the <termref def="dt-value-space"/> is denoted by some
<!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase>, and every <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase> in the <termref def="dt-lexical-space"/> maps to
some value, the requirement that the <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase> be in the
<termref def="dt-lexical-space"/> entails the requirement that the value it
maps to should fulfill all of the constraints imposed by the
<propref comp="std" prop="facets"/> of the datatype.  If
the datatype is a <termref def="dt-list"/>, the Datatype Valid constraint also
entails that each whitespace-delimited token in the list
be datatype-valid against the <termref def="dt-itemType"/> of the list.
If the datatype is a <termref def="dt-union"/>, the Datatype Valid constraint
entails that the <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase> be datatype-valid against at
least one of the <termref def="dt-memberTypes"/>.</p><p>That is, the constraints on <compref ref="std"/>s and on
datatype <termref def="dt-derived">derivation</termref> defined in this specification have as a
consequence that a <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase> <var>L</var> is datatype-valid with
respect to a <compref ref="std"/> <var>T</var> if and only if
either <var>T</var> corresponds to a <termref def="dt-special"/> datatype or
<olist role="andtest"><item id="dv_pattern" dg="b5030z"><p>If there is a <compref ref="f-p"/> in <propref comp="std" prop="facets"/>, then
<var>L</var> is <specref ref="cvc-pattern-valid"/> with respect to the
<compref ref="f-p"/>.
<phrase dg="b3251">If there are other <termref def="dt-lexical"/> facets
in <propref comp="std" prop="facets"/>, then <var>L</var> is facet-valid with respect
to them.</phrase></p></item><item id="dv_lv"><p>The appropriate case among the following is true:
<olist><item id="dv_atomic"><p>If the <propref comp="std" prop="variety"/> of <var>T</var> is <termref def="dt-atomic"/>,
then <var>L</var> is in the <termref def="dt-lexical-space"/> of the <!--* datatype
corresponding to the *--> <!--* determined by the *-->
<propref comp="std" prop="primitive type definition"/> of <var>T</var>, as defined in the
appropriate <!--*
* material suppressed here by diff group b3251 *
*--><phrase dg="b3251">documentation</phrase>.  
Let <var>V</var> be the
member of the <termref def="dt-value-space"/> of the <!--* datatype corresponding to the *-->
<propref comp="std" prop="primitive type definition"/> of <var>T</var> mapped to by <var>L</var>,
as defined in the appropriate <!--*
* material suppressed here by diff group b3251 *
*--><phrase dg="b3251">documentation</phrase>.</p><!--* simple type definitions do have value spaces -msm *--><note dg="b3251"><p>For <termref def="dt-built-in"/> <termref def="dt-primitive">primitives</termref>, the 
<quote>appropriate documentation</quote> is the relevant
section of this specification. For <termref def="key-impl-def"/> <termref def="dt-primitive">primitives</termref>,
it is the normative specification of the <termref def="dt-primitive"/>, which
will typically be included in, or referred to from, the
implementation's documentation.</p></note></item><item id="dv_list"><p>If the <propref comp="std" prop="variety"/> of <var>T</var> is <termref def="dt-list"/>, then
each space-delimited substring of <var>L</var> is Datatype Valid with
respect to the <propref comp="std" prop="item type definition"/> of <var>T</var>.  Let
<var>V</var> be the sequence consisting of the values identified by
Datatype Valid for each of those substrings, in order.</p></item><item id="dv_union"><p>If the <propref comp="std" prop="variety"/> of <var>T</var> is <termref def="dt-union"/>,
then <var>L</var> is Datatype Valid with respect to at least one
member of the <propref comp="std" prop="member type definitions"/>
of <var>T</var>. Let <var>B</var> be the <termref def="dt-active-basic-member"/> of <var>T</var> for <var>L</var>.  Let
<var>V</var> be the value identified by Datatype Valid for
<var>L</var> with respect to <var>B</var>.</p></item></olist>
</p></item><item id="dv_vfacets"><p><var>V</var>, as determined by the
appropriate sub-clause of <clauseref ref="dv_lv"/> above,
<!--*
* material suppressed here by diff group b5030z *
*-->
is <specref ref="cvc-facet-valid"/> with respect to each member of the
<propref comp="std" prop="facets"/> of <var>T</var> which is <phrase dg="b5030z"><phrase dg="b3251">a
<termref def="dt-value-based"/> (and </phrase>not a <!--*
* material suppressed here by diff group b3251 *
*--><phrase dg="b3251"><termref def="dt-pre-lexical"/>
or <termref def="dt-lexical"/>)</phrase></phrase>
<!--*
* material suppressed here by diff group b5030z *
*-->
facet.</p></item></olist>
</p><p>Note that <compref ref="f-w"/> facets <phrase dg="b3251">and
other <termref def="dt-pre-lexical"/> facets</phrase>
do not take part in checking Datatype
Valid.  In cases where this specification is used in conjunction with
schema-validation of XML documents, 
<!--*
* material suppressed here by diff group b3251 *
*--><phrase dg="b3251">such</phrase> facets are used to
normalize infoset values <emph>before</emph> the normalized results
are checked for datatype validity.  In the case of unions the
<!--*
* material suppressed here by diff group b3251 *
*--><phrase dg="b3251"><termref def="dt-pre-lexical"/> facets to use are those</phrase> 
associated with <var>B</var> in
<clauseref ref="dv_union"/> above.
<phrase dg="b3251">When more than one <termref def="dt-pre-lexical"/> facet 
applies, the <compref ref="f-w"/> facet is applied first; the order in 
which <termref def="key-impl-def"/> facets
are applied is <termref def="key-impl-def"/>.</phrase></p><!--*
* material suppressed here by diff group b5030z *
*--></note></div3><div3 role="1.0" id="defn-coss"><head>Constraints on Simple Type Definition Schema Components</head><constraintnote type="cos" id="cos-applicable-facets"><head>Applicable Facets</head><p>
The <termref def="dt-constraining-facet">constraining facets</termref> which are allowed to be members of <propref comp="std" prop="facets"/>
<!--*
* material suppressed here by diff group wd-23 *
*--><phrase dg="wd-23">depend on
the <propref comp="std" prop="variety"/> and <propref comp="std" prop="primitive type definition"/> of the type, as
follows</phrase>:
</p><applicable-facets rend=" wd-23-post b5030-post "/><!--*
* material suppressed here by diff group b5030-en *
*--><!--* OK, I know.  You're looking for where the table of
    * applicable facets comes from.  You've been here before,
    * you figured it out, and now you've forgotten again.
    * It's OK, I understand.  I've been there myself.
    *--><note dg="b3251"><p>For any <termref def="key-impl-def"/> primitive types, 
it is <termref def="key-impl-def"/> which constraining facets are
applicable to them.
</p><p>Similarly, for any <termref def="key-impl-def"/> constraining facets,
it is <termref def="key-impl-def"/> which <termref def="dt-primitive">primitives</termref> they
apply to.
</p></note></constraintnote><!--*
* material suppressed here by diff group rec12-main-excepted *
*--><!--*
* material suppressed here by diff group rec12-main-excepted *
*--></div3><!--*
* material suppressed here by diff group trm1 *
*--><!--*
* material suppressed here by diff group aat *
*--><div3 id="builtin-stds" dg="aat"><head>Built-in Simple Type Definitions</head><!--* !!! n.b. It's not clear where this material actually belongs.  For the
    * moment, I'm leaving it here where I found it, but it's not clear
    * that the approval of diff group 'aat' actually fixed this as the
    * appropriate location.  I have to check the minutes. 
    * [2005-01-21: minutes are clear: location was not discussed; the
    * text the WG approved was in section 4.]
    * Some smaller-order resequencing is noted in comments.
    *--><!--* !!! paragraph ast_radix_omnium was moved to this point in newOrg *--><!--* It's aatf that deletes the following paragraph and inserts the next.
    * Redone to tag this as a change to aat, rather than as aatf, so that
    * the final wording will be colored correctly. 
<p diff="del" dg="aatf">The <phrase diff="del" dg="dpno"><compref
ref="std"/> of <phrase role="UNSURE">anySimpleType</phrase></phrase>
<phrase diff="add" dg="dpno"><dtref role="def"
ref="anySimpleType"/></phrase> is present in every schema.&nbsp; It
has the following properties:</p>
*--><!--*
* material suppressed here by diff group rq120 *
*--><!--*
* material suppressed here by diff group rq120 *
*--><p dg="rec12-main-excepted">The <compref ref="std"/> of <dtref ref="anySimpleType"/> is
present in every schema.  It has the following properties:</p><schemaComp id="anySimpleType-def" dg="rec12-main"><head>Simple type definition of <code>anySimpleType</code></head><pvlist><pvpair comp="std" prop="name"><string>anySimpleType</string></pvpair><pvpair comp="std" prop="target namespace"><string>http://www.w3.org/2001/XMLSchema</string></pvpair><pvpair comp="std" prop="final">The empty set</pvpair><!--*
* material suppressed here by diff group context-2337 *
*--><pvpair comp="std" prop="context" dg="context-2337"><pt>absent</pt></pvpair><pvpair comp="std" prop="base type definition"><xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#any-type-itself">anyType</xtermref></pvpair><!--* old:
<pvpair comp="std" prop="base type definition"><xtermref href="&xsdl;#ur-type-itself">anyType</xtermref></pvpair>
*--><pvpair comp="std" prop="facets">The empty set</pvpair><pvpair comp="std" prop="fundamental facets">The empty set</pvpair><pvpair comp="std" prop="variety"><pt>absent</pt></pvpair><pvpair comp="std" prop="primitive type definition" dg="ast-pim"><pt>absent</pt></pvpair><pvpair comp="std" prop="item type definition" dg="ast-pim"><pt>absent</pt></pvpair><pvpair comp="std" prop="member type definitions" dg="ast-pim"><pt>absent</pt></pvpair><pvpair comp="std" prop="annotations">The empty sequence</pvpair></pvlist></schemaComp><p id="ast_radix_omnium">The 
definition of <dtref ref="anySimpleType"/>
is the root of the Simple Type Definition
hierarchy<!--*
* material suppressed here by diff group b2603 *
*--><phrase dg="b2603">;</phrase>
as such<phrase dg="b2603"> it</phrase> mediates between the other 
<phrase dg="dpno">simple type definitions</phrase><!--*
* material suppressed here by diff group dpno *
*-->, 
which all eventually trace back to it via their
<propref comp="std" prop="base type definition"/> properties, 
and<!--*
* material suppressed here by diff group b2603 *
*--> the 
definition of <dtref ref="anyType"/>, 
which is
<emph>its</emph> <propref comp="std" prop="base type definition"/>.</p><!--* !!! should the following material move to section 3? -msm *--><!--* following paragraph was in datatypes.xml.  MSM suppressed it
    * silently (except for this comment) because its adddition is
    * not attributed to any diff group.  It can't have been in
    * 2E; if it was in the July 2004 WD, then we'll need to bring it back. 
    * -msm 2005-01-09
    *--><!--* <p diff="add"><termdef term="anyAtomicType" id="dt-anyAtomicType"
>There is a simple type definition named <term>anyAtomicType</term> present in every
schema by definition</termdef>.  It has the following properties:</p> *--><!--*
* material suppressed here by diff group dpno *
*--><!--*
* material suppressed here by diff group rq120 *
*--><p dg="rec12-main">The <compref ref="std"/> of <dtref ref="anyAtomicType"/> is
present in every schema.  It has the following properties:</p><schemaComp id="anyAtomicType-def" dg="rec12-main"><head>Simple type definition of <code>anyAtomicType</code></head><pvlist><pvpair comp="std" prop="name"><string>anyAtomicType</string></pvpair><pvpair comp="std" prop="target namespace"><string>http://www.w3.org/2001/XMLSchema</string></pvpair><pvpair comp="std" prop="final">The empty set</pvpair><!--*
* material suppressed here by diff group context-2337 *
*--><pvpair comp="std" prop="context" dg="context-2337"><pt>absent</pt></pvpair><pvpair comp="std" prop="base type definition"><dtref ref="anySimpleType"/></pvpair><pvpair comp="std" prop="facets">The empty set</pvpair><pvpair comp="std" prop="fundamental facets">The empty set</pvpair><pvpair comp="std" prop="variety"><!--*
* material suppressed here by diff group rec12-main *
*--><pt dg="rec12-main">atomic</pt></pvpair><pvpair comp="std" prop="primitive type definition"><pt>absent</pt></pvpair><pvpair comp="std" prop="item type definition"><pt>absent</pt></pvpair><pvpair comp="std" prop="member type definitions"><pt>absent</pt></pvpair><pvpair comp="std" prop="annotations">The empty sequence</pvpair></pvlist></schemaComp><p>Simple type definitions for all the built-in primitive datatypes,
namely <dtref ref="string"/>, 
<dtref ref="boolean"/>, 
<dtref ref="float"/>, 
<dtref ref="double"/>, 
<dtref ref="decimal"/>, 
<!--*
* material suppressed here by diff group b12300-diff10-silent *
*-->
<dtref ref="dateTime"/>, 
<dtref ref="duration"/>, 
<dtref ref="time"/>, 
<dtref ref="date"/>, 
<dtref ref="gMonth"/>, 
<dtref ref="gMonthDay"/>, 
<dtref ref="gDay"/>, 
<dtref ref="gYear"/>, 
<dtref ref="gYearMonth"/>, 
<dtref ref="hexBinary"/>, 
<dtref ref="base64Binary"/>, 
<dtref ref="anyURI"/> 
are present by definition
in every schema.  All <!--*
* material suppressed here by diff group rec12-tableaux *
*--><phrase dg="rec12-tableaux">have a very similar structure, with only the
<propref comp="std" prop="name"/>, the <!--*
* material suppressed here by diff group ep26 *
*--><propref comp="std" prop="primitive type definition" dg="ep26"/> (which is self-referential), 
the <propref comp="std" prop="fundamental facets"/><phrase dg="ep26">,</phrase> 
and in one case the <propref comp="std" prop="facets"/> varying from one to the 
next:</phrase></p><schemaComp id="dummy-def" dg="rec12-tableaux"><head alt="Simple Type Definition corresponding to the built-in primitive datatypes"><compref ref="std"/> corresponding to the built-in primitive datatypes</head><pvlist><pvpair comp="std" prop="name">[as appropriate]</pvpair><pvpair comp="std" prop="target namespace"><string>http://www.w3.org/2001/XMLSchema</string></pvpair><pvpair comp="std" prop="base type definition"><!--* The *-->
<dtref ref="anyAtomicType" role="def"/></pvpair><pvpair comp="std" prop="final">The empty set</pvpair><pvpair comp="std" prop="variety"><pt>atomic</pt></pvpair><pvpair comp="std" prop="primitive type definition">[this <compref ref="std"/> 
itself]</pvpair><pvpair comp="std" prop="facets">{a <compref ref="f-w"/> facet with 
<propref comp="f-w" prop="value"/> = <pt>collapse</pt> and <propref comp="f-w" prop="fixed"/> = <pt>true</pt> in all cases except
<dtref ref="string"/>, which has <propref comp="f-w" prop="value"/> =
<pt>preserve</pt> and <propref comp="f-w" prop="fixed"/> = <pt>false</pt>}</pvpair><pvpair comp="std" prop="fundamental facets">[as appropriate]<!--{<ulist>
<item><p>an <compref ref="ff-o"/> facet
with <propref comp="ff-o" prop="value"/> = <pt>total</pt></p></item>
<item><p>a <compref ref="ff-b"/> facet
with <propref comp="ff-b" prop="value"/> = <pt>false</pt></p></item>
<item><p>a <compref ref="ff-c"/> facet
with <propref comp="ff-c" prop="value"/> = <pt>countable</pt></p></item>
<item><p>a <compref ref="ff-n"/> facet
with <propref comp="ff-n" prop="value"/> = <pt>true</pt></p></item>
</ulist>}-->
</pvpair><!--*
* material suppressed here by diff group context-2337 *
*--><pvpair comp="std" prop="context" dg="context-2337"><pt>absent</pt></pvpair><pvpair comp="std" prop="item type definition"><pt>absent</pt></pvpair><pvpair comp="std" prop="member type definitions"><pt>absent</pt></pvpair><pvpair comp="std" prop="annotations">The empty sequence</pvpair></pvlist></schemaComp><p dg="b3251">
<termref def="key-impl-def">Implementation-defined</termref> <termref def="dt-primitive">primitives</termref> <rfc2119>must</rfc2119> have a <compref ref="std"/> with
the values shown above, with the following exceptions.
<olist><!--*
<item>
<p>The <propref comp="std" prop="target namespace"/>
&mustnot; have the value <string>http://www.w3.org/2001/XMLSchema</string>.</p>
</item> *--><item><p>The <propref comp="std" prop="facets"/> property
<rfc2119>must</rfc2119> contain a <compref ref="f-w"/> facet, the value of which is 
<termref def="key-impl-def"/>.  It <rfc2119>may</rfc2119> contain other facets,
whether defined in this specification or <termref def="key-impl-def"/>.</p></item><item><p>The value of <propref comp="std" prop="fundamental facets"/>
is <termref def="key-impl-def"/>.</p></item><item><p>The value of <propref comp="std" prop="annotations"/>
<rfc2119>may</rfc2119> be empty, but need not be.</p></item></olist>
</p><note dg="b3251"><p>It is a consequence of the rule just given that each
<termref def="key-impl-def"/> <termref def="dt-primitive"/> will have 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>
by which it can be referred to.</p></note><note dg="b3251"><p>
<termref def="key-impl-def">Implementation-defined</termref> datatypes will normally have a value
other than <string>http://www.w3.org/2001/XMLSchema</string> for the 
<propref comp="std" prop="target namespace"/>
property.  That namespace is controlled by the W3C and
datatypes will be added to it only by W3C or its designees.
</p></note><p>Similarly, <compref ref="std"/>s for all the built-in <termref def="dt-ordinary"/>
datatypes are present by definition in every schema, with properties
as specified in <specref ref="ordinary-built-ins"/> and as represented
in XML in <!--*
* material suppressed here by diff group eg-1852 *
*--><phrase dg="eg-1852"><specref ref="drvd.nxsd"/></phrase>.</p><schemaComp id="dummy-ddef" dg="rad-1933"><head alt="Simple Type Definition corresponding to the built-in ordinary datatypes"><compref ref="std"/> corresponding to the <termref def="dt-ordinary"/> built-in datatypes</head><pvlist><pvpair comp="std" prop="name">[as appropriate]</pvpair><pvpair comp="std" prop="target namespace"><string>http://www.w3.org/2001/XMLSchema</string></pvpair><pvpair comp="std" prop="base type definition">[as specified in the appropriate
sub-section of <specref ref="ordinary-built-ins"/>]</pvpair><pvpair comp="std" prop="final">The empty set</pvpair><pvpair comp="std" prop="variety">[<pt>atomic</pt> or <pt>list</pt>, as specified in the appropriate
sub-section of <specref ref="ordinary-built-ins"/>]</pvpair><pvpair comp="std" prop="primitive type definition">[if <propref comp="std" prop="variety"/> is
<pt>atomic</pt>, then the <propref comp="std" prop="primitive type definition"/> of the <propref comp="std" prop="base type definition"/>, otherwise <pt>absent</pt>]</pvpair><pvpair comp="std" prop="facets">[as specified in the appropriate
sub-section of <specref ref="ordinary-built-ins"/>]</pvpair><pvpair comp="std" prop="fundamental facets">[as specified in the appropriate
sub-section of <specref ref="ordinary-built-ins"/>]</pvpair><pvpair comp="std" prop="context" dg="context-2337"><pt>absent</pt></pvpair><pvpair comp="std" prop="item type definition">if <propref comp="std" prop="variety"/> is
<pt>atomic</pt>, then <pt>absent</pt>, otherwise as specified in the appropriate
sub-section of <specref ref="ordinary-built-ins"/>]</pvpair><pvpair comp="std" prop="member type definitions"><pt>absent</pt></pvpair><pvpair comp="std" prop="annotations">As shown in the XML representations
of the ordinary built-in datatypes in <!--*
* material suppressed here by diff group eg-1852 *
*--><phrase dg="eg-1852"><specref ref="drvd.nxsd"/></phrase></pvpair></pvlist></schemaComp></div3></div2><!--* 2005-08-27: MSM deletes this div2 and move the
    * (deleted) section on equality into the new
    * 'fundamental facets' section.  I have not reconstructed
    * the process by which we came to delete a section and
    * then create a section with the same name adjacent to it,
    * and move all but one of the old subsections into the new
    * section.  It presumably made sense at the time, and I don't
    * dispute that.  I only note that with the document in its
    * current state it makes no sense and can be reverted.
    *--><!--* <div2 id="del-rf-fund-facets" diff="del" dg="fa1"> *--><!--* <head>Fundamental Facets</head> *--><!--* div3 for 'equal' used to be here *--><!--* </div2> *--><!--ednote><edtext>We may require that information facets be tracked,
in which case we will change the following note accordingly.&nbsp; Similarly if we don't add the
new &cfacets; for precisionDecimal or whatever else might need them.</edtext></ednote--><div2 id="rf-fund-facets"><!--* MSM deletes <phrase diff="add" dg="fa1"> around the termref, 2005-08-27.
    * Then MSM deletes the termref: it seems remarkably silly to have a 
    * hyperlink from the heading of a section to its first paragraph.
    * That's too high a price for the privilege of saying "all occurrences of
    * the string 'fundamental facet' are hyperlinked to the definition".
    * MSM also doubts that any reader expects hyperlinks from section titles.
    * If anyone does want to go back, at least tag the heading as shown in the
    * comment below, not the way it used to be, which messes up our diffs.

      <head alt="Fundamental Facets">
        <phrase diff="del" dg="fa1">Fundamental Facets</phrase>
        <phrase diff="add" dg="fa1">
          <termref def="dt-fundamental-facet">
            <phrase diff="add" dg="fpwd-rescinded-add">Information</phrase>
            <phrase diff="del" dg="fpwd-rescinded-del">Fundamental</phrase> Facets
          </termref>
       </phrase>
      </head>

    * If we ever want to reconstruct the first public working draft, this
    * will need work; it appeared as "Information Facets" there.  But at
    * the moment, we don't have any such commitment.  So I'm leaving this 
    * simple for now.
    *--><head alt="Fundamental Facets">Fundamental Facets</head><!--* <issue id="RQ-24-1i" role="1.1">
<p><loc href="&reqs;#fundamentals" target="reqs">RQ-24 (systematic approach to facets)</loc></p>
<p>The decision that the four informational facets, each of which have only one property,
will be lumped into one facet having four properties has been rescinded by the WG before it
made it into the text of this specification.</p>
</issue> *--><!--*
* material suppressed here by diff group dp200701 *
*--><p dg="fa1">
<!--*
* material suppressed here by diff group fa1.z *
*-->
<!--* Compdef added by MSM 2008-06-15 to try to repair damage done
    * when change 3850 was made, breaking a number of compref
    * links to 'fundamental facet' *-->
<!--* <compdef name="fundamental facet" abbrev="ff" role="termdef"/> *-->
<!--* No luck; generates text. *-->
<phrase id="ff" dg="b3850"/>
<phrase dg="fa1.z"><termdef term="fundamental facet" id="dt-fundamental-facet">
Each <term>fundamental facet</term> is a
schema component that provides a limited piece of information about
some aspect of each datatype.</termdef><phrase dg="b3850">  All <termref def="dt-fundamental-facet">fundamental
facet</termref> components are defined in this section.</phrase> 

For example, <compref ref="ff-c"/> is a 
<termref def="dt-fundamental-facet"/>.  </phrase>
Most <termref def="dt-fundamental-facet"><!--*
* material suppressed here by diff group fa1.z *
*--><phrase dg="fa1.z">fundamental</phrase> facets</termref> 
are given a value
fixed with each primitive datatype's definition, and this value is not changed by
subsequent <termref def="dt-derived">derivations</termref> (even when
it would perhaps be reasonable to expect an application to give a more accurate value based
on the constraining facets used to define the <termref def="dt-derived">derivation</termref>).  The
<compref ref="ff-c"/>  and <compref ref="ff-b"/> facets
are exceptions to this rule; their values may change as a result of certain
<termref def="dt-derived">derivations</termref>.</p><note dg="fa1"><p>Schema components are identified by kind.  <quote><!--*
* material suppressed here by diff group fa1.z *
*--><phrase dg="fa1.z">Fundamental</phrase></quote> 
is not a kind of component.  Each kind of <termref def="dt-fundamental-facet"/>
(<quote>ordered</quote>, 
<quote>bounded</quote>, etc.) is <!--*
* material suppressed here by diff group wdd *
*-->
a separate kind of schema component.</p></note><!-- This para was added by ep01-part2 in 2005 and deleted in 2006 by b3850.
If ep01-part2 is pre and b3850 is pre then this para should be pre.  ep01-b3850 pre.
(When ep01-part2 is pre then presumably b3850 can't be colour or post.)
If ep01-part2 is colour and b3850 is pre then this para should be add colour.  ep01-b3850 colour.
If ep01-part2 is colour and b3850 is colour then this para should be del colour outside of add colour.
    ep01-b3850-colours colour, ep01-b3850 pre.
(When ep01-part2 is colour then presumably b3850 can't be post.)
If ep01-part2 is post and b3850 is pre then this para should be post.  ep01-b3850 post.
If ep01-part2 is post and b3850 is colour then this para should be del colour.  ep-01-b3850 pre, ep01-b3850-rev colour.
If ep01-part2 is post and b3850 is post then this para should be pre.  epo1-b3850 pre.
   (ep01-b3850-colour is pre except in one instance each above.)
   (ep01-b3850-rev is post except in one instance each above.)

If ep01-part2 is pre and b3850 is pre then  ep01-b3850 should be pre, epo1-b3850-colours pre, ep01-b3850-rev post.
(When ep01-part2 is pre then presumably b3850 can't be colour or post.)
If ep01-part2 is colour and b3850 is pre then ep01-b3850 should be colour, epo1-b3850-colours pre, ep01-b3850-rev post.
If ep01-part2 is colour and b3850 is colour then ep01-b3850 should be pre, ep01-b3850-colours colour, ep01-b3850-rev post.
(When ep01-part2 is colour then presumably b3850 can't be post.)
If ep01-part2 is post and b3850 is pre then ep01-b3850 should be post, epo1-b3850-colours pre, ep01-b3850-rev post.
If ep01-part2 is post and b3850 is colour then ep-01-b3850 should be pre, epo1-b3850-colours pre, ep01-b3850-rev colour.
If ep01-part2 is post and b3850 is post then epo1-b3850 should be pre, epo1-b3850-colours pre, ep01-b3850-rev post.
   (ep01-b3850-colours should be pre except in one instance above.)
   (ep01-b3850-rev should be post except in one instance above.)
--><!--*
* material suppressed here by diff group ep01-b3850 *
*--><!--*
* material suppressed here by diff group ep01-b3850-rev *
*--><p dg="ep01-b3850-colours"><!--*
* material suppressed here by diff group ep01-b3850-colours *
*--><!--*
* material suppressed here by diff group ep01-b3850-colours *
*--></p><p dg="fa1">A <termref def="dt-fundamental-facet"/> can occur only
in the <propref comp="std" prop="fundamental facets"/> of a <compref ref="std"/>, and this is the
only place where <termref def="dt-fundamental-facet"/> components
occur.  <!--*
* material suppressed here by diff group pattern-1929 *
*-->  Each kind of <termref def="dt-fundamental-facet"/>
component occurs (once) in each <compref ref="std"/>'s <propref comp="std" prop="fundamental facets"/> set.</p><note dg="fa1"><p>The value of any <termref def="dt-fundamental-facet"/> component can always
be calculated from other properties of its <termref def="dt-owner"/>.  
<phrase dg="wdd">Fundamental facets are not required for schema processing,
but some applications use them.</phrase><!--&nbsp; More &cfacets; have been added which do 
not constrain the value space of derived datatypes (and the whitespace facet never did).--></p></note><!--*
* material suppressed here by diff group fa1 *
*--><div3 id="rf-ordered"><head>ordered</head><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><p dg="fa1"><!--*
* material suppressed here by diff group b2947 *
*--><phrase dg="b2947">For some datatypes,
this document specifies an order relation for their value spaces (see
<specref ref="order"/>); the <emph>ordered</emph> facet reflects
this.  It takes the values <pt>total</pt>, <pt>partial</pt>,
and <pt>false</pt>, with the meanings described below.
For the <termref def="dt-primitive"/> datatypes, 
the value of the <emph>ordered</emph> facet is
specified in <specref ref="app-fundamental-facets"/>.  
For <termref def="dt-ordinary"/> datatypes, the value is inherited without change
from the <termref def="dt-basetype"/>.
For a <termref def="dt-list"/>, the value is always <pt>false</pt>;
for a <termref def="dt-union"/>, the value is computed as described below.
</phrase></p><p dg="fa1">A <pt>false</pt> value means no order is prescribed; 
a <pt>total</pt> value
assures that the prescribed order is a total
order; a <pt>partial</pt> value means 
<!--*
* material suppressed here by diff group fa1-fix *
*-->
<phrase dg="fa1-fix">that the prescribed order is a partial
order, but not (for the primitive type in question) a total order.  
<!--*
* material suppressed here by diff group b2947 *
*-->
</phrase> 
</p><!--*
* material suppressed here by diff group edn10658 *
*--><note dg="b2947"><p>The value <pt>false</pt> in the <emph>ordered</emph> facet does not
mean no partial or total ordering <emph>exists</emph> for the value
space, only that none is specified by this document for use in
checking upper and lower bounds.  Mathematically, any set of values
possesses <phrase dg="b10658">at </phrase>least one
trivial partial ordering, in which every value
pair that is not equal is incomparable.</p></note><note dg="b2947"><p>When new datatypes are derived from datatypes with partial orders,
the constraints imposed can sometimes result in a value space
for which the ordering is total, or trivial.  The value of the 
<compref ref="ff-o"/> facet is not, however, changed to reflect this.
The value <pt>partial</pt> should therefore be interpreted with
appropriate caution.</p></note><p dg="fa1-fix">
<termdef id="dt-ordered" term="ordered">A
<termref def="dt-value-space"/>, and hence a datatype, is said to be
<term>ordered</term> if <!--*
* material suppressed here by diff group b2947 *
*--><phrase dg="b2947"><!--*
* material suppressed here by diff group b5062 *
*--><phrase dg="b5062">some</phrase>
members of the <termref def="dt-value-space"/> are <!--*
* material suppressed here by diff group b5062 *
*--> 
drawn from <!--*
* material suppressed here by diff group b5062 *
*--><phrase dg="b5062">a</phrase> <termref def="dt-primitive"/> 
datatype<!--*
* material suppressed here by diff group b5062 *
*--><phrase dg="b5062"> for which</phrase> 
the table in <specref ref="app-fundamental-facets"/> specifies
the value <pt>total</pt> or <pt>partial</pt> for 
the <emph>ordered</emph> facet<!--*
* material suppressed here by diff group b5062 *
*--></phrase>.</termdef></p><note dg="fa1"><p>Some of the <quote>real-world</quote> datatypes which are the basis for those defined herein
are ordered in some applications, even though no order is prescribed for schema-processing
purposes.  For example, <dtref ref="boolean"/> is sometimes ordered, and <dtref ref="string"/>
and <termref def="dt-list"/> datatypes <termref def="dt-constructed"/> from
ordered <termref def="dt-atomic"/> datatypes are sometimes given <quote>lexical</quote>
orderings.  They are <emph>not</emph> ordered for schema-processing purposes.</p></note><div4 id="dc-ordered"><head>The ordered Schema Component</head><compdef name="ordered" abbrev="ff-o" showAKO="true"/><!--* <ednote><edtext>The writeup here has been changed to look more like 
the way logic is currently presented in Part 1.&nbsp; Some find it 
<emph>harder</emph> to understand.&nbsp; The editors are trying to
harmonize the two.&nbsp; Until this is sorted out in "editors' 
committee", the other facet writeups are not going to change.&nbsp; 
This will not occur before second working draft.</edtext></ednote> *--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><p dg="fa1"><propref comp="ff-o" prop="value"/> depends on 
the <termref def="dt-owner">owner's</termref> 
<propref comp="std" prop="variety"/>, <propref comp="std" prop="facets"/>, 
and <propref comp="std" prop="member type definitions"/>.

<olist role="Case"><item id="x04042a"><p role="if">the 
<termref def="dt-owner"><!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">owner's</phrase></termref>
<propref comp="std" prop="variety"/> is <pt>atomic</pt></p><p role="then">
 <olist role="case"><item id="x040428b"><p role="if">the <termref def="dt-owner"/> is <termref def="dt-primitive"/></p><p role="then"><propref comp="ff-o" prop="value"/> is as specified in the
table in <specref ref="app-fundamental-facets"/>.</p></item><item><p role="otherwise"><propref comp="ff-o" prop="value"/> is the <termref def="dt-owner">owner's</termref>
<propref comp="std" prop="base type definition"/>'s <compref ref="ff-o"/> <propref comp="ff-o" prop="value"/>.</p></item></olist>
</p></item><item><p role="if">the <termref def="dt-owner">owner's</termref>
<propref comp="std" prop="variety"/> is <pt>list</pt></p><p role="then"><propref comp="ff-o" prop="value"/> is <pt>false</pt>.</p></item><item><p role="otherwise">the <termref def="dt-owner">owner's</termref> <propref comp="std" prop="variety"/> is <pt>union</pt>;
<olist role="case"><item id="x040428"><p role="if">every <!--*
* material suppressed here by diff group b2044 *
*-->
<phrase dg="b2044"><termref def="dt-basicmember"/> of the 
<termref def="dt-owner"/></phrase>
<!--*
* material suppressed here by diff group aatg *
*--><phrase dg="aatg">has 
<propref comp="std" prop="variety"/> atomic and has the same
<propref comp="std" prop="primitive type definition"/></phrase></p><p role="then"><propref comp="ff-o" prop="value"/> is the same as the
<compref ref="ff-o"/> component's <propref comp="ff-o" prop="value"/> in that 
<!--*
* material suppressed here by diff group aatg *
*--><phrase dg="aatg">primitive 
type definition's</phrase> 
<propref comp="std" prop="fundamental facets"/>.</p></item><item><p role="if">each member of the <termref def="dt-owner"><!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">owner's</phrase></termref> 
<propref comp="std" prop="member type definitions"/> has an <compref ref="ff-o"/>
component in its 
<propref comp="std" prop="fundamental facets"/> whose <propref comp="ff-o" prop="value"/> is <pt>false</pt></p><p role="then"><propref comp="ff-o" prop="value"/> is
<pt>false</pt>.</p></item><item><p role="otherwise"><propref comp="ff-o" prop="value"/> is
<pt>partial</pt>.</p></item></olist>
</p></item></olist>

</p></div4></div3><div3 id="rf-bounded"><head>bounded</head><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><p dg="fa1">Some ordered datatypes have the property that
there is one value greater than or equal to every other value, and
another that <phrase dg="rq120">is</phrase>
less than or equal to every other value.  (In the case of 
<!--*
* material suppressed here by diff group rq120 *
*--><!--*
* material suppressed here by diff group rq120c *
*--><termref dg="rq120o" def="dt-ordinary"/>
datatypes, these two values 
<!--*
* material suppressed here by diff group fa1-fix *
*--> <phrase dg="fa1-fix">are
not necessarily</phrase> in the value space of the derived datatype,
but <phrase dg="fa1-fix">they</phrase> <phrase diff="del" dg="ep35">must be</phrase><phrase diff="add" dg="ep35">will always be</phrase>
in the value
space of the primitive datatype from which they have been derived.)
The <emph>bounded</emph> facet value is <dtref ref="boolean"/> and is
generally <pt>true</pt> for such <emph>bounded</emph> datatypes. 
However, it will remain <pt>false</pt> when the mechanism for imposing
such a bound is difficult to detect, as, for example, when the
boundedness occurs because of derivation using a <compref ref="f-p"/>
component.</p><div4 id="dc-bounded"><head>The bounded Schema Component</head><compdef name="bounded" abbrev="ff-b" showAKO="true"/><p><propref comp="ff-b" prop="value"/> depends on 
<phrase dg="fa1">the 
<termref def="dt-owner"><!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">owner's</phrase></termref></phrase>
<propref comp="std" prop="variety"/>,
<propref comp="std" prop="facets"/> and 
<propref comp="std" prop="member type definitions"/><!--*
* material suppressed here by diff group fa1 *
*-->.</p><p>When <phrase dg="fa1">the <termref def="dt-owner"/>
is <termref def="dt-primitive"/>, 
<propref comp="ff-b" prop="value"/> is as specified in the
table in <specref ref="app-fundamental-facets"/>.  Otherwise, when the
<termref def="dt-owner"><!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">owner's</phrase></termref></phrase>
<propref comp="std" prop="variety"/> is <pt>atomic</pt>,
if one of <compref ref="f-mii"/> or <compref ref="f-mie"/>
and one of <compref ref="f-mai"/> or <compref ref="f-mae"/>
are <!--*
* material suppressed here by diff group fa1 *
*--><phrase dg="fa1">members of
the <termref def="dt-owner">owner's</termref> <propref comp="std" prop="facets"/> set</phrase>, then
<propref comp="ff-b" prop="value"/> is <pt>true</pt>;
<!--*
* material suppressed here by diff group fa1 *
*--><phrase dg="fa1">otherwise</phrase>
<propref comp="ff-b" prop="value"/> is <pt>false</pt>.</p><p>When <phrase dg="fa1">the <termref def="dt-owner">owner's</termref>
</phrase><propref comp="std" prop="variety"/> is <pt>list</pt>,
<!--* !!! probable ID problems !!! *-->
<!--*
* material suppressed here by diff group fpwd *
*-->
<propref comp="ff-b" prop="value"/> is <pt>false</pt>.</p><p>
When the <phrase dg="fa1"><termref def="dt-owner">owner's</termref> </phrase><propref comp="std" prop="variety"/> is <pt>union</pt>, if
<propref comp="ff-b" prop="value"/> is <pt>true</pt> for every
member of <!--*
* material suppressed here by diff group fa1 *
*--><phrase dg="fa1">the <termref def="dt-owner">owner's</termref> <propref comp="std" prop="member type definitions"/> set and <!--*
* material suppressed here by diff group b2044 *
*--></phrase><!--*
* material suppressed here by diff group b2044 *
*--><phrase dg="b2044">all of the <termref def="dt-owner">owner's</termref> <termref def="dt-basicmember">basic members</termref> have the same 
<propref comp="std" prop="primitive type definition"/></phrase>, then <propref comp="ff-b" prop="value"/> is <pt>true</pt>; <!--*
* material suppressed here by diff group fa1 *
*--><phrase dg="fa1">otherwise</phrase>
<propref comp="ff-b" prop="value"/> is <pt>false</pt>.
</p></div4></div3><div3 id="rf-cardinality"><head>cardinality</head><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><p dg="fa1">Every value space has a specific number of members.  This number can be characterized as 
<emph>finite</emph> or <emph>infinite</emph>.  (Currently there are no datatypes with infinite
value spaces larger than <emph>countable</emph>.)  The <emph>cardinality</emph> facet value is
either <pt>finite</pt> or <pt>countably infinite</pt> and is generally <pt>finite</pt> for datatypes with
finite value spaces.  However, it will remain <pt>countably infinite</pt> when the mechanism for
causing finiteness is difficult to detect, as, for example, when finiteness occurs because of a
derivation using a <compref ref="f-p"/> component.</p><div4 id="dc-cardinality"><head>The cardinality Schema Component</head><compdef name="cardinality" abbrev="ff-c" showAKO="true"/><p>
<propref comp="ff-c" prop="value"/> depends on <phrase dg="fa1">the <termref def="dt-owner"><!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">owner's</phrase></termref> </phrase><propref comp="std" prop="variety"/>,
<propref comp="std" prop="facets"/>, and <propref comp="std" prop="member type definitions"/><!--*
* material suppressed here by diff group fa1 *
*-->.</p><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><p dg="fa1">When the <termref def="dt-owner"/> is
<termref def="dt-primitive"/>, <propref comp="ff-c" prop="value"/> is as specified in the
table in <specref ref="app-fundamental-facets"/>.  Otherwise, when
the <termref def="dt-owner"><!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">owner's</phrase></termref> <propref comp="std" prop="variety"/> is <pt>atomic</pt>,
<propref comp="ff-c" prop="value"/>
is <pt>countably infinite</pt> unless <strong>any</strong> of the following
conditions are true, in which case <propref comp="ff-c" prop="value"/> is
<pt>finite</pt>:

<olist role="orval"><item><p>the <termref def="dt-owner"><!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">owner's</phrase></termref> <propref comp="std" prop="base type definition"/>'s
<compref ref="ff-c"/> <propref comp="ff-c" prop="value"/> is <pt>finite</pt>,</p></item><item><p>at least one of <compref ref="f-l"/>, <compref ref="f-mal"/>,
or <compref ref="f-td"/> is a member of the
<termref def="dt-owner"><!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">owner's</phrase></termref> <propref comp="std" prop="facets"/> set,</p></item><item><p><strong>all</strong> of the following are true:</p><olist role="and"><item><p>one of <compref ref="f-mii"/> or <compref ref="f-mie"/>
is a member of the <termref def="dt-owner"><!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">owner's</phrase></termref> <propref comp="std" prop="facets"/> set</p></item><item><p>one of <compref ref="f-mai"/> or <compref ref="f-mae"/>
is a member of the <termref def="dt-owner"><!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">owner's</phrase></termref> <propref comp="std" prop="facets"/> set</p></item><item><p><strong>either</strong> of the following are true:</p><olist role="orval"><item><p><compref ref="f-fd"/> is a member of the <termref def="dt-owner"><!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">owner's</phrase></termref> <propref comp="std" prop="facets"/> set</p></item><item><p><propref comp="std" prop="primitive type definition"/> is one of <dtref ref="date"/>,
  <dtref ref="gYearMonth"/>, <dtref ref="gYear"/>, <dtref ref="gMonthDay"/>,
  <dtref ref="gDay"/> or <dtref ref="gMonth"/></p></item></olist></item></olist></item></olist> 
 </p><!--ednote><edtext>The possible lists of items from an infinite
itemType is inherently infinite even when the list length is
bounded.&nbsp; This is a reported 1.0 bug.&nbsp; Alternatively, the
description of <specref ref="rf-cardinality"/> must be altered to
indicate that, for lists, the facet applies not to the value space but
to the possible <termref def="dt-length">lengths</termref> of the
values in that value space.</edtext></ednote--><p>
When <phrase dg="fpwd">the 
<termref def="dt-owner"><!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">owner's</phrase></termref></phrase>
<propref comp="std" prop="variety"/> is <pt>list</pt>,
if <compref ref="f-l"/> or both <!--*
* material suppressed here by diff group fa1 *
*--><compref ref="f-mil"/> and <compref ref="f-mal"/>
are <!--*
* material suppressed here by diff group fa1 *
*--><phrase dg="fa1">members of the
<termref def="dt-owner"><!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">owner's</phrase></termref> <propref comp="std" prop="facets"/> set
and the <termref def="dt-owner"><!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">owner's</phrase></termref> <propref comp="std" prop="item type definition"/>'s
<compref ref="ff-c"/> <propref comp="ff-c" prop="value"/> is <pt>finite</pt></phrase>
then <propref comp="ff-c" prop="value"/> is <pt>finite</pt>;
<!--*
* material suppressed here by diff group fa1 *
*--><phrase dg="fa1">otherwise</phrase>
<propref comp="ff-c" prop="value"/> is <pt>countably infinite</pt>.
</p><p>
When the <termref def="dt-owner"><!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">owner's</phrase></termref> <propref comp="std" prop="variety"/> is <pt>union</pt>,
if <compref ref="ff-c"/>'s <propref comp="ff-c" prop="value"/> is <emph>finite</emph>
for every member of <phrase dg="fa1">the <termref def="dt-owner"><!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">owner's</phrase></termref> </phrase><propref comp="std" prop="member type definitions"/><phrase dg="fa1"> set</phrase> then
<propref comp="ff-c" prop="value"/> is <pt>finite</pt>,
<!--*
* material suppressed here by diff group fa1 *
*--><phrase dg="fa1">otherwise</phrase> <propref comp="ff-c" prop="value"/>
is <pt>countably infinite</pt>.
</p></div4></div3><div3 id="rf-numeric"><head>numeric</head><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--*
* material suppressed here by diff group fa1 *
*--><!--
<p diff="add">Some ordered datatypes have the property that there is one value greater than or equal to
every other value, and another that less than or equal to every other value.&nbsp; (In the case of derived
datatypes, these two values may not be in the value space of the derived datatype, but must be in the
value space of the primitive datatype from which they have been derived.)  The <emph>bounded</emph>
facet value is <dtref ref="boolean"/> and is generally <pt>true</pt> for such <emph>bounded</emph> 
datatypes.&nbsp; However, it will remain <pt>false</pt> when the mechanism for imposing such a bound
is difficult to detect, as, for example, when the boundedness occurs because of derivation using a
<compref ref="rf-pattern"/> component.</p>
--><p dg="fa1">Some value spaces are made up of things that
are <!--*
* material suppressed here by diff group fa1-fix *
*-->
<phrase dg="fa1-fix">conceptually</phrase> 
<emph>numeric</emph>, others are
not. The <emph>numeric</emph> facet value indicates which are
considered numeric.
<!--* 
<phrase diff="add" dg="fa1-fix">In this specification, 
<termdef id="dt-numeric" term="numeric">a datatype is said to be
<term>numeric</term> if its <emph>numeric</emph> facet has the 
value <pt>true</pt></termdef>.
</phrase>
*-->
<!--* and otherwise non-numeric *-->
<!--* We don't seem to use 'non-numeric', so I won't restore
    * its definition. -msm *-->  
<!--* In fact, we don't actually use 'numeric' as a term at all.
    * The termrefs to dt-numeric should in fact all be property
    * references to comp="ff-n" -->
</p><div4 id="dc-numeric"><head>The numeric Schema Component</head><compdef name="numeric" abbrev="ff-n" showAKO="true"/><p>
<propref comp="ff-n" prop="value"/> depends on <phrase dg="fa1">the <termref def="dt-owner"><!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">owner's</phrase></termref> </phrase><propref comp="std" prop="variety"/>,
<propref comp="std" prop="facets"/>, <propref comp="std" prop="base type definition"/> and
<propref comp="std" prop="member type definitions"/><!--*
* material suppressed here by diff group fa1 *
*-->.
</p><p>
When <phrase dg="fa1">the <termref def="dt-owner"/> is <termref def="dt-primitive"/>, <propref comp="ff-n" prop="value"/> is as specified in the
table in <specref ref="app-fundamental-facets"/>.  Otherwise, when the <termref def="dt-owner"><!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">owner's</phrase></termref> </phrase><propref comp="std" prop="variety"/> is <pt>atomic</pt>,
<propref comp="ff-n" prop="value"/> is inherited from
<phrase dg="fa1">the <termref def="dt-owner"><!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">owner's</phrase></termref> <propref comp="std" prop="base type definition"/>'s <compref ref="ff-n"/></phrase><propref comp="ff-n" prop="value"/><!--*
* material suppressed here by diff group fa1 *
*-->.
</p><p>
When <phrase dg="fa1">the <termref def="dt-owner"><!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">owner's</phrase></termref> </phrase><propref comp="std" prop="variety"/> is <pt>list</pt>,
<propref comp="ff-n" prop="value"/> is <pt>false</pt>.
</p><p>
When <phrase dg="fa1">the 
<termref def="dt-owner"><!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">owner's</phrase></termref> 
</phrase><propref comp="std" prop="variety"/> is <pt>union</pt>,
if <phrase dg="fa1"><compref ref="ff-n"/>'s </phrase><propref comp="ff-n" prop="value"/> is <pt>true</pt>
for every member of <phrase dg="fa1">the <termref def="dt-owner"><!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">owner's</phrase></termref> </phrase><propref comp="std" prop="member type definitions"/><phrase dg="fa1"> set</phrase> then
<propref comp="ff-n" prop="value"/> is <pt>true</pt>,
<!--*
* material suppressed here by diff group fa1 *
*--><phrase dg="fa1">otherwise</phrase> <propref comp="ff-n" prop="value"/> is <pt>false</pt>.
</p></div4></div3></div2><div2 role="1.0" id="rf-facets"><head>Constraining Facets</head><!--*
* material suppressed here by diff group dp200701 *
*--><p dg="fa1">
<!--* MSM adds compdef here to repair damage done by careless fix to 3850,
    * which broke all comprefs to constraining facets. *-->
<!--* <compdef name="Constraining Facet" abbrev="f" role="termdef"/> *-->
<phrase id="f" dg="b3850"/>
<termdef term="constraining facet" id="dt-constraining-facet"><term><phrase>Constraining facets</phrase></term>
are schema components whose values may be set or changed
during <termref def="dt-derived">derivation</termref> (subject to facet-specific controls) 
to control various aspects of the derived datatype.</termdef> 
<phrase dg="b3850">All <termref def="dt-constraining-facet">constraining facet</termref> components 
<phrase dg="b3251">defined by this specification</phrase>
are
defined in this section.  </phrase>For example, 
<compref ref="f-w"/> is a <termref def="dt-constraining-facet">constraining facet</termref>. 
<termref def="dt-constraining-facet"><phrase>Constraining Facets</phrase></termref> are given a value as part of
the <termref def="dt-derived">derivation</termref>
<!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">when an <termref def="dt-ordinary"/> 
datatype is defined by <termref def="dt-fb-restriction">restricting</termref>
a <termref def="dt-primitive"/> or <termref def="dt-ordinary"/> datatype</phrase>; a few
<termref def="dt-constraining-facet">constraining facets</termref> have default values
that are also provided for <termref def="dt-primitive"/> datatypes.</p><note dg="fa1"><p>Schema components are identified by kind.  <quote>Constraining</quote> 
is not a kind of component.  Each kind of <termref def="dt-constraining-facet">constraining facet</termref>
(<quote>whiteSpace</quote>, 
<quote>length</quote>, etc.) is a separate kind of schema component. </p></note><p dg="b3251">
This specification distinguishes three kinds of constraining facets:<ulist><item><p><termdef id="dt-pre-lexical" term="pre-lexical">A constraining facet which
is used to normalize an initial <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase> before checking
to see whether the resulting character sequence is a member of a datatype's
<termref def="dt-lexical-space"/> is a <term>pre-lexical</term> facet.</termdef></p><p>This specification defines just one <termref def="dt-pre-lexical"/> facet:
<compref ref="f-w"/>.</p></item><item><p><termdef id="dt-lexical" term="lexical">A constraining facet which
directly restricts the <termref def="dt-lexical-space"/> of a datatype 
is a <term>lexical</term> facet.</termdef></p><p>This specification defines <phrase dg="b5030z">just one</phrase>
<!--*
* material suppressed here by diff group b5030z *
*--> <termref def="dt-lexical"/> facet<!--*
* material suppressed here by diff group b5030z *
*-->:
<compref ref="f-p"/><!--*
* material suppressed here by diff group b5030z *
*-->.</p><note><p>As specified normatively elsewhere, <termref def="dt-lexical"/> facets can have an indirect
effect on the <termref def="dt-value-space"/>:  if every lexical representation of a value
is removed from the <termref def="dt-lexical-space"/>, the value itself is removed
from the <termref def="dt-value-space"/>.</p></note></item><item><p><termdef id="dt-value-based" term="value-based">A constraining facet which
directly restricts the <termref def="dt-value-space"/> of a datatype 
is a <term>value-based</term> facet.</termdef></p><p>Most of the constraining facets defined by this specification
<!--*
* material suppressed here by diff group b5030z *
*--> are <termref def="dt-value-based"/> facets.</p><note><p>As specified normatively elsewhere, <termref def="dt-value-based"/> facets can have an indirect
effect on the <termref def="dt-lexical-space"/>:  if a value
is removed from the <termref def="dt-value-space"/>, its lexical representations
are removed
from the <termref def="dt-lexical-space"/>.</p></note><!--*
* material suppressed here by diff group b5030z *
*--></item></ulist>
</p><p dg="b3251">
Conforming processors <rfc2119>must</rfc2119>
support all the facets defined in this section.
It is <termref def="key-impl-def"/> whether a processor supports other
constraining facets.  <termdef id="dt-unknown-f" term="unknown">An
<!--* &impl-defined; *-->
<termref def="dt-constraining-facet">constraining facet</termref> which is not supported by
the processor in use is <term>unknown</term>.</termdef>
</p><note dg="b3251"><p>A reference to an <termref def="dt-unknown-f"/> facet might be a reference to
an <termref def="key-impl-def"/> facet supported by some other processor,
or might be the result of a typographic error, or might
have some other explanation.
</p></note><!-- This para was added by ep01-part2 in 2005 and deleted in 2006 by b3850.
If ep01-part2 is pre and b3850 is pre then this para should be pre.  ep01-b3850 pre.
(When ep01-part2 is pre then presumably b3850 can't be colour or post.)
If ep01-part2 is colour and b3850 is pre then this para should be add colour.  ep01-b3850 colour.
If ep01-part2 is colour and b3850 is colour then this para should be del colour outside of add colour.
    ep01-b3850-colours colour, ep01-b3850 pre.
(When ep01-part2 is colour then presumably b3850 can't be post.)
If ep01-part2 is post and b3850 is pre then this para should be post.  ep01-b3850 post.
If ep01-part2 is post and b3850 is colour then this para should be del colour.  ep-01-b3850 pre, ep01-b3850-rev colour.
If ep01-part2 is post and b3850 is post then this para should be pre.  epo1-b3850 pre.
   (ep01-b3850-colour is pre except in one instance each above.)
   (ep01-b3850-rev is post except in one instance each above.)

If ep01-part2 is pre and b3850 is pre then  ep01-b3850 should be pre, epo1-b3850-colours pre, ep01-b3850-rev post.
(When ep01-part2 is pre then presumably b3850 can't be colour or post.)
If ep01-part2 is colour and b3850 is pre then ep01-b3850 should be colour, epo1-b3850-colours pre, ep01-b3850-rev post.
If ep01-part2 is colour and b3850 is colour then ep01-b3850 should be pre, ep01-b3850-colours colour, ep01-b3850-rev post.
(When ep01-part2 is colour then presumably b3850 can't be post.)
If ep01-part2 is post and b3850 is pre then ep01-b3850 should be post, epo1-b3850-colours pre, ep01-b3850-rev post.
If ep01-part2 is post and b3850 is colour then ep-01-b3850 should be pre, epo1-b3850-colours pre, ep01-b3850-rev colour.
If ep01-part2 is post and b3850 is post then epo1-b3850 should be pre, epo1-b3850-colours pre, ep01-b3850-rev post.
   (ep01-b3850-colours should be pre except in one instance above.)
   (ep01-b3850-rev should be post except in one instance above.)
--><!--*
* material suppressed here by diff group ep01-b3850 *
*--><!--*
* material suppressed here by diff group ep01-b3850-rev *
*--><p dg="ep01-b3850-colours"><!--*
* material suppressed here by diff group ep01-b3850-colours *
*--><!--*
* material suppressed here by diff group ep01-b3850-colours *
*--></p><!--ednote><edtext>The WG agreed long ago to use 'information' rather
than 'fundamental' to describe fundamental facets.&nbsp; (We did not
come to an agreement on 'controlling' vs 'constraining', and I agreed
to make all references with an entity reference so that we can revert
all occurrences readily.)&nbsp; The question here is:&nbsp; Should we
change the simple type property from "{fundamental facets}" to
"{information facets}"?&emsp; &mdash;DP</edtext></ednote--><p dg="b3251">The descriptions of individual facets given
below include both constraints on <compref ref="std"/> components
and rules for checking the datatype validity of a given literal against
a given datatype.  The validation rules typically depend upon having
a full knowledge of the datatype; full knowledge of the datatype,
in turn, depends on having a fully instantiated <compref ref="std"/>.
A full instantiation of the <compref ref="std"/>, and the checking
of the component constraints, require knowledge of the <termref def="dt-basetype"/>.
It follows that if a datatype's <termref def="dt-basetype"/> is <termref def="dt-unknown-dt"/>, the
<compref ref="std"/> defining the datatype will be incompletely
instantiated, and the datatype itself will be <termref def="dt-unknown-dt"/>.
Similarly, any datatype defined using an <termref def="dt-unknown-f"/> <termref def="dt-constraining-facet">constraining facet</termref>
will be <termref def="dt-unknown-dt"/>.  It is not possible to perform datatype validation
as defined here using <termref def="dt-unknown-dt"/> datatypes.</p><note dg="b3251"><p>The preceding paragraph does not forbid implementations from attempting
to make use of such partial information as they have about <termref def="dt-unknown-dt"/>
datatypes.  But the exploitation of such partial knowledge is not
datatype validity checking as defined here and is to be distinguished
from it in the implementation's documentation and interface.</p></note><div3 role="1.0" id="rf-length"><head>length</head><!--* <issue id="RQ-147bi" role="1.1">
<p><loc href="&reqs;#E2-35-length-facet" target="reqs">RQ-147b (phase out length facet)</loc></p>
<p>The WG is considering the ramifications of removing the length &cfacet;, letting the schema document elements that currently set that
facet set both minLength and maxLength instead.</p>
</issue> *--><p>
<termdef id="dt-length" term="length" role="local">
<term>length</term> is the number
of <emph>units of length</emph>, where <emph>units of length</emph>
varies depending on the type that is being <termref def="dt-derived"/> from.
The value of <term>length</term>
<termref def="dt-must"/> be a
<dtref ref="nonNegativeInteger"/>.
</termdef>
</p><p>
For <dtref ref="string"/> and datatypes <termref def="dt-derived"/> from <dtref ref="string"/>,
<term>length</term> is measured in units of <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#dt-character">
character</xtermref>s as defined in <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>.
For <dtref ref="anyURI"/>, <term>length</term> is measured in units of
characters (as for <dtref ref="string"/>).
For <dtref ref="hexBinary"/> and <dtref ref="base64Binary"/> and datatypes 
<termref def="dt-derived"/> from them,
<term>length</term> is measured in octets (8 bits) of binary data.
For datatypes <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-constructed"/> by <termref def="dt-list"/>,
<term>length</term> is measured in number of list items.
<!--*
* material suppressed here by diff group ep99 *
*--></p><note><p>
For <dtref ref="string"/> and datatypes <termref def="dt-derived"/> from <dtref ref="string"/>,
<term>length</term> will not always coincide with <unusual>string length</unusual> as perceived
by some users or with the number of storage units in some digital representation. 
Therefore, care should be taken when specifying a value for <term>length</term>
and in attempting to infer storage requirements from a given value for
<term>length</term>.
</p></note><p>
<termref def="dt-length"/> provides for:
</p><ulist><item><p>
Constraining a <termref def="dt-value-space"/>
to values with a specific number of <emph>units of length</emph>,
where <emph>units of length</emph>
varies depending on <propref comp="std" prop="base type definition"/>.
</p></item></ulist><note role="example"><p>
The following is the definition of a <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-user-defined"/>
datatype to represent product codes which must be
exactly 8 characters in length.  By fixing the value of the
<term>length</term> facet we ensure that types derived from productCode can
change or set the values of other facets, such as <term>pattern</term>, but
cannot change the length.
</p><eg xml:space="preserve">&lt;simpleType name='productCode'&gt;
   &lt;restriction base='string'&gt;
     &lt;length value='8' fixed='true'/&gt;
   &lt;/restriction&gt;
&lt;/simpleType&gt;</eg></note><div4 role="1.0" id="dc-length"><head>The length Schema Component</head><compdef name="length" abbrev="f-l" showAKO="true"/><p>
If <propref comp="f-l" prop="fixed"/> is <emph>true</emph>, then types for which
the current type is the <propref comp="std" prop="base type definition"/> cannot specify a
value for <compref ref="f-l"/> other than <propref comp="f-l" prop="value"/>.
</p><note dg="b3950"><p>The <propref comp="f-l" prop="fixed"/> property is defined for
parallelism with other facets and for 
<phrase diff="del" dg="ep35">compatiblity</phrase><phrase diff="add" dg="ep35">compatibility</phrase> 
with version 1.0
of this specification. But it is a consequence of 
<specref ref="length-valid-restriction"/> that the value of
the <compref ref="f-l"/> facet cannot be changed, regardless of
whether <propref comp="f-l" prop="fixed"/> is 
<emph>true</emph> or <emph>false</emph>.
</p></note></div4><div4 role="1.0" id="xr-length"><head>XML Representation of length Schema Components</head><p>
The XML representation for a <compref ref="f-l"/> schema
component is a <eltref ref="length"/> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><reprdef><reprelt eltname="length"/><reprcomp abstract="length" ref="dc-fractionDigits"><propmap comp="f-l" prop="value">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>value</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>
</propmap><propmap comp="f-l" prop="fixed">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>fixed</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise <pt>false</pt>
</propmap><propmap comp="f-l" prop="annotations">
<!--*
* material suppressed here by diff group b3869 *
*-->
<phrase dg="b3869">The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-am-one">annotation mapping</xtermref> of the 
<eltref ref="length"/> 
element, as defined in 
  section <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#declare-annotation">XML Representation of Annotation Schema Components</xspecref>
  of <bibref ref="structural-schemas"/>.</phrase>
</propmap></reprcomp></reprdef></div4><div4 role="1.0" id="length-validation-rules"><head>length Validation Rules</head><constraintnote type="cvc" id="cvc-length-valid"><head>Length Valid</head><p>
A value in a <termref def="dt-value-space"/> is facet-valid with
respect to <termref def="dt-length"/><!--*
* material suppressed here by diff group iff *
*-->
<phrase dg="iff">if and only if:</phrase>
</p><olist><item><p>
if the <propref comp="std" prop="variety"/> is <termref def="dt-atomic"/> then
<olist><item><p>
if <propref comp="std" prop="primitive type definition"/> is <dtref ref="string"/> or <dtref ref="anyURI"/>, then the length of the value,
as measured in <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#dt-character">
character</xtermref>s 
<termref def="dt-must"/> be equal to <propref comp="f-l" prop="value"/>;
</p></item><item><p>
if <propref comp="std" prop="primitive type definition"/> is <dtref ref="hexBinary"/> or <dtref ref="base64Binary"/>, then the length of
the value, as measured in octets of the binary data, 
<termref def="dt-must"/> be 
equal to <propref comp="f-l" prop="value"/>;
</p></item><item><p>
if <propref comp="std" prop="primitive type definition"/> is <dtref ref="QName"/> or <dtref ref="NOTATION"/>, then any <propref comp="f-l" prop="value"/> is facet-valid.
</p></item></olist>
</p></item><item><p>
if the <propref comp="std" prop="variety"/> is <termref def="dt-list"/>,
then the length of the value, as measured in list items, 
<termref def="dt-must"/> be 
equal to <propref comp="f-l" prop="value"/>
</p></item></olist></constraintnote><p>

The use of <termref def="dt-length"/>
on <!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><dtref ref="QName"/>, <dtref ref="NOTATION"/>, and datatypes <termref def="dt-derived"/> from them</phrase>
is deprecated.  Future versions of this
specification may remove this facet for these datatypes.

</p></div4><div4 role="1.0" id="length-coss"><head>Constraints on length Schema Components</head><constraintnote type="cos" id="length-minLength-maxLength"><head>length and minLength or maxLength</head><p>If <compref ref="f-l"/> is a member of <propref comp="std" prop="facets"/> then
  <olist><item><p>It is an error for <compref ref="f-mil"/> to be a member of
<propref comp="std" prop="facets"/> unless
     <olist><item><p>the <propref comp="f-mil" prop="value"/> of <compref ref="f-mil"/> &lt;= the <propref comp="f-l" prop="value"/> of <compref ref="f-l"/> and</p></item><item><p>there is <phrase dg="b4900">some</phrase>
         type definition from which this one is derived by
         one or more <!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><termref def="dt-restriction"/></phrase> steps in which <compref ref="f-mil"/> has the same
         <propref comp="f-mil" prop="value"/> and <compref ref="f-l"/> is not specified.</p></item></olist>
    </p></item><item><p>It is an error for <compref ref="f-mal"/> to be a member of
<propref comp="std" prop="facets"/> unless
     <olist><item><p>the <propref comp="f-l" prop="value"/> of <compref ref="f-l"/> &lt;= the <propref comp="f-mal" prop="value"/> of <compref ref="f-mal"/> and</p></item><item><p>there is <phrase dg="b4900">some</phrase>
         type definition from which this one is derived by
         one or more restriction steps in which <compref ref="f-mal"/> has the same
         <propref comp="f-mal" prop="value"/> and <compref ref="f-l"/> is not specified.</p></item></olist>
    </p></item></olist>
 </p></constraintnote><constraintnote type="cos" id="length-valid-restriction"><head>length valid restriction</head><p>
It is an <termref def="dt-error"/> if <compref ref="f-l"/>
is among the members of <propref comp="std" prop="facets"/> of
<propref comp="std" prop="base type definition"/> and <propref comp="f-l" prop="value"/> is
not equal to the <propref comp="f-l" prop="value"/> of the parent
<compref ref="f-l"/>.
</p></constraintnote></div4></div3><div3 role="1.0" id="rf-minLength"><head>minLength</head><p>
<termdef id="dt-minLength" term="minLength" role="local">
<term>minLength</term> is
the minimum number of <emph>units of length</emph>, where
<emph>units of length</emph> varies depending on the type that is being
<termref def="dt-derived"/> from.
The value of <term>minLength</term>
 <termref def="dt-must"/> be a <dtref ref="nonNegativeInteger"/>.
</termdef>
</p><p>
For <dtref ref="string"/> and datatypes <termref def="dt-derived"/> from <dtref ref="string"/>,
<term>minLength</term> is measured in units of <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#dt-character">
character</xtermref>s as defined in <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>.
For <dtref ref="hexBinary"/> and <dtref ref="base64Binary"/> and datatypes <termref def="dt-derived"/> from them,
<term>minLength</term> is measured in octets (8 bits) of binary data.
For datatypes <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-constructed"/> by <termref def="dt-list"/>,
<term>minLength</term> is measured in number of list items.
</p><note><p>
For <dtref ref="string"/> and datatypes <termref def="dt-derived"/> from <dtref ref="string"/>,
<term>minLength</term> will not always coincide with "string length" as perceived
by some users or with the number of storage units in some digital representation.
Therefore, care should be taken when specifying a value for <term>minLength</term>
and in attempting to infer storage requirements from a given value for
<term>minLength</term>.
</p></note><p>
<termref def="dt-minLength"/> provides for:
</p><ulist><item><p>
Constraining a <termref def="dt-value-space"/>
to values with at least a specific number of <emph>units of length</emph>,
where <emph>units of length</emph>
varies depending on <propref comp="std" prop="base type definition"/>.
</p></item></ulist><note role="example"><p>
The following is the definition of a <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-user-defined"/>
datatype which requires strings to have at least one character (i.e.,
the empty string is not in the <termref def="dt-value-space"/>
of this datatype).
</p><eg xml:space="preserve">&lt;simpleType name='non-empty-string'&gt;
  &lt;restriction base='string'&gt;
    &lt;minLength value='1'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;</eg></note><div4 role="1.0" id="dc-minLength"><head>The minLength Schema Component</head><compdef name="minLength" abbrev="f-mil" showAKO="true"/><p>
If <propref comp="f-mil" prop="fixed"/> is <emph>true</emph>, then types for which
the current type is the <propref comp="std" prop="base type definition"/> cannot specify a
value for <compref ref="f-mil"/> other than <propref comp="f-mil" prop="value"/>.
</p></div4><div4 role="1.0" id="xr-minLength"><head>XML Representation of minLength Schema Component</head><p>
The XML representation for a <compref ref="f-mil"/> schema
component is a <eltref ref="minLength"/> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><reprdef><reprelt eltname="minLength"/><reprcomp abstract="minLength" ref="dc-fractionDigits"><propmap comp="f-mil" prop="value">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>value</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>
</propmap><propmap comp="f-mil" prop="fixed">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>fixed</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise <pt>false</pt>
</propmap><propmap comp="f-mil" prop="annotations">
<!--*
* material suppressed here by diff group b3869 *
*-->
<phrase dg="b3869">The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-am-one">annotation mapping</xtermref> of the 
<eltref ref="minLength"/> 
element, as defined in 
  section <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#declare-annotation">XML Representation of Annotation Schema Components</xspecref>
  of <bibref ref="structural-schemas"/>.</phrase>
</propmap></reprcomp></reprdef></div4><div4 role="1.0" id="minLength-validation-rules"><head>minLength Validation Rules</head><constraintnote type="cvc" id="cvc-minLength-valid"><head>minLength Valid</head><p>
A value in a <termref def="dt-value-space"/> is facet-valid with
respect to <termref def="dt-minLength"/>, determined as follows:
</p><olist><item><p>
if the <propref comp="std" prop="variety"/> is <termref def="dt-atomic"/> then
<olist><item><p>
if <propref comp="std" prop="primitive type definition"/> is <dtref ref="string"/> or
<dtref ref="anyURI"/>, then the
length of the value, as measured in<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#dt-character">
character</xtermref>s
<termref def="dt-must"/> be greater than or equal to
<propref comp="f-mil" prop="value"/>;
</p></item><item><p>
if <propref comp="std" prop="primitive type definition"/> is <dtref ref="hexBinary"/> or <dtref ref="base64Binary"/>, then the
length of the value, as measured in octets of the binary data,
<termref def="dt-must"/> be greater than or equal to
<propref comp="f-mil" prop="value"/>;
</p></item><item><p>

if <propref comp="std" prop="primitive type definition"/> is <dtref ref="QName"/> or <dtref ref="NOTATION"/>, then
any <propref comp="f-mil" prop="value"/> is facet-valid.
</p></item></olist>
</p></item><item><p>
if the <propref comp="std" prop="variety"/> is <termref def="dt-list"/>,
then the length of the value, as measured
in list items, <termref def="dt-must"/> be greater than or equal
to <propref comp="f-mil" prop="value"/>
</p></item></olist></constraintnote><p>

The use of <termref def="dt-minLength"/>
on <!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><dtref ref="QName"/>, <dtref ref="NOTATION"/>, and datatypes <termref def="dt-derived"/> from them</phrase>
is deprecated.  Future versions of this
specification may remove this facet for these datatypes.

</p></div4><div4 role="1.0" id="minLength-coss"><head>Constraints on minLength Schema Components</head><constraintnote type="cos" id="minLength-less-than-equal-to-maxLength"><head>minLength &lt;= maxLength</head><p>
If both <compref ref="f-mil"/> and <compref ref="f-mal"/>
are members of <propref comp="std" prop="facets"/>, then the
<propref comp="f-mil" prop="value"/> of <compref ref="f-mil"/>
 <termref def="dt-must"/> be less than or equal to the
<propref comp="f-mal" prop="value"/> of <compref ref="f-mal"/>.
</p></constraintnote><constraintnote type="cos" id="minLength-valid-restriction"><head>minLength valid restriction</head><p>
It is an <termref def="dt-error"/> if <compref ref="f-mil"/>
is among the members of <propref comp="std" prop="facets"/> of
<propref comp="std" prop="base type definition"/> and <propref comp="f-mil" prop="value"/> is
less than the <propref comp="f-mil" prop="value"/> of the parent
<compref ref="f-mil"/>.
</p></constraintnote></div4></div3><div3 role="1.0" id="rf-maxLength"><head>maxLength</head><p>
<termdef id="dt-maxLength" term="maxLength" role="local">
<term>maxLength</term> is
the maximum number of <emph>units of length</emph>, where
<emph>units of length</emph> varies
depending on the type that is being <termref def="dt-derived"/> from.
The value of <term>maxLength</term>
 <termref def="dt-must"/> be a <dtref ref="nonNegativeInteger"/>.
</termdef>
</p><p>
For <dtref ref="string"/> and datatypes <termref def="dt-derived"/> from <dtref ref="string"/>,
<term>maxLength</term> is measured in units of <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#dt-character">
character</xtermref>s as defined in <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>.
For <dtref ref="hexBinary"/> and <dtref ref="base64Binary"/> and datatypes <termref def="dt-derived"/> from them,
<term>maxLength</term> is measured in octets (8 bits) of binary data.
For datatypes <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-constructed"/> by <termref def="dt-list"/>,
<term>maxLength</term> is measured in number of list items.
</p><note><p>
For <dtref ref="string"/> and datatypes <termref def="dt-derived"/> from <dtref ref="string"/>,
<term>maxLength</term> will not always coincide with "string length" as perceived
by some users or with the number of storage units in some digital representation.
Therefore, care should be taken when specifying a value for <term>maxLength</term>
and in attempting to infer storage requirements from a given value for
<term>maxLength</term>.
</p></note><p>
<termref def="dt-maxLength"/> provides for:
</p><ulist><item><p>
Constraining a <termref def="dt-value-space"/>
to values with at most a specific number of <emph>units of length</emph>,
where <emph>units of length</emph>
varies depending on <propref comp="std" prop="base type definition"/>.
</p></item></ulist><note role="example"><p>
The following is the definition of a <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-user-defined"/>
datatype which might be used to accept form input with an upper limit
to the number of characters that are acceptable.
</p><eg xml:space="preserve">&lt;simpleType name='form-input'&gt;
  &lt;restriction base='string'&gt;
    &lt;maxLength value='50'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;</eg></note><div4 role="1.0" id="dc-maxLength"><head>The maxLength Schema Component</head><compdef name="maxLength" abbrev="f-mal" showAKO="true"/><p>
If <propref comp="f-mal" prop="fixed"/> is <emph>true</emph>, then types for which
the current type is the <propref comp="std" prop="base type definition"/> cannot specify a
value for <compref ref="f-mal"/> other than <propref comp="f-mal" prop="value"/>.
</p></div4><div4 role="1.0" id="xr-maxLength"><head>XML Representation of maxLength Schema Components</head><p>
The XML representation for a <compref ref="f-mal"/> schema
component is a <eltref ref="maxLength"/> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><reprdef><reprelt eltname="maxLength"/><reprcomp abstract="maxLength" ref="dc-fractionDigits"><propmap comp="f-mal" prop="value">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>value</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>
</propmap><propmap comp="f-mal" prop="fixed">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>fixed</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise <pt>false</pt>
</propmap><propmap comp="f-mal" prop="annotations">
<!--*
* material suppressed here by diff group b3869 *
*-->
<phrase dg="b3869">The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-am-one">annotation mapping</xtermref> of the 
<eltref ref="maxLength"/> 
element, as defined in 
  section <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#declare-annotation">XML Representation of Annotation Schema Components</xspecref>
  of <bibref ref="structural-schemas"/>.</phrase>
</propmap></reprcomp></reprdef></div4><div4 role="1.0" id="maxLength-validation-rules"><head>maxLength Validation Rules</head><constraintnote type="cvc" id="cvc-maxLength-valid"><head>maxLength Valid</head><p>
A value in a <termref def="dt-value-space"/> is facet-valid with
respect to <termref def="dt-maxLength"/>, determined as follows:
</p><olist><item><p>
if the <propref comp="std" prop="variety"/> is <termref def="dt-atomic"/> then
<olist><item><p>
if <propref comp="std" prop="primitive type definition"/> is <dtref ref="string"/> or
<dtref ref="anyURI"/>, then the
length of the value, as measured in <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#dt-character">
character</xtermref>s
<termref def="dt-must"/> be less than or equal to
<propref comp="f-mal" prop="value"/>;
</p></item><item><p>
if <propref comp="std" prop="primitive type definition"/> is <dtref ref="hexBinary"/> or <dtref ref="base64Binary"/>, then the
length of the value, as measured in octets of the binary data,
<termref def="dt-must"/> be less than or equal to <propref comp="f-mal" prop="value"/>;
</p></item><item><p>

if <propref comp="std" prop="primitive type definition"/> is <dtref ref="QName"/> or <dtref ref="NOTATION"/>, then
any <propref comp="f-mal" prop="value"/> is facet-valid.
</p></item></olist>
</p></item><item><p>
if the <propref comp="std" prop="variety"/> is <termref def="dt-list"/>,
then the length of the value, as measured
in list items, <termref def="dt-must"/> be less than or equal to
<propref comp="f-mal" prop="value"/>
</p></item></olist></constraintnote><p>

The use of <termref def="dt-maxLength"/>
on <!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><dtref ref="QName"/>, <dtref ref="NOTATION"/>, and datatypes <termref def="dt-derived"/> from them</phrase>
is deprecated.  Future versions of this
specification may remove this facet for these datatypes.

</p></div4><div4 role="1.0" id="maxLength-coss"><head>Constraints on maxLength Schema Components</head><constraintnote type="cos" id="maxLength-valid-restriction"><head>maxLength valid restriction</head><p>
It is an <termref def="dt-error"/> if <compref ref="f-mal"/>
is among the members of <propref comp="std" prop="facets"/> of
<propref comp="std" prop="base type definition"/> and <propref comp="f-mal" prop="value"/> is
greater than the <propref comp="f-mal" prop="value"/> of the parent
<compref ref="f-mal"/>.
</p></constraintnote></div4></div3><div3 role="1.0" id="rf-pattern"><head>pattern</head><!--* The pattern-1929 (pattern value as set) story embedded in this section makes
    * some improvements which should be retained even if the WG wants to 
    * stay with the value-as-regex (pvare) story, instead.
    * Comments are inserted to help me remember which bits, in case the
    * WG goes that way.  The comments can go away once the decision is
    * made (expected September 2005).
    *--><!--*
* material suppressed here by diff group ap090709 *
*--><p><termdef id="dt-pattern" term="pattern" role="local">
<term>pattern</term> is a constraint on the
<termref def="dt-value-space"/> of a datatype which is achieved by
constraining the <termref def="dt-lexical-space"/> to <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase>
which match
<!--*
* material suppressed here by diff group pattern-1929 *
*--><phrase dg="pattern-1929">each
member of a set of
<!--*
* material suppressed here by diff group b6908 *
*--><phrase dg="b6908"><termref def="dt-regex">regular
expressions</termref></phrase></phrase>.<phrase> 
The value of <term>pattern</term>
 <!--*
* material suppressed here by diff group pattern-1929 *
*--><phrase dg="pattern-1929"><rfc2119>must</rfc2119></phrase>
be a <phrase dg="pattern-1929">set of 
<termref def="dt-regex">regular expressions</termref></phrase>.</phrase>
<!--* 2009-07-15 : MSM : the preceding sentence was marked as deleted
for bug 6908, but the minutes don't show such a change being
proposed or approved, so I'm reverting it. *-->
</termdef>
<!--* For pvare: s/must/&must;/ *-->
</p><note dg="b6908"><p>An XML <eltref ref="restriction"/>
containing more than one <eltref ref="pattern"/> element gives
rise to a single <termref def="dt-regex"/> in the set; this 
<termref def="dt-regex"/> is an <unusual>or</unusual> of
the <termref def="dt-regex">regular expressions</termref> that
are the content of the <eltref ref="pattern"/> elements.</p></note><p>
<phrase dg="ed-pattern"><termref def="dt-pattern"/></phrase><!--*
* material suppressed here by diff group ed-pattern *
*--> provides for:
</p><ulist><item><p>Constraining a <termref def="dt-value-space"/>
to values that are denoted by <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase> which match 
<!--*
* material suppressed here by diff group pattern-1929 *
*-->
<phrase dg="pattern-1929">each of a set of 
<termref def="dt-regex">regular expressions</termref></phrase>.
</p></item></ulist><note role="example"><p>
The following is the definition of a <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-user-defined"/>
datatype which is a better representation of postal codes in the
United States, by limiting strings to those which are matched by
a specific <termref def="dt-regex"/>.
</p><eg xml:space="preserve">&lt;simpleType name='better-us-zipcode'&gt;
  &lt;restriction base='string'&gt;
    &lt;pattern value='[0-9]{5}(-[0-9]{4})?'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;</eg></note><div4 role="1.0" id="dc-pattern"><head>The pattern Schema Component</head><compdef name="pattern" abbrev="f-p" showAKO="true"/></div4><div4 role="1.0" id="xr-pattern"><head>XML Representation of pattern Schema Components</head><p>
The XML representation for a <compref ref="f-p"/> schema
component is <!--*
* material suppressed here by diff group b5030 *
*-->
<phrase dg="b5030">one or more</phrase> <eltref ref="pattern"/>
element information item<phrase dg="b5030">s</phrase>. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><reprdef><reprelt eltname="pattern"/><reprcomp abstract="pattern" ref="dc-pattern"><reprdep>
<!--*
* material suppressed here by diff group pattern-1929 *
*-->
</reprdep><propmap comp="f-p" prop="value">
<!--*
* material suppressed here by diff group pattern-1929 *
*-->
 <termdef term="R" role="local" id="l-R" dg="pattern-1929">Let <term>R</term> be a regular
expression given by
  </termdef>
 <olist role="caseval" dg="pattern-1929"><item><p role="if">there is only one <eltref ref="pattern"/> among the 
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of a <eltref ref="restriction"/></p><p role="then">the <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of its <code>value</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref></p></item><item><p role="otherwise">the concatenation of the <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual values</xtermref> of 
all the <eltref ref="pattern"/> 
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>'s <code>value</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref>, in order,
separated by <string>|</string>, so forming a single regular expression with multiple
<termref def="dt-branch">branches</termref>.</p></item></olist>
 <phrase dg="pattern-1929">The value is then given by</phrase>
 <olist role="caseval" dg="pattern-1929"><item><p role="if">the <propref comp="std" prop="base type definition"/> of the
<termref def="dt-owner"/> has a <compref ref="f-p"/> facet among its <propref comp="std" prop="facets"/></p><p role="then">the union of that <compref ref="f-p"/> facet's <propref comp="f-p" prop="value"/> and {<termref def="l-R" role="local">R</termref>}</p></item><item><p role="otherwise">just {<termref def="l-R" role="local">R</termref>}</p></item></olist>
</propmap><!--* <propmap comp="f-p" prop="value"> <phrase diff="add"
dg="pattern-1929">[Story A]</phrase> <phrase diff="del"
dg="pattern-1929">The</phrase><phrase diff="add" dg="pattern-1929">If there is just
one <eltref ref="pattern"/> element among the &i-children; of a
<eltref ref="restriction"/>, then the <propref comp="f-p"
prop="value"/> is the</phrase> &v-value; of the <code>value</code>
&i-attribute;<phrase diff="add" dg="pattern-1929">.  If there is more than one
<eltref ref="pattern"/> among the &i-children; of a <eltref
ref="restriction"/>, then the <propref comp="f-p" prop="value"/> is
the regular expression formed by concatenating the &v-values; of all
their <code>value</code> &i-attributes;, separated by
<string>|</string>, to form a single regular expression with multiple
<termref def="dt-branch">branches</termref> (see <specref
ref="src-multiple-patterns"/> below.)</phrase>.  </propmap> *--><propmap comp="f-p" prop="annotations">
<!--*
* material suppressed here by diff group b3869 *
*-->
<phrase dg="b3869">
    The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-am-set">annotation mapping</xtermref> of the set containing all of the
    <eltref ref="pattern"/> elements among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of the
    <eltref ref="restriction"/> element information item,
    as defined in section <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#declare-annotation">XML Representation of Annotation Schema Components</xspecref>
    of <bibref ref="structural-schemas"/>.
</phrase>
</propmap></reprcomp></reprdef><note><p dg="pattern-1929">The <propref comp="f-p" prop="value"/> property 
    will only have more than one member when <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-fb-restriction"/> involves 
    a <compref ref="f-p"/> facet at more than one step in a 
    type derivation.  During validation, lexical forms will be 
    checked against every member of the resulting <propref comp="f-p" prop="value"/>, effectively 
    creating a conjunction of patterns.</p><p>
<!--*
* material suppressed here by diff group pattern-1929 *
*--><phrase dg="pattern-1929">In summary,</phrase> <phrase dg="ed-pattern"><termref def="dt-pattern"/></phrase><!--*
* material suppressed here by diff group ed-pattern *
*-->
facets specified on the <emph>same</emph> step in a type
derivation are <strong>OR</strong>ed together, while <phrase dg="ed-pattern"><termref def="dt-pattern"/></phrase><!--*
* material suppressed here by diff group ed-pattern *
*-->
facets specified on <emph>different</emph> steps of a type derivation
are <strong>AND</strong>ed together.
</p><p>
Thus, to impose two <phrase dg="ed-pattern"><termref def="dt-pattern"/></phrase><!--*
* material suppressed here by diff group ed-pattern *
*--> constraints simultaneously,
schema authors may either write a single <phrase dg="ed-pattern"><termref def="dt-pattern"/></phrase><!--*
* material suppressed here by diff group ed-pattern *
*--> which
expresses the intersection of the two <phrase dg="ed-pattern"><termref def="dt-pattern"/></phrase><!--*
* material suppressed here by diff group ed-pattern *
*-->s they wish to
impose, or define each <phrase dg="ed-pattern"><termref def="dt-pattern"/></phrase><!--*
* material suppressed here by diff group ed-pattern *
*--> on a separate type derivation
step.
</p></note></div4><div4 role="1.0" id="pattern-rep-constr"><head>Constraints on XML Representation of pattern</head><constraintnote type="src" id="src-pattern-value" dg="pattern-1929"><head>Pattern value</head><p>The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>value</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> must be a 
<!--*
* material suppressed here by diff group pattern-1929 *
*-->
<termref def="dt-regex"/><phrase dg="pattern-1929"> as
defined in <specref ref="regexs"/></phrase>.</p></constraintnote><!--*
* material suppressed here by diff group pattern-1929 *
*--></div4><div4 role="1.0" id="pattern-validation-rules"><head>pattern Validation Rules</head><constraintnote type="cvc" id="cvc-pattern-valid"><head>pattern valid</head><p>A <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase> in a <termref def="dt-lexical-space"/> is <phrase dg="b2911">pattern-valid (or:</phrase> facet-valid with
respect to <phrase dg="ed-pattern"><termref def="dt-pattern"/></phrase><!--*
* material suppressed here by diff group ed-pattern *
*--><phrase dg="b2911">)</phrase> 
if<phrase dg="iff"> and only if</phrase>
<phrase dg="pattern-1929">for each
<termref def="dt-regex"/> in its  <propref comp="f-p" prop="value"/>,</phrase>
the <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase> is among the set of character sequences denoted by
the <termref def="dt-regex"/><!--*
* material suppressed here by diff group pattern-1929 *
*-->.
</p><!--* 
<p><phrase diff="add" dg="pattern-1929">[Story A]</phrase>
A &literal; in a &lexical_space; is facet-valid with
respect to &pattern.tc; 
if<phrase diff="add" dg="iff"> and only if</phrase>
the &literal; is among the set of character sequences denoted by
the <termref def="dt-regex"/> specified in
<propref comp="f-p" prop="value"/>.
</p> *--></constraintnote><!--HST removed this as very similar to the note added to the previous
section, but MSM may wish to discuss this . . .

MSM agrees with HST: it's a dup. MSM studiously avoids having an opinion
on which location is better.

<note diff="add" dg="pattern-1929">
<p>[[Lose this?]]</p>
<p>When <phrase diff="del" dg="ed-pattern"><termref def="dt-pattern">patterns</termref></phrase><phrase diff="add" dg="ed-pattern"><compref ref="f-p" name="patterns"/></phrase> 
are specified on more than one derivation step, there will be one pattern
facet with more than one member in its <propref comp="f-p" prop="value"/>;
to be facet-valid with respect to &pattern.tc;,
a &literal; &must; satisfy all members of the set.</p>
</note>--><!--* <note diff="add" dg="pattern-1929">
<p><phrase diff="add" dg="pattern-1929">[Story A]</phrase> When <phrase
diff="del" dg="ed-pattern"><termref def="dt-pattern"
>patterns</termref></phrase><phrase diff="add"
dg="ed-pattern"><compref ref="f-p">patterns</compref></phrase> are
specified on more that one derivation step, there will be more than
one pattern facet; to be facet-valid with respect to &pattern.tc;, a
&literal; &must; satisfy all of them.</p>
</note> *--><note dg="rq126"><p>
As noted in <specref ref="datatype"/>,
certain uses of the <phrase dg="ed-pattern"><termref def="dt-pattern"/></phrase><!--*
* material suppressed here by diff group ed-pattern *
*--> facet may
eliminate from the lexical space the canonical forms of some values
in the value space; this can be inconvenient for applications
which write out the canonical form of a value and rely on
being able to read it in again as a legal lexical form.
This specification provides no recourse in such situations;
applications are free to deal with it as they see fit.
Caution is advised.
</p><!--* if examples are needed, try totally ordered subtypes of
    * duration, or possibly integer *--></note></div4><div4 dg="b2728-1" id="pattern-constraints"><head>Constraints on pattern Schema Components</head><constraintnote type="cos" id="cos-pattern-restriction"><head>Valid restriction of pattern</head><p>It is an <termref def="dt-error"/> if there is any member of 
the <propref comp="f-p" prop="value"/> of the 
<compref ref="f-p"/> facet on the 
<propref comp="std" prop="base type definition"/>
which is not also a member of the
<propref comp="f-p" prop="value"/>.</p><note dg="b2728-2"><p>For components constructed from XML representations in schema documents, 
the satisfaction of this constraint is a consequence of the XML mapping rules:
any pattern imposed by a simple type definition <var>S</var> will always 
also be imposed by any type derived from <var>S</var> by <termref def="dt-fb-restriction"/>.
This constraint ensures that components constructed by other means
(so-called <quote>born-binary</quote> components) similarly preserve
<compref ref="f-p"/> facets across <termref def="dt-fb-restriction"/>.
</p></note></constraintnote></div4></div3><div3 role="1.0" id="rf-enumeration"><head>enumeration</head><p>
<termdef id="dt-enumeration" term="enumeration" role="local">
<term>enumeration</term> constrains the <termref def="dt-value-space"/>
to a specified set of values.
</termdef>
</p><p>
<term>enumeration</term> does not impose an order relation on the
<termref def="dt-value-space"/> it creates; the value of the
<termref def="dt-ordered"/> property of the <termref def="dt-derived"/>
datatype remains that of the datatype from which it is
<termref def="dt-derived"/>.
</p><p>
<termref def="dt-enumeration"/> provides for:
</p><ulist><item><p>
Constraining a <termref def="dt-value-space"/>
to a specified set of values.
</p></item></ulist><note role="example"><p>
The following example is a <!--*
* material suppressed here by diff group rec12-main *
*--><phrase dg="rec12-main"><compref ref="std"/></phrase> 
for a <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-user-defined"/> datatype which limits the values
of dates to the three US holidays enumerated. This 
<!--*
* material suppressed here by diff group rec12-main *
*-->
<phrase dg="rec12-main"><compref ref="std"/></phrase> 
would appear in a schema authored by an "end-user" and
shows how to define a datatype by enumerating the values in its
<termref def="dt-value-space"/>.  The enumerated values must be
type-valid <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase> for the <termref def="dt-basetype"/>.
</p><eg xml:space="preserve">&lt;simpleType name='holidays'&gt;
    &lt;annotation&gt;
        &lt;documentation&gt;some US holidays&lt;/documentation&gt;
    &lt;/annotation&gt;
    &lt;restriction base='gMonthDay'&gt;
      &lt;enumeration value='--01-01'&gt;
        &lt;annotation&gt;
            &lt;documentation&gt;New Year's day&lt;/documentation&gt;
        &lt;/annotation&gt;
      &lt;/enumeration&gt;
      &lt;enumeration value='--07-04'&gt;
        &lt;annotation&gt;
            &lt;documentation&gt;4th of July&lt;/documentation&gt;
        &lt;/annotation&gt;
      &lt;/enumeration&gt;
      &lt;enumeration value='--12-25'&gt;
        &lt;annotation&gt;
            &lt;documentation&gt;Christmas&lt;/documentation&gt;
        &lt;/annotation&gt;
      &lt;/enumeration&gt;
    &lt;/restriction&gt;
&lt;/simpleType&gt;</eg></note><div4 role="1.0" id="dc-enumeration"><head>The enumeration Schema Component</head><compdef name="enumeration" abbrev="f-e" showAKO="true"/></div4><!--* HERE *--><div4 role="1.0" id="xr-enumeration"><!--* True confessions dept:  
    * The material marked 'rec12-main-dub' in this and the
    * following div4 was (a) not approved in Edinburgh, and (b) explicitly
    * excluded from the proposal approved by the WG on 18 November 2005,
    * by being marked show="nsq" instead of show="colour".  It has thus
    * never been officially approved.  And yet I'm going to mark it approved,
    * because I am so sick and tired of dealing with the residue of our
    * Edinburgh meetings and the ensuing confusion, and even more sick and
    * tired of arguing with those who say it doesn't really matter what the
    * minutes say.
    *
    * Rationale:
    * I suspect that the only reason it was marked as
    * nsq instead of colour was that HT believed it had actually been approved
    * in Edinburgh; that leaves me with the unsolved mystery of why text
    * believed to have been approved by the WG was marked nsq instead of 
    * post.  The WG, meanwhile, seems to have disregarded the distinction
    * between nsq and colour: the minutes show one amendment to the proposal,
    * which hits material which was marked nsq, not part of the proposal.
    *
    * To salvage a shred of my self-respect I'm at least going to segregate
    * it into separate diff groups.
    *--><head>XML Representation of enumeration Schema Components</head><p>
The XML representation for an <compref ref="f-e"/> schema
component is <!--*
* material suppressed here by diff group b5030 *
*-->
<phrase dg="b5030">one or more</phrase> <eltref ref="enumeration"/>
element information item<phrase dg="b5030">s</phrase>. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><reprdef><reprelt eltname="enumeration"/><reprcomp abstract="enumeration" ref="dc-enumeration"><reprdep>
<!--*
* material suppressed here by diff group rec12-main-dub *
*-->
</reprdep><!--*
* material suppressed here by diff group enum-2454 *
*--><propmap comp="f-e" prop="value" dg="enum-2454">
 <olist role="Caseval"><item><p role="if">there is only one <eltref ref="enumeration"/> 
among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of a <eltref ref="restriction"/></p><p role="then">a set with one member, the <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of its <code>value</code> 
<xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref><phrase dg="b5328">, 
<!--* using the &lexical_mapping; of  *-->
interpreted as an instance of 
the <propref comp="std" prop="base type definition"/></phrase>.</p></item><item><p role="otherwise">a set of the <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual values</xtermref> of all the <eltref ref="enumeration"/> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref>'s <code>value</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attributes</xpropref><phrase dg="b5328">, interpreted as instances of 
the <propref comp="std" prop="base type definition"/></phrase>.</p></item></olist>
<note dg="b5328"><p>The <att>value</att> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> is declared as having
type <termref def="dt-anySimpleType"><phrase><code>anySimpleType</code></phrase></termref>, but the 
<propref comp="f-e" prop="value"/> property of the 
<compref ref="f-e"/> facet <rfc2119>must</rfc2119> be a member of the
<propref comp="std" prop="base type definition"/>.
So in mapping from the XML representation
to the <compref ref="f-e"/> component, the <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> is
identified by using the <termref def="dt-lexical-mapping"/> of the 
<propref comp="std" prop="base type definition"/>.
</p></note>

</propmap><!--*
* material suppressed here by diff group enum-2454 *
*--><propmap comp="f-e" prop="annotations" dg="enum-2454">
A (possibly empty) sequence of 
<compref ref="a" name="Annotation"/> components, one for each <eltref ref="annotation"/> among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of the <eltref ref="enumeration"/>s among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of a <eltref ref="restriction"/>, in order.</propmap></reprcomp></reprdef></div4><div4 role="1.0" id="enumeration-rep-constr"><head>Constraints on XML Representation of enumeration</head><constraintnote type="src" id="src-enumeration-value" dg="rec12-main-dub"><head>Enumeration value</head><p>The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-nv">normalized value</xtermref> 
<!--* was &i-value;, changed to nv after SG's comment approved by WG in 2005-08.
http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2005Jul/0006.html *-->
of the <code>value</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref> must be
<specref ref="cvc-datatype-valid"/> with respect to the 
<propref comp="std" prop="base type definition"/> of the <compref ref="std"/>
corresponding to the 
nearest <!--* 'nearest' inserted by WG amendment 2005-11-18 *-->
<eltref ref="simpleType"/> ancestor<phrase dg="rec12-map-1853">
element</phrase>.</p></constraintnote><!--*
* material suppressed here by diff group enum-2454 *
*--></div4><!--* HERE ENDETH *--><div4 role="1.0" id="enumeration-validation-rules"><head>enumeration Validation Rules</head><constraintnote type="cvc" id="cvc-enumeration-valid"><head>enumeration valid</head><p>
A value in a <termref def="dt-value-space"/> is facet-valid with
respect to <termref def="dt-enumeration"/> 
if<phrase dg="iff"> and only if</phrase>
the value is 
<phrase dg="wgi-20080530"><!--*
* material suppressed here by diff group b9196 *
*--><phrase dg="b9196">equal or identical</phrase>
to</phrase>
one of the values specified in
<propref comp="f-e" prop="value"/><phrase dg="rec12-main">.</phrase>
</p></constraintnote><note dg="b2046"><p>As specified normatively elsewhere, for purposes of checking
enumerations, no distinction is made between an atomic value <var>V</var>
and a list of length one containing <var>V</var> as its only item.</p><p>In this question, the behavior of this specification is thus
the same as the behavior specified by <bibref ref="F_O"/>
and related specifications.</p></note></div4><div4 role="1.0" id="enumeration-coss"><head>Constraints on enumeration Schema Components</head><constraintnote type="cos" id="enumeration-valid-restriction"><head>enumeration valid restriction</head><p>
It is an <termref def="dt-error"/> if any member of <propref comp="f-e" prop="value"/> is not in the <termref def="dt-value-space"/>
of <propref comp="std" prop="base type definition"/>.
</p></constraintnote></div4></div3><div3 role="1.0" id="rf-whiteSpace"><head>whiteSpace</head><p>
<termdef id="dt-whiteSpace" term="whiteSpace" role="local">
<term>whiteSpace</term> constrains the <termref def="dt-value-space"/>
of types <termref def="dt-derived"/> from <dtref ref="string"/> such that
the various behaviors
specified in <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#AVNormalize">Attribute Value Normalization</xspecref>
in <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/> are realized.  The value of
<term>whiteSpace</term> must be one of {preserve, replace, collapse}.
</termdef>
</p><glist><gitem><label>preserve</label><def><p>
No normalization is done, the value is not changed (this is the
behavior required  by <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/> for element content)
</p></def></gitem><gitem><label>replace</label><def><p>
All occurrences of #x9 (tab), #xA (line feed) and #xD (carriage return)
are replaced with #x20 (space)
</p></def></gitem><gitem><label>collapse</label><def><p>
After the processing implied by <term>replace</term>, contiguous
sequences of #x20's are collapsed to a single #x20, and <!--*
* material suppressed here by diff group b6695 *
*--><phrase dg="b6695">any #x20
at the start or end of the string is then</phrase> removed.
</p></def></gitem></glist><note><p>
The notation #xA used here (and elsewhere in this specification)
represents the Universal Character Set (UCS) code point
<code>hexadecimal A</code> (line feed), which is denoted by
U+000A.  This notation is to be distinguished from
<code>&amp;#xA;</code>, which is the XML <xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-CharRef">character reference</xnt> to that same UCS
code point.
</p></note><p>
<term>whiteSpace</term> is applicable to all <termref def="dt-atomic"/> and
<termref def="dt-list"/> datatypes.  For all <termref def="dt-atomic"/>
datatypes other than <dtref ref="string"/> (and types <termref def="dt-derived"/>
by <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-fb-restriction"/> from it) the value of <term>whiteSpace</term> is
<code>collapse</code> and cannot be changed by a schema author; for
<dtref ref="string"/> the value of <term>whiteSpace</term> is
<code>preserve</code>; for any type <termref def="dt-derived"/> by
<!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-fb-restriction"/> from
<dtref ref="string"/> the value of <term>whiteSpace</term> can
be any of the three legal values<phrase dg="b11961">
(as long as the value is at least as restrictive as
the value of the <termref def="dt-basetype"/>; see
<specref ref="whiteSpace-coss"/>)</phrase>.  For all datatypes
<!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-constructed"/> by <termref def="dt-list"/> the
value of <term>whiteSpace</term> is <code>collapse</code> and cannot
be changed by a schema author.  For all datatypes
<!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-constructed"/> by <termref def="dt-union"/>
 <term>whiteSpace</term> does not apply directly; however, the
normalization behavior of <termref def="dt-union"/> types is controlled by
the value of <term>whiteSpace</term> on that one of the
<!--*
* material suppressed here by diff group b2044 *
*--><phrase dg="b2044"><termref def="dt-basicmember">basic members</termref></phrase> 
against which the <phrase dg="ep99"><termref def="dt-union"/></phrase><!--*
* material suppressed here by diff group ep99 *
*-->
is successfully validated.
</p><note><p>
For more information on <term>whiteSpace</term>, see the
discussion on white space normalization in
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#components">Schema Component Details</xspecref>
in <bibref ref="structural-schemas"/>.
</p></note><p>
<termref def="dt-whiteSpace"/> provides for:
</p><ulist><item><p>
Constraining a <termref def="dt-value-space"/> according to
the white space normalization rules.
</p></item></ulist><note role="example"><p>
The following example is the <!--*
* material suppressed here by diff group rec12-main *
*-->
<phrase dg="rec12-main"><compref ref="std"/></phrase> for
the <phrase dg="rq120"><termref def="dt-built-in"/>
</phrase><dtref ref="token"/><!--*
* material suppressed here by diff group rq120 *
*-->
datatype.
</p><eg xml:space="preserve">&lt;simpleType name='token'&gt;
    &lt;restriction base='normalizedString'&gt;
      &lt;whiteSpace value='collapse'/&gt;
    &lt;/restriction&gt;
&lt;/simpleType&gt;</eg></note><note dg="b2533-rq127-r196"><p>The values <quote><code>replace</code></quote> and 
<quote><code>collapse</code></quote> 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><div4 role="1.0" id="dc-whiteSpace"><head>The whiteSpace Schema Component</head><compdef name="whiteSpace" abbrev="f-w" showAKO="true"/><p>
If <propref comp="f-w" prop="fixed"/> is <emph>true</emph>, then types for which
the current type is the <propref comp="std" prop="base type definition"/> cannot specify a
value for <compref ref="f-w"/> other than <propref comp="f-w" prop="value"/>.
</p></div4><div4 role="1.0" id="xr-whiteSpace"><head>XML Representation of whiteSpace Schema Components</head><p>
The XML representation for a <compref ref="f-w"/> schema
component is a <eltref ref="whiteSpace"/> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><reprdef><reprelt eltname="whiteSpace"/><reprcomp abstract="whiteSpace" ref="dc-whiteSpace"><propmap comp="f-w" prop="value">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>value</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>
</propmap><propmap comp="f-w" prop="fixed">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>fixed</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise <pt>false</pt>
</propmap><propmap comp="f-w" prop="annotations">
<!--*
* material suppressed here by diff group b3869 *
*-->
<phrase dg="b3869">The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-am-one">annotation mapping</xtermref> of the 
<eltref ref="whiteSpace"/> 
element, as defined in 
  section <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#declare-annotation">XML Representation of Annotation Schema Components</xspecref>
  of <bibref ref="structural-schemas"/>.</phrase>
</propmap></reprcomp></reprdef></div4><div4 role="1.0" id="whiteSpace-validation-rules"><head>whiteSpace Validation Rules</head><note><p>
There are no <termref def="dt-cvc"/>s associated 
<phrase dg="b11961">with
</phrase><termref def="dt-whiteSpace"/>.
For more information, see the
discussion on white space normalization in
<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#components">Schema Component Details</xspecref>
in <bibref ref="structural-schemas"/><phrase dg="b11961">, in particular
the section <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#sec-wsnormalization">3.1.4 
White Space Normalization during Validation</xspecref></phrase>.
</p></note></div4><div4 role="1.0" id="whiteSpace-coss"><head>Constraints on whiteSpace Schema Components</head><constraintnote type="cos" id="whiteSpace-valid-restriction"><head>whiteSpace valid restriction</head><p>
It is an <termref def="dt-error"/> if <compref ref="f-w"/>
is among the members of <propref comp="std" prop="facets"/> of
<propref comp="std" prop="base type definition"/> and any of the following conditions is
true:
</p><olist><item><p>
<propref comp="f-w" prop="value"/> is <emph>replace</emph> or <emph>preserve</emph>
and the <propref comp="f-w" prop="value"/> of the parent
<compref ref="f-w"/> is <emph>collapse</emph>
</p></item><item><p>
<propref comp="f-w" prop="value"/> is <emph>preserve</emph>
and the <propref comp="f-w" prop="value"/> of the parent
<compref ref="f-w"/> is <emph>replace</emph>
</p></item></olist></constraintnote><note dg="b11961"><p>In order of increasing restrictiveness, the 
legal values for the <compref ref="f-w"/> facet are
<pt>preserve</pt>, <pt>collapse</pt>, and
<pt>replace</pt>.  The more restrictive keywords
are more restrictive not in the sense
of accepting progressively fewer instance documents but
in the sense that each corresponds to a progressively smaller,
more tightly restricted value space.</p></note></div4></div3><div3 role="1.0" id="rf-maxInclusive"><head>maxInclusive</head><p>
<termdef id="dt-maxInclusive" term="maxInclusive" role="local">
<phrase>maxInclusive</phrase> is the <!--*
* material suppressed here by diff group fa1-fix *
*--><phrase dg="fa1-fix"><phrase>inclusive upper bound</phrase></phrase> of the
<termref def="dt-value-space"/> for a datatype with the <termref def="dt-ordered"/> property.  The value of
<term>maxInclusive</term> <termref def="dt-must"/> 
be <phrase dg="rq31m">equal to some value</phrase>
in the <termref def="dt-value-space"/> of the <termref def="dt-basetype"/>.
</termdef>
</p><!--* <p diff="add" dg="rq31m"><termdef id="dt-numVal" term="numeric value">
In discussions of the constraints on value spaces imposed by various
facets, the <term>numeric value</term> of a value <var>d</var> in the
&odec; value space is just <var>d</var> itself.  The <term>numeric
value</term> of a value <var>p</var> in the value space of &pD; is the
value of the <pfref ref="vp-pd-numVal"/> property of <var>p</var>.
</termdef>
As noted in the definition of <dtref ref="&pD;"/>, for purposes
of numeric comparisons, a numeric <dtref ref="&pD;"/> value <var>v</var>
is less than, equal to, or greater than, some upper or lower
bound just in case its <pfref ref="vp-pd-numVal"/> is.
</p> *--><!--* need further work here? *--><p>
<termref def="dt-maxInclusive"/> provides for:
</p><ulist><item><p>
Constraining a <termref def="dt-value-space"/> to values with a
specific <!--*
* material suppressed here by diff group fa1-fix *
*--><phrase dg="fa1-fix"><phrase>inclusive upper
bound</phrase></phrase>.
</p></item></ulist><!--*
* material suppressed here by diff group b5062xx *
*--><note role="example"><p>
The following is the definition of a <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-user-defined"/>
datatype which limits values to integers less than or equal to
100, using <termref def="dt-maxInclusive"/>.
</p><eg xml:space="preserve">&lt;simpleType name='one-hundred-or-less'&gt;
  &lt;restriction base='integer'&gt;
    &lt;maxInclusive value='100'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;</eg></note><div4 role="1.0" id="dc-maxInclusive"><head>The maxInclusive Schema Component</head><compdef name="maxInclusive" abbrev="f-mai" showAKO="true"/><p>
If <propref comp="f-mai" prop="fixed"/> is <emph>true</emph>, then types for which
the current type is the <propref comp="std" prop="base type definition"/> cannot specify a
value for <compref ref="f-mai"/> other than <propref comp="f-mai" prop="value"/>.
</p></div4><div4 role="1.0" id="xr-maxInclusive"><head>XML Representation of maxInclusive Schema Components</head><p>
The XML representation for a <compref ref="f-mai"/> schema
component is a <eltref ref="maxInclusive"/> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><reprdef><reprelt eltname="maxInclusive"/><reprcomp abstract="maxInclusive" ref="dt-maxInclusive"><reprdep>
<propref comp="f-mai" prop="value"/> <termref def="dt-must"/> 
be <phrase dg="rq31m">equal to some value</phrase>
in the <termref def="dt-value-space"/> of <propref comp="std" prop="base type definition"/>.
</reprdep><propmap comp="f-mai" prop="value">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>value</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>
</propmap><propmap comp="f-mai" prop="fixed">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>fixed</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise <pt>false</pt>
<!--*
* material suppressed here by diff group rq31m *
*-->
</propmap><propmap comp="f-mai" prop="annotations">
<!--*
* material suppressed here by diff group b3869 *
*-->
<phrase dg="b3869">The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-am-one">annotation mapping</xtermref> of the 
<eltref ref="maxInclusive"/> 
element, as defined in 
  section <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#declare-annotation">XML Representation of Annotation Schema Components</xspecref>
  of <bibref ref="structural-schemas"/>.</phrase>
</propmap></reprcomp></reprdef></div4><div4 role="1.0" id="maxInclusive-validation-rules"><head>maxInclusive Validation Rules</head><constraintnote type="cvc" id="cvc-maxInclusive-valid"><head>maxInclusive Valid</head><p>
A value <!--*
* material suppressed here by diff group vrd *
*-->
in an <termref def="dt-ordered"/> <termref def="dt-value-space"/>
is facet-valid with respect to 
<termref def="dt-maxInclusive"/><!--*
* material suppressed here by diff group b2948 *
*-->
<phrase dg="b2948">if and only if 
the value is less than or equal to <propref comp="f-mie" prop="value"/>, 
according to the
datatype's order relation.</phrase>
</p><!--*
* material suppressed here by diff group b2948 *
*--><!--*
* material suppressed here by diff group vrd *
*--></constraintnote></div4><div4 role="1.0" id="maxInclusive-coss"><head>Constraints on maxInclusive Schema Components</head><constraintnote type="cos" id="minInclusive-less-than-equal-to-maxInclusive"><head>minInclusive <phrase dg="vrd">&lt;=</phrase><!--*
* material suppressed here by diff group vrd *
*--> maxInclusive</head><p>
It is an <termref def="dt-error"/> for the value specified for
<termref def="dt-minInclusive"/> to be greater than the value
specified for <termref def="dt-maxInclusive"/> for the same datatype.
</p></constraintnote><constraintnote type="cos" id="maxInclusive-valid-restriction"><head>maxInclusive valid restriction</head><p>
It is an <termref def="dt-error"/> if any of the following conditions
is true:
</p><olist><item><p>
<compref ref="f-mai"/> is among the members of
<propref comp="std" prop="facets"/> of <propref comp="std" prop="base type definition"/>
and <propref comp="f-mai" prop="value"/> is
greater than the <propref comp="f-mai" prop="value"/> of 
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">that</phrase>
<compref ref="f-mai"/><phrase dg="rq31m">.</phrase>
</p></item><item><p>
<compref ref="f-mae"/> is among the members of
<propref comp="std" prop="facets"/> of <propref comp="std" prop="base type definition"/>
and <propref comp="f-mai" prop="value"/> is
greater than or equal to the <propref comp="f-mae" prop="value"/> of
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">that</phrase>
<compref ref="f-mae"/><phrase dg="rq31m">.</phrase>
</p></item><item><p>
<compref ref="f-mii"/> is among the members of
<propref comp="std" prop="facets"/> of <propref comp="std" prop="base type definition"/>
and <propref comp="f-mai" prop="value"/> is
less than the <propref comp="f-mii" prop="value"/> of 
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">that</phrase>
<compref ref="f-mii"/><phrase dg="rq31m">.</phrase>
</p></item><item><p>
<compref ref="f-mie"/> is among the members of
<propref comp="std" prop="facets"/> of <propref comp="std" prop="base type definition"/>
and <propref comp="f-mai" prop="value"/> is
less than or equal to the <propref comp="f-mie" prop="value"/> of 
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">that</phrase>
<compref ref="f-mie"/><phrase dg="rq31m">.</phrase>
</p></item></olist></constraintnote></div4></div3><div3 role="1.0" id="rf-maxExclusive"><head>maxExclusive</head><p>
<termdef id="dt-maxExclusive" term="maxExclusive" role="local">
<term>maxExclusive</term> is the <!--*
* material suppressed here by diff group fa1-fix *
*--> <phrase dg="fa1-fix"><phrase>exclusive upper bound</phrase></phrase> of the
<termref def="dt-value-space"/> for a datatype with the <termref def="dt-ordered"/> property.  The value of
<term>maxExclusive</term>  <termref def="dt-must"/> 
be <phrase dg="rq31m">equal to some value</phrase>
in the
<termref def="dt-value-space"/> of the <termref def="dt-basetype"/> or
be equal to <propref comp="f-mae" prop="value"/> in <propref comp="std" prop="base type definition"/>. </termdef>
</p><p>
<termref def="dt-maxExclusive"/> provides for:
</p><ulist><item><p>
Constraining a <termref def="dt-value-space"/> to values with a
specific <!--*
* material suppressed here by diff group fa1-fix *
*--><phrase dg="fa1-fix"><phrase>exclusive upper
bound</phrase></phrase>.
</p></item></ulist><!--*
* material suppressed here by diff group b5062xx *
*--><note role="example"><p>
The following is the definition of a <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-user-defined"/>
datatype which limits values to integers less than or equal to
100, using <termref def="dt-maxExclusive"/>.
</p><eg xml:space="preserve">&lt;simpleType name='less-than-one-hundred-and-one'&gt;
  &lt;restriction base='integer'&gt;
    &lt;maxExclusive value='101'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;</eg><p>
Note that the
<termref def="dt-value-space"/> of this datatype is identical to
the previous one (named 'one-hundred-or-less').
</p></note><div4 role="1.0" id="dc-maxExclusive"><head>The maxExclusive Schema Component</head><compdef name="maxExclusive" abbrev="f-mae" showAKO="true"/><p>
If <propref comp="f-mae" prop="fixed"/> is <emph>true</emph>, then types for which
the current type is the <propref comp="std" prop="base type definition"/> cannot specify a
value for <compref ref="f-mae"/> other than <propref comp="f-mae" prop="value"/>.
</p></div4><div4 role="1.0" id="xr-maxExclusive"><head>XML Representation of maxExclusive Schema Components</head><p>
The XML representation for a <compref ref="f-mae"/> schema
component is a <eltref ref="maxExclusive"/> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><reprdef><reprelt eltname="maxExclusive"/><reprcomp abstract="maxExclusive" ref="dt-maxExclusive"><reprdep>
<propref comp="f-mae" prop="value"/> <termref def="dt-must"/> 
be <phrase dg="rq31m">equal to some value</phrase>
in the <termref def="dt-value-space"/> of <propref comp="std" prop="base type definition"/>.
</reprdep><propmap comp="f-mae" prop="value">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>value</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>
</propmap><propmap comp="f-mae" prop="fixed">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>fixed</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise <pt>false</pt>
</propmap><propmap comp="f-mae" prop="annotations">
<!--*
* material suppressed here by diff group b3869 *
*-->
<phrase dg="b3869">The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-am-one">annotation mapping</xtermref> of the 
<eltref ref="maxExclusive"/> 
element, as defined in 
  section <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#declare-annotation">XML Representation of Annotation Schema Components</xspecref>
  of <bibref ref="structural-schemas"/>.</phrase>
</propmap></reprcomp></reprdef></div4><div4 role="1.0" id="maxExclusive-validation-rules"><head>maxExclusive Validation Rules</head><constraintnote type="cvc" id="cvc-maxExclusive-valid"><head>maxExclusive Valid</head><p>
A value 
in an <termref def="dt-ordered"/> 
<termref def="dt-value-space"/>
is facet-valid with respect to 
<termref def="dt-maxExclusive"/><!--*
* material suppressed here by diff group b2948 *
*-->
<phrase dg="b2948">if and only if 
the value is less than <propref comp="f-mie" prop="value"/>, according to the
datatype's order relation.</phrase>
</p><!--*
* material suppressed here by diff group b2948 *
*--></constraintnote></div4><div4 role="1.0" id="maxExclusive-coss"><head>Constraints on maxExclusive Schema Components</head><constraintnote type="cos" id="maxInclusive-maxExclusive"><head>maxInclusive and maxExclusive</head><p>
It is an <termref def="dt-error"/> for both
<termref def="dt-maxInclusive"/> and <termref def="dt-maxExclusive"/>
to be specified in the same derivation step of a 
<!--*
* material suppressed here by diff group rec12-main *
*--><phrase dg="rec12-main"><compref ref="std"/></phrase>.
</p></constraintnote><constraintnote type="cos" id="minExclusive-less-than-equal-to-maxExclusive"><head>minExclusive &lt;= maxExclusive</head><p>
It is an <termref def="dt-error"/> for the value specified for
<termref def="dt-minExclusive"/> to be greater than the value
specified for <termref def="dt-maxExclusive"/> for the same datatype.
</p></constraintnote><constraintnote type="cos" id="maxExclusive-valid-restriction"><head>maxExclusive valid restriction</head><p>
It is an <termref def="dt-error"/> if any of the following conditions
is true:
</p><olist><item><p>
<compref ref="f-mae"/> is among the members of
<propref comp="std" prop="facets"/> of <propref comp="std" prop="base type definition"/>
and <propref comp="f-mae" prop="value"/> is
greater than the <propref comp="f-mae" prop="value"/> of 
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">that</phrase>
<compref ref="f-mae"/><phrase dg="rq31m">.</phrase>
</p></item><item><p>
<compref ref="f-mai"/> is among the members of
<propref comp="std" prop="facets"/> of <propref comp="std" prop="base type definition"/>
and <propref comp="f-mae" prop="value"/> is
greater than the <propref comp="f-mai" prop="value"/> of 
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">that</phrase>
<compref ref="f-mai"/><phrase dg="rq31m">.</phrase>
</p></item><item><p>
<compref ref="f-mii"/> is among the members of
<propref comp="std" prop="facets"/> of <propref comp="std" prop="base type definition"/>
and <propref comp="f-mae" prop="value"/> is
less than or equal to the <propref comp="f-mii" prop="value"/> of 
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">that</phrase>
<compref ref="f-mii"/><phrase dg="rq31m">.</phrase>
</p></item><item><p>
<compref ref="f-mie"/> is among the members of
<propref comp="std" prop="facets"/> of <propref comp="std" prop="base type definition"/>
and <propref comp="f-mae" prop="value"/> is
less than or equal to the <propref comp="f-mie" prop="value"/> of 
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">that</phrase>
<compref ref="f-mie"/><phrase dg="rq31m">.</phrase>
</p></item></olist></constraintnote></div4></div3><div3 role="1.0" id="rf-minExclusive"><head>minExclusive</head><p>
<termdef id="dt-minExclusive" term="minExclusive" role="local">
<term>minExclusive</term> is the <!--*
* material suppressed here by diff group fa1-fix *
*--> <phrase dg="fa1-fix"><phrase>exclusive lower bound</phrase></phrase> of the
<termref def="dt-value-space"/> for a datatype with the <termref def="dt-ordered"/> property. The value of
<term>minExclusive</term> <termref def="dt-must"/> 
be <phrase dg="rq31m">equal to some value</phrase>
in the
<termref def="dt-value-space"/> of the <termref def="dt-basetype"/> or
be equal to <propref comp="f-mie" prop="value"/> in <propref comp="std" prop="base type definition"/>. </termdef>
</p><p>
<termref def="dt-minExclusive"/> provides for:
</p><ulist><item><p>
Constraining a <termref def="dt-value-space"/> to values with a
specific <!--*
* material suppressed here by diff group fa1-fix *
*--><phrase dg="fa1-fix"><phrase>exclusive lower bound</phrase></phrase>.
</p></item></ulist><!--*
* material suppressed here by diff group b5062xx *
*--><note role="example"><p>
The following is the definition of a <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-user-defined"/>
datatype which limits values to integers greater than or equal to
100, using <termref def="dt-minExclusive"/>.
</p><eg xml:space="preserve">&lt;simpleType name='more-than-ninety-nine'&gt;
  &lt;restriction base='integer'&gt;
    &lt;minExclusive value='99'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;</eg><p>
Note that the
<termref def="dt-value-space"/> of this datatype is identical to the 
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">following</phrase>
one (named 'one-hundred-or-more').
</p></note><div4 role="1.0" id="dc-minExclusive"><head>The minExclusive Schema Component</head><compdef name="minExclusive" abbrev="f-mie" showAKO="true"/><p>
If <propref comp="f-mie" prop="fixed"/> is <emph>true</emph>, then types for which
the current type is the <propref comp="std" prop="base type definition"/> cannot specify a
value for <compref ref="f-mie"/> other than <propref comp="f-mie" prop="value"/>.
</p></div4><div4 role="1.0" id="xr-minExclusive"><head>XML Representation of minExclusive Schema Components</head><p>
The XML representation for a <compref ref="f-mie"/> schema
component is a <eltref ref="minExclusive"/> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><reprdef><reprelt eltname="minExclusive"/><reprcomp abstract="minExclusive" ref="dt-minExclusive"><reprdep>
<propref comp="f-mie" prop="value"/> <termref def="dt-must"/> 
be <phrase dg="rq31m">equal to some value</phrase>
in the <termref def="dt-value-space"/> of <propref comp="std" prop="base type definition"/>.
</reprdep><propmap comp="f-mie" prop="value">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>value</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>
</propmap><propmap comp="f-mie" prop="fixed">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>fixed</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise <pt>false</pt>
</propmap><propmap comp="f-mie" prop="annotations">
<!--*
* material suppressed here by diff group b3869 *
*-->
<phrase dg="b3869">The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-am-one">annotation mapping</xtermref> of the 
<eltref ref="minExclusive"/> 
element, as defined in 
  section <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#declare-annotation">XML Representation of Annotation Schema Components</xspecref>
  of <bibref ref="structural-schemas"/>.</phrase>
</propmap></reprcomp></reprdef></div4><div4 role="1.0" id="minExclusive-validation-rules"><head>minExclusive Validation Rules</head><constraintnote type="cvc" id="cvc-minExclusive-valid"><head>minExclusive Valid</head><p>
A value in an <termref def="dt-ordered"/> <termref def="dt-value-space"/>
is facet-valid with respect to <termref def="dt-minExclusive"/> 
if<phrase dg="iff"> and only if</phrase><!--*
* material suppressed here by diff group b2948 *
*-->
<phrase dg="b2948">the value is greater than 
<propref comp="f-mie" prop="value"/>, according to the
datatype's order relation.</phrase>
</p><!--*
* material suppressed here by diff group b2948 *
*--></constraintnote></div4><div4 role="1.0" id="minExclusive-coss"><head>Constraints on minExclusive Schema Components</head><constraintnote type="cos" id="minInclusive-minExclusive"><head>minInclusive and minExclusive</head><p>
It is an <termref def="dt-error"/> for both <termref def="dt-minInclusive"/> and
<termref def="dt-minExclusive"/> to be specified <!--*
* material suppressed here by diff group b2250 *
*--><phrase dg="b2250">in the same derivation step of a <compref ref="std"/></phrase>.
</p></constraintnote><constraintnote type="cos" id="minExclusive-less-than-maxInclusive"><head>minExclusive &lt; maxInclusive</head><p>
It is an <termref def="dt-error"/> for the value specified for
<termref def="dt-minExclusive"/> to be greater than or equal to the value
specified for <termref def="dt-maxInclusive"/> for the same datatype.
</p></constraintnote><constraintnote type="cos" id="minExclusive-valid-restriction"><head>minExclusive valid restriction</head><p>It is an <termref def="dt-error"/> if any of the following conditions is true:</p><olist><item><p>
<compref ref="f-mie"/> is among the members of
<propref comp="std" prop="facets"/> of <propref comp="std" prop="base type definition"/>
and <propref comp="f-mie" prop="value"/> is
less than the <propref comp="f-mie" prop="value"/> of 
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">that</phrase>
<compref ref="f-mie"/><phrase dg="rq31m">.</phrase>
</p></item><item><p>
<compref ref="f-mii"/> is among the members of
<propref comp="std" prop="facets"/> of <propref comp="std" prop="base type definition"/>
and <propref comp="f-mie" prop="value"/> is
less than the <propref comp="f-mii" prop="value"/> of 
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">that</phrase>
<compref ref="f-mii"/><phrase dg="rq31m">.</phrase>
</p></item><item><p>
<compref ref="f-mai"/> is among the members of
<propref comp="std" prop="facets"/> of <propref comp="std" prop="base type definition"/> and <propref comp="f-mie" prop="value"/> is
greater<phrase dg="b1893"> than or equal to</phrase> the
<propref comp="f-mai" prop="value"/> of <!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">that</phrase> <compref ref="f-mai"/><phrase dg="rq31m">.</phrase>
</p></item><item><p>
<compref ref="f-mae"/> is among the members of
<propref comp="std" prop="facets"/> of <propref comp="std" prop="base type definition"/>
and <propref comp="f-mae" prop="value"/> is
greater than or equal to the <propref comp="f-mae" prop="value"/> of 
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">that</phrase>
<compref ref="f-mae"/><phrase dg="rq31m">.</phrase>
</p></item></olist></constraintnote></div4></div3><div3 role="1.0" id="rf-minInclusive"><head>minInclusive</head><p>
<termdef id="dt-minInclusive" term="minInclusive" role="local">
<term>minInclusive</term> is the <!--*
* material suppressed here by diff group fa1-fix *
*--> <phrase dg="fa1-fix"><phrase>inclusive lower bound</phrase></phrase> of the
<termref def="dt-value-space"/> for a datatype with the <termref def="dt-ordered"/> property.  The value of
<term>minInclusive</term>  <termref def="dt-must"/> 
be <phrase dg="rq31m">equal to some value</phrase> 
in the
<termref def="dt-value-space"/> of the <termref def="dt-basetype"/>.
</termdef>
</p><p>
<termref def="dt-minInclusive"/> provides for:
</p><ulist><item><p>
Constraining a <termref def="dt-value-space"/> to values with a
specific <!--*
* material suppressed here by diff group fa1-fix *
*--><phrase dg="fa1-fix"><phrase>inclusive lower
bound</phrase></phrase>.
</p></item></ulist><!--*
* material suppressed here by diff group b5062xx *
*--><note role="example"><p>
The following is the definition of a <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-user-defined"/>
datatype which limits values to integers greater than or equal to
100, using <termref def="dt-minInclusive"/>.
</p><eg xml:space="preserve">&lt;simpleType name='one-hundred-or-more'&gt;
  &lt;restriction base='integer'&gt;
    &lt;minInclusive value='100'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;</eg></note><div4 role="1.0" id="dc-minInclusive"><head>The minInclusive Schema Component</head><compdef name="minInclusive" abbrev="f-mii" showAKO="true"/><p>
If <propref comp="f-mii" prop="fixed"/> is <emph>true</emph>, then types for which
the current type is the <propref comp="std" prop="base type definition"/> cannot specify a
value for <compref ref="f-mii"/> other than <propref comp="f-mii" prop="value"/>.
</p></div4><div4 role="1.0" id="xr-minInclusive"><head>XML Representation of minInclusive Schema Components</head><p>
The XML representation for a <compref ref="f-mii"/> schema
component is a <eltref ref="minInclusive"/> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><reprdef><reprelt eltname="minInclusive"/><reprcomp abstract="minInclusive" ref="dt-minInclusive"><reprdep>
<propref comp="f-mii" prop="value"/> <termref def="dt-must"/> 
be <phrase dg="rq31m">equal to some value</phrase> 
in the <termref def="dt-value-space"/> of <propref comp="std" prop="base type definition"/>.
</reprdep><propmap comp="f-mii" prop="value">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>value</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>
</propmap><propmap comp="f-mii" prop="fixed">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>fixed</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise <pt>false</pt>
</propmap><propmap comp="f-mii" prop="annotations">
<!--*
* material suppressed here by diff group b3869 *
*-->
<phrase dg="b3869">The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-am-one">annotation mapping</xtermref> of the 
<eltref ref="minInclusive"/> 
element, as defined in 
  section <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#declare-annotation">XML Representation of Annotation Schema Components</xspecref>
  of <bibref ref="structural-schemas"/>.</phrase>
</propmap></reprcomp></reprdef></div4><div4 role="1.0" id="minInclusive-validation-rules"><head>minInclusive Validation Rules</head><constraintnote type="cvc" id="cvc-minInclusive-valid"><head>minInclusive Valid</head><p>
A value in an <termref def="dt-ordered"/> <termref def="dt-value-space"/>
is facet-valid with respect to <termref def="dt-minInclusive"/> 
if<phrase dg="iff"> and only if</phrase><!--*
* material suppressed here by diff group b2948 *
*-->
<phrase dg="b2948">the value is greater than or equal to
<propref comp="f-mie" prop="value"/>, according to the
datatype's order relation.</phrase></p><!--*
* material suppressed here by diff group b2948 *
*--></constraintnote></div4><div4 role="1.0" id="minInclusive-coss"><head>Constraints on minInclusive Schema Components</head><constraintnote type="cos" id="minInclusive-less-than-maxExclusive"><head>minInclusive &lt; maxExclusive</head><p>
It is an <termref def="dt-error"/> for the value specified for
<termref def="dt-minInclusive"/> to be greater than or equal to the value
specified for <termref def="dt-maxExclusive"/> for the same datatype.
</p></constraintnote><constraintnote type="cos" id="minInclusive-valid-restriction"><head>minInclusive valid restriction</head><p>
It is an <termref def="dt-error"/> if any of the following conditions
is true:
</p><olist><item><p>
<compref ref="f-mii"/> is among the members of
<propref comp="std" prop="facets"/> of <propref comp="std" prop="base type definition"/>
and <propref comp="f-mii" prop="value"/> is
less than the <propref comp="f-mii" prop="value"/> of
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">that</phrase>
<compref ref="f-mii"/><phrase dg="rq31m">.</phrase>
</p></item><item><p>
<compref ref="f-mai"/> is among the members of
<propref comp="std" prop="facets"/> of <propref comp="std" prop="base type definition"/>
and <propref comp="f-mii" prop="value"/> is
greater the <propref comp="f-mai" prop="value"/> of 
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">that</phrase>
<compref ref="f-mai"/><phrase dg="rq31m">.</phrase>
</p></item><item><p>
<compref ref="f-mie"/> is among the members of
<propref comp="std" prop="facets"/> of <propref comp="std" prop="base type definition"/>
and <propref comp="f-mii" prop="value"/> is
less than or equal to the <propref comp="f-mie" prop="value"/> of 
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">that</phrase>
<compref ref="f-mie"/><phrase dg="rq31m">.</phrase>
</p></item><item><p>
<compref ref="f-mae"/> is among the members of
<propref comp="std" prop="facets"/> of <propref comp="std" prop="base type definition"/>
and <propref comp="f-mii" prop="value"/> is
greater than or equal to the <propref comp="f-mae" prop="value"/> of 
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">that</phrase>
<compref ref="f-mae"/><phrase dg="rq31m">.</phrase>
</p></item></olist></constraintnote></div4></div3><div3 role="1.0" id="rf-totalDigits"><head>totalDigits</head><!--* status quo ante *--><!--*
* material suppressed here by diff group pd1 *
*--><!--* pd1 *--><!--* <p diff="del" dg="rq31facets"><phrase diff="add" dg="pd1">
<phrase diff="del" dg="rq31facets">
<termdef id="del_rq31facets_dt-totalDigits" term="totalDigits" role="local">
<term>totalDigits</term> places an upper limit on the <vpropref
ref="vp-pd-precision"/> of <dtref ref="&pD;"/> values.&nbsp; <phrase
role="UNSURE">The effect is to require that a value in the derived
datatype must have floating-point precision less than or equal to the
fractionDigits value.</phrase></termdef></phrase></phrase>
</p> *--><!--* rq31facets *--><!--* <p diff="add" dg="rq31facets">[v.0]
<termdef id="dt-totalDigits" term="totalDigits" role="local">
<term>totalDigits</term> 
restricts the &value_spaces; 
of <dtref ref="&pD;"/> and datatypes derived from it.
If the <propref prop="value" comp="f-td"/> of <compref ref="f-td"/> is
<var>t</var>, the effect is to restrict the value space 
to values with <vpropref ref="vp-pd-numVal"/> expressible as
<var>i</var>&nbsp;&times;&nbsp;10<sup><var>n</var></sup>, for some
integers <var>i</var> and <var>n</var>, with 
|&nbsp;<var>i</var>&nbsp;| &lt; 10<sup><var>t</var></sup>.
The <propref prop="value" comp="f-td" /> of 
<term>totalDigits</term>&nbsp;<termref def="dt-must"/> be
a <dtref ref="positiveInteger"/>.
</termdef></p> *--><p dg="rq31m">
<termdef id="dt-totalDigits" term="totalDigits" role="local">
<term>totalDigits</term> 
restricts the magnitude and 
arithmetic 
precision 
of values in the
<termref def="dt-value-space">value spaces</termref> 
of <!--*
* material suppressed here by diff group b12300-diff10-silent *
*--><phrase dg="b12300-diff10-silent">
<dtref ref="decimal"/> 
and datatypes derived from it.</phrase>
</termdef>
<!--*
* material suppressed here by diff group b12300-diff10-silent *
*-->
</p><p dg="rq31m">
For <dtref ref="decimal"/>,
if the <propref prop="value" comp="f-td"/> of <compref ref="f-td"/> is
<var>t</var>, the effect is to require that values be equal to
<!--*
* material suppressed here by diff group rq31fix *
*--><phrase dg="rq31fix"><var>i</var> / 10<sup><var>n</var></sup></phrase>, for some
integers <var>i</var> and <var>n</var>, with 
| <var>i</var> | &lt; 10<sup><var>t</var></sup>
and
0 ≤ <var>n</var> ≤ <var>t</var>.
This has as a consequence that the values are expressible
using at most <var>t</var> digits in decimal notation.
</p><!--*
* material suppressed here by diff group b12300-diff10-silent *
*--><p dg="rq31m">
The <propref prop="value" comp="f-td"/> of 
<compref ref="f-td"/> <rfc2119>must</rfc2119> be
a <dtref ref="positiveInteger"/>.
</p><p>
The term <mention>totalDigits</mention> is chosen to reflect the fact that
it restricts the <termref def="dt-value-space"/> to those values that
can be represented lexically using at most 
<emph role="eq">totalDigits</emph> digits<phrase dg="rq31m"> in
decimal notation, or at most <emph role="eq">totalDigits</emph> digits
for the coefficient, in scientific notation</phrase>. 
Note that it does not restrict
the <termref def="dt-lexical-space"/> directly; a lexical
representation that adds 
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31facets">non-significant
leading or trailing</phrase> 
zero digits is still permitted.
<phrase dg="rq31m">It also has no effect on the values 
NaN, INF, and -INF.</phrase>
</p><div4 role="1.0" id="dc-totalDigits"><head>The totalDigits Schema Component</head><compdef name="totalDigits" abbrev="f-td" showAKO="true"/><p>
If <propref comp="f-td" prop="fixed"/> is <emph>true</emph>, then types for which
the current type is the <propref comp="std" prop="base type definition"/> 
<!--* perhaps simpler to just say 
    * "types immediately derived from the current type" 
    * but I'm in change-as-little-as-you-can mode.
    *-->
<!--*
* material suppressed here by diff group rq31facets *
*-->
<phrase dg="rq31facets"><rfc2119>must</rfc2119> not</phrase> specify a
value for <compref ref="f-td"/> other than
<propref comp="f-td" prop="value"/>.
</p><!--* <ednote diff="add" dg="review">
<edtext>N.B. this constraint on facets with fixed values should
(a) be expressed in a validation rule and (b) be expressed
once for all, instead of once for each facet.  A future
editorial change proposal.</edtext>
</ednote> *--></div4><div4 role="1.0" id="xr-totalDigits"><head>XML Representation of totalDigits Schema Components</head><p>
The XML representation for a <compref ref="f-td"/> schema
component is a <eltref ref="totalDigits"/> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><reprdef><reprelt eltname="totalDigits"/><reprcomp abstract="totalDigits" ref="dc-totalDigits"><propmap comp="f-td" prop="value">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>value</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>
</propmap><propmap comp="f-td" prop="fixed">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>fixed</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise <pt>false</pt>
</propmap><propmap comp="f-td" prop="annotations">
<!--*
* material suppressed here by diff group b3869 *
*-->
<phrase dg="b3869">The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-am-one">annotation mapping</xtermref> of the 
<eltref ref="totalDigits"/> 
element, as defined in 
  section <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#declare-annotation">XML Representation of Annotation Schema Components</xspecref>
  of <bibref ref="structural-schemas"/>.</phrase>
</propmap></reprcomp></reprdef></div4><div4 role="1.0" id="totalDigits-validation-rules"><head>totalDigits Validation Rules</head><constraintnote type="cvc" id="cvc-totalDigits-valid"><head>totalDigits Valid</head><!--*
* material suppressed here by diff group rq31facets *
*--><!--*
* material suppressed here by diff group rq31facets *
*--><p dg="rq31m">A value <var>v</var>
is facet-valid with respect to a <compref ref="f-td"/> facet with 
a <propref prop="value" comp="f-td"/> of <var>t</var> if and only 
if <!--*
* material suppressed here by diff group b12300-diff10-silent *
*--><phrase dg="b12300-diff10-silent"><var>v</var> is a 
<dtref ref="decimal"/> value equal to 
<var>i</var> / 10<sup><var>n</var></sup>, 
for some
integers <var>i</var> and <var>n</var>, with 
| <var>i</var> | &lt; 10<sup><var>t</var></sup>
and
0 ≤ <var>n</var> ≤ <var>t</var>.</phrase>
</p><!--*
* material suppressed here by diff group b12300-diff10-silent *
*--></constraintnote></div4><div4 role="1.0" id="totalDigits-coss"><head>Constraints on totalDigits Schema Components</head><constraintnote type="cos" id="totalDigits-valid-restriction"><head>totalDigits valid restriction</head><!--*
* material suppressed here by diff group rq31facets *
*--><p dg="rq31facets">
It is an <termref def="dt-error"/> if the <termref def="dt-owner"/>'s
<propref comp="std" prop="base type definition"/>
has a <compref ref="f-td"/> facet 
among its <propref comp="std" prop="facets"/>
and
<propref comp="f-td" prop="value"/> is
greater than the <propref comp="f-td" prop="value"/> of
that <compref ref="f-td"/> facet.
</p></constraintnote></div4></div3><div3 role="1.0" id="rf-fractionDigits"><head>fractionDigits</head><p>
<termdef id="dt-fractionDigits" term="fractionDigits" role="local">
<term>fractionDigits</term>
<!--*
* material suppressed here by diff group pd1 *
*--><phrase dg="rq31m">places an upper limit on the 
arithmetic precision 
of <dtref ref="decimal"/> values: if the <propref comp="f-fd" prop="value"/> of
<term>fractionDigits</term> = <var>f</var>, then the value space is
restricted to values equal to
<var>i</var> / 10<sup><var>n</var></sup> for some integers
<var>i</var> and
<var>n</var> and <!--* <var>minFractionDigits</var> &le; *-->
0 ≤ <var>n</var> ≤ <var>f</var>.</phrase></termdef>
The value of
<term>fractionDigits</term> <termref def="dt-must"/> be a <dtref ref="nonNegativeInteger"/>
</p><p>
The term <term>fractionDigits</term> is chosen to reflect the fact that it 
restricts the <termref def="dt-value-space"/> to those values that can be 
represented lexically 
<phrase dg="rq31m">in decimal notation</phrase> using at most 
<emph role="eq">fractionDigits</emph> 
to the right of the decimal point. Note that it does not restrict 
the <termref def="dt-lexical-space"/> directly; a 
<!--*
* material suppressed here by diff group pd1 *
*--><phrase dg="pd1">lexical representation</phrase> that adds 
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">non-significant
leading or trailing</phrase> zero digits is still permitted.
</p><!--*
* material suppressed here by diff group dp200701 *
*--><note role="example"><p>
The following is the definition of a <!--*
* material suppressed here by diff group rq120 *
*--><termref dg="rq120" def="dt-user-defined"/>
datatype which could be used to represent the magnitude
of a person's body temperature on the Celsius scale.
This definition would appear in a schema authored by an "end-user"
and shows how to define a datatype by specifying facet values which
constrain the range of the <termref def="dt-basetype"/>.
</p><eg xml:space="preserve">&lt;simpleType name='celsiusBodyTemp'&gt;
  &lt;restriction base='decimal'&gt;<!--*
* material suppressed here by diff group b2220 *
*-->
    &lt;fractionDigits value='1'/&gt;
    &lt;minInclusive value='<!--*
* material suppressed here by diff group b2220 *
*--><phrase dg="b2220">32</phrase>'/&gt;
	 &lt;maxInclusive value='<!--*
* material suppressed here by diff group b2220 *
*--><phrase dg="b2220">41.7</phrase>'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;
</eg></note><div4 role="1.0" id="dc-fractionDigits"><head>The fractionDigits Schema Component</head><compdef name="fractionDigits" abbrev="f-fd" showAKO="true"/><p>
If <propref comp="f-fd" prop="fixed"/> is <emph>true</emph>, then
types for which the current type is the <propref comp="std" prop="base type definition"/> 
<!--*
* material suppressed here by diff group rq31facets *
*--><phrase dg="rq31facets"><rfc2119>must</rfc2119> not</phrase>
specify a value for <compref ref="f-fd"/> other
than <propref comp="f-fd" prop="value"/>.
</p></div4><div4 role="1.0" id="xr-fractionDigits"><head>XML Representation of fractionDigits Schema Components</head><p>
The XML representation for a <compref ref="f-fd"/> schema
component is a <eltref ref="fractionDigits"/> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><reprdef><reprelt eltname="fractionDigits"/><reprcomp abstract="fractionDigits" ref="dc-fractionDigits"><propmap comp="f-fd" prop="value">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>value</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>
</propmap><propmap comp="f-fd" prop="fixed">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>fixed</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise <pt>false</pt>
</propmap><propmap comp="f-fd" prop="annotations">
<!--*
* material suppressed here by diff group b3869 *
*-->
<phrase dg="b3869">The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-am-one">annotation mapping</xtermref> of the 
<eltref ref="fractionDigits"/> 
element, as defined in 
  section <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#declare-annotation">XML Representation of Annotation Schema Components</xspecref>
  of <bibref ref="structural-schemas"/>.</phrase>
</propmap></reprcomp></reprdef></div4><div4 role="1.0" id="fractionDigits-validation-rules"><head>fractionDigits Validation Rules</head><constraintnote type="cvc" id="cvc-fractionDigits-valid"><head>fractionDigits Valid</head><p>
A value <!--*
* material suppressed here by diff group rq31m *
*-->
is facet-valid with
respect to <termref def="dt-fractionDigits"/> 
if<phrase dg="iff"> and only if</phrase>
<!--*
* material suppressed here by diff group rq31facets *
*-->
<phrase dg="rq31m">
that value is equal to
<var>i</var> / 10<sup><var>n</var></sup> for integer
<var>i</var> and
<var>n</var>, with <!--* <var>minFractionDigits</var> &le; *-->
0 ≤ <var>n</var> ≤ <propref comp="f-fd" prop="value"/>.
</phrase>
</p></constraintnote></div4><div4 role="1.0" id="fractionDigits-coss"><head>Constraints on fractionDigits Schema Components</head><!--* MSM inclines to the belief that this constraint should go away.
    * There is a prose statement in the intro paragraphs; that
    * suffices for clarity.  But this is something the WG should
    * really just vote on.
    *--><!--*
<constraintnote type="cos" id="fractionDigits-nonNegative" diff="add" dg="rq31m">
<head>fractionDigits greater than or equal to zero</head>
<p>
It is an &error; for 
the <propref comp="f-fd" prop="value"/> of 
<compref ref="f-fd"/> to be less than zero.
</p>
</constraintnote>
*--><!--* The WG agreed, 2005-02-04 *--><constraintnote type="cos" id="fractionDigits-totalDigits"><head>fractionDigits less than or equal to totalDigits</head><p>
It is an <termref def="dt-error"/> for 
<phrase dg="rq31m">the <propref comp="f-fd" prop="value"/> of 
</phrase><!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m"><compref ref="f-fd"/></phrase>
to be greater than
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">that of <compref ref="f-td"/></phrase>.
</p></constraintnote><constraintnote type="cos" id="fractionDigits-valid-restriction"><head>fractionDigits valid restriction</head><p>
It is an <termref def="dt-error"/> if <termref def="dt-fractionDigits"/> is among the members of <propref comp="std" prop="facets"/> of
<propref comp="std" prop="base type definition"/> and
<propref comp="f-fd" prop="value"/> is greater than the <propref comp="f-fd" prop="value"/> of 
<!--*
* material suppressed here by diff group rq31m *
*--><phrase dg="rq31m">that</phrase>
<termref def="dt-fractionDigits"/>.
</p></constraintnote></div4></div3><!--*
* material suppressed here by diff group b12300-diff10-silent *
*--><!--*
* material suppressed here by diff group b12300-diff10-silent *
*--><!--* MSM re-sets this from diff="del" (true vis a vis WD of 2005-02)
to diff="add" (true vis-a-vis 1.0), 2006-01-14. *--><!--*
* material suppressed here by diff group pd1-1912 *
*--><div3 role="1.0" id="rf-assertions" dg="b5030"><head>Assertions</head><p><termdef id="dt-assertions" term="assertions" role="local">
       <term>Assertions</term> constrain <!--*
* material suppressed here by diff group wgi-20080530 *
*--> the
       <termref def="dt-value-space"/> by requiring the values to satisfy specified XPath
       (<bibref ref="XPATH2"/>) expressions. The value of 
       the <compref ref="f-a"/> facet
       <!--*
* material suppressed here by diff group b5030m *
*-->
       <phrase dg="b5030m">is</phrase> a sequence of <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#as">Assertion</xspecref>
       components<phrase dg="b5030m"> as defined in
	<bibref ref="structural-schemas"/></phrase>.</termdef></p><!--*  
 <note role="example">
  <p>The following is the definition of a <termref def="dt-user-defined"/>
   datatype, which allows all integers but 0, by using an XPath expression to
   disallow the value 0.</p>
<eg>&lt;simpleType name='nonZeroInteger'>
  &lt;restriction base='integer'>
    &lt;&assref; test='. ne 0'/>
  &lt;/restriction>
&lt;/simpleType>
</eg>
 </note>
*--><example><p>The following is the definition of a <termref def="dt-user-defined"/>
   datatype which allows all integers but 0 by using an assertion to
   disallow the value 0.</p><eg xml:space="preserve">&lt;simpleType name='nonZeroInteger'&gt;
  &lt;restriction base='integer'&gt;
    &lt;<!--*
* material suppressed here by diff group b5906 *
*--><phrase dg="b5906">assertion</phrase> test='<!--*
* material suppressed here by diff group wgi-20080613 *
*--><phrase dg="wgi-20080613">$value</phrase> ne 0'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;
</eg></example><!--* MSM thinks it might be useful to give an example like the following *--><example dg="b5030m"><p>The following example defines the datatype <quote>triple</quote>,
       whose <termref def="dt-value-space"/> is the set of integers evenly divisible by 
       three.</p><eg xml:space="preserve">&lt;simpleType name='triple'&gt;
  &lt;restriction base='integer'&gt;
    &lt;<!--*
* material suppressed here by diff group b5906 *
*--><phrase dg="b5906">assertion</phrase> test='<!--*
* material suppressed here by diff group wgi-20080613 *
*--><phrase dg="wgi-20080613">$value</phrase> mod 3 eq 0'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;</eg><p>The same datatype can be defined without the use of assertions,
       but the pattern necessary to represent the set of triples is
       long and error-prone:</p><eg xml:space="preserve">&lt;simpleType name='triple'&gt;
  &lt;restriction base='integer'&gt;
    &lt;pattern value=
    "([0369]|[147][0369]*[258]|(([258]|[147][0369]*[147])([0369]|[258][0369]*[147])*([147]|[258][0369]*[258]))*"/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;</eg><p>The assertion used in the first version of <quote>triple</quote> is
       likely to be clearer for many readers of the schema document.</p></example><!--* 
But 'mod' may not be in the subset, which means some WG members won't
want to show examples using it.

*--><div4 role="1.0" id="dc-assertions"><head>The assertions Schema Component</head><compdef name="assertions" abbrev="f-a" showAKO="true"/></div4><div4 role="1.0" id="xr-assertions"><head>XML Representation of assertions Schema Components</head><p>The XML representation for an <compref ref="f-a"/> schema component is
   one or more <!--*
* material suppressed here by diff group b5906 *
*--><phrase dg="b5906"><eltref ref="assertion"/></phrase> element information items. The
   correspondences between the properties of the information item and
   properties of the component are as follows:</p><reprdef><!--*
* material suppressed here by diff group b5906 *
*--><reprelt eltname="assertion" dg="b5906"/><reprcomp abstract="assertions" ref="dc-assertions"><propmap comp="f-a" prop="value">
     A sequence whose members are <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#as">Assertion</xspecref>s drawn from the following sources,
     in order:
	 <olist><item><p>If the <propref comp="std" prop="base type definition"/> of the
	    <termref def="dt-owner"/> has an <compref ref="f-a"/> facet among its
	    <propref comp="std" prop="facets"/>, then the <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#as">Assertion</xspecref>s which appear in the 
	    <propref comp="f-p" prop="value"/> of that
	    <compref ref="f-a"/> facet.</p></item><item><p><xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#as">Assertion</xspecref>s corresponding to the <!--*
* material suppressed here by diff group b5906 *
*--><phrase dg="b5906"><eltref ref="assertion"/></phrase> element
	    information items among the <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</xpropref> of <eltref ref="restriction"/>,
	    if any, in document order.  <phrase dg="b5030mk">For
	     details of the construction of the <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#as">Assertion</xspecref> components, see
	     <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#declare-assertion">section 3.13.2</xspecref>
	     of <bibref ref="structural-schemas"/>.</phrase>
	   </p></item></olist>
    </propmap><propmap comp="f-a" prop="annotations">
     The empty sequence.
     <note><p>
      Annotations specified within an <!--*
* material suppressed here by diff group b5906 *
*--><phrase dg="b5906"><eltref ref="assertion"/></phrase> element are captured by
      the individual <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#as">Assertion</xspecref> component to which it maps.
     </p></note>
    </propmap></reprcomp></reprdef></div4><div4 role="1.0" id="assertions-validation-rules"><head>Assertions Validation Rules</head><!--*
* material suppressed here by diff group b5030-en *
*--><p dg="wgi-20080530">The following rule refers to
<quote>the nearest built-in</quote> datatype<phrase dg="b5030tf">
and to the <quote>XDM representation</quote> of a value
under a datatype</phrase>.  
<!--*
* material suppressed here by diff group b5030mk-x *
*-->
<termdef id="dt-optype" term="nearest built-in datatype">For
any datatype <var>T</var>, the <term>nearest built-in datatype</term> to
<var>T</var> is the first <termref def="dt-built-in"/> datatype encountered in following
the chain of links connecting each datatype to its
<termref def="dt-basetype"/>.  If <var>T</var> is a <termref def="dt-built-in"/> datatype, then the
nearest built-in datatype of <var>T</var> is <var>T</var> itself; otherwise,
it is the nearest built-in datatype of <var>T</var>'s <termref def="dt-basetype"/>.</termdef>
<!--*
* material suppressed here by diff group b5030mk-x *
*-->
</p><p dg="b5030tf">
<termdef id="dt-xdmrep" term="XDM representation">For 
any value <var>V</var> 
<!--*
* material suppressed here by diff group b5030tf *
*--><phrase dg="b5030tf">and any</phrase> datatype
<var>T</var>, the <term>XDM representation of <phrase><var>V</var></phrase> under 
<phrase><var>T</var></phrase></term> is 
defined recursively as follows.  Call the XDM representation
<var>X</var>.  Then<olist><item><!--* speculative *--><p>If <var>T</var> = <termref def="dt-anySimpleType"><phrase><code>xs:anySimpleType</code></phrase></termref> or <termref def="dt-anyAtomicType"><phrase><code>xs:anyAtomicType</code></phrase></termref> then <var>X</var> is <var>V</var>,
and the <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-dynamic-type">dynamic
type</xtermref> of <var>X</var> is <code>xs:untypedAtomic</code>.
</p></item><item><p>If <var>T</var> . <propref comp="std" prop="variety"/> = <pt>atomic</pt>,
then 
<!--*
&X; is &V;, and the 
<xtermref href="http://www.w3.org/TR/xpath20/#dt-dynamic-type">dynamic type</xtermref>
of &X; is the <termref def="dt-optype"/> to &T;.
*-->
let <var>T2</var> be the <termref def="dt-optype"/> to <var>T</var>.
If <var>V</var> is a member of the <termref def="dt-value-space"/> of <var>T2</var>, then 
<var>X</var> is <var>V</var> and the
<xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-dynamic-type">dynamic type</xtermref>
of <var>X</var> is <var>T2</var>.
Otherwise (i.e. if <var>V</var> is not a member of the <termref def="dt-value-space"/> of <var>T2</var>),
<var>X</var> is the <termref def="dt-xdmrep"/> of <var>V</var> 
under <var>T2</var> . <propref comp="std" prop="base type definition"/>.
</p></item><item><p>If <var>T</var> . <propref comp="std" prop="variety"/> = <pt>list</pt>,
then <var>X</var> is a sequence of atomic values, each atomic value 
being the <termref def="dt-xdmrep"/> of the corresponding
item in the list <var>V</var> under <var>T</var> . <propref comp="std" prop="item type definition"/>.
</p></item><item><p>If <var>T</var> . <propref comp="std" prop="variety"/> = <pt>union</pt>,
then <var>X</var> is the <termref def="dt-xdmrep"/> of <var>V</var>
under the <termref def="dt-active-basic-member"/> of <var>V</var>
when validated against <var>T</var>.
If there is no <termref def="dt-active-basic-member"/>,
then <var>V</var> has no <termref def="dt-xdmrep"/> under <var>T</var>.</p></item></olist>
</termdef>
<note dg="b5030tf"><p>If the <propref comp="std" prop="item type definition"/> of a
<termref def="dt-list"/> is a <termref def="dt-union"/>, or the <termref def="dt-active-basic-member"/> is
a <termref def="dt-list"/>, then several steps may be necessary before the <termref def="dt-atomic"/>
datatype which serves as the <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-dynamic-type">dynamic
type</xtermref> of <var>X</var> is found.
</p><p>Because the <propref comp="std" prop="item type definition"/>
of a <termref def="dt-list"/> is required to be an <termref def="dt-atomic"/> or <termref def="dt-union"/> datatype,
and the <termref def="dt-active-basic-member"/> of a <termref def="dt-union"/> 
which accepts the value <var>V</var> is by definition not a 
<termref def="dt-union"/>, the recursive rule given above is guaranteed to
terminate in a sequence of one or more <termref def="dt-atomic"/> values,
each belonging to an <termref def="dt-atomic"/> datatype.</p><!--*
* material suppressed here by diff group pre *
*--></note>
<!--* 
<note>
<p>These rules do not adequately handle the case where validation will
fail for reasons other than a failure to satisfy the assertions: for
example the case where the supplied value is not datatype valid
against the <termref def="dt-optype"/> to &T;. One possible resolution
is to require assertions to be checked after all other facets have
been checked.</p>
</note>
*-->
<!--* 
<note>
<p>These rules produce an XDM representation for any value &V; using
the most tightly constrained &built-in; datatype which includes &V; in
its &value_space;, using <code>xs:untypedAtomic</code> if necessary.
If assertions depend upon &V; satisfying the other constraints of &T;,
however (as seems likely sometimes to be the case in practice), then
if &V; is not facet-valid against the other facets of &T;, the
assertions will sometimes produce redundant reports of invalidity.

One possible resolution is to require
assertions to be checked after all other facets have been checked.
</p>
</note>
*-->
</p><constraintnote type="cvc" id="cvc-assertions-valid"><head>Assertions Valid</head><p>A value <var>V</var> <!--*
* material suppressed here by diff group b5030m *
*--><!--*
* material suppressed here by diff group b5030mk *
*-->
	is facet-valid with respect to an 
	<compref ref="f-a"/> facet 
	<phrase dg="b5030m">belonging to a simple type <var>T</var></phrase>
	if and only if the {test}
	property of each <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#as">Assertion</xspecref> in its <propref comp="f-a" prop="value"/>	evaluates to <code>true</code> under the
	conditions laid out below, without raising any
	<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-dynamic-error">dynamic error</loc> or
	<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-type-error">type error</loc>.</p><p>Evaluation of {test} is performed as defined in
	<bibref ref="XPATH2"/>, with the following conditions:</p><olist><!--*
* material suppressed here by diff group b5030a *
*--><!--*
* material suppressed here by diff group b5030b *
*--><!--*
* material suppressed here by diff group b5030c *
*--><!--*
* material suppressed here by diff group b5030d *
*--><!--*
* material suppressed here by diff group b5030e *
*--><!--*
* material suppressed here by diff group b5030fx *
*--><!--*
* material suppressed here by diff group b5030tf *
*--><item><p>The XPath expression {test} is evaluated,
	  following the rules given in <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#cvc-xpath">XPath Evaluation</xtermref><phrase dg="b5030tf">
	   of <bibref ref="structural-schemas"/></phrase><!--*
* material suppressed here by diff group b5030tf *
*--><phrase dg="b5030v">,
	   <!--*
* material suppressed here by diff group b5030-en *
*--> with the
	   following modifications</phrase>.
	  <olist dg="b5030v"><item dg="b5030tf-x"><p>
	     The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-in-scope-variables">in-scope variables</loc>
	     in the <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-static-context">static context</loc>
	     is a set with a single member. The <code>expanded QName</code>
	     of that member has <!--*
* material suppressed here by diff group b5030tf *
*--><phrase dg="b5030tf">no</phrase> namespace 
             <phrase dg="b5030tf">URI</phrase> and 
             <phrase dg="b5030tf">has</phrase>
             <string>value</string> as the local
	     name. The (static) <code>type</code> of the member is 
            <!--*
* material suppressed here by diff group b5030tf *
*--><phrase dg="b5030tf"><code>anyAtomicType*</code></phrase>.
	    </p><note dg="b5030tf"><p>The XDM type label <code>anyAtomicType*</code> simply says
	      that for static typing purposes the variable <code>$value</code>
	      will have a value consisting of a sequence of zero or more
	      atomic values.
	      <!--*
* material suppressed here by diff group b5030tf *
*--></p></note></item><item dg="b5030tf"><p>There is no <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-context-item">context
	      item</xtermref> for the evaluation of the XPath expression.
            </p><note><p>In the terminology of <bibref ref="XPATH2"/>, the
	      <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-context-item">context
	       item</xtermref> is <quote>undefined</quote>.
	     </p></note><note><p>
	      As a consequence the expression <string>.</string>, 
	      or any implicit or
	      explicit reference to the context item, will raise a
	      dynamic error, which will cause the assertion to be treated as false.
	      If an error is detected statically, then the assertion
	      violates the schema component constraint
	      <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#xpath-valid">XPath Valid</xspecref>
	      and causes an error to be flagged in the schema.
	     </p><p>The variable <quote><code>$value</code></quote> can be
	      used to refer to the value being checked.
	     </p></note></item><item dg="b5030tf"><p>There is likewise no value for the 
	     <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-context-size">context 
	      size</xtermref>
	     and the 
	     <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xpath20/#dt-context-position">context 
	      position</xtermref> in the <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-dynamic-context">dynamic context</loc>
	     used for evaluation of the assertion.
             <!--*
* material suppressed here by diff group b5030tf *
*-->
            </p></item><item><p>
	     The <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-variable-values">variable values</loc>
	     in the <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-dynamic-context">dynamic context</loc>
	     is a set with a single member. The <code>expanded QName</code>
	     of that member has <!--*
* material suppressed here by diff group b5030tf *
*--><phrase dg="b5030tf">no</phrase> 
             namespace <phrase dg="b5030tf">URI</phrase>
             and <string>value</string> as the local
	     name. The <code>value</code> of the member is
             <phrase dg="b5030tf">the 
             <termref def="dt-xdmrep"/> of</phrase> <var>V</var>
             <phrase dg="b5030tf">under <var>T</var></phrase>.
           </p></item><item dg="b5030tf"><p>If <var>V</var> has no <termref def="dt-xdmrep"/> under <var>T</var>,
             then the XPath expression cannot usefully be evaluated,
             and <var>V</var> is not facet-valid against the <compref ref="f-a"/>
             facet of <var>T</var>.
           </p></item></olist>
	 </p></item><item><p>The evaluation result is converted to either <code>true</code> or
	  <code>false</code> as if by a call to the XPath
	  <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2007/REC-xpath-functions-20070123/#func-boolean">fn:boolean</loc> function.</p></item></olist><!--*
* material suppressed here by diff group b5030-en *
*--></constraintnote><!--*
* material suppressed here by diff group b5030mk-x *
*--><!--*
* material suppressed here by diff group b5030mk-x *
*--></div4><div4 role="1.0" id="assertions-coss"><head>Constraints on assertions Schema Components</head><constraintnote type="cos" id="cos-assertions-restriction"><head>Valid restriction of assertions</head><p>The <propref comp="f-a" prop="value"/> of the <compref ref="f-a"/> facet
   on the <propref comp="std" prop="base type definition"/> <rfc2119>must</rfc2119> be a prefix of
   the <propref comp="f-a" prop="value"/>.</p><note><p>For components constructed from XML representations in schema documents, 
     the satisfaction of this constraint is a consequence of the XML mapping rules:
     any assertion imposed by a simple type definition <var>S</var> will always 
     also be imposed by any type derived from <var>S</var> by <termref def="dt-fb-restriction"/>.
     This constraint ensures that components constructed by other means
     (so-called <quote>born-binary</quote> components) similarly preserve
    <compref ref="f-a"/> facets across <termref def="dt-fb-restriction"/>.</p></note></constraintnote></div4></div3><!-- ************************************************************************************ --><div3 id="rf-explicitTimezone" dg="b6043"><head>explicitTimezone</head><p><termdef id="dt-timezone" term="explicitTimezone" role="local">
<term>explicitTimezone</term> is a  
three-valued facet which can can be used to 
require or prohibit the time zone offset in date/time datatypes.</termdef></p><note role="example"><p>
The following <termref def="dt-user-defined"/> datatype accepts only 
<dtref ref="date"/> values without a time zone offset,
using the <compref ref="f-tz"/> facet.
</p><eg xml:space="preserve">&lt;simpleType name='bare-date'&gt;
  &lt;restriction base='date'&gt;
    &lt;explicitTimezone value='prohibited'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;</eg><p>
The same effect could also be achieved using the 
<compref ref="f-p"/> facet, as shown below,
but it is somewhat less clear what is going on in 
this derivation, and it is better practice to use
the more straightforward <compref ref="f-tz"/> 
for this purpose.
</p><eg xml:space="preserve">&lt;simpleType name='bare-date'&gt;
  &lt;restriction base='date'&gt;
    &lt;pattern value='[^:Z]*'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;</eg></note><div4 id="dc-explicitTimezone"><head>The explicitTimezone Schema Component</head><compdef name="explicitTimezone" abbrev="f-tz" showAKO="true"/><p>If <propref comp="f-tz" prop="fixed"/> is <emph>true</emph>, then datatypes for which
the current type is the <propref comp="std" prop="base type definition"/> cannot specify a
value for <compref ref="f-tz"/> other than <propref comp="f-tz" prop="value"/>.</p><note><p>It is a consequence of 
<specref ref="timezone-valid-restriction"/> that the value of
the <compref ref="f-tz"/> facet cannot be changed unless that
value is <pt>optional</pt>, regardless of
whether <propref comp="f-tz" prop="fixed"/> is 
<pt>true</pt> or <pt>false</pt>.  Accordingly,
<propref comp="f-tz" prop="fixed"/> is relevant only when
<propref comp="f-tz" prop="value"/> is <pt>optional</pt>.</p></note></div4><div4 id="xr-timezone"><head>XML Representation of explicitTimezone Schema Components</head><p>
The XML representation for an <compref ref="f-tz"/> schema
component is an <eltref ref="explicitTimezone"/> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><reprdef><reprelt eltname="explicitTimezone"/><reprcomp abstract="explicitTimezone" ref="dc-explicitTimezone"><propmap comp="f-tz" prop="value">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>value</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>
</propmap><propmap comp="f-tz" prop="fixed">
The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-vv">actual value</xtermref> of the <code>fixed</code> <xpropref href="http://www.w3.org/TR/xml-infoset/#infoitem.element">attribute</xpropref>, if present, otherwise <pt>false</pt>
</propmap><propmap comp="f-tz" prop="annotations">
<!--*
* material suppressed here by diff group b3869 *
*-->
<phrase dg="b3869">The <xtermref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#key-am-one">annotation mapping</xtermref> of the 
<eltref ref="explicitTimezone"/> 
element, as defined in 
  section <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#declare-annotation">XML Representation of Annotation Schema Components</xspecref>
  of <bibref ref="structural-schemas"/>.</phrase>
</propmap></reprcomp></reprdef></div4><div4 id="timezone-vr"><head>explicitTimezone Validation Rules</head><constraintnote type="cvc" id="cvc-explicitTimezone-valid"><head>explicitOffset Valid</head><p>
A <dtref ref="dateTime"/> value <var>V</var>
is facet-valid with respect to <termref def="dt-timezone"/> 
if and only if
<olist role="ortest"><item><p>The <propref comp="f-tz" prop="value"/> of the facet is
<pt>required</pt> and <var>V</var> has a (non-<pt>absent</pt>)
value for the <pfref ref="vp-dt-timezone"/>
property.</p></item><item><p>The <propref comp="f-tz" prop="value"/> of the facet is
<pt>prohibited</pt> and the value for the <pfref ref="vp-dt-timezone"/>
property in <var>V</var> is <pt>absent</pt>.</p></item><item><p>The <propref comp="f-tz" prop="value"/> of the facet is
<pt>optional</pt>.</p></item></olist>
</p></constraintnote></div4><div4 id="timezone-coss"><head>Constraints on explicitTimezone Schema Components</head><constraintnote type="cos" id="timezone-valid-restriction"><head>timezone valid restriction</head><p>
If the <compref ref="f-tz"/> facet
on the <propref comp="std" prop="base type definition"/> 
has a <propref comp="f-tz" prop="value"/> other than <pt>optional</pt>,
then 
the <propref comp="f-tz" prop="value"/> of the facet on the
<termref def="dt-restriction"/> <rfc2119>must</rfc2119> be equal to the <propref comp="f-tz" prop="value"/> on 
the <propref comp="std" prop="base type definition"/>; otherwise
it is an <termref def="dt-error"/>.</p><note><p>The effect of this rule is to allow datatypes with
a <compref ref="f-tz"/> value of <pt>optional</pt> to be
restricted by specifying a value of <pt>required</pt>
or <pt>prohibited</pt>, and to forbid any other derivations
using this facet.
</p></note></constraintnote></div4></div3><!-- ************************************************************************************ --></div2><!--*
* material suppressed here by diff group dpno *
*--><!--*
* material suppressed here by diff group ep01.add.ep01.del *
*--></div1><div1 id="conformance"><head>Conformance</head><!--*
* material suppressed here by diff group b5585 *
*--><!--*
* material suppressed here by diff group b5585 *
*--><!--*
* material suppressed here by diff group b5585 *
*--><!--*
* material suppressed here by diff group b5585 *
*--><p dg="b5585"><emph>XSD 1.1: Datatypes</emph> is intended
to be usable in a variety of contexts.</p><p dg="b5585">In the usual case, it will embedded in a
<term>host language</term> such as <bibref ref="structural-schemas"/>,
which refers to this specification normatively to define some part of
the host language. In some cases, <emph>XSD 1.1: Datatypes</emph> may
be implemented independently of any host language.
</p><p dg="b3251-idef">Certain aspects of the behavior of conforming
processors are described in this specification as 
<termref def="key-impl-def"/> or <termref def="key-impl-dep"/>.
<ulist><item><p><termdef id="key-impl-def" term="implementation-defined">Something
which <rfc2119>may</rfc2119> vary among conforming implementations, but which <rfc2119>must</rfc2119>
be specified by the implementor for each particular implementation,
is <term>implementation-defined</term>.</termdef></p></item><item><p><termdef id="key-impl-dep" term="implementation-dependent">Something
which <rfc2119>may</rfc2119> vary among conforming implementations, is not specified by
this or any W3C specification, and is not required to be specified
by the implementor for any particular implementation,
is <term>implementation-dependent</term>.</termdef>
</p></item></ulist>
Anything described in this specification as <termref def="key-impl-def"/> or 
<termref def="key-impl-dep"/> <rfc2119>may</rfc2119> be further constrained by the specifications 
of a host language in which the datatypes and other material
specified here are used.
A list of implementation-defined and implementation-dependent
features can be found in <specref ref="idef-idep"/>
</p><div2 id="hostlangs" dg="b5585"><head>Host Languages</head><p>When <emph>XSD 1.1: Datatypes</emph> is embedded in a host
language, the definition of conformance is specified by the
host language, not by this specification.  That is, when this
specification is implemented in the context of an implementation
of a host language, the question of conformance to this 
specification (separate from the host language) does not arise.</p><p>This specification imposes certain constraints on the
embedding of <emph>XSD 1.1: Datatypes</emph> by a host
language; these are indicated in the normative text by
the use of the verbs <mention><rfc2119>must</rfc2119></mention>, etc., 
with the phrase <quote>host language</quote> as the subject
of the verb.</p><note><p>For convenience, the most important of these constraints
are noted here:<ulist><item><p>Host languages <rfc2119>should</rfc2119> specify  that all of the datatypes described
here as built-ins are automatically available.</p></item><item><p>Host languages <rfc2119>may</rfc2119> specify that additional datatypes are also
made available automatically.</p></item><item><p>If user-defined datatypes are to be supported in the host language,
then the host language <rfc2119>must</rfc2119> specify how user-defined datatypes are
defined and made available for use.</p></item></ulist>
</p></note><p>
In addition, host languages <rfc2119>must</rfc2119> require conforming 
implementations of
the host language to obey all of the constraints and rules
specified here.</p></div2><div2 id="independent-impl" dg="b5585"><head>Independent implementations</head><p><termdef id="dt-minimally-conforming" term="minimally conforming">Implementations claiming <term>minimal conformance</term> to this specification
independent of any host language <rfc2119>must</rfc2119> do 
<olist role="all"><item id="support-all-primitives"><p>Support all the <termref def="dt-built-in"/> datatypes defined in this specification.</p></item><item id="implement-all-cos"><p>Completely and correctly implement all of 
the <termref def="dt-cos">constraints on schemas</termref>
defined in this specification.</p></item><!--* 
<item>
<p>Completely and correctly implement all of 
the <termref def="dt-cos">Constraints on Schemas</termref>
defined in this specification.</p>
</item>
*--><item id="implement-all-vr"><p>Completely and correctly implement all of 
the <termref def="dt-cvc">Validation Rules</termref>
defined in this specification, when checking the
datatype validity of literals against datatypes.</p></item></olist>
</termdef>
</p><p>Implementations claiming <term>schema-document-aware conformance</term> 
to this specification, independent of any host language <rfc2119>must</rfc2119> be
minimally conforming.  In addition, they must do 
<olist role="all"><item id="accept-std"><p>Accept simple type definitions in the form specified in 
<specref ref="datatype-components"/>.</p></item><item id="implement-all-xrc"><p>Completely and correctly implement all of 
rules governing the XML representation of simple type definitions
specified in <specref ref="datatype-components"/>.</p></item><item id="map-xml-component"><p>Map the XML representations of simple type definitions to
simple type definition components as specified in the mapping
rules given in <specref ref="datatype-components"/>.</p></item></olist>
</p><note dg="ep26"><p>The term <term>schema-document aware</term> is used here for
parallelism with the corresponding term in <bibref ref="structural-schemas"/>.
The reference to schema documents may be taken as referring
to the fact that schema-document-aware implementations accept
the XML representation of simple type definitions found in
XSD schema documents.  It does <emph>not</emph> mean that
the simple type definitions must themselves be free-standing
XML documents, nor that they typically will be.
</p></note></div2><div2 id="data-conformance" dg="b5585"><head>Conformance of data</head><p>Abstract representations of simple type definitions conform to this
specification if and only if they obey all of the <termref def="dt-cos">constraints on schemas</termref> defined in this
specification.</p><p>XML representations of simple type definitions conform to this
specification if they obey all of the applicable rules
defined in this specification.</p><note><p>Because the conformance of the resulting simple type definition
component depends not only on the XML representation of a given
simple type definition, but on the properties of its 
<termref def="dt-basetype"/>, the conformance of an XML representation of a 
simple type definition does not guarantee that, in the 
context of other schema components, it will map to 
a conforming component.</p><!--* Life is hard.  Stuff happens. *--></note></div2><div2 id="partial-implementation" dg="partialfix"><head>Partial Implementation of Infinite Datatypes</head><p>Some <termref def="dt-primitive"/> datatypes defined in this specification have
infinite <termref def="dt-value-space">value spaces</termref>; no finite implementation can completely
handle all their possible values. For some such datatypes, minimum
implementation limits are specified below. For other infinite types
such as <dtref ref="string"/>, 
<dtref ref="hexBinary"/>, and
<dtref ref="base64Binary"/>, no minimum implementation limits are
specified.
</p><p>When this specification is used in the context of other languages
(as it is, for example, by <bibref ref="structural-schemas"/>), the
host language may specify other minimum implementation limits.</p><p>
When presented with a literal or value exceeding the capacity of
its partial implementation of a datatype, a minimally conforming
implementation of this specification will sometimes be unable to
determine with certainty whether the value is datatype-valid or
not.  Sometimes it will be unable to represent the value correctly
through its interface to any downstream application.
</p><p>
When either of these is so, a conforming processor <rfc2119>must</rfc2119> indicate
to the user and/or downstream application that it cannot process
the input data with assured correctness (much as it would indicate
if it ran out of memory).  When the datatype validity of a value
or literal is uncertain because it exceeds the capacity of a
partial implementation, the literal or value <rfc2119>must not</rfc2119> be treated
as invalid, and the unsupported value <rfc2119>must not</rfc2119> be quietly changed
to a supported value.
</p><p>
This specification does not constrain the method used to indicate
that a literal or value in the input data has exceeded the
capacity of the implementation, or the form such indications take.
</p><p><termref def="dt-minimally-conforming">Minimally
conforming</termref> processors
which set an application- or <termref def="key-impl-def"/> limit 
on the size of the values supported <rfc2119>must</rfc2119> clearly document
that limit.</p><!--
<ednote><edtext>Following (dg="partialfixfixfix") is a fix for bug 6047 (originally entered
Jan 06!).</edtext></ednote>
--><!--*
* material suppressed here by diff group edn9005 *
*--><p>These are the partial-implementation
<termref def="dt-minimally-conforming">minimal conformance</termref>
requirements:<ulist><item><p>All <termref def="dt-minimally-conforming"/> processors
<rfc2119>must</rfc2119> support <dtref ref="decimal"/> values <!--*
* material suppressed here by diff group partialfixfixfix *
*--><phrase dg="partialfixfixfix">whose absolute value can be expressed as
<var>i</var> / 10<sup><var>k</var></sup>, where
<var>i</var> and <var>k</var> are nonnegative integers such that
<var>i</var> &lt; 10<sup>16</sup> and
<var>k</var> ≤ 16</phrase> (i.e., those expressible with sixteen total
digits).</p></item><item id="loc6048"><p>All <termref def="dt-minimally-conforming"/>
processors <rfc2119>must</rfc2119> support nonnegative
<pfref ref="vp-dt-year"/> values
less than 10000 (i.e., those expressible with four
digits)<phrase dg="b6048"><!--*
* material suppressed here by diff group b6048b *
*--><phrase dg="b6048b"> in all datatypes
which use the seven-property model defined in
<specref ref="theSevenPropertyModel"/>
and have a non-<termref def="key-null"/> value for
<pfref ref="vp-dt-year"/>
(i.e. <dtref ref="dateTime"/>,
<dtref ref="dateTimeStamp"/>,
<dtref ref="date"/>,
<dtref ref="gYearMonth"/>, and
<dtref ref="gYear"/>).
</phrase></phrase>.</p></item><item><p>All <termref def="dt-minimally-conforming"/>
processors <rfc2119>must</rfc2119> support
<pfref ref="vp-dt-second"/> values to
milliseconds (i.e. those expressible with three
fraction digits)<phrase dg="b6048"><!--*
* material suppressed here by diff group b6048b *
*-->
in all datatypes 
which use the seven-property model defined in
<specref ref="theSevenPropertyModel"/>
and have a non-<termref def="key-null"/> value for
<pfref ref="vp-dt-second"/>
(i.e. <dtref ref="dateTime"/>,
<dtref ref="dateTimeStamp"/>, and
<dtref ref="time"/>).
</phrase>.</p></item><item><p>All <termref def="dt-minimally-conforming"/> processors
<rfc2119>must</rfc2119> support fractional-second <dtref ref="duration"/> values to
milliseconds (i.e. those expressible with three fraction digits).
</p></item><item><!--*
* material suppressed here by diff group b3026 *
*--><!-- quietly changed two hyphens to minus signs in this bullet--><p dg="b3026">All <termref def="dt-minimally-conforming"/>
processors <rfc2119>must</rfc2119> support <dtref ref="duration"/> values with
<vpropref ref="vp-du-month"/> values in the range −119999 to 119999
months (9999 years and 11 months) and <vpropref ref="vp-du-second"/>
values in the range −31622400 to 31622400 seconds (one
leap-year).</p></item><!--*
* material suppressed here by diff group b12300-diff10-silent *
*--></ulist>
</p></div2></div1></body><back><div1 role="1.0" id="schema"><head>Schema for <phrase dg="rec12-main">Schema Documents (Datatypes)</phrase>
<!--*
* material suppressed here by diff group rec12-main *
*--> (normative)</head><!--* <p diff="add" dg="rec12-tt">[RQ-141b]</p> *--><p dg="rec12-main">The XML representation of the datatypes-relevant
part of the schema for schema documents is presented here
as a normative
part of the specification<!--*
* material suppressed here by diff group sfs-1933 *
*-->.
<phrase dg="b6698">Independent copies of this material are
available in an undated (mutable) version at
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2009/XMLSchema/datatypes.xsd">http://www.w3.org/2009/XMLSchema/datatypes.xsd</loc>
and in a dated (immutable) version at
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2012/04/datatypes.xsd">http://www.w3.org/2012/04/datatypes.xsd</loc>
— the mutable version will be updated with future revisions of 
this specification, and the immutable one will not.
<!--*
* material suppressed here by diff group wg-internal-silent *
*-->
</phrase>
</p><p dg="rec12-main"><!--*
* material suppressed here by diff group rec12-main-eff-ok *
*--><phrase dg="rec12-main-eff-ok">Like any other 
XML document, schema documents may carry XML and document type declarations. An 
XML declaration and a document type declaration are provided here for convenience.</phrase> 
<!--*
* material suppressed here by diff group rec12-main-eff-ok *
*--> 
<!--*
* material suppressed here by diff group rec12-main-eff-ok *
*--><phrase dg="rec12-main-eff-ok">Since 
this schema document describes the XML Schema language, the <code>targetNamespace</code> 
attribute on the <code>schema</code> element refers to the XML Schema namespace 
itself.</phrase></p><p dg="b1838">
Schema documents conforming to this specification may be in XML
1.0 or XML 1.1.  Conforming implementations may accept input in
XML 1.0 or XML 1.1 or both.  See <specref ref="intro-relatedWork"/>.
</p><!--*
* material suppressed here by diff group lp *
*--><codeScrap dg="lp" id="schema-for-datatypes" file="datatypes.xsd"><head>Schema for Schema Documents (Datatypes)</head><codeBlock><phrase dg="rq20ep">&lt;?xml version='1.0'?&gt;</phrase>
&lt;!DOCTYPE xs:schema PUBLIC "<phrase diff="del" dg="ep36">-//W3C//DTD XMLSCHEMA 200102//EN</phrase><phrase diff="add" dg="ep36">-//W3C//DTD XSD 1.1//EN</phrase>" "XMLSchema.dtd" [

<!--*
* material suppressed here by diff group sfs-1933 *
*-->&lt;!--
        Make sure that processors that do not read the external
        subset will know about the various IDs we declare
  --&gt;
        &lt;!ATTLIST xs:simpleType id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:maxExclusive id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:minExclusive id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:maxInclusive id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:minInclusive id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:totalDigits id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:fractionDigits id ID #IMPLIED&gt;<!--*
* material suppressed here by diff group b12300-diff10-silent *
*--><!--*
* material suppressed here by diff group rq20rb *
*-->
        &lt;!ATTLIST xs:length id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:minLength id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:maxLength id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:enumeration id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:pattern id ID #IMPLIED&gt;<!--*
* material suppressed here by diff group rq20rb-1912 *
*--><!--*
* material suppressed here by diff group rq20rb *
*--><phrase dg="b5030">
        &lt;!ATTLIST xs:<!--*
* material suppressed here by diff group b5906 *
*--><phrase dg="b5906">assertion</phrase> id ID #IMPLIED&gt;</phrase><phrase dg="b6043">
        &lt;!ATTLIST xs:explicitTimezone id ID #IMPLIED&gt;</phrase>
        &lt;!ATTLIST xs:appinfo id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:documentation id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:list id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:union id ID #IMPLIED&gt;
        ]&gt;
<!--*
* material suppressed here by diff group rq20ep *
*-->
&lt;xs:schema<!--*
* material suppressed here by diff group sfs-1933 *
*--> xmlns:xs="http://www.w3.org/2001/XMLSchema"<!--*
* material suppressed here by diff group b6120 *
*-->
           elementFormDefault="qualified" <phrase dg="rq20ep">
           </phrase>xml:lang="en"
           targetNamespace="http://www.w3.org/2001/XMLSchema"
           version="<!--*
* material suppressed here by diff group rq20ep *
*--><phrase dg="rq20ep">datatypes.xsd (rec-20120405)</phrase>"&gt;
  &lt;xs:annotation&gt;
    &lt;xs:documentation source="../datatypes/datatypes.html"&gt;
      The schema corresponding to this document is normative,
      with respect to the syntactic constraints it expresses in the
      XML Schema language.  The documentation (within <!--*
* material suppressed here by diff group b11093 *
*--><phrase dg="b11093">'documentation'</phrase>
      elements) below, is not normative, but rather highlights important
      aspects of the W3C Recommendation of which this is a part.<phrase dg="b6698">

      See below (at the bottom of this document) for information about
      the revision and namespace-versioning policy governing this
      schema document.</phrase>
    &lt;/xs:documentation&gt;
  &lt;/xs:annotation&gt;
<!--*
* material suppressed here by diff group sfs-1933 *
*-->
<!--*
* material suppressed here by diff group sfs-1933 *
*-->
  &lt;xs:simpleType name="derivationControl"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   A utility type, not for public use&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:NMTOKEN"&gt;
      &lt;xs:enumeration value="substitution"/&gt;
      &lt;xs:enumeration value="extension"/&gt;
      &lt;xs:enumeration value="restriction"/&gt;
      &lt;xs:enumeration value="list"/&gt;
      &lt;xs:enumeration value="union"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:group name="simpleDerivation"&gt;
    &lt;xs:choice&gt;
      &lt;xs:element ref="xs:restriction"/&gt;
      &lt;xs:element ref="xs:list"/&gt;
      &lt;xs:element ref="xs:union"/&gt;
    &lt;/xs:choice&gt;
  &lt;/xs:group&gt;
  &lt;xs:simpleType name="simpleDerivationSet"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   #all or (possibly empty) subset of {restriction, <phrase dg="rec12-main">extension, </phrase>union, list}
   &lt;/xs:documentation&gt;
      &lt;xs:documentation&gt;
   A utility type, not for public use&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:union&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base="xs:token"&gt;
          &lt;xs:enumeration value="#all"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:list&gt;
          &lt;xs:simpleType&gt;
            &lt;xs:restriction base="xs:derivationControl"&gt;
              &lt;xs:enumeration value="list"/&gt;
              &lt;xs:enumeration value="union"/&gt;
              &lt;xs:enumeration value="restriction"/&gt;<phrase dg="rec12-main">
              &lt;xs:enumeration value="extension"/&gt;</phrase>
            &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
        &lt;/xs:list&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:union&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:complexType name="simpleType" abstract="true"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        &lt;xs:group ref="xs:simpleDerivation"/&gt;
        &lt;xs:attribute name="final" type="xs:simpleDerivationSet"/&gt;
        &lt;xs:attribute name="name" type="xs:NCName"&gt;
          &lt;xs:annotation&gt;
            &lt;xs:documentation&gt;
              Can be restricted to required or forbidden
            &lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
        &lt;/xs:attribute&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="topLevelSimpleType"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:simpleType"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:group ref="xs:simpleDerivation"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="name" type="xs:NCName" use="required"&gt;
          &lt;xs:annotation&gt;
            &lt;xs:documentation&gt;
              Required at the top level
            &lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
        &lt;/xs:attribute&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="localSimpleType"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:simpleType"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:group ref="xs:simpleDerivation"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="name" use="prohibited"&gt;
          &lt;xs:annotation&gt;
            &lt;xs:documentation&gt;
              Forbidden when nested
            &lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
        &lt;/xs:attribute&gt;
        &lt;xs:attribute name="final" use="prohibited"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:element name="simpleType" type="xs:topLevelSimpleType" id="simpleType"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#element-simpleType"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
<!--*
* material suppressed here by diff group b3251 *
*--><phrase dg="b3251">  &lt;xs:element name="facet" abstract="true"<!--*
* material suppressed here by diff group b5929 *
*-->&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
        An abstract element, representing facets in general.
        The facets defined by this spec are substitutable for
        this element, and implementation-defined facets should
        also name this as a substitution-group head.
      &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
</phrase>  &lt;xs:group name="simpleRestrictionModel"&gt;
    &lt;xs:sequence&gt;
      &lt;xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/&gt;
<!--*
* material suppressed here by diff group b3251 *
*--><phrase dg="b3251">      &lt;xs:choice minOccurs="0" 
          maxOccurs="unbounded"&gt;
        &lt;xs:element ref="xs:facet"/&gt;
        &lt;xs:any processContents="lax"
            namespace="##other"/&gt;
      &lt;/xs:choice&gt;
</phrase>    &lt;/xs:sequence&gt;
  &lt;/xs:group&gt;
  &lt;xs:element name="restriction" id="restriction"&gt;
    &lt;xs:complexType&gt;
      &lt;xs:annotation&gt;
        &lt;xs:documentation
             source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#element-restriction"&gt;
          base attribute and simpleType child are mutually
          exclusive, but one or other is required
        &lt;/xs:documentation&gt;
      &lt;/xs:annotation&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:annotated"&gt;
          &lt;xs:group ref="xs:simpleRestrictionModel"/&gt;
          &lt;xs:attribute name="base" type="xs:QName" use="optional"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="list" id="list"&gt;
    &lt;xs:complexType&gt;
      &lt;xs:annotation&gt;
        &lt;xs:documentation
             source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#element-list"&gt;
          itemType attribute and simpleType child are mutually
          exclusive, but one or other is required
        &lt;/xs:documentation&gt;
      &lt;/xs:annotation&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:annotated"&gt;
          &lt;xs:sequence&gt;
            &lt;xs:element name="simpleType" type="xs:localSimpleType"
                        minOccurs="0"/&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute name="itemType" type="xs:QName" use="optional"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="union" id="union"&gt;
    &lt;xs:complexType&gt;
      &lt;xs:annotation&gt;
        &lt;xs:documentation
             source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#element-union"&gt;
          memberTypes attribute must be non-empty or there must be
          at least one simpleType child
        &lt;/xs:documentation&gt;
      &lt;/xs:annotation&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:annotated"&gt;
          &lt;xs:sequence&gt;
            &lt;xs:element name="simpleType" type="xs:localSimpleType"
                        minOccurs="0" maxOccurs="unbounded"/&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute name="memberTypes" use="optional"&gt;
            &lt;xs:simpleType&gt;
              &lt;xs:list itemType="xs:QName"/&gt;
            &lt;/xs:simpleType&gt;
          &lt;/xs:attribute&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &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:attribute name="fixed" type="xs:boolean" default="false"
                      use="optional"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="noFixedFacet"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:facet"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="fixed" use="prohibited"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:element name="minExclusive" type="xs:facet" <phrase dg="b3251"> 
    </phrase>id="minExclusive"<phrase dg="b3251">
    substitutionGroup="xs:facet"</phrase>&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#element-minExclusive"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="minInclusive" type="xs:facet" <phrase dg="b3251">
    </phrase>id="minInclusive"<phrase dg="b3251">
    substitutionGroup="xs:facet"</phrase>&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#element-minInclusive"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="maxExclusive" type="xs:facet" <phrase dg="b3251">
    </phrase>id="maxExclusive"<phrase dg="b3251">
    substitutionGroup="xs:facet"</phrase>&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#element-maxExclusive"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="maxInclusive" type="xs:facet" <phrase dg="b3251"> 
    </phrase>id="maxInclusive"<phrase dg="b3251">
    substitutionGroup="xs:facet"</phrase>&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#element-maxInclusive"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:complexType name="numFacet"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:facet"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="value" <phrase dg="b3251"> 
            </phrase>type="xs:nonNegativeInteger" use="required"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
<!--*
* material suppressed here by diff group rq20rb *
*--><phrase dg="rq31m">
  &lt;xs:complexType name="intFacet"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:facet"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="value" type="xs:integer" use="required"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;</phrase>
<!--*
* material suppressed here by diff group rq20rb *
*-->
  &lt;xs:element name="totalDigits" id="totalDigits"<phrase dg="b3251">
    substitutionGroup="xs:facet"</phrase>&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#element-totalDigits"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:restriction base="<phrase dg="rq20rb">xs:numFacet</phrase><!--*
* material suppressed here by diff group rq20rb *
*-->"&gt;
          &lt;xs:sequence&gt;
            &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute name="value" type="xs:positiveInteger" use="required"/&gt;
          &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="fractionDigits" type="xs:numFacet" <phrase dg="b3251"> 
    </phrase>id="fractionDigits"<phrase dg="b3251">
    substitutionGroup="xs:facet"</phrase>&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#element-fractionDigits"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
<!--*
* material suppressed here by diff group b12300-diff10-silent *
*-->
  &lt;xs:element name="length" type="<phrase dg="rq20rb">xs:numFacet</phrase><!--*
* material suppressed here by diff group rq20rb *
*-->" id="length"<phrase dg="b3251">
    substitutionGroup="xs:facet"</phrase>&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#element-length"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="minLength" type="<phrase dg="rq20rb">xs:numFacet</phrase><!--*
* material suppressed here by diff group rq20rb *
*-->" <phrase dg="b3251"> 
    </phrase>id="minLength"<phrase dg="b3251">
    substitutionGroup="xs:facet"</phrase>&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#element-minLength"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="maxLength" type="<phrase dg="rq20rb">xs:numFacet</phrase><!--*
* material suppressed here by diff group rq20rb *
*-->" <phrase dg="b3251"> 
    </phrase>id="maxLength"<phrase dg="b3251">
    substitutionGroup="xs:facet"</phrase>&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#element-maxLength"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="enumeration" type="xs:noFixedFacet" <phrase dg="b3251"> 
    </phrase>id="enumeration"<phrase dg="b3251">
    substitutionGroup="xs:facet"</phrase>&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#element-enumeration"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="whiteSpace" id="whiteSpace"<phrase dg="b3251">
    substitutionGroup="xs:facet"</phrase>&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#element-whiteSpace"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:restriction base="xs:facet"&gt;
          &lt;xs:sequence&gt;
            &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute name="value" use="required"&gt;
            &lt;xs:simpleType&gt;
              &lt;xs:restriction base="xs:NMTOKEN"&gt;
                &lt;xs:enumeration value="preserve"/&gt;
                &lt;xs:enumeration value="replace"/&gt;
                &lt;xs:enumeration value="collapse"/&gt;
              &lt;/xs:restriction&gt;
            &lt;/xs:simpleType&gt;
          &lt;/xs:attribute&gt;
          &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;<!--*
* material suppressed here by diff group rq20rb-1912 *
*-->
  &lt;xs:element name="pattern" id="pattern"<phrase dg="b3251">
    substitutionGroup="xs:facet"</phrase>&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#element-pattern"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:restriction base="xs:noFixedFacet"&gt;
          &lt;xs:sequence&gt;
            &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute name="value" type="xs:string" <phrase dg="b3251"> 
              </phrase>use="required"/&gt;
          &lt;xs:anyAttribute namespace="##other" <phrase dg="b3251"> 
              </phrase>processContents="lax"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;<phrase dg="b5906">
  &lt;xs:element name="assertion" type="xs:assertion"
              id="assertion"<phrase dg="b3251"> substitutionGroup="xs:facet"</phrase>&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#element-assertion"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;</phrase><phrase dg="b6043">
  &lt;xs:element name="explicitTimezone" id="explicitTimezone"<phrase dg="b3251">
    substitutionGroup="xs:facet"</phrase>&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#element-explicitTimezone"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:restriction base="xs:facet"&gt;
          &lt;xs:sequence&gt;
            &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute name="value" use="required"&gt;
            &lt;xs:simpleType&gt;
              &lt;xs:restriction base="xs:NMTOKEN"&gt;
                &lt;xs:enumeration value="optional"/&gt;
                &lt;xs:enumeration value="required"/&gt;
                &lt;xs:enumeration value="prohibited"/&gt;
              &lt;/xs:restriction&gt;
            &lt;/xs:simpleType&gt;
          &lt;/xs:attribute&gt;
          &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;</phrase><phrase dg="b6698">

  &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;
      In keeping with the XML Schema WG's standard versioning policy, 
      this schema document will persist at the URI
      http://www.w3.org/2012/04/datatypes.xsd.

      At the date of issue it can also be found at the URI
      http://www.w3.org/2009/XMLSchema/datatypes.xsd.

      The schema document at that URI may however change in the future, 
      in order to remain compatible with the latest version of XSD 
      and its namespace.  In other words, if XSD or the XML Schema 
      namespace change, the version of this document at 
      http://www.w3.org/2009/XMLSchema/datatypes.xsd will change accordingly; 
      the version at http://www.w3.org/2012/04/datatypes.xsd will not change.

      Previous dated (and unchanging) versions of this schema document 
      include:
<phrase dg="ep37">
        http://www.w3.org/2012/01/datatypes.xsd
          (XSD 1.1 Proposed Recommendation)</phrase>
<phrase dg="pr-201201">
        http://www.w3.org/2011/07/datatypes.xsd
          (XSD 1.1 Candidate Recommendation)</phrase>

        http://www.w3.org/2009/04/datatypes.xsd
          (XSD 1.1 Candidate Recommendation)

        http://www.w3.org/2004/10/datatypes.xsd
          (XSD 1.0 Recommendation, Second Edition)

        http://www.w3.org/2001/05/datatypes.xsd
          (XSD 1.0 Recommendation, First Edition)

    &lt;/xs:documentation&gt;
  &lt;/xs:annotation&gt;


</phrase>
&lt;/xs:schema&gt;
</codeBlock></codeScrap></div1><div1 role="1.0" id="dtd-for-datatypeDefs"><head>DTD for Datatype Definitions (non-normative)</head><!--* <p diff="add" dg="rec12-tt">[RQ-141b]</p> *--><p dg="rec12-main">The DTD for the datatypes-specific
aspects of schema documents is given below.  Note there is
<emph>no</emph> implication here that <code>schema</code> <rfc2119>must</rfc2119> be
the root element of a document.</p><!--*
* material suppressed here by diff group b6698x *
*--><!--*
* material suppressed here by diff group lp *
*--><codeScrap dg="lp" id="dtd-for-datatypes" file="datatypes.dtd"><head>DTD for datatype definitions</head><codeBlock>&lt;!--
        DTD for XML Schemas: Part 2: Datatypes
        <!--*
* material suppressed here by diff group rq20ep *
*--><phrase dg="rq20ep">
        Id: datatypes.dtd,v 1.1.2.4 2005/01/31 18:40:42 cmsmcq Exp </phrase>
        Note this DTD is NOT normative, or even definitive.
  --&gt;

&lt;!--
        This DTD cannot be used on its own, it is intended
        only for incorporation in XMLSchema.dtd, q.v.
  --&gt;

&lt;!-- Define all the element names, with optional prefix --&gt;
&lt;!ENTITY % simpleType "%p;simpleType"&gt;
&lt;!ENTITY % restriction "%p;restriction"&gt;
&lt;!ENTITY % list "%p;list"&gt;
&lt;!ENTITY % union "%p;union"&gt;
&lt;!ENTITY % maxExclusive "%p;maxExclusive"&gt;
&lt;!ENTITY % minExclusive "%p;minExclusive"&gt;
&lt;!ENTITY % maxInclusive "%p;maxInclusive"&gt;
&lt;!ENTITY % minInclusive "%p;minInclusive"&gt;
&lt;!ENTITY % totalDigits "%p;totalDigits"&gt;
&lt;!ENTITY % fractionDigits "%p;fractionDigits"&gt;
<!--*
* material suppressed here by diff group b12300-diff10-silent *
*-->
&lt;!ENTITY % length "%p;length"&gt;
&lt;!ENTITY % minLength "%p;minLength"&gt;
&lt;!ENTITY % maxLength "%p;maxLength"&gt;<!--*
* material suppressed here by diff group rq20rb-1912 *
*-->
&lt;!ENTITY % enumeration "%p;enumeration"&gt;
&lt;!ENTITY % whiteSpace "%p;whiteSpace"&gt;
&lt;!ENTITY % pattern "%p;pattern"&gt;
<phrase dg="b5030">
&lt;!ENTITY % <!--*
* material suppressed here by diff group b5906 *
*--><phrase dg="b5906">assertion</phrase> "%p;<!--*
* material suppressed here by diff group b5906 *
*--><phrase dg="b5906">assertion</phrase>"&gt;
</phrase><phrase dg="b6043">
&lt;!ENTITY % explicitTimezone "%p;explicitTimezone"&gt;
</phrase>

&lt;!--
        Customization entities for the ATTLIST of each element
        type. Define one of these if your schema takes advantage
        of the anyAttribute='##other' in the schema for schemas
  --&gt;

&lt;!ENTITY % simpleTypeAttrs ""&gt;
&lt;!ENTITY % restrictionAttrs ""&gt;
&lt;!ENTITY % listAttrs ""&gt;
&lt;!ENTITY % unionAttrs ""&gt;
&lt;!ENTITY % maxExclusiveAttrs ""&gt;
&lt;!ENTITY % minExclusiveAttrs ""&gt;
&lt;!ENTITY % maxInclusiveAttrs ""&gt;
&lt;!ENTITY % minInclusiveAttrs ""&gt;
&lt;!ENTITY % totalDigitsAttrs ""&gt;
&lt;!ENTITY % fractionDigitsAttrs ""&gt;
&lt;!ENTITY % lengthAttrs ""&gt;
&lt;!ENTITY % minLengthAttrs ""&gt;
&lt;!ENTITY % maxLengthAttrs ""&gt;<!--*
* material suppressed here by diff group rq20rb-1912 *
*-->
<!--*
* material suppressed here by diff group b12300-diff10-silent *
*-->
&lt;!ENTITY % enumerationAttrs ""&gt;
&lt;!ENTITY % whiteSpaceAttrs ""&gt;
&lt;!ENTITY % patternAttrs ""&gt;<phrase dg="b5906">
&lt;!ENTITY % assertionAttrs ""&gt;</phrase><phrase dg="b6043">
&lt;!ENTITY % explicitTimezoneAttrs ""&gt;</phrase>

&lt;!-- Define some entities for informative use as attribute
        types --&gt;
&lt;!ENTITY % URIref "CDATA"&gt;
&lt;!ENTITY % XPathExpr "CDATA"&gt;
&lt;!ENTITY % QName "NMTOKEN"&gt;
&lt;!ENTITY % QNames "NMTOKENS"&gt;
&lt;!ENTITY % NCName "NMTOKEN"&gt;
&lt;!ENTITY % nonNegativeInteger "NMTOKEN"&gt;
&lt;!ENTITY % boolean "(true|false)"&gt;
&lt;!ENTITY % simpleDerivationSet "CDATA"&gt;
&lt;!--
        #all or space-separated list drawn from derivationChoice
  --&gt;

&lt;!--
        Note that the use of 'facet' below is less restrictive
        than is really intended:  There should in fact be no
        more than one of each of minInclusive, minExclusive,
        maxInclusive, maxExclusive, totalDigits, fractionDigits,
        length, maxLength, minLength within datatype,
        and the min- and max- variants of Inclusive and Exclusive
        are mutually exclusive. On the other hand,  pattern and
        enumeration <phrase dg="b5030">and <!--*
* material suppressed here by diff group b5906 *
*--><phrase dg="b5906">assertion</phrase></phrase> may repeat.
  --&gt;
&lt;!ENTITY % minBound "(%minInclusive; | %minExclusive;)"&gt;
&lt;!ENTITY % maxBound "(%maxInclusive; | %maxExclusive;)"&gt;
&lt;!ENTITY % bounds "%minBound; | %maxBound;"&gt;
&lt;!ENTITY % numeric "%totalDigits; | %fractionDigits;<!--*
* material suppressed here by diff group b12300-diff10-silent *
*--><!--*
* material suppressed here by diff group rq20rb-1912 *
*-->"&gt; 
&lt;!ENTITY % ordered "%bounds; | %numeric;"&gt;
&lt;!ENTITY % unordered
   "%pattern; | %enumeration; | %whiteSpace; | %length; |
   %maxLength; | %minLength;<phrase dg="b5030"> | %<!--*
* material suppressed here by diff group b5906 *
*--><phrase dg="b5906">assertion</phrase>;</phrase><phrase dg="b6043">
   | %explicitTimezone;</phrase>"&gt;
<!--*
* material suppressed here by diff group b3251 *
*--><phrase dg="b3251">&lt;!ENTITY % implementation-defined-facets ""&gt;
&lt;!ENTITY % facet "%ordered; | %unordered; %implementation-defined-facets;"&gt;
</phrase>&lt;!ENTITY % facetAttr 
        "value CDATA #REQUIRED
        id ID #IMPLIED"&gt;
&lt;!ENTITY % fixedAttr "fixed %boolean; #IMPLIED"&gt;
&lt;!ENTITY % facetModel "(%annotation;)?"&gt;
&lt;!ELEMENT %simpleType;
        ((%annotation;)?, (%restriction; | %list; | %union;))&gt;
&lt;!ATTLIST %simpleType;
    name      %NCName; #IMPLIED
    final     %simpleDerivationSet; #IMPLIED
    id        ID       #IMPLIED
    %simpleTypeAttrs;&gt;
&lt;!-- name is required at top level --&gt;
&lt;!ELEMENT %restriction; ((%annotation;)?,
                         (%restriction1; |
                          ((%simpleType;)?,(%facet;)*)),
                         (%attrDecls;))&gt;
&lt;!ATTLIST %restriction;
    base      %QName;                  #IMPLIED
    id        ID       #IMPLIED
    %restrictionAttrs;&gt;
&lt;!--
        base and simpleType child are mutually exclusive,
        one is required.

        restriction is shared between simpleType and
        simpleContent and complexContent (in XMLSchema.xsd).
        restriction1 is for the latter cases, when this
        is restricting a complex type, as is attrDecls.
  --&gt;
&lt;!ELEMENT %list; ((%annotation;)?,(%simpleType;)?)&gt;
&lt;!ATTLIST %list;
    itemType      %QName;             #IMPLIED
    id        ID       #IMPLIED
    %listAttrs;&gt;
&lt;!--
        itemType and simpleType child are mutually exclusive,
        one is required
  --&gt;
&lt;!ELEMENT %union; ((%annotation;)?,(%simpleType;)*)&gt;
&lt;!ATTLIST %union;
    id            ID       #IMPLIED
    memberTypes   %QNames;            #IMPLIED
    %unionAttrs;&gt;
&lt;!--
        At least one item in memberTypes or one simpleType
        child is required
  --&gt;

&lt;!ELEMENT %maxExclusive; %facetModel;&gt;
&lt;!ATTLIST %maxExclusive;
        %facetAttr;
        %fixedAttr;
        %maxExclusiveAttrs;&gt;
&lt;!ELEMENT %minExclusive; %facetModel;&gt;
&lt;!ATTLIST %minExclusive;
        %facetAttr;
        %fixedAttr;
        %minExclusiveAttrs;&gt;

&lt;!ELEMENT %maxInclusive; %facetModel;&gt;
&lt;!ATTLIST %maxInclusive;
        %facetAttr;
        %fixedAttr;
        %maxInclusiveAttrs;&gt;
&lt;!ELEMENT %minInclusive; %facetModel;&gt;
&lt;!ATTLIST %minInclusive;
        %facetAttr;
        %fixedAttr;
        %minInclusiveAttrs;&gt;

&lt;!ELEMENT %totalDigits; %facetModel;&gt;
&lt;!ATTLIST %totalDigits;
        %facetAttr;
        %fixedAttr;
        %totalDigitsAttrs;&gt;
&lt;!ELEMENT %fractionDigits; %facetModel;&gt;
&lt;!ATTLIST %fractionDigits;
        %facetAttr;
        %fixedAttr;
        %fractionDigitsAttrs;&gt;<!--*
* material suppressed here by diff group b12300-diff10-silent *
*-->
<!--*
* material suppressed here by diff group rq20rb-1912 *
*-->
&lt;!ELEMENT %length; %facetModel;&gt;
&lt;!ATTLIST %length;
        %facetAttr;
        %fixedAttr;
        %lengthAttrs;&gt;
&lt;!ELEMENT %minLength; %facetModel;&gt;
&lt;!ATTLIST %minLength;
        %facetAttr;
        %fixedAttr;
        %minLengthAttrs;&gt;
&lt;!ELEMENT %maxLength; %facetModel;&gt;
&lt;!ATTLIST %maxLength;
        %facetAttr;
        %fixedAttr;
        %maxLengthAttrs;&gt;

&lt;!-- This one can be repeated --&gt;
&lt;!ELEMENT %enumeration; %facetModel;&gt;
&lt;!ATTLIST %enumeration;
        %facetAttr;
        %enumerationAttrs;&gt;

&lt;!ELEMENT %whiteSpace; %facetModel;&gt;
&lt;!ATTLIST %whiteSpace;
        %facetAttr;
        %fixedAttr;
        %whiteSpaceAttrs;&gt;

&lt;!-- This one can be repeated --&gt;
&lt;!ELEMENT %pattern; %facetModel;&gt;
&lt;!ATTLIST %pattern;
        %facetAttr;
        %patternAttrs;&gt;<phrase dg="b5906">

&lt;!ELEMENT %assertion; %facetModel;&gt;
&lt;!ATTLIST %assertion;
        %facetAttr;
        %assertionAttrs;&gt;</phrase><phrase dg="b6043">

&lt;!ELEMENT %explicitTimezone; %facetModel;&gt;
&lt;!ATTLIST %explicitTimezone;
        %facetAttr;
        %explicitTimezoneAttrs;&gt;</phrase>
</codeBlock></codeScrap></div1><div1 id="prim.nxsd" dg="aux-1933"><head><phrase dg="sfs-1933">Illustrative XML representations for the built-in simple type definitions</phrase></head><div2 id="sec-prim-nxsd"><head><phrase dg="sfs-1933">Illustrative XML representations for the built-in primitive type definitions</phrase><!--*
* material suppressed here by diff group b5150 *
*--></head><p dg="sfs-1933">The following, although in the form of a
schema document, does not conform to the rules for schema documents
defined in this specification. It contains explicit XML
representations of the primitive datatypes which need not be declared
in a schema document, since they are automatically included in every
schema, and indeed must not be declared in a schema document, since it
is forbidden to try to derive types with <dtref ref="anyAtomicType"/>
as the base type definition. It is included here as a form of
documentation.<!--*
* material suppressed here by diff group rad-1933 *
*-->
</p><codeScrap id="not-schema-for-primitives" file="primitives.nxsd"><head><phrase dg="sfs-1933">The (not a) schema document for primitive built-in type definitions</phrase></head><codeBlock><phrase dg="aux-1933">&lt;?xml version='1.0'?&gt;
&lt;!DOCTYPE xs:schema SYSTEM "../namespace/XMLSchema.dtd"<phrase dg="dta"> [
</phrase></phrase><phrase dg="dta">
&lt;!--
     keep this schema XML1.0 DTD valid
  --&gt;
        &lt;!ENTITY % schemaAttrs 'xmlns:hfp CDATA #IMPLIED'&gt;

        &lt;!ELEMENT hfp:hasFacet EMPTY&gt;
        &lt;!ATTLIST hfp:hasFacet
                name <phrase dg="rq20rb">NMTOKEN</phrase><!--*
* material suppressed here by diff group rq20rb *
*--> #REQUIRED&gt;

        &lt;!ELEMENT hfp:hasProperty EMPTY&gt;
        &lt;!ATTLIST hfp:hasProperty
                name NMTOKEN #REQUIRED
                value CDATA #REQUIRED&gt;
]</phrase>&gt;
<phrase dg="aux-1933">&lt;xs:schema<phrase dg="dta">
  xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" </phrase>
  xmlns:xs="http://www.w3.org/2001/XMLSchema"<!--*
* material suppressed here by diff group b6120 *
*-->
  elementFormDefault="qualified" 
  xml:lang="en" 
  targetNamespace="http://www.w3.org/2001/XMLSchema"&gt;
</phrase>
  &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;
      <!--*
* material suppressed here by diff group sfs-1933 *
*--><phrase dg="sfs-1933">This document contains XML elements which look like 
      definitions for the primitive datatypes.</phrase>  These definitions are for
      information only<!--*
* material suppressed here by diff group sfs-1933 *
*--><phrase dg="sfs-1933">;</phrase> the real built-in definitions are magic.
    &lt;/xs:documentation&gt;
    &lt;xs:documentation&gt;
      For each built-in datatype in this schema (both primitive and
      derived) can be uniquely addressed via a URI constructed
      as follows:
        1) the base URI is the URI of the XML Schema namespace
        2) the fragment identifier is the name of the datatype

      For example, to address the int datatype, the URI is:

        http://www.w3.org/2001/XMLSchema#int

      Additionally, each facet definition element can be uniquely
      addressed via a URI constructed as follows:
        1) the base URI is the URI of the XML Schema namespace
        2) the fragment identifier is the name of the facet

      For example, to address the maxInclusive facet, the URI is:

        http://www.w3.org/2001/XMLSchema#maxInclusive

      Additionally, each facet usage in a built-in datatype definition
      can be uniquely addressed via a URI constructed as follows:
        1) the base URI is the URI of the XML Schema namespace
        2) the fragment identifier is the name of the datatype, followed
           by a period (".") followed by the name of the facet

      For example, to address the usage of the maxInclusive facet in
      the definition of int, the URI is:

        http://www.w3.org/2001/XMLSchema#int.maxInclusive

    &lt;/xs:documentation&gt;
  &lt;/xs:annotation&gt;
  &lt;xs:simpleType name="string" id="string"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="length"/&gt;
        &lt;hfp:hasFacet name="minLength"/&gt;
        &lt;hfp:hasFacet name="maxLength"/&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;<phrase dg="b5030">
        &lt;hfp:hasFacet name="assertions"/&gt;</phrase>
        &lt;hfp:hasProperty name="ordered" value="false"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#string"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="<!--*
* material suppressed here by diff group aat *
*--><phrase dg="aat">xs:anyAtomicType</phrase>"&gt;
      &lt;xs:whiteSpace value="preserve" id=<!--*
* material suppressed here by diff group b3840 *
*--><phrase dg="b3840">"string.whiteSpace"</phrase>/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="boolean" id="boolean"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;<phrase dg="b5030">
        &lt;hfp:hasFacet name="assertions"/&gt;</phrase>
        &lt;hfp:hasProperty name="ordered" value="false"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="finite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#boolean"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="<!--*
* material suppressed here by diff group aat *
*--><phrase dg="aat">xs:anyAtomicType</phrase>"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="boolean.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="float" id="float"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;<phrase dg="b5030">
        &lt;hfp:hasFacet name="assertions"/&gt;</phrase>
        &lt;hfp:hasProperty name="ordered" value="partial"/&gt;
        &lt;hfp:hasProperty name="bounded" value="true"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="finite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="true"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#float"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="<!--*
* material suppressed here by diff group aat *
*--><phrase dg="aat">xs:anyAtomicType</phrase>"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="float.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="double" id="double"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;<phrase dg="b5030">
        &lt;hfp:hasFacet name="assertions"/&gt;</phrase>
        &lt;hfp:hasProperty name="ordered" value="partial"/&gt;
        &lt;hfp:hasProperty name="bounded" value="true"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="finite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="true"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#double"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="<!--*
* material suppressed here by diff group aat *
*--><phrase dg="aat">xs:anyAtomicType</phrase>"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="double.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="decimal" id="decimal"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="totalDigits"/&gt;
        &lt;hfp:hasFacet name="fractionDigits"/&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;<phrase dg="b5030">
        &lt;hfp:hasFacet name="assertions"/&gt;</phrase>
        &lt;hfp:hasProperty name="ordered" value="total"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="true"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#decimal"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="<!--*
* material suppressed here by diff group aat *
*--><phrase dg="aat">xs:anyAtomicType</phrase>"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="decimal.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
<!--*
* material suppressed here by diff group b12300-diff10-silent *
*-->
  &lt;xs:simpleType name="duration" id="duration"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;<phrase dg="b5030">
        &lt;hfp:hasFacet name="assertions"/&gt;</phrase>
        &lt;hfp:hasProperty name="ordered" value="partial"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#duration"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="<!--*
* material suppressed here by diff group aat *
*--><phrase dg="aat">xs:anyAtomicType</phrase>"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="duration.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="dateTime" id="dateTime"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;<phrase dg="b5030">
        &lt;hfp:hasFacet name="assertions"/&gt;</phrase><phrase dg="b6043">
        &lt;hfp:hasFacet name="explicitTimezone"/&gt;</phrase>
        &lt;hfp:hasProperty name="ordered" value="partial"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#dateTime"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="<!--*
* material suppressed here by diff group aat *
*--><phrase dg="aat">xs:anyAtomicType</phrase>"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="dateTime.whiteSpace"/&gt;<phrase dg="b6043">
      &lt;xs:explicitTimezone value="optional" id="dateTime.explicitTimezone"/&gt;</phrase>
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="time" id="time"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;<phrase dg="b5030">
        &lt;hfp:hasFacet name="assertions"/&gt;</phrase><phrase dg="b6043">
        &lt;hfp:hasFacet name="explicitTimezone"/&gt;</phrase>
        &lt;hfp:hasProperty name="ordered" value="partial"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#time"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="<!--*
* material suppressed here by diff group aat *
*--><phrase dg="aat">xs:anyAtomicType</phrase>"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="time.whiteSpace"/&gt;<phrase dg="b6043">
      &lt;xs:explicitTimezone value="optional" id="time.explicitTimezone"/&gt;</phrase>
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="date" id="date"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;<phrase dg="b5030">
        &lt;hfp:hasFacet name="assertions"/&gt;</phrase><phrase dg="b6043">
        &lt;hfp:hasFacet name="explicitTimezone"/&gt;</phrase>
        &lt;hfp:hasProperty name="ordered" value="partial"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#date"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="<!--*
* material suppressed here by diff group aat *
*--><phrase dg="aat">xs:anyAtomicType</phrase>"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="date.whiteSpace"/&gt;<phrase dg="b6043">
      &lt;xs:explicitTimezone value="optional" id="date.explicitTimezone"/&gt;</phrase>
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="gYearMonth" id="gYearMonth"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;<phrase dg="b5030">
        &lt;hfp:hasFacet name="assertions"/&gt;</phrase><phrase dg="b6043">
        &lt;hfp:hasFacet name="explicitTimezone"/&gt;</phrase>
        &lt;hfp:hasProperty name="ordered" value="partial"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#gYearMonth"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="<!--*
* material suppressed here by diff group aat *
*--><phrase dg="aat">xs:anyAtomicType</phrase>"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="gYearMonth.whiteSpace"/&gt;<phrase dg="b6043">
      &lt;xs:explicitTimezone value="optional" id="gYearMonth.explicitTimezone"/&gt;</phrase>
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="gYear" id="gYear"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;<phrase dg="b5030">
        &lt;hfp:hasFacet name="assertions"/&gt;</phrase><phrase dg="b6043">
        &lt;hfp:hasFacet name="explicitTimezone"/&gt;</phrase>
        &lt;hfp:hasProperty name="ordered" value="partial"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#gYear"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="<!--*
* material suppressed here by diff group aat *
*--><phrase dg="aat">xs:anyAtomicType</phrase>"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="gYear.whiteSpace"/&gt;<phrase dg="b6043">
      &lt;xs:explicitTimezone value="optional" id="gYear.explicitTimezone"/&gt;</phrase>
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="gMonthDay" id="gMonthDay"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;<phrase dg="b5030">
        &lt;hfp:hasFacet name="assertions"/&gt;</phrase><phrase dg="b6043">
        &lt;hfp:hasFacet name="explicitTimezone"/&gt;</phrase>
        &lt;hfp:hasProperty name="ordered" value="partial"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#gMonthDay"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="<!--*
* material suppressed here by diff group aat *
*--><phrase dg="aat">xs:anyAtomicType</phrase>"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="gMonthDay.whiteSpace"/&gt;<phrase dg="b6043">
      &lt;xs:explicitTimezone value="optional" id="gMonthDay.explicitTimezone"/&gt;</phrase>
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="gDay" id="gDay"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;<phrase dg="b5030">
        &lt;hfp:hasFacet name="assertions"/&gt;</phrase><phrase dg="b6043">
        &lt;hfp:hasFacet name="explicitTimezone"/&gt;</phrase>
        &lt;hfp:hasProperty name="ordered" value="partial"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#gDay"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="<!--*
* material suppressed here by diff group aat *
*--><phrase dg="aat">xs:anyAtomicType</phrase>"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="gDay.whiteSpace"/&gt;<phrase dg="b6043">
      &lt;xs:explicitTimezone value="optional" id="gDay.explicitTimezone"/&gt;</phrase>
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="gMonth" id="gMonth"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;<phrase dg="b5030">
        &lt;hfp:hasFacet name="assertions"/&gt;</phrase><phrase dg="b6043">
        &lt;hfp:hasFacet name="explicitTimezone"/&gt;</phrase>
        &lt;hfp:hasProperty name="ordered" value="partial"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#gMonth"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="<!--*
* material suppressed here by diff group aat *
*--><phrase dg="aat">xs:anyAtomicType</phrase>"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="gMonth.whiteSpace"/&gt;<phrase dg="b6043">
      &lt;xs:explicitTimezone value="optional" id="gMonth.explicitTimezone"/&gt;</phrase>
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="hexBinary" id="hexBinary"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="length"/&gt;
        &lt;hfp:hasFacet name="minLength"/&gt;
        &lt;hfp:hasFacet name="maxLength"/&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;<phrase dg="b5030">
        &lt;hfp:hasFacet name="assertions"/&gt;</phrase>
        &lt;hfp:hasProperty name="ordered" value="false"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/<!--*
* material suppressed here by diff group b4839 *
*--><phrase dg="b4839">#hexBinary</phrase>"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="<!--*
* material suppressed here by diff group aat *
*--><phrase dg="aat">xs:anyAtomicType</phrase>"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="hexBinary.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="base64Binary" id="base64Binary"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="length"/&gt;
        &lt;hfp:hasFacet name="minLength"/&gt;
        &lt;hfp:hasFacet name="maxLength"/&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;<phrase dg="b5030">
        &lt;hfp:hasFacet name="assertions"/&gt;</phrase>
        &lt;hfp:hasProperty name="ordered" value="false"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#base64Binary"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="<!--*
* material suppressed here by diff group aat *
*--><phrase dg="aat">xs:anyAtomicType</phrase>"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="base64Binary.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="anyURI" id="anyURI"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="length"/&gt;
        &lt;hfp:hasFacet name="minLength"/&gt;
        &lt;hfp:hasFacet name="maxLength"/&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;<phrase dg="b5030">
        &lt;hfp:hasFacet name="assertions"/&gt;</phrase>
        &lt;hfp:hasProperty name="ordered" value="false"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#anyURI"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="<!--*
* material suppressed here by diff group aat *
*--><phrase dg="aat">xs:anyAtomicType</phrase>"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="anyURI.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="QName" id="QName"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="length"/&gt;
        &lt;hfp:hasFacet name="minLength"/&gt;
        &lt;hfp:hasFacet name="maxLength"/&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;<phrase dg="b5030">
        &lt;hfp:hasFacet name="assertions"/&gt;</phrase>
        &lt;hfp:hasProperty name="ordered" value="false"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#QName"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="<!--*
* material suppressed here by diff group aat *
*--><phrase dg="aat">xs:anyAtomicType</phrase>"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="QName.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="NOTATION" id="NOTATION"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="length"/&gt;
        &lt;hfp:hasFacet name="minLength"/&gt;
        &lt;hfp:hasFacet name="maxLength"/&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;<phrase dg="b5030">
        &lt;hfp:hasFacet name="assertions"/&gt;</phrase>
        &lt;hfp:hasProperty name="ordered" value="false"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#NOTATION"/&gt;
      &lt;xs:documentation&gt;
        NOTATION cannot be used directly in a schema; rather a type
        must be derived from it by specifying at least one enumeration
        facet whose value is the name of a NOTATION declared in the
        schema.
      &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="<!--*
* material suppressed here by diff group aat *
*--><phrase dg="aat">xs:anyAtomicType</phrase>"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="NOTATION.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
<phrase dg="aux-1933">&lt;/xs:schema&gt;</phrase>
</codeBlock></codeScrap></div2><div2 id="drvd.nxsd" dg="aux-1933"><head><phrase dg="sfs-1933">Illustrative XML representations for the built-in ordinary type definitions</phrase><!--*
* material suppressed here by diff group b5150 *
*--></head><p dg="sfs-1933">The following, although in the form of a
schema document, contains XML representations of components already
present in all schemas by definition.  It is included here as a form
of documentation.</p><note dg="sfs-1933"><p>These datatypes do not need to be declared in a schema document,
since they are automatically included in every schema.</p><!--* 
<p>It is an open question whether this and similar XML documents should
be accepted or rejected by software conforming to this specification.
The XML Schema Working Group expects to resolve this question in connection
with its work on issues relating to schema composition.</p>
<p>In the meantime, some existing schema processors will accept
declarations for them; other existing processors will reject such
declarations as duplicates.</p> 
*--></note><!--* In http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2006Jan/0077.html
    * HT proposed that the note just preceding should be an ednote, not a
    * note.
    * I'm tempted to leave it a note for now, because (a) ednotes can't have 
    * multiple paragraphs and I think the paragraph structure is helpful here, 
    * and (b) last time we published, we systematically removed ednotes before 
    * publication.  I suppose the proposal was to have an ednote we did
    * not remove.  Hmm.
    *--><!--* Should the following 'issue' be retagged as a note? *--><issue id="B-1933" status="open"><p>It is an open question whether this and similar XML documents should
be accepted or rejected by software conforming to this specification.
The XML Schema Working Group expects to resolve this question in connection
with its work on issues relating to schema composition.</p><p>In the meantime, some existing schema processors will accept
declarations for them; other existing processors will reject such
declarations as duplicates.</p></issue><codeScrap id="schema-for-derived" file="derived.nxsd"><head><phrase dg="sfs-1933">Illustrative schema document for derived built-in type definitions</phrase></head><codeBlock><phrase dg="aux-1933">&lt;?xml version='1.0'?&gt;
&lt;!DOCTYPE xs:schema SYSTEM "../namespace/XMLSchema.dtd"<phrase dg="dta"> [

</phrase></phrase><phrase dg="dta">&lt;!--
     keep this schema XML1.0 DTD valid
  --&gt;
        &lt;!ENTITY % schemaAttrs 'xmlns:hfp CDATA #IMPLIED'&gt;

        &lt;!ELEMENT hfp:hasFacet EMPTY&gt;
        &lt;!ATTLIST hfp:hasFacet
                name <phrase dg="rq20rb">NMTOKEN</phrase><!--*
* material suppressed here by diff group rq20rb *
*--> #REQUIRED&gt;

        &lt;!ELEMENT hfp:hasProperty EMPTY&gt;
        &lt;!ATTLIST hfp:hasProperty
                name NMTOKEN #REQUIRED
                value CDATA #REQUIRED&gt;

]</phrase>&gt;
<phrase dg="aux-1933">&lt;xs:schema<phrase dg="dta">
  xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty"</phrase>
  xmlns:xs="http://www.w3.org/2001/XMLSchema"<!--*
* material suppressed here by diff group b6120 *
*-->
  elementFormDefault="qualified" 
  xml:lang="en" 
  targetNamespace="http://www.w3.org/2001/XMLSchema"&gt;</phrase>
 &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;
      <!--*
* material suppressed here by diff group sfs-1933 *
*--><phrase dg="sfs-1933">This document contains XML representations for</phrase> the 
     <!--*
* material suppressed here by diff group rq20 *
*--><phrase dg="rq20">ordinary non-primitive built-in</phrase> <phrase dg="sfs-1933">data</phrase>types
    &lt;/xs:documentation&gt;
  &lt;/xs:annotation&gt;
  &lt;xs:simpleType name="normalizedString" id="normalizedString"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#normalizedString"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:string"&gt;
      &lt;xs:whiteSpace value="replace" id="normalizedString.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="token" id="token"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#token"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:normalizedString"&gt;
      &lt;xs:whiteSpace value="collapse" id="token.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="language" id="language"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#language"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:token"&gt;
      &lt;xs:pattern value="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*" id="language.pattern"&gt;<phrase dg="dta">
        &lt;xs:annotation&gt;<!--*
* material suppressed here by diff group b4850 *
*--><phrase dg="b4850">
          &lt;xs:documentation source="http://www.ietf.org/rfc/bcp/bcp47.txt"&gt;
            pattern specifies the content of section 2.12 of XML 1.0e2
            and RFC 3066 (Revised version of RFC 1766).  N.B. RFC 3066 is now
            obsolete; the grammar of RFC4646 is more restrictive.  So strict
            conformance to the rules for language codes requires extra checking
            beyond validation against this type.</phrase>
          &lt;/xs:documentation&gt;
        &lt;/xs:annotation&gt;</phrase>
      &lt;/xs:pattern&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="IDREFS" id="IDREFS"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="length"/&gt;
        &lt;hfp:hasFacet name="minLength"/&gt;
        &lt;hfp:hasFacet name="maxLength"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;<phrase dg="b5030">
        &lt;hfp:hasFacet name="assertions"/&gt;</phrase>
        &lt;hfp:hasProperty name="ordered" value="false"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#IDREFS"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:list itemType="xs:IDREF"/&gt;
      &lt;/xs:simpleType&gt;
      &lt;xs:minLength value="1" id="IDREFS.minLength"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="ENTITIES" id="ENTITIES"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="length"/&gt;
        &lt;hfp:hasFacet name="minLength"/&gt;
        &lt;hfp:hasFacet name="maxLength"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;<phrase dg="b5030">
        &lt;hfp:hasFacet name="assertions"/&gt;</phrase>
        &lt;hfp:hasProperty name="ordered" value="false"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#ENTITIES"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:list itemType="xs:ENTITY"/&gt;
      &lt;/xs:simpleType&gt;
      &lt;xs:minLength value="1" id="ENTITIES.minLength"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="NMTOKEN" id="NMTOKEN"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#NMTOKEN"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:token"&gt;
      &lt;xs:pattern value="\c+" id="NMTOKEN.pattern"&gt;<phrase dg="dta">
        &lt;xs:annotation&gt;
          &lt;xs:documentation source="http://www.w3.org/TR/REC-xml#NT-Nmtoken"&gt;
            pattern matches production 7 from the XML spec
          &lt;/xs:documentation&gt;
        &lt;/xs:annotation&gt;</phrase>
      &lt;/xs:pattern&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="NMTOKENS" id="NMTOKENS"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="length"/&gt;
        &lt;hfp:hasFacet name="minLength"/&gt;
        &lt;hfp:hasFacet name="maxLength"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;<phrase dg="b5030">
        &lt;hfp:hasFacet name="assertions"/&gt;</phrase>
        &lt;hfp:hasProperty name="ordered" value="false"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#NMTOKENS"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:list itemType="xs:NMTOKEN"/&gt;
      &lt;/xs:simpleType&gt;
      &lt;xs:minLength value="1" id="NMTOKENS.minLength"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="Name" id="Name"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#Name"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:token"&gt;
      &lt;xs:pattern value="\i\c*" id="Name.pattern"&gt;<phrase dg="dta">
        &lt;xs:annotation&gt;
          &lt;xs:documentation source="http://www.w3.org/TR/REC-xml#NT-Name"&gt;
            pattern matches production 5 from the XML spec
          &lt;/xs:documentation&gt;
        &lt;/xs:annotation&gt;</phrase>
      &lt;/xs:pattern&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="NCName" id="NCName"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#NCName"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:Name"&gt;
      &lt;xs:pattern value="[\i-[:]][\c-[:]]*" id="NCName.pattern"&gt;<phrase dg="dta">
        &lt;xs:annotation&gt;
          &lt;xs:documentation source="http://www.w3.org/TR/REC-xml-names/#NT-NCName"&gt;
            pattern matches production 4 from the Namespaces in XML spec
          &lt;/xs:documentation&gt;
        &lt;/xs:annotation&gt;</phrase>
      &lt;/xs:pattern&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="ID" id="ID"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#ID"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:NCName"/&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="IDREF" id="IDREF"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#IDREF"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:NCName"/&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="ENTITY" id="ENTITY"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#ENTITY"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:NCName"/&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="integer" id="integer"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#integer"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:decimal"&gt;
      <phrase dg="rq20rb">&lt;xs:fractionDigits fixed="true" value="0" id="integer.fractionDigits"/&gt;
      &lt;xs:pattern value="[\-+]?[0-9]+"<phrase dg="sfs-cleaning"> id="integer.pattern"</phrase>/&gt;</phrase>
      <!--*
* material suppressed here by diff group rq20rb-1912 *
*-->
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="nonPositiveInteger" id="nonPositiveInteger"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#nonPositiveInteger"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:integer"&gt;
      &lt;xs:maxInclusive value="0" id="nonPositiveInteger.maxInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="negativeInteger" id="negativeInteger"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#negativeInteger"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:nonPositiveInteger"&gt;
      &lt;xs:maxInclusive value="-1" id="negativeInteger.maxInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="long" id="long"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasProperty name="bounded" value="true"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="finite"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#long"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:integer"&gt;
      &lt;xs:minInclusive value="-9223372036854775808" id="long.minInclusive"/&gt;
      &lt;xs:maxInclusive value="9223372036854775807" id="long.maxInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="int" id="int"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#int"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:long"&gt;
      &lt;xs:minInclusive value="-2147483648" id="int.minInclusive"/&gt;
      &lt;xs:maxInclusive value="2147483647" id="int.maxInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="short" id="short"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#short"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:int"&gt;
      &lt;xs:minInclusive value="-32768" id="short.minInclusive"/&gt;
      &lt;xs:maxInclusive value="32767" id="short.maxInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="byte" id="byte"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#byte"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:short"&gt;
      &lt;xs:minInclusive value="-128" id="byte.minInclusive"/&gt;
      &lt;xs:maxInclusive value="127" id="byte.maxInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="nonNegativeInteger" id="nonNegativeInteger"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#nonNegativeInteger"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:integer"&gt;
      &lt;xs:minInclusive value="0" id="nonNegativeInteger.minInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="unsignedLong" id="unsignedLong"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasProperty name="bounded" value="true"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="finite"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#unsignedLong"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:nonNegativeInteger"&gt;
      &lt;xs:maxInclusive value="18446744073709551615" id="unsignedLong.maxInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="unsignedInt" id="unsignedInt"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#unsignedInt"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:unsignedLong"&gt;
      &lt;xs:maxInclusive value="4294967295" id="unsignedInt.maxInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="unsignedShort" id="unsignedShort"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#unsignedShort"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:unsignedInt"&gt;
      &lt;xs:maxInclusive value="65535" id="unsignedShort.maxInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="unsignedByte" id="unsignedByte"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#unsignedByte"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:unsignedShort"&gt;
      &lt;xs:maxInclusive value="255" id="unsignedByte.maxInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="positiveInteger" id="positiveInteger"&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#positiveInteger"/&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:nonNegativeInteger"&gt;
      &lt;xs:minInclusive value="1" id="positiveInteger.minInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
<phrase dg="rq20">
  &lt;xs:simpleType name="yearMonthDuration"<!--*
* material suppressed here by diff group rq20ids *
*-->&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#yearMonthDuration"&gt;
        This type includes just those durations expressed in years and months.
        Since the pattern given excludes days, hours, minutes, and seconds,
        the values of this type have a seconds property of zero.  They are
        totally ordered.
      &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:duration"&gt;
      &lt;xs:pattern id="yearMonthDuration.pattern" value="[^DT]*"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="dayTimeDuration"<!--*
* material suppressed here by diff group rq20ids *
*-->&gt;<phrase dg="dta">
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#dayTimeDuration"&gt;
        This type includes just those durations expressed in days, hours, minutes, and seconds.
        The pattern given excludes years and months, so the values of this type 
        have a months property of zero.  They are totally ordered.
      &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;</phrase>
    &lt;xs:restriction base="xs:duration"&gt;
      &lt;xs:pattern id="dayTimeDuration.pattern" value="[^YM]*(T.*)?"/&gt;
     &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;<phrase dg="b6043">
    &lt;xs:simpleType name="dateTimeStamp" id="dateTimeStamp"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema<phrase dg="b4839">11</phrase>-2/#dateTimeStamp"&gt;
        This datatype includes just those dateTime values Whose explicitTimezone
        is present.  They are totally ordered.
      &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:dateTime"&gt;
      &lt;xs:explicitTimezone fixed="true"
        id="dateTimeStamp.explicitTimezone" value="required"/&gt;
     &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;</phrase>
</phrase>
<phrase dg="aux-1933">&lt;/xs:schema&gt;</phrase></codeBlock></codeScrap></div2></div1><!--*
* material suppressed here by diff group fpwd-add-lc-del *
*--><!-- ********************************** END NEW 1.1 MATERIAL (JUNK) ************************************* --><div1 id="constructedValueSpaces" dg="cvs1_pwd"><head dg="cvs1"><phrase dg="b3226">Built-up</phrase><!--*
* material suppressed here by diff group b3226 *
*--> Value Spaces<!--*
* material suppressed here by diff group b5150 *
*--></head><p>Some datatypes, such as <dtref ref="integer"/>, describe well-known mathematically abstract 
systems.  Others, such as the date/time datatypes, describe <unusual>real-life</unusual>, 
<unusual>applied</unusual> systems.  Certain
of the systems described by datatypes, both abstract and
applied, have values in their value spaces most easily described as things
having several <emph>properties</emph>, which in turn have values which are
in some sense <unusual>primitive</unusual> or are from the value spaces of
simpler datatypes.<!--*
* material suppressed here by diff group b3226 *
*--></p><p dg="cvs1.add.b3226.move.src"><phrase dg="cvs1.add.b3226.move.guts" id="b3226move.p1guts">In
this document, the arguments to functions are assumed to be <unusual>call by
value</unusual> unless explicitly noted to the contrary, meaning that if the argument is modified
during the processing of the algorithm, that modification is <emph>not</emph> reflected in the
<unusual>outside world</unusual>.  On the other hand, the arguments to procedures are assumed
to be <unusual>call by location</unusual>, meaning that modifications <emph>are</emph> so reflected,
since that is the only way the processing of the algorithm can have any effect.</phrase></p><p dg="cvs1.add.b3226.move.src"><phrase id="b3226move.p2guts" dg="cvs1.add.b3226.move.guts"><phrase dg="b3226">Properties always have values.  
</phrase><termdef id="dt-optional" term="optional">An <term>optional</term>
property is <emph>permitted</emph> but not <emph>required</emph> to have 
the <!--*
* material suppressed here by diff group b3249c *
*--><phrase dg="b3249c">distinguished</phrase>
value <pt>absent</pt>.</termdef></phrase></p><p dg="b3249c.add.b3226.move.src"><phrase id="b3226move.p5guts" dg="b3249c.add.b3226.move.guts"><termdef id="key-null" term="absent">Throughout this
specification, the value <term><phrase><pt>absent</pt></phrase></term> is used 
as a distinguished value to indicate that a given instance of a property
<unusual>has no value</unusual> or <unusual>is absent</unusual>.</termdef> 
This should not be interpreted as constraining implementations, as for instance
between using a  <!-- I don't think "null" is a "preterminal". -DP -->
<phrase dg="b3226"><pt>null</pt></phrase><!--*
* material suppressed here by diff group b3226 *
*-->
value for such properties or not representing them at all.</phrase></p><p dg="cvs1.add.b3226.del"><phrase dg="b3226">Those
values that are more primitive, and are used (among other things) herein to
construct object value spaces but which we do not explicitly define are
described here:</phrase>

<ulist><item dg="cvs1.add.b3226.move.src"><p id="b3226move.p4" dg="cvs1.add.b3226.move.guts">A
<term>number (without precision)</term> is an ordinary
mathematical number; <!--*
* material suppressed here by diff group b2627 *
*--><phrase dg="b2627">1, 1.0, and
1.000000000000 are the same
number</phrase>.  The <phrase dg="b2627">decimal
</phrase>numbers <phrase dg="b2627">and integers</phrase>
generally used in <!--*
* material suppressed here by diff group b2627 *
*--><phrase dg="b2627">the algorithms of
appendix <specref ref="ap-funcDefs"/></phrase> are
<!--*
* material suppressed here by diff group b2627 *
*--><phrase dg="b2627">such
ordinary numbers, not carrying precision</phrase>.</p></item><!--*
* material suppressed here by diff group b3249 *
*--><item dg="b3249b.add.b3226.move.src"><p dg="b3249b.add.b3226.move.guts" id="b3226move.p3"><termdef id="dt-specialvalue" term="special value" dg="b3249b">A 
<term>special value</term> is 
<!--*
* material suppressed here by diff group b3249c *
*--><phrase dg="b3249c">an object</phrase>
whose only relevant properties for purposes of this specification are that it
is distinct from, and unequal to, any other values (special or otherwise).</termdef> 
A few special values in different value spaces (e.g. <pt>positiveInfinity</pt>,
<pt>negativeInfinity</pt>, and <pt>notANumber</pt> in <dtref ref="float"/> and 
<dtref ref="double"/>) share names.  Thus, special values 
can be distinguished from each other in the
general case by considering both the name and the primitive datatype of the value; in
<phrase dg="b3226">some</phrase><!--*
* material suppressed here by diff group b3226 *
*-->
cases, of course, the name alone suffices to identify the value uniquely.</p><note dg="b3249c" id="b3226move.n1"><p>In the case of <dtref ref="float"/>
and <dtref ref="double"/>, the <termref def="dt-specialvalue">special values</termref> are members of the
datatype's <termref def="dt-value-space"/>.  
<!--*
* material suppressed here by diff group b12300-diff10-silent *
*-->
</p></note></item></ulist>
</p><!--*
* material suppressed here by diff group b3226div *
*--><!--*
* material suppressed here by diff group b3226 *
*--><div2 id="sec-numericalValues" dg="num1"><head>Numerical Values</head><!--*
* material suppressed here by diff group cvs1.add.b3226.move.guts *
*--><!--*
* material suppressed here by diff group b3226 *
*--><p dg="num1">The following standard operators are defined here
in case the reader is unsure of their definition:
<ulist><item><p><termdef id="dt-div" term="div">If <var>m</var> and <var>n</var> are numbers, then
<var>m</var> <term>div</term> <var>n</var> is the greatest integer 
<!--*
* material suppressed here by diff group dudt *
*--><phrase dg="dudt">less than or equal to</phrase>
<var>m</var> / <var>n</var> .</termdef></p><!--* DaveP suggested "largest integer less than" in lieu of "greatest integer in"
    * in email to MSM 7 Jan 2005.  Since 4 div 1 should be 4, not 3, I've taken
    * the liberty of adding "or equal to".
    *--></item><item><p><termdef term="mod" id="dt-mod">If <var>m</var> and <var>n</var> are numbers, then
<var>m</var> <term>mod</term> <var>n</var> is 
<!--*
* material suppressed here by diff group rq122d_sg *
*--><phrase dg="rq122d_sg"><var>m</var> − <var>n</var> × ( <var>m</var> <termref def="dt-div"/> <var>n</var>) </phrase>.</termdef>
</p></item></ulist>
</p><note dg="num1"><p><var>n</var> <termref def="dt-div"/> 1  is 
a convenient and short way of
expressing <quote>the greatest integer 
<!--*
* material suppressed here by diff group dudt *
*--><phrase dg="dudt">less
than or equal to</phrase> <var>n</var></quote>.</p></note><!--* the following text was colore as 'added' in the first public WD;
    * it was removed by the WG in January 2005 in Brisbane *--><!--*
* material suppressed here by diff group fpwd-rescinded-add *
*--><div3 id="sec-exactmaps" dg="numap1"><head>Exact Lexical Mappings</head><defset role="prod"><head>Numerals and Fragments Thereof</head><prodgroup><prod id="nt-digit"><lhs>digit</lhs><rhs><charclass>0-9</charclass></rhs></prod><prod id="nt-unsNoDecNuml"><lhs>unsignedNoDecimalPtNumeral</lhs><rhs><nt def="nt-digit"/>+</rhs></prod><!--*
* material suppressed here by diff group rec12-main *
*--><!-- Not used, so removed, but also in error, should have been 
     <prod id="nt-sNoDecNuml">
      <lhs>signedNoDecimalPtNumeral</lhs>
      <rhs>
       (<string>+</string>&nbsp;|&nbsp;<string>-</string>)&nbsp;<nt def="nt-unsNoDecNuml"/>
      </rhs>
     </prod> --><prod id="nt-noDecNuml"><lhs>noDecimalPtNumeral</lhs><rhs>(<string>+</string> | <string>-</string>)? <nt def="nt-unsNoDecNuml"/></rhs></prod><prod id="nt-fracFrag"><lhs>fracFrag</lhs><rhs><nt def="nt-digit"/>+</rhs></prod><prod id="nt-unsDecNuml"><lhs>unsignedDecimalPtNumeral</lhs><rhs>(<nt def="nt-unsNoDecNuml"/> <string>.</string> <nt def="nt-fracFrag"/>?) | (<string>.</string> <nt def="nt-fracFrag"/>)</rhs></prod><prod id="nt-unsFullDecNuml"><lhs>unsignedFullDecimalPtNumeral</lhs><rhs><nt def="nt-unsNoDecNuml"/> <string>.</string> <nt def="nt-fracFrag"/></rhs></prod><prod id="nt-decNuml"><lhs>decimalPtNumeral</lhs><rhs>(<string>+</string> | <string>-</string>)? <nt def="nt-unsDecNuml"/></rhs></prod><prod id="nt-unsSciNuml"><lhs>unsignedScientificNotationNumeral</lhs><rhs>(<nt def="nt-unsNoDecNuml"/> | <nt def="nt-unsDecNuml"/>) (<string>e</string> | <string>E</string>) <nt def="nt-noDecNuml"/></rhs></prod><prod id="nt-sciNuml"><lhs>scientificNotationNumeral</lhs><rhs>(<string>+</string> | <string>-</string>)? <nt def="nt-unsSciNuml"/></rhs></prod></prodgroup></defset><p>
<defsetsum ref="defs-genNNLexMaps"/>

<defsetsum ref="defs-genNNCanMaps"/>

Some numerical datatypes include some or all of three 
<!--*
* material suppressed here by diff group b3249b *
*--><phrase dg="b3249b">non-numerical <termref def="dt-specialvalue">special values</termref></phrase>:
<pt>positiveInfinity</pt>, <pt>negativeInfinity</pt>, and <pt>notANumber</pt>.  Their lexical spaces
include non-numeral lexical representations for these non-numeric values:

<defset><head>Special Non-numerical Lexical Representations Used With Numerical Datatypes</head><!--*
* material suppressed here by diff group flfix *
*--><prod id="nt-minNumSpecReps" dg="flfix"><lhs>minimalNumericalSpecialRep</lhs><rhs><string>INF</string> | <string>-INF</string> | <string>NaN</string></rhs></prod><prod id="nt-numSpecReps" dg="flfix"><lhs>numericalSpecialRep</lhs><rhs><string>+INF</string> | <nt def="nt-minNumSpecReps"/></rhs></prod></defset>

<defsetsum ref="defs-NumericSpecialLexmap"/>

<defsetsum ref="defs-NumericSpecialCanmap"/>
</p></div3></div2><div2 id="d-t-values"><head dg="dt1">Date/time Values</head><!--* <issue id="RQ-122i" role="1.1" diff="del" dg="dt3">
<p><loc href="&reqs;#dateTime-values" target="reqs">RQ-122 (define
dateTime value space)</loc></p>
<p>Much of the material defining the various date/time datatypes is
found here and is or will be referenced in the sections defining each
individual date/time datatype.  See e.g. <specref ref="gDay"/>.</p>
</issue> *--><p dg="dt1">There are several different primitive but
related datatypes defined in the specification which pertain to
various combinations of dates and times, and parts thereof.  They
all use related value-space models, which are described in detail in
this section.  It is not difficult for a casual reader of the
descriptions of the individual datatypes elsewhere in this
specification to misunderstand some of the details of just what the
datatypes are intended to represent, so more detail is presented here
in this section.</p><p dg="dt2">All of the value spaces for dates and times
described here represent moments or periods of time in Universal
Coordinated Time (UTC). 
<termdef term="UTC" id="dt-utc"><term>Universal
Coordinated Time</term> (<term>UTC</term>)
is an adaptation of TAI which closely approximates UT1 by adding
<termref def="dt-leapsec">leap-seconds</termref> to selected
<!--*
* material suppressed here by diff group dt2 *
*--><termref dg="dt2" def="dt-utc"/> days.</termdef></p><p dg="dt2"><termdef id="dt-leapsec" term="leap-second">A
<term>leap-second</term> is an additional second added
to the last day of December, June, October, or March,
when such an adjustment is deemed necessary by the 
International Earth Rotation and Reference Systems Service
in order to keep <!--*
* material suppressed here by diff group dt2 *
*--><termref dg="dt2" def="dt-utc"/> within 0.9 seconds
of observed astronomical time.  When leap seconds are
introduced, the last minute in the day has more than
sixty seconds. 
In theory leap seconds can also be removed from a
day, but this has not yet occurred.
<phrase dg="ep6553">(See
<bibref ref="IERS"/>,
<bibref ref="itu-r-460-6"/>.)</phrase>
<phrase dg="noleap">Leap seconds are
<emph>not</emph> supported by the types defined 
here.</phrase></termdef></p><p dg="noleap"><phrase dg="idleap">Because 
the <dtref ref="dateTime"/> type and
other date- and time-related types defined in this specification do
not support leap seconds, there are portions of the <!--*
* material suppressed here by diff group dt2 *
*--><termref dg="dt2" def="dt-utc"/> timeline which cannot be represented by values of these
types.  Users whose applications require that leap seconds be
represented and that date/time arithmetic take historically
occurring leap seconds into account will wish to make
appropriate adjustments at the application level, or to use 
other types.</phrase><!--*
* material suppressed here by diff group idleap *
*--></p><!--*
    * There are a number of references to dayYM elsewhere in
    * the spec, but they are all deleted by either dt3 or dt4.
    * So for now I'm leaving this out.  It's not clear how to
    * make the diffed versions be free of broken links ...

    * To make the best of a bad job, I propose to include this,
    * marked as a deletion, only in the diff against 1.0 and
    * the diff against the July 2004 WD.

<div3 id="dayYM-bis" diff="add" dg="dt4"><head>Table of Gregorian Months</head>
<p>Some of the date-related functions given below appeal to 
knowledge of the number of the days in each month in the Gregorian
calendar.  Each year has 12 months, numbered 1 through
12, and each month has between 28 and 31
days, also numbered from 1, depending on the month and year according
to the following table:</p>
<table border="1"><thead><tr><th>Month</th><th>Nbr of Days</th></tr></thead>
<tbody><tr><th>1 (January)</th><th>31</th></tr>
<tr><th>2 (February)</th><th>If the associated year is divisible by 400, or by 4 but not 100,
then 29; otherwise 28</th></tr>
<tr><th>3 (March)</th><th>31</th></tr>
<tr><th>4 (April)</th><th>30</th></tr>
<tr><th>5 (May)</th><th>31</th></tr>
<tr><th>6 (June)</th><th>30</th></tr>
<tr><th>7 (July)</th><th>31</th></tr>
<tr><th>8 (August)</th><th>31</th></tr>
<tr><th>9 (September)</th><th>30</th></tr>
<tr><th>10 (October)</th><th>31</th></tr>
<tr><th>11 (November)</th><th>30</th></tr>
<tr><th>12 (December)</th><th>31</th></tr></tbody></table>
</div3> *--><!--*
* material suppressed here by diff group dtr *
*--><div3 id="theSevenPropertyModel" dg="dt1"><head>The Seven-property Model</head><p>There are two distinct ways to model moments in time:  either
by tracking their year, month, day, hour, minute and second (with
fractional seconds as needed), or by tracking
their time (measured generally in seconds or
days) from some starting moment.  Each has
its advantages.  The two are isomorphic<!--*
* material suppressed here by diff group noleap *
*-->.  For
definiteness, we choose to model the first
using five <phrase>integer</phrase> and one <phrase>decimal number</phrase> properties.  We superimpose
the second by providing one <phrase>decimal number</phrase>-valued
function which gives the corresponding count of
seconds from zero (the <unusual>time on the time line</unusual>).</p><!--*
* material suppressed here by diff group appr070331 *
*--><p>There is also a seventh <dtref ref="integer"/> property which
specifies the <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offset</phrase><!--*
* material suppressed here by diff group b3859 *
*--><phrase dg="b3859">
as the number of minutes <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">of</phrase> offset from UTC</phrase>.  Values for the
six primary properties are always stored in
<!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3">their
<unusual>local</unusual> values (the values shown in the lexical
representations), rather than converted to 
<!--*
* material suppressed here by diff group dt2 *
*--><termref dg="dt2" def="dt-utc"/></phrase>.

<defset role="prop"><head>Properties of
<dt id="dt-dt-7PropMod" name="date/timeSevenPropertyModel">Date/time
Seven-property Models</dt></head><vpropdef><name id="vp-dt-year">year</name><limits>an <phrase>integer</phrase></limits></vpropdef><vpropdef><name id="vp-dt-month">month</name><limits>an <phrase>integer</phrase> between 1 and 12 inclusive</limits></vpropdef><vpropdef><name id="vp-dt-day">day</name><limits>an <phrase>integer</phrase> between 1 and
<!--*
* material suppressed here by diff group dt2 *
*-->31 inclusive, 
<phrase dg="dt2">possibly
restricted further </phrase>depending on
<pfref ref="vp-dt-month"/> and <pfref ref="vp-dt-year"/></limits></vpropdef><vpropdef><name id="vp-dt-hour">hour</name><limits>an <phrase>integer</phrase> between 0 and 23 inclusive<!--*
* material suppressed here by diff group wdd *
*--></limits></vpropdef><vpropdef><name id="vp-dt-minute">minute</name><limits>an <phrase>integer</phrase> between 0 and 59 inclusive</limits></vpropdef><vpropdef><name id="vp-dt-second">second</name><limits>a <phrase>decimal number</phrase> greater than or equal
<!--*
* material suppressed here by diff group dt2 *
*--><phrase dg="dt2">to
0 and less 
than <!--*
* material suppressed here by diff group noleap *
*--></phrase><!--*
* material suppressed here by diff group noleap *
*--><phrase dg="noleap">60</phrase><!--*
* material suppressed here by diff group idleap *
*-->.</limits></vpropdef><vpropdef><name id="vp-dt-timezone">timezone<phrase dg="b4642">Offset</phrase></name><limits>an <termref def="dt-optional"/> <phrase>integer</phrase> between −840
and 840 inclusive</limits></vpropdef></defset>
</p><!--*
<ednote diff="add" dg="rq123">
<edtext>The following paragraph and note have not been agreed on by all
editors; the WG is requested to choose whether to include them or not.</edtext>
</ednote> 
(Suppressed 2006-01-27 by MSM on theory that the WG must
have decided when we acted on rq123.  But I haven't checked the
minutes *--><p dg="rq123">Non-negative values of the properties map 
to the years, months, days of month, etc. of the Gregorian
calendar in the obvious way.  
Values less than 1582 in the
<vpropref ref="vp-dt-year"/> property represent years in the
<unusual>proleptic Gregorian calendar</unusual>.
A value of zero in the <vpropref ref="vp-dt-year"/> property 
represents the year 1 BCE;
a value of −1 represents the year 2 BCE, −2 is 3 BCE,
etc.</p><note dg="rq123"><p>In version 1.0 of this specification, the 
<pfref ref="vp-dt-year"/> property was not permitted to have the value
zero. The year <phrase dg="b3256">before the year 1 in the
proleptic Gregorian calendar, traditionally referred to as 
1 BC or as</phrase>
1 BCE<phrase dg="b3256">,</phrase> was represented by a 
<pfref ref="vp-dt-year"/> value of −1, 2 BCE by −2, and so
forth.
<phrase dg="b3256">Of course, many, perhaps most,
references to 1 BCE (or 1 BC) actually refer not 
to a year in the proleptic Gregorian calendar but to a year in the
Julian or <quote>old style</quote> calendar; the two correspond
approximately but not exactly to each other.</phrase>
</p><p>In this version of this specification,
two changes are made in order to agree with existing usage. 
First, <pfref ref="vp-dt-year"/> is permitted to have the value zero.
Second, the interpretation of
<pfref ref="vp-dt-year"/> values is changed accordingly: 
a <pfref ref="vp-dt-year"/> value of zero represents 1 BCE, −1
represents 2 BCE, etc. This representation simplifies interval
arithmetic and leap-year calculation for dates before the common 
era<phrase dg="b3256"> (which may be why astronomers
and others interested in such calculations with the proleptic
Gregorian calendar have adopted it), and is consistent with the
current edition of <bibref ref="ISO8601"/></phrase>.
</p><p>
Note that 1 BCE, 5 BCE, and so on (years 0000, −0004, etc. in the
lexical representation defined here) are leap years in the proleptic
Gregorian calendar used for the date/time datatypes defined here.
Version 1.0 of this specification was unclear about the treatment of
leap years before the common era<phrase dg="b3256">.</phrase><!--*
* material suppressed here by diff group b3256 *
*-->
<phrase dg="b3256">If</phrase> existing
schemas or data specify dates of 29 February for any years before the
common era<phrase dg="b3256">, then some values giving
a date of 29 February which were valid under a plausible
interpretation of XSD 1.0 will be invalid under this specification,
and some which were invalid will be valid</phrase>.  With that possible 
exception, schemas and data valid
under the old interpretation remain valid under the new.
</p></note><p>The model just described is called herein the
<quote>seven-property</quote> model for date/time 
datatypes.  It is used <unusual>as is</unusual>
for <dtref ref="dateTime"/>; all other date/time 
datatypes except <dtref ref="duration"/> use the
same model except that some of the six primary 
properties are <emph>required</emph> to have the
value <pt>absent</pt>, instead of being required 
to have a numerical value.  (An
<emph><termref def="dt-optional"/></emph> 
property, like <pfref ref="vp-dt-timezone"/>,
is always <emph>permitted</emph> 
to have the value <pt>absent</pt>.)</p><p><pfref ref="vp-dt-timezone"/> values are limited to 14 hours,
which is 840 (= 60 × 14) minutes.</p><note dg="idleap"><p>Leap-seconds are not permitted<!--*
* material suppressed here by diff group noleap *
*--></p></note><!--*
* material suppressed here by diff group idleap *
*--><!--*
* material suppressed here by diff group dp090225 *
*--><p dg="dt2"><!--*
* material suppressed here by diff group b6554 *
*--><phrase dg="b6554">Readers
interested in when leap-seconds have been introduced should
consult <bibref ref="USNavy_leaps"/>, which includes a list
of times when the difference between TAI and
<!--*
* material suppressed here by diff group dt2 *
*--><termref dg="dt2" def="dt-utc"/> has changed. </phrase>
<!--*
* material suppressed here by diff group b6554 *
*-->
<phrase dg="noleap"><phrase dg="idleap">Because 
the simple types defined here do not support leap seconds, they cannot be used 
to represent the final second, in <!--*
* material suppressed here by diff group dt2 *
*--><termref dg="dt2" def="dt-utc"/>, 
of any of the days <!--*
* material suppressed here by diff group b6554 *
*--><phrase dg="b6554">containing
one</phrase>.  If it is important, at the application level,
to track the occurrence of leap seconds, then users will need to make
special arrangements for special handling of <!--*
* material suppressed here by diff group b6554 *
*--><phrase dg="b6554">them</phrase> and
of time intervals crossing them.</phrase><!--*
* material suppressed here by diff group idleap *
*--></phrase>
</p><!--*
* material suppressed here by diff group dt2 *
*--><p dg="dt2">While calculating, property values from the
<dtref ref="dateTime"/> 1972-12-31T00:00:00 are used to fill in
for those that are <pt>absent</pt>, except
that if <pfref ref="vp-dt-day"/> is <pt>absent</pt>
but <pfref ref="vp-dt-month"/> is not, the largest permitted
day for that month is used.<!--*
* material suppressed here by diff group b4764 *
*--></p><p>
<defsetsum ref="defs-dt-ToTl"/>
Values from any one date/time datatype using the seven-component
model (all except <dtref ref="duration"/>)
are ordered the same as their <pfref ref="vp-dt-timeOnTimeline"/> values,
except that if one value's <pfref ref="vp-dt-timezone"/>
is <pt>absent</pt> and the other's is not, and using maximum and minimum
<pfref ref="vp-dt-timezone"/>
values for the one whose <pfref ref="vp-dt-timezone"/>
is actually <pt>absent</pt>
changes the resulting (strict)
inequality, the original two values are incomparable.</p></div3><div3 dg="dt1" id="rf-lexicalMappings-datetime"><head>Lexical Mappings</head><p><termdef id="dt-dt-frag" term="date/time fragment" role="local">Each
lexical representation is made up 
of certain <term>date/time fragments</term>, each of which 
corresponds to a particular property of the datatype
value.</termdef>  They are defined by 
the following productions.

<defset><head>Date/time Lexical Representation Fragments</head><prod id="nt-yrFrag"><lhs>yearFrag</lhs><rhs><string>-</string>?
((<charclass>1-9</charclass> <nt def="nt-digit"/> <nt def="nt-digit"/> <nt def="nt-digit"/>+)) |
(<string>0</string> <nt def="nt-digit"/> <nt def="nt-digit"/> <nt def="nt-digit"/>))</rhs></prod><prod id="nt-moFrag"><lhs>monthFrag</lhs><rhs>(<string>0</string> <charclass>1-9</charclass>) |
(<string>1</string> <!--*
* material suppressed here by diff group dt4 *
*--><phrase dg="dt4"><charclass>0-2</charclass></phrase>)</rhs></prod><prod id="nt-daFrag"><lhs>dayFrag</lhs><rhs>(<!--*
* material suppressed here by diff group dt4 *
*--><phrase dg="dt4"><!--*
* material suppressed here by diff group b3029 *
*--><phrase dg="b3029"><string>0</string></phrase> <charclass>1-9</charclass>) | (<charclass>12</charclass></phrase> <nt def="nt-digit"/>) |
(<string>3</string> <charclass>01</charclass>)</rhs></prod><prod id="nt-hrFrag"><lhs>hourFrag</lhs><rhs>(<charclass>01</charclass> <nt def="nt-digit"/>) |
(<string>2</string> <!--*
* material suppressed here by diff group rq122a_sg *
*--><phrase dg="rq122a_sg"><charclass>0-3</charclass></phrase>)</rhs></prod><prod id="nt-miFrag"><lhs>minuteFrag</lhs><rhs><charclass>0-5</charclass> <nt def="nt-digit"/></rhs></prod><prod id="nt-seFrag"><lhs>secondFrag</lhs><rhs><!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3">(<charclass>0-5</charclass></phrase> <nt def="nt-digit"/><phrase dg="dt3">)<!--*
* material suppressed here by diff group noleap *
*--></phrase> (<string>.</string> <nt def="nt-digit"/>+)?</rhs></prod><prod id="nt-eodFrag"><lhs>endOfDayFrag</lhs><rhs><string>24:00:00</string> (<string>.</string> <string>0</string>+)?</rhs></prod><prod id="nt-tzFrag"><lhs>timezoneFrag</lhs><rhs><string>Z</string> 
| <!--*
* material suppressed here by diff group b3659 *
*-->(<string>+</string> | <string>-</string>) <phrase dg="b3659">(</phrase>(<string>0</string> <nt def="nt-digit"/> | <string>1</string> <!--*
* material suppressed here by diff group b3659 *
*--><phrase dg="b3659"><charclass>0-3</charclass></phrase>) <string>:</string> <nt def="nt-miFrag"/><!--*
* material suppressed here by diff group b3659 *
*--><phrase dg="b3659"> | <string>14:00</string>)</phrase></rhs></prod></defset>
</p><p>Each fragment other than <nt def="nt-tzFrag"/> defines a subset of
the <termref def="dt-lexical-space"/> of <!--*
* material suppressed here by diff group b3030 *
*--><phrase dg="b3030"><dtref ref="decimal"/></phrase>; 
the corresponding
<termref def="dt-lexical-mapping"/> is the <!--*
* material suppressed here by diff group b3030 *
*--><phrase dg="b3030"><dtref ref="decimal"/></phrase>
<termref role="the" def="dt-lexical-mapping">lexical mapping</termref> restricted to that
subset.  These fragment <termref def="dt-lexical-mapping">lexical mappings</termref> are combined
separately for each date/time datatype (other than <dtref ref="duration"/>) to make up <termref role="the" def="dt-lexical-mapping">the complete lexical mapping</termref> for
that datatype.  The <pfref ref="f-dt-yrMap"/> mapping is used to
obtain the value of the <pfref ref="vp-dt-year"/> property, the <pfref ref="f-dt-moMap"/> mapping is used to obtain the value of the <pfref ref="vp-dt-month"/> property, etc.  Each datatype which specifies
some properties to be mandatorily <pt>absent</pt> also does not permit
the corresponding lexical fragments in its lexical representations.

<defsetsum ref="defs-func-on-dt-frags"/>
</p><!--*
* material suppressed here by diff group edn10658 *
*--><note dg="b10658"><p>
<!--*
* material suppressed here by diff group b10658 *
*-->The redundancy between
<string>Z</string>, <string>+00:00</string>, and
<string>-00:00</string>, and the possibility of trailing fractional
<string>0</string> digits for <nt def="nt-seFrag"/>, are the only
redundancies preventing these mappings from being one-to-one.<!--*
* material suppressed here by diff group b10658 *
*--> <phrase dg="b10658">There
is no <termref def="dt-lexical-mapping"/> for <nt def="nt-eodFrag"/>; it is handled
specially by the relevant <termref def="dt-lexical-mapping">lexical mappings</termref>.  See, e.g., <pfref ref="vp-dateTimeLexRep"/>.</phrase>
</p></note><p>The following fragment <termref def="dt-canonical-mapping">canonical 
mappings</termref> for each value-object
property are combined as appropriate to make the
<termref def="dt-canonical-mapping"/>
for each date/time datatype (other
than <dtref ref="duration"/>):

<defsetsum ref="defs-func-to-dt-frags"/>
</p></div3></div2></div1><div1 id="ap-funcDefs" dg="funbase"><head>Function
Definitions<!--*
* material suppressed here by diff group b5150 *
*--></head><!--*
* material suppressed here by diff group cvs1.add.b3226.move.tgt *
*--><p dg="funbase">The more important functions and
procedures defined here are summarized in the
text  When there is a text summary, the name of the function in each is a
<unusual>hot-link</unusual> to the same name in the other.  All other links
to these functions link to the complete definition in this section.</p><div2 id="sec-generic-number-functions" dg="nu1"><head>Generic Number-related Functions</head><p>The following functions are used with various numeric and date/time datatypes.
</p><defset role="aux"><head>Auxiliary Functions for Operating on Numeral Fragments</head><funcdef><name id="f-digitVal">digitValue</name><phrase>integer</phrase><limits>a nonnegative <phrase>integer</phrase> less than ten</limits><args><arg><var>d</var><limits>matches <nt def="nt-digit"/></limits></arg></args><summary>Maps each digit to its numerical value.</summary><algorithm>Return
<ulist><item><p>0   when  <var>d</var> = <string>0</string> ,</p></item><item><p>1   when  <var>d</var> = <string>1</string> ,</p></item><item><p>2   when  <var>d</var> = <string>2</string> ,</p></item><item><p><emph>etc.</emph></p></item></ulist>
</algorithm></funcdef><funcdef><name id="f-digitSeqVal">digitSequenceValue</name><phrase>integer</phrase><limits>a nonnegative <phrase>integer</phrase></limits><args><arg><var>S</var><limits>a finite sequence of
<!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase></phrase>, each term matching <nt def="nt-digit"/>.</limits></arg></args><summary>Maps a sequence of digits to the position-weighted sum of the terms numerical values.</summary><algorithm>Return the sum of 
<pfref ref="f-digitVal"/>(<var>S</var><sub><var>i</var></sub>) × 10<sup>length(<var>S</var>)−<var>i</var></sup> 
where <var>i</var> runs over the domain of <var>S</var>.
</algorithm></funcdef><funcdef><name id="f-fracDigitSeqVal">fractionDigitSequenceValue</name><phrase>integer</phrase><limits>a nonnegative <phrase>integer</phrase></limits><args><arg><var>S</var><limits>a finite sequence of
<!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase></phrase>, each term matching <nt def="nt-digit"/>.</limits></arg></args><summary>Maps a sequence of digits to the position-weighted sum of the terms numerical values, weighted appropriately for fractional digits.</summary><algorithm>Return the sum of 
<pfref ref="f-digitVal"/>(<var>S</var><sub><var>i</var></sub>) − 10<sup>−<var>i</var></sup> 
where <var>i</var> runs over the domain of <var>S</var>.
</algorithm></funcdef><funcdef><name id="f-fracFragVal">fractionFragValue</name><phrase>decimal number</phrase><limits>a nonnegative <phrase>decimal number</phrase></limits><args><arg><var>N</var><limits>matches <nt def="nt-fracFrag"/></limits></arg></args><summary>Maps a <nt def="nt-fracFrag"/> to the appropriate fractional <phrase>decimal number</phrase>.</summary><argsetup><var>N</var> is necessarily the left-to-right concatenation of a finite sequence <var>S</var> of
<!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase></phrase>, each term matching <nt def="nt-digit"/>.</argsetup><algorithm>Return <pfref ref="f-fracDigitSeqVal"/>(<var>S</var>).</algorithm></funcdef></defset><!--*
* material suppressed here by diff group edn9005 *
*--><defset id="defs-genNNLexMaps"><head>Generic Numeral-to-Number Lexical Mappings</head><funcdef><name id="f-unsNoDecVal">unsignedNoDecimalMap</name><phrase>integer</phrase><limits>a nonnegative <phrase>integer</phrase></limits><args><arg><var>N</var><limits>matches <nt def="nt-unsNoDecNuml"/></limits></arg></args><summary>Maps an <nt def="nt-unsNoDecNuml"/> to its numerical value.</summary><argsetup><var>N</var> is the left-to-right concatenation of a finite sequence <var>S</var> of
<!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase></phrase>, each term matching <nt def="nt-digit"/>.</argsetup><algorithm>Return <pfref ref="f-digitSeqVal"/>(<var>S</var>).</algorithm></funcdef><funcdef><name id="f-noDecVal">noDecimalMap</name><phrase>integer</phrase><limits>a<!--*
* material suppressed here by diff group dudt *
*--><phrase dg="dudt">n</phrase> <phrase>integer</phrase></limits><args><arg><var>N</var><limits>matches <nt def="nt-noDecNuml"/></limits></arg></args><summary>Maps an <nt def="nt-noDecNuml"/> to its numerical value.</summary><argsetup><var>N</var> necessarily consists of an optional sign(<string>+</string> or <string>-</string>) and then
a <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase></phrase> <var>U</var> that matches <nt def="nt-unsNoDecNuml"/>.</argsetup><algorithm>Return
<ulist><item><p>−<phrase dg="dudt">1 × </phrase><pfref ref="f-unsNoDecVal"/>(<var>U</var>)   when <string>-</string> is present, and</p></item><item><p><pfref ref="f-unsNoDecVal"/>(<var>U</var>)   otherwise.</p></item></ulist></algorithm></funcdef><funcdef><name id="f-unsDecVal">unsignedDecimalPtMap</name><phrase>decimal number</phrase><limits>a nonnegative <phrase>decimal number</phrase></limits><args><arg><var>D</var><limits>matches <nt def="nt-unsDecNuml"/></limits></arg></args><summary>Maps an <nt def="nt-unsDecNuml"/> to its numerical value.</summary><argsetup><var>D</var> necessarily consists of an optional <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase></phrase> <var>N</var> matching <nt def="nt-unsNoDecNuml"/>, 
a decimal point, and then an optional <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase></phrase> <var>F</var> matching <nt def="nt-fracFrag"/>.</argsetup><algorithm>Return
<ulist><item><p><pfref ref="f-unsNoDecVal"/>(<var>N</var>)   when <var>F</var> is not present,</p></item><item><p><pfref ref="f-fracFragVal"/>(<var>F</var>)   when <var>N</var> is not present, and</p></item><item><p><pfref ref="f-unsNoDecVal"/>(<var>N</var>) + <pfref ref="f-fracFragVal"/>(<var>F</var>)  
otherwise.</p></item></ulist></algorithm></funcdef><funcdef><name id="f-decVal">decimalPtMap</name><phrase>decimal number</phrase><limits>a <phrase>decimal number</phrase></limits><args><arg><var>N</var><limits>matches <nt def="nt-decNuml"/></limits></arg></args><summary>Maps a <nt def="nt-decNuml"/> to its numerical value.</summary><argsetup><var>N</var> necessarily consists of an optional sign(<string>+</string> or <string>-</string>) and then
an instance <var>U</var> of <nt def="nt-unsDecNuml"/>.</argsetup><algorithm>
Return
<ulist><item><p>−<pfref ref="f-unsDecVal"/>(<var>U</var>)   when <string>-</string> is present, and</p></item><item><p><pfref ref="f-unsDecVal"/>(<var>U</var>)   otherwise.</p></item></ulist></algorithm></funcdef><funcdef><name id="f-sciVal">scientificMap</name><phrase>decimal number</phrase><limits><phrase dg="wdd">a <phrase>decimal number</phrase></phrase></limits><args><arg><var>N</var><limits>matches <nt def="nt-sciNuml"/></limits></arg></args><summary>Maps a <nt def="nt-sciNuml"/> to its numerical value.</summary><argsetup><var>N</var> necessarily consists of an instance <var>C</var> of either <nt def="nt-noDecNuml"/> or
<nt def="nt-decNuml"/>, either an <string>e</string> or an <string>E</string>, and then an instance
<var>E</var> of <nt def="nt-noDecNuml"/>.</argsetup><algorithm>Return
<ulist><item><p>
<pfref ref="f-decVal"/>(<var>C</var>) <!--*
* material suppressed here by diff group b9005 *
*--><phrase dg="b9005">×</phrase> 10 ^ <pfref ref="f-unsDecVal"/>(<var>E</var>)  
when a <string>.</string> is present in <var>N</var>, and</p></item><item><p>
<pfref ref="f-noDecVal"/>(<var>C</var>) <!--*
* material suppressed here by diff group b9005 *
*--><phrase dg="b9005">×</phrase> 10 ^ <pfref ref="f-unsDecVal"/>(<var>E</var>)  
otherwise.</p></item></ulist></algorithm></funcdef></defset><defset role="aux"><head>Auxiliary Functions for Producing Numeral Fragments</head><funcdef><name id="f-digit">digit</name><nt def="nt-digit"/><limits>matches <nt def="nt-digit"/></limits><args><arg><var>i</var><limits>between 0 and 9 inclusive</limits></arg></args><summary>Maps each <phrase>integer</phrase> between 0 and 9 to the corresponding <nt def="nt-digit"/>.</summary><algorithm>Return<ulist><item><p><string>0</string>   when  <var>i</var> = 0 ,</p></item><item><p><string>1</string>   when  <var>i</var> = 1 ,</p></item><item><p><string>2</string>   when  <var>i</var> = 2 ,</p></item><item><p>etc.</p></item></ulist></algorithm></funcdef><funcdef><name id="f-digitRemSeq">digitRemainderSeq</name><phrase>sequence of <phrase>integer</phrase>s</phrase><limits>sequence of nonnegative <phrase>integer</phrase>s</limits><args><arg><var>i</var><limits>a nonnegative <phrase>integer</phrase></limits></arg></args><summary>Maps each nonnegative <phrase>integer</phrase> to a sequence of <phrase>integer</phrase>s used by <pfref ref="f-digitSeq"/> to ultimately create an <nt def="nt-unsNoDecNuml"/>.</summary><algorithm>Return that sequence <var>s</var> for which
<ulist><item><p><var>s</var><sub>0</sub> = <var>i</var>  and</p></item><item><p><var>s</var><sub><var>j</var>+1</sub> = <var>s</var><sub><var>j</var></sub> <termref def="dt-div"/> 10 .</p></item></ulist>
</algorithm></funcdef><funcdef><name id="f-digitSeq">digitSeq</name><phrase>sequence of <phrase>integer</phrase>s</phrase><limits>sequence of <phrase>integer</phrase>s where each term is between 0 and 9 inclusive</limits><args><arg><var>i</var><limits>a nonnegative <phrase>integer</phrase></limits></arg></args><summary>Maps each nonnegative <phrase>integer</phrase> to a sequence of <phrase>integer</phrase>s used by <pfref ref="f-unsNoDecCanFragMap"/> to create an <nt def="nt-unsNoDecNuml"/>.</summary><algorithm>Return that sequence <var>s</var> for which 
<var>s</var><sub><var>j</var></sub> =<pfref ref="f-digitRemSeq"/>(<var>i</var>)<sub><var>j</var></sub> <termref def="dt-mod"/> 10 .
</algorithm></funcdef><funcdef><name id="f-lastSigDigit">lastSignificantDigit</name><phrase>integer</phrase><limits>a nonnegative <phrase>integer</phrase></limits><args><arg><var>s</var><limits>a sequence of nonnegative <phrase>integer</phrase>s</limits></arg></args><summary>Maps a sequence of nonnegative <phrase>integer</phrase>s to the index of the first zero term.</summary><algorithm>Return the smallest nonnegative <phrase>integer</phrase> <var>j</var> such that
<var>s</var>(<var>i</var>)<sub><var>j</var>+1</sub> is 0.
</algorithm></funcdef><funcdef><name id="f-fracDigitRemSeq">FractionDigitRemainderSeq</name><phrase>sequence of <phrase>decimal number</phrase>s</phrase><limits>a sequence of nonnegative <phrase>decimal number</phrase>s</limits><args><arg><var>f</var><limits>nonnegative and less than 1</limits></arg></args><summary>Maps each nonnegative <phrase>decimal number</phrase> less than 1 to a sequence of <phrase>decimal number</phrase>s used by <pfref ref="f-fracDigitSeq"/> to ultimately create an <nt def="nt-unsNoDecNuml"/>.</summary><algorithm>Return that sequence <var>s</var> for which
<ulist><item><p><var>s</var><sub>0</sub> = <var>f</var> − 10 , and</p></item><item><p><var>s</var><sub><var>j</var>+1</sub> = (<var>s</var><sub><var>j</var></sub> <termref def="dt-mod"/> 1) − 10 .</p></item></ulist>
</algorithm></funcdef><funcdef><name id="f-fracDigitSeq">fractionDigitSeq</name><phrase>sequence of <phrase>integer</phrase>s</phrase><limits>a sequence of integer;s where each term is between 0 and 9 inclusive</limits><args><arg><var>f</var><limits>nonnegative and less than 1</limits></arg></args><summary>Maps each nonnegative <phrase>decimal number</phrase> less than 1 to a sequence of <phrase>integer</phrase>s used by <pfref ref="f-fracDigitsMap"/> to ultimately create an <nt def="nt-unsNoDecNuml"/>.</summary><argsetup/><algorithm>Return that sequence <var>s</var> for which 
<var>s</var><sub><var>j</var></sub> = <pfref ref="f-fracDigitRemSeq"/>(<var>f</var>)<sub><var>j</var></sub> <termref def="dt-div"/> 1 .
</algorithm></funcdef><funcdef><name id="f-fracDigitsMap">fractionDigitsCanonicalFragmentMap</name><nt def="nt-fracFrag"/><limits>matches <nt def="nt-fracFrag"/></limits><args><arg><var>f</var><limits>nonnegative and less than 1</limits></arg></args><summary>Maps each nonnegative <phrase>decimal number</phrase> less than 1 to a <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase></phrase> used by <pfref ref="f-unsDecCanFragMap"/> to create an <nt def="nt-unsDecNuml"/>.</summary><algorithm>Return 
<pfref ref="f-digit"/>(<pfref ref="f-fracDigitSeq"/>(<var>f</var>)<sub>0</sub>) &amp; . . . &amp;
<pfref ref="f-digit"/>(<pfref ref="f-fracDigitSeq"/>(<var>f</var>)<sub><pfref ref="f-lastSigDigit"/>(<pfref ref="f-fracDigitRemSeq"/>(<var>f</var>))</sub>) .</algorithm></funcdef></defset><defset id="defs-genNNCanMaps"><head>Generic Number to Numeral Canonical Mappings</head><funcdef><name id="f-unsNoDecCanFragMap">unsignedNoDecimalPtCanonicalMap</name><nt def="nt-unsNoDecNuml"/><limits>matches <nt def="nt-unsNoDecNuml"/></limits><args><arg><var>i</var><limits>a nonnegative <phrase>integer</phrase></limits></arg></args><summary>Maps a nonnegative <phrase>integer</phrase> to a <nt def="nt-unsNoDecNuml"/>, its <termref def="dt-canonical-representation"/>.</summary><algorithm>Return
<pfref ref="f-digit"/>(<pfref ref="f-digitSeq"/>(<var>i</var>)<sub><pfref ref="f-lastSigDigit"/>(<pfref ref="f-digitRemSeq"/>(<var>i</var>))</sub>) &amp;
. . . &amp;
<pfref ref="f-digit"/>(<pfref ref="f-digitSeq"/>(<var>i</var>)<sub>0</sub>) .   (Note
that the concatenation is in reverse order.)</algorithm></funcdef><funcdef><name id="f-noDecCanMap">noDecimalPtCanonicalMap</name><nt def="nt-noDecNuml"/><limits>matches <nt def="nt-noDecNuml"/></limits><args><arg><var>i</var><limits>an <phrase>integer</phrase></limits></arg></args><summary>Maps an <phrase>integer</phrase> to a <nt def="nt-noDecNuml"/>, its <termref def="dt-canonical-representation"/>.</summary><argsetup/><algorithm>Return
<ulist><item><p><string>-</string> &amp; <pfref ref="f-unsNoDecCanFragMap"/>(−<var>i</var>)  
when <var>i</var> is negative,</p></item><item><p><pfref ref="f-unsNoDecCanFragMap"/>(<var>i</var>)   otherwise.</p></item></ulist>
</algorithm></funcdef><funcdef><name id="f-unsDecCanFragMap">unsignedDecimalPtCanonicalMap</name><nt def="nt-unsDecNuml"/><limits>matches <nt def="nt-unsDecNuml"/></limits><args><arg><var>n</var><limits>a nonnegative <phrase>decimal number</phrase></limits></arg></args><summary>Maps a nonnegative <phrase>decimal number</phrase> to a <nt def="nt-unsDecNuml"/>, its <termref def="dt-canonical-representation"/>.</summary><argsetup/><algorithm>Return  <pfref ref="f-unsNoDecCanFragMap"/>(<var>n</var><termref def="dt-div"/>1) &amp;
<string>.</string> &amp; <pfref ref="f-fracDigitsMap"/>(<var>n</var><termref def="dt-mod"/>1) .</algorithm></funcdef><funcdef><name id="f-decCanFragMap">decimalPtCanonicalMap</name><nt def="nt-decNuml"/><limits>matches <nt def="nt-decNuml"/></limits><args><arg><var>n</var><limits>a <phrase>decimal number</phrase></limits></arg></args><summary>Maps a <phrase>decimal number</phrase> to a <nt def="nt-decNuml"/>, its <termref def="dt-canonical-representation"/>.</summary><algorithm>Return
<ulist><item><p><string>-</string> &amp; <pfref ref="f-unsDecCanFragMap"/>(−<var>i</var>)  
when <var>i</var> is negative,</p></item><item><p><pfref ref="f-unsDecCanFragMap"/>(<var>i</var>)   otherwise.</p></item></ulist>
</algorithm></funcdef><funcdef><name id="f-unsSciCanFragMap">unsignedScientificCanonicalMap</name><nt def="nt-unsSciNuml"/><limits>matches <nt def="nt-unsSciNuml"/></limits><args><arg><var>n</var><limits>a nonnegative <phrase>decimal number</phrase></limits></arg></args><summary>Maps a nonnegative <phrase>decimal number</phrase> to a <nt def="nt-unsSciNuml"/>, its <termref def="dt-canonical-representation"/>.</summary><algorithm>
Return  <pfref ref="f-unsDecCanFragMap"/>(<var>n</var> / 10<sup>log(<var>n</var>) <termref def="dt-div"/> 1</sup>) &amp;
<string>E</string> &amp;
<pfref ref="f-noDecCanMap"/>(log(<var>n</var>) <termref def="dt-div"/> 1)
</algorithm></funcdef><funcdef><name id="f-sciCanFragMap">scientificCanonicalMap</name><nt def="nt-sciNuml"/><limits>matches <nt def="nt-sciNuml"/></limits><args><arg><var>n</var><limits>a <phrase>decimal number</phrase></limits></arg></args><summary>Maps a <phrase>decimal number</phrase> to a <nt def="nt-sciNuml"/>, its <termref def="dt-canonical-representation"/>.</summary><algorithm>Return
<ulist><item><p><string>-</string> &amp; <pfref ref="f-unsSciCanFragMap"/>(−<var>n</var>)  
when <var>n</var> is negative,</p></item><item><p><pfref ref="f-unsSciCanFragMap"/>(<var>i</var>)   otherwise.</p></item></ulist>
</algorithm></funcdef></defset><p>For example:
</p><ulist><item><p>123.4567 <termref def="dt-mod"/> 1 = 0.4567  and  123.4567 <termref def="dt-div"/> 1 = 123 .</p></item><item><p><pfref ref="f-digitRemSeq"/>(123)  is  123 , 12 , 1 , 0 , 0 , . . . .</p></item><item><p><pfref ref="f-digitSeq"/>(123)  is  3 , 2 , 1 , 0 , 0 , . . . .</p></item><item><p><pfref ref="f-lastSigDigit"/>(<pfref ref="f-digitRemSeq"/>(123)) = 2   (Sequences count from 0.)</p></item><item><p><pfref ref="f-unsNoDecCanFragMap"/>(123) = <string>123</string></p></item><item><p><pfref ref="f-fracDigitRemSeq"/>(0.4567)  is  4.567 , 5.67 , 6.7 , 7 , 0 , 0 , . . . .</p></item><item><p><pfref ref="f-fracDigitSeq"/>(0.4567)  is  4 , 5 , 6 , 7 , 0 , 0 , . . . .</p></item><item><p><pfref ref="f-lastSigDigit"/>(<pfref ref="f-fracDigitRemSeq"/>(0.4567)) = 3</p></item><item><p><pfref ref="f-fracDigitsMap"/>(0.4567) = <string>4567</string></p></item><item><p><pfref ref="f-unsDecCanFragMap"/>(123.4567) = <string>123.4567</string></p></item></ulist><defset id="defs-NumericSpecialLexmap"><head>Lexical Mapping for Non-numerical <!--*
* material suppressed here by diff group b3249b *
*--><phrase dg="b3249b"><termref def="dt-specialvalue">Special Values</termref></phrase> Used With Numerical Datatypes</head><funcdef><name id="f-specRepVal">specialRepValue</name><!--*
* material suppressed here by diff group b3249b *
*--><phrase dg="b3249b">a <termref def="dt-specialvalue"/></phrase><limits>one of <pt>positiveInfinity</pt>,
<pt>negativeInfinity</pt>, or <pt>notANumber</pt>.</limits><args><arg><var>S</var><limits>matches <nt def="nt-numSpecReps"/></limits></arg></args><summary>Maps the <termref def="dt-lexical-representation">lexical representations</termref> of <!--*
* material suppressed here by diff group b3249b *
*--><phrase dg="b3249b"><termref def="dt-specialvalue">special values</termref></phrase> used with some
numerical datatypes to those <!--*
* material suppressed here by diff group b3249b *
*--><phrase dg="b3249b"><termref def="dt-specialvalue">special values</termref></phrase>.</summary><algorithm>
<!--* <phrase diff="add" dg="rq31facets">
The lexical mapping varies with the value of the 
<compref ref="f-sp"/> facet on the datatype
for which <var>LEX</var> is a lexical representation.
</phrase> *-->
Return
<ulist><item><p><pt>positiveInfinity</pt>   when <var>S</var> is
<string>INF</string> or <string>+INF</string>,</p></item><!--* <phrase diff="add"
dg="rq31facets">and the <propref comp="f-sp" prop="value"/> of the
datatype's <compref ref="f-sp"/> facet contains the constant
<pt>infinities</pt></phrase> *--><item><p><pt>negativeInfinity</pt>   when <var>S</var> is
<string>-INF</string>, and</p></item><item><p><pt>notANumber</pt>   when <var>S</var> is
<string>NaN</string>
</p></item></ulist>
</algorithm></funcdef></defset><defset id="defs-NumericSpecialCanmap"><head>Canonical Mapping for Non-numerical <!--*
* material suppressed here by diff group b3249b *
*--><phrase dg="b3249b"><termref def="dt-specialvalue">Special Values</termref></phrase> Used <!--*
* material suppressed here by diff group ep26 *
*--><phrase dg="ep26">with</phrase> Numerical Datatypes</head><funcdef><name id="f-specValCanMap">specialRepCanonicalMap</name><nt def="nt-numSpecReps"/><limits>matches <nt def="nt-numSpecReps"/></limits><args><arg><var>c</var><limits>one of <pt>positiveInfinity</pt>,
<pt>negativeInfinity</pt>, and <pt>notANumber</pt></limits></arg></args><summary>Maps the <!--*
* material suppressed here by diff group b3249b *
*--><phrase dg="b3249b"><termref def="dt-specialvalue">special values</termref></phrase> used with some numerical datatypes to their <termref def="dt-canonical-representation">canonical representations</termref>.</summary><algorithm>Return
<ulist><item><p><string>INF</string>   when <var>c</var> is <pt>positiveInfinity</pt></p></item><item><p><string>-INF</string>   when <var>c</var> is <pt>negativeInfinity</pt></p></item><item><p><string>NaN</string>   when <var>c</var> is <pt>notANumber</pt></p></item></ulist>
</algorithm></funcdef></defset><!--*
* material suppressed here by diff group b12300-diff10-silent *
*--><defset id="defs-decimalLexmap" dg="pdf_m"><head>Lexical Mapping</head><funcdef><name id="f-decimalLexmap">decimalLexicalMap</name><dtref ref="decimal"/><limits>a <dtref ref="decimal"/> value</limits><args><arg><var>LEX</var><limits>matches <nt def="nt-decimalRep"/></limits></arg></args><summary>Maps a <nt def="nt-decimalRep"/> onto a <dtref ref="decimal"/> value.</summary><varsetup><var>d</var> be a <dtref ref="decimal"/> value.</varsetup><algorithm>
<olist><item><p>Set <var>d</var> to 
<ulist><item><p><pfref ref="f-noDecVal"/>(<var>LEX</var>)   when
<var>LEX</var> is an instance of <nt def="nt-noDecNuml"/>, and</p></item><item><p><pfref ref="f-decVal"/>(<var>LEX</var>)   when
<var>LEX</var> is an instance of <nt def="nt-decNuml"/>,</p></item></ulist>
</p></item><item dg="rq31fix"><p>Return <var>d</var>.</p></item></olist>
</algorithm></funcdef></defset><!--*
* material suppressed here by diff group decfix *
*--><defset id="defs-decimalCanmap" dg="pdf_m"><head>Canonical Mapping</head><funcdef><name id="f-decimalCanmap">decimalCanonicalMap</name><nt def="nt-decimalRep"/><limits>a <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase></phrase> matching <nt def="nt-decimalRep"/></limits><args><arg><var>d</var><limits>a <dtref ref="decimal"/> value</limits></arg><!--*
* material suppressed here by diff group decfix *
*--></args><summary>Maps a <dtref ref="decimal"/> to its <termref def="dt-canonical-representation"/>,
a <nt def="nt-decimalRep"/>.<!--*
* material suppressed here by diff group decfix *
*--></summary><algorithm>
<olist dg="decfix"><item><p>If <var>d</var> is an integer, then return 
<pfref ref="f-noDecCanMap"/>(<var>d</var>).</p></item><item><p>Otherwise, return
<pfref ref="f-decCanFragMap"/>(<var>d</var>).</p></item></olist>
<!--*
* material suppressed here by diff group decfix *
*-->
<!--*
* material suppressed here by diff group decfix *
*-->
</algorithm></funcdef></defset><defset role="aux" dg="flfix"><head>Auxiliary Functions
for Binary Floating-point Lexical/Canonical Mappings</head><funcdef><name id="f-floatPtRound">floatingPointRound</name><phrase><phrase>decimal number</phrase> or <!--*
* material suppressed here by diff group b3249b *
*--><phrase dg="b3249b"><termref def="dt-specialvalue"/></phrase></phrase><!-- quietly put <pt>s around the 'INF's following, changed '-' to '&minus;' 2008-02-23  -DP --><limits>a <phrase>decimal number</phrase> or <!--*
* material suppressed here by diff group b3249b *
*--><phrase dg="b3249b"><termref def="dt-specialvalue"/></phrase> <emph>(<pt>INF</pt> or −<pt>INF</pt>)</emph></limits><args><arg><var>nV</var><limits>an initially non-zero <phrase>decimal number</phrase> <emph>(may be
set to zero during calculations)</emph></limits></arg><arg><var>cWidth</var><limits>a positive <phrase>integer</phrase></limits></arg><arg><var>eMin</var><limits>an <phrase>integer</phrase></limits></arg><arg><var>eMax</var><limits>an <phrase>integer</phrase> greater than <var>eMin</var></limits></arg></args><summary>Rounds a non-zero <phrase>decimal number</phrase> to the nearest floating-point value.</summary><varsetup>
<ulist><item><p><var>s</var> be an <phrase>integer</phrase> 
<phrase diff="del" dg="ep35">intially</phrase><phrase diff="add" dg="ep35">initially</phrase> 1,</p></item><item><p><var>c</var> be a nonnegative <phrase>integer</phrase>, and</p></item><item><p><var>e</var> be an <phrase>integer</phrase>.</p></item></ulist>
</varsetup><algorithm>

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

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

<olist><item><p>Set <var>s</var> to −1   when  <var>nV</var> &lt; 0 .</p></item><item><p>So select <var>e</var> that 
<!-- quietly removed spaces around '&minus;' in exponent 2007-02-23  -DP -->
2<sup><var>cWidth</var></sup> × 2<sup>(<var>e</var>−1)</sup> 
<!--*
* material suppressed here by diff group b2989 *
*--><phrase dg="b2989">≤</phrase> |<var>nV</var>| 
<!--*
* material suppressed here by diff group b2989 *
*--><phrase dg="b2989">&lt;</phrase> 
2<sup><var>cWidth</var></sup> × 2<sup><var>e</var></sup> .</p></item><item><p>So select <var>c</var> that 
(<var>c</var> − 1) × 2<sup><var>e</var></sup> ≤ |<var>nV</var> | &lt;<var>c</var> × 2<sup><var>e</var></sup>  <!--*
* material suppressed here by diff group b3976 *
*--> .</p></item><!--* The line above changed as described in 
http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2005Nov/0009.html.
Old text was:
2<sup><var>cWidth</var>&minus;1</sup>&nbsp;&le;&nbsp;<var>c</var>&nbsp;&lt;&nbsp;2<sup><var>cWidth</var></sup>&nbsp;.</p></item>
*--><item><p><ulist><item><p>when  <var>eMax</var> &lt; <var>e</var>  <emph>(overflow)</emph>
return:<ulist><item><p><pt>positiveInfinity</pt>   when <var>s</var> is positive, and</p></item><item><p><pt>negativeInfinity</pt>   otherwise.</p></item></ulist>
  </p></item><item><p>otherwise:<olist><item><p>When <var>e</var> &lt; <var>eMin</var>  <emph>(underflow):</emph><ulist><item><p>Set  <var>e</var> = <var>eMin</var></p></item><item><p>So select <var>c</var> that 
(<var>c</var> − 1) × 2<sup><var>e</var></sup> ≤ |<var>nV</var> | &lt;<var>c</var> × 2<sup><var>e</var></sup> .
<!--* 
and&nbsp;
0&nbsp;&le;&nbsp;<var>c</var>&nbsp;&lt;&nbsp;2<sup><var>cWidth</var></sup>&nbsp;.
*--></p></item></ulist></p></item><item><p>Set <var>nV</var> to<ulist><item><p><var>c</var> × 2<sup><var>e</var></sup>  
when 
|<var>nV</var> | &gt; <var>c</var> × 2<sup><var>e</var></sup> − 2<sup>(<var>e</var>−1)</sup> ;</p></item><item><p>(<var>c</var> − 1) × 2<sup>e</sup>  
when 
|<var>nV</var> | &lt; <var>c</var> × 2<sup><var>e</var></sup> − 2<sup>(<var>e</var>−1)</sup> ;</p></item><item><p><var>c</var> × 2<sup><var>e</var></sup> or
(<var>c</var> − 1) × 2<sup><var>e</var></sup>  
according to whether <var>c</var> is even
or  <var>c</var> − 1  is even, otherwise (i.e., 
|<var>nV</var> | = <var>c</var> × 2<sup><var>e</var></sup> − 2<sup>(<var>e</var>−1)</sup> ,
the midpoint between the two values).</p></item></ulist></p></item><item><!--*    <p>Return&nbsp; <var>s</var>&nbsp;&times;&nbsp;<var>nV</var>&nbsp;.</p></item> *--><p>Return  
<ulist><item><p><var>s</var> × <var>nV</var>  
when <var>nV</var> &lt; 2<sup><var>cWidth</var></sup> × 2<sup><var>eMax</var></sup>,</p></item><item><p><pt>positiveInfinity</pt>   when <var>s</var> is positive, and</p></item><item><p><pt>negativeInfinity</pt>   otherwise.</p></item></ulist>
</p></item></olist></p></item></ulist></p></item></olist>
<note><p>Implementers will find the algorithms of <bibref ref="clinger1990"/>
more efficient in memory than the simple abstract algorithm employed above.</p></note>
</algorithm></funcdef><funcdef><name id="f-round">round</name><phrase>decimal number</phrase><limits>a <phrase>decimal number</phrase></limits><args><arg><var>n</var><limits>a <phrase>decimal number</phrase></limits></arg><arg><var>k</var><limits>a nonnegative <phrase>integer</phrase></limits></arg></args><summary>Maps a <phrase>decimal number</phrase> to that value rounded by some power of 10.</summary><algorithm>Return 
((<var>n</var> / 10<sup>k</sup> + 0.5) <termref def="dt-div"/>1) × 10<sup>k</sup> .</algorithm></funcdef><funcdef><name id="f-floatApprox">floatApprox</name><phrase>decimal number</phrase><limits>a <phrase>decimal number</phrase></limits><args><arg><var>c</var><limits>a nonnegative <phrase>integer</phrase></limits></arg><arg><var>e</var><limits>an <phrase>integer</phrase></limits></arg><arg><var>j</var><limits>a nonnegative <phrase>integer</phrase></limits></arg></args><summary>Maps a <phrase>decimal number</phrase>
( <var>c</var> × 10<sup>e</sup> ) to 
successive approximations.</summary><algorithm>Return 
<pfref ref="f-round"/>(<var>c</var>, <var>j</var> ) × 10<sup><var>e</var></sup></algorithm></funcdef></defset><!--*
* material suppressed here by diff group dp090225 *
*--><defset id="defs-floatLexmap" dg="flfix"><head>Lexical Mapping</head><funcdef><name id="f-floatLexmap">floatLexicalMap</name><dtref ref="float"/><limits>a <dtref ref="float"/> value</limits><args><arg><var>LEX</var><limits>matches <nt def="nt-floatRep"/></limits></arg></args><summary>Maps a <nt def="nt-floatRep"/> onto a <dtref ref="float"/> value.</summary><varsetup>
<var>nV</var> be a <phrase>decimal number</phrase> or <!--*
* material suppressed here by diff group b3249b *
*--><phrase dg="b3249b"><termref def="dt-specialvalue"/></phrase> (INF or −INF).
</varsetup><algorithm>
<ulist><item><p>Return <pfref ref="f-specRepVal"/>(<var>LEX</var>)   when <var>LEX</var>
is an instance of <nt def="nt-numSpecReps"/>;</p></item><item><p>otherwise (<var>LEX</var> is a numeral):<olist><item><p>Set <var>nV</var> to<ulist><item><p><pfref ref="f-noDecVal"/>(<var>LEX</var>)   when
<var>LEX</var> is an instance of <nt def="nt-noDecNuml"/>,</p></item><item><p><pfref ref="f-decVal"/>(<var>LEX</var>)   when
<var>LEX</var> is an instance of <nt def="nt-decNuml"/>, and</p></item><item><p><pfref ref="f-sciVal"/>(<var>LEX</var>)   otherwise
(<var>LEX</var> is an instance of <nt def="nt-sciNuml"/>).</p></item></ulist></p></item><item><p>Set <var>nV</var> to
<pfref ref="f-floatPtRound"/>(<var>nV</var>, 24, −149, 104)  
when <var>nV</var> is not zero.  <emph>(<pfref ref="f-floatPtRound"/>
may nonetheless return zero, or INF or −INF.)</emph></p></item><item><p>Return:<ulist><item><p>When <var>nV</var> is zero:<ulist><item><p><pt>negativeZero</pt>   when
the first character of <var>LEX</var> is <string>-</string>, and</p></item><item><p><pt>positiveZero</pt>   otherwise.</p></item></ulist></p></item><item><p><var>nV</var>  
otherwise.</p></item></ulist></p></item></olist></p></item></ulist>
<note><p>This specification permits the substitution of any other rounding algorithm
which conforms to the requirements of <!--*
* material suppressed here by diff group b6664a *
*--><phrase dg="b6664a"><bibref ref="ieee754-2008"/></phrase>.</p></note>
</algorithm></funcdef></defset><defset id="defs-doubleLexmap" dg="flfix"><head>Lexical Mapping</head><funcdef><name id="f-doubleLexmap">doubleLexicalMap</name><dtref ref="double"/><limits>a <dtref ref="double"/> value</limits><args><arg><var>LEX</var><limits>matches <nt def="nt-doubleRep"/></limits></arg></args><summary>Maps a <nt def="nt-doubleRep"/> onto a <dtref ref="double"/> value.</summary><varsetup>
<var>nV</var> be a <phrase>decimal number</phrase> or <!--*
* material suppressed here by diff group b3249b *
*--><phrase dg="b3249b"><termref def="dt-specialvalue"/></phrase> (INF or −INF).
</varsetup><algorithm>
<ulist><item><p>Return <pfref ref="f-specRepVal"/>(<var>LEX</var>)   when <var>LEX</var>
is an instance of <nt def="nt-numSpecReps"/>;</p></item><item><p>otherwise (<var>LEX</var> is a numeral):<olist><item><p>Set <var>nV</var> to<ulist><item><p><pfref ref="f-noDecVal"/>(<var>LEX</var>)   when
<var>LEX</var> is an instance of <nt def="nt-noDecNuml"/>,</p></item><item><p><pfref ref="f-decVal"/>(<var>LEX</var>)   when
<var>LEX</var> is an instance of <nt def="nt-decNuml"/>, and</p></item><item><p><pfref ref="f-sciVal"/>(<var>LEX</var>)   otherwise
(<var>LEX</var> is an instance of <nt def="nt-sciNuml"/>).</p></item></ulist></p></item><item><p>Set <var>nV</var> to
<pfref ref="f-floatPtRound"/>(<var>nV</var>, 53, −1074, 971)  
when <var>nV</var> is not zero.  <emph>(<pfref ref="f-floatPtRound"/>
may nonetheless return zero, or INF or −INF.)</emph></p></item><item><p>Return:<ulist><item><p>When <var>nV</var> is zero:<ulist><item><p><pt>negativeZero</pt>   when
the first character of <var>LEX</var> is <string>-</string>, and</p></item><item><p><pt>positiveZero</pt>   otherwise.</p></item></ulist></p></item><item><p><var>nV</var>  
otherwise.</p></item></ulist></p></item></olist></p></item></ulist>
<note><p>This specification permits the substitution of any other rounding algorithm
which conforms to the requirements of <!--*
* material suppressed here by diff group b6664a *
*--><phrase dg="b6664a"><bibref ref="ieee754-2008"/></phrase>.</p></note>
</algorithm></funcdef></defset><defset id="defs-floatCanmap" dg="flfix"><head>Canonical Mapping</head><funcdef><name id="f-floatCanmap">floatCanonicalMap</name><nt def="nt-floatRep"/><limits>a <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase></phrase> matching <nt def="nt-floatRep"/></limits><args><arg><var>f</var><limits>a <dtref ref="float"/> value</limits></arg></args><summary>Maps a <dtref ref="float"/> to its
<termref def="dt-canonical-representation"/>, a <nt def="nt-floatRep"/>.</summary><varsetup>
<ulist><item><p><var>l</var> be a nonnegative <phrase>integer</phrase></p></item><item><p><var>s</var> be an <phrase>integer</phrase> intially 1,</p></item><item><p><var>c</var> be a positive <phrase>integer</phrase>, and</p></item><item><p><var>e</var> be an <phrase>integer</phrase>.</p></item></ulist>
</varsetup><algorithm>
<ulist><item><p>Return <pfref ref="f-specValCanMap"/>(<var>f</var> )  
when <var>f</var> is one of <pt>positiveInfinity</pt>,
<pt>negativeInfinity</pt>, or <pt>notANumber</pt>;</p></item><item><p>return <string>0.0E0</string>   when <var>f</var>
is <pt>positiveZero</pt>;</p></item><item><p>return <string>-0.0E0</string>   when <var>f</var>
is <pt>negativeZero</pt>;</p></item><item><p>otherwise (<var>f</var> is numeric and non-zero):<olist><item><p>Set <var>s</var> to −1   when 
<var>f</var> &lt; 0 .</p></item><item><p>Let <var>c</var> be the smallest <phrase>integer</phrase> for which there exists
an integer <var>e</var> for which 
|<var>f</var> | = <var>c</var> × 10<sup><var>e</var></sup> .</p></item><item><p>Let <var>e</var> be log<sub>10</sub>(|<var>f</var> | / <var>c</var>)  
(so that 
|<var>f</var> | = <var>c</var> × 10<sup><var>e</var></sup> ).</p></item><item><p>Let <var>l</var> be the largest nonnegative integer for which 
<var>c</var> × 10<sup><var>e</var></sup> =
<pfref ref="f-floatPtRound"/>(<pfref ref="f-floatApprox"/>(<var>c</var>, <var>e</var>, <var>l</var> ), 24, −149, 104)</p></item><item><p>Return 
<pfref ref="f-sciCanFragMap"/>(<var>s</var> × <pfref ref="f-floatApprox"/>(<var>c</var>, <var>e</var>, <var>l</var> )) .</p><!--* 
 <p>Return 
<pfref ref="f-sciCanFragMap"/>(<var>s</var>&nbsp;&times; <pfref ref="f-floatPtRound"/>(<pfref ref="f-floatApprox"/>(<var>c</var>,&nbsp;<var>e</var>,&nbsp;<var>l</var>&nbsp;),&nbsp;24,&nbsp;&minus;149,&nbsp;104))&nbsp;.</p>
*--></item></olist></p></item></ulist>
</algorithm></funcdef></defset><defset id="defs-doubleCanmap" dg="flfix"><head>Canonical Mapping</head><funcdef><name id="f-doubleCanmap">doubleCanonicalMap</name><nt def="nt-doubleRep"/><limits>a <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase></phrase> matching <nt def="nt-doubleRep"/></limits><args><arg><var>f</var><limits>a <dtref ref="double"/> value</limits></arg></args><summary>Maps a <dtref ref="double"/> to its
<termref def="dt-canonical-representation"/>, a <nt def="nt-doubleRep"/>.</summary><varsetup>
<ulist><item><p><var>l</var> be a nonnegative <phrase>integer</phrase></p></item><item><p><var>s</var> be an <phrase>integer</phrase> intially 1,</p></item><item><p><var>c</var> be a positive <phrase>integer</phrase>, and</p></item><item><p><var>e</var> be an <phrase>integer</phrase>.</p></item></ulist>
</varsetup><algorithm>
<ulist><item><p>Return <pfref ref="f-specValCanMap"/>(<var>f</var> )  
when <var>f</var> is one of <pt>positiveInfinity</pt>,
<pt>negativeInfinity</pt>, or <pt>notANumber</pt>;</p></item><item><p>return <string>0.0E0</string>   when <var>f</var>
is <pt>positiveZero</pt>;</p></item><item><p>return <string>-0.0E0</string>   when <var>f</var>
is <pt>negativeZero</pt>;</p></item><item><p>otherwise (<var>f</var> is numeric and non-zero):<olist><item><p>Set <var>s</var> to −1   when 
<var>f</var> &lt; 0 .</p></item><item><p>Let <var>c</var> be the smallest <phrase>integer</phrase> for which there exists
an integer <var>e</var> for which 
|<var>f</var> | = <var>c</var> × 10<sup><var>e</var></sup> .</p></item><item><p>Let <var>e</var> be log<sub>10</sub>(|<var>f</var> | / <var>c</var>)  
(so that 
|<var>f</var> | = <var>c</var> × 10<sup><var>e</var></sup> ).</p></item><item><p>Let <var>l</var> be the largest nonnegative integer for which 
<var>c</var> × 10<sup><var>e</var></sup> =
<pfref ref="f-floatPtRound"/>(<pfref ref="f-floatApprox"/>(<var>c</var>, <var>e</var>, <var>l</var> ), 53, −1074, 971)</p></item><item><p>Return 
<pfref ref="f-sciCanFragMap"/>(<var>s</var> × <pfref ref="f-floatApprox"/>(<var>c</var>, <var>e</var>, <var>l</var> )) .</p></item><!--* 
 <item>
 <p>Return 
<pfref ref="f-sciCanFragMap"/>(<var>s</var>&nbsp;&times; <pfref ref="f-floatPtRound"/>(<pfref ref="f-floatApprox"/>(<var>c</var>,&nbsp;<var>e</var>,&nbsp;<var>l</var>&nbsp;),&nbsp;53,&nbsp;&minus;1074,&nbsp;971)&nbsp;.</p></item>
*--></olist></p></item></ulist>
</algorithm></funcdef></defset><!--*
* material suppressed here by diff group dp090225 *
*--><!--*
* material suppressed here by diff group b12300-diff10-silent *
*--></div2><div2 id="sec-duration-functions" dg="du0_prodigal2"><head alt="duration-related Definitions">Duration-related Definitions</head><p><phrase dg="dt1">The following functions are primarily
used with the <dtref ref="duration"/> datatype and its
derivatives.</phrase>

<defset role="aux"><head>Auxiliary <dtref ref="duration"/>-related
Functions Operating on Representation Fragments</head><funcdef><name id="f-duYrMap">duYearFragmentMap</name><phrase>integer</phrase><limits>a nonnegative <phrase>integer</phrase></limits><args><arg><var>Y</var><limits>matches <nt def="nt-duYrFrag"/></limits></arg></args><summary>Maps a <nt def="nt-duYrFrag"/> to an <phrase>integer</phrase>, intended as part of the value of the <pfref ref="vp-du-month"/> property of a <dtref ref="duration"/> value.</summary><argsetup><var>Y</var> is necessarily the letter <string>Y</string> followed by a numeral <var>N</var>:</argsetup><algorithm>Return <pfref ref="f-noDecVal"/>(<var>N</var>).</algorithm></funcdef><funcdef><name id="f-duMoMap">duMonthFragmentMap</name><phrase>integer</phrase><limits>a nonnegative <phrase>integer</phrase></limits><args><arg><var>M</var><limits>matches <nt def="nt-duYrFrag"/></limits></arg></args><summary>Maps a <nt def="nt-duMoFrag"/> to an <phrase>integer</phrase>, intended as part of the value of the <pfref ref="vp-du-month"/> property of a <dtref ref="duration"/> value.</summary><argsetup><var>M</var> is necessarily the letter <string>M</string> followed by a numeral <var>N</var>:</argsetup><algorithm>Return <pfref ref="f-noDecVal"/>(<var>N</var>).</algorithm></funcdef><funcdef><name id="f-duDaMap">duDayFragmentMap</name><phrase>integer</phrase><limits>a nonnegative <phrase>integer</phrase></limits><args><arg><var>D</var><limits>matches <nt def="nt-duDaFrag"/></limits></arg></args><summary>Maps a <nt def="nt-duDaFrag"/> to an <phrase>integer</phrase>, intended as part of the value of the <pfref ref="vp-du-second"/> property of a <dtref ref="duration"/> value.</summary><argsetup><var>D</var> is necessarily the letter <string>D</string> followed by a numeral <var>N</var>:</argsetup><algorithm>Return <pfref ref="f-noDecVal"/>(<var>N</var>).</algorithm></funcdef><funcdef><name id="f-duHrMap">duHourFragmentMap</name><phrase>integer</phrase><limits>a nonnegative <phrase>integer</phrase></limits><args><arg><var>H</var><limits>matches <nt def="nt-duHrFrag"/></limits></arg></args><summary>Maps a <nt def="nt-duHrFrag"/> to an <phrase>integer</phrase>, intended as part of the value of the <pfref ref="vp-du-second"/> property of a <dtref ref="duration"/> value.</summary><argsetup><var>D</var> is necessarily the letter <string>D</string> followed by a numeral <var>N</var>:</argsetup><algorithm>Return <pfref ref="f-noDecVal"/>(<var>N</var>).</algorithm></funcdef><funcdef><name id="f-duMiMap">duMinuteFragmentMap</name><phrase>integer</phrase><limits>a nonnegative <phrase>integer</phrase></limits><args><arg><var>M</var><limits>matches <nt def="nt-duMiFrag"/></limits></arg></args><summary>Maps a <nt def="nt-duMiFrag"/> to an <phrase>integer</phrase>, intended as part of the value of the <pfref ref="vp-du-second"/> property of a <dtref ref="duration"/> value.</summary><argsetup><var>M</var> is necessarily the letter <string>M</string> followed by a numeral <var>N</var>:</argsetup><algorithm>Return <pfref ref="f-noDecVal"/>(<var>N</var>).</algorithm></funcdef><funcdef><name id="f-duSeMap">duSecondFragmentMap</name><phrase>decimal number</phrase><limits>a nonnegative <phrase>decimal number</phrase></limits><args><arg><var>S</var><limits>matches <nt def="nt-duSeFrag"/></limits></arg></args><summary>Maps a <nt def="nt-duSeFrag"/> to a <phrase>decimal number</phrase>, intended as part of the value of the <pfref ref="vp-du-second"/> property of a <dtref ref="duration"/> value.</summary><argsetup><var>S</var> is necessarily <string>S</string> followed by a numeral <var>N</var>:</argsetup><algorithm>Return
<ulist><item><p><pfref ref="f-decVal"/>(<var>N</var>)   when <string>.</string> occurs
in <var>N</var>, and</p></item><item><p><pfref ref="f-noDecVal"/>(<var>N</var>)   otherwise.</p></item></ulist>
</algorithm></funcdef><funcdef><name id="f-duYMMap">duYearMonthFragmentMap</name><phrase>integer</phrase><limits>a nonnegative <phrase>integer</phrase></limits><args><arg><var>YM</var><limits>matches <nt def="nt-duYMFrag"/></limits></arg></args><summary>Maps a <nt def="nt-duYMFrag"/> into an <phrase>integer</phrase>, intended as part of the <pfref ref="vp-du-month"/> property of a <dtref ref="duration"/> value.</summary><argsetup><var>YM</var> necessarily consists of an 
instance <var>Y</var> of <nt def="nt-duYrFrag"/> and/or an instance <var>M</var> of
<nt def="nt-duMoFrag"/>:</argsetup><varsetup>
<ulist><item><p><var>y</var> be <pfref ref="f-duYrMap"/>(<var>Y</var>) (or 0 if <var>Y</var> is not present) and</p></item><item><p><var>m</var> be <pfref ref="f-duMoMap"/>(<var>M</var>) (or 0 if <var>M</var> is not present).</p></item></ulist>
</varsetup><algorithm>Return  12 × <var>y</var> + <var>m</var> .</algorithm></funcdef><funcdef><name id="f-duTMap">duTimeFragmentMap</name><phrase>decimal number</phrase><limits>a nonnegative <phrase>decimal number</phrase></limits><args><arg><var>T</var><limits>matches <nt def="nt-duTFrag"/></limits></arg></args><summary>Maps a <nt def="nt-duTFrag"/> into a <phrase>decimal number</phrase>, intended as part of the <pfref ref="vp-du-second"/> property of a <dtref ref="duration"/> value.</summary><argsetup><var>T</var> necessarily consists of an instance 
<var>H</var> of <nt def="nt-duHrFrag"/>, and/or an instance <var>M</var> of
<nt def="nt-duMiFrag"/>, and/or an instance <var>S</var> of
<nt def="nt-duSeFrag"/>.</argsetup><varsetup> 
<ulist><item><p><var>h</var> be <pfref ref="f-duDaMap"/>(<var>H</var>) 
(or 0 if <var>H</var> is not present),</p></item><item><p><var>m</var> be <pfref ref="f-duMiMap"/>(<var>M</var>) 
(or 0 if <var>M</var> is not present), and</p></item><item><p><var>s</var> be <pfref ref="f-duSeMap"/>(<var>S</var>) 
(or 0 if <var>S</var> is not present).</p></item></ulist>
</varsetup><algorithm>Return  
3600 × <var>h</var> + 60 × <var>m</var> + s .</algorithm></funcdef><funcdef><name id="f-duDTMap">duDayTimeFragmentMap</name><phrase>decimal number</phrase><limits>a nonnegative <phrase>decimal number</phrase></limits><args><arg><var>DT</var><limits>matches <nt def="nt-duDTFrag"/></limits></arg></args><summary>Maps a <nt def="nt-duDTFrag"/> into a <phrase>decimal number</phrase>, which is the potential value of the <pfref ref="vp-du-second"/> property of a <dtref ref="duration"/> value.</summary><argsetup><var>DT</var> <phrase diff="del" dg="ep35">necesarily</phrase><phrase diff="add" dg="ep35">necessarily</phrase> consists of an instance 
<var>D</var> of <nt def="nt-duDaFrag"/> and/or an instance <var>T</var> of
<nt def="nt-duTFrag"/>.</argsetup><varsetup> 
<ulist><item><p><var>d</var> be <pfref ref="f-duDaMap"/>(<var>D</var>) 
(or 0 if <var>D</var> is not present) and</p></item><item><p><var>t</var> be <pfref ref="f-duTMap"/>(<var>T</var>) 
(or 0 if <var>T</var> is not present).</p></item></ulist>
</varsetup><algorithm>Return  86400 × <var>d</var> + <var>t</var> .</algorithm></funcdef></defset>

<defset id="defs-durationLexmap"><head alt="The duration Lexical Mapping">The <dtref ref="duration"/> Lexical Mapping</head><funcdef><name id="f-durationMap">durationMap</name><dtref ref="duration"/><limits>a complete <dtref ref="duration"/> value</limits><args><arg><var>DUR</var><limits>matches <nt def="nt-durationRep"/></limits></arg></args><summary>Separates the <nt def="nt-durationRep"/> into the month part and the seconds part, 
then maps them into the <pfref ref="vp-du-month"/> and <pfref ref="vp-du-second"/> of the 
<dtref ref="duration"/> value.</summary><argsetup><var>DUR</var> consists of possibly a 
leading <string>-</string>, followed by 
<string>P</string> and then an instance <var>Y</var> of <nt def="nt-duYMFrag"/> 
and/or an instance <var>D</var> of 
<nt def="nt-duDTFrag"/>:</argsetup><algorithm>Return a <dtref ref="duration"/> whose
<ulist><item><p><pfref ref="vp-du-month"/> value is
<ulist><item><p>0   if <var>Y</var> is not present,</p></item><item><p>−<pfref ref="f-duYMMap"/>(<var>Y</var>)   if 
both <string>-</string> and <var>Y</var> are present, and</p></item><item><p><pfref ref="f-duYMMap"/>(<var>Y</var>)   otherwise.</p></item></ulist></p></item></ulist> 
and whose
<ulist><item><p><pfref ref="vp-du-second"/> value is
<ulist><item><p>0   if <var>D</var> is not present,</p></item><item><p>−<pfref ref="f-duDTMap"/>(<var>D</var>)   if 
both <string>-</string> and <var>D</var> are present, and</p></item><item><p><pfref ref="f-duDTMap"/>(<var>D</var>)   otherwise.</p></item></ulist></p></item></ulist> 
</algorithm></funcdef></defset>

<defset id="defs-yearMonthDurationLexmap"><head>The <dtref ref="yearMonthDuration"/> Lexical Mapping</head><funcdef><name id="f-yearMonthDurationMap">yearMonthDurationMap</name><dtref ref="yearMonthDuration"/><limits>a complete <dtref ref="yearMonthDuration"/> value</limits><args><arg><var>YM</var><limits>matches <nt def="nt-yearMonthDurationRep"/></limits></arg></args><summary>Maps the lexical representation into the <pfref ref="vp-du-month"/> of a
<dtref ref="yearMonthDuration"/> value.  (A
<dtref ref="yearMonthDuration"/>'s <pfref ref="vp-du-second"/> is always
zero.)  <pfref ref="f-yearMonthDurationMap"/> is a restriction of <pfref ref="f-durationMap"/>.</summary><argsetup><var>YM</var> necessarily consists of
an optional leading <string>-</string>, followed by
<string>P</string> and then an instance <var>Y</var> of
<nt def="nt-duYMFrag"/>:</argsetup><algorithm>Return a <dtref ref="yearMonthDuration"/> whose
<ulist><item><p><vpropref ref="vp-du-month"/> value is
 <ulist><item><p>−<pfref ref="f-duYMMap"/>(<var>Y</var>)   if <string>-</string> is
present in <var>YM</var> and</p></item><item><p><pfref ref="f-duYMMap"/>(<var>Y</var>)   otherwise, and</p></item></ulist>
</p></item><item><p><vpropref ref="vp-du-second"/> value is (necessarily) 0.</p></item></ulist>
</algorithm></funcdef></defset>

<defset id="defs-dayTimeDurationLexmap"><head>The <dtref ref="dayTimeDuration"/> Lexical Mapping</head><funcdef><name id="f-dayTimeDurationMap">dayTimeDurationMap</name><dtref ref="dayTimeDuration"/><limits>a complete <dtref ref="dayTimeDuration"/> value</limits><args><arg><var>DT</var><limits>a <dtref ref="dayTimeDuration"/> value</limits></arg></args><summary>Maps the lexical representation into the <pfref ref="vp-du-second"/> of a
<dtref ref="dayTimeDuration"/> value.  (A
<dtref ref="dayTimeDuration"/>'s <pfref ref="vp-du-month"/> is always
zero.)  <pfref ref="f-dayTimeDurationMap"/> is a restriction of <pfref ref="f-durationMap"/>.</summary><argsetup><var>DT</var> necessarily
consists of possibly a leading <string>-</string>, followed by
<string>P</string> and then an instance <var>D</var> of
<nt def="nt-duDTFrag"/>:</argsetup><algorithm>Return a <dtref ref="dayTimeDuration"/> whose
<ulist><item><p><vpropref ref="vp-du-month"/> value is (necessarily) 0, and</p></item><item><p><vpropref ref="vp-du-second"/> value is
 <ulist><item><p>−<pfref ref="f-duDTMap"/>(<var>D</var>)   if <string>-</string> is
present in <var>DT</var> and</p></item><item><p><pfref ref="f-duDTMap"/>(<var>D</var>)   otherwise.</p></item></ulist></p></item></ulist>
</algorithm></funcdef></defset>

<defset role="aux"><head>Auxiliary <dtref ref="duration"/>-related Functions
Producing Representation Fragments</head><funcdef><name id="f-duYMCan">duYearMonthCanonicalFragmentMap</name><nt def="nt-duYMFrag"/><limits>a <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase></phrase> matching <nt def="nt-duYMFrag"/></limits><args><arg><var>ym</var><limits>a nonnegative <phrase>integer</phrase></limits></arg></args><summary>Maps a nonnegative <phrase>integer</phrase>, presumably the absolute value of the <pfref ref="vp-du-month"/> of a <dtref ref="duration"/> value, to a <nt def="nt-duYMFrag"/>, a fragment of a <dtref ref="duration"/> <termref def="dt-lexical-representation"/>.</summary><varsetup>
<ulist><item><p><var>y</var> be  <var>ym</var> <termref def="dt-div"/> 12 , and</p></item><item><p><var>m</var> be  <var>ym</var> <termref def="dt-mod"/> 12 ,</p></item></ulist>
</varsetup><algorithm>Return
<ulist><item><p><pfref ref="f-unsNoDecCanFragMap"/>(<var>y</var>) &amp; <string>Y</string> &amp; <pfref ref="f-unsNoDecCanFragMap"/>(<var>m</var>) &amp; <string>M</string>  
when neither <var>y</var> nor <var>m</var> is zero,</p></item><item><p><pfref ref="f-unsNoDecCanFragMap"/>(<var>y</var>) &amp; <string>Y</string>  
when <var>y</var> is not zero but <var>m</var> is, and</p></item><item><p> <pfref ref="f-unsNoDecCanFragMap"/>(<var>m</var>) &amp; <string>M</string>  
when <var>y</var> is zero.</p></item></ulist>
</algorithm></funcdef><funcdef><name id="f-duDCan">duDayCanonicalFragmentMap</name><nt def="nt-duDaFrag"/><limits>a <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase></phrase> matching <nt def="nt-duDaFrag"/></limits><args><arg><var>d</var><limits>a nonnegative <phrase>integer</phrase></limits></arg></args><summary>Maps a nonnegative <phrase>integer</phrase>, presumably the day normalized value from the <pfref ref="vp-du-second"/> of a <dtref ref="duration"/> value, to a <nt def="nt-duDaFrag"/>, a fragment of a <dtref ref="duration"/> <termref def="dt-lexical-representation"/>.</summary><algorithm>Return
<ulist><item><p><pfref ref="f-unsNoDecCanFragMap"/>(<var>d</var>) &amp; <string>D</string>  
when <var>d</var> is not zero, and</p></item><item><p>the empty string (<string/>)   when <var>d</var> is zero.</p></item></ulist>
</algorithm></funcdef><funcdef><name id="f-duHCan">duHourCanonicalFragmentMap</name><nt def="nt-duHrFrag"/><limits>a <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase></phrase> matching <nt def="nt-duHrFrag"/></limits><args><arg><var>h</var><limits>a nonnegative <phrase>integer</phrase></limits></arg></args><summary>Maps a nonnegative <phrase>integer</phrase>, presumably the hour normalized value from the <pfref ref="vp-du-second"/> of a <dtref ref="duration"/> value, to a <nt def="nt-duHrFrag"/>, a fragment of a <dtref ref="duration"/> <termref def="dt-lexical-representation"/>.</summary><algorithm>Return
<ulist><item><p><pfref ref="f-unsNoDecCanFragMap"/>(<var>h</var>) &amp; <string>H</string>  
when <var>h</var> is not zero, and</p></item><item><p>the empty string (<string/>)   when <var>h</var> is zero.</p></item></ulist>
</algorithm></funcdef><funcdef><name id="f-duMCan">duMinuteCanonicalFragmentMap</name><nt def="nt-duMiFrag"/><limits>a <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase></phrase> matching <nt def="nt-duMiFrag"/></limits><args><arg><var>m</var><limits>a nonnegative <phrase>integer</phrase></limits></arg></args><summary>Maps a nonnegative <phrase>integer</phrase>, presumably the minute normalized value from the <pfref ref="vp-du-second"/> of a <dtref ref="duration"/> value, to a <nt def="nt-duMiFrag"/>, a fragment of a <dtref ref="duration"/> <termref def="dt-lexical-representation"/>.</summary><algorithm>Return
<ulist><item><p><pfref ref="f-unsNoDecCanFragMap"/>(<var>m</var>) &amp; <string>M</string>   
when <var>m</var> is not zero, and</p></item><item><p>the empty string (<string/>)   when <var>m</var> is zero.</p></item></ulist>
</algorithm></funcdef><funcdef><name id="f-duSCan">duSecondCanonicalFragmentMap</name><nt def="nt-duSeFrag"/><limits>matches <nt def="nt-duSeFrag"/></limits><args><arg><var>s</var><limits>a nonnegative <phrase>decimal number</phrase></limits></arg></args><summary>Maps a nonnegative <phrase>decimal number</phrase>, presumably the second normalized value from the <pfref ref="vp-du-second"/> of a <dtref ref="duration"/> value, to a <nt def="nt-duSeFrag"/>, a fragment of a <dtref ref="duration"/> <termref def="dt-lexical-representation"/>.</summary><algorithm>Return
<ulist><item><p><pfref ref="f-unsNoDecCanFragMap"/>(<var>s</var>) &amp; <string>S</string>  
when <var>s</var> is a non-zero integer,</p></item><item><p><pfref ref="f-unsDecCanFragMap"/>(<var>s</var>) &amp; <string>S</string>  
when <var>s</var> is not an integer, and</p></item><item><p>the empty string (<string/>) when <var>s</var> is zero.</p></item></ulist>
</algorithm></funcdef><funcdef><name id="f-duTCan">duTimeCanonicalFragmentMap</name><nt def="nt-duTFrag"/><limits>a <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase></phrase> matching <nt def="nt-duTFrag"/></limits><args><arg><var>h</var><limits>a nonnegative <phrase>integer</phrase></limits></arg><arg><var>m</var><limits>a nonnegative <phrase>integer</phrase></limits></arg><arg><var>s</var><limits>a nonnegative <phrase>decimal number</phrase></limits></arg></args><summary>Maps three nonnegative numbers, presumably the hour, minute, and second normalized values from a <dtref ref="duration"/>'s <pfref ref="vp-du-second"/>, to a <nt def="nt-duTFrag"/>, a fragment of a <dtref ref="duration"/> <termref def="dt-lexical-representation"/>.</summary><algorithm>Return
<ulist><item><p><string>T</string> &amp;
<pfref ref="f-duHCan"/>(<var>h</var>) &amp;
<pfref ref="f-duMCan"/>(<var>m</var>) &amp;
<pfref ref="f-duSCan"/>(<var>s</var>)   
when <var>h</var>, <var>m</var>, and <var>s</var> are not all zero, and</p></item><item><p>the empty string (<string/>) when all arguments are zero.</p></item></ulist>
</algorithm></funcdef><funcdef><name id="f-duDTCan">duDayTimeCanonicalFragmentMap</name><nt def="nt-duDTFrag"/><limits>matches <nt def="nt-duDTFrag"/></limits><args><arg><var>ss</var><limits>a nonnegative <phrase>decimal number</phrase></limits></arg></args><summary>Maps a nonnegative <phrase>decimal number</phrase>, presumably the absolute value of the <pfref ref="vp-du-second"/> of a <dtref ref="duration"/> value, to a <nt def="nt-duDTFrag"/>, a fragment of a <dtref ref="duration"/> <termref def="dt-lexical-representation"/>.</summary><varsetup>
<ulist><item><p><var>d</var> is  
<var>ss</var> <termref def="dt-div"/> 86400 ,</p></item><item><p><var>h</var> is  
(<var>ss</var> <termref def="dt-mod"/> 86400) <termref def="dt-div"/> 3600 ,</p></item><item><p><var>m</var> is  
(<var>ss</var> <termref def="dt-mod"/> 3600) <termref def="dt-div"/> 60 , and</p></item><item><p><var>s</var> is  
<var>ss</var> <termref def="dt-mod"/> 60 ,</p></item></ulist>
</varsetup><algorithm>Return
<ulist><item><p><pfref ref="f-duDCan"/>(<var>d</var>) &amp; 
<pfref ref="f-duTCan"/>(<var>h</var>, <var>m</var>, <var>s</var>)   
when <var>ss</var> is not zero and</p></item><item><p><string>T0S</string>   when <var>ss</var> is zero.</p></item></ulist>
</algorithm></funcdef></defset>

<defset id="defs-durationCanmap"><head>The <dtref ref="duration"/> Canonical Mapping</head><funcdef><name id="f-durationCanMap">durationCanonicalMap</name><nt def="nt-durationRep"/><limits>matches <nt def="nt-durationRep"/></limits><args><arg><var>v</var><limits>a complete <dtref ref="duration"/> value</limits></arg></args><summary>Maps a <dtref ref="duration"/>'s property values  to <nt def="nt-durationRep"/> fragments and combines the fragments into a complete <nt def="nt-durationRep"/>.</summary><varsetup>
<ulist><item><p><var>m</var> be <var>v</var>'s <vpropref ref="vp-du-month"/>,</p></item><item><p><var>s</var> be <var>v</var>'s <vpropref ref="vp-du-second"/>, and</p></item><item><p><var>sgn</var> be <string>-</string> if <var>m</var> or 
<var>s</var> is negative and
the empty string (<string/>) otherwise.</p></item></ulist>
</varsetup><algorithm>Return
<ulist><item><p><var>sgn</var> &amp; <string>P</string> &amp; 
<pfref ref="f-duYMCan"/>(| <var>m</var> |) &amp; 
<pfref ref="f-duDTCan"/>(| <var>s</var> |)    
when neither <var>m</var> nor <var>s</var> is zero,</p></item><item><p><var>sgn</var> &amp; <string>P</string> &amp; 
<pfref ref="f-duYMCan"/>(| <var>m</var> |)    
when <var>m</var> is not zero but <var>s</var> is, and</p></item><item><p><var>sgn</var> &amp; <string>P</string> &amp; 
<pfref ref="f-duDTCan"/>(| <var>s</var> |)    
when <var>m</var> is zero.</p></item></ulist>
</algorithm></funcdef></defset>

<defset id="defs-yearMonthDurationCanmap"><head>The <dtref ref="yearMonthDuration"/> Canonical Mapping</head><funcdef><name id="f-yearMonthDurationCanMap">yearMonthDurationCanonicalMap</name><nt def="nt-yearMonthDurationRep"/><limits>matches <nt def="nt-yearMonthDurationRep"/></limits><args><arg><var>ym</var><limits>a complete <dtref ref="yearMonthDuration"/> value</limits></arg></args><summary>Maps a <dtref ref="yearMonthDuration"/>'s <vpropref ref="vp-du-month"/> value  to
a <nt def="nt-yearMonthDurationRep"/>.  (The <vpropref ref="vp-du-second"/> value is necessarily zero and is ignored.)  <pfref ref="f-yearMonthDurationCanMap"/> is a restriction of <pfref ref="f-durationCanMap"/>.</summary><varsetup>
<ulist><item><p><var>m</var> be <var>ym</var>'s <vpropref ref="vp-du-month"/> and</p></item><item><p><var>sgn</var> be <string>-</string> if <var>m</var> is negative and
the empty string (<string/>) otherwise.</p></item></ulist>
</varsetup><algorithm>
Return  <var>sgn</var> &amp; <string>P</string> &amp; 
<pfref ref="f-duYMCan"/>(| <var>m</var> |) .
</algorithm></funcdef></defset>

<defset id="defs-dayTimeDurationCanmap"><head>The <dtref ref="dayTimeDuration"/> Canonical Mapping</head><funcdef><name id="f-dayTimeDurationCanMap">dayTimeDurationCanonicalMap</name><nt def="nt-dayTimeDurationRep"/><limits>matches <nt def="nt-dayTimeDurationRep"/></limits><args><arg><var>dt</var><limits>a complete <dtref ref="dayTimeDuration"/> value</limits></arg></args><summary>Maps a <dtref ref="dayTimeDuration"/>'s <vpropref ref="vp-du-second"/> value  to
a <nt def="nt-dayTimeDurationRep"/>.  (The <vpropref ref="vp-du-month"/> value is necessarily zero and is ignored.)  <pfref ref="f-dayTimeDurationCanMap"/> is a restriction of <pfref ref="f-durationCanMap"/>.</summary><varsetup>
<ulist><item><p><var>s</var> be <var>dt</var>'s <vpropref ref="vp-du-month"/> and</p></item><item><p><var>sgn</var> be <string>-</string> if <var>s</var> is negative and
the empty string (<string/>) otherwise.</p></item></ulist>
</varsetup><algorithm>Return <var>sgn</var> &amp; <string>P</string> &amp; 
<pfref ref="f-duYMCan"/>(| <var>s</var> |) .
</algorithm></funcdef></defset>
</p></div2><div2 id="sec-dt-functions" dg="dt1"><head>Date/time-related Definitions</head><!--* subdivision of this section by MSM, 2005-04-29, to try to make
    * it easier to navigate.  Not yet approved by WG
    *--><div3 id="sec-normalization"><head>Normalization of property values</head><p>When adding and subtracting numbers from date/time properties, the
immediate results may not conform to the limits specified. 
Accordingly, the following procedures are used to
<unusual>normalize</unusual> potential property values to
corresponding values that do conform to the appropriate limits. 
Normalization is required when dealing with <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offset</phrase> changes (as when
converting to 
<!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3"><!--*
* material suppressed here by diff group dt2 *
*--><termref dg="dt2" def="dt-utc"/></phrase> 
from 
<!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd"><unusual>local</unusual></phrase> 
values) and when
adding <dtref ref="duration"/> values to or subtracting them from
<dtref ref="dateTime"/> values.

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

<defset role="aux"><head>Date/time Datatype Normalizing Procedures</head><procdef><name id="f-dt-normMo">normalizeMonth</name><args><arg><var>yr</var><limits>an <phrase>integer</phrase></limits></arg><arg><var>mo</var><limits>an <phrase>integer</phrase></limits></arg></args><summary dg="dudt2">If month (<var>mo</var>) is out of range, 
adjust month and year (<var>yr</var>) accordingly;
otherwise, make no change.</summary><algorithm>
<olist><item><p>
Add  (<var>mo</var> − 1) <termref def="dt-div"/> 12  to <var>yr</var>.
</p></item><item><p>
Set <var>mo</var> to 
(<var>mo</var> − 1) <termref def="dt-mod"/> 12<phrase dg="dt4"> + 1</phrase> .
</p></item></olist>
</algorithm></procdef><procdef><name id="f-dt-normDa">normalizeDay</name><args><arg><var>yr</var><limits>an <phrase>integer</phrase></limits></arg><arg><var>mo</var><limits>an <phrase>integer</phrase></limits></arg><arg><var>da</var><limits>an <phrase>integer</phrase></limits></arg></args><summary><!--*
* material suppressed here by diff group dudt2 *
*--><phrase dg="dudt2">If
month (<var>mo</var>) is out of range, or day (<var>da</var>) is
out of range for the appropriate month, then adjust values accordingly,
otherwise make no change.</phrase></summary><algorithm>
<olist><item><p><pfref ref="f-dt-normMo"/>(<var>yr</var>, <var>mo</var>)</p></item><item><p>Repeat until <var>da</var> is positive and not greater than 
<!--*
* material suppressed here by diff group dt4 *
*--><phrase dg="dt4"><!--*
* material suppressed here by diff group dudt *
*--><phrase dg="dudt"><pfref ref="f-daysInMonth"/></phrase>(<var>yr</var>, <var>mo</var>)</phrase>:
 <olist><item><p>If <var>da</var> exceeds
 <!--*
* material suppressed here by diff group b6945 *
*--><phrase dg="b6945"><pfref ref="f-daysInMonth"/>(<var>yr</var>, <var>mo</var>)</phrase>
 then:
  <olist><item><p>Subtract that limit from <var>da</var>.</p></item><item><p>Add 1 to <var>mo</var>.</p></item><item><p><pfref ref="f-dt-normMo"/>(<var>yr</var>, <var>mo</var>)</p></item></olist>
 </p></item><item><p>If <var>da</var> is not positive then:
  <olist><item><p>Subtract 1 from <var>mo</var>.</p></item><item><p><pfref ref="f-dt-normMo"/>(<var>yr</var>, <var>mo</var>)</p></item><item><p>Add the new upper limit from the table to <var>da</var>.</p></item></olist>
 </p></item></olist>
</p></item></olist>
</algorithm></procdef><procdef><name id="f-dt-normMi">normalizeMinute</name><args><arg><var>yr</var><limits>an <phrase>integer</phrase></limits></arg><arg><var>mo</var><limits>an <phrase>integer</phrase></limits></arg><arg><var>da</var><limits>an <phrase>integer</phrase></limits></arg><arg><var>hr</var><limits>an <phrase>integer</phrase></limits></arg><arg><var>mi</var><limits>an <phrase>integer</phrase></limits></arg></args><summary>Normalizes minute, hour, month, and year values to values that obey the appropriate constraints.</summary><algorithm>
<olist><item><p>Add   <var>mi</var> <termref def="dt-div"/> 60  to <var>hr</var>.</p></item><item><p>Set <var>mi</var> to  <var>mi</var> <termref def="dt-mod"/> 60 .</p></item><item><p>Add  <var>hr</var> <termref def="dt-div"/> 24  to <var>da</var>.</p></item><item><p>Set <var>hr</var> to  <var>hr</var> <termref def="dt-mod"/> 24 .</p></item><item><p><pfref ref="f-dt-normDa"/>(<var>yr</var>, <var>mo</var>, <var>da</var>).</p></item></olist>
</algorithm></procdef><procdef><name id="f-dt-normSe"><!--*
* material suppressed here by diff group noleap *
*--><phrase dg="noleap">n</phrase>ormalizeSecond</name><args><arg><var>yr</var><limits>an <phrase>integer</phrase></limits></arg><arg><var><!--*
* material suppressed here by diff group dudt *
*--><phrase dg="dudt">mo</phrase></var><limits>an <phrase>integer</phrase></limits></arg><arg><var>da</var><limits>an <phrase>integer</phrase></limits></arg><arg><var>hr</var><limits>an <phrase>integer</phrase></limits></arg><arg><var>mi</var><limits>an <phrase>integer</phrase></limits></arg><arg><var>se</var><limits>a <phrase>decimal number</phrase></limits></arg></args><summary>Normalizes second, minute, hour, month, and year values to values that obey the appropriate
constraints.  (This algorithm <!--*
* material suppressed here by diff group noleap *
*--><phrase dg="noleap">ignores leap seconds</phrase>.)
</summary><algorithm>
<olist><item><p>Add  <var>se</var> <termref def="dt-div"/> 60  to <var>mi</var>.</p></item><item><p>Set <var>se</var> to
<phrase dg="rq122a_sg"><var>se</var> <termref def="dt-mod"/></phrase><!--*
* material suppressed here by diff group rq122a_sg *
*--> 60 .</p></item><item><p><pfref ref="f-dt-normMi"/>(<var>yr</var>, <var>mo</var>, <var>da</var>, <var>hr</var>, <var>mi</var>).</p></item></olist>
</algorithm></procdef><!--*
* material suppressed here by diff group noleap *
*--></defset>
</p></div3><!--*
* material suppressed here by diff group dt3 *
*--><div3 id="sec-aux-functions"><head>Auxiliary Functions</head><!--*
* material suppressed here by diff group appr070331 *
*--><!--*
* material suppressed here by diff group appr070331 *
*--><p>
<defset dg="dt3"><head>Date/time Auxiliary Functions</head><!--*
* material suppressed here by diff group dudt *
*--><funcdef dg="dudt"><name id="f-daysInMonth">daysInMonth</name><phrase>integer</phrase><limits>between 28 and 31 inclusive</limits><args><arg><var>y</var><limits>an <termref def="dt-optional"/> <phrase>integer</phrase></limits></arg><arg><var>m</var><limits>an <phrase>integer</phrase> between 1 and 12</limits></arg></args><summary>Returns the number of the last day of the month
for any combination of year and month.</summary><algorithm>
Return:
<ulist><item><p>28   when <var>m</var> is 2 and
<var>y</var> is not evenly divisible by 4,
or is evenly divisible by 100 but not by 400, 
or is <pt>absent</pt>,</p></item><item><p>29   when <var>m</var> is 2 and 
<var>y</var> is evenly divisible by 400, 
or is evenly divisible by 4 but not by 100,</p></item><item><p>30   when <var>m</var> is 4, 6, 9, or 11,</p></item><item><p>31   otherwise (<var>m</var> is 1, 3, 5, 7, 8, 10, or 12)</p></item></ulist>
</algorithm></funcdef><!--*
* material suppressed here by diff group dudt *
*--><funcdef dg="dudt"><name id="p-setDTFromRaw">newDateTime</name><phrase>an instance of the <dtref ref="dt-dt-7PropMod"/></phrase><limits> </limits><!--* do not let 'limits' be entirely empty (i.e. retain that blank).
    * Otherwise, xslt generats an empty div <div/> and browsers get very 
    * confused, with deplorable results for the display.
    *--><args><arg><var>Yr</var><limits>an <termref def="dt-optional"/>
<phrase>integer</phrase></limits></arg><arg><var>Mo</var><limits>an <termref def="dt-optional"/>
<phrase>integer</phrase> between 1 and 12 inclusive</limits></arg><arg><var>Da</var><limits>an <termref def="dt-optional"/>
<phrase>integer</phrase> between 1 and 31 inclusive</limits></arg><arg><var>Hr</var><limits>an <termref def="dt-optional"/>
<phrase>integer</phrase> between 0 and 24 inclusive</limits></arg><arg><var>Mi</var><limits>an <termref def="dt-optional"/>
<phrase>integer</phrase> between 0 and 59 inclusive</limits></arg><arg><var>Se</var><limits>an <termref def="dt-optional"/>
<phrase>decimal number</phrase> greater than or equal to 0 and less than 
<!--*
* material suppressed here by diff group rq122d_sg *
*--><phrase dg="rq122d_sg">60</phrase></limits></arg><arg><var>Tz</var><limits>an <termref def="dt-optional"/>
<!--*
* material suppressed here by diff group b3859 *
*--><phrase dg="b3859">integer
between −840 and 840 inclusive</phrase>.</limits></arg></args><summary>Returns an instance of the <dtref ref="dt-dt-7PropMod"/> with
property values as specified in the arguments.  If an argument is 
omitted, the corresponding property is set to <pt>absent</pt>.</summary><varsetup>
<ulist><item><p><var>dt</var> be an instance of the <dtref ref="dt-dt-7PropMod"/></p></item><item><p><!--*
* material suppressed here by diff group b3851 *
*--><phrase dg="b3851"><var>yr</var>
be <var>Yr</var> when <var>Yr</var> is not <pt>absent</pt>, otherwise 1</phrase></p></item><item><p><!--*
* material suppressed here by diff group b3851 *
*--><phrase dg="b3851"><var>mo</var></phrase> 
be <var>Mo</var><phrase dg="b3851">when <var>Mo</var> is
not <pt>absent</pt>, otherwise 1</phrase></p></item><item><p><!--*
* material suppressed here by diff group b3851 *
*--><phrase dg="b3851"><var>da</var></phrase> 
be <var>Da</var><phrase dg="b3851">when <var>Da</var> is
not <pt>absent</pt>, otherwise 1</phrase></p></item><item><p><!--*
* material suppressed here by diff group b3851 *
*--><phrase dg="b3851"><var>hr</var></phrase> 
be <var>Hr</var><phrase dg="b3851">when <var>Hr</var> is
not <pt>absent</pt>, otherwise 0</phrase></p></item><item><p><!--*
* material suppressed here by diff group b3851 *
*--><phrase dg="b3851"><var>mi</var></phrase> 
be <var>Mi</var><phrase dg="b3851">when <var>Mi</var> is
not <pt>absent</pt>, otherwise 0</phrase></p></item><item><p><!--*
* material suppressed here by diff group b3851 *
*--><phrase dg="b3851"><var>se</var></phrase> 
be <var>Se</var><phrase dg="b3851">when <var>Se</var> is
not <pt>absent</pt>, otherwise 0</phrase></p></item><!--*
* material suppressed here by diff group b3851 *
*--></ulist>
</varsetup><algorithm>
<!--*
* material suppressed here by diff group b3851 *
*-->
<olist dg="b3851"><item><p><pfref ref="f-dt-normSe"/>(<var>yr</var>, <var>mo</var>, <var>da</var>, <var>hr</var>, <var>mi</var>, <var>se</var>)</p></item><item><p>Set the <pfref ref="vp-dt-year"/> property of <var>dt</var> to <pt>absent</pt>
when <var>Yr</var> is <pt>absent</pt>, otherwise <var>yr</var>.</p></item><item><p>Set the <pfref ref="vp-dt-month"/> property of <var>dt</var> to <pt>absent</pt>
when <var>Mo</var> is <pt>absent</pt>, otherwise <var>mo</var>.</p></item><item><p>Set the <pfref ref="vp-dt-day"/> property of <var>dt</var> to <pt>absent</pt>
when <var>Da</var> is <pt>absent</pt>, otherwise <var>da</var>.</p></item><item><p>Set the <pfref ref="vp-dt-hour"/> property of <var>dt</var> to <pt>absent</pt>
when <var>Hr</var> is <pt>absent</pt>, otherwise <var>hr</var>.</p></item><item><p>Set the <pfref ref="vp-dt-minute"/> property of <var>dt</var> to <pt>absent</pt>
when <var>Mi</var> is <pt>absent</pt>, otherwise <var>mi</var>.</p></item><item><p>Set the <pfref ref="vp-dt-second"/> property of <var>dt</var> to <pt>absent</pt>
when <var>Se</var> is <pt>absent</pt>, otherwise <var>se</var>.</p></item><item><p>Set the <pfref ref="vp-dt-timezone"/> property of <var>dt</var> to <var>Tz</var></p></item><item><p>Return <var>dt</var>.</p></item></olist>
</algorithm></funcdef></defset>
</p></div3><div3 id="sec-dt-arith"><head>Adding durations to dateTimes</head><p id="new_g1" dg="dudt_g">
Given a <dtref ref="dateTime"/> <var>S</var> and a <dtref ref="duration"/> 
<var>D</var>, <!--*
* material suppressed here by diff group dudt2 *
*--><phrase dg="dudt2">function 
<pfref ref="vp-dt-dateTimePlusDuration"/></phrase>
specifies how to compute a <dtref ref="dateTime"/> <var>E</var>, where
<var>E</var> is the end of the time period with start <var>S</var> and
duration <var>D</var> i.e. <var>E</var> = <var>S</var> +
<var>D</var>.  Such computations are used, for example, to
determine whether a <dtref ref="dateTime"/> is within a specific time 
period.  This 
<!--*
* material suppressed here by diff group dudt2 *
*--><phrase dg="dudt2">algorithm 
can</phrase> also <!--*
* material suppressed here by diff group dudt2 *
*--><phrase dg="dudt2">be applied,
when applications need the operation,
to</phrase> the addition of <dtref ref="duration"/>s to the datatypes 
<dtref ref="date"/>, <dtref ref="gYearMonth"/>, <dtref ref="gYear"/>, 
<dtref ref="gDay"/> and <dtref ref="gMonth"/>, 
<phrase dg="dudt2">each of</phrase> which can be viewed as 
<phrase dg="dudt2">denoting</phrase> a set of 
<dtref ref="dateTime"/>s. In such cases, the addition is made to the 
first or starting <dtref ref="dateTime"/> in the set. 
<phrase dg="dudt2">Note that the extension of this
algorithm to types other than <dtref ref="dateTime"/> is not
needed for schema-validity assessment.</phrase>
</p><!--* <p diff="add" dg="dudt_g">
<emph>This is a logical explanation of the process.
Actual implementations are free to optimize as long as they produce the same
results. </emph></p> *--><p id="new_g5" dg="dudt_g">
Essentially, this calculation <!--*
* material suppressed here by diff group dudt2 *
*--><phrase dg="dudt2">adds the
<vpropref ref="vp-du-month"/> and
<vpropref ref="vp-du-second"/> properties of the 
<dtref ref="duration"/> value separately to the
<dtref ref="dateTime"/> value</phrase>. The 
<!--*
* material suppressed here by diff group dudt2 *
*--><phrase dg="dudt2"><vpropref ref="vp-du-month"/> 
value</phrase>
is added to <!--*
* material suppressed here by diff group dudt2 *
*--><phrase dg="dudt2">the starting <dtref ref="dateTime"/>
value first</phrase>. If the 
day is out of range<phrase dg="dudt2"> for the new
month value</phrase>, it is <emph>pinned</emph>
to be within range. Thus April 31 turns into April 30. Then the
<!--*
* material suppressed here by diff group dudt2 *
*--><phrase dg="dudt2"><vpropref ref="vp-du-second"/> value</phrase>
is added. This latter addition can
cause the year<!--*
* material suppressed here by diff group dudt2 *
*--><phrase dg="dudt2">,</phrase> 
month<phrase dg="dudt2">, day, hour, and minute</phrase> to change.
</p><p id="new_g6" dg="dudt_g">
Leap seconds are 
<!--*
* material suppressed here by diff group noleap *
*--><phrase dg="noleap">ignored</phrase> 
by the computation<!--*
* material suppressed here by diff group noleap *
*-->. All calculations
<!--*
* material suppressed here by diff group noleap *
*-->use 60 seconds per minute.
</p><p id="new_g7" dg="dudt_g">
Thus the addition of either PT1M or PT60S to any dateTime will always
produce the same result. This is a special definition of addition which
is designed to match common practice, and—most importantly—be stable
over time.
</p><p id="new_g8" dg="dudt_g">
A definition that attempted to take leap-seconds into account would
need to be constantly updated, and could not predict the results of
future implementation's additions. The decision to introduce a leap
second in <!--*
* material suppressed here by diff group dt2 *
*--><termref dg="dt2" def="dt-utc"/> is the responsibility of the 
<bibref ref="IERS"/>. They make periodic
announcements as to when leap seconds are to be added, but this is not
known more than a year in advance. For more information on leap
seconds, see <bibref ref="USNavy"/>.
</p><defset dg="dudt"><head role="aux">Adding <dtref ref="duration"/> to  <dtref ref="dateTime"/></head><funcdef><name id="vp-dt-dateTimePlusDuration">dateTimePlusDuration</name><dtref ref="dateTime"/><limits>a <dtref ref="dateTime"/>
value</limits><args><arg><var>du</var><limits>a <dtref ref="duration"/>
value</limits></arg><arg><var>dt</var><limits>a <dtref ref="dateTime"/>
value</limits></arg></args><summary>Adds a <dtref ref="duration"/> to a <dtref ref="dateTime"/> value, producing another <dtref ref="dateTime"/> value.</summary><varsetup>
<ulist><item><p><var>yr</var> be <var>dt</var>'s <pfref ref="vp-dt-year"/>,</p></item><item><p><var>mo</var> be <var>dt</var>'s <pfref ref="vp-dt-month"/>,</p></item><item><p><var>da</var> be <var>dt</var>'s <pfref ref="vp-dt-day"/><!--*
* material suppressed here by diff group rq122d_sg *
*-->,</p></item><item><p><var>hr</var> be <var>dt</var>'s <pfref ref="vp-dt-hour"/>,</p></item><item><p><var>mi</var> be <var>dt</var>'s <pfref ref="vp-dt-minute"/>, and</p></item><item><p><var>se</var> be <var>dt</var>'s <pfref ref="vp-dt-second"/>.</p></item><item><p><var>tz</var> be <var>dt</var>'s <pfref ref="vp-dt-timezone"/>.</p></item></ulist>
</varsetup><algorithm>
<olist><item><p>Add <var>du</var>'s <pfref ref="vp-du-month"/> to  <var>mo</var>.</p></item><item><p><pfref ref="f-dt-normMo"/>(<var>yr</var>, <var>mo</var>). (I.e., carry any
over- or underflow, adjust month.)</p></item><item><p>Set <var>da</var>
to  min(<var>da</var>, <pfref ref="f-daysInMonth"/>(<var>yr</var>, <var>mo</var>)).
(I.e., <emph>pin</emph> the value if necessary.)</p></item><item><p>Add <var>du</var>'s <pfref ref="vp-du-second"/> to  <var>se</var>.</p></item><item><p><pfref ref="f-dt-normSe"/>(<var>yr</var>, <var>mo</var>, <var>da</var>, <var>hr</var>, <var>mi</var>, <var>se</var>).
(I.e., carry over- or underflow of seconds up to minutes, hours, etc.)
</p></item><item><p>Return <pfref ref="p-setDTFromRaw"/>(<var>yr</var>, <var>mo</var>, <var>da</var>, 
<var>hr</var>, <var>mi</var>, <var>se</var>,
<var>tz</var>)
</p></item><!--* <item><p>Return <var>dt</var>.</p></item> *--></olist>
</algorithm></funcdef></defset><p dg="dudt2">This algorithm may be applied to date/time types
other than <dtref ref="dateTime"/>, by</p><olist dg="dudt2"><item><p>For each <pt>absent</pt> property, supply the minimum legal value for that
property (1 for years, months, days, 0 for hours, minutes, seconds).</p></item><item><p>Call the function.</p></item><item><p>For each property <pt>absent</pt> in the initial value,
set the corresponding property in the result value to <pt>absent</pt>.</p></item></olist><p id="new_g11" dg="dudt_g"><emph>Examples:</emph></p><!-- HST notes that the way tables are handled means the diff markup is not processed correctly - - the dg attribute 
is passed through into the result :-) --><table id="new_g12" border="1" cellspacing="0" cellpadding="4"><!-- diff="add" dg="dudt_g" --><tbody><tr><th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">dateTime</th><th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">duration</th><th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">result</th></tr><tr><td align="center" rowspan="1" colspan="1">2000-01-12T12:13:14Z</td><td align="center" rowspan="1" colspan="1">P1Y3M5DT7H10M3.3S</td><td align="center" rowspan="1" colspan="1">2001-04-17T19:23:17.3Z</td></tr><tr><td align="center" rowspan="1" colspan="1">2000-01</td><td align="center" rowspan="1" colspan="1">-P3M</td><td align="center" rowspan="1" colspan="1">1999-10</td></tr><tr><td align="center" rowspan="1" colspan="1">2000-01-12</td><td align="center" rowspan="1" colspan="1">PT33H</td><td align="center" rowspan="1" colspan="1">2000-01-13</td></tr></tbody></table><!--* 
<p id="new_g13" diff="add" dg="dudt_g">
Time durations are added by simply adding each of their fields, respectively,
without overflow.
</p> *--><p id="new_g14" dg="dudt_g">
<phrase dg="dudt2">Note that the addition defined by 
<pfref ref="vp-dt-dateTimePlusDuration"/> differs from addition on
integers or real numbers in not being commutative.</phrase>
The order of addition of durations to instants <emph>is</emph> significant.
For example, there are cases where:<!--*
<display id="new_g15a" diff="add" dg="dudt2">((dateTime + duration1) + duration2) != ((dateTime +
(duration2 + duration1)</display>
<phrase diff="add" dg="dudt2">or</phrase> *-->
<display id="new_g15" dg="dudt_g">((dateTime + duration1) + duration2) != ((dateTime +
duration2) + duration1)</display>
</p><p id="new_g16" dg="dudt_g"><emph>Example:</emph></p><ulist><item><p id="new_g17" dg="dudt_g">
(2000-03-30 + P1D) + P1M = 2000-03-31 + P1M = 2000-<strong>04-30</strong></p></item><!--* 
<item>
<p id="new_g18" diff="add" dg="dudt2">
(2000-03-30 + (P1M + P1D) = 2000-03-30 + P1M1D = 2000-<strong>05-01</strong></p>
</item>
*--><item><p id="new_g18" dg="dudt_g">
(2000-03-30 + P1M) + P1D = 2000-04-30 + P1D = 2000-<strong>05-01</strong></p></item></ulist></div3><div3 id="sec-timeontimeline"><head>Time on timeline</head><!--*
* material suppressed here by diff group ap090709 *
*--><defset id="defs-dt-ToTl"><head role="aux">Time on Timeline for Date/time Seven-property
Model<phrase dg="dt3"> Datatype</phrase>s</head><funcdef><name id="vp-dt-timeOnTimeline">timeOnTimeline</name><phrase>decimal number</phrase><limits>a <phrase>decimal number</phrase></limits><args><arg><var>dt</var><limits>a <dtref ref="dt-dt-7PropMod"/>
value</limits></arg></args><summary>Maps a <dtref ref="dt-dt-7PropMod"/> value to the <phrase>decimal number</phrase>
representing its position on the <unusual>time line</unusual>.</summary><varsetup>
<ulist><item><p><var>yr</var> be
<!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3">1971</phrase>
when <var>dt</var>'s <pfref ref="vp-dt-year"/> is <pt>absent</pt>,
and  <var>dt</var>'s
<pfref ref="vp-dt-year"/> − 1  otherwise,</p></item><item><p><var>mo</var> be 12 or
<var>dt</var>'s <pfref ref="vp-dt-month"/> , similarly,</p></item><item><p><var>da</var> be 
<!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3"><pfref ref="f-daysInMonth"/>(<var>yr</var>+1, <var>mo</var>)</phrase> − 1 
or  (<var>dt</var>'s
<pfref ref="vp-dt-day"/>) − 1 , similarly,</p></item><item><p><var>hr</var> be 0 or
<var>dt</var>'s <pfref ref="vp-dt-hour"/> , 
similarly,<!--*
* material suppressed here by diff group b6944 *
*--></p></item><item><p><var>mi</var> be 0 or
<var>dt</var>'s <pfref ref="vp-dt-minute"/> ,
similarly<!--*
* material suppressed here by diff group b6944 *
*--><phrase dg="b6944">,
and</phrase></p></item><item dg="b6944"><p><var>se</var> be 0 or
<var>dt</var>'s <pfref ref="vp-dt-second"/> ,
similarly.</p></item></ulist>
</varsetup><algorithm>
<olist><item dg="dt3"><p>Subtract <pfref ref="vp-dt-timezone"/> from <var>mi</var>  
when <pfref ref="vp-dt-timezone"/> is not <pt>absent</pt>.</p></item><item><p>(<pfref ref="vp-dt-year"/>)
<olist><item><p>Set <var>ToTl</var> to 
31536000 × <var>yr</var> .</p></item></olist></p></item><item><p>(Leap-year Days, <pfref ref="vp-dt-month"/>, and <pfref ref="vp-dt-day"/>)
<olist><item><p>Add  86400 ×
(<var>yr</var> <termref def="dt-div"/> 400 −
<var>yr</var> <termref def="dt-div"/> 100 +
<var>yr</var> <termref def="dt-div"/> 4)  to
<var>ToTl</var>.</p></item><item><p>Add   86400 × <!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3">Sum<sub><var>m</var> &lt; <var>mo</var></sub> <pfref ref="f-daysInMonth"/>(<var>yr</var><phrase dg="totl"> + 1</phrase>, <var>m</var>)</phrase> to
<var>ToTl</var></p></item><item><p>Add   86400 × <var>da</var>  to
<var>ToTl</var>.</p></item></olist></p></item><!--* dt3-del-noleap is for changes added by dt3 and deleted by noleap.
    * It was set as "del" for generating the noleap proposal.
    * Since the proposal was accepted, 'diff' was changed to "add" (so
    * dg-approved could show this dg as "pre"). 
    *--><!--*
* material suppressed here by diff group dt3-del-noleap *
*--><item><p>(<pfref ref="vp-dt-hour"/>, <pfref ref="vp-dt-minute"/>,
and <pfref ref="vp-dt-second"/>)     
<olist><item><p>Add  3600 × <var>hr</var> +
60 × <var>mi</var> + <var>se</var> 
to <var>ToTl</var>.</p></item></olist></p></item><item><p>Return <var>ToTl</var>.</p></item></olist>
</algorithm></funcdef></defset></div3><div3 id="sec-dt-lexmaps"><head>Lexical mappings</head><defset id="defs-func-on-dt-frags"><head>Partial Date/time Lexical Mappings</head><funcdef><name id="f-dt-yrMap">yearFragValue</name><phrase>integer</phrase><limits>an <phrase>integer</phrase></limits><args><arg><var>YR</var><limits>matches <nt def="nt-yrFrag"/></limits></arg></args><summary>Maps a <nt def="nt-yrFrag"/>, part of a <dtref ref="dt-dt-7PropMod"/>'s <termref def="dt-lexical-representation"/>,
onto an <phrase>integer</phrase>, presumably the <pfref ref="vp-dt-year"/> property of a <dtref ref="dt-dt-7PropMod"/> value.</summary><algorithm>Return <pfref ref="f-noDecVal"/>(<var>YR</var>)</algorithm></funcdef><funcdef><name id="f-dt-moMap">monthFragValue</name><phrase>integer</phrase><limits>an <phrase>integer</phrase></limits><args><arg><var>MO</var><limits>matches <nt def="nt-moFrag"/></limits></arg></args><summary>Maps a <nt def="nt-moFrag"/>, part of a <dtref ref="dt-dt-7PropMod"/>'s <termref def="dt-lexical-representation"/>,
onto an <phrase>integer</phrase>, presumably the <pfref ref="vp-dt-month"/> property of a <dtref ref="dt-dt-7PropMod"/> value.</summary><algorithm>Return <pfref ref="f-unsNoDecVal"/>(<var>MO</var>)</algorithm></funcdef><funcdef><name id="f-dt-daMap">dayFragValue</name><phrase>integer</phrase><limits>an <phrase>integer</phrase></limits><args><arg><var>DA</var><limits>matches <nt def="nt-daFrag"/></limits></arg></args><summary>Maps a <nt def="nt-daFrag"/>, part of a <dtref ref="dt-dt-7PropMod"/>'s <termref def="dt-lexical-representation"/>,
onto an <phrase>integer</phrase>, presumably the <pfref ref="vp-dt-day"/> property of a <dtref ref="dt-dt-7PropMod"/> value.</summary><algorithm>Return <pfref ref="f-unsNoDecVal"/>(<var>DA</var>)</algorithm></funcdef><funcdef><name id="f-dt-hrMap">hourFragValue</name><phrase>integer</phrase><limits>an <phrase>integer</phrase></limits><args><arg><var>HR</var><limits>matches <nt def="nt-hrFrag"/></limits></arg></args><summary>Maps a <nt def="nt-hrFrag"/>, part of a <dtref ref="dt-dt-7PropMod"/>'s <termref def="dt-lexical-representation"/>,
onto an <phrase>integer</phrase>, presumably the <pfref ref="vp-dt-hour"/> property of a <dtref ref="dt-dt-7PropMod"/> value.</summary><algorithm>Return <pfref ref="f-unsNoDecVal"/>(<var>HR</var>)</algorithm></funcdef><funcdef><name id="f-dt-miMap">minuteFragValue</name><phrase>integer</phrase><limits>an <phrase>integer</phrase></limits><args><arg><var>MI</var><limits>matches <nt def="nt-miFrag"/></limits></arg></args><summary>Maps a <nt def="nt-miFrag"/>, part of a <dtref ref="dt-dt-7PropMod"/>'s <termref def="dt-lexical-representation"/>,
onto an <phrase>integer</phrase>, presumably the <pfref ref="vp-dt-minute"/> property of a <dtref ref="dt-dt-7PropMod"/> value.</summary><algorithm>Return <pfref ref="f-unsNoDecVal"/>(<var>MI</var>)</algorithm></funcdef><funcdef><name id="f-dt-seMap">secondFragValue</name><phrase>decimal number</phrase><limits>a <phrase>decimal number</phrase></limits><args><arg><var>SE</var><limits>matches <nt def="nt-seFrag"/></limits></arg></args><summary>Maps a <nt def="nt-seFrag"/>, part of a <dtref ref="dt-dt-7PropMod"/>'s <termref def="dt-lexical-representation"/>,
onto a <phrase>decimal number</phrase>, presumably the <pfref ref="vp-dt-second"/> property of a <dtref ref="dt-dt-7PropMod"/> value.</summary><algorithm>Return
 <ulist><item><p><pfref ref="f-unsNoDecVal"/>(<var>SE</var>)   when no decimal point occurs in <var>SE</var>, and</p></item><item><p><pfref ref="f-unsDecVal"/>(<var>SE</var>)   otherwise.</p></item></ulist></algorithm></funcdef><funcdef><name id="f-dt-tzMap">timezoneFragValue</name><phrase>integer</phrase><limits>an <phrase>integer</phrase></limits><args><arg><var>TZ</var><limits>matches <nt def="nt-tzFrag"/></limits></arg></args><summary>Maps a <nt def="nt-tzFrag"/>, part of a <dtref ref="dt-dt-7PropMod"/>'s <termref def="dt-lexical-representation"/>,
onto an <phrase>integer</phrase>, presumably the <pfref ref="vp-dt-timezone"/> property of a <dtref ref="dt-dt-7PropMod"/> value.</summary><argsetup><var>TZ</var> necessarily consists of either just <string>Z</string>, or
 a sign (<string>+</string> or <string>-</string>) followed by an instance <var>H</var> of
 <nt def="nt-hrFrag"/>, a colon, and an instance <var>M</var> of <nt def="nt-miFrag"/>
</argsetup><algorithm>Return
 <ulist><item><p>0   when <var>TZ</var> is <string>Z</string>,</p></item><item><p>−(<pfref ref="f-unsDecVal"/>(<var>H</var>) × 60 + <pfref ref="f-unsDecVal"/>(<var>M</var>))  
 when the sign is <string>-</string>, and</p></item><item><p><pfref ref="f-unsDecVal"/>(<var>H</var>) × 60 + <pfref ref="f-unsDecVal"/>(<var>M</var>)  
 otherwise.</p></item></ulist></algorithm></funcdef></defset><!--*
* material suppressed here by diff group edn10658 *
*--><note dg="b10658"><p>There is no <termref def="dt-lexical-mapping"/> for
<nt def="nt-eodFrag"/>; it is handled specially by the relevant
<termref def="dt-lexical-mapping">lexical mappings</termref>.  See, e.g.,
<pfref ref="vp-dateTimeLexRep"/>.</p></note><defset id="defs-dateTimeLexmap" dg="dt2"><head>Lexical Mapping</head><funcdef><name id="vp-dateTimeLexRep">dateTimeLexicalMap</name><dtref ref="dateTime"/><limits>a complete <dtref ref="dateTime"/> value</limits><args><arg><var>LEX</var><limits>matches <nt def="nt-dateTimeRep"/></limits></arg></args><summary>Maps a <nt def="nt-dateTimeRep"/> to
a <dtref ref="dateTime"/> value.</summary><argsetup><var>LEX</var> necessarily includes
<!--*
* material suppressed here by diff group b10658 *
*--><phrase dg="b10658">substrings
that are instances</phrase> of <nt def="nt-yrFrag"/>, 
<!--*
* material suppressed here by diff group b10658 *
*--><nt def="nt-moFrag"/>, and
<!--*
* material suppressed here by diff group b10658 *
*--><nt def="nt-daFrag"/>
<phrase dg="b10658">(below referred to as
<var>Y</var>, <var>MO</var>, and <var>D</var> respectively);</phrase>
<!--*
* material suppressed here by diff group b10658 *
*--><phrase dg="b10658">it
also contains either instances</phrase> of
<nt def="nt-hrFrag"/>, <!--*
* material suppressed here by diff group b10658 *
*--><nt def="nt-miFrag"/>,
and <!--*
* material suppressed here by diff group b10658 *
*--><nt def="nt-seFrag"/><phrase dg="b10658">(<var>Y</var>,
<var>MI</var>, and <var>S</var>)</phrase>,
<!--*
* material suppressed here by diff group b10658 *
*--><phrase dg="b10658">or
else an instance of <nt def="nt-eodFrag"/>; finally,
it may optionally contain an instance
of</phrase><nt def="nt-tzFrag"/><phrase dg="b10658">
(<var>T</var>)</phrase>.</argsetup><!--* 
<varsetup diff="del" dg="dudt"><var>dt</var> be a <phrase diff="del" dg="dt3">complete 
<dtref ref="dateTime"/></phrase><phrase diff="add" dg="dt3"><dtref ref="dt-dt-7PropMod"/></phrase>
value with all property values <pt>absent</pt>.</varsetup>
*--><varsetup><!--*
* material suppressed here by diff group dudt *
*--><phrase dg="dudt"><var>tz</var>
be <pfref ref="f-dt-tzMap"/>(<var>T</var>) when <var>T</var>
is present, otherwise <pt>absent</pt></phrase>.</varsetup><algorithm>
<!--*
* material suppressed here by diff group b10658 *
*-->
<phrase dg="b10658">Return</phrase>
<ulist dg="b10658"><item><p><pfref ref="p-setDTFromRaw"/>(<pfref ref="f-dt-yrMap"/>(<var>Y</var>),
<pfref ref="f-dt-moMap"/>(<var>MO</var>),
<pfref ref="f-dt-daMap"/>(<var>D</var>), 24, 0, 0,
<var>tz</var>) when <nt def="nt-eodFrag"/>
is present, and</p></item><item><p>
<pfref ref="p-setDTFromRaw"/>(<pfref ref="f-dt-yrMap"/>(<var>Y</var>),
<pfref ref="f-dt-moMap"/>(<var>MO</var>),
<pfref ref="f-dt-daMap"/>(<var>D</var>),
<pfref ref="f-dt-hrMap"/>(<var>H</var>),
<pfref ref="f-dt-miMap"/>(<var>MI</var>),
<pfref ref="f-dt-seMap"/>(<var>S</var>),
<var>tz</var>) otherwise</p></item></ulist>
</algorithm></funcdef></defset><defset id="defs-timeLexmap" dg="dt2"><head>Lexical Mapping</head><funcdef><name id="vp-timeLexRep">timeLexicalMap</name><dtref ref="time"/><limits>a complete
<dtref ref="time"/> value</limits><args><arg><var>LEX</var><limits>matches
<nt def="nt-timeRep"/></limits></arg></args><summary>Maps a <nt def="nt-timeRep"/> to
a <dtref ref="time"/> value.</summary><argsetup><var>LEX</var> necessarily includes
<!--*
* material suppressed here by diff group b10658 *
*--><phrase dg="b10658">either
substrings that are instances</phrase> of <nt def="nt-hrFrag"/>, 
<!--*
* material suppressed here by diff group b10658 *
*--><nt def="nt-miFrag"/>,
and <!--*
* material suppressed here by diff group b10658 *
*-->
<nt def="nt-seFrag"/>, <!--*
* material suppressed here by diff group b10658 *
*--><phrase dg="b10658">(below referred to as
<var>H</var>, <var>M</var>, and <var>S</var> respectively), or
else an instance of 
<nt def="nt-eodFrag"/>; finally, it may optionally contain
an instance</phrase> of <nt def="nt-tzFrag"/><phrase dg="b10658">
(<var>T</var>)</phrase>.</argsetup><varsetup><!--*
* material suppressed here by diff group dudt *
*--><phrase dg="dudt"><var>tz</var>
be <pfref ref="f-dt-tzMap"/>(<var>T</var>) when <var>T</var>
is present, otherwise <pt>absent</pt></phrase></varsetup><algorithm>
<!--*
* material suppressed here by diff group b10658 *
*-->
<phrase dg="b10658">Return</phrase>
<ulist dg="b10658"><item><p><pfref ref="p-setDTFromRaw"/>(<pt>absent</pt>,
<pt>absent</pt>, <pt>absent</pt>, 0, 0, 0,
<var>tz</var>) when <nt def="nt-eodFrag"/>
is present, and</p></item><item><p>
<pfref ref="p-setDTFromRaw"/>(<pt>absent</pt>,
<pt>absent</pt>, <pt>absent</pt>,
<pfref ref="f-dt-hrMap"/>(<var>H</var>),
<pfref ref="f-dt-miMap"/>(<var>MI</var>),
<pfref ref="f-dt-seMap"/>(<var>S</var>),
<var>tz</var>) otherwise.</p></item></ulist>
</algorithm></funcdef></defset><!--*
* material suppressed here by diff group edn10658 *
*--><defset id="defs-dateLexmap" dg="dt2"><head>Lexical Mapping</head><funcdef><name id="vp-dateLexRep">dateLexicalMap</name><dtref ref="date"/><limits>a complete <dtref ref="date"/> value</limits><args><arg><var>LEX</var><limits>matches
<nt def="nt-dateRep"/></limits></arg></args><summary>Maps a <nt def="nt-dateRep"/> to a
<dtref ref="date"/> value.</summary><argsetup><var>LEX</var> necessarily includes
an instance <var>Y</var> of <nt def="nt-yrFrag"/>, 
an instance <var>M</var> of <nt def="nt-moFrag"/>,
and an instance <var>D</var> of <nt def="nt-daFrag"/>,
hyphen-separated and optionally followed by an instance
<var>T</var> of <nt def="nt-tzFrag"/>.</argsetup><varsetup><!--*
* material suppressed here by diff group dudt *
*--><phrase dg="dudt"><var>tz</var>
be <pfref ref="f-dt-tzMap"/>(<var>T</var>) when <var>T</var>
is present, otherwise <pt>absent</pt></phrase></varsetup><algorithm>
<!--*
* material suppressed here by diff group b10658 *
*-->
<phrase dg="b10658">Return
<pfref ref="p-setDTFromRaw"/>(<pfref ref="f-dt-yrMap"/>(<var>Y</var>),
<pfref ref="f-dt-moMap"/>(<var>M</var>),
<pfref ref="f-dt-daMap"/>(<var>D</var>),
<pt>absent</pt>, <pt>absent</pt>, <pt>absent</pt>,
<var>tz</var>.)</phrase>
</algorithm></funcdef></defset><defset id="defs-gYearMonthLexmap" dg="dt3"><head>Lexical Mapping</head><funcdef><name id="vp-gYearMonthLexRep">gYearMonthLexicalMap</name><dtref ref="gYearMonth"/><limits>a complete <dtref ref="gYearMonth"/> value</limits><args><arg><var>LEX</var><limits>matches
<nt def="nt-gYearMonthRep"/></limits></arg></args><summary>Maps a <nt def="nt-gYearMonthRep"/> to a
<dtref ref="gYearMonth"/> value.</summary><argsetup><var>LEX</var> necessarily includes
an instance <var>Y</var> of <nt def="nt-yrFrag"/> 
and an instance <var>M</var> of <nt def="nt-moFrag"/>,
hyphen-separated and optionally followed by an instance
<var>T</var> of <nt def="nt-tzFrag"/>.</argsetup><varsetup><!--*
* material suppressed here by diff group dudt *
*--><phrase dg="dudt"><var>tz</var>
be <pfref ref="f-dt-tzMap"/>(<var>T</var>) when <var>T</var>
is present, otherwise <pt>absent</pt></phrase>.</varsetup><algorithm>
<!--*
* material suppressed here by diff group b10658 *
*-->
<phrase dg="b10658">Return
<pfref ref="p-setDTFromRaw"/>(<pfref ref="f-dt-yrMap"/>(<var>Y</var>),
<pfref ref="f-dt-moMap"/>(<var>M</var>),
<pt>absent</pt>, <pt>absent</pt>, <pt>absent</pt>, 
<pt>absent</pt>, <var>tz</var>).</phrase>
</algorithm></funcdef></defset><defset id="defs-gYearLexmap" dg="dt3"><head>Lexical Mapping</head><funcdef><name id="vp-gYearLexRep">gYearLexicalMap</name><dtref ref="gYear"/><limits>a complete <dtref ref="gYear"/> value</limits><args><arg><var>LEX</var><limits>matches <nt def="nt-gYearRep"/></limits></arg></args><summary>Maps a <nt def="nt-gYearRep"/> to
a <dtref ref="gYear"/> value.</summary><argsetup><var>LEX</var> necessarily includes
an instance <var>Y</var> of
<!--*
* material suppressed here by diff group b10658 *
*--><phrase dg="b10658"><nt def="nt-yrFrag"/></phrase>, 
optionally followed by an instance <var>T</var>
of <nt def="nt-tzFrag"/>.</argsetup><varsetup><!--*
* material suppressed here by diff group dudt *
*--><phrase dg="dudt"><var>tz</var>
be <pfref ref="f-dt-tzMap"/>(<var>T</var>) when <var>T</var>
is present, otherwise <pt>absent</pt></phrase>.</varsetup><algorithm>
<!--*
* material suppressed here by diff group b10658 *
*-->
<phrase dg="b10658">Return
<pfref ref="p-setDTFromRaw"/>(<pfref ref="f-dt-yrMap"/>(<var>Y</var>),
<pt>absent</pt>, <pt>absent</pt>, <pt>absent</pt>, <pt>absent</pt>, 
<pt>absent</pt>, <var>tz</var>).</phrase>
</algorithm></funcdef></defset><defset id="defs-gMonthDayLexmap" dg="dt3"><head>Lexical Mapping</head><funcdef><name id="vp-gMonthDayLexRep">gMonthDayLexicalMap</name><dtref ref="gMonthDay"/><limits>a complete <dtref ref="gMonthDay"/> value</limits><args><arg><var>LEX</var><limits>matches
<nt def="nt-gMonthDayRep"/></limits></arg></args><summary>Maps a <nt def="nt-gMonthDayRep"/> to a
<dtref ref="gMonthDay"/> value.</summary><argsetup><var>LEX</var> necessarily includes
an instance <var>M</var> of <nt def="nt-moFrag"/> 
and an instance <var>D</var> of <nt def="nt-daFrag"/>,
hyphen-separated and optionally followed by an instance
<var>T</var> of <nt def="nt-tzFrag"/>.</argsetup><varsetup><!--*
* material suppressed here by diff group dudt *
*--><phrase dg="dudt"><var>tz</var>
be <pfref ref="f-dt-tzMap"/>(<var>T</var>) when <var>T</var>
is present, otherwise <pt>absent</pt></phrase>.</varsetup><algorithm>
<!--*
* material suppressed here by diff group b10658 *
*-->
<phrase dg="b10658">Return
<pfref ref="p-setDTFromRaw"/>(<pt>absent</pt>,
<pfref ref="f-dt-moMap"/>(<var>M</var>),
<pfref ref="f-dt-daMap"/>(<var>D</var>),
<pt>absent</pt>, <pt>absent</pt>, <pt>absent</pt>,
<var>tz</var>.</phrase>
</algorithm></funcdef></defset><defset id="defs-gDayLexmap"><head>Lexical Mapping</head><funcdef><name id="vp-gDayLexRep">gDayLexical<!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">Map</phrase></name><dtref ref="gDay"/><limits>a complete <dtref ref="gDay"/> value</limits><args><arg><var>LEX</var><limits>matches <nt def="nt-gDayRep"/></limits></arg></args><summary>Maps a <nt def="nt-gDayRep"/> to
a <dtref ref="gDay"/> value.</summary><argsetup><var>LEX</var> necessarily includes
an instance <var>D</var> of <nt def="nt-daFrag"/>, 
optionally followed by an instance <var>T</var>
of <nt def="nt-tzFrag"/>.</argsetup><varsetup><!--*
* material suppressed here by diff group dudt *
*--><phrase dg="dudt"><var>tz</var>
be <pfref ref="f-dt-tzMap"/>(<var>T</var>) when <var>T</var>
is present, otherwise <pt>absent</pt></phrase>.</varsetup><algorithm>
<olist><!--*
* material suppressed here by diff group dudt *
*--><item><p><phrase dg="dudt">Return</phrase>
<pfref ref="p-setDTFromRaw"/>(<var>gD</var>,
<pt>absent</pt>, <pt>absent</pt>,
<pfref ref="f-dt-daMap"/>(<var>D</var>), <pt>absent</pt>,
<pt>absent</pt>, <pt>absent</pt><phrase dg="dudt">,
<var>tz</var></phrase>)<phrase dg="dudt">.</phrase></p></item><!--*
* material suppressed here by diff group dudt *
*--></olist>
<phrase dg="b10658">Return
<pfref ref="p-setDTFromRaw"/>(<pt>absent</pt>, <pt>absent</pt>,
<pfref ref="f-dt-daMap"/>(<var>D</var>), <pt>absent</pt>,
<pt>absent</pt>, <pt>absent</pt>, <var>tz</var>).</phrase>
</algorithm></funcdef></defset><defset id="defs-gMonthLexmap" dg="dt3"><head>Lexical Mapping</head><funcdef><name id="vp-gMonthLexRep">gMonthLexicalMap</name><dtref ref="gMonth"/><limits>a complete <dtref ref="gMonth"/> value</limits><args><arg><var>LEX</var><limits>matches <nt def="nt-gMonthRep"/></limits></arg></args><summary>Maps a <nt def="nt-gMonthRep"/> to
a <dtref ref="gMonth"/> value.</summary><argsetup><var>LEX</var> necessarily includes
an instance <var>M</var> of <nt def="nt-moFrag"/>, 
optionally followed by an instance <var>T</var>
of <nt def="nt-tzFrag"/>.</argsetup><varsetup><!--*
* material suppressed here by diff group dudt *
*--><phrase dg="dudt"><var>tz</var>
be <pfref ref="f-dt-tzMap"/>(<var>T</var>) when <var>T</var>
is present, otherwise <pt>absent</pt></phrase>.</varsetup><algorithm>
<!--*
* material suppressed here by diff group b10658 *
*-->
<phrase dg="b10658">Return
<pfref ref="p-setDTFromRaw"/>(<pt>absent</pt>,
<pfref ref="f-dt-moMap"/>(<var>M</var>),
<pt>absent</pt>, <pt>absent</pt>,
<pt>absent</pt>, <pt>absent</pt>, <var>tz</var>)</phrase>
</algorithm></funcdef></defset></div3><div3 id="sec-dt-canmaps"><head>Canonical Mappings</head><defset role="aux"><head>Auxiliary Functions for Date/time Canonical Mappings</head><funcdef><name id="f-unsTwoDigCanFragMap">unsTwoDigitCanonicalFragmentMap</name><nt def="nt-unsNoDecNuml"/><limits>matches <nt def="nt-unsNoDecNuml"/></limits><args><arg><var>i</var><limits>a nonnegative <phrase>integer</phrase> less than 100</limits></arg></args><summary>Maps a nonnegative <phrase>integer</phrase> less than 100 onto an unsigned always-two-digit numeral.</summary><algorithm>Return <pfref ref="f-digit"/>(<var>i</var> <termref def="dt-div"/> 10) &amp;
<pfref ref="f-digit"/>(<var>i</var> <termref def="dt-mod"/> 10)</algorithm></funcdef><funcdef><name id="f-fourDigCanFragMap">fourDigitCanonicalFragmentMap</name><nt def="nt-noDecNuml"/><limits>matches <nt def="nt-noDecNuml"/></limits><args><arg><var>i</var><limits>an <phrase>integer</phrase> whose absolute value is less than 10000</limits></arg></args><summary>Maps an <phrase>integer</phrase> between -10000 and 10000 onto an always-four-digit numeral.</summary><algorithm>Return<ulist><item><p><string>-</string> &amp; <pfref ref="f-unsTwoDigCanFragMap"/>(−<var>i</var> <termref def="dt-div"/> 100) &amp;
<pfref ref="f-unsTwoDigCanFragMap"/>(−<var>i</var> <termref def="dt-mod"/> 100)   when
<var>i</var> is negative,</p></item><item><p><pfref ref="f-unsTwoDigCanFragMap"/>(<var>i</var> <termref def="dt-div"/> 100) &amp;
<pfref ref="f-unsTwoDigCanFragMap"/>(<var>i</var> <termref def="dt-mod"/> 100)   otherwise.</p></item></ulist></algorithm></funcdef></defset><defset id="defs-func-to-dt-frags"><head>Partial Date/time Canonical Mappings</head><funcdef><name id="f-yrCanFragMap">yearCanonicalFragmentMap</name><nt def="nt-yrFrag"/><limits>matches <nt def="nt-yrFrag"/></limits><args><arg><var>y</var><limits>an <phrase>integer</phrase> </limits></arg></args><summary>Maps an <phrase>integer</phrase>, presumably the <pfref ref="vp-dt-year"/> property of a <dtref ref="dt-dt-7PropMod"/> value,
onto a <nt def="nt-yrFrag"/>, part of a <dtref ref="dt-dt-7PropMod"/>'s <termref def="dt-lexical-representation"/>.</summary><algorithm>Return
<ulist><item><p><pfref ref="f-noDecCanMap"/>(<var>y</var>)   when  |<var>y</var>| &gt; 9999 .</p></item><item><p><pfref ref="f-fourDigCanFragMap"/>(<var>y</var>)   otherwise.</p></item></ulist></algorithm></funcdef><funcdef><name id="f-moCanFragMap">monthCanonicalFragmentMap</name><nt def="nt-moFrag"/><limits>matches <nt def="nt-moFrag"/></limits><args><arg><var>m</var><limits>an <phrase>integer</phrase> between 1 and 12 inclusive</limits></arg></args><summary>Maps an <phrase>integer</phrase>, presumably the <pfref ref="vp-dt-month"/> property of a <dtref ref="dt-dt-7PropMod"/> value,
onto a <nt def="nt-moFrag"/>, part of a <dtref ref="dt-dt-7PropMod"/>'s <termref def="dt-lexical-representation"/>.</summary><algorithm>Return <pfref ref="f-unsTwoDigCanFragMap"/>(<var>m</var>)</algorithm></funcdef><funcdef><name id="f-daCanFragMap">dayCanonicalFragmentMap</name><nt def="nt-daFrag"/><limits>matches <nt def="nt-daFrag"/></limits><args><arg><var>d</var><limits>an <phrase>integer</phrase> between 1 and 31 inclusive 
(may be limited further depending on associated <pfref ref="vp-dt-year"/> and <pfref ref="vp-dt-month"/>)</limits></arg></args><summary>Maps an <phrase>integer</phrase>, presumably the <pfref ref="vp-dt-day"/> property of a <dtref ref="dt-dt-7PropMod"/> value,
onto a <nt def="nt-daFrag"/>, part of a <dtref ref="dt-dt-7PropMod"/>'s <termref def="dt-lexical-representation"/>.</summary><algorithm>Return <pfref ref="f-unsTwoDigCanFragMap"/>(<var>d</var>)</algorithm></funcdef><funcdef><name id="f-hrCanFragMap">hourCanonicalFragmentMap</name><nt def="nt-hrFrag"/><limits>matches <nt def="nt-hrFrag"/></limits><args><arg><var>h</var><limits>an <phrase>integer</phrase> between 0 and 23 inclusive.</limits></arg></args><summary>Maps an <phrase>integer</phrase>, presumably the <pfref ref="vp-dt-hour"/> property of a <dtref ref="dt-dt-7PropMod"/> value,
onto a <nt def="nt-hrFrag"/>, part of a <dtref ref="dt-dt-7PropMod"/>'s <termref def="dt-lexical-representation"/>.</summary><algorithm>Return <pfref ref="f-unsTwoDigCanFragMap"/>(<var>h</var>)</algorithm></funcdef><funcdef><name id="f-miCanFragMap">minuteCanonicalFragmentMap</name><nt def="nt-miFrag"/><limits>matches <nt def="nt-miFrag"/></limits><args><arg><var>m</var><limits>an <phrase>integer</phrase> between 0 and 59 inclusive.</limits></arg></args><summary>Maps an <phrase>integer</phrase>, presumably the <pfref ref="vp-dt-minute"/> property of a <dtref ref="dt-dt-7PropMod"/> value,
onto a <nt def="nt-miFrag"/>, part of a <dtref ref="dt-dt-7PropMod"/>'s <termref def="dt-lexical-representation"/>.</summary><algorithm>Return <pfref ref="f-unsTwoDigCanFragMap"/>(<var>m</var>)</algorithm></funcdef><funcdef><name id="f-seCanFragMap">secondCanonicalFragmentMap</name><nt def="nt-seFrag"/><limits>matches <nt def="nt-seFrag"/></limits><args><arg><var>s</var><limits>a nonnegative <phrase>decimal number</phrase> less than 70</limits></arg></args><summary>Maps a <phrase>decimal number</phrase>, presumably the <pfref ref="vp-dt-second"/> property of a <dtref ref="dt-dt-7PropMod"/> value,
onto a <nt def="nt-seFrag"/>, part of a <dtref ref="dt-dt-7PropMod"/>'s <termref def="dt-lexical-representation"/>.</summary><algorithm>Return
<ulist><item><p><pfref ref="f-unsTwoDigCanFragMap"/>(<var>s</var>)   
when <var>s</var> is an integer, and</p></item><item><p><pfref ref="f-unsTwoDigCanFragMap"/>(<var>s</var><termref def="dt-div"/>1) &amp;
<string>.</string> &amp; <pfref ref="f-fracDigitsMap"/>(<var>s</var><termref def="dt-mod"/>1)   
otherwise.</p></item></ulist></algorithm></funcdef><funcdef><name id="f-tzCanFragMap">timezoneCanonicalFragmentMap</name><nt def="nt-tzFrag"/><limits>matches <nt def="nt-tzFrag"/></limits><args><arg><var>t</var><limits>an <phrase>integer</phrase> between −840 and 840 inclusive</limits></arg></args><summary>Maps an <phrase>integer</phrase>, presumably the <pfref ref="vp-dt-timezone"/> property of a <dtref ref="dt-dt-7PropMod"/> value,
onto a <nt def="nt-tzFrag"/>, part of a <dtref ref="dt-dt-7PropMod"/>'s <termref def="dt-lexical-representation"/>.</summary><algorithm>Return<ulist><item><p><string>Z</string>   when <var>t</var> is zero,</p></item><item><p><string>-</string> &amp; <pfref ref="f-unsTwoDigCanFragMap"/>(−<var>t</var> <termref def="dt-div"/> 60) &amp;
<string>:</string> &amp;
<pfref ref="f-unsTwoDigCanFragMap"/>(−<var>t</var> <termref def="dt-mod"/> 60)   when
<var>t</var> is negative, and</p></item><item><p><string>+</string> &amp; <pfref ref="f-unsTwoDigCanFragMap"/>(<var>t</var> <termref def="dt-div"/> 60) &amp;
<string>:</string> &amp;
<pfref ref="f-unsTwoDigCanFragMap"/>(<var>t</var> <termref def="dt-mod"/> 60)   otherwise.</p></item></ulist></algorithm></funcdef></defset><defset id="defs-dateTimeCanmap" dg="dt2"><head>Canonical Mapping</head><funcdef><name id="vp-dateTimeCanRep">dateTimeCanonicalMap</name><nt def="nt-dateRep"/><limits>matches <nt def="nt-dateRep"/></limits><args><arg><var>dt</var><limits>a complete <dtref ref="dateTime"/> value</limits></arg></args><summary>Maps a <dtref ref="dateTime"/> value to a <nt def="nt-dateTimeRep"/>.</summary><varsetup>
<var>DT</var> be 
<pfref ref="f-yrCanFragMap"/>(<!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3"><var><!--*
* material suppressed here by diff group dt4 *
*--><phrase dg="dt4">dt</phrase></var>'s <pfref ref="vp-dt-year"/></phrase>) &amp;
<string>-</string> &amp;
<pfref ref="f-moCanFragMap"/>(<!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3"><var><!--*
* material suppressed here by diff group dt4 *
*--><phrase dg="dt4">dt</phrase></var>'s <pfref ref="vp-dt-month"/></phrase>) &amp;
<string>-</string> &amp;
<pfref ref="f-daCanFragMap"/>(<!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3"><var><!--*
* material suppressed here by diff group dt4 *
*--><phrase dg="dt4">dt</phrase></var>'s <pfref ref="vp-dt-day"/></phrase>) &amp;
<string>T</string> &amp;
<pfref ref="f-hrCanFragMap"/>(<!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3"><var>dt</var>'s <pfref ref="vp-dt-hour"/></phrase>) &amp;
<string>:</string> &amp;
<pfref ref="f-miCanFragMap"/>(<!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3"><var>dt</var>'s <pfref ref="vp-dt-minute"/></phrase>) &amp;
<string>:</string> &amp;
<pfref ref="f-seCanFragMap"/>(<!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3"><var>dt</var>'s <pfref ref="vp-dt-second"/></phrase>) .
</varsetup><algorithm>Return
<ulist><item><p><var>DT</var>   when
<phrase dg="dt3"><var><!--*
* material suppressed here by diff group dt4 *
*--><phrase dg="dt4">dt</phrase></var>'s </phrase><pfref ref="vp-dt-timezone"/>
is <pt>absent</pt>, and</p></item><item><p><var>DT</var> &amp;
<pfref ref="f-tzCanFragMap"/>(<var>dt</var>'s <pfref ref="vp-dt-timezone"/>)   otherwise.</p></item></ulist>
</algorithm></funcdef></defset><defset id="defs-timeCanmap" dg="dt2"><head>Canonical Mapping</head><funcdef><name id="vp-timeCanRep">timeCanonicalMap</name><nt def="nt-timeRep"/><limits>matches <nt def="nt-timeRep"/></limits><args><arg><var>ti</var><limits>a complete <dtref ref="time"/> value</limits></arg></args><summary>Maps a <dtref ref="time"/> value to a <nt def="nt-timeRep"/>.</summary><varsetup>
<var>T</var> be 
<pfref ref="f-hrCanFragMap"/>(<!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3"><var>ti</var>'s <pfref ref="vp-dt-hour"/></phrase>) &amp;
<string>:</string> &amp;
<pfref ref="f-miCanFragMap"/>(<!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3"><var>ti</var>'s <pfref ref="vp-dt-minute"/></phrase>) &amp;
<string>:</string> &amp;
<pfref ref="f-seCanFragMap"/>(<!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3"><var>ti</var>'s <pfref ref="vp-dt-second"/></phrase>) .
</varsetup><algorithm>Return
<ulist><item><p><var>T</var>   when
<phrase dg="dt3"><var>ti</var>'s </phrase><pfref ref="vp-dt-timezone"/>
is <pt>absent</pt>, and</p></item><item><p><var>T</var> &amp;
<pfref ref="f-tzCanFragMap"/>(<var>ti</var>'s <pfref ref="vp-dt-timezone"/>)   otherwise.</p></item></ulist>
</algorithm></funcdef></defset><defset id="defs-dateCanmap" dg="dt2"><head>Canonical Mapping</head><funcdef><name id="vp-dateCanRep">dateCanonicalMap</name><nt def="nt-dateRep"/><limits>matches <nt def="nt-dateRep"/></limits><args><arg><var>da</var><limits>a complete <dtref ref="date"/> value</limits></arg></args><summary>Maps a <dtref ref="date"/> value to a <nt def="nt-dateRep"/>.</summary><varsetup>
<var>D</var> be 
<pfref ref="f-yrCanFragMap"/>(<!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3"><var>da</var>'s <pfref ref="vp-dt-year"/></phrase>) &amp;
<string>-</string> &amp;
<pfref ref="f-moCanFragMap"/>(<!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3"><var>da</var>'s <pfref ref="vp-dt-month"/></phrase>) &amp;
<string>-</string> &amp;
<pfref ref="f-daCanFragMap"/>(<!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3"><var>da</var>'s <pfref ref="vp-dt-day"/></phrase>) .
</varsetup><algorithm>Return
<ulist><item><p><var>D</var>   when
<phrase dg="dt3"><var>da</var>'s </phrase><pfref ref="vp-dt-timezone"/>
is <pt>absent</pt>, and</p></item><item><p><var>D</var> &amp;
<pfref ref="f-tzCanFragMap"/>(<var><!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3">da</phrase></var>'s <pfref ref="vp-dt-timezone"/>)  
otherwise.</p></item></ulist>
</algorithm></funcdef></defset><defset id="defs-gYearMonthCanmap" dg="dt3"><head>Canonical Mapping</head><funcdef><name id="vp-gYearMonthCanRep">gYearMonthCanonicalMap</name><nt def="nt-gYearMonthRep"/><limits>matches <nt def="nt-gYearMonthRep"/></limits><args><arg><var>ym</var><limits>a complete <dtref ref="gYearMonth"/> value</limits></arg></args><summary>Maps a <dtref ref="gYearMonth"/> value to a <nt def="nt-gYearMonthRep"/>.</summary><varsetup>
<var>YM</var> be 
<pfref ref="f-yrCanFragMap"/>(<var>ym</var>'s <pfref ref="vp-dt-year"/>) &amp;
<string>-</string> &amp;
<pfref ref="f-moCanFragMap"/>(<var>ym</var>'s <pfref ref="vp-dt-month"/>) .
</varsetup><algorithm>Return
<ulist><item><p><var>YM</var>   when <var>ym</var>'s <pfref ref="vp-dt-timezone"/>
is <pt>absent</pt>, and</p></item><item><p><var>YM</var> &amp;
<pfref ref="f-tzCanFragMap"/>(<var>ym</var>'s <pfref ref="vp-dt-timezone"/>)  
otherwise.</p></item></ulist>
</algorithm></funcdef></defset><defset id="defs-gYearCanmap" dg="dt3"><head>Canonical Mapping</head><funcdef><name id="vp-gYearCanRep">gYearCanonicalMap</name><nt def="nt-gYearRep"/><limits>matches <nt def="nt-gYearRep"/></limits><args><arg><var>gY</var><limits>a complete <dtref ref="gYear"/> value</limits></arg></args><summary>Maps a <dtref ref="gYear"/> value to a <nt def="nt-gYearRep"/>.</summary><algorithm>Return
<ulist><item><p><pfref ref="f-yrCanFragMap"/>(<var>gY</var>'s <pfref ref="vp-dt-year"/>)  
when <var>gY</var>'s <pfref ref="vp-dt-timezone"/>
is <pt>absent</pt>, and</p></item><item><p><pfref ref="f-yrCanFragMap"/>(<var>gY</var>'s <pfref ref="vp-dt-year"/>) &amp;
<pfref ref="f-tzCanFragMap"/>(<var>gY</var>'s <pfref ref="vp-dt-timezone"/>)  
otherwise.</p></item></ulist></algorithm></funcdef></defset><defset id="defs-gMonthDayCanmap" dg="dt3"><head>Canonical Mapping</head><funcdef><name id="vp-gMonthDayCanRep">gMonthDayCanonicalMap</name><nt def="nt-gMonthDayRep"/><limits>matches <nt def="nt-gMonthDayRep"/></limits><args><arg><var>md</var><limits>a complete <dtref ref="gMonthDay"/> value</limits></arg></args><summary>Maps a <dtref ref="gMonthDay"/> value to a <nt def="nt-gMonthDayRep"/>.</summary><varsetup>
<var>MD</var> be  <string>--</string> &amp;
<pfref ref="f-moCanFragMap"/>(<var>md</var>'s <pfref ref="vp-dt-month"/>) &amp;
<string>-</string> &amp;
<pfref ref="f-daCanFragMap"/>(<var>md</var>'s <pfref ref="vp-dt-day"/>) .
</varsetup><algorithm>Return
<ulist><item><p><var>MD</var>   when <var>md</var>'s <pfref ref="vp-dt-timezone"/>
is <pt>absent</pt>, and</p></item><item><p><var>MD</var> &amp;
<pfref ref="f-tzCanFragMap"/>(<var>md</var>'s <pfref ref="vp-dt-timezone"/>)  
otherwise.</p></item></ulist>
</algorithm></funcdef></defset><defset id="defs-gDayCanmap"><head>Canonical Mapping</head><funcdef><name id="vp-gDayCanRep">gDayCanonical<!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">Map</phrase></name><nt def="nt-gDayRep"/><limits>matches <nt def="nt-gDayRep"/></limits><args><arg><var>gD</var><limits>a complete <dtref ref="gDay"/> value</limits></arg></args><summary>Maps a <dtref ref="gDay"/> value to a <nt def="nt-gDayRep"/>.</summary><algorithm>Return
<ulist><item><p><string>---</string> &amp;
<pfref ref="f-daCanFragMap"/>(<phrase dg="dt3"><var>gD</var>'s </phrase><pfref ref="vp-dt-day"/>)  
when
<phrase dg="dt3"><var>gD</var>'s </phrase><pfref ref="vp-dt-timezone"/>
is <pt>absent</pt>, and</p></item><item><p><string>---</string> &amp;
<pfref ref="f-daCanFragMap"/>(<!--*
* material suppressed here by diff group dt3 *
*--><phrase dg="dt3"><var>gD</var>'s <pfref ref="vp-dt-day"/></phrase>) &amp;
<pfref ref="f-tzCanFragMap"/>(<phrase dg="wdd"><var>gD</var>'s </phrase><pfref ref="vp-dt-timezone"/>)  
otherwise.</p></item></ulist></algorithm></funcdef></defset><defset id="defs-gMonthCanmap" dg="dt3"><head>Canonical Mapping</head><funcdef><name id="vp-gMonthCanRep">gMonthCanonicalMap</name><nt def="nt-gMonthRep"/><limits>matches <nt def="nt-gMonthRep"/></limits><args><arg><var><!--*
* material suppressed here by diff group dt4 *
*--><phrase dg="dt4">gM</phrase></var><limits>a complete <dtref ref="gMonth"/> value</limits></arg></args><summary>Maps a <dtref ref="gMonth"/> value to a <nt def="nt-gMonthRep"/>.</summary><algorithm>Return
<ulist><item><p><string>--</string> &amp;
<pfref ref="f-moCanFragMap"/>(<var><!--*
* material suppressed here by diff group dt4 *
*--><phrase dg="dt4">gM</phrase></var>'s <pfref ref="vp-dt-day"/>)  
when
<var><!--*
* material suppressed here by diff group dt4 *
*--><phrase dg="dt4">gM</phrase></var>'s <pfref ref="vp-dt-timezone"/> 
is <pt>absent</pt>, and</p></item><item><p><string>--</string> &amp;
<pfref ref="f-moCanFragMap"/>(<var><!--*
* material suppressed here by diff group dt4 *
*--><phrase dg="dt4">gM</phrase></var>'s <pfref ref="vp-dt-day"/>) &amp;
<pfref ref="f-tzCanFragMap"/>(<var><!--*
* material suppressed here by diff group dt4 *
*--><phrase dg="dt4">gM</phrase></var>'s <pfref ref="vp-dt-timezone"/>)  
otherwise.</p></item></ulist></algorithm></funcdef></defset></div3></div2><div2 id="sec-misc-lexmaps" dg="moreFunctions"><head>Lexical and Canonical Mappings for Other Datatypes</head><p>The following functions are used with various datatypes neither numeric
nor date/time related.</p><!--*
* material suppressed here by diff group context *
*--><!--*
* material suppressed here by diff group context *
*--><defset id="defs-stringLexmap" dg="rq21-string"><head>Lexical Mapping</head><funcdef><name id="f-stringLexmap">stringLexicalMap</name><dtref ref="string"/><limits>A <dtref ref="string"/> value</limits><args><arg><var>LEX</var><limits>a <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase></phrase> matching
<nt def="nt-stringRep"/></limits></arg></args><summary>Maps a <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase></phrase> matching the
<nt def="nt-stringRep"/> production to
a <dtref ref="string"/> value.</summary><algorithm>Return <var>LEX</var>.  (The function is the identity
function on the domain.)</algorithm></funcdef></defset><defset id="defs-booleanLexmap" dg="rq21-boolean"><head>Lexical Mapping</head><funcdef><name id="f-booleanLexmap">booleanLexicalMap</name><dtref ref="boolean"/><limits>A <dtref ref="boolean"/> value</limits><args><arg><var>LEX</var><limits>a <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase></phrase> matching
<nt def="nt-booleanRep"/></limits></arg></args><summary>Maps a <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase></phrase> matching the
<nt def="nt-booleanRep"/> production to
a <dtref ref="boolean"/> value.</summary><algorithm>Return
<ulist><item><p><pt>true</pt>   when <var>LEX</var> is <string>true</string>
or <string>1</string> , and</p></item><item><p><pt>false</pt>   otherwise (<var>LEX</var> is <string>false</string>
or <string>0</string>).</p></item></ulist>
</algorithm></funcdef></defset><defset id="defs-stringCanmap" dg="rq21-string"><head>Canonical Mapping</head><funcdef><name id="f-stringCanmap">stringCanonicalMap</name><nt def="nt-stringRep"/><limits>matches <nt def="nt-stringRep"/></limits><args><arg><var>s</var><limits>a <dtref ref="string"/> value</limits></arg></args><summary>Maps a <dtref ref="string"/> value  to
a <nt def="nt-stringRep"/>.</summary><algorithm>Return <var>s</var>.  (The function is the identity
function on the domain.)</algorithm></funcdef></defset><defset id="defs-booleanCanmap" dg="rq21-boolean"><head>Canonical Mapping</head><funcdef><name id="f-booleanCanmap">booleanCanonicalMap</name><nt def="nt-booleanRep"/><limits>matches <nt def="nt-booleanRep"/></limits><args><arg><var>b</var><limits>a <dtref ref="boolean"/> value</limits></arg></args><summary>Maps a <dtref ref="boolean"/> value  to
a <nt def="nt-booleanRep"/>.</summary><algorithm>Return
<ulist><item><p><string>true</string>   when <var>b</var> is <pt>true</pt>, and</p></item><item><p><string>false</string>   otherwise (<var>b</var> is <pt>false</pt>).</p></item></ulist>
</algorithm></funcdef></defset><div3 id="sec-hexbin-lexmaps" dg="b1910-hexbin"><head>Lexical and canonical mappings for <dtref ref="hexBinary"/></head><p>The <termref def="dt-lexical-mapping"/> for <dtref ref="hexBinary"/>
maps each pair of hexadecimal digits to an octet, in the conventional way:</p><defset id="defs-hexBinaryLexmap"><head>Lexical Mapping for hexBinary</head><funcdef><name id="f-hexBinaryMap">hexBinaryMap</name><dtref ref="hexBinary"/><limits>A sequence of binary octets in the form of a <dtref ref="hexBinary"/> value</limits><args><arg><var>LEX</var><limits>a <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase></phrase> matching
<nt def="nt-hexBinary"/></limits></arg></args><summary>Maps a <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase></phrase> matching the
<nt def="nt-hexBinary"/> production to
a sequence of octets in the form of a <dtref ref="hexBinary"/> value.</summary><argsetup><var>LEX</var> necessarily includes a sequence of zero or more
substrings matching the <nt def="nt-hexOctet"/> production.</argsetup><varsetup><var>o</var> be the sequence of octets formed by applying
<pfref ref="f-hexOctetMap"/> to each <nt def="nt-hexOctet"/> in 
<var>LEX</var>, in order, and concatenating the results.</varsetup><algorithm>Return <var>o</var>.
</algorithm></funcdef></defset><p>The auxiliary functions 
<pfref ref="f-hexOctetMap"/> and 
<pfref ref="f-hexDigitMap"/> are used by 
<pfref ref="f-hexBinaryMap"/>.</p><defset id="defs-hexBinaryAux" role="aux"><head>Mappings for hexadecimal digits</head><funcdef><name id="f-hexOctetMap">hexOctetMap</name><phrase>octet</phrase><limits>A single binary octet</limits><args><arg><var>LEX</var><limits>a <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase></phrase> matching
<nt def="nt-hexOctet"/></limits></arg></args><summary>Maps a <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase></phrase> matching the
<nt def="nt-hexOctet"/> production to
a single octet.</summary><argsetup><var>LEX</var> necessarily includes exactly two hexadecimal digits.</argsetup><varsetup><var>d0</var> be the first hexadecimal digit in <var>LEX</var>.
Let <var>d1</var> be the second hexadecimal digit in <var>LEX</var>.</varsetup><algorithm>Return the octet whose four high-order bits are <pfref ref="f-hexDigitMap"/>(<var>d0</var>) and whose four low-order bits
are <pfref ref="f-hexDigitMap"/>(<var>d1</var>).
</algorithm></funcdef><funcdef><name id="f-hexDigitMap">hexDigitMap</name><phrase>a bit-sequence of length four</phrase><limits>a sequence of four binary digits</limits><args><arg><var>d</var><limits>a hexadecimal digit</limits></arg></args><summary>Maps a hexadecimal digit (a character matching
the <nt def="nt-hexDigit"/> production) to
a sequence of four binary digits.</summary><algorithm>Return
<ulist><item><p>0000 when <var>d</var> = <string>0</string>,</p></item><item><p>0001 when <var>d</var> = <string>1</string>,</p></item><item><p>0010 when <var>d</var> = <string>2</string>,</p></item><item><p>0011 when <var>d</var> = <string>3</string>,</p></item><item><p>...</p></item><item><p>1110 when <var>d</var> = <string>E</string> or <string>e</string>,</p></item><item><p>1111 when <var>d</var> = <string>F</string> or <string>f</string>.</p></item></ulist>
</algorithm></funcdef></defset><p>The <termref def="dt-canonical-mapping"/> for <dtref ref="hexBinary"/> uses only the
uppercase forms of A-F.</p><defset id="defs-hexBinaryCanmap"><head>Canonical Mapping for hexBinary</head><funcdef><name id="f-hexBinaryCanonical">hexBinaryCanonical</name><nt def="nt-hexBinary"/><limits>matches <nt def="nt-hexBinary"/></limits><args><arg><var>o</var><limits>a <dtref ref="hexBinary"/> value</limits></arg></args><summary>Maps a <dtref ref="hexBinary"/> value to a literal
matching the <nt def="nt-hexBinary"/> production.</summary><varsetup><var>h</var> be the sequence of literals formed by applying
<pfref ref="f-hexOctetCanonical"/> to each octet in 
<var>o</var>, in order, and concatenating the results.</varsetup><algorithm>Return <var>h</var>.
</algorithm></funcdef></defset><defset role="aux"><head>Auxiliary procedures for canonical mapping of <dtref ref="hexBinary"/></head><funcdef><name id="f-hexOctetCanonical">hexOctetCanonical</name><nt def="nt-hexOctet"/><limits>matches <nt def="nt-hexOctet"/></limits><args><arg><var>o</var><limits>a binary octet</limits></arg></args><summary>Maps a binary octet to a literal
matching the <nt def="nt-hexOctet"/> production.</summary><varsetup><var>lo</var> be the four low-order bits of <var>o</var>,
and <var>hi</var> be the four high-order bits.</varsetup><algorithm>Return <pfref ref="f-hexDigitCanonical"/>(<var>hi</var>) &amp;
<pfref ref="f-hexDigitCanonical"/>(<var>lo</var>).
</algorithm></funcdef><funcdef><name id="f-hexDigitCanonical">hexDigitCanonical</name><nt def="nt-hexDigit"/><limits>matches <nt def="nt-hexDigit"/></limits><args><arg><var><!--*
* material suppressed here by diff group b13749 *
*--><phrase dg="b13749">d</phrase></var><limits>a sequence of four binary digits</limits></arg></args><summary>Maps a four-bit sequence to a hexadecimal
digit (a literal
matching the <nt def="nt-hexDigit"/> production).</summary><algorithm>Return 
<ulist><item><p><string>0</string> when <var>d</var> = 0000,</p></item><item><p><string>1</string> when <var>d</var> = 0001,</p></item><item><p><string>2</string> when <var>d</var> = 0010,</p></item><item><p><string>3</string> when <var>d</var> = 0011,</p></item><item><p>...</p></item><item><p><string>E</string> when <var>d</var> = 1110,</p></item><item><p><string>F</string> when <var>d</var> = 1111.</p></item></ulist>
</algorithm></funcdef></defset></div3></div2></div1><div1 id="sec-datatypes-and-facets" role="1.0"><head>Datatypes and Facets<!--*
* material suppressed here by diff group b5150 *
*--></head><div2 role="1.0" id="app-fundamental-facets"><head>Fundamental Facets</head><p>
The following table shows the values of the fundamental facets
for each <termref def="dt-built-in"/> datatype.
</p><fundamental-facets/></div2></div1><!--*
* material suppressed here by diff group dt3 *
*--><!--*
* material suppressed here by diff group dudt *
*--><div1 role="1.0" id="regexs"><head>Regular Expressions<!--*
* material suppressed here by diff group b5150 *
*--></head><!--*
* material suppressed here by diff group ep00dpedn *
*--><p>A <termref def="dt-regex"/> <var>R</var> is a sequence of
characters that denote a
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp">set
of strings</phrase>
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>R</var>)</phrase>. 
When used to constrain a <termref def="dt-lexical-space"/>, a
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp">regular
expression</phrase> <var>R</var> asserts that only strings in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>R</var>)</phrase>
are valid <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase> for values of that type.</p><note role="forceNote"><p>
Unlike some popular regular expression languages (including those
    defined by Perl and standard Unix utilities), the regular
    expression language defined here implicitly anchors all regular
    expressions at the head and tail, as the most common use of
    regular expressions in <phrase dg="ed-pattern"><termref def="dt-pattern"/></phrase><!--*
* material suppressed here by diff group ed-pattern *
*--> is to match entire <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase>.
For example, a datatype <termref def="dt-derived"/> from <dtref ref="string"/> such
that all values must begin with the character
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><string>A</string></phrase>
(#x41) and end with the character
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><string>Z</string></phrase>
(#x5a) would be defined as follows:
</p><eg xml:space="preserve">&lt;simpleType name='myString'&gt;
 &lt;restriction base='string'&gt;
  &lt;pattern value='A.*Z'/&gt;
 &lt;/restriction&gt;
&lt;/simpleType&gt;</eg><p>In regular expression languages that are not implicitly anchored at the head and tail,
it is customary to write the equivalent regular expression as:
<display><code>^A.*Z$</code></display>
where
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><string>^</string></phrase>
anchors the pattern at the head and
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><string>$</string></phrase>
anchors at the tail.</p><p>In those rare cases where an unanchored match is desired, including
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><string>.*</string></phrase>
at the beginning and ending of the regular expression will
achieve the desired results.  For example, a datatype <termref def="dt-derived"/> from string
such that all values must contain at least 3 consecutive
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><string>A</string>
(#x41)</phrase>
characters somewhere within the value could be defined as follows:</p><eg xml:space="preserve">&lt;simpleType name='myString'&gt;
 &lt;restriction base='string'&gt;
  &lt;pattern value='.*AAA.*'/&gt;
 &lt;/restriction&gt;
&lt;/simpleType&gt;</eg></note><div2 id="regex-branch" dg="b8732-restructuring"><head dg="b8732-restructuring">Regular expressions and branches</head><p><termdef id="dt-regex" term="regular expression">A
<term>regular expression</term> is composed from zero or more
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-branch">branches</termref></phrase>,
separated by
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><string>|</string></phrase>
characters.</termdef>

<!--* the following defsets for Lexical Space (commented out) and Regular
    * Expression appeared here for the first time in 1.7.2.328.  They should
    * probably be marked as additions; I'm tentatively marking them so, for
    * safety.
    *-->
<!--
<defset role="prod" diff="add" dg="ep99dp"><head>Lexical Space</head>
<prod id="nt-stringRep">
<lhs>stringRep</lhs>
<rhs><xnt href="&xmlspec;#NT-Char">Char</xnt>*&nbsp; <com>(as defined in &bibref-xml.xx;)</com></rhs>
</prod>
</defset>
-->

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

</p><scrap headstyle="show"><head>Regular Expression</head><prod id="regex"><lhs id="nt-regExp">regExp</lhs><rhs>
			<nt def="nt-branch"/>
			( '|' <nt def="nt-branch"/> )*
		</rhs></prod></scrap><p/><table border="1"><col width="50%" span="1"/><col width="50%" span="1"/><thead><tr><th rowspan="1" colspan="1">For all
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-branch">branches</termref></phrase>
<var>S</var>, and for all
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-regex">regular
expressions</termref></phrase> <var>T</var>, valid
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-regex">regular
expressions</termref></phrase> <var>R</var> are:</th><th rowspan="1" colspan="1">Denoting the set of strings
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>R</var>)</phrase>
containing:</th></tr></thead><tbody><tr><td align="center" rowspan="1" colspan="1">(empty string)</td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*-->just the empty string</td></tr><tr><td align="center" rowspan="1" colspan="1"><var>S</var></td><td align="center" rowspan="1" colspan="1">all strings in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var>)</phrase></td></tr><tr><td align="center" rowspan="1" colspan="1"><var>S</var> <!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>|</code></phrase><var>T</var></td><td align="center" rowspan="1" colspan="1">all strings in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var>)</phrase>
and all strings in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>T</var>)</phrase></td></tr></tbody></table><p><termdef id="dt-branch" term="branch" role="local">A
<term>branch</term> consists of zero or more
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-piece">pieces</termref></phrase>,
concatenated together.</termdef></p><scrap headstyle="show"><head>Branch</head><prod id="branch"><lhs id="nt-branch">branch</lhs><rhs><nt def="nt-piece"/>*</rhs></prod></scrap><p/><table border="1"><col width="50%" span="1"/><col width="50%" span="1"/><thead><tr><th rowspan="1" colspan="1">
For all
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-piece">pieces</termref></phrase>
<var>S</var>, and for all
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-branch">branches</termref></phrase>
<var>T</var>, valid
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-branch">branches</termref></phrase>
<var>R</var> are:
</th><th rowspan="1" colspan="1">Denoting the set of strings
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>R</var>)</phrase>
containing:</th></tr></thead><tbody><tr><td align="center" rowspan="1" colspan="1"><var>S</var></td><td align="center" rowspan="1" colspan="1">all strings in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var>)</phrase></td></tr><tr><td align="center" rowspan="1" colspan="1"><var>S</var><var>T</var></td><td align="center" rowspan="1" colspan="1">all strings
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>s</var><var>t</var></phrase>
with <var>s</var> in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var>)</phrase>
and
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>t</var></phrase>
in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>T</var>)</phrase></td></tr></tbody></table></div2><div2 id="regex-piece" dg="b8732-restructuring"><head dg="b8732-restructuring">Pieces, atoms, quantifiers</head><p><termdef id="dt-piece" term="piece" role="local">
A <term>piece</term> is an
<termref def="dt-atom"/>, possibly followed by a
<termref def="dt-quantifier"/>.
</termdef></p><scrap headstyle="show"><head>Piece</head><prod id="piece"><lhs id="nt-piece">piece</lhs><rhs><nt def="nt-atom"/> <nt def="nt-quantifier"/>?</rhs></prod></scrap><p/><table border="1"><col width="50%" span="1"/><col width="50%" span="1"/><thead><tr><th rowspan="1" colspan="1">For all 
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-atom">atoms</termref></phrase>
<var>S</var> and non-negative
integers
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>n</var></phrase>,
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>m</var></phrase>
such that
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>n</var>
≤ <var>m</var></phrase>, valid
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-piece">pieces</termref></phrase>
<var>R</var> are:</th><th rowspan="1" colspan="1">Denoting the set of strings
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>R</var>)</phrase>
containing:</th></tr></thead><tbody><!--  S  --><tr><td align="center" rowspan="1" colspan="1"><var>S</var></td><td align="center" rowspan="1" colspan="1">all strings in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var>)</phrase></td></tr><!--  S?  --><tr><td align="center" rowspan="1" colspan="1"><var>S</var><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"> <code>?</code></phrase></td><td align="center" rowspan="1" colspan="1">the empty string, and all strings in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var>)</phrase></td></tr><!--  S*  --><tr><td align="center" rowspan="1" colspan="1"><var>S</var> <!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>*</code></phrase></td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp">a</phrase>ll strings in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var> <code>?</code>)</phrase>
and all strings
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>s</var><var>t</var></phrase>
with <var>s</var> in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var> <code>*</code>)</phrase>
and
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>t</var></phrase>
in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var>)</phrase>  
<emph>(all concatenations of zero or more strings from
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var>)</phrase> )</emph></td></tr><!-- S+  --><tr><td align="center" rowspan="1" colspan="1"><var>S</var><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"> <code>+</code></phrase></td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp">a</phrase>ll strings
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>s</var><var>t</var></phrase>
with <var>s</var> in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var>)</phrase>
and
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>t</var></phrase>
in
 <!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var> <code>*</code>)</phrase>  
<emph>(all concatenations of one or more strings from
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var>)</phrase> )</emph></td></tr><!-- S{n,m}  --><tr><td align="center" rowspan="1" colspan="1"><var>S</var><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"> <code>{</code><var>n</var><code>,</code><var>m</var><code>}</code></phrase></td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp">a</phrase>ll strings
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>s</var><var>t</var></phrase>
with <var>s</var> in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var>)</phrase>
and
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>t</var></phrase>
in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var> <code>{</code><var>n</var>−1<code>,</code><var>m</var>−1<code>}</code>)</phrase>
<emph>(<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp">a</phrase>ll
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp">concatenations</phrase>
of at least
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>n</var></phrase>,
and at most
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>m</var></phrase>,
strings from
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var>)</phrase> )</emph></td></tr><!-- S{n}  --><tr><td align="center" rowspan="1" colspan="1"><var>S</var><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"> <code>{</code><var>n</var><code>}</code></phrase></td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp">a</phrase>ll
strings in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var><code>{</code><var>n</var><code>,</code><var>n</var><code>}</code>)</phrase> 
<emph>(<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp">a</phrase>ll
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp">concatenations</phrase>
of exactly
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>n</var></phrase>
strings from
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var>)</phrase> )</emph></td></tr><!-- S{n,}  --><tr><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>S</var> <code>{</code><var>n</var><code>,}</code></phrase></td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp">a</phrase>ll
strings in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var><code>{</code><var>n</var><code>}</code> <var>S</var> <code>*</code>) </phrase>
<emph>(<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp">a</phrase>ll
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp">concatenations</phrase>
of at least
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>n</var></phrase>
strings from
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var>)</phrase> )</emph></td></tr><!-- S{0,m} --><tr><td align="center" rowspan="1" colspan="1"><var>S</var><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code> {0,</code><var>m</var><code>}</code></phrase></td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp">a</phrase>ll strings
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>s</var><var>t</var></phrase>
with <var>s</var> in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var> <code>?</code>)</phrase>
and
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>t</var></phrase>
in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var> <code>{</code>0<code>,</code><var>m</var>−1<code>}</code>)</phrase>. 
<emph>(<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp">a</phrase>ll
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp">concatenations</phrase>
of at most
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>m</var></phrase>
strings from
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var>)</phrase> )</emph></td></tr><!--  S{0,0}  --><tr><td align="center" rowspan="1" colspan="1"><var>S</var><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"> <code>{0,0}</code></phrase></td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*-->only the empty string</td></tr></tbody></table><note><p>The regular expression language in the Perl Programming Language
<bibref ref="Perl"/> does not include a quantifier of the form 
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>S</var> </phrase><code>{,</code><var>m</var><code>}</code> ,
since it is logically equivalent to
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>S</var> </phrase><code>{0,</code><var>m</var><code>}</code> . 
We have, therefore, left this logical possibility out of the regular
expression language defined by this specification.</p></note><p><termdef id="dt-quantifier" term="quantifier" role="local">A
<term>quantifier</term> is one of
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><string>?</string>,
<string>*</string>, or <string>+</string>, or a string of the form 
<code>{</code><var>n</var><code>,</code><var>m</var><code>}</code> 
or  <code>{</code><var>n</var><code>,}</code> ,</phrase> 
which have the meanings
defined in the table above.
</termdef>
</p><scrap headstyle="show"><head>Quantifier</head><prod id="quant"><lhs id="nt-quantifier">quantifier</lhs><rhs>[?*+] | ( '{' <nt def="nt-quantity"/> '}' )</rhs></prod><prod id="quantity"><lhs id="nt-quantity">quantity</lhs><rhs><nt def="nt-quantRange"/> |
			<nt def="nt-quantMin"/> | <nt def="nt-QuantExact"/></rhs></prod><prod id="quantRange"><lhs id="nt-quantRange">quantRange</lhs><rhs><nt def="nt-QuantExact"/> ',' <nt def="nt-QuantExact"/></rhs></prod><prod id="quantMin"><lhs id="nt-quantMin">quantMin</lhs><rhs><nt def="nt-QuantExact"/> ','</rhs></prod><prod id="quantExact"><lhs id="nt-QuantExact">QuantExact</lhs><rhs>[0-9]+</rhs></prod></scrap><p>
<termdef id="dt-atom" term="atom" role="local">
An <term>atom</term> is either a
<termref def="dt-normalc"/>, a <termref def="dt-charclass"/>, or
a parenthesized <termref def="dt-regex"/>.</termdef>
</p><scrap headstyle="show"><head>Atom</head><prod id="atom"><lhs id="nt-atom">atom</lhs><rhs><!--*
* material suppressed here by diff group b5322 *
*--><phrase dg="b5322"><nt def="nt-NormalChar"/></phrase> |
			<nt def="nt-charClass"/> | ( '('
			<nt def="nt-regExp"/> ')' )</rhs></prod></scrap><p/><table border="1"><col width="50%" span="1"/><col width="50%" span="1"/><thead><tr><th rowspan="1" colspan="1">
For all
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-normalc">normal
characters</termref></phrase>
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>c</var></phrase>,
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-charclass">character
classes</termref></phrase> <var>C</var>, and
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-regex">regular
expressions</termref></phrase> <var>S</var>, valid
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-atom">atoms</termref></phrase>
<var>R</var> are:
</th><th rowspan="1" colspan="1">Denoting the set of strings
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>R</var>)</phrase>
containing:</th></tr></thead><tbody><!--  c  --><tr><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>c</var></phrase></td><td align="center" rowspan="1" colspan="1">the single string consisting only of 
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>c</var></phrase></td></tr><!--  C  --><tr><td align="center" rowspan="1" colspan="1"><var>C</var></td><td align="center" rowspan="1" colspan="1">all strings in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>C</var>)</phrase></td></tr><!--  S  --><tr><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>(</code> <var>S</var> <code>)</code></phrase></td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>S</var>)</phrase></td></tr></tbody></table></div2><div2 id="regex-char-metachar" dg="b8732-restructuring"><head dg="b8732-restructuring">Characters and metacharacters</head><p><termdef id="dt-metac" term="metacharacter" role="local">A
<term>metacharacter</term> is either
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><string>.</string>,
<string>\</string>, <string>?</string>, <string>*</string>,
<string>+</string>, <string>{</string>, <string>}</string>,
<string>(</string>, <string>)</string><phrase dg="metachar-2531">,
<string>|</string></phrase>,
<string>[</string><phrase dg="metachar-2531">,</phrase>
or <string>]</string></phrase>. 
These characters have special meanings in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-regex">regular
expressions</termref></phrase>, but can be escaped to form
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-atom">atoms</termref></phrase>
that denote the sets of strings containing only themselves, i.e., an escaped
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><term>metacharacter</term></phrase>
behaves like a <termref def="dt-normalc"/>.</termdef></p><p><termdef id="dt-normalc" term="normal character" role="local">A
<term>normal character</term> is any XML character that is not a
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-metac"/></phrase>. 
In
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-regex">regular
expressions</termref></phrase>, a <!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><term>normal
character</term></phrase> is an
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-atom"/></phrase>
that denotes the singleton set of strings containing only itself.</termdef></p><scrap headstyle="show"><head>Normal Character</head><!--*
* material suppressed here by diff group b5322 *
*--><prod id="char" dg="b5322"><lhs id="nt-NormalChar">NormalChar</lhs><rhs>[^.\?*+<phrase dg="metachar-2531">{}</phrase>()|#x5B#x5D]</rhs><com><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"> N.B.:  #x5B = <string>[</string>,
#x5D = <string>]</string> </phrase></com></prod></scrap><!--*
* material suppressed here by diff group b5431 *
*--><!--*
* material suppressed here by diff group b5431-x *
*--></div2><div2 id="charcter-classes"><head>Character Classes</head><p><termdef id="dt-charclass" term="character class" role="local">A
<term>character class</term> is an <termref def="dt-atom"/>
<var>R</var> that identifies a
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp">set
of characters</phrase>
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>C</emph>(<var>R</var>)</phrase>. 
The set of strings
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>L</emph>(<var>R</var>)</phrase>. 
denoted by a character class <var>R</var> contains one single-character
string "<var>c</var>" for each character <var>c</var> in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>C</emph>(<var>R</var>)</phrase>.</termdef>
<phrase id="anchor11125c"/>
</p><scrap headstyle="show"><head>Character Class</head><prod id="charClass"><lhs id="nt-charClass">charClass</lhs><rhs>
		  <phrase dg="b11125"><nt def="nt-SingleCharEsc"/> |</phrase>
			<nt def="nt-charClassEsc"/> |
			<nt def="nt-charClassExpr"/> |
			<nt def="nt-WildcardEsc"/>
		</rhs></prod></scrap><p>A character class is either 
<phrase dg="b11125">a <termref def="dt-cces1"/> or</phrase>
a <termref def="dt-cces"/> or a
<termref def="dt-charexpr"/><phrase dg="b1889"> or
a <!--*
* material suppressed here by diff group ep26 *
*--><phrase dg="ep26"><termref def="dt-wcchar"/></phrase></phrase>.</p><note dg="b5431"><p>The rules for which characters must be escaped and which
can represent themselves are different when inside a
<termref def="dt-charexpr"/>; some
<termref def="dt-normalc">normal characters</termref>
must be escaped and some
<termref def="dt-metac">metacharacters</termref> need
not be.</p></note><div3 id="charclassexps" dg="b8732-restructuring"><head dg="b8732-restructuring">Character class expressions</head><p><termdef id="dt-charexpr" term="character class expression" role="local">A
<term>character class expression</term>
<phrase dg="b1889">(<nt def="nt-charClassExpr"/>)</phrase>
is a <termref def="dt-chargroup"/> surrounded by
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><string>[</string></phrase>
and
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><string>]</string></phrase>
characters.  For all character groups
<var>G</var>,<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"> 
<code>[</code> <var>G</var> <code>]</code> </phrase>
is a valid <term>character class
expression</term>, identifying the set of characters
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>C</emph>(<code>[</code><var>G</var><code>]</code>)</phrase> 
= <!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>C</emph></phrase>(<var>G</var>).</termdef></p><scrap headstyle="show"><head>Character Class Expression</head><prod id="charClassExpr"><lhs id="nt-charClassExpr">charClassExpr</lhs><rhs>'[' <nt def="nt-charGroup"/> ']'</rhs></prod></scrap><p>
<termdef id="dt-chargroup" term="character group" role="local">
A
<term>character group</term> <!--*
* material suppressed here by diff group b1889 *
*--><phrase dg="b1889">(<nt def="nt-charGroup"/>) starts 
with</phrase> either a 
<termref def="dt-poschargroup"/><!--*
* material suppressed here by diff group b1889 *
*--><phrase dg="b1889"> or</phrase>
a <termref def="dt-negchargroup"/><!--*
* material suppressed here by diff group b1889 *
*--><phrase dg="b1889">,
and is optionally followed by a subtraction operator <string>-</string>
and a further <termref def="dt-charexpr"/></phrase>.</termdef> 
<termdef id="dt-ccsub" term="character class subtraction" dg="b1889">A
<termref def="dt-chargroup"/> that contains a subtraction operator
is referred to as a <term>character class subtraction</term>.</termdef>
</p><!--*
* material suppressed here by diff group b7756edn *
*--><scrap headstyle="show"><head>Character Group</head><prod id="chargroup"><lhs id="nt-charGroup">charGroup</lhs><rhs><phrase dg="b1889"><!--*
* material suppressed here by diff group b7756 *
*-->(<!--*
* material suppressed here by diff group b7756 *
*--></phrase>
			<nt def="nt-posCharGroup"/> |
			<nt def="nt-negCharGroup"/><phrase dg="b1889">
      <!--*
* material suppressed here by diff group b7756 *
*-->)<!--*
* material suppressed here by diff group b7756 *
*--></phrase>
			<!--*
* material suppressed here by diff group b1889 *
*-->
                     <phrase dg="b1889">
                        ( '-' <nt def="nt-charClassExpr"/> )?
                     </phrase>
		</rhs></prod></scrap><p dg="b1889">If the first character in a 
<nt def="nt-charGroup"/> is <string>^</string>, this is 
taken as indicating that the <nt def="nt-charGroup"/>
starts with a <nt def="nt-negCharGroup"/>. 
A <nt def="nt-posCharGroup"/> 
can itself start with <string>^</string> but only when it 
appears within a <nt def="nt-negCharGroup"/>, that is, when the 
<string>^</string> is preceded by another <string>^</string>.</p><note dg="b1889b"><p>For example, the string
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><string>[^X]</string></phrase>
is ambiguous according the grammar rules, denoting either
a character class consisting of a negative character group
with
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><string>X</string></phrase>
as a member, or 
a positive character class with
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><string>X</string></phrase>
and
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><string>^</string></phrase>
as members.  The
normative prose rule just given requires that the
first interpretation be taken.</p><p>The string
	      <!--*
* material suppressed here by diff group b11859 *
*-->
	      <phrase dg="b11859"><string>[^]</string></phrase>
		is unambiguous:  the grammar recognizes it as 
		<phrase dg="b11859">a character class expression
		  containing</phrase>
		a positive
		character group containing <phrase dg="b11859">just</phrase>
		the character
		<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><string>^</string></phrase>. 
		But the grammatical derivation of the string violates
		the rule just given, so the string
		<!--*
* material suppressed here by diff group b11859 *
*--><phrase dg="b11859"><string>[^]</string></phrase>
		<rfc2119>must not</rfc2119> be accepted as a regular expression.</p></note><p dg="b1889">A <string>-</string> character
is recognized as a subtraction operator 
(and hence, as terminating the <nt def="nt-posCharGroup"/> or 
<nt def="nt-negCharGroup"/>) if it is immediately followed by a <string>[</string> 
character.</p><p dg="b1889"> For any <termref def="dt-poschargroup"/>
or <termref def="dt-negchargroup"/> <var>G</var>, and any
<termref def="dt-charexpr"/>
<var>C</var>,<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"> 
<var>G</var> <code>-</code> <var>C</var> </phrase> is a valid
<termref def="dt-chargroup"/>, identifying the set of all characters in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>C</emph>(<var>G</var>)</phrase>
that are not in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>C</emph>(<var>C</var>)</phrase>.</p><p><termdef id="dt-poschargroup" term="positive character group" role="local">A
<term>positive character group</term> consists of one or more
<!--*
* material suppressed here by diff group b1889 *
*--><phrase dg="b1889">
<termref def="dt-cgpart">character group parts</termref></phrase>, concatenated
together.  <!--*
* material suppressed here by diff group b1889 *
*--><phrase dg="b1889">The
set of characters identified by a</phrase> <term>positive character group</term> 
<!--*
* material suppressed here by diff group b1889 *
*--><phrase dg="b1889">is
the union of</phrase> all of the sets identified
by its constituent <!--*
* material suppressed here by diff group b1889 *
*--><phrase dg="b1889"><termref def="dt-cgpart">character group 
parts</termref></phrase>.</termdef></p><scrap headstyle="show"><head>Positive Character Group</head><prod id="poschargroup"><lhs id="nt-posCharGroup">posCharGroup</lhs><rhs>
			(
			<!--*
* material suppressed here by diff group b1889 *
*-->
			<phrase dg="b1889">
			<nt def="nt-charGroupPart"/>
			</phrase>
			)+
		</rhs></prod></scrap><p/><table border="1"><col width="50%" span="1"/><col width="50%" span="1"/><thead><tr><th rowspan="1" colspan="1">
For all 
<!--*
* material suppressed here by diff group ep26 *
*-->
<phrase dg="ep26"><termref def="dt-charrange">character
ranges</termref></phrase>
<var>R</var>, all
<!--*
* material suppressed here by diff group ep26 *
*-->
<phrase dg="ep26"><termref def="dt-cces">character class
escapes</termref></phrase> 
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>E</var></phrase>,
and all
<!--*
* material suppressed here by diff group ep26 *
*--> 
<phrase dg="ep26"><termref def="dt-poschargroup">positive character groups</termref></phrase> 
<var>P</var>, valid
<!--*
* material suppressed here by diff group ep26 *
*--> 
<phrase dg="ep26"><termref def="dt-poschargroup">positive
charater groups</termref></phrase> 
<var>G</var> are:
</th><th rowspan="1" colspan="1">
Identifying the set of characters
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>C</emph>(<var>G</var>)</phrase>
containing:
</th></tr></thead><tbody><!--  R  --><tr><td align="center" rowspan="1" colspan="1"><var>R</var></td><td align="center" rowspan="1" colspan="1">all characters in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>C</emph>(<var>R</var>)</phrase></td></tr><!--  E  --><tr><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>E</var></phrase></td><td align="center" rowspan="1" colspan="1">all characters in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>C</emph>(<var>E</var>)</phrase></td></tr><!--  RP  --><tr><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>R</var><var>P</var></phrase></td><td align="center" rowspan="1" colspan="1">all characters in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>C</emph>(<var>R</var>)</phrase>
and all characters in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>C</emph>(<var>P</var>)</phrase></td></tr><!--  EP  --><tr><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>E</var><var>P</var></phrase></td><td align="center" rowspan="1" colspan="1">all characters in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>C</emph>(<var>E</var>)</phrase>
and all characters in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>C</emph>(<var>P</var>)</phrase></td></tr></tbody></table><p><termdef id="dt-negchargroup" term="negative character group" role="local">A
<term>negative character group</term> 
<phrase dg="b1889">(<nt def="nt-negCharGroup"/>)</phrase>
<!--*
* material suppressed here by diff group b1889 *
*--><phrase dg="b1889">consists of a</phrase> 
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><string>^</string></phrase>
character<phrase dg="b1889">
followed by a <termref def="dt-poschargroup"/></phrase>.
<!--*
* material suppressed here by diff group b1889 *
*--><phrase dg="b1889">The set of characters identified by
a negative character group</phrase>
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>C</emph>(<code>^</code><var>P</var>)</phrase>
<!--*
* material suppressed here by diff group b1889 *
*--><phrase dg="b1889">is
the set of</phrase> all <!--*
* material suppressed here by diff group b1889 *
*--> 
characters that are <emph>not</emph> in
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>C</emph>(<var>P</var>)</phrase>.</termdef></p><scrap headstyle="show"><head>Negative Character Group</head><prod id="negchargroup"><lhs id="nt-negCharGroup">negCharGroup</lhs><rhs>'^' <nt def="nt-posCharGroup"/></rhs></prod></scrap><!--*
* material suppressed here by diff group b1889 *
*--><!--*
* material suppressed here by diff group b1889 *
*--><!--*
* material suppressed here by diff group b1889 *
*--><p dg="b1889"><termdef id="dt-cgpart" term="character group part">A
<term>character group part</term> (<nt def="nt-charGroupPart"/>) is 
<!--*
* material suppressed here by diff group b1889b *
*--><phrase dg="b1889b">any
of:</phrase> 
a single unescaped character
(<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><nt def="nt-SingleCharNoEsc"/></phrase>),
a single escaped character
(<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><nt def="nt-SingleCharEsc"/></phrase>), 
<phrase dg="b1889b">a character class escape
(<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><nt def="nt-charClassEsc"/></phrase>),</phrase>
or a character range
(<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><nt def="nt-charRange"/></phrase>).</termdef>
<phrase id="anchor11125a"/>
</p><!--*
* material suppressed here by diff group b7758edn *
*--><scrap dg="b1889" headstyle="show"><head>Character Group Part</head><prod id="charGroupPart"><lhs id="nt-charGroupPart">charGroupPart</lhs><rhs><nt def="nt-singleChar"/> 
      | <nt def="nt-charRange"/>
      <phrase dg="b1889b"> |
      <!--*
* material suppressed here by diff group b7758 *
*--><phrase dg="b7758"><nt def="nt-charClassEsc"/></phrase>
      </phrase>
    </rhs></prod><prod id="singleChar"><lhs id="nt-singleChar">singleChar</lhs><rhs><nt def="nt-SingleCharEsc"/> | <nt def="nt-SingleCharNoEsc"/></rhs></prod></scrap><p dg="b1889">If a <nt def="nt-charGroupPart"/> starts with a
<nt def="nt-singleChar"/> and this is immediately followed by a hyphen,
<!--*
* material suppressed here by diff group b11125 *
*--><phrase dg="b11125">then
the following rules apply.</phrase>
	    <olist dg="b11125"><item><p>If the hyphen is immediately followed by <string>[</string>,
then the hyphen is not part of the <nt def="nt-charGroupPart"/>:
instead, it is recognized as a character-class subtraction operator.</p></item><item><p>
		  If the hyphen is immediately followed by <string>]</string>,
then the hyphen is recognized as a <nt def="nt-singleChar"/> and
is part of the <nt def="nt-charGroupPart"/>.
		</p></item><item><p>
		  If the hyphen is immediately followed by <string>-[</string>,
then the hyphen is recognized as a <nt def="nt-singleChar"/> and
is part of the <nt def="nt-charGroupPart"/>.
		</p></item><item><p>
		  Otherwise, the hyphen <rfc2119>must</rfc2119> be immediately followed by some 
<nt def="nt-singleChar"/> other than a hyphen.  In this case
the hyphen is not part of the <nt def="nt-charGroupPart"/>;
instead it is recognized, together with the immediately
preceding and following instances of <nt def="nt-singleChar"/>,
as a <nt def="nt-charRange"/>.</p></item><item><p>
		  If the hyphen is followed by any other character sequence, 
then the string in which it occurs 
is not recognized as a regular expression.
		</p></item></olist>
<!--* why on earth forbid ranges that begin or end with unescaped hyphen? *-->
It is an error if either of the two
<nt def="nt-singleChar"/>s in a 
<nt def="nt-charRange"/> is a 
<nt def="nt-SingleCharNoEsc"/> comprising an unescaped hyphen.
</p><note dg="b1889b"><p>The rule just given resolves what would otherwise 
be the ambiguous 
<phrase diff="del" dg="ep35">interpretion</phrase><phrase diff="add" dg="ep35">interpretation</phrase>
of some strings, e.g.
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><string>[a-k-z]</string></phrase>;
it also constrains regular expressions in ways
not expressed in the grammar.  For example, the
rule (not the grammar) excludes the string
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><string>[--z]</string></phrase>
from the
regular expression language defined here.</p></note><p><termdef id="dt-charrange" term="character range" role="local">A
<term>character range</term> <var>R</var> identifies a set of
characters
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><emph>C</emph>(<var>R</var>)</phrase>
<!--*
* material suppressed here by diff group b1889 *
*--> 
with UCS code points in a specified range.
</termdef>
</p><scrap headstyle="show"><head>Character Range</head><prod id="charrange"><lhs id="nt-charRange">charRange</lhs><rhs><!--*
* material suppressed here by diff group b1889 *
*-->
		<phrase dg="b1889">
		<nt def="nt-singleChar"/> '-' <nt def="nt-singleChar"/>
		</phrase>
		</rhs></prod><!--*
* material suppressed here by diff group b1889 *
*--><!--*
* material suppressed here by diff group b1889 *
*--><!--*
* material suppressed here by diff group b1889 *
*--><!--* MSM : 2005-02-01 : restore XmlCharIncDash, as per 2E *--><!--*
* material suppressed here by diff group b1889 *
*--></scrap><!--*
* material suppressed here by diff group b1889 *
*--><!--*
* material suppressed here by diff group b1889 *
*--><!--*
* material suppressed here by diff group b1889 *
*--><p><!--* was (erroneously?) diff="add" dg="b1889"> *-->
A <termref def="dt-charrange"/> <!--*
* material suppressed here by diff group b1889 *
*--> in the form<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"> 
<var>s</var><code>-</code><var>e</var>  </phrase><!--*
* material suppressed here by diff group b1889 *
*--><phrase dg="b1889">identifies</phrase>
the set
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp">of</phrase>
<!--*
* material suppressed here by diff group b1889 *
*--> characters
with UCS code points greater than or equal to the code point
of <var>s</var>, but not greater than the code point of
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>e</var></phrase>.</p><!--*
* material suppressed here by diff group b1889 *
*--><!--*
* material suppressed here by diff group b1889 *
*--><!--*
* material suppressed here by diff group b1889 *
*--><scrap dg="b1889" headstyle="show"><head>Single Unescaped Character</head><prod id="SingleCharNoEsc"><lhs id="nt-SingleCharNoEsc">SingleCharNoEsc</lhs><rhs>[^\#x5B#x5D] </rhs><com><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"> N.B.: 
#x5B = <string>[</string>,
#x5D = <string>]</string> </phrase></com></prod></scrap><p dg="b1889">A single unescaped character
(<nt def="nt-SingleCharNoEsc"/>) is any character
except <string>[</string> or <string>]</string>.
There are special rules, described earlier, that
constrain<!--*
* material suppressed here by diff group ep00dp *
*-->
the use of the characters <string>-</string> and
<string>^</string> in order to disambiguate the syntax.</p><p dg="b1889">A single unescaped character
identifies the singleton set of characters containing
that character alone.</p><p dg="b1889">A single escaped character<phrase dg="ep26">
(<nt def="nt-SingleCharEsc"/>)</phrase>, when used within a
character group, identifies the singleton set of characters
containing the character denoted by the
escape (see <specref ref="cces"/>).</p></div3><div3 role="1.0" id="cces"><head>Character Class Escapes</head><p><termdef id="dt-cces" term="character class escape" role="local">A
<term>character class escape</term> is a short sequence of characters
that identifies <phrase dg="ep00dp">a</phrase> predefined
character class.  The valid character class escapes are 
<!--*
* material suppressed here by diff group b11125 *
*--> the
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-ccesN">multi-character escapes</termref></phrase>, and the
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-ccescat">category escapes</termref></phrase> (including the
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-ccesblock">block escapes</termref></phrase>).</termdef>
</p><scrap headstyle="show"><head>Character Class Escape</head><prod id="charclassesc"><lhs id="nt-charClassEsc">charClassEsc</lhs><rhs>
			(<!--*
* material suppressed here by diff group b11125 *
*-->
			<nt def="nt-MultiCharEsc"/> |
			<nt def="nt-catEsc"/> |
			<nt def="nt-complEsc"/>
			)
		</rhs></prod></scrap><div4 id="cces-sce" dg="b8732-restructuring"><head dg="b8732-restructuring">Single-character escapes</head><p><phrase dg="b11125">Closely related to the
character-class escapes are the single-character escapes.</phrase>
<termdef id="dt-cces1" term="single-character escape" role="local">A
<term>single-character escape</term> identifies a set containing
<!--*
* material suppressed here by diff group ep00dp *
*-->only one
character<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp">—</phrase>usually
because that character is difficult or
impossible to write directly into a <termref def="dt-regex"/>.</termdef></p><scrap headstyle="show"><head>Single Character Escape</head><prod id="singlecharesc"><lhs id="nt-SingleCharEsc">SingleCharEsc</lhs><rhs>'\' [nrt\|.?*+(){}#x2D#x5B#x5D#x5E]</rhs><com><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp">N.B.: 
 #x2D = <string>-</string>, #x5B = <string>[</string>, #x5D =
 <string>]</string>, #x5E = <string>^</string></phrase></com></prod></scrap><p/><table border="1"><col width="50%" span="1"/><col width="50%" span="1"/><thead><tr><th rowspan="1" colspan="1">The valid
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><termref def="dt-cces1">single
character escapes</termref> <var>R</var></phrase> are:</th><th rowspan="1" colspan="1">Identifying the set of characters
<!--*
* material suppressed here by diff group ep00dp *
*--><!--*
* material suppressed here by diff group ep00dp *
*-->
containing:</th></tr></thead><tbody><tr><td align="center" rowspan="1" colspan="1"><code>\n</code></td><td align="center" rowspan="1" colspan="1">the newline character (#xA)</td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\r</code></td><td align="center" rowspan="1" colspan="1">the return character (#xD)</td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\t</code></td><td align="center" rowspan="1" colspan="1">the tab character (#x9)</td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\\</code></td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>\</code></phrase></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\|</code></td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>|</code></phrase></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\.</code></td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>.</code></phrase></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\-</code></td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>-</code></phrase></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\^</code></td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>^</code></phrase></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\?</code></td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>?</code></phrase></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\*</code></td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>*</code></phrase></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\+</code></td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>+</code></phrase></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\{</code></td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>{</code></phrase></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\}</code></td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>}</code></phrase></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\(</code></td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>(</code></phrase></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\)</code></td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>)</code></phrase></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\[</code></td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>[</code></phrase></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\]</code></td><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>]</code></phrase></td></tr></tbody></table></div4><div4 id="cces-catesc" dg="b8732-restructuring"><head dg="b8732-restructuring">Category escapes</head><p><termdef id="dt-ccescat" term="category escape" role="local">
<bibref ref="UnicodeDB"/> specifies a number of possible values for
the <unusual>General Category</unusual> property and provides mappings
from code points to specific character properties. 

The set containing all characters that have property 
<!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><var>X</var></phrase><!--*
* material suppressed here by diff group b8732 *
*-->
can be identified with a <term>category escape</term><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"> <code>\p{</code><var>X</var><code>}</code></phrase><phrase dg="b8732"> (using a lower-case
<mention>p</mention>)</phrase>. 
The complement of this set is specified with the
<term>category
escape</term><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"> 
<code>\P{</code><var>X</var><code>}</code></phrase><phrase dg="b8732">
(using an upper-case <mention>P</mention>)</phrase>. 
<!--*
* material suppressed here by diff group b8732 *
*--><phrase dg="b8732">
For all <var>X</var>, if <var>X</var> is a recognized
character-property code, then 
<code>[\P{<var>X</var>}]</code>
= <code>[^\p{<var>X</var>}]</code>.
</phrase>
</termdef></p><scrap headstyle="show"><head>Category Escape</head><prod id="catesc"><lhs id="nt-catEsc">catEsc</lhs><rhs>'\p{' <nt def="nt-charProp"/> '}'</rhs></prod><prod id="complesc"><lhs id="nt-complEsc">complEsc</lhs><rhs>'\P{' <nt def="nt-charProp"/> '}'</rhs></prod><prod id="charprop"><lhs id="nt-charProp">charProp</lhs><rhs><nt def="nt-IsCategory"/> | <nt def="nt-IsBlock"/></rhs></prod></scrap><p>
<bibref ref="UnicodeDB"/> is subject to future revision.  For
example, the mapping from code points to character properties might be
updated.  All <termref def="dt-minimally-conforming"/> processors
<termref def="dt-must"/> support the character properties defined in
the version of <bibref ref="UnicodeDB"/> <!--*
* material suppressed here by diff group wd31 *
*--><phrase dg="wd31">cited in the
normative references (<specref ref="normative-biblio"/>)</phrase><phrase dg="b8732"> or in
some later version of the Unicode database</phrase>.  <!--*
* material suppressed here by diff group b8732 *
*--><phrase dg="b8732">Implementors</phrase> are encouraged to support the
character properties defined in any <!--*
* material suppressed here by diff group b5948 *
*--><phrase dg="b5948">later</phrase> version<phrase dg="b5948">s</phrase>.  <phrase dg="b5948">When the
implementation supports multiple versions of the Unicode database, and
they differ in salient respects (e.g. different properties are
assigned to the same character in different versions of the database),
then it is <termref def="key-impl-def"/> which set of property definitions is used
for any given assessment episode.</phrase>
</p><note dg="b5948"><p>In order to benefit from continuing work on the Unicode database,
a conforming implementation might by default use the latest supported
version of the character properties.  In order to maximize consistency
with other implementations of this specification, however, an 
implementation might choose to provide 
<!--*
* material suppressed here by diff group b8732 *
*--><phrase dg="b8732"><termref def="dt-useroption">user options</termref></phrase> to specify the
use of the version of the database cited in the normative references.
The <code>PropertyAliases.txt</code>
and <code>PropertyValueAliases.txt</code> files of
the Unicode database may be helpful to implementors in this connection.
</p></note><!--*
* material suppressed here by diff group edn8744 *
*--><p><!--*
* material suppressed here by diff group b1889b *
*-->
<phrase dg="b1889b">For convenience, the following table lists 
the values of the "General Category" property in the
<!--*
* material suppressed here by diff group b5948 *
*--> version
of <bibref ref="UnicodeDB"/><phrase dg="b5948">
cited in the normative references
(<specref ref="normative-biblio"/>)</phrase>.</phrase><phrase dg="b8744"> 
The properties with single-character names are not defined in
<bibref ref="UnicodeDB"/>.  The value of a single-character
property is the union of the values of all the two-character properties
whose first character is the character in question.  For example,
for <code>N</code>, the union of <code>Nd</code>, <code>Nl</code> and
<code>No</code>.</phrase></p><note dg="b8744"><p>As of this publication the Java regex
library does <emph>not</emph> include <code>Cn</code> in its definition of
<code>C</code>, so that definition cannot be used without modification
in conformant implementations.</p></note><table border="1" align="center"><tbody><tr><th rowspan="1" colspan="1">Category</th><th rowspan="1" colspan="1">Property</th><th rowspan="1" colspan="1">Meaning</th></tr><tr><td rowspan="6" colspan="1">Letters</td><td align="center" rowspan="1" colspan="1">L</td><td rowspan="1" colspan="1">All Letters</td></tr><tr><td align="center" rowspan="1" colspan="1">Lu</td><td rowspan="1" colspan="1">uppercase</td></tr><tr><td align="center" rowspan="1" colspan="1">Ll</td><td rowspan="1" colspan="1">lowercase</td></tr><tr><td align="center" rowspan="1" colspan="1">Lt</td><td rowspan="1" colspan="1">titlecase</td></tr><tr><td align="center" rowspan="1" colspan="1">Lm</td><td rowspan="1" colspan="1">modifier</td></tr><tr><td align="center" rowspan="1" colspan="1">Lo</td><td rowspan="1" colspan="1">other</td></tr><tr><td colspan="3" rowspan="1"> </td></tr><tr><td rowspan="4" colspan="1">Marks</td><td align="center" rowspan="1" colspan="1">M</td><td rowspan="1" colspan="1">All Marks</td></tr><tr><td align="center" rowspan="1" colspan="1">Mn</td><td rowspan="1" colspan="1">nonspacing</td></tr><tr><td align="center" rowspan="1" colspan="1">Mc</td><td rowspan="1" colspan="1">spacing combining</td></tr><tr><td align="center" rowspan="1" colspan="1">Me</td><td rowspan="1" colspan="1">enclosing</td></tr><tr><td colspan="3" rowspan="1"> </td></tr><tr><td rowspan="4" colspan="1">Numbers</td><td align="center" rowspan="1" colspan="1">N</td><td rowspan="1" colspan="1">All Numbers</td></tr><tr><td align="center" rowspan="1" colspan="1">Nd</td><td rowspan="1" colspan="1">decimal digit</td></tr><tr><td align="center" rowspan="1" colspan="1">Nl</td><td rowspan="1" colspan="1">letter</td></tr><tr><td align="center" rowspan="1" colspan="1">No</td><td rowspan="1" colspan="1">other</td></tr><tr><td colspan="3" rowspan="1"> </td></tr><tr><td rowspan="8" colspan="1">Punctuation</td><td align="center" rowspan="1" colspan="1">P</td><td rowspan="1" colspan="1">All Punctuation</td></tr><tr><td align="center" rowspan="1" colspan="1">Pc</td><td rowspan="1" colspan="1">connector</td></tr><tr><td align="center" rowspan="1" colspan="1">Pd</td><td rowspan="1" colspan="1">dash</td></tr><tr><td align="center" rowspan="1" colspan="1">Ps</td><td rowspan="1" colspan="1">open</td></tr><tr><td align="center" rowspan="1" colspan="1">Pe</td><td rowspan="1" colspan="1">close</td></tr><tr><td align="center" rowspan="1" colspan="1">Pi</td><td rowspan="1" colspan="1">initial quote
			(may behave like Ps or Pe depending on usage)</td></tr><tr><td align="center" rowspan="1" colspan="1">Pf</td><td rowspan="1" colspan="1">final quote
			(may behave like Ps or Pe depending on usage)</td></tr><tr><td align="center" rowspan="1" colspan="1">Po</td><td rowspan="1" colspan="1">other</td></tr><tr><td colspan="3" rowspan="1"> </td></tr><tr><td rowspan="4" colspan="1">Separators</td><td align="center" rowspan="1" colspan="1">Z</td><td rowspan="1" colspan="1">All Separators</td></tr><tr><td align="center" rowspan="1" colspan="1">Zs</td><td rowspan="1" colspan="1">space</td></tr><tr><td align="center" rowspan="1" colspan="1">Zl</td><td rowspan="1" colspan="1">line</td></tr><tr><td align="center" rowspan="1" colspan="1">Zp</td><td rowspan="1" colspan="1">paragraph</td></tr><tr><td colspan="3" rowspan="1"> </td></tr><tr><td rowspan="5" colspan="1">Symbols</td><td align="center" rowspan="1" colspan="1">S</td><td rowspan="1" colspan="1">All Symbols</td></tr><tr><td align="center" rowspan="1" colspan="1">Sm</td><td rowspan="1" colspan="1">math</td></tr><tr><td align="center" rowspan="1" colspan="1">Sc</td><td rowspan="1" colspan="1">currency</td></tr><tr><td align="center" rowspan="1" colspan="1">Sk</td><td rowspan="1" colspan="1">modifier</td></tr><tr><td align="center" rowspan="1" colspan="1">So</td><td rowspan="1" colspan="1">other</td></tr><tr><td colspan="3" rowspan="1"> </td></tr><tr><td rowspan="5" colspan="1">Other</td><td align="center" rowspan="1" colspan="1">C</td><td rowspan="1" colspan="1">All Others</td></tr><tr><td align="center" rowspan="1" colspan="1">Cc</td><td rowspan="1" colspan="1">control</td></tr><tr><td align="center" rowspan="1" colspan="1">Cf</td><td rowspan="1" colspan="1">format</td></tr><!--
	<tr>
		<td align="center">Cs</td>
		<td>Surrogate</td>
	</tr>
	  --><tr><td align="center" rowspan="1" colspan="1">Co</td><td rowspan="1" colspan="1">private use</td></tr><tr><td align="center" rowspan="1" colspan="1">Cn</td><td rowspan="1" colspan="1">not assigned</td></tr></tbody></table><scrap headstyle="show"><head>Categories</head><prod id="cats"><lhs id="nt-IsCategory">IsCategory</lhs><rhs>
			<nt def="nt-Letters"/> |
			<nt def="nt-Marks"/> |
			<nt def="nt-Numbers"/> |
			<nt def="nt-Punctuation"/> |
			<nt def="nt-Separators"/> |
			<nt def="nt-Symbols"/> |
			<nt def="nt-Others"/>
		</rhs></prod><prod id="lets"><lhs id="nt-Letters">Letters</lhs><rhs>'L' [ultmo]?</rhs></prod><prod id="marks"><lhs id="nt-Marks">Marks</lhs><rhs>'M' [nce]?</rhs></prod><prod id="nums"><lhs id="nt-Numbers">Numbers</lhs><rhs>'N' [dlo]?</rhs></prod><prod id="punc"><lhs id="nt-Punctuation">Punctuation</lhs><rhs>'P' [cdseifo]?</rhs></prod><prod id="seps"><lhs id="nt-Separators">Separators</lhs><rhs>'Z' [slp]?</rhs></prod><prod id="syms"><lhs id="nt-Symbols">Symbols</lhs><rhs>'S' [mcko]?</rhs></prod><prod id="others"><lhs id="nt-Others">Others</lhs><rhs>'C' [cfon]?</rhs></prod></scrap><note><p>The properties mentioned above exclude the <!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp">Cs</phrase> property.  The <!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp">Cs</phrase> property identifies
<unusual>surrogate</unusual> characters, which do not occur at the
level of the <unusual>character abstraction</unusual> that XML
instance documents operate on.</p></note></div4><div4 id="cces-blockesc" dg="b8732-restructuring"><head dg="b8732-restructuring">Block escapes</head><!--*
* material suppressed here by diff group b8732 *
*--><p dg="b8732">
<bibref ref="UnicodeDB"/> groups the code points of the Universal
Character Set (UCS) into a number of blocks such as Basic Latin (i.e.,
ASCII), Latin-1 Supplement, Hangul Jamo, CJK Compatibility, etc. 
The block-escape construct allows regular expressions to refer to sets
of characters by the name of the block in which they appear, using a
<termref def="dt-normalized-block-name"/>.
</p><p dg="b8732">
<termdef id="dt-normalized-block-name" term="normalized block name">
For any Unicode block, the <term>normalized block name</term> of that
block is the string of characters formed by stripping out white space
and underbar characters from the block name as given in <bibref ref="UnicodeDB"/>, while retaining hyphens and preserving case
distinctions.</termdef>
</p><p dg="b8732">
<termdef id="dt-ccesblock" term="block escape" role="local">
A <term>block escape</term> expression denotes the set of characters
in a given Unicode block. For any Unicode block <var>B</var>, with <termref def="dt-normalized-block-name"/> <var>X</var>, the set containing all
characters defined in block <var>B</var> can be identified with the <term>block
escape</term> <code>\p{Is<var>X</var>}</code> (using lower-case
<mention>p</mention>).  The complement of this set is denoted by the
<term>block escape</term> <code>\P{Is<var>X</var>}</code> (using upper-case
<mention>P</mention>).  For all <var>X</var>, if <var>X</var> is a normalized block name
recognized by the processor, then
<code>[\P{Is</code><var>X</var><code>}]</code> =
<code>[^\p{Is</code><var>X</var><code>}]</code>.
</termdef>
</p><scrap headstyle="show"><head>Block Escape</head><prod id="blockesc"><lhs id="nt-IsBlock">IsBlock</lhs><rhs>'Is' [a-zA-Z0-9#x2D]+</rhs><com><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"> N.B.: 
#x2D = <string>-</string></phrase></com></prod></scrap><p id="eg-isbasiclatin" dg="b8732">
For example, the <termref def="dt-ccesblock"/> for identifying the
ASCII characters is <!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><string>\p{IsBasicLatin}</string></phrase>.</p><note dg="b8732"><p>Current versions of the Unicode database recommend that whenever
  block names are being matched hyphens, underbars, and white space
  should be dropped and letters folded to a single case, so both the
  string <string>BasicLatin</string> and the string <string>-- basic
  LATIN --</string> will match the block name <quote>Basic Latin</quote>.
  </p><p>The handling of block names in block escapes differs from this
  behavior in two ways.  First, the normalized block names defined in
  this specification do not suppress hyphens in the Unicode block
  names and do not level case distinctions. The normalized form of the
  block name <string>Latin-1 Supplement</string>, for example, is thus
  <string>Latin-1Supplement</string>, not
  <string>latin1supplement</string> or
  <string>LATIN1SUPPLEMENT</string>.  Second, XSD processors are not
  required to perform any normalization at all upon the block name as
  given in the <termref def="dt-ccesblock">block escape</termref>, so
  <string>\p{Latin-1Supplement}</string> will be recognized
  as a reference to the Latin-1 Supplement block, but
  <string>\p{Is Latin-1 supplement}</string> will not.
  </p></note><!--*
* material suppressed here by diff group b8732 *
*--><!--*
* material suppressed here by diff group b8732 *
*--><!--*

  0000..007F; Basic Latin
  0080..00FF; Latin-1 Supplement
  0100..017F; Latin Extended-A
  0180..024F; Latin Extended-B
  0250..02AF; IPA Extensions
  02B0..02FF; Spacing Modifier Letters
  0300..036F; Combining Diacritical Marks
  0370..03FF; Greek and Coptic
  0400..04FF; Cyrillic
. 0500..052F; Cyrillic Supplement
  0530..058F; Armenian
  0590..05FF; Hebrew
  0600..06FF; Arabic
  0700..074F; Syriac
. 0750..077F; Arabic Supplement
  0780..07BF; Thaana
  0900..097F; Devanagari
  0980..09FF; Bengali
  0A00..0A7F; Gurmukhi
  0A80..0AFF; Gujarati
  0B00..0B7F; Oriya
  0B80..0BFF; Tamil
  0C00..0C7F; Telugu
  0C80..0CFF; Kannada
  0D00..0D7F; Malayalam
  0D80..0DFF; Sinhala
  0E00..0E7F; Thai
  0E80..0EFF; Lao
  0F00..0FFF; Tibetan
  1000..109F; Myanmar
  10A0..10FF; Georgian
  1100..11FF; Hangul Jamo
  1200..137F; Ethiopic
. 1380..139F; Ethiopic Supplement
  13A0..13FF; Cherokee
  1400..167F; Unified Canadian Aboriginal Syllabics
  1680..169F; Ogham
  16A0..16FF; Runic
. 1700..171F; Tagalog
. 1720..173F; Hanunoo
. 1740..175F; Buhid
. 1760..177F; Tagbanwa
  1780..17FF; Khmer
  1800..18AF; Mongolian
. 1900..194F; Limbu
. 1950..197F; Tai Le
. 1980..19DF; New Tai Lue
. 19E0..19FF; Khmer Symbols
. 1A00..1A1F; Buginese
. 1D00..1D7F; Phonetic Extensions
. 1D80..1DBF; Phonetic Extensions Supplement
. 1DC0..1DFF; Combining Diacritical Marks Supplement
  1E00..1EFF; Latin Extended Additional
  1F00..1FFF; Greek Extended
  2000..206F; General Punctuation
  2070..209F; Superscripts and Subscripts
  20A0..20CF; Currency Symbols
  20D0..20FF; Combining Diacritical Marks for Symbols
  2100..214F; Letterlike Symbols
  2150..218F; Number Forms
  2190..21FF; Arrows
  2200..22FF; Mathematical Operators
  2300..23FF; Miscellaneous Technical
  2400..243F; Control Pictures
  2440..245F; Optical Character Recognition
  2460..24FF; Enclosed Alphanumerics
  2500..257F; Box Drawing
  2580..259F; Block Elements
  25A0..25FF; Geometric Shapes
  2600..26FF; Miscellaneous Symbols
  2700..27BF; Dingbats
. 27C0..27EF; Miscellaneous Mathematical Symbols-A
. 27F0..27FF; Supplemental Arrows-A
  2800..28FF; Braille Patterns
. 2900..297F; Supplemental Arrows-B
. 2980..29FF; Miscellaneous Mathematical Symbols-B
. 2A00..2AFF; Supplemental Mathematical Operators
. 2B00..2BFF; Miscellaneous Symbols and Arrows
. 2C00..2C5F; Glagolitic
. 2C80..2CFF; Coptic
. 2D00..2D2F; Georgian Supplement
. 2D30..2D7F; Tifinagh
. 2D80..2DDF; Ethiopic Extended
. 2E00..2E7F; Supplemental Punctuation
  2E80..2EFF; CJK Radicals Supplement
  2F00..2FDF; Kangxi Radicals
  2FF0..2FFF; Ideographic Description Characters
  3000..303F; CJK Symbols and Punctuation
  3040..309F; Hiragana
  30A0..30FF; Katakana
  3100..312F; Bopomofo
  3130..318F; Hangul Compatibility Jamo
  3190..319F; Kanbun
  31A0..31BF; Bopomofo Extended
. 31C0..31EF; CJK Strokes
. 31F0..31FF; Katakana Phonetic Extensions
  3200..32FF; Enclosed CJK Letters and Months
  3300..33FF; CJK Compatibility
  3400..4DBF; CJK Unified Ideographs Extension A
. 4DC0..4DFF; Yijing Hexagram Symbols
  4E00..9FFF; CJK Unified Ideographs
  A000..A48F; Yi Syllables
  A490..A4CF; Yi Radicals
. A700..A71F; Modifier Tone Letters
. A800..A82F; Syloti Nagri
  AC00..D7AF; Hangul Syllables
- D800..DB7F; High Surrogates
- DB80..DBFF; High Private Use Surrogates
- DC00..DFFF; Low Surrogates
  E000..F8FF; Private Use Area
  F900..FAFF; CJK Compatibility Ideographs
  FB00..FB4F; Alphabetic Presentation Forms
  FB50..FDFF; Arabic Presentation Forms-A
. FE00..FE0F; Variation Selectors
. FE10..FE1F; Vertical Forms
  FE20..FE2F; Combining Half Marks
  FE30..FE4F; CJK Compatibility Forms
  FE50..FE6F; Small Form Variants
! FE70..FEFF; Arabic Presentation Forms-B
  FF00..FFEF; Halfwidth and Fullwidth Forms
! FFF0..FFFF; Specials
. 10000..1007F; Linear B Syllabary
. 10080..100FF; Linear B Ideograms
. 10100..1013F; Aegean Numbers
. 10140..1018F; Ancient Greek Numbers
. 10300..1032F; Old Italic
. 10330..1034F; Gothic
. 10380..1039F; Ugaritic
. 103A0..103DF; Old Persian
. 10400..1044F; Deseret
. 10450..1047F; Shavian
. 10480..104AF; Osmanya
10800..1083F; Cypriot Syllabary
10A00..10A5F; Kharoshthi
1D000..1D0FF; Byzantine Musical Symbols
1D100..1D1FF; Musical Symbols
1D200..1D24F; Ancient Greek Musical Notation
1D300..1D35F; Tai Xuan Jing Symbols
1D400..1D7FF; Mathematical Alphanumeric Symbols
20000..2A6DF; CJK Unified Ideographs Extension B
2F800..2FA1F; CJK Compatibility Ideographs Supplement
E0000..E007F; Tags
E0100..E01EF; Variation Selectors Supplement
F0000..FFFFF; Supplementary Private Use Area-A
100000..10FFFF; Supplementary Private Use Area-B

*--><!--*
* material suppressed here by diff group b8732 *
*--><!--*
* material suppressed here by diff group b5948c *
*--><p dg="b5948c">
<bibref ref="UnicodeDB"/> has been revised since XSD 1.0 was
published, and is subject to future revision. In particular, the
grouping of code points into blocks has changed, and may change
again. All <termref def="dt-minimally-conforming"/> processors <rfc2119>must</rfc2119>
support the blocks defined in the version of <bibref ref="UnicodeDB"/>
cited in the normative references (<specref ref="normative-biblio"/>)<phrase dg="b8732"> or in some
later version of the Unicode database</phrase>.  
<!--*
* material suppressed here by diff group b8732 *
*--><phrase dg="b8732">Implementors</phrase>

are encouraged to support the blocks defined in earlier and/or later
versions of the Unicode Standard. When the implementation supports
multiple versions of the Unicode database, and they differ in salient
respects (e.g. different characters are assigned to a given block in
different versions of the database), then it is <termref def="key-impl-def"/> which
set of block definitions is used for any given assessment episode.
</p><p dg="b5948c">In particular, the version of <bibref ref="UnicodeDB"/> referenced in XSD 1.0 (namely, Unicode 3.1)
contained <!--*
* material suppressed here by diff group b8732 *
*--><phrase dg="b8732">a number of
blocks which have been renamed in later versions of the
database</phrase> Since <!--*
* material suppressed here by diff group b8732 *
*--><phrase dg="b8732">the
older</phrase> block names may appear in regular expressions within
XSD 1.0 schemas, implementors are encouraged to support the superseded
block names in XSD 1.1 processors for compatibility, either by default
or <!--*
* material suppressed here by diff group b8732 *
*--><phrase dg="b8732"><termref def="dt-useroption">at user option</termref>.  At the time this
document was prepared, block names from Unicode 3.1 known to have been
superseded in this way included</phrase>:
<ulist><item><p>#x0370 - #x03FF: Greek</p></item><item><p>#x20D0 - #x20FF: CombiningMarksforSymbols</p></item><item><p>#xE000 - #xF8FF: PrivateUse</p></item><item><p>#xF0000 - #xFFFFD: PrivateUse</p></item><item><p>#x100000 - #x10FFFD: PrivateUse</p></item></ulist>
</p><!--*
* material suppressed here by diff group b5948x *
*--><!--*
* material suppressed here by diff group b8732 *
*--><p dg="b8732">
A tabulation of normalized block names for Unicode 2.0.0 and
later is given in <bibref ref="unicode-escapes"/>. 
</p><p dg="b8732">For the treatment of regular expressions
containing unrecognized Unicode block names, see 
<specref ref="sec-unrecognized-catesc"/>.</p></div4><div4 id="sec-unrecognized-catesc" dg="b8732"><head>Unrecognized category escapes</head><p>A string of the form <quote><code>\p{<var>S</var>}</code></quote> 
  <!--* (where &S; is a string not containing <mention>}</mention>) *-->
  constitutes a <nt def="nt-catEsc"/> (category escape), and similarly
  a string of the form <quote><code>\P{<var>S</var>}</code></quote> constitutes
  a <nt def="nt-complEsc"/> (category-complement escape) only if the
  string <var>S</var> matches either <nt def="nt-IsCategory"/> or <nt def="nt-IsBlock"/>.</p><note><p>If an unknown string of characters is used in a
  category escape instead of a known character category code
  or a string matching the <nt def="nt-IsBlock"/> production,
  the resulting string will (normally) not match the 
  <nt def="nt-regExp"/> production and thus not be a regular
  expression as defined in this specification.  If the 
  non-<nt def="nt-regExp"/> string occurs where a regular
  expression is required, the schema document will be in
  <termref def="dt-error"/>.</p></note><p>Any string of hyphens, digits, and Basic Latin characters
  beginning with <string>Is</string> will match the non-terminal <nt def="nt-IsBlock"/> and thus be allowed in a regular expression.
  Most of these strings, however, will not denote any Unicode block.
  Processors <rfc2119>should</rfc2119> issue a warning if they encounter a regular
  expression using a block name they do not recognize.  Processors
  <rfc2119>may</rfc2119> <termref def="dt-useroption">at user option</termref> treat unrecognized block names as <termref def="dt-error">errors</termref> in
  the schema.
  </p><note><p>Treating unrecognized block names as errors increases the
    likelihood that errors in spelling the block name will be detected
    and can be helpful in checking the correctness of schema
    documents.  However, it also decreases the portability of schema
    documents among processors supporting different versions of
    <bibref ref="UnicodeDB"/>; it is for this reason that 
    processors are allowed to treat unrecognized block names as
    errors only when the user has explicitly requested this
    behavior.
    </p></note><p>If a string <quote><code>Is<var>X</var></code></quote> matches the
  non-terminal <nt def="nt-IsBlock"/> but <var>X</var> is not a recognized
  block name, then the expressions
  <quote><code>\p{Is<var>X</var>}</code></quote> and
  <quote><code>\P{Is<var>X</var>}</code></quote> each denote the set of all
  characters.
  Processors <rfc2119>may</rfc2119> <termref def="dt-useroption">at user option</termref> treat both 
  <quote><code>\p{Is<var>X</var>}</code></quote> and
  <quote><code>\P{Is<var>X</var>}</code></quote> as
  denoting the empty set, instead of the set of all characters.
  </p><note><p>The meaning defined for a block escape with an unrecognized
    block name makes it synonymous with the regular expression
    <string>.|[\n\r]</string>.  A processor which does not recognize
    the block name will thus not enforce the constraint that the
    characters matched are in, or are not in, the block in question.
    Any string which satisfies the regular expression as written will
    be accepted, but not all strings accepted will actually satisfy
    the expression as written: some strings which do not satisfy the
    expression as written will also be accepted. So some invalid input
    will be wrongly identified as <phrase diff="del" dg="ep35">invalid</phrase><phrase diff="add" dg="ep35">valid</phrase>.</p><p>If (at <termref def="dt-useroption"/>) the expressions are treated as denoting the
    empty set, then the converse is true: any string which fails to
    satisfy the expression as written will be rejected, but not all
    strings rejected by the processor will actually have failed to satisfy
    the expression as written.  So some valid input will be wrongly
    identified as invalid.</p><p>Which behavior is preferable in concrete circumstances depends on
    the relative cost of failure to accept valid input (false negatives)
    and failure to reject invalid input (false positives).  It is for
    this reason that processors are allowed to provide <termref def="dt-useroption">user options</termref> to
    control the behavior.  The principle of being liberal in accepting
    input (often called Postel's Law) suggests that the default
    behavior should be to accept strings not known to be invalid, 
    rather than the converse; it is for this reason that block escapes
    with unknown block names should be treated as matching any character
    unless the user explicitly requests the alternative behavior.
    </p></note></div4><div4 id="cces-mce" dg="b8732-restructuring"><head dg="b8732-restructuring">Multi-character escapes</head><p><termdef id="dt-ccesN" term="multi-character escape" role="local">A
<term>multi-character escape</term> provides a simple way to identify
<phrase dg="ep26">any of</phrase>
a commonly used set of characters:</termdef> 
<termdef id="dt-wcchar" term="wildcard character" dg="ep26">
The <term>wildcard character</term> is a metacharacter which matches
almost any single character:</termdef></p><scrap headstyle="show"><head>Multi-Character Escape</head><prod id="multicharesc"><lhs id="nt-MultiCharEsc">MultiCharEsc</lhs><rhs>'\' [sSiIcCdDwW]</rhs></prod><prod id="wildcardesc"><lhs id="nt-WildcardEsc">WildcardEsc</lhs><rhs>'.'</rhs></prod></scrap><p/><table border="1" align="center" cellpadding="5"><col width="33%" span="1"/><col width="33%" span="1"/><col width="33%" span="1"/><thead><tr><th rowspan="1" colspan="1">Character sequence</th><!--<th>Name</th>--><th rowspan="1" colspan="1">Equivalent <termref def="dt-charclass"/></th></tr></thead><tbody><tr><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>.</code></phrase></td><!--		<td>&nbsp;</td>--><td align="center" rowspan="1" colspan="1">[^\n\r]</td></tr><tr><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>\s</code></phrase></td><!--		<td>white space</td>--><td align="center" rowspan="1" colspan="1">[#x20\t\n\r]</td></tr><tr><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>\S</code></phrase></td><!--		<td>&nbsp;</td>--><td align="center" rowspan="1" colspan="1">[^\s]</td></tr><tr><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>\i</code></phrase></td><!--		<td>XML initial Name character</td>--><td align="center" rowspan="1" colspan="1">
		<!--[\p{Ll}\p{Lu}\p{Lo}\p{Lt}\p{Nl}_:]
		<br/>
		(i.e.,
		-->the set of initial name characters, those
		<termref def="dt-match">matched</termref> by
		<phrase dg="b1838"><xnt xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-NameStartChar">NameStartChar</xnt> in <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/> 
		<!--*
* material suppressed here by diff group b11421 *
*--></phrase>
		<!--*
* material suppressed here by diff group b11421 *
*-->
                </td></tr><tr><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>\I</code></phrase></td><!--		<td>&nbsp;</td>--><td align="center" rowspan="1" colspan="1">[^\i]</td></tr><tr><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>\c</code></phrase></td><!--		<td>XML Name character</td>--><td align="center" rowspan="1" colspan="1">
<!--
		[\i\p{Nd}\p{Mc}\p{Me}\p{Mn}\p{Lm}.#x00B7#x0387-]
		<br/>
		(i.e.,
		-->
		the set of name characters, those
		<termref def="dt-match">matched</termref> by
		<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml11/#NT-NameChar">NameChar</xspecref></td></tr><tr><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>\C</code></phrase></td><!--		<td>&nbsp;</td>--><td align="center" rowspan="1" colspan="1">[^\c]</td></tr><tr><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>\d</code></phrase></td><!--		<td>digit (includes digits outside of the 0-9)</td>--><td align="center" rowspan="1" colspan="1">\p{Nd}</td></tr><tr><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>\D</code></phrase></td><!--		<td>&nbsp;</td>--><td align="center" rowspan="1" colspan="1">[^\d]</td></tr><tr><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>\w</code></phrase></td><!--		<td>a "word" character</td>--><td align="center" rowspan="1" colspan="1">
			[#x0000-#x10FFFF]-[\p{P}\p{Z}\p{C}]
			(<emph>all characters except the set of "punctuation",
				"separator" and "other" characters</emph>)
		</td></tr><tr><td align="center" rowspan="1" colspan="1"><!--*
* material suppressed here by diff group ep00dp *
*--><phrase dg="ep00dp"><code>\W</code></phrase></td><!--		<td>&nbsp;</td>--><td align="center" rowspan="1" colspan="1">[^\w]</td></tr></tbody></table><note><p>
The <termref def="dt-regex"/> language defined here does not
attempt to provide a general solution to "regular expressions" over
UCS character sequences.  In particular, it does not easily provide
for matching sequences of base characters and combining marks.
The language is targeted at support of "Level 1" features as defined in
<bibref ref="unicodeRegEx"/>.  It is hoped that future versions of this
specification will provide support for "Level 2" features.
</p></note></div4></div3></div2></div1><div1 id="idef-idep" dg="b3251-idef"><head>Implementation-defined and implementation-dependent features (normative)</head><div2 id="impl-def"><head>Implementation-defined features</head><p>The following features in this specification are <termref def="key-impl-def"/>.
Any software which claims to conform to this specification (or to the
specification of any host language which embeds 
<emph>XSD 1.1:  Datatypes</emph>) <rfc2119>must</rfc2119> describe how these choices 
have been exercised, in documentation which accompanies any conformance claim.
</p><olist><item dg="b3251-idef"><p>For the datatypes which depend on
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/> or <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XMLNS" dg="b1838refs"/>, it is
<termref def="key-impl-def"/> whether a conforming processor takes the relevant
definitions from
<bibref ref="XML"/> and <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XMLNS" dg="b1838refs"/>, or
from
<bibref ref="XML1.0"/> and <bibref ref="XMLNS1.0"/>. 
Implementations <rfc2119>may</rfc2119> support either
the form of these datatypes based on version 1.0 of those
specifications, or the form based on version 1.1, or both.
</p></item><item dg="b5585"><p>For the datatypes with infinite <termref def="dt-value-space">value spaces</termref>, it 
is <termref def="key-impl-def"/> whether conforming processors
set a limit on the size of the values supported.
If such limits are set, they <rfc2119>must</rfc2119> be documented,
and the limits <rfc2119>must</rfc2119> be equal to, or exceed, the
minimal limits specified in 
<specref ref="partial-implementation"/>.
.</p></item><item dg="b3251"><p>It is <termref def="key-impl-def"/> whether <termref def="dt-primitive"/> datatypes other than
those defined in this specification are supported.</p><p>For each <termref def="key-impl-def"/> datatype, a <compref ref="std"/>
<rfc2119>must</rfc2119> be
specified which conforms to the rules given in 
<specref ref="builtin-stds"/>.
</p><p>
In addition, the following information
<rfc2119>must</rfc2119> be provided:<olist><item><p>The nature of the datatype's <termref def="dt-lexical-space"/>, <termref def="dt-value-space"/>,
and <termref def="dt-lexical-mapping"/>.</p></item><item><p>The nature of the equality relation; in particular, how to determine
whether two values which are not identical are equal.</p><note><p>There is no requirement that equality be distinct from identity,
but it <rfc2119>may</rfc2119> be.</p></note></item><item><p>The values of the <termref def="dt-fundamental-facet">fundamental facets</termref>.</p></item><item><p>Which of the <termref def="dt-constraining-facet">constraining facets</termref> defined in this specification
are applicable to the datatype (and <rfc2119>may</rfc2119> thus be used in 
<termref def="dt-fb-restriction"/> from it), and what they mean when 
applied to it.</p></item><item><p>If <termref def="key-impl-def"/> <termref def="dt-constraining-facet">constraining facets</termref> are supported, which of those
<termref def="dt-constraining-facet">constraining facets</termref> are applicable to the datatype, and what they
mean when applied to it.</p></item><item><p>What URI reference (more precisely, what <dtref ref="anyURI"/> value)
is to be used to refer to the datatype, analogous to those provided
for the datatypes defined here in section
<specref ref="built-in-datatypes"/>.</p><!--* <note>
<p>As specified normatively elsewhere, &impl-defined; &primitive;
datatypes &mustnot; be in the XSD namespace 
(<string>http://www.w3.org/2001/XMLSchema</string>).</p>
</note> *--><note><p>It is convenient if the URI for a datatype and 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 its simple type definition are related by a 
simple mapping, like the URIs given for the <termref def="dt-built-in"/> datatypes
in <specref ref="built-in-datatypes"/>.  However, this is not
a requirement.</p></note></item><item><p>For each <termref def="dt-constraining-facet">constraining facet</termref> given a value for the new <termref def="dt-primitive"/>,
what URI reference (more precisely, what <dtref ref="anyURI"/> value)
is to be used to refer to the usage of that facet on the datatype, 
analogous to those provided, for the <termref def="dt-built-in"/> datatypes, in section
<specref ref="built-in-datatypes"/>.</p><note><p>As specified normatively elsewhere, the set of facets given values
will at the very least include the <compref ref="f-w"/> facet.</p></note></item></olist>
</p><p>The <termref def="dt-value-space"/> of the <termref def="dt-primitive"/> datatype <rfc2119>must</rfc2119> be disjoint
from those of the other <termref def="dt-primitive"/> datatypes.</p><p>The <termref def="dt-lexical-mapping"/> defined for an <termref def="key-impl-def"/> primitive
<rfc2119>must</rfc2119> be a total function from the <termref def="dt-lexical-space"/> onto the
<termref def="dt-value-space"/>.  That is, (1) each <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase> in the <termref def="dt-lexical-space"/>
<rfc2119>must</rfc2119> map to exactly one value, and (2) each value <rfc2119>must</rfc2119> be
the image of at least one member of the <termref def="dt-lexical-space"/>, and
<rfc2119>may</rfc2119> be the image of more than one.</p><p>For consistency with the <termref def="dt-constraining-facet">constraining facets</termref> defined here,
implementors who define new <termref def="dt-primitive"/> datatypes <rfc2119>should</rfc2119> allow
the <termref def="dt-pattern"/> and <termref def="dt-enumeration"/>
facets to apply.
</p><p>The implementor <rfc2119>should</rfc2119> specify a <termref def="dt-canonical-mapping"/>
for the datatype if practicable.</p></item><item dg="b3251"><p>It is <termref def="key-impl-def"/> whether <termref def="dt-constraining-facet">constraining facets</termref> other than
those defined in this specification are supported.</p><p>For each <termref def="key-impl-def"/> facet, the following information
<rfc2119>must</rfc2119> be provided:<olist><item><p>What properties the facet has, viewed as a schema component.</p><note><p>For most <termref def="key-impl-def"/> facets, the structural pattern used
for most <termref def="dt-constraining-facet">constraining facets</termref> defined in this specification is
expected to be satisfactory, but other structures <rfc2119>may</rfc2119> be specified.</p></note></item><item><p>Whether the facet is a <termref def="dt-pre-lexical"/>, <termref def="dt-lexical"/>, or
<termref def="dt-value-based"/> facet.</p></item><item><p>Whether restriction of the facet takes the form of replacing
a less restrictive facet value with a more restrictive value
(as in the <termref def="dt-minInclusive"/> and most other
<termref def="dt-constraining-facet">constraining facets</termref> defined in this specification) or 
of adding new values to a set of facet values (as
for the <termref def="dt-pattern"/> facet).  In the former case,
the information provided <rfc2119>must</rfc2119> also specify how to determine
which of two given values is more restrictive (and thus can
be used to restrict the other).</p><p>When an <termref def="key-impl-def"/> facet is used in <termref def="dt-fb-restriction"/>, the
new value <rfc2119>must</rfc2119> be at least as restrictive as the existing
value, if any.</p><note><p>The effect of the preceding paragraph is to ensure that
a type derived by <termref def="dt-fb-restriction"/> using an <termref def="key-impl-def"/> 
facet does not allow, or appear to allow, values not present
in the <termref def="dt-basetype"/>.</p></note></item><item><p>What <termref def="dt-primitive"/> datatypes the new
<termref def="dt-constraining-facet">constraining facet</termref> applies to, and what it 
means when applied to them.</p><p>For a <termref def="dt-pre-lexical"/> facet, how to compute the result
of applying the facet value to any given <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase>.</p><p dg="b15648">For a <termref def="dt-pre-lexical"/> facet, the
order in which it is applied to <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase>, relative to
other <termref def="dt-pre-lexical"/> facets.
</p><p>For a <termref def="dt-lexical"/> facet, how to tell whether any given
<!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase> is facet-valid with respect to it.</p><p>For a <termref def="dt-value-based"/> facet, how to tell whether any
given value in the relevant <termref def="dt-primitive"/> datatypes
is facet-valid with respect to it.</p><note><p>The host language <rfc2119>may</rfc2119> choose to specify that <termref def="key-impl-def"/> 
<termref def="dt-constraining-facet">constraining facets</termref> are applicable to <termref def="dt-built-in"/> <termref def="dt-primitive"/>
datatypes; this information is necessary to make the 
<termref def="key-impl-def"/> facet usable in such host languages.
 </p></note></item><item><p>What URI reference (more precisely, what <dtref ref="anyURI"/> value)
is to be used to refer to the facet, analogous to those provided
for the datatypes defined here in section
<specref ref="built-in-datatypes"/>.</p></item><item><p>What element is to be used in XSD schema documents to apply the facet
in the course of <termref def="dt-fb-restriction"/>.  A schema document <rfc2119>must</rfc2119> be
provided with an element declaration for each <termref def="key-impl-def"/> facet;
the element declarations <rfc2119>should</rfc2119> specify <el>xs:facet</el> as
their substitution-group head.</p><note><p>The elements' <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded names</xspecref> are used by the condition-inclusion
mechanism of <bibref ref="structural-schemas"/> to allow schema authors to test whether
a particular facet is supported and adjust the schema document's
contents accordingly.</p></note></item></olist>
</p><p><termref def="key-impl-def">Implementation-defined</termref> <termref def="dt-pre-lexical"/> facets <rfc2119>must not</rfc2119>, when 
applied to <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase> which have been whitespace-normalized
by the <compref ref="f-w"/> facet, produce <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase> which are
no longer whitespace-normalized.
</p></item><item dg="b15648"><p>It is <termref def="key-impl-def"/> whether an implementation of this specification
supports other versions of the Unicode database <bibref ref="UnicodeDB"/> 
in addition to the version cited normatively in the normative
references (<specref ref="normative-biblio"/>).  If an implementation supports
additional versions of the Unicode database, it is <termref def="key-impl-def"/>
which character properties and which block name definitions are
used in a given validity assessment.
</p><p>It is <termref def="key-impl-def"/> whether an implementation is capable,
<termref def="dt-useroption">at user option</termref>, of treating unrecognized block names as errors
in a schema.</p><p>It is <termref def="key-impl-def"/> whether an implementation is capable,
<termref def="dt-useroption">at user option</termref>, of treating unrecognized category escapes as
denoting the empty set instead of the set of all characters.</p></item></olist><note dg="b3251"><p>It follows from the above that each <termref def="key-impl-def"/> <termref def="dt-primitive"/>
datatype and each <termref def="key-impl-def"/> constraining facet has 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>.
These <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname">expanded names</xspecref> are used by the condition-inclusion mechanism
of <bibref ref="structural-schemas"/> to allow schema authors to test whether a
particular datatype or facet is supported and adjust the schema document's
contents accordingly.
</p></note></div2><div2 id="impl-dep" dg="b3251-idef"><head>Implementation-dependent features</head><p>The following features in this specification are <termref def="key-impl-dep"/>.
Software which claims to conform to this specification (or to the
specification of any host language which embeds 
<emph>XSD 1.1:  Datatypes</emph>) <rfc2119>may</rfc2119> describe how these choices 
have been exercised, in documentation which accompanies any conformance claim.
</p><olist><item><p>When multiple errors are encountered in type definitions or elsewhere,
it is <termref def="key-impl-dep"/> how many of the errors are reported (as long
as at least one error is reported), and which,
what form the report of errors takes, and how much detail is included.</p></item></olist></div2></div1><div1 id="changes" dg="wd2hax"><head>Changes since version 1.0<!--*
* material suppressed here by diff group b5150 *
*--></head><!--* wd4hax drops this level 
<div2 id="done"><head>Changes Already Made</head>
*--><div2 id="sec-chdtfacets" dg="fa1"><head>Datatypes<!--*
* material suppressed here by diff group wd4hax *
*--><phrase dg="wd4hax"> and</phrase> Facets<!--*
* material suppressed here by diff group wd4hax *
*--></head><p dg="wd4hax">In order to align this specification with
those being prepared by the XSL and XML Query Working Groups, a new
datatype named <dtref ref="anyAtomicType"/> has been introduced; it
serves as the base type definition for all <termref def="dt-primitive"/>
<termref def="dt-atomic"/> datatypes<!--*
* material suppressed here by diff group b10005 *
*-->.</p><p><!--*
* material suppressed here by diff group wd4hax *
*--><phrase dg="wd4hax">The treatment of datatypes has been made more
precise and explicit; most of these changes affect the section on 
<specref ref="typesystem"/>.  Definitions have been revised thoroughly and
technical terms are used more consistently.</phrase></p><p><!--*
* material suppressed here by diff group wd4hax *
*--><phrase dg="wd4hax">The (numeric) equality of values is now distinguished from
the identity of the values themselves; this allows <dtref ref="float"/> and <dtref ref="double"/> to treat positive and negative
zero as distinct values<!--*
* material suppressed here by diff group wgi-20080530 *
*-->, but nevertheless
to treat them as equal for purposes of bounds checking.  This allows a
better alignment with the expectations of users working with IEEE
floating-point binary numbers.</phrase></p><p>The <propref comp="ff-b" prop="value"/> of the <compref ref="ff-b"/> component for <pt>list</pt> datatypes is now always
<pt>false</pt>, reflecting the fact that <phrase dg="wd4hax">no ordering is prescribed for</phrase> <termref def="dt-list"/>
datatypes<!--*
* material suppressed here by diff group wd4hax *
*-->, and <!--*
* material suppressed here by diff group wd4hax *
*--><phrase dg="wd4hax">so
they cannot be bounded using the facets defined by this
specification</phrase>.</p><p>Units of length have been <!--*
* material suppressed here by diff group wd4hax *
*--><phrase dg="wd4hax">specified</phrase> for all datatypes that are permitted
the length constraining facet<!--*
* material suppressed here by diff group wd4hax *
*-->.</p><p dg="add.wd4hax.6522.del">The use of the namespace
<code>http://www.w3.org/2001/XMLSchema-datatypes</code> has been
deprecated.  The definition of a namespace separate from the main
namespace defined by this specification proved not to be necessary or
helpful in facilitating the use, by other specifications, of the
datatypes defined here, and its use raises a number of difficult
unsolved practical questions.
</p><p dg="b5030">
An <compref ref="f-a"/> facet has been added, to allow schema
authors to associated assertions with simple type definitions,
analogous to those allowed by <bibref ref="structural-schemas"/> for complex type definitions.
</p><p dg="postcr">The discussion of whitespace handling in 
      <specref ref="rf-whiteSpace"/> makes clearer that when
      the value is <kw>collapse</kw>, <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase> consisting
      solely of whitespace characters are reduced to the
      empty string; the earlier formulation has been misunderstood
      by some implementors.</p><p dg="b3251">
Conforming implementations <rfc2119>may</rfc2119> now support <termref def="dt-primitive"/> datatypes
and facets in addition to those defined here.
</p></div2><div2 id="sec-chnum" dg="pd1"><head>Numerical Datatypes</head><!--*
* material suppressed here by diff group b12300-diff10-silent *
*--><p dg="wd4hax">As noted above, positive and negative zero,
<dtref ref="float"/> and <dtref ref="double"/> are now treated as
distinct but arithmetically equal values.</p><p dg="wd4hax">The description of the lexical spaces of 
<dtref ref="unsignedLong"/>,
<dtref ref="unsignedInt"/>,
<dtref ref="unsignedShort"/>, and
<dtref ref="unsignedByte"/> has been revised to agree with the
schema for schemas by allowing for the possibility of a
leading sign.</p><!--* rq140 *--><p dg="wd4hax">The <dtref ref="float"/> and
<dtref ref="double"/> datatypes now follow IEEE 754 implementation
practice more closely; in particular, negative and positive zero are
now distinct values, although arithmetically equal. <phrase dg="qd3hax">Conversely, NaN is identical but not arithmetically equal
to itself.</phrase></p><!--* rq150c *--><!--*
* material suppressed here by diff group b12300-diff10-silent *
*--><p dg="b3659">
The character sequence <string>+INF</string> has been added to the
lexical spaces of <dtref ref="float"/> and <dtref ref="double"/>.
</p></div2><div2 id="sec-chdt"><head>Date/time Datatypes</head><p><!--*
* material suppressed here by diff group wd4hax *
*--><phrase dg="wd4hax">The treatment of <dtref ref="dateTime"/> and related 
datatypes has been changed to provide a more explicit account of
the value space in terms of seven numeric properties.  The most
important substantive change is that values now explicitly retain
information about the <!--*
* material suppressed here by diff group b4642 *
*--><phrase dg="b4642">time zone offset</phrase> indicated in the lexical form; this
allows better alignment with the treatment of such values in 
<bibref ref="F_O"/>.</phrase></p><p dg="b6043">At the suggestion of the 
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2007/OWL/wiki/OWL_Working_Group">W3C OWL Working Group</loc>, a <compref ref="f-tz"/> facet
has been added to allow date/time datatypes to be restricted by
requiring or forbidding an explicit time zone offset from UTC,
instead of making it optional.  The <dtref ref="dateTimeStamp"/>
datatype has been defined using this facet.</p><p><!--*
* material suppressed here by diff group wd4hax *
*--><phrase dg="wd4hax">The
treatment of the date/time datatype includes a carefully revised
definition of order that ensures that for repeating datatypes (<dtref ref="time"/>, <dtref ref="gDay"/>, etc.), timezoned values will be
compared as though they are on the same <unusual>calendar
day</unusual> (<unusual>local</unusual> property values) so that in
any given timezone, the days start at the local midnight and end just
before local midnight.  Days do not run from 00:00:00Z to
24:00:00Z in timezones other than Z.</phrase>
</p><p dg="wd4hax">The lexical representation
<string>0000</string> for years is recognized and maps to the year 1
BCE; <string>-0001</string> maps to 2 BCE, etc.  This is a change from
version 1.0 of this specification, in order to align with established
practice (the so-called <unusual>astronomical year
numbering</unusual>) and <bibref ref="ISO8601"/>.</p><!--* 2006-02-14 MSM encounters some doubt that what Cassini 
introduced was exactly the curent astronomical numbering system. 
So I won't mention him. *--><p dg="wd4hax">
Algorithms for arithmetic involving <dtref ref="dateTime"/> and
<dtref ref="duration"/> values have been provided, and corrections
made to the <pfref ref="vp-dt-timeOnTimeline"/> function.
</p><!--* totl rq122a_sg dudt dudt2 rq122d_sg *--><!--* noleap leapseconds *--><p>The treatment of leap seconds is no longer <termref def="key-impl-def"/>:
the date/time types described here do not include leap-second values.
<!--*
* material suppressed here by diff group qd3hax *
*-->
</p><p dg="b4642">
At the suggestion of the 
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/International/core/">W3C 
Internationalization Core Working Group</loc>, most references to 
<quote>time zone</quote> have been replaced with references to 
<quote>time zone offset</quote>; this
resolves issue 
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=4642">4642
Terminology: zone offset versus time zone</loc>.
</p><p dg="b3659">
A number of syntactic and semantic errors in some of the regular
expressions given to describe the lexical spaces of the <termref def="dt-primitive"/>
datatypes (most notably the date/time datatypes) have been corrected.
</p><!--* 
<item diff="add" dg="b12657">
<p>Typographic errors in the regular expression describing the
lexical space of <dtref ref="duration"/> have been corrected; this
resolves issue
<loc href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=12657">12657
Regex for durationLexicalRep in 3.3.7.2 Lexical Mapping</loc>.
</p>
</item>
*--><p>The lexical mapping for times of the form <string>24:00:00</string> (with
or without a trailing decimal point and zeroes) has been specified
explicitly.</p><!--* 10658 *--></div2><div2 id="sec-chother" dg="wd4hax"><head>Other changes</head><p dg="wd4hax">Support has been added for <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/> 
version 1.1 and <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XMLNS" dg="b1838refs"/> version 1.1.  The 
datatypes which depend on <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/> and <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XMLNS" dg="b1838refs"/>
may now be used with the definitions provided by the 1.1 versions 
of those specifications, as well as with the definitions in the
1.0 versions.  It is <termref def="key-impl-def"/> whether software conforming
to this specification supports the definitions given in version 1.0,
or in version 1.1, of <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/> and <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XMLNS" dg="b1838refs"/>.</p><p dg="b6553">To reduce confusion and avert a widespread misunderstanding,
       the normative references to various W3C specifications now state
       explicitly that while the reference describes the particular edition
       of a specification current at the time this specification is
       published, conforming implementations of this specification 
       are not required to ignore later editions of the other
       specification but instead <rfc2119>may</rfc2119> support later editions, thus
       allowing users of this specification to benefit from corrections to other
       specifications on which this one depends.
      </p><p dg="b5948b">
<phrase dg="dg-201112">
The reference 
<!--* 
<loc href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=5948">5948
Reference to Unicode Database</loc>
*-->
to the Unicode Database <bibref ref="UnicodeDB"/>
has been updated from version 4.1.0 to version 5.1.0,
at the suggestion of the 
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/International/core/">W3C 
Internationalization Core Working Group</loc>
</phrase>
<!--*
* material suppressed here by diff group dg-201112 *
*-->
</p><!--*
<p diff="add" dg="dg-201112">These changes resolve issue
<loc href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=8732">8732
Unicode 5.2</loc>.
</p>
*--><!--*
* material suppressed here by diff group dg-201112 *
*--><p dg="b5948">
<!--* 5948 and 5950 *-->
References to various other specifications have also been updated.
</p><p><!--*
* material suppressed here by diff group wd4hax *
*--><phrase dg="wd4hax">The account of the value space of <dtref ref="duration"/> has been changed to specify that values consist only
of two numbers (the number of months and the number of seconds) rather
than six (years, months, days, hours, minutes, seconds).  This allows
clearly equivalent durations like P2Y and P24M to have the same
value.</phrase></p><p>Two new totally ordered restrictions of <dtref ref="duration"/>
have been defined: <dtref ref="yearMonthDuration"/>, defined in
<specref ref="yearMonthDuration"/>, and <dtref ref="dayTimeDuration"/>, defined in <specref ref="dayTimeDuration"/>.
This allows better alignment with the treatment of durations in
<bibref ref="F_O"/>.</p><p dg="wd4hax">The XML representations of the <termref def="dt-primitive"/> and
<termref def="dt-ordinary"/> built-in datatypes have been moved out of the schema document
for schema documents in <specref ref="schema"/> and into a 
different appendix (<specref ref="prim.nxsd"/>).</p><!--* wd-2 wd-3 wd-4 wd-5 wd-11 wd-19 wd-21 wd26 wd31 *--><p dg="wd4hax">Numerous minor corrections have been made in response to comments
on earlier working drafts.</p><!--* including, inter alia
    * 10650 typo
    * 10658 lexical mapping for end of day supplied 
    * 11006 botched wording transitive membership / basic members
    * 11093 wf error in s4sd
    *--><!--* rec12-tableaux rec12-main rec12-map-1853 rec12-main-eff-ok
rec12-map rec12-map-eff rec12-main-dub *--><p dg="wd4hax">The treatment of topics handled both in this specification and in
<bibref ref="structural-schemas"/> has been revised to align
the two specifications more closely.</p><!--* wd25 *--><p dg="wd4hax">Several references to other specifications have been updated to
refer to current versions of those specifications, including
<!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XML" dg="b1838refs"/>, <!--*
* material suppressed here by diff group b1838refs *
*--><bibref ref="XMLNS" dg="b1838refs"/>,
<bibref ref="RFC3986"/>, 
<bibref ref="RFC3987"/>, and
<bibref ref="RFC3548"/>.
</p><!--* rq100 *--><p dg="wd4hax">Requirements for the datatype-validity of values of type <dtref ref="language"/> have been clarified.</p><!--* rq21-boolean" rq21-lit" rq21-lexmaps" *--><!--* rq31m.add.rq21-lexmaps.del *--><!--* rq31fix.add.rq21-lexmaps.del *--><!--* dt3.add.rq21-lexmaps.del *--><!--* rq21-string *--><!--* rq21-string-tt *--><!--* b1902amend *--><p dg="wd4hax">Explicit definitions have been provided for the lexical and
<termref def="dt-canonical-mapping">canonical mappings</termref> of most of the primitive datatypes.
</p><p dg="b4602">Schema Component Constraint
      <specref ref="enumeration-required-notation"/>,
      which restricts the use of <dtref ref="NOTATION"/> 
      to validate <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase> without first enumerating a
      set of values, has been clarified.
     </p><!--* metachar-2531 *--><p dg="wd4hax">Some errors in the definition of regular-expression metacharacters
have been corrected.</p><!--* pattern-1929 *--><p dg="wd4hax">The descriptions of the <compref ref="f-p"/>
and <compref ref="f-e"/> facets have been revised to make clearer how
values from different derivation steps are combined.</p><!--* b2533-rq127-r196 *--><p dg="wd4hax">A warning against using the whitespace facet for tokenizing
natural-language data has been added on the request of the W3C
Internationalization Working Group.</p><p dg="b2044">In order to correct an error in 
version 1 of this specification and of <bibref ref="structural-schemas"/>,
<termref def="dt-union">unions</termref> are no longer forbidden to be members of other <termref def="dt-union">unions</termref>.
Descriptions of <termref def="dt-union"/> types have also 
been changed to reflect the fact that <termref def="dt-union">unions</termref> can be derived by
restricting other <termref def="dt-union">unions</termref>. The concepts of <termref def="dt-transitivemembership"/> 
(the members of all members, recursively) and
<termref def="dt-basicmember"/> (those datatypes in the transitive
membership which are not <termref def="dt-union">unions</termref>) have been introduced and are used.
</p><p dg="wgi-20080613">
The requirements of conformance have been clarified in various
ways.
<phrase dg="b5585">A distinction is now made between
<termref def="key-impl-def"/> and <termref def="key-impl-dep"/> features, and a list of
such features is provided in <specref ref="idef-idep"/>.</phrase>
<phrase dg="b5585">Requirements imposed on host languages which
use or incorporate the datatypes defined by this specification are
defined.</phrase></p><p dg="b3220">The definitions of <rfc2119>must</rfc2119>, <rfc2119>must not</rfc2119>, and
<termref def="dt-error"/> have been changed to specify that processors <rfc2119>must</rfc2119> detect and
report errors in schemas and schema documents (although the quality
and level of detail in the error report is not constrained).</p><p dg="b4395">
The lexical mapping of the <dtref ref="QName"/> datatype,
in particular its dependence on the namespace bindings in
scope at the place where the <!--*
* material suppressed here by diff group rq21-lit *
*--><phrase dg="rq21-lit"><termref def="dt-literal"/></phrase> appears, 
has been clarified.
</p><p dg="b3025">
The characterization of <termref def="dt-lexical-mapping">lexical mappings</termref> has been revised to say
more clearly when they are functions and when they are not, and when
(in the <termref def="dt-special"/> datatypes) there are values in the <termref def="dt-value-space"/> not
mapped to by any members of the <termref def="dt-lexical-space"/>.
</p><p dg="b2046">The nature of equality and identity of lists
has been clarified.</p><p dg="b3222">
Enumerations, identity constraints, and value constraints now 
<!--*
* material suppressed here by diff group b9196 *
*-->
<phrase dg="b9196">treat both identical values
and equal values as being the same for purposes of validation.
This affects primitive datatypes in which identity and equality
are not the same.  Positive and negative zero, for example,
are not treated as different for purposes of keys, keyrefs,
or uniqueness constraints, and an enumeration which includes
either zero will accept either zero.</phrase>
<!--* This change resolves issue
<loc href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=9196">9196
Enumeration and NaN</loc>. *-->
</p><p dg="b3228">
The mutual relations of lists and unions have been clarified, in
particular the restrictions on what kinds of datatypes <rfc2119>may</rfc2119> appear as
the <termref def="dt-itemType"/> of a list or among the <termref def="dt-memberTypes"/> of a union.
<!--* including clearer rules forbidding specials, for 11103 *-->
</p><p dg="b2861">
Unions with no member types (and thus with empty
<termref def="dt-value-space"/> and <termref def="dt-lexical-space"/>) are now explicitly allowed.
</p><p dg="b3235">
Cycles in the definitions of <termref def="dt-union">unions</termref> and in the
derivation of simple types are now explicitly forbidden.
</p><p dg="wgi-20080613">
A number of minor errors and obscurities have been fixed.
</p><!--*  <p>Several editorial corrections and improvements have been made.     </p>
 *--><!--* 6908 definition of pattern facet *--><!--* 6938 typos in note in 'time' section facet *--><!--* 6939 typo in time value comparison *--><!--* 6943 timezoned, un-, non- *--><!--* 6944 error in algorithm timeOnTimeline *--><!--* 6945 error in algorithm normalizeMonth *--><!--* 6698 provide both dated and undated schema documents and DTDs *--><!--* 3027 erroneous date example (again) *--><!--* ep34 Dave P's change to some notations in regex appendix *--><!--*
<item diff="add" dg="b7756edn">
<p>A <loc href="#edn7756">wording proposal</loc> which resolves issue
<loc href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=7756">7756</loc>
"charGroupPart prose and production mismatch".&nbsp;
The proposal has been tentatively adopted by the Working Group, with the
option to the editors to propose a different proposal if they come up with
one they like better.</p>
</item>

<item diff="add" dg="b7758edn">
<p>A <loc href="#edn7758">wording proposal</loc> which resolves issue
<loc href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=b7758">b7758</loc>
"Incorrect production for charGroup in regular expression appendix".&nbsp;
The proposal has been tentatively adopted by the Working Group, with the
option to the editors to propose a different proposal if they come up with
one they like better.</p>
</item>
*--><!--*
<item diff="add" dg="b6939"><p>A wording proposal
which resolves issue
<loc href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=6939">6939</loc>
" 'time' value comparison".&nbsp;
The proposal has already been adopted by the Working Group.</p></item>

<item diff="add" dg="b6943"><p><loc href="#edn6943">A wording proposal</loc>
which resolves issue
<loc href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=6943">6943</loc>
"Minor editorial issue: nontimezoned or untimezoned".&nbsp;
The proposal has already been adopted by the Working Group.</p></item>

<item diff="add" dg="b6944"><p><loc href="#edn6944">A wording proposal</loc>
which resolves issue
<loc href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=6944">6944</loc>
"Oops! in algorithm of timeOnTimeline".&nbsp;
The proposal has already been adopted by the Working Group.</p></item>

<item diff="add" dg="b6945"><p><loc href="#edn6945">A wording proposal</loc>
which resolves issue
<loc href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=6945">6945</loc>
"Oops! in algorithm of normalizeMonth".&nbsp;
The proposal has already been adopted by the Working Group.</p></item>
*--></div2><!--*
* material suppressed here by diff group fpwd-add-lc-del *
*--></div1><div1 role="1.0" id="normative-glossary"><head>Glossary (non-normative)</head><p>The listing below is for the benefit of readers of a printed version of this
document:  it collects together all the definitions which appear in the
document above.</p><ednote role="glossary"><edtext>An XSL macro is used to
collect definitions from throughout the spec and gather them here for easy
reference.</edtext></ednote><!--* do not delete the preceding ednote, unless you wish to suppress
    * the generation of the glossary *--></div1><div1 role="1.0" id="biblio"><head>References</head><!--
   bibls can be in any order and the stylesheet will sort them
   by the value of their key attribute.

   But references are easier to find if they are in key order,
   more or less, so they've been sorted by hand.  Keep them straight!
  --><div2 role="1.0" id="normative-biblio"><head>Normative</head><!--*
* material suppressed here by diff group dp090225 *
*--><blist><!--*
* material suppressed here by diff group ep6553 *
*--><!--*
* material suppressed here by diff group b6664a *
*--><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="IEEE 754-2008" dg="b6664a" id="ieee754-2008">
IEEE.  <emph>IEEE Standard for Floating-Point Arithmetic</emph>. 29
August 2008. <loc href="http://ieeexplore.ieee.org/servlet/opac?punumber=4610933">http://ieeexplore.ieee.org/servlet/opac?punumber=4610933</loc>
<!--* 2011-07-18 Changed from the now-broken
<loc
href="http://ieeexplore.ieee.org/ISOL/standardstoc.jsp?punumber=4610933"
>http://ieeexplore.ieee.org/ISOL/standardstoc.jsp?punumber=4610933</loc>
*--></bibl><!--*
* material suppressed here by diff group add.leapseconds.ep6553.del.as.add *
*--><!--*
* material suppressed here by diff group add.leapseconds.ep6553.del.as.del *
*--><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="Namespaces in XML 1.0" id="XMLNS1.0">
      <!--* N.B. this bibl element is processed by dg-localhacks.xsl
          * with an ad-hoc template.  If the diff status of the bibl
          * element changes, or if it acquires new attributes, update
          * that template. (2009-07-16, MSM) *-->
World Wide Web Consortium.  <emph>Namespaces in XML <phrase diff="del" dg="ep35"><phrase dg="ep6553">1.0 (Second Edition)</phrase></phrase><phrase diff="add" dg="ep35">1.0 (Third Edition)</phrase></emph><phrase dg="ep6553">,
ed. Tim Bray et al</phrase>.
<phrase dg="b6553">W3C Recommendation 
<phrase diff="del" dg="ep35">16 August 2006</phrase><phrase diff="add" dg="ep35">8 December 2009</phrase>.</phrase>
Available at:
<loc href="http://www.w3.org/TR/xml-names/">http://www.w3.org/TR/xml-names/</loc>
<phrase role="annotation" dg="b1838"><phrase dg="b6553">
The edition cited is the one current at the date of publication of this
specification. Implementations <rfc2119>may</rfc2119> follow the edition cited and/or
any later edition(s); it is implementation-defined which.</phrase>
For details of the 
dependency of this specification 
on Namespaces in XML 1.0, see <specref ref="intro-relatedWork"/>.
</phrase></bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="Namespaces in XML" dg="b1838" id="XMLNS">
World Wide Web Consortium.  <emph>Namespaces in XML 1.1
<phrase dg="ep6553">(Second Edition)</phrase></emph><phrase dg="ep6553">,
ed. Tim Bray et al</phrase>. 
<phrase dg="b6553">W3C Recommendation 
16 August 2006.</phrase>
Available at:
<loc href="http://www.w3.org/TR/xml-names11/">http://www.w3.org/TR/xml-names11/</loc>
<phrase role="annotation"><phrase dg="b6553">
The edition cited is the one current at the date of publication of this
specification. Implementations <rfc2119>may</rfc2119> follow the edition cited and/or
any later edition(s); it is implementation-defined which.
</phrase>
For details of the dependency of this specification 
on Namespaces in XML 1.1, see <specref ref="intro-relatedWork"/>.
</phrase></bibl><!--*
* material suppressed here by diff group wd-19 *
*--><!--*
* material suppressed here by diff group b4089 *
*--><!--
<bibl key="RFC 2732" id="RFC2732" href="http://www.ietf.org/rfc/rfc2732.txt">
--><!--*
* material suppressed here by diff group b4089 *
*--><!--*
* material suppressed here by diff group rq100 *
*--><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="RFC 3548" id="RFC3548" dg="wd-19">
<phrase dg="wd-19">S. Josefsson, ed. 
<emph>RFC 3548: The Base16, Base32, and Base64 Data Encodings</emph>.
July 2003.  Available at:
<loc href="http://www.ietf.org/rfc/rfc3548.txt">
http://www.ietf.org/rfc/rfc3548.txt</loc>
</phrase>
</bibl><!--*
* material suppressed here by diff group wd31 *
*--><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="Unicode Database" dg="wd31" id="UnicodeDB">
<!--*
* material suppressed here by diff group b8732 *
*-->
<phrase dg="b8732">
The Unicode Consortium. <emph>Unicode Character Database</emph>.
Revision 3.1.0, ed. Mark Davis and Ken Whistler.
2001-02-28.
Available at: 
<loc href="http://www.unicode.org/Public/3.1-Update/UnicodeCharacterDatabase-3.1.0.html">
http://www.unicode.org/Public/3.1-Update/UnicodeCharacterDatabase-3.1.0.html</loc>.
For later versions, see
<loc href="http://www.unicode.org/versions/">http://www.unicode.org/versions/</loc>.
The edition cited is the one current at the date of publication of XSD 1.0. 
Implementations <rfc2119>may</rfc2119> follow the edition cited and/or
any later edition(s); it is implementation-defined which.
</phrase>
</bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XDM" id="XDM" dg="ep6553">
<phrase id="bibdata.xdm" dg="ep6553">
World Wide Web Consortium. <emph>XQuery 1.0 and XPath 2.0 Data Model 
(XDM)<phrase diff="add" dg="ep35"> (Second Edition)</phrase></emph>,
ed. Mary Fernández<!--*
* material suppressed here by diff group ep6553 *
*--><phrase dg="ep6553"> et al.</phrase>
W3C Recommendation 
<phrase diff="del" dg="ep35">23 January 2007</phrase><phrase diff="add" dg="ep35">14 December 2010</phrase>.
Available at:
<!--*
* material suppressed here by diff group b6553 *
*--><loc href="http://www.w3.org/TR/xpath-datamodel/" dg="b6553">http://www.w3.org/TR/xpath-datamodel/</loc>.
</phrase>
</bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XML 1.0" id="XML1.0">
      <!--* N.B. this bibl element is processed by dg-localhacks.xsl
          * with an ad-hoc template.  If the diff status of the bibl
          * element changes, or if it acquires new attributes, update
          * that template. (2009-07-16, MSM) *-->
<phrase dg="ep6553">World Wide Web Consortium.</phrase>
<emph>Extensible Markup Language (XML) 1.0<!--*
* material suppressed here by diff group b6553 *
*--><phrase dg="b6553"> (Fifth Edition)</phrase></emph>, <phrase dg="ep6553">ed.</phrase>
Tim Bray et al.<!--*
* material suppressed here by diff group ep6553 *
*-->
<phrase dg="b6553">W3C Recommendation 26 November 2008.</phrase>
<!--*
* material suppressed here by diff group b6553 *
*--><phrase dg="b6553">Available at
<loc href="http://www.w3.org/TR/xml/">http://www.w3.org/TR/xml/</loc>.
</phrase> 
<phrase role="annotation" dg="b1838"><phrase dg="b6553">
The edition cited is the one current at the date of publication of this
specification. Implementations <rfc2119>may</rfc2119> follow the edition cited and/or
any later edition(s); it is implementation-defined which.
</phrase>
For details of the 
dependency of this specification 
on XML, see <specref ref="intro-relatedWork"/>.
</phrase>
</bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XML" dg="b1838" id="XML">
<phrase dg="ep6553">World Wide Web Consortium.</phrase>
<emph>Extensible Markup Language (XML) 1.1<phrase dg="b6553">
(Second Edition)</phrase><!--*
* material suppressed here by diff group ep6553 *
*--></emph>, 
<phrase dg="ep6553">ed.</phrase>
Tim Bray et al.<!--*
* material suppressed here by diff group ep6553 *
*-->
<phrase dg="b6553">W3C Recommendation 16 August 2006, edited in place 29 September 2006.</phrase>
<!--*
* material suppressed here by diff group b6553 *
*--><phrase dg="b6553">Available at</phrase> 
<loc href="http://www.w3.org/TR/xml11/">http://www.w3.org/TR/xml11/</loc>
<phrase role="annotation"><phrase dg="b6553">
The edition cited is the one current at the date of publication of this
specification. Implementations <rfc2119>may</rfc2119> follow the edition cited and/or
any later edition(s); it is implementation-defined which.
</phrase>
For details of the dependency of this specification 
on XML 1.1, see <specref ref="intro-relatedWork"/>.
</phrase></bibl><!--*
* material suppressed here by diff group ep6553 *
*--><!--*
* material suppressed here by diff group ep6553 *
*--><!--*
* material suppressed here by diff group ep6553 *
*--><!--*
* material suppressed here by diff group ep26 *
*--><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XPath 2.0" id="XPATH2" dg="ep6553">
<phrase id="bibdata.xpath20" dg="ep6553">
World Wide Web Consortium. 
<emph>XML Path Language <phrase diff="add" dg="ep35">(XPath)</phrase>
2.0<phrase diff="add" dg="ep35"> (Second Edition)</phrase></emph>,
ed. Anders Berglund<!--*
* material suppressed here by diff group ep6553 *
*--><phrase dg="ep6553"> et al.</phrase>
W3C Recommendation 
<phrase diff="del" dg="ep35">23 January 2007</phrase><phrase diff="add" dg="ep35">14 December 2010 
<emph>(Link errors corrected 3 January 2011)</emph></phrase>.
Available at:
<!--*
* material suppressed here by diff group b6553 *
*--><loc href="http://www.w3.org/TR/xpath20/" dg="b6553">http://www.w3.org/TR/xpath20/</loc>.
</phrase>
</bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XQuery 1.0 and XPath 2.0 Functions and Operators" id="F_O">
<phrase id="bibdata.fno" dg="ep6553">
World Wide Web Consortium. 
<emph>XQuery 1.0 and XPath 2.0 Functions and Operators<phrase diff="add" dg="ep35">
(Second Edition)</phrase></emph>,
ed. Ashok Malhotra<phrase diff="del" dg="ep35">, Jim Melton, and Norman Walsh</phrase><phrase diff="add" dg="ep35"> et al</phrase>. 
<!--*
* material suppressed here by diff group b6553 *
*-->
<phrase dg="b6553">W3C Recommendation 
<phrase diff="del" dg="ep35">23 January 2007</phrase><phrase diff="add" dg="ep35">14 December 2010</phrase>.</phrase>
Available at:
<!--*
* material suppressed here by diff group b6553 *
*--><loc href="http://www.w3.org/TR/xpath-functions/" dg="b6553">http://www.w3.org/TR/xpath-functions/</loc>.
</phrase>
</bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XSD 1.1 Part 1: Structures" id="structural-schemas" dg="ep26">
<phrase dg="ep6553">World Wide Web Consortium.</phrase>
<emph>W3C XML Schema Definition Language (XSD) 1.1 Part 1:
Structures</emph>, ed. Shudi (Sandy) Gao 高殊镝,
C. M. Sperberg-McQueen,
and Henry S. Thompson.
<phrase dg="ep6553">W3C Recommendation 5 April 2012.</phrase>
Available at: <loc id="magic-uri-xsd-part1" href="http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html">http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html</loc>
<!--* <loc href="&xsd-str-shortname;" diff="add" dg="b6553">&xsd-str-shortname;</loc> *-->
<phrase role="annotation" dg="b6553">
The edition cited is the one current at the date of publication of this
specification. Implementations <rfc2119>may</rfc2119> follow the edition cited and/or
any later edition(s); it is implementation-defined which.
</phrase>
</bibl></blist></div2><div2 role="1.0" id="non-normative-biblio"><head>Non-normative</head><blist><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="BCP 47" id="BCP47" dg="b4850">
<phrase dg="b4850">Internet Engineering Task Force (IETF).  
Best Current Practices 47.
2006. Available at: 
<loc href="http://tools.ietf.org/rfc/bcp/bcp47">http://tools.ietf.org/rfc/bcp/bcp47</loc><phrase dg="ep26"><!--*
* material suppressed here by diff group ep6553 *
*--><phrase dg="ep6553">.</phrase>
<phrase dg="ep6553">Concatenation of
<emph>RFC 4646:  Tags for Identifying Languages</emph>, 
ed. A. Phillips and M. Davis, September 2006,</phrase>
<loc href="http://www.ietf.org/rfc/bcp/bcp47.txt">http://www.ietf.org/rfc/bcp/bcp47.txt</loc>,
and
<phrase dg="ep6553">
<emph>RFC 4647:  Matching of Language Tags</emph>, 
ed. A Phillips and M. Davis, September 2006,</phrase>
<loc href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt">http://www.rfc-editor.org/rfc/bcp/bcp47.txt</loc></phrase>.
</phrase></bibl><!--*
* material suppressed here by diff group ep6553 *
*--><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="Clinger, WD (1990)" id="clinger1990" dg="ep6553">
<phrase id="bib-clinger" dg="ep6553">William D Clinger. 
<emph>How to Read Floating Point Numbers Accurately.</emph>
In <emph>Proceedings of Conference on Programming Language Design and
Implementation</emph>, pages 92-101.
Available at: <loc href="ftp://ftp.ccs.neu.edu/pub/people/will/howtoread.ps">
ftp://ftp.ccs.neu.edu/pub/people/will/howtoread.ps</loc>
<!--* N.B. whenever I link check, this link comes back with a 500
    * 'internal server error'.  When I try to link to it using a browser,
    * i get no useful response; presumably also a 500.
    * But the server is there, and responds normally when I ftp to it.
    * So for now let's leave this link here.
    *-->
</phrase>
</bibl><!--*
* material suppressed here by diff group ep6553 *
*--><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="HTML 4.01" id="html4">
World Wide Web Consortium.  <!--*
* material suppressed here by diff group ep6553 *
*--><phrase dg="ep6553"><emph>HTML 4.01
Specification</emph>, ed. Dave Raggett,
Arnaud Le Hors, 
and
Ian Jacobs</phrase>.
<phrase dg="b6553">W3C Recommendation 24 December 1999.</phrase>
Available at:
<!--*
* material suppressed here by diff group b6553 *
*--><loc href="http://www.w3.org/TR/html401/" dg="b6553">http://www.w3.org/TR/html401/</loc>
</bibl><!--*
* material suppressed here by diff group b5950 *
*--><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="International Earth Rotation Service (IERS)" id="IERS">
International  Earth Rotation Service (IERS).
See <loc href="http://maia.usno.navy.mil">http://maia.usno.navy.mil</loc>
</bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="ISO 8601" id="ISO8601">
ISO (International Organization for Standardization).
<emph>Representations of dates and times, 1988-06-15.</emph>
</bibl><!--*
* material suppressed here by diff group ep6553 *
*--><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="ISO 8601:2000 Second Edition" id="ISO8601-2000">
ISO (International Organization for Standardization).
<emph>Representations of dates and times, second edition, 2000-12-15.</emph>
</bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="ISO 11404" id="ISO11404">
ISO (International Organization for Standardization).
<emph>Language-independent Datatypes.</emph>  
<phrase dg="crhax">ISO/IEC 11404:2007.</phrase>
See
<!--*
* material suppressed here by diff group crhax *
*-->
<!--* ISO has reorganized their web site AGAIN.  Once more and
I'm just removing the link entirely. *-->
<phrase dg="crhax">
<loc href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=39479">http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=39479</loc>
</phrase>
<!--* 
<phrase diff="add" dg="qd3hax"><loc href="http://www.iso.ch/">
http://www.iso.ch/<phrase diff="del" dg="wd3hax">cate/d19346.html</phrase></loc></phrase> 
*-->
</bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="ITU-R TF.460-6" id="itu-r-460-6" dg="add.leapseconds.ep6553.del.as.del">
<phrase id="bib.itu-r-tf-460-6" dg="ep6553">International 
Telecommunication Union (ITU).
<emph>Recommendation ITU-R TF.460-6: Standard-frequency
and time-signal emissions</emph>.  
[Geneva: ITU, February 2002.]</phrase></bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="LEIRI" id="LEIRIs" dg="b3264"><phrase dg="b3264">
<emph>Legacy extended IRIs for XML resource identification</emph>,
ed. Henry S. Thompson, Richard Tobin, and Norman Walsh.
W3C Working Group Note 3 November 2008<phrase diff="add" dg="ep35">
(BNF comment style corrected in place 2009-07-09)</phrase>. 
See <loc href="http://www.w3.org/TR/leiri/">http://www.w3.org/TR/leiri/</loc></phrase></bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="Perl" id="Perl">
The Perl Programming Language.  See 
<!--*
* material suppressed here by diff group pr-201201 *
*--><loc href="http://www.perl.org/get.html" dg="pr-201201">
http://www.perl.org/get.html</loc>
</bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="Precision Decimal" id="pd-note" dg="b12572">
World Wide Web Consortium. 
<emph>An XSD datatype for IEEE floating-point decimal</emph>,
ed. David Peterson and C. M. Sperberg-McQueen.
W3C Working Group Note 9 June 2011.
Available at
<loc href="http://www.w3.org/TR/xsd-precisionDecimal/">http://www.w3.org/TR/xsd-precisionDecimal/</loc>
</bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="RDF Schema" id="RDFSchema">
World Wide Web Consortium. 
<!--*
* material suppressed here by diff group ep6553 *
*--><emph dg="ep6553">RDF Vocabulary Description Language 1.0: RDF Schema</emph><phrase dg="ep6553">,
ed. Dan Brickley and R. V. Guha</phrase>.
<phrase dg="b6553">W3C Recommendation 10 February 2004.</phrase>
Available at:
<!--*
* material suppressed here by diff group b6553 *
*--><loc href="http://www.w3.org/TR/rdf-schema/" dg="b6553">http://www.w3.org/TR/rdf-schema/</loc>
</bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="RFC 2045" id="RFC2045" dg="wd-19">
<phrase dg="wd-19">N. Freed and N. Borenstein. 
<emph>RFC 2045: Multipurpose Internet Mail Extensions
(MIME) Part One: Format of Internet Message Bodies</emph>. 1996.  Available at:
<loc href="http://www.ietf.org/rfc/rfc2045.txt">
http://www.ietf.org/rfc/rfc2045.txt</loc>
</phrase>
</bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="RFC 3066" id="RFC3066" dg="rq100">
H. Alvestrand, ed. <emph>RFC 3066: Tags for the Identification of Languages</emph>
1995. Available at: <loc href="http://www.ietf.org/rfc/rfc3066.txt">
http://www.ietf.org/rfc/rfc3066.txt</loc>
</bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="RFC 3986" dg="wd25" id="RFC3986">
<phrase dg="wd25">T. Berners-Lee,
R. Fielding, and L. Masinter,
<emph>RFC 3986: Uniform Resource Identifier (URI): Generic 
Syntax</emph>. January 2005.  Available at:
<loc href="http://www.ietf.org/rfc/rfc3986.txt">
http://www.ietf.org/rfc/rfc3986.txt</loc>
</phrase>
</bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="RFC 3987" dg="wd25" id="RFC3987">
<phrase dg="wd25">M. Duerst and M. Suignard. 
<emph>RFC 3987: Internationalized Resource Identifiers (IRIs)
</emph>. January 2005.  Available at:
<loc href="http://www.ietf.org/rfc/rfc3987.txt">
http://www.ietf.org/rfc/rfc3987.txt</loc>
</phrase>
</bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="RFC 4646" id="RFC4646" dg="b4850">
<phrase dg="b4850">A. Phillips and M. Davis, ed. 
<emph>RFC 4646: Tags for Identifying Languages</emph>
2006. Available at: <loc href="http://www.ietf.org/rfc/rfc4646.txt">
http://www.ietf.org/rfc/rfc4646.txt</loc>
</phrase></bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="RFC 4647" id="RFC4647" dg="b4850">
<phrase dg="b4850">A. Phillips and M. Davis, ed. 
<emph>RFC 4647: Matching of Language Tags</emph>
2006. Available at: <loc href="http://www.ietf.org/rfc/rfc4647.txt">
http://www.ietf.org/rfc/rfc4647.txt</loc>
</phrase></bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="Ruby" id="ruby">
World Wide Web Consortium. 
<emph dg="b6553">Ruby Annotation</emph><phrase dg="ep6553">,
ed. Marcin Sawicki et al</phrase>.
<phrase dg="ep6553"> W3C Recommendation 31 May 2001 
(Markup errors corrected 25 June 2008).</phrase>
Available at:
<!--*
* material suppressed here by diff group ep6553 *
*-->
<loc href="http://www.w3.org/TR/ruby/" dg="ep6553">http://www.w3.org/TR/ruby/</loc>
</bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="SQL" id="SQL">
ISO (International Organization for Standardization).  <emph>ISO/IEC
9075-2:1999, Information technology --- Database languages ---
SQL --- Part 2: Foundation (SQL/Foundation)</emph>.
[Geneva]: International Organization for Standardization, 1999.
See <!--*
* material suppressed here by diff group qd3hax *
*--><phrase dg="qd3hax"><loc href="http://www.iso.org/iso/home.htm">
http://www.iso<!--*
* material suppressed here by diff group wd3hax *
*--><phrase dg="wd3hax">.org/iso/home.htm</phrase></loc></phrase>
<!--* 
<phrase diff="add" dg="qd3hax"><loc href="http://www.iso.ch/">
http://www.iso.ch/<phrase diff="del" dg="wd3hax">cate/d26197.html</phrase></loc></phrase>
*-->
</bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="Timezones" id="ref-timezones" dg="b4642">
<phrase dg="b4642">
World Wide Web Consortium.
<emph>Working with Time Zones</emph>,
ed. Addison Phillips et al.
W3C Working Group Note <!--*
* material suppressed here by diff group ep37 *
*--><phrase dg="ep37">5 July 2011</phrase>.
Available at <loc href="http://www.w3.org/TR/timezone/">http://www.w3.org/TR/timezone/</loc></phrase> 
</bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="Unicode Regular Expression Guidelines" id="unicodeRegEx">
Mark Davis.  <emph>Unicode Regular Expression Guidelines</emph>, 1988.
Available at: 
<!--*
* material suppressed here by diff group pr-201201 *
*--><loc href="http://www.unicode.org/reports/tr18/" dg="pr-201201">
http://www.unicode.org/unicode/reports/tr18/</loc>
</bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="Unicode block names" id="unicode-escapes" dg="b8732">
World Wide Web Consortium.
<emph>Unicode block names for use in XSD regular expressions</emph>, 
ed. C. M. Sperberg-McQueen.
W3C Working Group Note <phrase diff="del" dg="ep35">to-be-published-rsn</phrase><phrase diff="add" dg="ep35">9 June 2011</phrase>.
Available at: 
<loc href="http://www.w3.org/TR/xsd-unicode-blocknames/">http://www.w3.org/TR/xsd-unicode-blocknames/</loc>
</bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="U.S. Naval Observatory Time Service Department" id="USNavy">
<emph>Information about Leap Seconds</emph>
Available at:
<!--* <loc href="http://tycho.usno.navy.mil/leapsec.990505.html">http://tycho.usno.navy.mil/leapsec.990505.html</loc> *-->
<loc href="http://tycho.usno.navy.mil/leapsec.html">http://tycho.usno.navy.mil/leapsec.html</loc>
<!--* old URI gave a 404 on 2006-01-08.  I *think* the new one is
    * the current version of the same resource (for some
    * definition of 'resource' and some definition of 'same')
    *-->
</bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="USNO Historical List" id="USNavy_leaps" dg="rq122a_sg">
U.S. Naval Observatory Time Service Department,
<emph>Historical list of leap seconds</emph>
Available at:
<loc href="ftp://maia.usno.navy.mil/ser7/tai-utc.dat">ftp://maia.usno.navy.mil/ser7/tai-utc.dat</loc>
</bibl><!--*
* material suppressed here by diff group add.b5030.ep6553.del.as.add *
*--><!--*
* material suppressed here by diff group add.b5030.ep6553.del.as.del *
*--><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XML Schema Language: Part 0 Primer" id="schema-primer">
World Wide Web Consortium. 
XML Schema Language: Part 0 Primer<phrase dg="b6553"> 
Second Edition</phrase><phrase dg="ep6553">,
ed. David C. Fallside and Priscilla Walmsley</phrase>. 
<phrase dg="b6553">W3C Recommendation 28 October 2004.</phrase>
Available at:
<loc href="http://www.w3.org/TR/xmlschema-0/">
http://www.w3.org/TR/xmlschema-0/</loc>
</bibl><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XML Schema Requirements" id="schema-requirements"><phrase dg="fpwd">
<emph>XML Schema Requirements </emph>, 
<phrase dg="ep6553">ed.</phrase>
Ashok Malhotra and Murray Maloney<!--*
* material suppressed here by diff group ep6553 *
*--><phrase dg="ep6553">.</phrase>
W3C<!--*
* material suppressed here by diff group ep6553 *
*--><phrase dg="ep6553">
Note</phrase> 15 February 1999. <!--*
* material suppressed here by diff group ep6553 *
*-->
<phrase dg="ep6553">Available at:</phrase>
<!--*
* material suppressed here by diff group b6553 *
*--><loc href="http://www.w3.org/TR/NOTE-xml-schema-req" dg="b6553">http://www.w3.org/TR/NOTE-xml-schema-req</loc></phrase> </bibl><!--*
* material suppressed here by diff group add.b5030.ep6553.del.as.add *
*--><!--*
* material suppressed here by diff group add.b5030.ep6553.del.as.del *
*--><!--*
* material suppressed here by diff group ep6553 *
*--><bibl xmlns:xlink="http://www.w3.org/1999/xlink" key="XSL" id="XSL">
World Wide Web Consortium. 
<emph>Extensible Stylesheet Language (XSL)</emph><phrase dg="ep6553">,
ed. Anders Berglund</phrase>.
<phrase dg="b6553">W3C Recommendation 05 December 2006.</phrase>
Available at:  
<!--*
* material suppressed here by diff group b6553 *
*--><loc href="http://www.w3.org/TR/xsl11/" dg="b6553">http://www.w3.org/TR/xsl11/</loc>
</bibl></blist></div2></div1><div1 role="1.0" id="acknowledgments"><head>Acknowledgements (non-normative)</head><p><!--*
* material suppressed here by diff group fpwd *
*--><phrase dg="fpwd">Along with the
editors thereof, the</phrase> following <!--*
* material suppressed here by diff group fpwd *
*-->
contributed material to the first 
<!--*
* material suppressed here by diff group  *
*--><phrase>version</phrase> 
of this specification:</p><slist><sitem>Asir S. Vedamuthu, webMethods, Inc</sitem><sitem>Mark Davis, IBM</sitem></slist><p>Co-editor Ashok Malhotra's work on this specification from March 1999 until
February 2001 was supported by IBM, and from then
until May 2004 by Microsoft.  Since July 2004 his work
on this specification has been supported by Oracle Corporation.</p><p dg="ed200902">The work of Dave Peterson
as a co-editor of this specification was supported by IDEAlliance
(formerly GCA) through March 2004, and beginning in 
April 2004 by SGML<emph>Works!</emph>.</p><p dg="ed200902">The work of C. M. Sperberg-McQueen
as a co-editor of this specification was supported by the World
Wide Web Consortium through January 2009 and again from June 2010
through May 2011, and beginning in 
February 2009 by Black Mesa Technologies LLC.
</p><p>The XML Schema Working Group acknowledges with thanks the members 
of other W3C Working Groups and industry experts in other
forums who have contributed directly or indirectly to the creation
of this document and its predecessor.</p><p>At the time this <!--*
* material suppressed here by diff group pr-201201 *
*--><phrase dg="pr-201201">document</phrase> is published, the members 
in good standing of the XML Schema Working Group are:</p><orglist><member><name>David Ezell</name><affiliation>National Association of Convenience Stores (NACS)</affiliation><role>chair</role></member><member><name>Shudi (Sandy) Gao 高殊镝</name><affiliation>IBM</affiliation></member><member><name>Mary Holstege</name><affiliation>Mark Logic</affiliation></member><member><name>Sam Idicula</name><affiliation>Oracle Corporation</affiliation></member><member><name>Michael Kay</name><affiliation>Invited expert</affiliation></member><member><name>Jim Melton</name><affiliation>Oracle Corporation</affiliation></member><member><name>Dave Peterson</name><affiliation>Invited expert</affiliation></member><member><name>Liam Quin</name><affiliation>W3C</affiliation><role>staff contact</role></member><member><name>C. M. Sperberg-McQueen</name><affiliation>invited expert</affiliation></member><member><name>Henry S. Thompson</name><affiliation>University of Edinburgh</affiliation></member><member><name>Kongyi Zhou</name><affiliation>Oracle Corporation</affiliation></member></orglist><p>The XML Schema Working Group has benefited in its work from the
participation and contributions of a number of people who are no
longer members of the Working Group in good standing at the time 
of publication of this Working Draft.  Their names are given below.  
In particular we note
with sadness the accidental death of Mario Jeckle shortly before
publication of the first Working Draft of XML Schema 1.1.
Affiliations given are (among) those current at the time of the
individuals' work with the WG.
</p><orglist><member><name>Paula Angerstein</name><affiliation>Vignette Corporation</affiliation></member><member><name>Leonid Arbouzov</name><affiliation>Sun Microsystems</affiliation></member><member><name>Jim Barnette</name><affiliation>Defense Information Systems Agency (DISA)</affiliation></member><member><name>David Beech</name><affiliation>Oracle Corp.</affiliation></member><member><name>Gabe Beged-Dov</name><affiliation>Rogue Wave Software</affiliation></member><member><name>Laila Benhlima</name><affiliation>Ecole Mohammadia d'Ingenieurs Rabat (EMI)</affiliation></member><member><name>Doris Bernardini</name><affiliation>Defense Information Systems Agency (DISA)</affiliation></member><member><name>Paul V. Biron</name><affiliation>HL7; later Invited expert</affiliation></member><member><name>Don Box</name><affiliation>DevelopMentor</affiliation></member><member><name>Allen Brown</name><affiliation>Microsoft</affiliation></member><member><name>Lee Buck</name><affiliation>TIBCO Extensibility</affiliation></member><member><name>Greg Bumgardner</name><affiliation>Rogue Wave Software</affiliation></member><member><name>Dean Burson</name><affiliation>Lotus Development Corporation</affiliation></member><member><name>Charles E. Campbell</name><affiliation>Invited expert</affiliation></member><member><name>Oriol Carbo</name><affiliation>University of Edinburgh</affiliation></member><member><name>Wayne Carr</name><affiliation>Intel</affiliation></member><member><name>Peter Chen</name><affiliation>Bootstrap Alliance and LSU</affiliation></member><member><name>Tyng-Ruey Chuang</name><affiliation>Academia Sinica</affiliation></member><member><name>Tony Cincotta</name><affiliation>NIST</affiliation></member><member><name>David Cleary</name><affiliation>Progress Software</affiliation></member><member><name>Mike Cokus</name><affiliation>MITRE</affiliation></member><member><name>Dan Connolly</name><affiliation>W3C</affiliation><role>staff contact</role></member><member><name>Ugo Corda</name><affiliation>Xerox</affiliation></member><member><name>Roger L. Costello</name><affiliation>MITRE</affiliation></member><member><name>Joey Coyle</name><affiliation>Health Level Seven</affiliation></member><member><name>Haavard Danielson</name><affiliation>Progress Software</affiliation></member><member><name>Josef Dietl</name><affiliation>Mozquito Technologies</affiliation></member><member><name>Kenneth Dolson</name><affiliation>Defense Information Systems Agency (DISA)</affiliation></member><member><name>Andrew Eisenberg</name><affiliation>Progress Software</affiliation></member><member><name>Rob Ellman</name><affiliation>Calico Commerce</affiliation></member><member><name>Tim Ewald</name><affiliation>Developmentor</affiliation></member><member><name>Alexander Falk</name><affiliation>Altova GmbH</affiliation></member><member><name>David Fallside</name><affiliation>IBM</affiliation></member><member><name>George Feinberg</name><affiliation>Object Design</affiliation></member><member><name>Dan Fox</name><affiliation>Defense Logistics Information Service (DLIS)</affiliation></member><member><name>Charles Frankston</name><affiliation>Microsoft</affiliation></member><member><name>Matthew Fuchs</name><affiliation>Commerce One</affiliation></member><member><name>Andrew Goodchild</name><affiliation>Distributed Systems Technology Centre (DSTC Pty Ltd)</affiliation></member><member><name>Xan Gregg</name><affiliation>TIBCO Extensibility</affiliation></member><member><name>Paul Grosso</name><affiliation>Arbortext, Inc</affiliation></member><member><name>Martin Gudgin</name><affiliation>DevelopMentor</affiliation></member><member><name>Ernesto Guerrieri</name><affiliation>Inso</affiliation></member><member><name>Dave Hollander</name><affiliation>Hewlett-Packard Company</affiliation><role>co-chair</role></member><member><name>Nelson Hung</name><affiliation>Corel</affiliation></member><member><name>Jane Hunter</name><affiliation>Distributed Systems Technology Centre (DSTC Pty Ltd)</affiliation></member><member><name>Michael Hyman</name><affiliation>Microsoft</affiliation></member><member><name>Renato Iannella</name><affiliation>Distributed Systems Technology Centre (DSTC Pty Ltd)</affiliation></member><member><name>Mario Jeckle</name><affiliation>DaimlerChrysler</affiliation></member><member><name>Rick Jelliffe</name><affiliation>Academia Sinica</affiliation></member><member><name>Marcel Jemio</name><affiliation>Data Interchange Standards Association</affiliation></member><member><name>Simon Johnston</name><affiliation>Rational Software</affiliation></member><member><name>Kohsuke Kawaguchi</name><affiliation>Sun Microsystems</affiliation></member><member><name>Dianne Kennedy</name><affiliation>Graphic Communications Association</affiliation></member><member><name>Janet Koenig</name><affiliation>Sun Microsystems</affiliation></member><member><name>Setrag Khoshafian</name><affiliation>Technology Deployment International (TDI)</affiliation></member><member><name>Melanie Kudela</name><affiliation>Uniform Code Council</affiliation></member><member><name>Ara Kullukian</name><affiliation>Technology Deployment International (TDI)</affiliation></member><member><name>Andrew Layman</name><affiliation>Microsoft</affiliation></member><member><name>Dmitry Lenkov</name><affiliation>Hewlett-Packard Company</affiliation></member><member><name>Bob Lojek</name><affiliation>Mozquito Technologies</affiliation></member><member><name>John McCarthy</name><affiliation>Lawrence Berkeley National Laboratory</affiliation></member><member><name>Matthew MacKenzie</name><affiliation>XML Global</affiliation></member><member><name>Nan Ma</name><affiliation>China Electronics Standardization Institute</affiliation></member><member><name>Eve Maler</name><affiliation>Sun Microsystems</affiliation></member><member><name>Ashok Malhotra</name><affiliation>IBM, Microsoft, Oracle</affiliation></member><member><name>Murray Maloney</name><affiliation>Muzmo Communication, acting for Commerce One</affiliation></member><member><name>Paolo Marinelli</name><affiliation>University of Bologna</affiliation></member><member><name>Lisa Martin</name><affiliation>IBM</affiliation></member><member><name>Noah Mendelsohn</name><affiliation>Lotus; IBM; invited expert</affiliation></member><member><name>Adrian Michel</name><affiliation>Commerce One</affiliation></member><member><name>Alex Milowski</name><affiliation>Invited expert</affiliation></member><member><name>Don Mullen</name><affiliation>TIBCO Extensibility</affiliation></member><member><name>Murata Makoto</name><affiliation>Xerox</affiliation></member><member><name>Ravi Murthy</name><affiliation>Oracle</affiliation></member><member><name>Chris Olds</name><affiliation>Wall Data</affiliation></member><member><name>Frank Olken</name><affiliation>Lawrence Berkeley National Laboratory</affiliation></member><member><name>David Orchard</name><affiliation>BEA Systems, Inc.</affiliation></member><member><name>Paul Pedersen</name><affiliation>Mark Logic Corporation</affiliation></member><member><name>Shriram Revankar</name><affiliation>Xerox</affiliation></member><member><name>Mark Reinhold</name><affiliation>Sun Microsystems</affiliation></member><member><name>Jonathan Robie</name><affiliation>Software AG</affiliation></member><member><name>Cliff Schmidt</name><affiliation>Microsoft</affiliation></member><member><name>John C. Schneider</name><affiliation>MITRE</affiliation></member><member><name>Eric Sedlar</name><affiliation>Oracle Corp.</affiliation></member><member><name>Lew Shannon</name><affiliation>NCR</affiliation></member><member><name>Anli Shundi</name><affiliation>TIBCO Extensibility</affiliation></member><member><name>William Shea</name><affiliation>Merrill Lynch</affiliation></member><member><name>Jerry L. Smith</name><affiliation>Defense Information Systems Agency (DISA)</affiliation></member><member><name>John Stanton</name><affiliation>Defense Information Systems Agency (DISA)</affiliation></member><member><name>Tony Stewart</name><affiliation>Rivcom</affiliation></member><member><name>Bob Streich</name><affiliation>Calico Commerce</affiliation></member><member><name>William K. Stumbo</name><affiliation>Xerox</affiliation></member><member><name>Hoylen Sue</name><affiliation>Distributed Systems Technology Centre (DSTC Pty Ltd)</affiliation></member><member><name>Ralph Swick</name><affiliation>W3C</affiliation></member><member><name>John Tebbutt</name><affiliation>NIST</affiliation></member><member><name>Ross Thompson</name><affiliation>Contivo</affiliation></member><member><name>Matt Timmermans</name><affiliation>Microstar</affiliation></member><member><name>Jim Trezzo</name><affiliation>Oracle Corp.</affiliation></member><member><name>Steph Tryphonas</name><affiliation>Microstar</affiliation></member><member><name>Scott Tsao</name><affiliation>The Boeing Company</affiliation></member><member><name>Mark Tucker</name><affiliation>Health Level Seven</affiliation></member><member><name>Asir S. Vedamuthu</name><affiliation>webMethods, Inc</affiliation></member><member><name>Fabio Vitali</name><affiliation>University of Bologna</affiliation></member><member><name>Scott Vorthmann</name><affiliation>TIBCO Extensibility</affiliation></member><member><name>Priscilla Walmsley</name><affiliation>XMLSolutions</affiliation></member><member><name>Norm Walsh</name><affiliation>Sun Microsystems</affiliation></member><member><name>Cherry Washington</name><affiliation>Defense Information Systems Agency (DISA)</affiliation></member><member><name>Aki Yoshida</name><affiliation>SAP AG</affiliation></member><member><name>Stefano Zacchiroli</name><affiliation>University of Bologna</affiliation></member><member><name>Mohamed Zergaoui</name><affiliation>Innovimax</affiliation></member></orglist></div1><!--
<div1 role="1.0" id='open-issues'>
<head>Open Issues</head>
<open-issues/>
</div1>
<div1 role="1.0" id="revisions">
<head>Revisions from Previous Draft</head>
<revisions/>
</div1>
--></back></spec>
