<?xml version="1.0" encoding="utf-8"?><!-- Id: datatypes.xml,v 1.7.2.304 2006/08/21 14:07:00 cmsmcq Exp  --><?xml-stylesheet type='text/xsl' href='xmlschema_diffs.xsl'?>
<!DOCTYPE spec
  SYSTEM "local.dgdf.dtd">
<spec dgdf="dg-statusquo-color-1.0.xml" dgdf_desc="differences from version 1.0 of this specification" w3c-doctype="wd" status="final" role="TR-copy" otherSpec="http://www.w3.org/TR/2006/WD-xmlschema11-1-20060330/structures.html" schemaDump="./XMLSchema.xsd.dmp" drvdSchema="./derived.nxsd" primSchema="./primitives.nxsd" schemaProper="./XMLSchema.xsd" docStatus="final" me="datatypes">
<header>
<title>XML Schema 1.1 Part 2: Datatypes</title>
<w3c-designation>wd-20060831</w3c-designation>
<!--* <w3c-doctype>W3C Working Draft</w3c-doctype> *-->
<!--* <w3c-doctype>Editors' Draft</w3c-doctype> *-->
<w3c-doctype>W3C Working Draft</w3c-doctype>
<pubdate>
<day>31</day>
<month>August</month>
<year>2006<!--* Id: datatypes.xml,v 1.7.2.304 2006/08/21 14:07:00 cmsmcq Exp  *--></year>
</pubdate>
<publoc> 
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2006/WD-xmlschema11-2-20060217/">http://www.w3.org/TR/2006/WD-xmlschema11-2-20060217/</loc> 
</publoc>
<altlocs>
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2006/WD-xmlschema11-2-20060217/datatypes.diff-1.0.xml">XML</loc>
<!--* 
<loc href="http://www.w3.org/TR/2006/WD-xmlschema11-2-20060217/datatypes.diff-1.0.diff-1.0.html">XHTML with changes since version 1.0 marked</loc>
<loc href="http://www.w3.org/TR/2006/WD-xmlschema11-2-20060217/datatypes.diff-1.0.diff-wd.html">XHTML with changes since previous Working Draft marked</loc>
*-->
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2006/WD-xmlschema11-2-20060217/datatypes.diff-1.0.html">XHTML with changes since version 1.0 marked</loc>
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2006/WD-xmlschema11-2-20060217/datatypes.diff-wd.html">XHTML with changes since previous Working Draft marked</loc>
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2001/XMLSchema.xsd">Independent copy of the schema for schema documents</loc>
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2001/XMLSchema-datatypes.xsd" diff="del" dg="dup-2214">A schema for built-in datatypes only, in a separate namespace</loc>
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2001/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/2006/WD-xmlschema11-2-20060217/">http://www.w3.org/TR/2006/WD-xmlschema11-2-20060217/</loc>
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2006/WD-xmlschema11-2-20060116/">http://www.w3.org/TR/2006/WD-xmlschema11-2-20060116/</loc>
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2005/WD-xmlschema11-2-20050224/">http://www.w3.org/TR/2005/WD-xmlschema11-2-20050224/</loc>
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2004/WD-xmlschema11-2-20040716/">http://www.w3.org/TR/2004/WD-xmlschema11-2-20040716/</loc>
</prevlocs>
<authlist>
<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 role="1.0">
<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.V.Biron@kp.org">Paul.V.Biron@kp.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>
<author diff="add">
<name>C. M. Sperberg-McQueen</name>
<affiliation>World Wide Web Consortium</affiliation>
<email xmlns:xlink="http://www.w3.org/1999/xlink" href="mailto:cmsmcq@w3.org">cmsmcq@w3.org</email>
</author>
</authlist>
<status>

<p><emph>This section describes the status of this document at the
time of its publication. Other documents may supersede this document.
A list of current W3C publications and the latest revision of this
technical report can be found in the <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/">W3C technical reports index</loc> at
http://www.w3.org/TR/.</emph></p>

<p>This is a <phrase diff="add" dg="wg-internal">member-only review
version which will in due course become a</phrase><phrase diff="add" dg="wd4hax">Last Call</phrase> Public Working
Draft of XML Schema 1.1<phrase diff="add" dg="wd4hax">: Datatypes</phrase>.  
It <phrase diff="add" dg="wg-internal">has
no formal standing within W3C; it</phrase> is here made available for
review by W3C members<phrase diff="del" dg="wg-internal"> and the
public</phrase>.  <phrase diff="del" dg="wd4hax">It is intended to 
give an indication of the W3C XML
Schema Working Group's intentions for this new version of the XML
Schema language and our progress in achieving them.  It attempts to be
complete in indicating <emph>what</emph> will change from version 1.0,
but does <emph>not</emph> specify in all cases <emph>how</emph> things
will change.  </phrase> This version of this document was created on 
31 August 2006.<phrase diff="add" dg="wg-internal"> It reflects (unless otherwise noted elsewhere) all 
decisions on this document made by the
Working Group through 23 August 2006. </phrase>
</p>
<p diff="add" dg="wg-internal">The text of this draft is essentially
that which appeared in the Last Call version of this specification
published 17 February 2006.
The WG has not approved any changes since that publication;
new versions of the status-quo documents have been generated
primarily for technical reasons internal to the editorial
document-production system.</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 diff="add" dg="flfix-tt">It also includes a proposal to provide a clean
specification of allowable lexical mappings and
more specifically define the value space of <dtref ref="float"/> and
<dtref ref="double"/>, and incidentally correct the boundary values for
<dtref ref="double"/>.&nbsp; Bugzilla 1837 (RQ-21), 1907 (RQ-21 float/double),
and 2206 (R-214).</p>
*-->
<!--* 
 <p diff="add" dg="rec12-tableaux">It also includes an editorial proposal to
systematically present autogenerated information about facets as part of the
definition of each built-in datatype.</p>
*-->
<!--* 
<p diff="add" dg="rq123">It also includes a revision of the editorial proposal
to discharge requirement RQ-123 (the note has been reworked in light
of WG comments).</p>
*-->
<!--* <p diff="add" dg="rq126-telltale">It also includes an editorial proposal
to discharge, as far as feasible, requirement RQ-126, by including
warnings about the possibility of unintentionally restricting away 
canonical forms when restricting datatypes using the 
&pattern.tc; facet.</p> *-->
<!--* <p diff="add" dg="wd25-telltale">It also includes an editorial proposal
to discharge, as far as feasible, pre-last-call issue wd-25 (and
other related issues), which request that the definition of
datatype <dtref ref="anyURI"/> be updated to refer to the current
generation of RFCs.
The proposal makes the following changes:
<ulist diff="add" dg="wd25-telltale">
<item><p>The links to the relevant IETF specifications
are made non-normative; the references are
not only to the current RFC but also to their
successor(s) in the IETF Standards Track.</p>
</item>
<item><p>Notes explicitly state that the syntactic and semantic requirements
of RFC 3986 and 3987 are not part of the datatype as defined here.</p></item>
</ulist></p> *-->

<p>For those primarily interested in the changes since version 1.0,
the <specref ref="changes"/> appendix, which summarizes both changes
already made and also those in prospect, with links to the relevant
sections of this draft, is the recommended starting point.  <!--*
* material suppressed here by diff group qd3hax *
*--><phrase dg="qd3hax">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.</phrase></p>

<p>The major changes since version 1.0 include:</p>
<ulist>
<item diff="add" dg="b1838">
<p>Support for XML 1.1 has been added.  It is now implementation
defined whether datatypes dependent on definitions in 
<bibref ref="XML"/> and <bibref ref="XMLNS"/> use the definitions
as found in version 1.1 or version 1.0 of those specifications.
</p>
</item>
<item>
<p>A new primitive decimal type has been defined, which retains
information about the precision of the value.  This type is aligned
with the floating-point decimal types which will be part of the next
edition of IEEE 754.</p>
</item>
<item>
<p>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"/> <phrase dg="qd3hax">which
serves as the base type definition for all primitive atomic
datatypes</phrase> has been introduced.</p>
</item>
<item>
<p>The conceptual model of the date- and time-related types has been
defined more formally.</p>
</item>
<!--*
<item>
<p>Two subtypes of <dtref ref="duration"/> 
(<dtref ref="yearMonthDuration"/> and
<dtref ref="dayTimeDuration"/>) have been introduced, each of which is
totally ordered.</p>
</item>
*-->
<item>
<p>A more formal treatment of the fundamental facets of the primitive
datatypes has been adopted.</p>
</item>
<item>
<p>More formal definitions of the lexical space of most types have
been provided, with detailed descriptions of the mappings from lexical
representation to value and from value to <termref def="dt-canonical-representation"/>.</p>
</item>
<!--* 
<item>
<p>&canonical_representations; have been defined for the <dtref
ref="float"/> and <dtref ref="double"/> types.</p>
</item>
<item>
<p>The units of length have been specified for all primitive
datatypes.</p>
</item>
*-->
</ulist>
<p>Changes since the previous Working Draft include the following:</p>
<ulist>
<item diff="add" dg="b1911-b64b">
<p>Explicit definitions are provided for the <termref def="dt-lexical-space">lexical spaces</termref>,
<termref def="dt-lexical-mapping">lexical mappings</termref>, and <termref def="dt-canonical-mapping">canonical mappings</termref> of
<dtref ref="anySimpleType"/>, <dtref ref="anyAtomicType"/>,
<dtref ref="hexBinary"/>, and <dtref ref="base64Binary"/>. In the case
of <dtref ref="base64Binary"/>, the mappings are defined
by reference to the relevant RFCs.</p>
</item>
<item diff="add" dg="b2449">
<p>The validation rule <specref ref="cvc-datatype-valid"/>
has been recast in briefer, more declarative form.  A paraphrase
of the constraint in procedural terms, which corrects some errors
in the previous versions of this document, has been added as a
note.</p>
</item>
<item diff="add" dg="partialfix">
<p>The rules governing partial implementations of infinite datatypes
have been clarified.</p>
</item>
<item><p>Various changes have been made in order to align the relevant
parts of this specification more closely with the corresponding
sections of <bibref ref="structural-schemas"/>.</p>
</item>
<item diff="add" dg="b2044"><p>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>
</item>
<item diff="add" dg="b1834">
<p>An error in the 
prose descriptions of the lexical spaces of <dtref ref="unsignedLong"/>,
<dtref ref="unsignedInt"/>,
<dtref ref="unsignedShort"/>, and
<dtref ref="unsignedByte"/> has been corrected,
by allowing for the possibility of a sign.</p>
</item>
<item diff="add" dg="sfs-1933">
<p>The schema for schema documents found in 
<specref ref="schema"/> has been modified; the
source declarations for the built-in datatypes have been removed
and placed in a separate appendix (<specref ref="prim.nxsd"/>).
They do not need to be present in the schema for schema documents,
since they are automatically present in any schema.</p>
</item>


</ulist>

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

<p dg="qd3hax">Comments on this document should be made in
W3C's public installation of Bugzilla, specifying "XML Schema" as the
product. Instructions can be found at <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/XML/2006/01/public-bugzilla">http://www.w3.org/XML/2006/01/public-bugzilla</loc>. If access to
Bugzilla is not feasible, please send your comments to the W3C XML
Schema comments mailing list, <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="mailto:www-xml-schema-comments@w3.org">www-xml-schema-comments@w3.org</loc> 
(<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://lists.w3.org/Archives/Public/www-xml-schema-comments/">archive</loc>) 
Each Bugzilla entry and email message should contain only one
comment.</p>
<p diff="add" dg="wd4hax">The end of the Last Call review period
is 31 March 2006; comments received after that date will be
considered if time allows, but no guarantees can be offered.</p>

<p diff="add" dg="b2044-feedback">Although feedback based on any
aspect of this specification is welcome, there are certain aspects of
the design presented herein for which the Working Group is
particularly interested in feedback. These are designated
<mention>priority feedback</mention> aspects of the design, and
identified as such in editorial notes at appropriate points in this
draft.</p>

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

<p>
This document has been produced by the <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/XML/Schema">W3C XML Schema Working Group</loc>
as part of the W3C <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/XML/Activity">XML
Activity</loc>. The goals of 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 under the 5 February 2004 W3C Patent
Policy. The Working Group 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
patent disclosures</loc> made in connection with this document; that
page also includes instructions for disclosing a patent.  An individual
who has actual knowledge of a patent which the individual believes
contains Essential Claim(s) with respect to this specification 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>Patent disclosures relevant to this specification may be found on
the Working Group's <loc role="disclosure"
href="http://www.w3.org/2004/01/pp-impl/19482/status">Patent
disclosure page</loc> in conformance with the <loc
href="http://www.w3.org/Consortium/Patent-Policy-20040205/">W3C Patent
Policy</loc> of 5 February 2004.  An individual who has actual
knowledge of a patent which the individual believes contains Essential
Claim(s) with respect to this specification should disclose the
information in accordance with <loc
href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 
6 of the W3C Patent Policy</loc>.</p>
      *-->
<!--* <p>In accordance with 
<loc href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Exclusion">section 
4 of the W3C Patent Policy</loc>, Working Group participants have 150
days from the title page date of this document to exclude essential
claims from the W3C RF licensing requirements with respect to this
document series. Exclusions are with respect to the exclusion
reference document, defined by the <loc href="http://www.w3.org/Consortium/Patent-Policy-20040205/">W3C Patent
Policy</loc> to be the latest version of a document in this series
that is published no later than 90 days after the title page date of
this document.</p> *-->

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

</status>

<abstract>
<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<phrase diff="del" dg="rq152a"> 1.0</phrase>, provides a superset of the
capabilities found in XML<phrase diff="del" dg="rq152a"> 1.0</phrase>
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="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">odiff-add</phrase>
  <phrase diff="add" dg="rec12-tableaux" role="hack" id="idiff_hack">idiff-add</phrase>
  <phrase diff="add" dg="rec12-tableaux" role="hack" id="arrow_hack">↑</phrase>
  <phrase diff="add" dg="rec12-tableaux" role="hack" id="odiff_del_hack">odiff-del</phrase>
  <phrase diff="add" dg="rec12-tableaux" role="hack" id="idiff_del_hack">idiff-del</phrase>
  <phrase diff="add" dg="rec12-tableaux" role="hack" id="del_arrow_hack">↓</phrase>
  <!--* 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 diff="add" 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 diff="add" dg="rec12-tableaux" id="may_prose1"> with the values shown; these
facets <rfc2119>may</rfc2119> be further restricted in the derivation of new types:</phrase>
  <phrase diff="add" 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="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'.</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 implementation-defined.</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>
<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="http://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="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="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>

<!--* 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" diff="add" 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 <bibref ref="XML"/> 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 colspan="1" rowspan="1">Data oriented</th>
<th colspan="1" rowspan="1">Document oriented</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="1" rowspan="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 colspan="1" rowspan="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" diff="add" 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 <bibref ref="XML"/> and <bibref ref="XMLNS"/>; 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 implementation-defined.
</p>
<p>
Conforming implementations of this specification may 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>

</div2>

<div2 role="1.0" 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
vs. 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 portion of the XML Schema Language discusses 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 <bibref ref="XML"/>
</p>
</def>
</gitem>
<gitem>
<label>
<termdef id="dt-may" term="may"><term>may</term></termdef>
</label>
<def>
<p>
Conforming documents and processors are permitted to but need
not behave as described.
</p>
</def>
</gitem>
<gitem>
<label>
<termdef id="dt-match" term="match"><term>match</term></termdef>
</label>
<def>
<p>
(Of strings or names:) 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. (Of strings and rules
in the grammar:) A string matches a grammatical production if <phrase diff="add" dg="iff">and only if</phrase> it belongs to the language
generated by that production.
</p>
</def>
</gitem>
<gitem>
<label>
 <termdef id="dt-must" term="must"><term>must</term></termdef>
</label>
<def>
<p>
Conforming documents and processors are required to behave as
described; otherwise they are in <termref def="dt-error"/>.
</p>
</def>
</gitem>
<gitem>
<label>
<termdef id="dt-error" term="error"><term>error</term></termdef>
</label>
<def>
<p>
A violation of the rules of this specification; results are undefined.
Conforming software <termref def="dt-may"/> detect and report an
<term>error</term> and <termref def="dt-may"/> recover from it.
</p>
</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><phrase diff="del" dg="fa1">Type</phrase><phrase diff="add" 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 diff="add" 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 <phrase diff="del" dg="fa1">computer representations of</phrase><phrase diff="add" 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 diff="add" dg="fa1">thoroughly </phrase>define these abstract concepts; many
other publications provide excellent definitions.<phrase diff="add" 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>

<note diff="add" 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 <bibref ref="ieee754"/> 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
    *-->
<p diff="del" dg="fa1">
<termdef id="del-dt-datatype" term="datatype">In this specification,
a <term>datatype</term> is a 3-tuple, consisting of
a) a set of distinct values, called its <termref def="dt-value-space"/>,
b) a set of lexical representations, called its
<termref def="dt-lexical-space"/>, and c) a set of <termref def="del-dt-facet"/>s
that characterize properties of the <termref def="dt-value-space"/>,
individual values or lexical items.
</termdef>
</p>


<p diff="add" 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</termdef>:

<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"><termref def="dt-literal">literals</termref></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 order relations on the <termref def="dt-value-space"/>, and a
<termref def="dt-lexical-mapping"/>, which is a function on the <termref def="dt-lexical-space"/> onto the
<termref def="dt-value-space"/>.</p>
</item>
<!--*
* material suppressed here by diff group wdd *
*-->
</ulist>
</p>

<!--* This note about simple type definitions added to allow
    * the discussion in section 4 to speak of 'the value
    * space of teh {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 <bibref ref="structural-schemas"/>, 
&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 diff="add" 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 diff="add" 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 diff="add" 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, restricts
the <termref def="dt-lexical-space"/> directly.  When more than one lexical
representation is provided for a given value, the <phrase dg="ed-pattern"><termref def="dt-pattern"/></phrase><!--*
* material suppressed here by diff group ed-pattern *
*--> facet 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>

</div2>

<div2 id="value-space"><head>Value space</head>

<p diff="del" dg="fa1"><termdef id="del-dt-value-space" term="value space">A <term>value space</term> is the set of values for a given
datatype. Each value in the <term>value space</term> of a datatype is
denoted by one or more literals in its <termref def="dt-lexical-space"/>. </termdef></p>

<p diff="add" 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 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>.  (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 diff="add" 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 diff="add" 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 <phrase diff="del" dg="fa1">given </phrase>datatype can
be defined in one of the following ways:
<ulist>
<item><p>defined<phrase diff="add" dg="fa1"> elsewhere</phrase>
axiomatically from fundamental notions (intensional definition) [see
<termref def="dt-primitive"/>]</p>
</item>
<item><p>enumerated outright<phrase diff="add" 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 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>

<p diff="del" dg="fa1">
<termref def="dt-value-space">value spaces</termref> have certain properties.  For example, they always
have the property of <termref def="dt-cardinality"/>, some definition of
<emph>equality</emph> and might be <termref def="dt-ordered"/>, by
which individual values within the <termref def="dt-value-space"/> can be compared to
one another.  The properties of <termref def="dt-value-space">value spaces</termref> that are
recognized by this specification are defined in
<specref ref="del-fundamental-facets"/>.
</p>

<p diff="add" dg="fa1">The relations of <emph>identity</emph>,
<emph>equality</emph>, and <emph>order</emph> are required for each
value space.  A very few datatypes have other relations or
operations prescribed for the purposes of this specification.</p>

<div3 diff="add" 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.  The identity relation is used 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>, <!--*
* material suppressed here by diff group wd-2 *
*-->when checking identity
constraints<phrase dg="wd-2">, and when checking value
constraints</phrase>.  These are the only uses of
<emph>identity</emph> for schema processing.</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
<termref def="dt-literal">literals</termref> <string>0.1</string> and <string>0.10000000009</string> map
to the same value in <dtref ref="float"/> (neither is in the value
space, and each is mapped to the nearest value, namely
0.100000001490116119384765625), but map to distinct values in <dtref ref="decimal"/>.</phrase></p>

</div3>

<div3 diff="add" 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>

<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, NaN &lt;&gt; NaN in the <dtref ref="precisionDecimal"/>, <dtref ref="float"/>, and <dtref ref="double"/> datatypes.</phrase></p>

<p>The equality relation is used 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.  This is the only use of
<emph>equality</emph> for schema processing.</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 timezone information in the
<termref def="dt-lexical-representation"/> as the value was converted to <!--*
* material suppressed here by diff group dt2 *
*--><phrase dg="dt2"><termref def="dt-utc"/></phrase>; now the timezone
is retained and two values representing the same <unusual>moment in
time</unusual> but with different remembered timezones 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 (and must do so if they
choose to consider them identical); nonetheless, in the equality
relation defined herein, they are unequal.</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 diff="add" dg="fa1" id="order"><head>Order</head>

<p>Each datatype has an order relation prescribed.  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>.  In many cases, the prescribed order
is the <unusual>null order</unusual>:  the ultimate partial
order, in which no pairs are less-than or greater-than; they are all
equal or <termref def="dt-incomparable"/>. <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> 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 <emph>order</emph> for
schema processing.</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"/>) insures that this is true.</p>
</note>

<p>The value spaces of primitive datatypes are abstractions, which may
have values in common.  In the order relation defined herein,
these value spaces are made artificially <termref def="dt-incomparable"/>.  For example, the numbers two
and three are values in both the <!--*
* material suppressed here by diff group wdd *
*--><phrase dg="wdd">precisionDecimal</phrase>
datatype and the float datatype.  In the order relation defined
herein, two in the decimal datatype and three in the float datatype
are incomparable values.  Other applications making use of these
datatypes may choose to consider values such as these comparable.</p>

<p>While it is not an error to attempt to compare values from the
value spaces of two different primitive datatypes, they will always be
<termref def="dt-incomparable"/> and therefore unequal: 
If <var>x</var> and <var>y</var> are in the value spaces of different
primitive datatypes then 
<var>x</var> &lt;&gt; <var>y</var>  (and hence 
<var>x</var> ≠ <var>y</var> ).</p>

</div3>
</div2>

<div2 diff="del" dg="fa1"><head>Lexical space</head>

<p>In addition to its <termref def="dt-value-space"/>, each datatype also has a lexical
space.
</p>
<p><termdef term="lexical space" id="del-dt-lexical-space">A
<term>lexical space</term> is the set of valid <emph>literals</emph>
for a datatype. </termdef></p>
<p>
For example, "100" and "1.0E2" are two different literals from the
<termref def="dt-lexical-space"/> of <dtref ref="float"/> which both denote the same
value. The type system defined in this specification provides a
mechanism for schema designers to control the set of values and the
corresponding set of acceptable literals of those values for a
datatype.
</p>
<note>
<p>
The literals in the <termref def="dt-lexical-space">lexical spaces</termref> defined in this specification
have the following characteristics:
</p>
<glist>
<gitem>
<label>Interoperability:</label>
<def>
<p>
The number of literals for each value has been kept small; for many
datatypes there is a one-to-one mapping between literals and values.
This makes it easy to exchange the values between different systems.
In many cases, conversion from locale-dependent representations will
be required on both the originator and the recipient side, both for
computer processing and for interaction with humans.
</p>
</def>
</gitem>
<gitem>
<label>Basic readability:</label>
<def>
<p>
Textual, rather than binary, literals are used. This makes hand
editing, debugging, and similar activities possible.
</p>
</def>
</gitem>
<gitem>
<label>Ease of parsing and serializing:</label>
<def>
<p>
Where possible, literals correspond to those found in common
programming languages and libraries.
</p>
</def>
</gitem>
</glist>
</note><div3 id="del-canonical-lexical-representation">
<head>Canonical Lexical Representation</head>
<p>
While the datatypes defined in this specification have, for the most
part, a single lexical representation i.e. each value in the
datatype's <termref def="dt-value-space"/> is denoted by a single literal in its
<termref def="dt-lexical-space"/>, this is not always the case.  The example in the
previous section showed two literals for the datatype
<dtref ref="float"/> which denote the same value.  Similarly,
there <termref def="dt-may"/> be several literals for one of the date
or time datatypes that denote the same value using different timezone
indicators.
</p>
<p>
<termdef term="canonical lexical representation" id="del-dt-canonical-representation">A 
<term>canonical lexical
representation</term> is a set of literals from among the valid set of
literals for a datatype such that there is a one-to-one mapping
between literals in the <term>canonical lexical representation</term>
and values in the <termref def="dt-value-space"/>. </termdef>
</p>
</div3></div2>

<div2 id="lexical-space" diff="add" 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 function
whose domain is a prescribed set of character strings (the
<termref def="dt-lexical-space"/>) and whose range is the <termref def="dt-value-space"/> of that
datatype.</termdef></p>

<p><termdef term="lexical space" id="dt-lexical-space">The
<term>lexical space</term> of a datatype is the prescribed 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><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>

<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>

<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"/> facet<!-- or a
<phrase role="UNSURE"><compref ref="NOTATION-facets"/></phrase>
facet-->.</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 generally 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>

<div2 id="del.facets" diff="del" dg="fa1.z">
<!--* !!! this section was not deleted in the first public working draft.  I think
    * this means fa1 should be split into pre-WD and post-WD bits.  This is a post-WD
    * bit of fa1. -msm *-->
<head>Facets</head>

<!--* <issue id="del-RQ-24-1i" role="1.1">
<p><loc href="&reqs;#fundamentals" target="reqs">RQ-24 (systematic approach to facets)</loc></p>
<p>This decision is not yet written up herein:&nbsp; The four
informational facets, each of which have only one property, will be
lumped into one facet having four properties.&nbsp; This will
represent a further technical change to the facet structure, but will
not result in any additional or lost information in a schema.</p>
</issue> *-->

<p>
<termdef id="del-dt-facet" term="facet">A <term>facet</term> is a single
defining aspect of a <termref def="dt-value-space"/>.  Generally
speaking, each facet characterizes a <termref def="dt-value-space"/>
along independent axes or dimensions.</termdef>
</p>
<p dg="fpwd-rescinded-del"><!--* !!! This para marked as 
   deleted in first public WD. -msm *-->
The facets of a datatype serve to distinguish those aspects of
one datatype which <emph>differ</emph> from other datatypes.
Rather than being defined solely in terms of a prose description
the datatypes in this specification are defined in terms of
the <emph>synthesis</emph> of facet values which together determine the
<termref def="dt-value-space"/> and properties of the datatype.
</p>
<p dg="fpwd-rescinded-del"><!--* !!! This para marked 
   as deleted in first public WD. -msm *-->
Facets are of two types: <emph>fundamental</emph> facets that define
the datatype and <emph>non-fundamental</emph> or <emph>constraining
</emph> facets that constrain the permitted values of a datatype.
</p>

<!--* !!! the following paragraph was marked 'add' in the first public WD
    * and subsequently (re-)deleted.
    * We'd need stronger diff markup than we currently have to make
    * that history clear.  So for the moment I content myself with giving
    * it a unique dg identifier. -->

<!--*
* material suppressed here by diff group fpwd-rescinded-add *
*-->
				
<!--* !!! the following paragraph was marked 'add' in the first public WD
    * and subsequently (re-)deleted. *-->

<!--*
* material suppressed here by diff group fpwd-rescinded-add *
*-->

<!--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-->

<!--* !!! the following note was marked 'add' in the first public WD
    * and subsequently (re-)deleted. *-->
<!--*
* material suppressed here by diff group fpwd-rescinded-add *
*-->


<div3 id="del-fundamental-facets" dg="fa1">
<head>Fundamental facets</head>
<p>
<termdef id="del-dt-fundamental-facet" term="fundamental facet">
A <term>fundamental facet</term> is an abstract property which
serves to semantically characterize the values in a
<termref def="dt-value-space"/>.
</termdef>
</p>
<p>
All <term>fundamental facets</term> are fully described in
<specref ref="rf-fund-facets"/>.
</p>
</div3>

<div3 id="del-non-fundamental" dg="fa1">
<head>Constraining or Non-fundamental facets</head>
<p>
<termdef id="del-dt-constraining-facet" term="constraining facet">A
<term>constraining facet</term> is an optional property that can be
applied to a datatype to constrain its <termref def="dt-value-space"/>.
</termdef>
</p>
<p>
Constraining the <termref def="dt-value-space"/> consequently constrains
the <termref def="dt-lexical-space"/>.  Adding
<termref def="dt-constraining-facet">constraining facets</termref> to a <termref def="dt-basetype"/>
is described in <specref ref="derivation-by-restriction"/>.
</p>
<p>
All <term>constraining facets</term> are fully described in
<specref ref="rf-facets"/>.
</p>

</div3>
</div2>

<div2 role="1.0" id="datatype-dichotomies" dg="trm1">
<head>Datatype
<phrase diff="del" dg="rq120">dichotomies</phrase><phrase diff="add" dg="rq120">Distinctions</phrase></head>

<p>It is useful to categorize the datatypes defined in this
specification along various dimensions, <phrase diff="del" dg="rq120">forming a set of characterization
dichotomies</phrase><phrase diff="add" 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>

<p diff="del" dg="rq120">
The first distinction to be made is that 
between 
<termref def="dt-atomic"/>, <termref def="dt-list"/> and 
<termref def="dt-union"/> datatypes.
</p>

<p diff="add" dg="rq120">First, we distinguish <termref def="dt-atomic"/>,
<termref def="dt-list"/>, and <termref def="dt-union"/> datatypes.</p>

<ulist>
<item>
<p><termdef id="dt-atomic" term="atomic"><term>Atomic</term> datatypes
are those having values <phrase diff="del" dg="rq120">which are
regarded</phrase><phrase diff="add" dg="rq120">treated</phrase> by
this specification as <phrase diff="del" dg="rq120">being</phrase>
indivisible.<phrase diff="add" 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 values of an <termref def="dt-atomic"/> datatype<phrase diff="add" dg="rq120"> (or 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>
</item>
<item>
<p><termdef id="dt-union" term="union"><term>Union</term> datatypes
are <phrase diff="add" dg="b2044">(a) </phrase>those whose <phrase diff="del" dg="rq120"><termref def="dt-value-space">value spaces</termref> and
<termref def="dt-lexical-space">lexical spaces</termref></phrase><phrase diff="add" 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>
</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
<bibref ref="XML"/> <phrase diff="del" dg="rq120">could be the
value</phrase><phrase diff="add" dg="rq120">is in the value
space</phrase> of <phrase diff="del" dg="rq120">an</phrase><phrase diff="add" dg="rq120">the</phrase> <termref def="dt-atomic"/> datatype <phrase diff="del" dg="rq120">(</phrase><dtref ref="NMTOKEN"/><phrase diff="del" dg="rq120">);</phrase><phrase diff="add" dg="rq120">,</phrase> while a sequence of such tokens <phrase diff="del" dg="rq120">could be the value of a</phrase><phrase diff="add" dg="rq120">is in the value space of the</phrase> <termref def="dt-list"/>
datatype <phrase diff="del" dg="rq120">(</phrase><dtref ref="NMTOKENS"/><phrase diff="del" dg="rq120">)</phrase>.
</p>

<div4 role="1.0" id="atomic">
<head>Atomic Datatypes</head>

<p><phrase diff="del" dg="aatf"><termref def="dt-atomic"/> datatypes can be either
<termref def="dt-primitive"/> or derived.  The
<termref def="dt-value-space"/> of an <termref def="dt-atomic"/> datatype
is a set of <unusual>atomic</unusual> values, which for the purposes of this specification,
are not further decomposable.  </phrase><phrase diff="add" dg="aatf">An
<termref def="dt-atomic"/> datatype
has a <termref def="dt-value-space"/> consisting of a set of
<unusual>atomic</unusual> values which for purposes of this specification
are not further decomposable. </phrase> 
The <termref def="dt-lexical-space"/> of
an <termref def="dt-atomic"/> datatype is a set of
<phrase diff="del" dg="rq21-lit"><emph>literals</emph></phrase><phrase diff="add" dg="rq21-lit"><termref def="dt-literal">literals</termref></phrase>
whose internal structure is specific to the datatype in question. 
<phrase diff="add" dg="aatf">There is one
<!--*
* material suppressed here by diff group rq120 *
*--><termref def="dt-special" dg="rq120"/>
<!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><termref def="dt-atomic"/> datatype</phrase>
(<dtref ref="anyAtomicType"/>)<phrase dg="rq120">,</phrase> and a
number of <termref def="dt-primitive"/> <!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><termref def="dt-atomic"/>
datatypes</phrase> which have
<dtref ref="anyAtomicType"/> as their <!--*
* material suppressed here by diff group rq120 *
*--><termref def="dt-basetype" dg="rq120"/>. 
All other <!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><termref def="dt-atomic"/> datatypes</phrase> are
<!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120">derived</phrase>
either from one of the
<!--*
* material suppressed here by diff group rq120 *
*--><termref def="dt-primitive" dg="rq120"/>
<!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><termref def="dt-atomic"/> datatypes</phrase> or from another
<!--*
* material suppressed here by diff group rq120 *
*--><termref def="dt-ordinary"/>
<!--*
* material suppressed here by diff group rq120 *
*--><phrase dg="rq120"><termref def="dt-atomic"/> datatype</phrase>.  No
<!--*
* material suppressed here by diff group rq120 *
*--><termref def="dt-user-defined" dg="rq120"/>
<phrase dg="rq120">data</phrase>type may have <dtref ref="anyAtomicType"/> 
as its <!--*
* material suppressed here by diff group rq120 *
*--><termref def="dt-basetype" dg="rq120"/>.</phrase></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
-->
<p>
Several type systems (such as the one described in
<bibref ref="ISO11404"/>) treat <termref def="dt-list"/> datatypes as
special cases of the more general notions of aggregate or collection
datatypes.
</p>
<p><phrase diff="del" dg="rq120"><termref def="dt-list"/></phrase><phrase diff="add" dg="rq120"><termref def="dt-list">List</termref></phrase> 
datatypes are always <termref diff="del" dg="rq120" def="dt-derived"/><termref diff="add" dg="rq120" def="dt-constructed"/><phrase diff="add" 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 a set of finite-length sequences of 
<!--* WG suppresses this 'ordinary', 2005-02-04 *-->
<!--* <phrase diff="add" dg="aatf">ordinary </phrase> *-->
<termref def="dt-atomic"/>
values. The <termref def="dt-lexical-space"/> of a
<termref def="dt-list"/> datatype is a set of 
<termref def="dt-literal">literals</termref> <!--* <phrase dg="rq120" diff="add">&lexical_representations;</phrase>  *-->
<phrase diff="del" dg="rq120">whose internal structure</phrase><phrase diff="add" dg="rq120">each
of which</phrase> 
is a space-separated sequence of
<termref def="dt-literal">literals</termref>
<!--* <phrase dg="rq120" diff="add">&lexical_representations;</phrase> *-->
of the
<phrase diff="del" dg="rq120"><termref def="dt-atomic"/> datatype of the items in the
<termref def="dt-list"/></phrase><phrase diff="add" 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 <phrase dg="rq120" diff="del">known as </phrase>the 
<term dg="rq120" diff="del">itemType</term><term diff="add" dg="rq120">item type</term> 
of that <termref def="dt-list"/> datatype.</termdef><phrase dg="rq120" diff="add">  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>

<p>A <termref def="dt-list"/> datatype can be 
<termref def="dt-derived" diff="del" dg="rq120"/><termref def="dt-constructed" diff="add" dg="rq120"/>
from an <phrase diff="add" dg="aatf">ordinary 
</phrase><phrase diff="add" dg="rq120o">or
<termref def="dt-primitive"/> </phrase><termref def="dt-atomic"/> 
datatype whose <termref def="dt-lexical-space"/> allows space
(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.
<phrase diff="del" dg="rq120">In such a case,
regardless of the input, list
items will be separated at space 
boundaries.</phrase><phrase diff="add" 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? *-->

<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 derived 
<phrase diff="del" dg="rq120">from</phrase><phrase diff="add" 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>
</ulist>
</p>

<p>For each of <termref def="dt-length"/>, <termref def="dt-maxLength"/>
and <termref def="dt-minLength"/>, the 
<emph><phrase dg="rq120" diff="del">unit of </phrase>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>

<p>For <termref def="dt-list"/> datatypes the <termref def="dt-lexical-space"/>
is composed of space-separated
<termref def="dt-literal">literals</termref>
of <phrase diff="del" dg="rq120">its</phrase><phrase diff="add" 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>.
*-->
<phrase diff="del" dg="rq120">Hence, a</phrase><phrase diff="add" 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
derived from a <termref def="dt-list"/> datatype 
<phrase diff="del" dg="rq120">is matched against
each literal of the <termref def="dt-list"/> 
datatype and not against the literals of the datatype that serves as its
<termref def="dt-itemType"/></phrase><phrase diff="add" 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></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>
<p dg="rq120" diff="del">
The <dtref ref="canonical-lexical-representation"/> for the
<termref def="dt-list"/> datatype is defined as the lexical form in which
each item in the <termref def="dt-list"/> has the canonical lexical
representation of its  <termref def="dt-itemType"/>.
</p>

<p dg="rq120" diff="add">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><phrase diff="del" dg="b2044">The <termref def="dt-value-space"/> 
and <termref def="dt-lexical-space"/>
of a <termref def="dt-union"/> datatype are the union of the
<phrase dg="rq120"><termref def="dt-value-space">value spaces</termref> and 
<termref def="dt-lexical-space">lexical spaces</termref>
</phrase><!--*
* material suppressed here by diff group rq120 *
*--> of
its <termref def="dt-memberTypes"/>.</phrase>
<phrase diff="add" dg="b2044">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"/>.
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>
<termref def="dt-union">Union</termref> datatypes 
are always <termref diff="del" dg="rq120" def="dt-derived"/><termref diff="add" dg="rq120" def="dt-constructed"/><phrase diff="add" 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.</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/2006/WD-xmlschema11-1-20060330/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/2006/WD-xmlschema11-1-20060330/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 (greater than 
<phrase diff="del" dg="rq120">1</phrase><phrase diff="add" dg="rq120">0</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 diff="add" dg="aatf">ordinary
</phrase><phrase diff="add" dg="rq120o"> or
<termref def="dt-primitive"/> </phrase><phrase diff="del" dg="b2044"><termref def="dt-atomic"/> 
or <termref def="dt-list"/></phrase>
<phrase diff="del" dg="rq120"><termref def="dt-datatype"/>s 
</phrase><phrase diff="add" 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
<term dg="rq120" diff="del">memberTypes</term><term diff="add" dg="rq120">member types</term> 
of that <termref def="dt-union"/> datatype.</termdef></p>

<p diff="add" 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 data