<?xml version='1.0'?>
<?xml:stylesheet type='text/xsl' href='xmlschema.msxsl'?>
<!DOCTYPE spec PUBLIC "-//W3C//DTD Specification::19990205//EN" "xmlspec-19990429.dtd" [
  <!ENTITY % versionEntities SYSTEM "versionInfo.ent">
  %versionEntities; <!-- get path and date entities -->
 <!ENTITY cellback '#d0d9fa'>
 <!ENTITY cellfront '#bedce6'>
 <!ENTITY xmlspec "http://www.w3.org/TR/REC-xml">
 <!ENTITY xmlnsspec "http://www.w3.org/TR/REC-xml-names/">
 <!ENTITY xslspec "http://www.w3.org/TR/xsl/">
 <!ENTITY xmlinfosetspec "http://www.w3.org/TR/xml-infoset">
 <!ENTITY xsdl "&XSP1.base;/">
 <!ENTITY rdfschspec "http://www.w3.org/TR/PR-rdf-schema/">
 <!ENTITY SchemaWG "<loc href='http://www.w3.org/XML/Activity#schema-wg'>W3C XML Schema Working Group</loc>">

 <!ENTITY year "&draft.year;">
 <!ENTITY mm "&draft.MM;">
 <!ENTITY MM "&draft.month;">
 <!ENTITY dd "&draft.DD;">
 <!ENTITY MMDD "&mm;&dd;">
 <!ENTITY iso.doc.date "&year;&MMDD;">

 <!ENTITY thisversion "&draft.base;/">
 <!ATTLIST eg text CDATA #IMPLIED> <!-- experimental pointer to out-of-line
                                        example text -->
 <!ENTITY order "&#163;">
 <!ENTITY le "&#8804;"> <!-- less than or equal to, U+2264 ISOtech -->
 <!ENTITY ne "&#8800;"> <!-- not equal to, U+2260 ISOtech -->
 <!ENTITY infin "&#8734;"> <!-- infinity, U+221E ISOtech -->
 <!ENTITY times "&#215;"> <!-- multiplication, U+00D7 -->
 <!ENTITY sect   "&#xa7;">

<!-- we'll see if anyone has a sense of humor -->
<!-- note: I tried to do this with conditional sections,
     but XT seems to get confused and reports a syntax error -->
<!ENTITY % sense-of-humor "INCLUDE">
<!ENTITY % no-sense-of-humor "IGNORE">
<!--
<![%sense-of-humor[
 <!ENTITY long "Homer">
 <!ENTITY int "Sideshow-Bob">
 <!ENTITY short "Bart">
 <!ENTITY byte "Troy-McClure">
 <!ENTITY unsigned-long "Apu-Nahasapeemapetilon">
 <!ENTITY unsigned-int "Chief-Wiggums">
 <!ENTITY unsigned-short "Mr-Burns">
 <!ENTITY unsigned-byte "Krusty-the-Clown">
-->
<!--
 ]]>
<![%no-sense-of-humor[
-->
 <!ENTITY long "long">
 <!ENTITY int "int">
 <!ENTITY short "short">
 <!ENTITY byte "byte">
 <!ENTITY unsigned-long "unsigned-long">
 <!ENTITY unsigned-int "unsigned-int">
 <!ENTITY unsigned-short "unsigned-short">
 <!ENTITY unsigned-byte "unsigned-byte">
<!--
 ]]> 
-->

   <!ELEMENT propdef ANY> <!-- best we can do without editing xml-spec -->
   <!ATTLIST propdef id ID #REQUIRED
                     name CDATA #REQUIRED>
   <!ELEMENT propref EMPTY>
   <!ATTLIST propref ref IDREF #REQUIRED>
   <!ELEMENT xpropref (#PCDATA)>
   <!ATTLIST xpropref href CDATA #IMPLIED>
   <!ELEMENT compdef (proplist)>
   <!ATTLIST compdef name CDATA #REQUIRED
                     ref IDREF #REQUIRED>
   <!ELEMENT proplist (propdef*)>
   <!ELEMENT reprdef (reprcomp*)>
   <!ATTLIST reprdef eltname NMTOKENS #REQUIRED
                     local NMTOKEN #IMPLIED>
   <!ELEMENT reprcomp (reprdep?,propmap*)>
   <!ATTLIST reprcomp ref IDREF #REQUIRED
                      abstract CDATA #REQUIRED>
   <!ELEMENT reprdep ANY> <!-- best we can do without editing xml-spec -->
    <!ELEMENT propmap ANY> <!-- best we can do without editing xml-spec -->
   <!ATTLIST propmap name IDREF #REQUIRED>
   <!ELEMENT eltref EMPTY>
   <!ATTLIST eltref ref NMTOKEN #REQUIRED>
   <!ELEMENT stale ANY>
   <!ELEMENT dtref EMPTY>
   <!ATTLIST dtref ref NMTOKEN #REQUIRED>   
   <!ENTITY % local.p.class "|stale|facets|subtypes|inverse-facets|open-issues|revisions">
   <!ENTITY % local.termdef.class "|propdef">
   <!ENTITY % local.ref.class "|propref|xpropref|eltref|dtref">
   <!ENTITY % local.illus.class "|compdef|reprdef|proplist">
   <!ENTITY i-attribute "<xpropref href='http://www.w3.org/TR/xml-infoset#infoitem.attribute'>attribute</xpropref>">
   <!ENTITY i-children "<xpropref href='http://www.w3.org/TR/xml-infoset#infoitem.element'>children</xpropref>">
   <!ENTITY i-attributes "<xpropref href='http://www.w3.org/TR/xml-infoset#infoitem.element'>attributes</xpropref>">
   <!ENTITY i-attrChildren "<xpropref href='http://www.w3.org/TR/xml-infoset#infoitem.attribute'>children</xpropref>">
   <!ENTITY i-value "<xpropref href='http://www.w3.org/TR/xml-infoset#infoitem.attribute'>value</xpropref>">
   <!ENTITY i-ccode "<xpropref
href='http://www.w3.org/TR/xml-infoset#infoitem.character'>character code</xpropref>">

	<!ELEMENT facets EMPTY>
	<!ELEMENT subtypes EMPTY>
	<!ELEMENT inverse-facets EMPTY>
	<!ATTLIST inverse-facets
		name CDATA #REQUIRED>
	<!ELEMENT open-issues EMPTY>
	<!ELEMENT revisions EMPTY>
	
	<!ATTLIST table
		align CDATA #IMPLIED
		bgcolor CDATA #IMPLIED>
	]>
<spec>
<header>
<title>XML Schema Part 2: Datatypes</title>
<version></version>
    <w3c-designation>&WD-XSP2;-&iso.doc.date;</w3c-designation>
    <w3c-doctype>W3C Working Draft</w3c-doctype>
<pubdate><day>&dd;</day><month>&MM;</month><year>&year;<!--
Point release id: <code>$Id: datatypes.xml,v 1.29.2.5 2000/02/25 02:52:28 ht Exp $</code>--></year></pubdate>
<notice role="publoc">
<p>	(in <loc href='&XSP2.URI;.xml'>XML</loc> and
<loc href='&XSP2.base;/'>HTML</loc>,	with a
<loc href='&XSP2.URI;.xsd'>schema</loc> and
<loc href='&XSP2.URI;.dtd'>DTD</loc> for datatype definitions,
as well as a <loc href='&XSP2.base;/builtins.xsd'>schema</loc>
for built-in datatypes only.)
</p>
</notice>
<publoc>
	<loc href='&XSP2.base;/'>
	&XSP2.base;/</loc>
<!--
	(in <loc href='&XSP2.URI;.xml'>XML</loc> and
<loc href='&XSP2.URI;.html'>HTML</loc>,
	with accompanying <loc href='&XSP2.URI;.xsd'>schema</loc> and <loc href='&XSP2.URI;.dtd'>DTD</loc>)
 -->
</publoc>
<prevlocs>
	<loc href='http://www.w3.org/TR/1999/WD-xmlschema-2-19991217/'>
		http://www.w3.org/TR/1999/WD-xmlschema-2-19991217/
	</loc>
    <loc href="http://www.w3.org/TR/1999/WD-xmlschema-2-19991105/">http://www.w3.org/TR/1999/WD-xmlschema-2-19991105/</loc>
    <loc href='http://www.w3.org/TR/1999/WD-xmlschema-2-19990924/'>http://www.w3.org/TR/1999/WD-xmlschema-2-19990924/</loc>
	<loc href='http://www.w3.org/1999/05/06-xmlschema-2/'>
	http://www.w3.org/1999/05/06-xmlschema-2/</loc>
</prevlocs>
<latestloc>

	<loc href='http://www.w3.org/TR/xmlschema-2/'>http://www.w3.org/TR/xmlschema-2/</loc>

</latestloc>
<authlist>
<author>
<name>Paul V. Biron</name>
<affiliation>Kaiser Permanente, for Health Level Seven</affiliation>
<email href='mailto:Paul.V.Biron@kp.org'>Paul.V.Biron@kp.org</email>
</author>
<author>
<name>Ashok Malhotra</name>
<affiliation>IBM</affiliation>
<email href='mailto:petsa@us.ibm.com'>petsa@us.ibm.com</email>
</author>
</authlist>
    <status>
<p>This is a public working draft of XML Schema 1.0 for review by the
public and by members of the World Wide Web Consortium.
</p><p>
It has been reviewed by the XML Schema Working Group, and the Working
Group has agreed to its publication.  The WG believes this draft to be
`feature-complete': the functionality included here is substantially
complete and is expected to be stable.  We do not expect to add major
new functionality, or to make major changes to the functionality
described in this draft.  Some sections of the draft (in particular
those on conformance), and some aspects of the design (in particular
details of the transfer syntax for schemas), on the other hand, are
still rough and are expected to be revised.
</p><p>
Following a period of review and polishing, it is the WG's intent
to issue a Last Call for Review by other W3C working groups sometime
during March, 2000, and to submit this specification thereafter for publication as a Candidate Recommendation.  This schedule
may vary, depending on the comments of the public and of other W3C
working groups on this draft.  Such comments are instrumental in the
WG's deliberations, and we encourage readers to review the draft and send comments to
        <loc
         href="http://lists.w3.org/Archives/Public/www-xml-schema-comments/">www-xml-schema-comments@w3.org</loc>
(<loc href='http://lists.w3.org/Archives/Public/www-xml-schema-comments/'>archive</loc>).   
</p><p>
Although the Working Group does not anticipate further substantial
changes to the functionality described here, this is still a working
draft, subject to change based on experience and on comment by the
public and other W3C working groups.  The present version should
be implemented only by those interested in providing a check on
its design or by those preparing for an implementation of the
Candidate Recommendation.  <emph>The Schema WG will not
allow early implementation to constrain its ability to make changes to
this specification prior to final release.</emph>
</p>
<p>
A list of current W3C working drafts can be found at
<loc href='http://www.w3.org/TR/'>http://www.w3.org/TR/</loc>. They may be updated,
replaced, or obsoleted by other documents at any time. It is inappropriate to use
W3C Working Drafts as reference material or to cite them as other than "work in progress".
</p>
<!--
<ednote>
	<edtext>
  -->
<p>
Several "note types" are used throughout this draft:
</p>
<glist>
		<gitem><label>issue [Issue (issue-name): ]</label>
			<def>
			<p>something on which the editors are seeking comment.</p>
			</def>
		</gitem>
		<gitem><label>editorial note [Ed. Note: ]</label>
			<def>
				<p>something the editors wish to call to the attention of the
				reader. To be removed prior to the recommendation becoming final.</p>
			</def>
		</gitem>
		<gitem><label>note [Note: ]</label>
			<def>
				<p>something the editors wish to call to the attention of the reader.
				To remain in the final recommendation.</p>
			</def>
		</gitem>
	</glist>
<!--
	</edtext>
</ednote>
-->
</status>
<abstract>
<p>
XML Schema: Datatypes is part 2 of a two-part draft of the specification for the
XML Schema definition language. This document proposes facilities for 
defining datatypes to be used
in XML Schemas and other XML specifications.
The datatype language, which is itself represented in XML 1.0, provides a superset
of the capabilities found in XML 1.0 document type definitions (DTDs) for specifying
datatypes on elements and attributes.
</p>
</abstract>
<langusage>
<language id='EN'>English</language>
</langusage>
<revisiondesc>
<slist>
<!--
     commenting these out means only that they won't show up in the stylesheet
	 generated "Revisions from previous draft" appendix
  -->
<!-- Changes before Sept public draft commented out...
<sitem>
19990521: PVB: corrected definition of length and maxlengths facet for strings to
be in terms of <emph>characters</emph> not <emph>bytes</emph>
</sitem>
<sitem>
19990521: PVB: removed issue "other-date-representations".  We don't
want other separators, left mention of aggregate reps for dates as
an ednote.
</sitem>
<sitem>
19990521: PVB: fixed "holidays" example, "-0101" ==> "==0101"
(where == in the correction should be two hyphens, but that would
not allow us to comment out this sitem)
</sitem>
<sitem>
19990521: PVB: fixed "common date" example, lexicalRepresenation ==> lexicalRepresentation
</sitem>
<sitem>
19990521: PVB: added note that -YY-MM-DD style dates are deprecated
</sitem>
<sitem>
19990521: PVB: added termdef element around definition of subtype
</sitem>
<sitem>
19990521: PVB: removed "whose basetype is a built-in" from definition of
"user-generated" datatype
</sitem>
<sitem>
19990521: PVB: clarified that the length facet for binary datatype is
length in bytes
</sitem>
<sitem>
19990521: PVB: fixed weird spacing problems introduced by ArborText
</sitem>
<sitem>
19990521: PVB: fixed references to non-terminals in productions
</sitem>
<sitem>
19990524: AM: changed "boolean" to have a single lexical representation.
</sitem>
<sitem>
19990524: AM: added issue: "should we add a facet to restrict a binary
datatype to a user-defined format such as audio, image, etc."
</sitem>
<sitem>
19990524: AM: corrected reference to SQL standard.
</sitem>
<sitem>
19990524: AM: corrected definition of length and maximum length
facets to be a positive integer.
</sitem>
<sitem>
19990524: AM: corrected default format for integer, decimal and real.
</sitem>
<sitem>
19990524: AM: rewrote issue definition-overiding.
</sitem>
<sitem>
19990524: AM: edited Conformance section to add example of lexical
errors and fix reference to above issue.
</sitem>
<sitem>
19990601: PVB: changed date formats in examples of Section 1 to be conformant
with the date datatype
</sitem>
<sitem>
19990601: PVB: added a "for compatibility" terminology entry
</sitem>
<sitem>
19990601: PVB: added a Name datatype and redefined the XML 1.0 attribute types
in terms of it
</sitem>
<sitem>
19990601: PVB: remove "for attributes only" restriction on XML 1.0  attribute types.
Added a "for compatibility" clause for attribute values.
</sitem>
<sitem>
19990601: PVB: added language datatype
</sitem>
<sitem>
19990602: PVB: added uuid datatype
</sitem>
<sitem>
19990602: PVB: added NCName datatype
</sitem>
<sitem>
19990604: AM: changed date and time formats to allow only ISO 8601
extended format. Impacted sections on the date, time datatypes,
section 4, Appendix C.
</sitem>
<sitem>
19990604: AM: added ednote to string datatype saying we need to harmonize
with I18N character model.
</sitem>
<sitem>
19990604: PVB: added "Revisions from previous draft" appendix
</sitem>
<sitem>
19990604: PVB: moved "built-in generated" datatype definitions into the
schema for datatype definitions (instead of it being in its own appendix).
</sitem>
<sitem>
19990604: PVB: upadted the schema for datatype definitions to point to
the correct (per xmlschema-1) DTD and schema
</sitem>
<sitem>
19990623: AM: added paragraph to conformance section which begins
to be more precise about how conforming processors should behave
</sitem>
<sitem>
19990623: AM: removed confusing statement from conformance section
which said that " checking for lexical conformance is all that is
expected of an XML processor."
</sitem>
<sitem>
19990623: PVB: removed section on "Characterizing Operations" and
all references to it (or its content) in the rest of the draft.
</sitem>
<sitem>
19990623: PVB: removed uuid datatype
</sitem>
<sitem>
19990623: PVB: made NMTOKEN a primitive datatype and Name a
subtype of NMTOKEN.
</sitem>
<sitem>
19990623: PVB: corrected the basetypes of following XML-related
generated datatypes: IDREFS (from ID to IDREF), ENTITY (from ID to Name),
ENTITIES (from ID to ENTITY), NMTOKENS (from Name to NMTOKEN).
</sitem>
<sitem>
19990623: PVB: changed name of section "User-Generated Datatypes" to
the more correct "Defining Generated Datatypes".  Also added some
explanatory text to the beginning of that section which explains
that the abstract syntax there is used both for defining built-in
and user-generated datatypes.
</sitem>
<sitem>
19990623: PVB: added explanations of abstract and concrete
syntax (mostly borrowed from the structural draft) to section
"Defining Generated Datatypes".
</sitem>
<sitem>
19990623: PVB: separated references into those that are normative
and those that are non-normative
</sitem>
<sitem>
19990623: PVB: added a pointer to the draft revision of ISO 8601
in its bib entry
</sitem>
<sitem>
19990623: PVB: added "no-consensus" issues to those all sections
except "Type System" and "Built-in datatypes" stating that no WG
concensus has been reached on the section (the exclusions above
are because those sections which granted consensus status at the
Ann Arbor f2f)
</sitem>
<sitem>
19990623: PVB: cleaned up productions for numeric literals
</sitem>
<sitem>
19990624: PVB: excluded subsections 1.1 and 1.2 from the "no-consusus"
issue for section 1
</sitem>
<sitem>
19990630: PVB: removed number datatype, made real into a built-in
primitive, changed the basetype of decimal to real and the basetype
of integer to decimal.  Also added NaN, INF and -INF to the lexical
space of all numeric types.
</sitem>
<sitem>
19990630: PVB: added 2 new subtypes of integer: non-positive-integer
and non-negative-integer, each of which has 1 subtype: negative-integer
and positive-integer, respectively.  Added generated datatype definitions
for these to the schema for datatypes.
</sitem>
<sitem>
19990630: PVB: fixed typos in definition of IDREF and IDREFS
(was "the lexical space of ID is .." now "the lexical space of IDREF is ...")
</sitem>
<sitem>
19990630: PVB: added issue(non-negative-integer-literals)
</sitem>
<sitem>
19990630: PVB: added links to known subtypes in all datatype
descriptions
</sitem>
<sitem>
19990630: PVB: changed "no-consensus" issues to "no-consensus"
ednotes
</sitem>
<sitem>
19990630: PVB: changed "no-consensus" ednote for section 1 to
exclude subsection 1.3, as voted on during the telcon today
</sitem>
<sitem>
19990630: PVB: corrected several interal cross-references: from termref's
to specref's
</sitem>
<sitem>
19990630: PVB: added all previous drafts (internal as well as public WDs)
to the "Previous Versions" section.  In future public WDs only those
"previous versions" which were public WDs will display
</sitem>
<sitem>
19990630: PVB: changed "collection" to "set" in definition of "value space"
(thought this had been changed long ago, sorry)
</sitem>
<sitem>
19990708: PVB: removed section 1.5 "Organization", per WG vote on telcon
</sitem>
<sitem>
19990708: PVB: removed "no-consensus" ednote from section 1
</sitem>
<sitem>
19990709: PVB: added (stub) subsections on "Precision", "Scale" and "Encoding" to
section 2.4.2 "Constraining Facets".  All facets mentioned in all datatype
definitions in section 3 should be listed in 2.4.2. (this is not intended to address
the standing issue <xspecref href="http://www.w3.org/XML/Group/xmlschema-current/issues.html#constraining-facet-definitions">
constraining-facet-definitions</xspecref>, but was needed for the next revision item)
</sitem>
<sitem>
19990709: PVB: added "Datatypes and Facets" appendix which consists of
several tables which attempt to show which facets apply to which datatypes
</sitem>
<sitem>
19990713: PVB: fixed bug in schema for datatypes regarding modelGroup vs.
elementType Refs in unordered modelGroup
as per
<loc href='http://lists.w3.org/Archives/Public/www-xml-schema-comments/1999AprJun/0088.html'>
http://lists.w3.org/Archives/Public/www-xml-schema-comments/1999AprJun/0088.html</loc>
</sitem>
<sitem>
19990726: AM: Changed example of user-generated datatype from
heightInInches to i4.
</sitem>
<sitem>
19990726: AM: Rewrote "Exact and Approximate".
</sitem>
<sitem>
19990812: PVB: Removed all mention of picture constraints as lexical-representations
for strings
</sitem>
<sitem>
19990819: AM: Amended Ed. Note on a URL for the datatypes namespace
referring to Dan Connolly's note "make up your own".
</sitem>
<sitem>
19990819: AM: Removed issue on NULLS, 2 occurrences.
</sitem>
<sitem>
19990819: AM: Changed Ed. Note on "Better Ref Mechs" associated with
IDREFS to "issue"..
</sitem>
<sitem>
19990819: AM: Removed issue on measurement units as WG decided to
defer to version 2.
</sitem>
<sitem>
19990919: HT: modifed abstract syntax to better reflect intent?
</sitem>
<sitem>
19990923: HT: modified schema for schemas to conform to the concrete
syntax in the latest Structures draft
</sitem>
<sitem>
19990923: PVB: added minAbsoluteValue and maxAbsoluteValue facets to
real, their intent is to allow generation of subtypes of real whose
value spaces correspond to comment float-point representations.
Added examples to section 4 to show how to generate IEEE 32-bit, etc.
</sitem>
<sitem>
19990923: PVB: replaced dateTime, date, time and timePeriod with all
new date/time related types: timeInstant, timeInstant, recurringInstant,
date and time.  Additionally, limited the lexical representations of each
of the new types to a single form (w/ the exception of still allowing both
left truncation and reduced [i.e., right truncated] representations).
Changed all examples which used date/time to use the new lexical representation
</sitem>
<sitem>
19990923: PVB: modified the abstract syntax, schema for datatypes and DTD
for datatypes to bring them in line with above changes.
</sitem>
<sitem>
19990924: HST: link housekeeping before publication</sitem>
<sitem>
19991020: AM: Rewrote "NOTATION".
</sitem>
<sitem>
19991020: AM: Made NMTOKEN a subtype of string.
</sitem>
<sitem>
19991020: AM: Changed lex reps for all date and time datatypes to ISO
extended format i.e. with separators.
</sitem>
<sitem>
19991020: AM: Removed issue on non-Gregorian dates.
</sitem>
<sitem>
19991020: AM: Renamed "lexical representation" facet for string to "pattern".
</sitem>
 <sitem>
19991026: AM: Added appendix discussing ISO 8601 formats.  Removed note
asking for such explanation.
</sitem>
<sitem>
1999-10-26: PVB: fixed errors in datatypes.xsd and datatypes.dtd as pointed
out by <loc href="http://lists.w3.org/Archives/Public/www-xml-schema-comments/1999JulSep/0050.html">
Curt Arnold</loc>
</sitem>
<sitem>
1999-10-26: PVB: added period to the facets production
</sitem>
<sitem>
1999-10-26: PVB: added a note on the basetype to the definition of
datatype NMTOKEN
</sitem>
<sitem>
1999-10-26: PVB: removed NaN, INF and -INF from the lexical space
of integer and decimal
</sitem>
<sitem>
1999-11-08: PVB: removed real datatype and all references to it
</sitem>
<sitem>
1999-11-08: PVB: added inital definitions for float and double datatypes.
This initial definition is not intended to be complete, we need a more
complete description of the round-to-nearest behavior of mapping literals
into the value space (i.e., a more readable description of "best approximation"
from the Clinger paper in the non-normative references section).
</sitem>
<sitem>
1999-11-08: PVB: corrected typos in the definitions of datatypes generated
from integer to corrected identify the generated type
</sitem>
<sitem>
1999-11-08: PVB: added specref elements to all mentions of constraining facets
</sitem>
<sitem>
1999-11-08: PVB: added term elements to all mentions of a datatype name in
the definition of that datatype
</sitem>
<sitem>
1999-11-12: PVB: changed lexical space of timeInstant to be more consistent
with ISO 8601, nYnMnDTnHnMnS (minus the 'P' designator).
</sitem>
<sitem>
1999-11-12: PVB fixed productions for decimalLiteral to allow forms such as
-.12 and -23.
</sitem>
<sitem>
19991122: AM: Added some more explanation to timeInstant format.  Fixed
Appendix D to reflect changes.
</sitem>
<sitem>
19991122: AM: Added "uncountable infinite and exact" value space to 2.4.1.3
</sitem>
<sitem>
19991122: AM: Removed issue "Better Reference Mechanisms".
</sitem>
<sitem>
19991122: AM: Added "collation sequence for strings is Unicode characater number".
</sitem>
<sitem>
19991122: AM: Added min/max facets to date/time dataypes.
</sitem>
<sitem>
19991122: AM: Removed issues on URI and binary datatypes.
</sitem>
<sitem>
19991122: AM: Added value space validation to conformance section.
</sitem>
<sitem>
19991122: AM: Added values space definitions to date/time datatypes.
</sitem>
<sitem>
1999-12-08: pvb: Added QName datatype
</sitem>
<sitem>
1999-12-08: pvb: changed language to be a subtype of string
</sitem>
<sitem>
1999-12-10: pvb: many small editorial changes for consistency
</sitem>
<sitem>
1999-12-10: pvb: Added pattern facet to all date/time types (should
have been there all along)
</sitem>
<sitem>
1999-12-10: pvb: Added full list of facets and subtypes to each type
definition
</sitem>
<sitem>
1999-12-10: pvb: replaced regex appendix with a brief summary of proposed
Unicode support, complete proposal coming shortly
</sitem>
<sitem>
1999-12-10: pvb: moved some references from normative to non-normative
</sitem>
<sitem>
1999-12-10: pvb: changed concrete syntax for datatype defns to more closely
match the structures draft: in particular, to allow annotations on the
datatype element and all facet elements.
</sitem>
<sitem>
1999-12-15: pvb: added normaitive reference to RTC 2045 for def of base64
</sitem>
<sitem>
1999-12-15: pvb: many more small editorial changes, for consistency in
style and presentation
</sitem>
<sitem>
1999-12-15: pvb: corrected small errors in table in appendix C.1, Fundamental
facets
</sitem>
<sitem>
1999-12-15: pvb: filled out list of datatypes for each facet in appendix C.2,
Constraining facets
</sitem>
<sitem>
1999-12-15: expanded abstract
</sitem>
<sitem>
1999-12-15: pvb: updated description of lexical space for float/double to
include literals for +- inf, +- 0, nan.
</sitem>
<sitem>
1999-12-16: pvb: modified defns of ID, IDREF, IDREFS, ENTITY, ENTITIES
and NOTATION to match NCName instead of Name as required by the Namespaces
in XML spec
</sitem>
<sitem>
1999-12-16: pvb: fully specified value space for decimal
</sitem>
 End of commented out section -->
<sitem>
2000-02-08: pvb: spell check
</sitem>
<sitem>
2000-02-08: pvb: added COS's for interaction between min/max-X facets
</sitem>
<sitem>
2000-02-08: pvb: changed datatype of length, min/maxlength facets from
positive-integer to non-negative-integer
</sitem>
<sitem>
2000-02-08: pvb: corrected typo in date-lexical-representaion, where a
"specific century" was noted as YY (changed to CC)
</sitem>
<sitem>
2000-02-08: pvb: changed defn of atomic from being "intrinsically indivisible"
to "regarded as indivisible by this specification"
</sitem>
<sitem>
2000-02-08: pvb: clarified defn of facet, wrt value spaces and not "concepts
or objects"
</sitem>
<sitem>
2000-02-08: pvb: merged "terminology" sections from both part 1 and part 2
</sitem>
<sitem>
2000-02-08: pvb: fixed datatype of scale facet (from pos-int to non-neg-int)
</sitem>
<sitem>
2000-02-08: pvb: added "priority feedback note" for bigNums
</sitem>
<sitem>
2000-02-09: pvb: fixed circular defn of decimal, as suggested 
by DC
<!--
<loc href='http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2000Jan/0365.html'>
http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2000Jan/0365.html</loc>
-->
</sitem>
<sitem>
2000-02-09: pvb: added 1 and 0 to lexical space of boolean
</sitem>
<sitem>
2000-02-09: pvb: added subsections to section 4...this may get undone when I
dump the abstract syntax, we'll see
</sitem>
<sitem>
2000-02-10: pvb: added pattern facet to all datatypes
</sitem>
<sitem>
2000-02-10: pvb: updated several incorrect values in the constraining
facets "table" in Appendix C2.
</sitem>
<sitem>
2000-02-10: pvb: changed examples to use &lt;documentation> instead
of &lt;info> as the child of &lt;annotation>
</sitem>
<!-- these are changes to implement berkeley f2f decisions -->
<sitem>
2000-02-10: pvb: added the correct built-in datatypes namespace to
section 3.1 (closes the datatypes portion of issue 78)
</sitem>
<sitem>
2000-02-10: pvb: changed examples to use &lt;simpleType> instead of
&lt;datatype>, equivalent changes to the DTD and schema will come shortly
closes the datatypes portion of issue 157)
</sitem>
<sitem>
2000-02-10: pvb: renamed uri datatype to uri-reference; clarified the
defn wrt RFC 2396; included specific mention of absolute vs. relative
uri-references; still need to be specific about the lexical representation
(closes some parts of issue 212)
</sitem>
<sitem>
2000-02-15: pvb: added SVC to binary, which says one must give a value for
the encoding facet (i.e., a hack to get around the problem that we don't
have the concept of "required" facets) [part of the resolution to issue 81]
</sitem>
<sitem>
2000-02-15: pvb: moved ID to a primitive type (since it has validation requirements
above and beyond those provided for subtypes of string).  Also added a Note: to it
making explicit the fact that the value space is scoped to an instance document
(unlike the value space of types such as integer).  Also fixed a bug in the
definition, which refered to Name instead of NCName
[part of the resolution to issue 81]
</sitem>
<sitem>
2000-02-15: pvb: moved IDREF to a primitive type (since it has validation
requirements above and beyond those provided for subtypes of string).
Added an issue about whether this could be generated from ID.
Also added a Note: to it making explicit the fact that the value space is scoped
to an instance document (unlike the value space of types such as integer).
[part of the resolution to issue 81]
</sitem>
<sitem>
2000-02-15: pvb: moved IDREFS to a primitive type (since it has validation
requirements above and beyond those provided for subtypes of string)....this is
just a temporary home and it will become generated as list of IDREF when I get
the list stuff implemented
[part of the resolution to issue 81]
</sitem>
<sitem>
2000-02-15: pvb: moved ENTITY to a primitive type (since it has validation
requirements above and beyond those provided for subtypes of string).
Also added a Note: to it making explicit the fact that the value space is scoped
to an instance document (unlike the value space of types such as integer).
Also added a SVC that entity values must match a declared unparsed entity name.
[part of the resolution to issue 81]
</sitem>
<sitem>
2000-02-15: pvb: moved ENTITIES to a primitive type (since it has validation
requirements above and beyond those provided for subtypes of string)....this is
just a temporary home and it will become generated as list of ENTITY when I get
the list stuff implemented
[part of the resolution to issue 81]
</sitem>
<sitem>
2000-02-15: pvb: moved NOTATION to a primitive type (since it has validation
requirements above and beyond those provided for subtypes of string).
Also added a Note: to it making explicit the fact that the value space is scoped
to an instance document (unlike the value space of types such as integer).
Also added a SVC that notation values must match a declared notation name.
[part of the resolution to issue 81]
</sitem>
<sitem>
2000-02-15: pvb: updated table in appendix C1, to note that all datatypes
are exact
</sitem>
<sitem>
2000-02-16: pvb: added i4, i8, u4, u8, etc. subtypes of integer, using
editor's discretion in their naming as instructed at the berkeley f2f...changed the
first example in section 4 "Defining Generated Datatypes" to use the Sku
datatype from Part 0, instead of i4 since we now have i4 built-in
</sitem>
<sitem>
2000-02-16: pvb: removed issue: definition-overriding from the draft
</sitem>
<sitem>
2000-02-17: pvb: removed the exact vs. approximate distinction entirely
(since all our types turned out to be exact)
</sitem>
<sitem>
2000-02-17: pvb: removed all mention of aggregate datatypes.  Changed
the "atomic vs. aggregate" dichotomy to be: atomic vs. list.
[part of resolution to issue 112]
</sitem>
<sitem>
2000-02-17: pvb: clarified defns of value space and lexical space.  In
particular, moved the notion of a literal denoting a value from the defn
to LS to VS and noted that a literal is a character information item from
the info set.
</sitem>
<sitem>
2000-02-17: pvb: changed terminology of "generated" to "derived", to be
in alignment with the structures spec
[part of resolution to issue 204]
</sitem>
<sitem>
2000-02-17: pvb: removed definition of term subtype, changed all prose of the
form "for subtypes of X" to "for datatypes derived from X"
[part of resolution to issue 204]
</sitem>
<sitem>
2000-02-17: pvb: removed a para from Conformance section which mentioned
processor option of turning off validation of certain facets
</sitem>
<sitem>
2000-02-17: pvb: removed note that order-relations are not defined
</sitem>
<sitem>
2000-02-17: pvb: made IDREFS, ENTITIES and NMTOKENS derived by list from
IDREF, ENTITY and NMTOKENS respectively.
[part of resolution of issue 81]
</sitem>
<sitem>
2000-02-17: pvb: clarified what the values {hex,base64} mean for the
encoding facet
</sitem>
<sitem>
2000-02-17: pvb: added pointers from the 4 mechanisms to create a value space
to the places in the spec where those mechanisms are described
</sitem>
<sitem>
2000-02-17: pvb: all built-in generated types are now defined in the
schema for datatypes
</sitem>
<sitem>
2000-02-21: pvb: clarified list datatypes, wrt use of component type
which allows whitespace in its literals and wrt facets applicable for
deriving subtypes of a list type
</sitem>
<sitem>
2000-02-23: pvb: change defn of binary and meaning of length facet
for binary to be measured in octets, since both lexical encodings
are only defined for octet multiples.
</sitem>
<sitem>
2000-02-23: pvb: incorporated prose description of regex language
(thanx to Matt Timmermans!!!!)
</sitem>
<sitem>
2000-02-23: pvb: added appinfo's to builtin definitions in the
schema for datatypes, which are used to generate the list of
constraining facets for each builtin datatype in the html version
of the spec
</sitem>
<sitem>
2000-02-23: pvb: replaced abstract syntax with 2 new sections for
"schema components" and "xml representation" constructs, still needs
a lot of editorial work tho
</sitem>
<sitem>
2000-02-23: pvb: list of derived types for each built-in type
is now auto-generated from the builtins.xsd
</sitem>
<sitem>
2000-02-23: pvb: appendix C.2 (list of datatypes to which each
facet applies) is now auto-generated form the builtins.xsd
</sitem>
<sitem>
2000-02-24: pvb: put equality back in as a fundamental facet,
to help with the vote on today's telcon regarding key, unique
and keyref value matching.
</sitem>
<sitem>
2000-02-24: pvb: added 'datatype valid' validation constraint
</sitem>
<sitem>
2000-02-24: pvb: added stub for 'facet valid' validation constraint
</sitem>
<!--
<sitem>
2000-02-24: pvb:
</sitem>
-->
</slist>
</revisiondesc>
</header>
<body>
<div1 id='Intro'>
<head>Introduction</head>
<div2 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 border='1' bgcolor='&cellback;'>
<thead>
<tr>
<th align='center'>Data oriented</th>
<th align='center'>Document oriented</th>
</tr>
</thead>
<tbody>
<tr>
<td><eg><![CDATA[<invoice>
   <orderDate>1999-01-21</orderDate>
   <shipDate>1999-01-25</shipDate>
   <billingAddress>
      <name>Ashok Malhotra</name>
      <street>123 IBM Ave.</street>
      <city>Hawthorne</city>
      <state>NY</state>
      <zip>10532-0000</zip>
   </billingAddress>
   <voice>555-1234</voice>
   <fax>555-4321</fax>
</invoice>]]></eg></td>
<td><eg><![CDATA[<memo importance="high"
      date="1999-03-23">
   <from>Paul V. Biron</from>
   <to>Ashok Malhotra</to>
   <subject>Latest draft</subject>
   <body>
      We need to discuss the latest
      draft <emph>immediately</emph>.
      Either email me at <email>
      mailto:paul.v.biron@kp.org</email>
      or call <phone>555-9876</phone>
   </body>
</memo>]]></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='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 &amp; Java primitive data types, 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 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 href='&xmlspec;#dt-chardata'>#PCDATA</xspecref>
and attribute values of <xspecref href='&xmlspec;#sec-attribute-types'>various
types </xspecref> in a DTD.  It is the intension 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 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>
<ednote>
<edtext>
The list below represents a merger of the equivlant sections from both
structures and datatypes.  Do we really need all of these terms defined
in the datatypes spec?
</edtext>
</ednote>
<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 character for character the same.
</p>
</def>
</gitem>
<gitem>
<label><termdef id="dt-identical" term="identical">identical</termdef></label>
<def>
<p>
(Of <pt>URI</pt>s) <emph>identical</emph>, according to the rules for identity in
<bibref ref="XMLNS"/>.
</p>
</def>
</gitem>
<!--<stale>-->
<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">error</termref>.
</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 may detect and report an error and may recover from it.
</p>
</def>
</gitem>
<gitem>
<label><termdef id="dt-fatal-error" term="fatal error"><term>fatal
error</term></termdef></label>
<def>
<p>
An <termref def="dt-error">error</termref> which a conforming
processor must detect and report to the application.
</p>
</def>
</gitem>
<!--</stale>-->
</glist>
</div2>
</div1>
<div1 id='typesystem'>
<head>Type System</head>
<p>
This section describes the conceptual framework behind the 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>
<p>
The datatypes discussed in this specification are computer representations
of well known abstract concepts such as <emph>integer</emph> and <emph>date</emph>.
It is not the place of this specification to define these abstract concepts;
many other publications provide excellent definitions.
</p>
<!--
<p>
Two concepts are essential for an understanding of datatypes as they
are discussed here: a <termref def='dt-value-space'/> is an abstract collection of
permitted values for a datatype. Each datatype also has a space of valid
lexical representations or literals, each of which denotes a single value.
A single value in the <termref def='dt-value-space'/> may
be denoted by several distinct valid literals.
</p>
-->
<div2 id='datatype'>
<head>Datatype</head>
<p>
<termdef id='dt-datatype' term='datatype'>In this specification,
a <term>datatype</term> is defined as 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 facets that characterize properties of the
<termref def='dt-value-space'/>, individual values or lexical items.
</termdef>
</p>
</div2>
<div2 id='value-space'>
<head>Value space</head>
<p>
<termdef id='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>
The <termref def='dt-value-space'/> of a given datatype can
be defined in one of the following ways:
<ulist>
<item>
<p>
defined axiomatically from fundamental notions (intensional definition)
[see <termref def='dt-primitive'/>]
</p>
</item>
<item>
<p>
enumerated outright (extensional definition)
[see <termref def='dt-enumeration'/>]
</p>
</item>
<item>
<p>
defined by restricting the <termref def='dt-value-space'/> of
an already defined datatype to a particular subset with a given set of properties
[see <termref def='dt-derived'/>]
</p>
</item>
<item>
<p>
defined as a combination of values from an already defined
<termref def='dt-value-space'/>(s) by a specific construction procedure
[see <termref def='dt-list'/>]
</p>
</item>
</ulist>
</p>
<p>
<termref def='dt-value-space'/>s have certain properties.  For example,
they always have the property of <termref def='dt-cardinality'/>,
some definition of <emph>equality</emph>
and may 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'/>s that are recognized
by this specification are defined in <specref ref='fundamental-facets'/>.
</p>
</div2>
<div2 id='lexical-space'>
<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='dt-lexical-space'>A
<term>lexical space</term> is the set of valid <emph>literals</emph> for a datatype
(literals may appear as one or more
<xspecref href='&xmlinfosetspec;#infoitem.character'>character information
item</xspecref>s as defined in <bibref ref='XML-Infoset'/>).
</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>
</div2>
<!--
     remove this entire section (and all references to it) for now...
	 we will reintroduce it later if we get EVERYTHING else done and
	 there is still time
	
<div2 id="characterizing-operations">
<head>Characterizing operations</head>
<p>
Many different datatypes may share the same <termref def='dt-value-space'/>.  As
a result, a datatype is only partially defined by its <termref def='dt-value-space'/>.
<termdef id="dt-characterizing-operations" term="characterizing operations">The
<term>characterizing operations</term> for a datatype are those operations (such as
"add" or "append") on or resulting in values of the datatype which distinguish
this datatype from other datatypes having <termref def='dt-value-space'/>s
which are identical
except possibly for substitution of symbols.</termdef>
</p>
<p>
Characterizing operations  can be useful in choosing the appropriate
datatype for particular purposes, such as mapping to or from common programming
languages or database environments.
</p>
<ednote>
<edtext>
Currently, no characterizing operations are defined on the
<termref def='dt-built-in'/> datatypes provided by this specification;
additionally, there is
no means to specify characterizing operations on <termref def='dt-user-derived'/>
datatypes.
This will be addressed in a future draft.
</edtext>
</ednote>
<p>
This discussion of characterizing operations in the definition
of datatype is for pedagogical purposes only and does <emph>not</emph>
imply that conforming processors must implement those operations, nor
does it imply that <emph>expressions</emph> (containing operators) which
evaluate to values of a given datatype will be accepted by conforming processors.
</p>
<div3 id="equal">
<head>Equal</head>
<p>
Every <termref def='dt-value-space'/> supports the notion of equality,
with	the following
rules:
</p>
<ulist>
<item>
<p>
for any two instances of values from the <termref def='dt-value-space'/> (a,b),
either a
is equal to b, denoted a = b, or a is not equal to b, denoted a != b;
</p>
</item>
<item>
<p>
there is no pair of instances (a, b) of values from the <termref def='dt-value-space'/>
such that both a = b and a != b;
</p>
</item>
<item>
<p>
for every value a from the <termref def='dt-value-space'/>, a = a;
</p>
</item>
<item>
<p>
for any two instances (a, b) of values from the <termref def='dt-value-space'/>,
a = b if and only if b = a;
</p>
</item>
<item>
<p>
for any three instances (a, b, c) of values from the <termref def='dt-value-space'/>,
if a = b and b = c, then a = c.
</p>
</item>
</ulist>
<p>
On every datatype, the operation Equal is defined in terms of the equality property of
the <termref def='dt-value-space'/>: for any values a, b drawn from the
<termref def='dt-value-space'/>, Equal(a,b) is true if a = b, and false otherwise.
</p>
</div3>
</div2>
  -->
<div2 id='facets'>
<head>Facets</head>
<p>
<termdef id='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>
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>
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>
<div3 id='fundamental-facets'>
<head>Fundamental facets</head>
<!--
					<issue id="facet-or-property">
						<p>
							Are the <bibref ref="ISO11404"/> notions of <specref
							ref="order"/>, <specref ref="bound"/>, etc. really
							facets as we've been talking about them, or are they
							<emph>properties</emph> which are logically derived
							from concrete values given for specific facets?
							(e.g., if a value is given for the <term>maxInclusive</term>
							facet then the datatype has the property of being
							<term>bounded</term>).
						</p>
					</issue>
  -->
<p>
A datatype is characterized by properties of its <termref def='dt-value-space'/>.
Each of
these properties give rise to a facet that serves to characterize
the datatype.
These properties are discussed in this section.
</p>
<div4 id="equal">
<head>Equal</head>
<p>
Every <termref def='dt-value-space'/> supports the notion of equality,
with	the following
rules:
</p>
<ulist>
<item>
<p>
for any two instances of values from the <termref def='dt-value-space'/> (a,b),
either a
is equal to b, denoted a = b, or a is not equal to b, denoted a != b;
</p>
</item>
<item>
<p>
there is no pair of instances (a, b) of values from the <termref def='dt-value-space'/>
such that both a = b and a != b;
</p>
</item>
<item>
<p>
for every value a from the <termref def='dt-value-space'/>, a = a;
</p>
</item>
<item>
<p>
for any two instances (a, b) of values from the <termref def='dt-value-space'/>,
a = b if and only if b = a;
</p>
</item>
<item>
<p>
for any three instances (a, b, c) of values from the <termref def='dt-value-space'/>,
if a = b and b = c, then a = c.
</p>
</item>
</ulist>
<p>
On every datatype, the operation Equal is defined in terms of the equality property of
the <termref def='dt-value-space'/>: for any values a, b drawn from the
<termref def='dt-value-space'/>, Equal(a,b) is true if a = b, and false otherwise.
</p>
</div4>
<div4 id='order'>
<head>Order</head>
<p>
<termdef id='dt-ordered' term='ordered'>A <termref def='dt-value-space'/>, and hence
a datatype, is said to be <term>ordered</term> if there exists an
<term>order relation</term>
defined for that <termref def='dt-value-space'/>.</termdef>
</p>
<p>
<term>order relations</term>
have the following
rules:
</p>
<ulist>
<item>
<p>
for every pair (a, b) from the <termref def='dt-value-space'/>,
either a &lt; b or b &lt;
a, or a = b;
</p>
</item>
<item>
<p>
for every triple (a, b, c) from the <termref def='dt-value-space'/>,
if a &lt; b and
b &lt; c, then a &lt; c.
</p>
</item>
</ulist>
<!--
     remove all references to the section on characterizing-operations)
	 for now...
	 we will reintroduce it later if we get EVERYTHING else done and
	 there is still time
	
<p>
If a <termref def='dt-value-space'/> is ordered, then the datatype will have
a corresponding
<specref ref="characterizing-operations"/>, called InOrder(a, b), defined
by:
</p>
<ulist>
<item>
<p>
for every (a, b) from the <termref def='dt-value-space'/>,
InOrder(a, b) is true if a &lt;=
b, and false otherwise.
</p>
</item>
</ulist>
  -->
<p>
There may exist several possible order relations for a given
<termref def='dt-value-space'/>.
Additionally, there may exist multiple datatypes with the same
<termref def='dt-value-space'/>.
In such cases, each datatype will define a different order relation on the
<termref def='dt-value-space'/>.
</p>
<!--
<ednote>
<edtext>
Currently, no order relations are defined on the <termref def='dt-built-in'/>
datatypes provided by this specification; additionally, there is no means
to specify an order relation on <termref def='dt-user-derived'/> datatypes.
This will be addressed
in a future draft.
</edtext>
</ednote>
-->
</div4>
<div4 id='bounds'>
<head>Bounds</head>
<p>
<termdef id='dt-bounded-above' term='bounded above'>
A <termref def='dt-value-space'/> is <term>bounded above</term>
if there exists a unique value <emph>U</emph> in the <termref def='dt-value-space'/>
such that,
for all values <emph>v</emph> in the <termref def='dt-value-space'/>,
<emph>v</emph> &lt;= <emph>U</emph>.
</termdef>
<termdef id='dt-upper-bound' term='upper bound'>
The value <emph>U</emph> is said to be an <term>upper bound</term> of the
<termref def='dt-value-space'/>.
</termdef>
</p>
<p>
<termdef id='dt-bounded-below' term='bounded below'>A
<termref def='dt-value-space'/> is <term>bounded below</term> if there exists a
unique value <emph>L</emph> in the space such that, for all values <emph>v</emph>
in the <termref def='dt-value-space'/>, <emph>L</emph> &lt;= <emph>v</emph>.
</termdef>
<termdef id='dt-lower-bound' term='lower bound'>
The value <emph>L</emph> is then said to be a  <term>lower bound</term> of
the <termref def='dt-value-space'/>.</termdef>
</p>
<p>
<termdef id='dt-bounded' term='bounded'>A datatype is <term>bounded</term> if
its <termref def='dt-value-space'/> has both an <termref def='dt-upper-bound'/>
and a
<termref def='dt-lower-bound'/>.
</termdef>
</p>
</div4>
<div4 id='cardinality'>
<head>Cardinality</head>
<p>
<termdef id='dt-cardinality' term='cardinality'>Every <termref def='dt-value-space'/>
has associated
with it the concept of <term>cardinality</term>.  Some <termref def='dt-value-space'/>s
are finite,
some are countably infinite while still others are uncountably infinite. A
datatype is said to have the cardinality of its <termref def='dt-value-space'/>.
</termdef>
</p>
<p>
It
is sometimes useful to categorize <termref def='dt-value-space'/>s
(and hence, datatypes) as
to their cardinality, there are three significant cases:
</p>
<ulist>
<item>
<p>
<termref def='dt-value-space'/>s that are finite
</p>
</item>
<item>
<p>
<termref def='dt-value-space'/>s that are countably infinite
<!--and exact
(see <specref ref='exact-approx'/>)
-->
</p>
</item>
<!--
<item>
<p>
<termref def='dt-value-space'/>s that are countably infinite and approximate
(see <specref ref='exact-approx'/>)
</p>
</item>
-->
<!--
<item>
<p>
<termref def='dt-value-space'/>s that are uncountably infinite and exact
(see <specref ref='exact-approx'/>)
</p>
</item>
-->
</ulist>
<!--
<p>
Every finite <termref def='dt-value-space'/> is necessarily exact. No computational
datatype has a <termref def='dt-value-space'/> that is is uncountably infinite.
</p>
-->
</div4>
<!--
<div4 id='exact-approx'>
<head>Exact and Approximate</head>
<p>
The computational representation of a datatype may limit the degree
to which values of the datatype can be distinguished.
</p>
<p>
<termdef id='dt-exact' term='exact'>
If every
value in the <termref def='dt-value-space'/> of the conceptual datatype is distinguishable
in the computational representation from every other value in the
<termref def='dt-value-space'/>,
then the datatype is said to be <term>exact</term>.</termdef>
<termdef id='dt-approximate' term='approximate'>
If a datatype is not <term>exact</term> then it is <term>approximate</term>.</termdef>
</p>
<p>
Certain mathematical datatypes with very large or infinite value
spaces have representations which are said to be approximate in that
multiple values in the conceptual <termref def='dt-value-space'/> map to single values
in the <termref def='dt-value-space'/> of the representation.
In this specification, all approximate datatypes have computational
models which specify, via parametric values, a degree of approximation,
that is, they require a certain minimum set of values of the mathematical
datatype to be distinguishable in the computational datatype.
Further, each value in the conceptual <termref def='dt-value-space'/> must be capable
of being represented in the representational <termref def='dt-value-space'/>
within a certain
distance i.e. the difference between the conceptual value and the
representational value must not exceed some agreed upon value.
</p>
</div4>
-->
<div4 id='numeric'>
<head>Numeric</head>
<p>
<termdef id='dt-numeric' term='numeric'>A datatype is said to be
<term>numeric</term> if its values are conceptually
quantities (in some mathematical number system).</termdef>
<termdef id='dt-non-numeric' term='non-numeric'>A datatype
whose values are not <termref def='dt-numeric'/> is said to be <term>non-numeric</term>
.</termdef>
</p>
</div4>
</div3>
<div3 id='non-fundamental'>
<head>Constraining or Non-fundamental facets</head>
<p>
<termdef id='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'/>s
to a <termref def='dt-basetype'/> is described in
<specref ref='derivation-by-restriction'/>.
</p>
<p>
In this section we define all <termref def='dt-constraining-facet'/>s
that are available for use when defining
<termref def='dt-derived'/> datatypes.
</p>
<div4 id='length'>
<head>length</head>
<p>
<termdef id='dt-length' term='length'><term>length</term> is
the number of <emph>units of length</emph>, where <emph>units of length</emph>
varies depending on the <termref def='dt-basetype'/>.
The value of <term>length</term> must be a
<dtref ref='non-negative-integer'/>.
</termdef>
</p>
<p>
For datatypes <termref def='dt-derived'/> from <dtref ref='string'/>,
<term>length</term> is measured in units of characters.
For datatypes <termref def='dt-derived'/> from <dtref ref='binary'/>,
<term>length</term> is measured in octets (8 bits).
For datatypes <termref def='dt-derived'/> by <termref def='dt-list'/>,
<term>length</term> is measured in list items.
</p>
<!--
<ednote>
<edtext>
We need to ultimately reconcile the notion of string length with the resolution
of the i18n issues around character, indexing, etc.  I18N recommends
that length and maxlength be a "character count" and do not indicate
storage requirements.
</edtext>
</ednote>
-->
</div4>
<div4 id='minlength'>
<head>minlength</head>
<p>
<termdef id='dt-minlength' term='minlength'><term>minlength</term> is
the minimum number of <emph>units of length</emph>, where <emph>units of length</emph>
varies depending on the <termref def='dt-basetype'/>.
The value of <term>minlength</term> must be a
<dtref ref='non-negative-integer'/>.</termdef>
</p>
<p>
For datatypes <termref def='dt-derived'/> from <dtref ref='string'/>,
<term>minlength</term> is measured in units of characters.
For datatypes <termref def='dt-derived'/> from <dtref ref='binary'/>,
<term>minlength</term> is measured in bits.
</p>
<constraintnote type='cos' id='length-minlength'>
<head>length and minlength</head>
<p>
It is an <termref def='dt-error'/> for both <termref def='dt-length'/>
and <termref def='dt-minlength'/> to be specified
for the same datatype.
</p>
</constraintnote>
<constraintnote type='cos' id='minlength-less-than-equal-to-maxlength'>
<head>minlength &lt;= maxlength</head>
<p>
It is an <termref def='dt-error'/> for the value specified for
<termref def='dt-minlength'/> to be greater than the value specified for
<termref def='dt-maxlength'/> for the same datatype.
</p>
</constraintnote>
</div4>
<div4 id='maxlength'>
<head>maxlength</head>
<p>
<termdef id='dt-maxlength' term='maxlength'><term>maxlength</term> is
the maximum number of <emph>units of length</emph>, where <emph>units of length</emph>
varies depending on the <termref def='dt-basetype'/>.
The value of <term>maxlength</term> must be a
<dtref ref='non-negative-integer'/>.</termdef>
</p>
<p>
For datatypes <termref def='dt-derived'/> from <dtref ref='string'/>,
<term>maxlength</term> is measured in units of characters.
For datatypes <termref def='dt-derived'/> from <dtref ref='binary'/>,
<term>maxlength</term> is measured in bits.
</p>
<constraintnote type='cos' id='length-maxlength'>
<head>length and maxlength</head>
<p>
It is an <termref def='dt-error'/> for both <termref def='dt-length'/>
and <termref def='dt-maxlength'/> to be specified
for the same datatype.
</p>
</constraintnote>
</div4>
<div4 id='pattern'>
<head>pattern</head>
<p>
<termdef id='dt-pattern' term='pattern'>
<!--For subtypes of <dtref ref='string'/>, -->
<term>pattern</term> is a constraint on the
<termref def='dt-value-space'/> of a datatype which is achieved by constraining
the <termref def='dt-lexical-space'/>.
The value of <term>pattern</term> must be a <termref def='dt-regex'/>.
<!--
For subtypes of the date and time related types (<dtref ref='timeInstant'/>, <dtref ref='timeInstant'/>,
<dtref ref='recurringInstant'/>, <dtref ref='date'/> and <dtref ref='time'/>),
<term>pattern</term> can be used to constrain the allowable values using
IS0 8601 "pictures" (<specref ref='formatdetails'/>).
-->
</termdef>
</p>
</div4>
<div4 id='enumeration'>
<head>enumeration</head>
<p>
<termdef id='dt-enumeration' term='enumeration'>
<term>enumeration</term> constrains the <termref def='dt-value-space'/>
to a specified set of values.
</termdef>
</p>
<p>
No order or any other relationship is implied between the individual
items of the enumeration set.
</p>
</div4>
<div4 id='maxInclusive'>
<head>maxInclusive</head>
<p>
<termdef id='dt-maxInclusive' term='maxInclusive'>
<term>maxInclusive</term> is the <termref def='dt-upper-bound'/>
of the <termref def='dt-value-space'/> for a datatype with the
<termref def='dt-ordered'/> property.  The value is
<emph>inclusive</emph> in the sense that the value is itself included
in the <termref def='dt-value-space'/>.
The value of <term>maxInclusive</term> must be of the same type
as the <termref def='dt-basetype'/>.
</termdef>
</p>
<constraintnote type='cos' id='minInclusive-less-than-equal-to-maxInclusive'>
<head>minInclusive &lt;= maxInclusive</head>
<p>
It is an <termref def='dt-error'/> for the value specified for
<termref def='dt-minInclusive'/> to be greater than the value specified for
<termref def='dt-maxInclusive'/> for the same datatype.
</p>
</constraintnote>
</div4>
<div4 id='maxExclusive'>
<head>maxExclusive</head>
<p>
<termdef id='dt-maxExclusive' term='maxExclusive'>
<term>maxExclusive</term> is the <termref def='dt-upper-bound'/>
of the <termref def='dt-value-space'/> for a datatype with the
<termref def='dt-ordered'/>
property.  The value is <emph>exclusive</emph> in the sense that
the value is itself excluded from the <termref def='dt-value-space'/>.
The value of <term>maxExclusive</term> must be of the same type
as the <termref def='dt-basetype'/>.
</termdef>
</p>
<constraintnote type='cos' id='maxInclusive-maxExclusive'>
<head>maxInclusive and maxExclusive</head>
<p>
It is an <termref def='dt-error'/> for both <termref def='dt-maxInclusive'/>
and <termref def='dt-maxExclusive'/> to be specified
for the same datatype.
</p>
</constraintnote>
<constraintnote type='cos' id='minExclusive-less-than-equal-to-maxExclusive'>
<head>minExclusive &lt;= maxExclusive</head>
<p>
It is an <termref def='dt-error'/> for the value specified for
<termref def='dt-minExclusive'/> to be greater than the value specified for
<termref def='dt-maxExclusive'/> for the same datatype.
</p>
</constraintnote>
</div4>
<div4 id='minInclusive'>
<head>minInclusive</head>
<p>
<termdef id='dt-minInclusive' term='minInclusive'>
<term>minInclusive</term> is the <termref def='dt-lower-bound'/>
of the <termref def='dt-value-space'/> for a datatype with the
<termref def='dt-ordered'/>
property.  The value is <emph>inclusive</emph> in the
sense that the value is itself included in the <termref def='dt-value-space'/>.
The value of <term>minInclusive</term> must be of the same type
as the <termref def='dt-basetype'/>.
</termdef>
</p>
</div4>
<div4 id='minExclusive'>
<head>minExclusive</head>
<p>
<termdef id='dt-minExclusive' term='minExclusive'>
<term>minExclusive</term> is the <termref def='dt-lower-bound'/>
of the <termref def='dt-value-space'/> for a datatype with the
<termref def='dt-ordered'/>
property.  The value is <emph>exclusive</emph> in the sense that
the value is itself excluded from the <termref def='dt-value-space'/>
for the datatype.
The value of <term>minExclusive</term> must be of the same type
as the <termref def='dt-basetype'/>.
</termdef>
</p>
<constraintnote type='cos' id='minInclusive-minExclusive'>
<head>minInclusive and minExclusive</head>
<p>
It is an <termref def='dt-error'/> for both <termref def='dt-minInclusive'/>
and <termref def='dt-minExclusive'/> to be specified
for the same datatype.
</p>
</constraintnote>
</div4>
<div4 id='precision'>
<head>precision</head>
<p>
<termdef id='dt-precision' term='precision'><term>precision</term>
is the total number of decimal digits in values of datatypes
<termref def='dt-derived'/> from <dtref ref='decimal'/>.  The value of
<term>precision</term> must be a <dtref ref='positive-integer'/>.
</termdef>
</p>
</div4>
<div4 id='scale'>
<head>scale</head>
<p>
<termdef id='dt-scale' term='scale'><term>scale</term>
is the total number of decimal digits to the right of the decimal
indicator in values of datatypes <termref def='dt-derived'/> from
<dtref ref='decimal'/>. The value of <term>scale</term> must be a
<dtref ref='non-negative-integer'/> .
</termdef>
<constraintnote type='cos' id='scale-precision'>
<head>scale less than or equal to precision</head>
<p>
It is an <termref def='dt-error'/> for <termref def='dt-scale'/> to be greater than
<termref def='dt-precision'/>.
</p>
</constraintnote>
</p>
</div4>
<div4 id='encoding'>
<head>encoding</head>
<p>
<termdef id='dt-encoding' term='encoding'><term>encoding</term> is the
encoded form of the <termref def='dt-lexical-space'/> of 
datatypes <termref def='dt-derived'/> from <dtref ref='binary'/>.
The value of <term>encoding</term> must be one of {hex, base64}.
</termdef>
</p>
<p>
If the value of <term>encoding</term> is <emph>hex</emph> then each
binary octect is encoded as a character tuple, consisting the two
hexadecimal digits ([0-9a-fA-F]) representing the octet code. For example,
"20" is the <emph>hex</emph> encoding for the US-ASCII space character.
</p>
<p>
If the value of <term>encoding</term> is <emph>base64</emph> then the
entire binary stream is encoding using the Base64 Content-Transfer-Encoding
defined in Section 6.8 <bibref ref='RFC2045'/>.
</p>
</div4>
<div4 id='period'>
<head>period</head>
<p>
<termdef id='dt-period' term='period'><term>period</term> is the frequency
of recurrence for values of datatypes <termref def='dt-derived'/> from
<dtref ref='recurringInstant'/>.
The value of <term>period</term> must be <dtref ref='timeInstant'/>.
</termdef>
</p>
</div4>
</div3>
</div2>
<div2 id='datatype-dichotomies'>
<head>Datatype dichotomies</head>
<p>
It is useful to categorize the datatypes defined in this specification
along various dimensions, forming a set of characterization dichotomies.
</p>
<div3 id='atomic-vs-list'>
<head>Atomic vs. list datatypes</head>
<p>
The first distinction to be made is that between <termref def='dt-atomic'/>
and <termref def='dt-list'/> datatypes.
</p>
<ulist>
<item>
<p>
<termdef id='dt-atomic' term='atomic'><term>Atomic</term> datatypes
are those having values which are regarded by this
specification as being indivisible.</termdef>
</p>
</item>
<item>
<p>
<termdef id='dt-list' term='list'><term>List</term>
datatypes are those having values which consist of a sequence of
values of an <termref def='dt-atomic'/> datatype.
</termdef>
</p>
</item>
</ulist>
<p>
For example, a single token which <termref def='dt-match'/>es
<xspecref href='&xmlspec;#NT-Nmtoken'>Nmtoken</xspecref> from <bibref ref='XML'/>
could be the value of an <termref def='dt-atomic'/> datatype
(<dtref ref='NMTOKEN'/>); while a sequence of such tokens could be
the value of a <termref def='dt-list'/> datatype (<dtref ref='NMTOKENS'/>).
</p>
<div4 id='atomic'>
<head>Atomic datatypes</head>
<p>
<termref def='dt-atomic'/> datatypes may be either
<termref def='dt-primitive'/> or <termref def='dt-derived'/>.  The
<termref def='dt-value-space'/> of an <termref def='dt-atomic'/> datatype
is a set of "atomic" values, which for the purposes of this specification,
are not further decomposable.  The <termref def='dt-lexical-space'/> of an
<termref def='dt-atomic'/> datatype is a set of <emph>literals</emph>
whose internal structure is specific to the datatype is question.
</p>
</div4>
<div4 id='list-datatypes'>
<head>List datatypes</head>
<p>
<termref def='dt-list'/> datatypes are always <termref def='dt-derived'/>.
The <termref def='dt-value-space'/> of a <termref def='dt-list'/> datatype
is a set of finite sequences of <termref def='dt-atomic'/> values.
The <termref def='dt-lexical-space'/> of a
<termref def='dt-list'/> datatype is a set of literals
whose internal structure is a whitespace
separated sequence of literals
of the <termref def='dt-atomic'/> datatype of the items in the
<termref def='dt-list'/>
(where whitespace matches <xspecref href='&xmlspec;#NT-S'>S</xspecref>
in <bibref ref='XML'/>).
</p>
<!-- changes these links to "derived by list" when that target
gets created: BLAH -->
<p>
It is not an <termref def='dt-error'/> to define a
<termref def='dt-list'/> datatype <termref def='dt-derived'/> from an
<termref def='dt-atomic'/> datatype whose
<termref def='dt-lexical-space'/> allows whitespace.
</p>
<note role='example'>
<eg>
&lt;simpleType name='listOfString' base='string' derivedBy='list'/>
</eg>
<eg>
&lt;someElement xsi:type='listOfString'>
this is not list item 1
this is not list item 2
this is not list item 3
&lt;/someElement>
</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>
<p>
When a datatype is <termref def='dt-derived'/> from a
<termref def='dt-list'/> datatype, the following
<termref def='dt-constraining-facet'/>s may be used:
</p>
<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>
</ulist>
<p>
For each of the above <termref def='dt-facet'/>s, the
<emph>unit of length</emph> is measured in list items.
</p>
<note>
<p>
A datatype which is <termref def='dt-atomic'/> in this specification need not
be an "atomic" datatype in any programming language used to implement
this specification.  Likewise,a datatype which is a <termref def='dt-list'/>
in this specification need not be a "list" datatype in any programming language
used to implement this specification.
</p>
</note>
</div4>
</div3>
<div3 id='primitive-vs-derived'>
<head>Primitive vs. derived datatypes</head>
<p>
Next, we distinquish between <termref def='dt-primitive'/> and 
<termref def='dt-derived'/> datatypes.
</p>
<ulist>
<item>
<p>
<termdef id='dt-primitive' term='primitive'><term>Primitive</term>
datatypes are those that are not defined in terms of other datatypes;
they exist <emph>ab initio</emph>.</termdef>
</p>
</item>
<item>
<p>
<termdef id='dt-derived' term='derived'><term>Derived</term>
datatypes are those that are defined in terms of other datatypes.</termdef>
</p>
</item>
</ulist>
<p>
For example, a <dtref ref='float'/> is a well defined mathematical   <!--find example other than float -->
concept that cannot be defined in terms of other datatypes while
a <dtref ref='date'/> is a special case of the more general datatype
<dtref ref='recurringInstant'/>.
</p>
<p>
The datatypes defined by this specification fall into both
the <termref def='dt-primitive'/> and <termref def='dt-derived'/> categories.
It is felt that a judiciously
chosen set of <termref def='dt-primitive'/> datatypes will serve the widest
possible audience by providing a set of convenient datatypes that can be used as is,
as well as providing a rich enough base from which the variety of datatypes needed
by schema designers can be <termref def='dt-derived'/>.
</p>
<!--
</div3>
<div3 id='basetype'>
<head>Basetype</head>
-->
<p>
<termdef id='dt-basetype' term='base type'>Every <termref def='dt-derived'/>
datatype is defined in terms of an existing datatype, referred to as
the <term>base type</term>.  <term>base type</term>s may be either
<termref def='dt-primitive'/> or <termref def='dt-derived'/>.</termdef>
</p>
<!--
<p>
<termdef id='dt-subtype' term='subtype'>If type <emph>a</emph> is the
<termref def='dt-basetype'/> of type <emph>b</emph>, then <emph>b</emph>
is said to be a <term>subtype</term> of <emph>a</emph>.
The <termref def='dt-value-space'/> of a <term>subtype</term>
is a <emph>subset</emph> of the <termref def='dt-value-space'/>
of the <termref def='dt-basetype'/>.
</termdef>
</p>
-->
<!--
<p>
In the example above, <dtref ref='date'/>
is a <termref def='dt-subtype'/> of the <termref def='dt-basetype'/>
<dtref ref='recurringInstant'/>.
</p>
-->
<p>
In the example above, <dtref ref='date'/>
is <termref def='dt-derived'/> from the <termref def='dt-basetype'/>
<dtref ref='recurringInstant'/>.
</p>
<note>
<p>
A datatype which is <termref def='dt-primitive'/> in this specification need not
be a "primitive" datatype in any programming language used to implement
this specification.
Likewise, a datatype which is <termref def='dt-derived'/> in this specification
need not be a "derived" datatype in any programming language used to implement
this specification.
</p>
</note>
</div3>
<div3 id='built-in-vs-user-derived'>
<head>Built-in vs. user-derived datatypes</head>
<ulist>
<item>
<p>
<termdef id='dt-built-in' term='built-in'><term>Built-in</term>
datatypes are those which are defined in this specification,
and may be either <termref def='dt-primitive'/> or <termref def='dt-derived'/>;
</termdef>
</p>
</item>
<item>
<p>
<termdef id='dt-user-derived' term='user-derived'><term>User-derived</term>
datatypes are those <termref def='dt-derived'/> datatypes that are defined by
individual schema designers by giving values to
<termref def='dt-constraining-facet'/>s.
</termdef>
</p>
</item>
</ulist>
<p>
Conceptually there is no difference between the <termref def='dt-built-in'/>
<termref def='dt-derived'/>
datatypes included in this specification and the <termref def='dt-user-derived'/>
datatypes which will be created by individual schema designers.
The <termref def='dt-built-in'/> <termref def='dt-derived'/> datatypes are those
which are believed to
be so common that if they were not defined in this specification
many schema designers would end up "reinventing" them.  Furthermore,
including these <termref def='dt-derived'/> datatypes in this specification
serves to demonstrate the mechanics and utility of the datatype
generation facilities of this specification.
</p>
<note>
<p>
A datatype which is <termref def='dt-built-in'/> in this specification need not
be a "built-in" datatype in any programming language used to implement
this specification.
Likewise, a datatype which is <termref def='dt-user-derived'/> in this
specification need not
be a "user-derived" datatype in any programming language used to implement
this specification.
</p>
</note>
</div3>
</div2>
</div1>
<div1 id='built-in-datatypes'>
<head>Built-in datatypes</head>
<div2 id='namespaces'>
<head>Namespace considerations</head>
<p>
The <termref def='dt-built-in'/> datatypes defined by this specification
are designed so that systems other than the XML Schema Definition Language
may use them. To facilitate such usage the <termref def='dt-built-in'/>
datatypes in this specification have the namespace URI:
</p>
<ulist>
<item><p>http://www.w3.org/1999/XMLSchema/datatypes</p></item>
</ulist>
<p>
This applies to both
<termref def='dt-built-in'/> <termref def='dt-primitive'/> and
<termref def='dt-built-in'/> <termref def='dt-derived'/> datatypes.
</p>
<p>
Each <termref def='dt-user-derived'/> datatype is also associated with a
unique namespace.
However, <termref def='dt-user-derived'/> datatypes do not come from the
XML Datatype Language
namespace; rather, they come from the namespace of the schema in which they
are defined (see <xspecref href='&xsdl;#declare-schema'>XML
Representation of Schemas</xspecref> in <bibref ref='structural-schemas'/>).
</p>
<p>
As described in more detail in <specref ref='datatype-definitions'/>,
each <termref def='dt-user-derived'/> datatype must be defined in terms
of another datatype in one of two ways: 1) by assigning
<termref def='dt-constraining-facet'/>s which serve
to restrict the <termref def='dt-value-space'/> of the
<termref def='dt-user-derived'/> datatype to a subset of the
<termref def='dt-basetype'/>; 2) by creating a <termref def='dt-list'/>
datatype whose <termref def='dt-value-space'/> consists of finite-length
sequences of values of the <termref def='dt-basetype'/>.
</p>
</div2>
<div2 id='built-in-primitive-datatypes'>
<head>Primitive datatypes</head>
<p>
The <termref def='dt-primitive'/> datatypes defined by this specification
are described below.  For each datatype, the <termref def='dt-value-space'/>
and <termref def='dt-lexical-space'/> are specified, all
<termref def='dt-constraining-facet'/>s which apply to the datatype are
and any datatypes <termref def='dt-derived'/> from this the datatype are listed.
</p>
<p>
<termref def='dt-primitive'/> datatypes can only be added by revisions to this
specification.
</p>
<div3 id='string'>
<head>string</head>
<p>
<termdef id='dt-string' term='string'>The <term>string</term>
datatype represents character strings in XML.  The <termref def='dt-value-space'/>
of <term>string</term> is the set of finite sequences of UCS characters
(<bibref ref='ISO10646'/> and <bibref ref='Unicode'/>).  A UCS
character (or just character, for short) is an atomic unit of communication;
it is not further specified except to note that every UCS character
has a corresponding UCS code point, which is an integer.
The <termref def='dt-ordered'/> property of <term>string</term> is
the <bibref ref='Unicode'/> character number sequence.
</termdef>
</p>
<ednote>
<edtext>
We need to harmonize this definition with the I18N character model.
</edtext>
</ednote>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
<div4>
<head>Derived datatypes</head>
<subtypes/>
<!--
<subtype name='string'/>
<p>
<term>string</term> has the following <termref def='dt-derived'/> datatypes:
</p>
<ulist>
<item><p><specref ref='language'/></p></item>
<item><p><specref ref='NMTOKEN'/></p></item>
<item><p><specref ref='Name'/></p></item>
</ulist>
-->
</div4>
<!--
<simpleType name='string'>
	<subtype>NMTOKEN</subtype>
	<subtype>language</subtype>
	<facet>length</facet>
	<facet>minlength</facet>
	<facet>maxlength</facet>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='boolean'>
<head>boolean</head>
<p>
<termdef id='dt-boolean' term='boolean'><term>boolean</term>
has the <termref def='dt-value-space'/> required to support
the mathematical concept of binary-valued
logic: {true, false}.</termdef>
</p>
<div4 id='boolean-lexical-representation'>
<head>Lexical Representation</head>
<p>
An instance of a datatype that is defined as <termref def='dt-boolean'/>
can have the following legal lexical values {true, 1, false, 0}, with '1' being
the same as 'true' and '0' being the same as 'false'.
</p>
</div4>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
<!--
<simpleType name='boolean'>
	<facet>pattern</facet>
</simpleType>
-->
</div3>
<div3 id="float">
<head>float</head>
<p>
<termdef id='dt-float' term='float'><term>float</term> corresponds
to the IEEE single-precision 32-bit floating point type <bibref ref="ieee754"/>.
The basic <termref def='dt-value-space'/> of <term>float</term> consists of
the values <emph>m &times; 2^e</emph>, where <emph>m</emph> is an <dtref ref='integer'/>
whose absolute value is less than <emph>2^24</emph>, and <emph>e</emph> is an
<dtref ref='integer'/> between -149 and 104, inclusive.  In addition to
the basic <termref def='dt-value-space'/> described above, the
<termref def='dt-value-space'/> of <term>float</term> also
contains the following <emph>special values</emph>: positive and negative zero,
positive negative infinity and not-a-number.
</termdef>
</p>
<p>
The mapping from a literal in the <termref def='dt-lexical-space'/> to a value
in the <termref def='dt-value-space'/> of
<term>float</term> follows IEEE <emph>round to nearest</emph> behavior
<bibref ref="ieee754"/>.  For further information on mapping literals to values in
the <termref def='dt-value-space'/>, see <bibref ref='clinger1990'/>.
</p>
<div4 id="float-lexical-representation">
<head>Lexical representation</head>
<p>
<term>float</term> values have a single standard lexical representation consisting of
a mantissa followed, optionally, by the character "E" or "e", followed by an
exponent.  The exponent must be an integer.  The
mantissa must be a decimal number. The
representations for exponent and mantissa must follow the
lexical rules for <dtref ref='integer'/> and <dtref ref='decimal'/>.
If the "E" or "e" and the following exponent are omitted, an exponent
value of 0 is assumed.
</p>
<p>
The <emph>special values</emph> positive and negative zero, positive
and negative infinity and not-a-number have <code>0</code>, <code>-0</code>,
<code>INF</code>, <code>-INF</code> and <code>NaN</code>, respectively.
</p>
<p>
For example, <code>-1E4, 1267.43233E12, 12.78e-2, 12 and INF</code> are all legal
literals for <term>float</term>.
</p>
</div4>
<div4>
<head>Constraining facets</head>
<facets/>
<!--
<simpleType name='float'>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div4>
</div3>
<div3 id="double">
<head>double</head>
<p>
<termdef id='dt-double' term='double'>The <term>double</term> datatype corresponds
to IEEE double-precision 64-bit floating point type <bibref ref="ieee754"/>.
The basic <termref def='dt-value-space'/> of <term>double</term> consists of the values 
<emph>m &times; 2^e</emph>, where <emph>m</emph> is an <dtref ref='integer'/>
whose absolute value is less than <emph>2^53</emph>, and <emph>e</emph> is an
<dtref ref='integer'/> between -1075 and 970, inclusive.  In addition to the
basic <termref def='dt-value-space'/> described above,
the <termref def='dt-value-space'/> of <term>double</term> also contains the following
<emph>special values</emph>: positive and negative zero, positive
negative infinity and not-a-number.
</termdef>
</p>
<p>
The mapping from a literal in the <termref def='dt-lexical-space'/> to a value in
the <termref def='dt-value-space'/> of <term>double</term> follows IEEE <emph>round
to nearest</emph> behavior <bibref ref="ieee754"/>.  For further information on
mapping literals to values in the <termref def='dt-value-space'/>, see
<bibref ref='clinger1990'/>.
</p>
<div4 id="double-lexical-representation">
<head>Lexical representation</head>
<p>
<term>double</term> values have a single standard lexical representation consisting of
a mantissa followed, optionally, by the character "E" or "e", followed by an
exponent.  The exponent must be an integer.  The
mantissa must be a decimal number. The
representations for exponent and mantissa must follow the
lexical rules for <dtref ref='integer'/> and <dtref ref='decimal'/>.
If the "E" or "e" and the following exponent are omitted, an exponent
value of 0 is assumed.
</p>
<p>
The <emph>special values</emph> positive and negative zero, positive
and negative infinity and not-a-number have <code>0</code>, <code>-0</code>,
<code>INF</code>, <code>-INF</code> and <code>NaN</code>, respectively.
</p>
<p>
For example, <code>-1E4, 1267.43233E12, 12.78e-2, 12 and INF</code> are all legal
literals for <term>double</term>.
</p>
</div4>
<div4><head>Constraining facets</head>
<facets/>
<!--
<simpleType name='double'>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div4>
</div3>
<div3 id='decimal'>
<head>decimal</head>
<p>
<termdef id='dt-decimal' term='decimal'><term>decimal</term>
represents arbitrary precision decimal numbers.
The <termref def='dt-value-space'/> of <term>decimal</term>
consists of the values <emph role='equation'>i &times; 10^n</emph>,
where <emph role='equation'>i</emph> and <emph role='equation'>n</emph>
are integers, with <emph role='equation'>n</emph> being known
as the <termref def='dt-scale'/> of the <termref def='dt-value-space'/>.
</termdef>
</p>
<note>
<p>
The use of arbitrary precision decimal numbers (including all
datatypes derived from decimal [e.g., <dtref ref='integer'/>]) in this
design impacts the implementation of schema processors in
a number of places: checking <termref def='dt-maxlength'/> constraints on
<dtref ref='string'/>s, for example. It may impact interchange between
XML schemas and programming languages, databases, etc.
</p>
<p>
Our design discussions did not reveal convincing evidence
of undue burden because of arbitrary precision decimal
numbers in this design, but we welcome further input
from implementors.
</p>
</note>
<div4 id='decimal-lexical-representation'>
<head>Lexical representation</head>
<p>
<term>decimal</term> has a single standard lexical representation.
This consists of a finite sequence of decimal digits separated by a period
as a decimal indicator, in accordance with the scale and precision facets,
 with an optional leading sign. If the sign is
omitted, "+" is assumed.  Leading and trailing zeroes are optional.
 For example: -1.23,
12678967.543233, +100000.00.
</p>
</div4>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
<div4>
<head>Derived datatypes</head>
<subtypes/>
<!--
<p>
<term>decimal</term> has the following <termref def='dt-derived'/> datatypes:
</p>
<ulist>
<item><p><specref ref='integer'/></p></item>
</ulist>
-->
<!--
<simpleType name='decimal'>
	<subtype>integer</subtype>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
	<facet>precision</facet>
	<facet>scale</facet>
</simpleType>
-->
</div4>
</div3>
<div3 id="timeInstant">
<head>timeInstant</head>
<p>
<termdef id="dt-timeInstant" term="timeInstant"><term>timeInstant</term>
represents a combination of date and time values representing a single
instant in time.
The <termref def='dt-value-space'/> of <term>timeInstant</term> is the space of Gregorian dates
and legal time values as defined in &sect; 5.4 of <bibref ref="ISO8601"/>.</termdef>
</p>
<div4 id="timeInstant-lexical-repr">
<head>Lexical Representation</head>
<p>
A single lexical representation, which is a subset of the lexical
representations allowed by <bibref ref="ISO8601"/>, is allowed for <term>timeInstant</term>.
This lexical representation is the <bibref ref="ISO8601"/>
extended format CCYY-MM-DDThh:mm:ss.sss where "CC" represents the century, "YY"
the year, "MM" the month and "DD" the day, preceded by an optional
leading sign to indicate a negative number. If the sign is
omitted, "+" is assumed. 
The letter "T" is the
date/time separator and "hh", "mm", "ss.sss" represent hour, minute
and second respectively.  Additional digits can be used to increase
the precision of fractional seconds if desired.
To accommodate year values greater than 9999 additional digits can be added
to the left of this representation.
</p>
<p>
This representation can be immediately followed by a "Z" to indicate
Coordinated Universal Time.  To indicate the time zone, i.e. the difference
between the local time and Coordinated Universal Time, the difference
immediately follows the time and consists of a sign, + or -, followed
by hh:mm.  See also <specref ref="isoformats"/>.</p>
<p>
For example, to indicate 1:20 pm on May the 31st, 1999 for Eastern Standard Time
which is 5 hours behind Coordinated Universal Time, one
would write: 1999-05-31T13:20:00-05:00.
</p>
</div4>
<!--
<div4 id="timeInstant-truncated-repr">
<head>Truncated Representations</head>
<p>Left truncated forms of the above representation are used as the lexical
representation for the <dtref ref="recurringInstant"/> datatype and
its subtype <dtref ref="time"/>.
Right truncated forms of this representation are used as the lexical
representation for the datatype <dtref ref="date"/>.</p>
</div4>
  -->
<div4>
<head>Constraining facets</head>
<facets/>
<!--
<simpleType name='timeInstant'>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div4>
</div3>
<div3 id="timeDuration">
<head>timeDuration</head>
<p>
<termdef id="dt-timeDuration" term="timeDuration"><term>timeDuration</term>
represents a duration of time.
The <termref def='dt-value-space'/> of <term>timeDuration</term> is the
space of time durations as defined in &sect; 5.5.3.2 of
<bibref ref="ISO8601"/>.
</termdef>
</p>
<div4 id="timeDuration-lexical-repr">
<head>Lexical Representation</head>
<p>
A single lexical representation, conforming to a subset of the 
representations allowed by <bibref ref="ISO8601"/>, is allowed for <term>timeDuration</term>.
This lexical representation is the <bibref ref="ISO8601"/>
extended format P<emph>n</emph>Y<emph>n</emph>M<emph>n</emph>DT<emph>n</emph>H
<emph>n</emph>M<emph>n</emph>S, where <emph>n</emph>Y represents the number
of years, <emph>n</emph>M the number of months, <emph>n</emph>D the number of
days, 'T' is the date/time separator, <emph>n</emph>H the number of hours,
<emph>n</emph>M the number of minutes and <emph>n</emph>S the number of seconds.
The number of seconds can include decimal digits to arbitrary precision.
An optional preceding minus sign ('-') is allowed, to indicate a negative duration.
If the sign is omitted a positive duration is
indicated. See also <specref ref="isoformats"/>.
</p>
<p>
For example, to indicate a duration of 1 year, 2 months, 3 days, 10
hours, and 30 minutes, one would write: P1Y2M3DT10H30M.
</p>
<p>Right truncated forms of the above representation are allowed. For example,
P1347Y and P1347M are both allowed; P0Y1347M is also allowed. 
P0Y1347M0D is not allowed and P-1347M is not allowed although -P1347M is
allowed.</p>
<p>
Time periods, i.e. specific durations of time, can be represented by supplying
two items of information: a start instant and a duration or a start instant and
an end instant or an end instant and a duration.
</p>
</div4>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
</div3>
<div3 id="recurringInstant">
<head>recurringInstant</head>
<p>
<termdef id="dt-recurringInstant" term="recurringInstant"><term>recurringInstant</term>
represents an instant of time that recurs with a specific
<dtref ref="timeInstant"/>.
</termdef>
</p>
<p>
Note that we do not attempt to support
general recurring instants of time, just those that needed to support
<dtref ref="date"/> and <dtref ref="time"/> and those
that arise from truncated and reduced lexical representations of
<dtref ref="timeInstant"/>. See also <specref ref="isoformats"/>.
</p>
<div4 id="recurringInstant-lexical-repr">
<head>Lexical Representation</head>
<p>
The lexical representation for <term>recurringInstant</term> is the left truncated
<bibref ref="ISO8601"/> representation for <dtref ref="timeInstant"/>.
For example, if the century "CC" is omitted from the timeInstant
representation it means a timeInstant that recurs every hundred years.
Similarly, if "CCYY" is omitted it designates a time instant that recurs
every year.
</p>
<p>
Every two character "unit" of the representation that is omitted is indicated by
a single hyphen "-".  For example, to indicate 1:20 pm on May the 31st
every year, one would write write: --05-31T13:20:00-05:00.
</p>
</div4>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
<div4>
<head>Derived datatypes</head>
<subtypes/>
<!--
<p>
<term>recurringInstant</term> has the following <termref def='dt-derived'/> datatypes:
</p>
<ulist>
<item><p><specref ref="date"/></p></item>
<item><p><specref ref="time"/></p></item>
</ulist>
-->
<!--
<simpleType name='recurringInstant'>
	<subtype>date</subtype>
	<subtype>time</subtype>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
	<facet>period</facet>
</simpleType>
-->
</div4>
</div3>
<!--
<div3 id="recurringDuration">
<head>recurringDuration</head>
<p>
<termdef id="dt-recurringDuration" term="recurringDuration"> The
<term>recurringDuration</term> datatype represents an duration of time
that recurs with at a specific <dtref ref="timeInstant"/>.  Note that we
do not attempt to support general recurring durations of time, just those
that we need to support the <dtref ref="date"/> and <dtref ref="time"/>
datatypes and those that arise from truncated lexical representations of
<dtref ref="timeInstant"/>.
</p>
<div4 id="recurringDuration-lexical-repr">
<head>Lexical Representation</head>
<p>
The lexical representation for recurringDuration is the left truncated <bibref ref="ISO8601"/>
representation for <dtref ref="timeInstant"/>.
For example, if the century "CC" is omitted from the timeInstant
representation it means a timeInstant that recurs every hundred years.
Another way of interpreting such a representation is to assume it refers
to a single duration in the current century.  Similarly, if "CCYY" is omitted it designates a
time duration that recurs every year.  Alternatively, it designates
a time instant for the current year.
</p>
</div4>
</div3>
  -->
<div3 id='binary'>
<head>binary</head>
<p>
<termdef id='dt-term' term='binary'><term>binary</term>
represents arbitrary binary data.  The <termref def='dt-value-space'/> of <term>binary</term>
is the set of finite sequences of binary octets.
</termdef>
</p>
<constraintnote type='svc' id='encoding-required'>
<head>encoding required for binary</head>
<p>
It is an <termref def='dt-error'/> for <term>binary</term> to be used directly in
a schema.  Only datatypes that are <termref def='dt-derived'/> from
<term>binary</term> by specify a value for <termref def='dt-encoding'/>
can be used in a schema.
</p>
</constraintnote>
<div4>
<head>Constraining facets</head>
<facets/>
<ednote>
<edtext>
What does the pattern facet on binary really mean?  Since pattern operates on the
lexical space, one would have to give a regex for the base64 or hex that would
result for a specifc binary sequence that one wanted to constrain...this is not
too far fetched for hex, but almost impossible for base64, isn't it?
</edtext>
</ednote>
</div4>
<!--
<simpleType name='binary'>
	<facet>length</facet>
	<facet>minlength</facet>
	<facet>maxlength</facet>
	<facet>encoding</facet>
	<facet>pattern</facet>
</simpleType>
-->
</div3>
<div3 id='uri-reference'>
<head>uri-reference</head>
<p>
<termdef id='dt-uri-reference' term='uri-reference'><term>uri-reference</term>
represents a Uniform Resource Identifier (URI) Reference as defined in Section 4
of <bibref ref='RFC2396'/>.
A <term>uri-reference</term> may be absolute or relative, and may have
an optional fragment identifier.
</termdef>
</p>
<p>
<termdef id='dt-absolute-uri-reference' term='absolute uri-reference'>
An <term>absolute uri-reference</term> refers to a resource
in a manner which is independent of the context in which the
<termref def='dt-uri-reference'/> occurs.
</termdef>
</p>
<p>
<termdef id='dt-relative-uri-reference' term='relative uri-reference'>
A <term>relative uri-reference</term> refers to a resource
by describing the difference within a hierarchy of resources between the
context in which the <term>relative uri-reference</term> occurs and 
the <termref def='dt-absolute-uri-reference'/> of the resource.
</termdef>
</p>
<!-- <issue id='uri-reference-scheme-facet'>
<p>
should we have a facet to allow a limitation to a specific scheme?  It
might be useful to able to say that something was not only a URI, but that
it was a "mailto" and not a "http://...".
</p>
</issue> -->
<div4 id='uri-reference-lexical-representation'>
<head>Lexical representation</head>
<p>
to be filled in a future point release
</p>
</div4>
<div4>
<head>Constraining facets</head>
<facets/>
<!--
<simpleType name='uri-reference'>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div4>
</div3>
<!--
     remove uuid datatype for now...
	 we might reintroduce it later if we get EVERYTHING else done and
	 there is still time

<div3 id="uuid">
<head>uuid</head>
<p>
<termdef id="dt-uuid" term="uuid">The <term>uuid</term> datatype
represents Universally Unique IDentifiers as defined in <bibref ref="uuids"/>.
The <termref def='dt-value-space'/> of the uuid datatype is the set of 128-bit sequences, groupped
into 16 octects, where some bits of octet 8 (called the variant field)
determine finer structure (see <bibref ref="uuids"/> for a complete description).
The lexical space of the uuid datatype is the set of all 36 character
strings where the 9th, 14th, 19th and 24th characters are "-" and all other
characters are hexidecimal digits.</termdef>
</p>
<p>
The <term>uuid</term> datatype has no fundamental or constraining facets.
</p>
</div3>
  -->
<div3 id='ID'>
<head>ID</head>
<p>
<termdef id='dt-ID' term='ID'><term>ID</term> represents the
<xnt href='&xmlspec;#NT-TokenizedType'>ID attribute type</xnt> from
<bibref ref='XML'/>.
The <termref def='dt-value-space'/> of <term>ID</term> is the set of
all strings that match the
<xnt href='&xmlnsspec;#NT-NCName'>NCName</xnt> production in <bibref ref='XMLNS'/>
and have been used in an XML document.  The <termref def='dt-lexical-space'/>
of <term>ID</term>
is the set of all strings that match the <xnt href='&xmlnsspec;#NT-NCName'>
NCName</xnt> production in <bibref ref='XMLNS'/>.
</termdef>
</p>
<note>
<p>
The <termref def='dt-value-space'/> of <term>ID</term> is scoped to a specifc
instance document.
</p>
</note>
<p>
For compatibility (see <specref ref='terminology'/>)
<term>ID</term> should be used only on attributes.
</p>
<constraintnote type='svc' id='id'>
<head>ID Unique</head>
<p>
An <term>ID</term> must not appear
more than once in an XML document as a value of this type; i.e.,
<term>ID</term> values must uniquely identify the elements which bear them.
</p>
</constraintnote>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
<!--
<simpleType name='ID'>
	<facet>length</facet>
	<facet>minlength</facet>
	<facet>maxlength</facet>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='IDREF'>
<head>IDREF</head>
<p>
<termdef id='dt-IDREF' term='IDREF'><term>IDREF</term> represents the
<xnt href='&xmlspec;#NT-TokenizedType'>IDREF attribute type</xnt> from
<bibref ref='XML'/>.
The <termref def='dt-value-space'/> of <term>IDREF</term> is the set of all
strings that match the
<xnt href='&xmlnsspec;#NT-NCName'>NCName</xnt> production in <bibref ref='XMLNS'/>
and have been used in an XML document as the value of an element or attribute
of type <dtref ref='ID'/>.  The <termref def='dt-lexical-space'/>
of <term>IDREF</term>
is the set of all strings that match the <xnt href='&xmlnsspec;#NT-NCName'>
NCName</xnt> production in <bibref ref='XMLNS'/>.
<!--
The
<termref def='dt-basetype'/> of <term>IDREF</term> is <dtref ref='ID'/>.
-->
</termdef>
</p>
<issue id='idref-subtype-of-id'>
<p>
Can IDREF be defined as a subtype of ID?  Since every IDREF must also be an
ID I think we're
OK...we get around the problem of validation requirements not being supported
by our general facet mechanism because of this.  However, the only way to do
that today would be as follows: &lt;simpleType name='IDREF' basetype='ID'/>,
that is, by not giving any facets and, in effect, saying that the value spaces
are <term>identical</term>; but, isn't the "real" value
space of IDREF a restriction (i.e., a proper subset) of the value space of ID?
</p>
</issue>
<note>
<p>
The <termref def='dt-value-space'/> of <term>IDREF</term> is scoped to a specifc
instance document.
<!--
and is a restriction of the instance document scoped
<termref def='dt-value-space'/> of <dtref ref='ID'/>.
-->
</p>
</note>
<p>
For compatibility (see <specref ref='terminology'/>) this datatype should be
used only on attributes.
</p>
<constraintnote type='svc' id='idref'>
<head>IDREF</head>
<p>
An <term>IDREF</term> must match the value of an <dtref ref='ID'/> in the XML
document in which it occurs.
<!--
; i.e. <term>IDREF</term> values must match the value of some
<dtref ref='ID'/>.
-->
</p>
</constraintnote>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
<div4>
<head>Derived datatypes</head>
<subtypes/>
<!--
<p>
<term>IDREF</term> has the following <termref def='dt-derived'/> datatypes:
</p>
<ulist>
<item><p><specref ref="IDREFS"/></p></item>
</ulist>
-->
</div4>
<!--
<simpleType name='IDREF'>
	<subtype>IDREFS</subtype>
	<facet>length</facet>
	<facet>minlength</facet>
	<facet>maxlength</facet>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='ENTITY'>
<head>ENTITY</head>
<p>
<termdef id='dt-ENTITY' term='ENTITY'><term>ENTITY</term> represents the
<xnt href='&xmlspec;#NT-TokenizedType'>ENTITY attribute type</xnt> from
<bibref ref='XML'/>.
The <termref def='dt-value-space'/> of <term>ENTITY</term> is the set of all
strings that match the
<xnt href='&xmlnsspec;#NT-NCName'>NCName</xnt> production in <bibref ref='XMLNS'/>
and have been declared as an unparsed
entity in a DTD.  The <termref def='dt-lexical-space'/>
of <term>ENTITY</term>
is the set of all strings that match the <xnt href='&xmlnsspec;#NT-NCName'>
NCName</xnt> production in <bibref ref='XMLNS'/>.
</termdef>
</p>
<ednote><edtext>Need a reference to unparsed entity in XML 1.0</edtext></ednote>
<note>
<p>
The <termref def='dt-value-space'/> of <term>ENTITY</term> is scoped to a specifc
instance document.
</p>
</note>
<constraintnote type='svc' id='entity'>
<head>ENTITY declared</head>
<p>
<term>ENTITY</term> values must match an unparsed entity name
that is declared in the schema.
</p>
</constraintnote>
<p>
For compatibility (see <specref ref='terminology'/>) <term>ENTITY</term>
should be used only on attributes.
</p>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
<div4>
<head>Derived datatypes</head>
<subtypes/>
<!--
<p>
<term>ENTITY</term> has the following <termref def='dt-derived'/> datatypes:
</p>
<ulist>
<item><p><specref ref='ENTITIES'/></p></item>
</ulist>
-->
</div4>
<!--
<simpleType name='ENTITY'>
	<subtype>ENTITIES</subtype>
	<facet>length</facet>
	<facet>minlength</facet>
	<facet>maxlength</facet>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='NOTATION'>
<head>NOTATION</head>
<p>
<termdef id='dt-NOTATION' term='NOTATION'><term>NOTATION</term> represents the
<xnt href='&xmlspec;#NT-NotationType'>NOTATION attribute type</xnt> from
<bibref ref='XML'/>.
The <termref def='dt-value-space'/> of <term>NOTATION</term> is the set of all
<xspecref href='&xsdl;#declare-notation'>notations declared</xspecref> in
a schema.
The <termref def='dt-lexical-space'/> of <term>NOTATION</term>
is the set of all strings that match the <xnt href='&xmlnsspec;#NT-NCName'>
NCName</xnt> production in <bibref ref='XMLNS'/>.
<!--
The <termref def='dt-basetype'/>
of <term>NOTATION</term> is <dtref ref='NCName'/>.
-->
</termdef>
</p>
<note>
<p>
The <termref def='dt-value-space'/> of <term>NOTATION</term> is scoped to a specifc
instance document.
</p>
</note>
<constraintnote type='svc' id='notation'>
<head>NOTATION declared</head>
<p>
<term>NOTATION</term> values must match a notation name
that is declared in the schema.
</p>
</constraintnote>
<p>
For compatibility (see <specref ref='terminology'/>) <term>NOTATION</term>
should be used only on attributes.
</p>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
<!--
<simpleType name='NOTATION'>
	<facet>length</facet>
	<facet>minlength</facet>
	<facet>maxlength</facet>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
</div2>
<div2 id='built-in-derived'>
<head>Derived datatypes</head>
<p>
This section gives conceptual definitions for all
<termref def='dt-built-in'/> <termref def='dt-derived'/>
datatypes defined by this specification.
The XML Representation
used to define <termref def='dt-derived'/> datatypes (whether
<termref def='dt-built-in'/> or <termref def='dt-user-derived'/>) is
given in section <specref ref='datatype-definitions'/>
and the complete definitions of the <termref def='dt-built-in'/>
<termref def='dt-derived'/> datatypes are provided in Appendix
<specref ref='schema'/>.
</p>
<div3 id='language'>
<head>language</head>
<p>
<termdef id='dt-language' term='language'><term>language</term>
represents natural language identifiers as defined by <bibref ref='RFC1766'/>.
The <termref def='dt-value-space'/> of <term>language</term> is the set of all
strings that match the <xnt href='&xmlspec;#NT-LanguageID'>LanguageID</xnt>
production in <bibref ref='XML'/>.
The <termref def='dt-lexical-space'/> of <term>language</term> is the set
of all strings that match the <xnt href='&xmlspec;#NT-LanguageID'>LanguageID</xnt>
production in <bibref ref='XML'/>.  The <termref def='dt-basetype'/> of
<term>language</term> is <dtref ref='string'/>.
</termdef>
</p>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
<!--
<simpleType name='language' base='string'>
	<facet>length</facet>
	<facet>minlength</facet>
	<facet>maxlength</facet>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='IDREFS'>
<head>IDREFS</head>
<p>
<termdef id='dt-IDREFS' term='IDREFS'><term>IDREFS</term> represents the
<xnt href='&xmlspec;#NT-TokenizedType'>IDREFS attribute type</xnt> from
<bibref ref='XML'/>.
The <termref def='dt-value-space'/> of <term>IDREFS</term> is the set of
finite-length sequences of <termref def='dt-IDREF'/>s
that have been used in an XML document. The <termref def='dt-lexical-space'/>
of <term>IDREFS</term> is the set of whitespace separated tokens, each
of which is in the <termref def='dt-lexical-space'/>
of <dtref ref='IDREF'/>.
The <termref def='dt-basetype'/> of <term>IDREFS</term> is <dtref ref='IDREF'/>.
</termdef>
</p>
<note>
<p>
The <termref def='dt-value-space'/> of <term>IDREFS</term> is scoped to a specifc
instance document.
</p>
</note>
<p>
For compatibility (see <specref ref='terminology'/>) <term>IDREFS</term>
should be used only on attributes.
</p>
<ednote>
<edtext>
Should we include the type definitions for all built-in-derived types inline,
such as the following:
</edtext>
</ednote>
<note role='example'>
<eg><![CDATA[<simpleType name="IDREFS" base="IDREF" derivedBy="list"/>]]></eg>
</note>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
<!--
<div4>
<head>Derived datatypes</head>
<subtypes/>
<p>
<term>IDREFS</term> has the following <termref def='dt-derived'/> datatypes:
</p>
<ulist>
<item><p><specref ref='IDREF'/></p></item>
</ulist>
</div4>
-->
<!--
<constraintnote type='svc' id='idref'>
<head>IDREF</head>
<p>
each Name must match the value of an <dtref ref='ID'/> in the XML
document; i.e. <term>IDREF</term> values must match the value of some
<dtref ref='ID'/>.
</p>
</constraintnote>
-->
<!--
<simpleType name='IDREFS' base='IDREF'>
	<facet>length</facet>
	<facet>minlength</facet>
	<facet>maxlength</facet>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='ENTITIES'>
<head>ENTITIES</head>
<p>
<termdef id='dt-ENTITIES' term='ENTITIES'><term>ENTITIES</term>
represents the <xnt href='&xmlspec;#NT-TokenizedType'>
ENTITIES attribute type</xnt> from
<bibref ref='XML'/>.
The <termref def='dt-value-space'/> of <term>ENTITIES</term> is the set of
finite-length sequences of <termref def='dt-ENTITY'/>s that have been declared as
unparsed entities in a DTD.
The <termref def='dt-lexical-space'/> of <term>ENTITIES</term> is the set of
whitespace separated tokens, each of which is in the <termref def='dt-lexical-space'/>
of <dtref ref='NMTOKEN'/>.
The <termref def='dt-basetype'/> of <term>ENTITIES</term> is <dtref ref='ENTITY'/>.
</termdef>
</p>
<note>
<p>
The <termref def='dt-value-space'/> of <term>ENTITIES</term> is scoped to a specifc
instance document.
</p>
</note>
<p>
For compatibility (see <specref ref='terminology'/>) <term>ENTITIES</term>
should be used only on attributes.
</p>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
<!--
<simpleType name='ENTITIES'>
	<facet>length</facet>
	<facet>minlength</facet>
	<facet>maxlength</facet>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='NMTOKEN'>
<head>NMTOKEN</head>
<p>
<termdef id='dt-NMTOKEN' term='NMTOKEN'><term>NMTOKEN</term> represents the
<xnt href='&xmlspec;#NT-TokenizedType'>NMTOKEN attribute type</xnt> from
<bibref ref='XML'/>.
The <termref def='dt-value-space'/> of <term>NMTOKEN</term> is the set
of tokens that <termref def='dt-match'/> the
<xnt href='&xmlspec;#NT-Nmtoken'>Nmtoken</xnt> production in <bibref ref='XML'/>.
The <termref def='dt-lexical-space'/> of <term>NMTOKEN</term> is the set of
strings that <termref def='dt-match'/> the
<xnt href='&xmlspec;#NT-Nmtoken'>Nmtoken</xnt> production in <bibref ref='XML'/>.
The <termref def='dt-basetype'/> of <term>NMTOKEN</term> is <dtref ref='string'/>.
</termdef>
</p>
<p>
For compatibility (see <specref ref='terminology'/>) <term>NMTOKEN</term> should
be used only on attributes.
</p>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
<div4>
<head>Derived datatypes</head>
<subtypes/>
<!--
<p>
<term>NMTOKEN</term> has the following <termref def='dt-derived'/> datatypes:
</p>
<ulist>
<item><p><specref ref='NMTOKENS'/></p></item>
<item><p><specref ref='Name'/></p></item>
</ulist>
-->
</div4>
<!--
<simpleType name='NMTOKEN' base='string'>
	<subtype>NMTOKENS</subtype>
	<subtype>Name</subtype>
	<facet>length</facet>
	<facet>minlength</facet>
	<facet>maxlength</facet>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='NMTOKENS'>
<head>NMTOKENS</head>
<p>
<termdef id='dt-NMTOKENS' term='NMTOKENS'><term>NMTOKENS</term> represents the
<xnt href='&xmlspec;#NT-TokenizedType'>NMTOKENS attribute type</xnt> from
<bibref ref='XML'/>.
The <termref def='dt-value-space'/> of <term>NMTOKENS</term> is the
set of fininte-length sequences of <termref def='dt-NMTOKEN'/>s.
The <termref def='dt-lexical-space'/> of <term>NMTOKENS</term> is the set of 
whitespace separated tokens, each of which is in the <termref def='dt-lexical-space'/>
of <dtref ref='NMTOKEN'/>.
The <termref def='dt-basetype'/> of <term>NMTOKENS</term> is
<dtref ref='NMTOKEN'/>.
</termdef>
</p>
<p>
For compatibility (see <specref ref='terminology'/>) <term>NMTOKENS</term> should
be used only on attributes.
</p>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
<!--
<simpleType name='NMTOKENS' base='NMTOKEN'>
	<facet>length</facet>
	<facet>minlength</facet>
	<facet>maxlength</facet>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='Name'>
<head>Name</head>
<p>
<termdef id='dt-Name' term='Name'><term>Name</term>
represents <xspecref href='&xmlspec;#dt-name'>XML Names</xspecref>.
The <termref def='dt-value-space'/> of <term>Name</term>
the set of all strings which match the <xspecref href='&xmlspec;#NT-Name'>
Name</xspecref> production of <bibref ref='XML'/>.  The
<termref def='dt-lexical-space'/> of <term>Name</term> is the set of all
strings which match the
<xnt href='&xmlspec;#NT-Name'>Name</xnt> production of
<bibref ref='XML'/>. The <termref def='dt-basetype'/> of <term>Name</term>
is <dtref ref='string'/>.</termdef>
</p>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
<div4>
<head>Derived datatypes</head>
<subtypes/>
<!--
<p>
<term>Name</term> has the following <termref def='dt-derived'/> datatypes:
</p>
<ulist>
<item><p><specref ref='QName'/></p></item>
<item><p><specref ref='NCName'/></p></item>
</ulist>
-->
</div4>
<!--
<simpleType name='Name' base='NMTOKEN'>
	<subtype>ID</subtype>
	<subtype>NCName</subtype>
	<subtype>QName</subtype>
	<subtype>NOTATION</subtype>
	<facet>length</facet>
	<facet>minlength</facet>
	<facet>maxlength</facet>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='QName'>
<head>QName</head>
<p>
<termdef id='dt-QName' term='QName'><term>QName</term>
represents <xspecref href='&xmlnsspec;#dt-qname'>XML qualified names</xspecref>.
The <termref def='dt-value-space'/> of <term>QName</term>
is the set of all strings which match the <xspecref href='&xmlnsspec;#NT-QName'>
QName</xspecref> production of <bibref ref='XMLNS'/>.  The
<termref def='dt-lexical-space'/> of
<term>QName</term> is the set of all strings which match the
<xnt href='&xmlnsspec;#NT-QName'>QName</xnt> production of
<bibref ref='XMLNS'/>.  The <termref def='dt-basetype'/> of <term>QName</term>
is <dtref ref='Name'/>. </termdef>
</p>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
<!--
<simpleType name='QName' base='Name'>
	<facet>length</facet>
	<facet>minlength</facet>
	<facet>maxlength</facet>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='NCName'>
<head>NCName</head>
<p>
<termdef id='dt-NCName' term='NCName'><term>NCName</term>
represents XML "non-colonized" Names.  The <termref def='dt-value-space'/>
of <term>NCName</term> is
the set of all strings which match the <xspecref href='&xmlnsspec;#NT-NCName'>
NCName</xspecref> production of <bibref ref='XMLNS'/>.  The
<termref def='dt-lexical-space'/> of
<term>NCName</term> is the set of all strings which match the
<xnt href='&xmlnsspec;#NT-NCName'>NCName</xnt> production of
<bibref ref='XMLNS'/>.  The <termref def='dt-basetype'/> of <term>NCName</term>
is <dtref ref='Name'/>. </termdef>
</p>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
<!--
<div4>
<head>Derived datatypes</head>
<subtypes/>
<p>
<term>NCName</term> has the following <termref def='dt-derived'/> datatypes:
</p>
<ulist>
<item><p><specref ref='ID'/></p></item>
<item><p><specref ref='NOTATION'/></p></item>
</ulist>
</div4>
-->
<!--
<simpleType name='NCName' base='Name'>
	<subtype>ID</subtype>
	<subtype>NOTATION</subtype>
	<facet>length</facet>
	<facet>minlength</facet>
	<facet>maxlength</facet>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='integer'>
<head>integer</head>
<p>
<termdef id='dt-integer' term='integer'><term>integer</term>
is <termref def='dt-derived'/> from <dtref ref='decimal'/>
by fixing the value of <termref def='dt-scale'/> to be 0.
This results in the standard mathematical concept of the integer numbers.
The <termref def='dt-value-space'/> of <term>integer</term> is the infinite set
{...,-2,-1,0,1,2,...}
The <termref def='dt-basetype'/> of <term>integer</term> is <dtref ref='decimal'/>.
</termdef>
</p>
<div4 id='integer-lexical-representation'>
<head>Lexical representation</head>
<p>
<term>integer</term> values have a single, standard lexical representation.
This consists of a string of digits with an optional leading sign.
If the sign is omitted, "+" is assumed.  For example: -1, 0,
12678967543233, +100000.
</p>
</div4>
<div4><head>Constraining facets</head>
<facets/>
</div4>
<div4>
<head>Derived datatypes</head>
<subtypes/>
<!--
<p>
<term>integer</term> has the following <termref def='dt-derived'/> datatypes:
</p>
<ulist>
<item><p><specref ref='non-positive-integer'/></p></item>
<item><p><specref ref='long'/></p></item>
<item><p><specref ref='non-negative-integer'/></p></item>
</ulist>
-->
</div4>
<!--
<simpleType name='integer' base='decimal'>
	<subtype>non-positive-integer</subtype>
	<subtype>long</subtype>
	<subtype>non-negative-integer</subtype>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='non-positive-integer'>
<head>non-positive-integer</head>
<p>
<termdef id='dt-non-positive-integer' term='non-positive-integer'>
<term>non-positive-integer</term>
is <termref def='dt-derived'/> from <dtref ref='integer'/>
by fixing the value of <termref def='dt-maxInclusive'/> to be 0.
This results in the standard mathematical concept of the non-positive integers.
The <termref def='dt-value-space'/> of <term>non-positive-integer</term>
is the infinite set {...,-2,-1,0}.
The <termref def='dt-basetype'/> of <term>non-positive-integer</term>
is <dtref ref='integer'/>.
</termdef>
</p>
<div4 id='non-positive-integer-lexical-representation'>
<head>Lexical representation</head>
<p>
<term>non-positive-integer</term> values have a single, standard lexical representation.
This consists of a string of digits with a leading "-" sign.
For example: -1, 0, -12678967543233, -100000.
</p>
</div4>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
<div4>
<head>Derived datatypes</head>
<subtypes/>
<!--
<p>
<term>non-positive-integer</term> has the following <termref def='dt-derived'/> datatypes:
</p>
<ulist>
<item><p><specref ref='negative-integer'/></p></item>
</ulist>
-->
</div4>
<!--
<simpleType name='non-positive-integer' base='integer'>
	<subtype>negative-integer</subtype>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='negative-integer'>
<head>negative-integer</head>
<p>
<termdef id='dt-negative-integer' term='negative-integer'>
<term>negative-integer</term>
is <termref def='dt-derived'/> from <dtref ref='non-positive-integer'/>
by fixing the value of <termref def='dt-maxInclusive'/> to be -1.
This results in the standard mathematical concept of the negative integers.
The <termref def='dt-value-space'/> of <term>negative-integer</term>
is the infinite set
{...,-2,-1}.
The <termref def='dt-basetype'/>
of <term>negative-integer</term>
is <dtref ref='non-positive-integer'/>.
</termdef>
</p>
<div4 id='negative-integer-lexical-representation'>
<head>Lexical representation</head>
<p>
<term>negative-integer</term> values have a single, standard lexical representation.
This consists of a string of digits with a leading "-" sign.
For example: -1, -12678967543233, -100000.
</p>
</div4>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
<!--
<simpleType name='negative-integer' base='non-positive-integer'>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='long'>
<head>&long;</head>
<p>
<termdef id='dt-long' term='long'><term>&long;</term>
is <termref def='dt-derived'/> from <dtref ref='integer'/>
by fixing the values of <termref def='dt-maxInclusive'/> to be 9223372036854775807
and <termref def='dt-minInclusive'/> to be -9223372036854775808.
The <termref def='dt-basetype'/> of <term>&long;</term> is <dtref ref='integer'/>.
</termdef>
</p>
<div4 id='long-lexical-representation'>
<head>Lexical representation</head>
<p>
<term>&long;</term> values have a single, standard lexical representation.
This consists of a string of digits with an optional leading sign.
If the sign is omitted, "+" is assumed.  For example: -1, 0,
12678967543233, +100000.
</p>
</div4>
<div4><head>Constraining facets</head>
<facets/>
</div4>
<div4>
<head>Derived datatypes</head>
<subtypes/>
<!--
<p>
<term>&long;</term> has the following <termref def='dt-derived'/> datatypes:
</p>
<ulist>
<item><p><specref ref='int'/></p></item>
</ulist>
-->
</div4>
<!--
<simpleType name='long' base='integer'>
	<subtype>int</subtype>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='int'>
<head>&int;</head>
<p>
<termdef id='dt-int' term='int'><term>&int;</term>
is <termref def='dt-derived'/> from <dtref ref='long'/>
by fixing the values of <termref def='dt-maxInclusive'/> to be 2147483647
and <termref def='dt-minInclusive'/> to be -2147483648.
The <termref def='dt-basetype'/> of <term>&int;</term> is <dtref ref='long'/>.
</termdef>
</p>
<div4 id='int-lexical-representation'>
<head>Lexical representation</head>
<p>
<term>&int;</term> values have a single, standard lexical representation.
This consists of a string of digits with an optional leading sign.
If the sign is omitted, "+" is assumed.  For example: -1, 0,
126789675, +100000.
</p>
</div4>
<div4><head>Constraining facets</head>
<facets/>
</div4>
<div4>
<head>Derived datatypes</head>
<subtypes/>
<!--
<p>
<term>&int;</term> has the following <termref def='dt-derived'/> datatypes:
</p>
<ulist>
<item><p><specref ref='short'/></p></item>
</ulist>
-->
</div4>
<!--
<simpleType name='int' base='long'>
	<subtype>short</subtype>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='short'>
<head>&short;</head>
<p>
<termdef id='dt-short' term='short'><term>&short;</term>
is <termref def='dt-derived'/> from <dtref ref='short'/>
by fixing the values of <termref def='dt-maxInclusive'/> to be 32767
and <termref def='dt-minInclusive'/> to be -32768.
The <termref def='dt-basetype'/> of <term>&short;</term> is <dtref ref='int'/>.
</termdef>
</p>
<div4 id='short-lexical-representation'>
<head>Lexical representation</head>
<p>
<term>&short;</term> values have a single, standard lexical representation.
This consists of a string of digits with an optional leading sign.
If the sign is omitted, "+" is assumed.  For example: -1, 0,
12678, +10000.
</p>
</div4>
<div4><head>Constraining facets</head>
<facets/>
</div4>
<div4>
<head>Derived datatypes</head>
<subtypes/>
<!--
<p>
<term>&short;</term> has the following <termref def='dt-derived'/> datatypes:
</p>
<ulist>
<item><p><specref ref='byte'/></p></item>
</ulist>
-->
</div4>
<!--
<simpleType name='short' base='int'>
	<subtype>byte</subtype>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='byte'>
<head>&byte;</head>
<p>
<termdef id='dt-byte' term='byte'><term>&byte;</term>
is <termref def='dt-derived'/> from <dtref ref='short'/>
by fixing the values of <termref def='dt-maxInclusive'/> to be 127
and <termref def='dt-minInclusive'/> to be -128.
The <termref def='dt-basetype'/> of <term>&byte;</term> is <dtref ref='short'/>.
</termdef>
</p>
<div4 id='byte-lexical-representation'>
<head>Lexical representation</head>
<p>
<term>&byte;</term> values have a single, standard lexical representation.
This consists of a string of digits with an optional leading sign.
If the sign is omitted, "+" is assumed.  For example: -1, 0,
126, +100.
</p>
</div4>
<div4><head>Constraining facets</head>
<facets/>
</div4>
<!--
<simpleType name='byte' base='short'>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='non-negative-integer'>
<head>non-negative-integer</head>
<p>
<termdef id='dt-non-negative-integer' term='non-negative-integer'>
<term>non-negative-integer</term>
is <termref def='dt-derived'/> from <dtref ref='integer'/>
by fixing the value of <termref def='dt-minInclusive'/> to be 0.
This results in is the standard mathematical concept of the non-negative
integers. The <termref def='dt-value-space'/> of <term>non-negative-integer</term>
is the infinite set {0,1,2,...}.
The <termref def='dt-basetype'/> of <term>non-negative-integer</term>
is <dtref ref='integer'/>.
</termdef>
</p>
<div4 id='non-negative-integer-lexical-representation'>
<head>Lexical representation</head>
<p>
<term>non-negative-integer</term> values have a single, standard lexical representation.
This consists of a string of digits with an optional leading "+" sign.
If the sign is omitted, "+" is assumed.  For example: 1, 0,
12678967543233, +100000.
</p>
</div4>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
<div4>
<head>Derived datatypes</head>
<subtypes/>
<!--
<p>
<term>non-negative-integer</term> has the following <termref def='dt-derived'/> datatypes:
</p>
<ulist>
<item><p><specref ref='unsigned-long'/></p></item>
<item><p><specref ref='positive-integer'/></p></item>
</ulist>
-->
</div4>
<!--
<simpleType name='non-negative-integer' base='integer'>
	<subtype>unsigned-long</subtype>
	<subtype>positive-integer</subtype>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='unsigned-long'>
<head>&unsigned-long;</head>
<p>
<termdef id='dt-unsigned-long' term='unsigned-long'><term>&unsigned-long;</term>
is <termref def='dt-derived'/> from <dtref ref='non-negative-integer'/>
by fixing the values of <termref def='dt-maxInclusive'/> to be 18446744073709551615.
The <termref def='dt-basetype'/> of <term>&unsigned-long;</term> is
<dtref ref='non-negative-integer'/>.
</termdef>
</p>
<div4 id='unsigned-long-lexical-representation'>
<head>Lexical representation</head>
<p>
<term>&unsigned-long;</term> values have a single, standard lexical representation.
This consists of a string of digits with an optional leading sign.
If the sign is omitted, "+" is assumed.  For example: 0,
12678967543233, +100000.
</p>
</div4>
<div4><head>Constraining facets</head>
<facets/>
</div4>
<div4>
<head>Derived datatypes</head>
<subtypes/>
<!--
<p>
<term>&unsigned-long;</term> has the following <termref def='dt-derived'/> datatypes:
</p>
<ulist>
<item><p><specref ref='unsigned-int'/></p></item>
</ulist>
-->
</div4>
<!--
<simpleType name='unsigned-long' base='non-negative-integer'>
	<subtype>unsigned-int</subtype>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='unsigned-int'>
<head>&unsigned-int;</head>
<p>
<termdef id='dt-unsigned-int' term='unsigned-int'><term>&unsigned-int;</term>
is <termref def='dt-derived'/> from <dtref ref='unsigned-long'/>
by fixing the values of <termref def='dt-maxInclusive'/> to be 4294967295.
The <termref def='dt-basetype'/> of <term>&unsigned-int;</term> is
<dtref ref='unsigned-long'/>.
</termdef>
</p>
<div4 id='unsigned-int-lexical-representation'>
<head>Lexical representation</head>
<p>
<term>&unsigned-int;</term> values have a single, standard lexical representation.
This consists of a string of digits with an optional leading sign.
If the sign is omitted, "+" is assumed.  For example: 0,
1267896754, +100000.
</p>
</div4>
<div4><head>Constraining facets</head>
<facets/>
</div4>
<div4>
<head>Derived datatypes</head>
<subtypes/>
<!--
<p>
<term>&unsigned-int;</term> has the following <termref def='dt-derived'/> datatypes:
</p>
<ulist>
<item><p><specref ref='unsigned-short'/></p></item>
</ulist>
-->
</div4>
<!--
<simpleType name='unsigned-int' base='unsigned-long'>
	<subtype>unsigned-short</subtype>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='unsigned-short'>
<head>&unsigned-short;</head>
<p>
<termdef id='dt-unsigned-short' term='unsigned-short'><term>&unsigned-short;</term>
is <termref def='dt-derived'/> from <dtref ref='unsigned-int'/>
by fixing the value <termref def='dt-maxInclusive'/> to be 65535.
The <termref def='dt-basetype'/> of <term>&unsigned-short;</term> is
<dtref ref='unsigned-int'/>.
</termdef>
</p>
<div4 id='unsigned-short-lexical-representation'>
<head>Lexical representation</head>
<p>
<term>&unsigned-short;</term> values have a single, standard lexical representation.
This consists of a string of digits with an optional leading sign.
If the sign is omitted, "+" is assumed.  For example: 0,
12678, +10000.
</p>
</div4>
<div4><head>Constraining facets</head>
<facets/>
</div4>
<div4>
<head>Derived datatypes</head>
<subtypes/>
<!--
<p>
<term>&unsigned-short;</term> has the following <termref def='dt-derived'/> datatypes:
</p>
<ulist>
<item><p><specref ref='unsigned-byte'/></p></item>
</ulist>
-->
</div4>
<!--
<simpleType name='unsigned-short' base='unsigned-int'>
	<subtypes>unsigned-byte</subtypes>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='unsigned-byte'>
<head>&unsigned-byte;</head>
<p>
<termdef id='dt-unsigned-byte' term='unsigned-byte'><term>&unsigned-byte;</term>
is <termref def='dt-derived'/> from <dtref ref='unsigned-short'/>
by fixing the value <termref def='dt-maxInclusive'/> to be 255.
The <termref def='dt-basetype'/> of <term>&unsigned-byte;</term> is
<dtref ref='unsigned-short'/>.
</termdef>
</p>
<div4 id='unsigned-byte-lexical-representation'>
<head>Lexical representation</head>
<p>
<term>&unsigned-byte;</term> values have a single, standard lexical representation.
This consists of a string of digits with an optional leading sign.
If the sign is omitted, "+" is assumed.  For example: 0,
126, +100.
</p>
</div4>
<div4><head>Constraining facets</head>
<facets/>
</div4>
<!--
<simpleType name='unsigned-byte' base='unsigned-short'>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id='positive-integer'>
<head>positive-integer</head>
<p>
<termdef id='dt-positive-integer' term='positive-integer'>
<term>positive-integer</term>
is <termref def='dt-derived'/> from <dtref ref='non-negative-integer'/>
by fixing the value of <termref def='dt-minInclusive'/> to be 1.
This results in the standard mathematical concept of the positive integer numbers.
is the standard mathematical concept of the positive integers.
The <termref def='dt-value-space'/> of <term>positive-integer</term>
is the infinite set {1,2,...}.
The <termref def='dt-basetype'/> of <term>positive-integer</term>
is <dtref ref='non-negative-integer'/>.
</termdef>
</p>
<div4 id='positive-integer-lexical-representation'>
<head>Lexical representation</head>
<p>
<term>positive-integer</term> values have a single, standard lexical representation.
This consists of a string of digits with an optional leading "+" sign.
For example: 1, 12678967543233, +100000.
</p>
</div4>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
<!--
<simpleType name='positive-integer' base='non-negative-integer'>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id="date">
<head>date</head>
<p>
<termdef id="dt-date" term="date"><term>date</term>
represents a <dtref ref="timeInstant"/> that starts at midnight
of a specified day and lasts for 24 hours.
The <termref def='dt-value-space'/> of <term>date</term> is the set of
Gregorian calendar dates as defined in &sect; 5.2.1 of <bibref ref="ISO8601"/>.
The <termref def='dt-basetype'/> of <term>date</term> is
<dtref ref="recurringInstant"/>.
<!--
<term>date</term> is generated from
<dtref ref="recurringInstant"/> by setting the value of the
<term>period</term> facet equal to 24 hours.
  -->
</termdef>
</p>
<div4 id="date-lexical-repr">
<head>Lexical Representation</head>
<p>
The lexical representation for <term>date</term> is the reduced (right truncated)
lexical representation for <dtref ref="recurringInstant"/>: CCYY-MM-DD.
To accommodate year values greater than 9999 additional digits can be added
to the left of this representation.
For example, to indicate May the 31st, 1999, one would write: 1999-05-31.
See also <specref ref="isoformats"/>.
</p>
<p>
Left truncated
representations can be used to represent recurring dates.  If the CC is
omitted it signifies a date that occurs every century.  If the YY is also
omitted it signifies a date every year and so on. Every two character "unit" of
the representation that is omitted is indicated by a single hyphen "-".
For example, ---05 signifies the fifth day of every month.
</p>
<p>
Right truncated, or reduced precision, date representations can be used to
represent a specific month (CCYY-MM), a specific year (CCYY), or a specific
century (CC).
</p>  
</div4>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
<!--
<simpleType name='date' base='recurringInstant'>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
<div3 id="time">
<head>time</head>
<p>
<termdef id="dt-time" term="time"><term>time</term>
represents a recurring instant of time that recurs every day.
The <termref def='dt-value-space'/> of <term>time</term> is the space
of <emph>time of day</emph> values as defined in &sect; 5.3 of
<bibref ref='ISO8601'/>.
The <termref def='dt-basetype'/> of <term>time</term> is
<dtref ref="recurringInstant"/>.
</termdef>
</p>
<p>
<term>time</term> can be considered to be a shorthand to designate a
specific truncated representation for <dtref ref="recurringInstant"/>.
<!--
<term>time</term> is generated from <dtref ref="recurringInstant"/> by
setting the value of the <emph>period</emph> facet equal to 24 hours.
  -->
</p>
<div4 id="time-lexical-repr">
<head>Lexical Representation</head>
<p>
The lexical representation for <term>time</term> is the left truncated lexical
representation for <dtref ref="timeInstant"/>: hh:mm:ss.sss.
For example, to indicate 1:20 pm for Eastern Standard Time
which is 5 hours behind Coordinated Universal Time, one
would write: 13:20:00-05:00. See also <specref ref="isoformats"/>.
</p>
</div4>
<div4>
<head>Constraining facets</head>
<facets/>
</div4>
<!--
<simpleType name='time' base='recurringInstant'>
	<facet>minExclusive</facet>
	<facet>maxExclusive</facet>
	<facet>minInclusive</facet>
	<facet>maxInclusive</facet>
	<facet>pattern</facet>
	<facet>enumeration</facet>
</simpleType>
-->
</div3>
</div2>
</div1>
<div1 id='datatype-components'>
<head>Datatype components</head>
<p>
The following sections provide full details on the properties
and significance of each kind of schema component involved in
datatype definitions.
</p>
<ednote>
<edtext>
this section needs some more explanatory material
</edtext>
</ednote>
<div2 id='dc-defn'>
<head>Datatype definition</head>
<compdef name="Datatype Definition" ref="datatype">
<proplist>
<propdef id="defn-name" name="name">
Optional.  An NCName as defined by <bibref ref="XMLNS"/>.
</propdef>
<propdef id="defn-basetype" name="base type definition">
A datatype definition.
</propdef>
<propdef id="defn-facets" name="facets">
A possibly empty set of <specref ref='dc-facets'/>.
</propdef>
<!--
<propdef id="st-final" name="final">
One of {<pt>list</pt>, <pt>restriction</pt>}.
</propdef>
<propdef id="st-abstract" name="abstract">
A boolean
</propdef>
-->
<propdef id="defn-variety" name="variety">
One of {<pt>atomic</pt>, <pt>list</pt>}.
</propdef>
<propdef id="defn-target-namespace" name="target namespace">
Either <xspecref href="&xsdl;#key-null">null</xspecref> or a
namespace URI, as defined in <bibref ref="XMLNS"/>.
</propdef>
<propdef id="defn-annotation" name="annotation">
Optional.  An <xspecref href='&xsdl;#Annotation'>annotation</xspecref>.
</propdef>
</proplist>
</compdef>
<constraintnote id='uniquename' type='cos'>
<head>Unique datatype definitions</head>
<p>
The <propref ref='defn-name'/> of the datatype being defined must
be unique among the datatypes defined in the containing schema.
</p>
</constraintnote>
<constraintnote type="cvc" id="cvc-datatype-valid">
<head>Datatype Valid</head>
<p>
A sequence of character information items is schema-valid with
respect to a datatype definition if:
</p>
<olist>
<item>
<p>
It is a member of the <termref def='dt-lexical-space'/> of
the <propref ref='defn-basetype'/>.
</p>
</item>
<item>
<p>
The member of the <termref def='dt-value-space'/> of the
<propref ref='defn-basetype'/> denoted by
the string is
schema-valid
with respect to the conditions expressed by all
<propref ref="defn-facets"/> as per <specref ref='cvc-facet-valid'/>.
</p>
</item>
</olist>
</constraintnote>
<p>
Datatypes are identified by their <propref ref="defn-name"/>
and <propref ref="defn-target-namespace"/>.  Except
for anonymous datatypes (those with no <propref ref="defn-name"/>),
datatype definitions must be uniquely identified within an
schema.
</p>
</div2>
<div2 id='dc-facets'>
<head>Constraining facets</head>
<p>
This section provides the details of each
<termref def='dt-constraining-facet'/> component.
</p>
<constraintnote type="cvc" id="cvc-facet-valid">
<head>Facet valid</head>
<p>
A member of a <termref def='dt-value-space'/> is
schema-valid with
respect to a <termref def='dt-constraining-facet'/> component if:
</p>
<olist>
<item><p>to be specified in detail in the next draft</p></item>
<item><p>including mention of a validation constraint for each
individual facet below</p></item>
</olist>
</constraintnote>
<div3 id='dc-length'>
<head>length</head>
<compdef name="length" ref="dt-length">
<proplist>
<propdef id="length-value" name="value">
A <specref ref='non-negative-integer'/>.
</propdef>
<propdef id="length-annotation" name="annotation">
Optional.  An <xspecref href='&xsdl;#Annotation'>annotation</xspecref>.
</propdef>
</proplist>
</compdef>
<p>
For datatypes <termref def='dt-derived'/> from <dtref ref='string'/>,
<propref ref='length-value'/> is in characters.
For datatypes <termref def='dt-derived'/> from <dtref ref='binary'/>,
<propref ref='length-value'/> is in bits.
For datatypes <termref def='dt-derived'/> by <termref def='dt-list'/>,
<propref ref='length-value'/> is in list items.
</p>
</div3>

<div3 id='dc-minlength'>
<head>minlength</head>
<compdef name="minlength" ref="dt-minlength">
<proplist>
<propdef id="minlength-value" name="value">
A <specref ref='non-negative-integer'/>.
</propdef>
<propdef id="minlength-annotation" name="annotation">
Optional.  An <xspecref href='&xsdl;#Annotation'>annotation</xspecref>.
</propdef>
</proplist>
</compdef>
<p>
For datatypes <termref def='dt-derived'/> from <dtref ref='string'/>,
<propref ref='length-value'/> is in characters.
For datatypes <termref def='dt-derived'/> from <dtref ref='binary'/>,
<propref ref='length-value'/> is in bits.
For datatypes <termref def='dt-derived'/> by <termref def='dt-list'/>,
<propref ref='length-value'/> is in list items.
</p>
</div3>

<div3 id='dc-maxlength'>
<head>maxlength</head>
<compdef name="maxlength" ref="dt-maxlength">
<proplist>
<propdef id="maxlength-value" name="value">
A <specref ref='non-negative-integer'/>.
</propdef>
<propdef id="maxlength-annotation" name="annotation">
Optional.  An <xspecref href='&xsdl;#Annotation'>annotation</xspecref>.
</propdef>
</proplist>
</compdef>
<p>
For datatypes <termref def='dt-derived'/> from <dtref ref='string'/>,
<propref ref='length-value'/> is in characters.
For datatypes <termref def='dt-derived'/> from <dtref ref='binary'/>,
<propref ref='length-value'/> is in bits.
For datatypes <termref def='dt-derived'/> by <termref def='dt-list'/>,
<propref ref='length-value'/> is in list items.
</p>
</div3>

<div3 id='dc-pattern'>
<head>pattern</head>
<compdef name="pattern" ref="dt-pattern">
<proplist>
<propdef id="pattern-value" name="value">
A <termref def='dt-regex'/>.
</propdef>
<propdef id="pattern-annotation" name="annotation">
Optional.  An <xspecref href='&xsdl;#Annotation'>annotation</xspecref>.
</propdef>
</proplist>
</compdef>
</div3>

<div3 id='dc-enumeration'>
<head>enumeration</head>
<compdef name="enumeration" ref="dt-enumeration">
<proplist>
<propdef id="enumeration-value" name="value">
A value from the <termref def='dt-value-space'/> of the
<propref ref='defn-basetype'/>.
</propdef>
<propdef id="enumeration-annotation" name="annotation">
Optional.  An <xspecref href='&xsdl;#Annotation'>annotation</xspecref>.
</propdef>
</proplist>
</compdef>
</div3>

<div3 id='dc-maxInclusive'>
<head>maxInclusive</head>
<compdef name="maxInclusive" ref="dt-maxInclusive">
<proplist>
<propdef id="maxInclusive-value" name="value">
A value from the <termref def='dt-value-space'/> of the
<propref ref='defn-basetype'/>.
</propdef>
<propdef id="maxInclusive-annotation" name="annotation">
Optional.  An <xspecref href='&xsdl;#Annotation'>annotation</xspecref>.
</propdef>
</proplist>
</compdef>
</div3>

<div3 id='dc-maxExclusive'>
<head>maxExclusive</head>
<compdef name="maxExclusive" ref="dt-maxExclusive">
<proplist>
<propdef id="maxExclusive-value" name="value">
A value from the <termref def='dt-value-space'/> of the
<propref ref='defn-basetype'/>.
</propdef>
<propdef id="maxExclusive-annotation" name="annotation">
Optional.  An <xspecref href='&xsdl;#Annotation'>annotation</xspecref>.
</propdef>
</proplist>
</compdef>
</div3>

<div3 id='dc-minExclusive'>
<head>minExclusive</head>
<compdef name="minExclusive" ref="dt-minExclusive">
<proplist>
<propdef id="minExclusive-value" name="value">
A value from the <termref def='dt-value-space'/> of the
<propref ref='defn-basetype'/>.
</propdef>
<propdef id="minExclusive-annotation" name="annotation">
Optional.  An <xspecref href='&xsdl;#Annotation'>annotation</xspecref>.
</propdef>
</proplist>
</compdef>
</div3>

<div3 id='dc-minInclusive'>
<head>minInclusive</head>
<compdef name="minInclusive" ref="dt-minInclusive">
<proplist>
<propdef id="minInclusive-value" name="value">
A value from the <termref def='dt-value-space'/> of the
<propref ref='defn-basetype'/>.
</propdef>
<propdef id="minInclusive-annotation" name="annotation">
Optional.  An <xspecref href='&xsdl;#Annotation'>annotation</xspecref>.
</propdef>
</proplist>
</compdef>
</div3>

<div3 id='dc-precision'>
<head>precision</head>
<compdef name="precision" ref="dt-precision">
<proplist>
<propdef id="precision-value" name="value">
A <dtref ref='positive-integer'/>.
</propdef>
<propdef id="precision-annotation" name="annotation">
Optional.  An <xspecref href='&xsdl;#Annotation'>annotation</xspecref>.
</propdef>
</proplist>
</compdef>
</div3>

<div3 id='dc-scale'>
<head>scale</head>
<compdef name="scale" ref="dt-scale">
<proplist>
<propdef id="scale-value" name="value">
A <dtref ref='non-negative-integer'/>.
</propdef>
<propdef id="scale-annotation" name="annotation">
Optional.  An <xspecref href='&xsdl;#Annotation'>annotation</xspecref>.
</propdef>
</proplist>
</compdef>
</div3>

<div3 id='dc-encoding'>
<head>encoding</head>
<compdef name="encoding" ref="dt-encoding">
<proplist>
<propdef id="encoding-value" name="value">
One of {<pt>hex</pt>, <pt>base64</pt>}.
</propdef>
<propdef id="encoding-annotation" name="annotation">
Optional.  An <xspecref href='&xsdl;#Annotation'>annotation</xspecref>.
</propdef>
</proplist>
</compdef>
</div3>

<div3 id='dc-period'>
<head>period</head>
<compdef name="period" ref="dt-period">
<proplist>
<propdef id="period-value" name="value">
A <dtref ref='timeInstant'/>.
</propdef>
<propdef id="period-annotation" name="annotation">
Optional.  An <xspecref href='&xsdl;#Annotation'>annotation</xspecref>.
</propdef>
</proplist>
</compdef>
</div3>
</div2>
</div1>

<div1 id='xr-datatype-definitions'>
<head>XML representation of datatype definitions</head>
<ednote>
<edtext>
this section needs some more explanatory material
</edtext>
</ednote>
<div2 id='datatype-definitions'>
<head>Datatype Definitions</head>
<reprdef eltname="simpleType">
<reprcomp abstract="Datatype Definition"
	ref="dc-defn">
<propmap name="defn-name">
The value of the <code>name</code> &i-attribute;
</propmap>
<propmap name="defn-basetype">
The value of the <code>base</code> &i-attribute;
</propmap>
<propmap name="defn-variety">
<pt>list</pt> ff the value of the <code>derivedBy</code> &i-attribute;
(or the <code>derivedBy</code> &i-attribute; of any ancestor) is
<pt>list</pt>; otherwise <pt>atomic</pt>.
</propmap>
<propmap name="defn-target-namespace">
The value of the <code>targetNamespace</code> &i-attribute;
of the parent <code>schema</code> element information item.
</propmap>
</reprcomp>
</reprdef>
<p>
A <termref def='dt-derived'/> datatype can be <termref def='dt-derived'/>
from a <termref def='dt-primitive'/> datatype or another
<termref def='dt-derived'/> datatype by one of two means:
by <emph>restriction</emph> or by <emph>list</emph>.
</p>
<div3 id='derivation-by-restriction'>
<head>Derivation by restriction</head>
<p>
<note role='example'>
<p>
An electronic commerce schema might define a datatype called
<emph>Sku</emph> (the barcode number that appears on products) from the
<termref def='dt-built-in'/> datatype <dtref ref='string'/> by
supplying a value for the <termref def='dt-pattern'/> facet.
</p>
<eg><![CDATA[<simpleType name="Sku" base="string">
    <pattern value="\d{3}-[A-Z]{2}"/>
</simpleType>]]></eg>
<p>
In this case, <emph>Sku</emph> is the name of the new
<termref def='dt-user-derived'/> datatype, <dtref ref='string'/> is
its <termref def='dt-basetype'/> and <termref def='dt-pattern'/>
is the facet.
</p>
</note>
</p>
</div3>
<div3 id='derivation-by-list'>
<head>Derivation by list</head>
<note role='example'>
<p>
blah, blah, blah
</p>
<eg><![CDATA[<simpleType name="listOfFloat" base="float" derivedBy='list'/>]]></eg>
<p>
In this case, <emph>listOfFloat</emph> is the name of the new
<termref def='dt-user-derived'/> datatype, <dtref ref='float'/> is its
<termref def='dt-basetype'/> and <termref def='dt-list'/> is the
derivation method.
</p>
</note>
<p>
As mentioned in <specref ref='list-datatypes'/>,
when a datatype is <termref def='dt-derived'/> from a
<termref def='dt-list'/> datatype, the following
<termref def='dt-constraining-facet'/>s may be used:
</p>
<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>
</ulist>
<p>
For each of the above <termref def='dt-facet'/>s, the
<emph>unit of length</emph> is measured in list items.
</p>
</div3>
<!--
<p>
The following is the definition for a possible <termref def='dt-built-in'/>
<termref def='dt-derived'/> datatype "currency".  This datatype definition
would appear in the schema which defines datatypes for XML Schemas
and shows that a <termref def='dt-derived'/> datatype can have the same
<termref def='dt-value-space'/> as its <termref def='dt-basetype'/>,
which might mean that
it is just an "alias" or "renaming" of <termref def='dt-basetype'/>.  In this case,
the specification would probably also define some
"semantics" for currency which went beyond those of decimal.
</p>
<note role='example'>
<eg><![CDATA[<simpleType name="currency" base="decimal"/>]]></eg>
</note>
-->
<!--
<constraintnote id='c-basetype' type='cos'>
<head>Appropriate facets</head>
<p>
If the <termref def='dt-value-space'/> of the <termref def='dt-basetype'/>
is not <termref def='dt-ordered'/>, then it is an
<termref def='dt-error'/> for <termref def='dt-ordered'/>
facets to appear in a datatype definition.
</p>
</constraintnote>
-->
</div2>
<div2 id='xr-facets'>
<head>Constraining facets</head>
<p>
This section details the XML Representation for specificing
<termref def='dt-constraining-facet'/>s in
a datatype definition.
</p>

<div3 id='xr-length'>
<head>length</head>
<reprdef eltname="length">
<reprcomp abstract="length" ref="dc-scale">
<propmap name="length-value">
The value of the <code>value</code> &i-attribute;
</propmap>
</reprcomp>
</reprdef>
<note role='example'>
<p>
The following is the definition of a <termref def='dt-user-derived'/>
datatype to represent one form of postal codes in the United States,
by limiting strings to be exactly 5 characters in length.
</p>
<eg><![CDATA[<simpleType name="us-zipcode" base="string">
    <length value='5'/>
</simpleType>]]></eg>
</note>
<ednote>
<edtext>
this is a bad example, but its the only one I could think of at the time.
</edtext>
</ednote>
</div3>

<div3 id='xr-minlength'>
<head>minlength</head>
<reprdef eltname="minlength">
<reprcomp abstract="minlength" ref="dc-scale">
<propmap name="minlength-value">
The value of the <code>value</code> &i-attribute;
</propmap>
</reprcomp>
</reprdef>
<note role='example'>
<p>
The following is the definition of a <termref def='dt-user-derived'/>
datatype which requires strings to have at least one character (i.e.,
the empty string is not in the <termref def='dt-value-space'/>
of this datatype).
</p>
<eg><![CDATA[<simpleType name="non-empty-string" base="string">
    <minlength value='1'/>
</simpleType>]]></eg>
</note>
</div3>

<div3 id='xr-maxlength'>
<head>maxlength</head>
<reprdef eltname="maxlength">
<reprcomp abstract="maxlength"
	ref="dc-scale">
<propmap name="maxlength-value">
The value of the <code>value</code> &i-attribute;
</propmap>
</reprcomp>
</reprdef>
<note role='example'>
<p>
The following is the definition of a <termref def='dt-user-derived'/>
datatype which might be used to accept form input with an upper limit
to the number of characters that are acceptable.
</p>
<eg><![CDATA[<simpleType name="form-input" base="string">
    <maxlength value='50'/>
</simpleType>]]></eg>
</note>
</div3>

<div3 id='xr-pattern'>
<head>pattern</head>
<reprdef eltname="pattern">
<reprcomp abstract="pattern" ref="dc-scale">
<reprdep>
<propref ref='pattern-value'/> must be a valid <termref def='dt-regex'/>.
</reprdep>
<propmap name="pattern-value">
The value of the <code>value</code> &i-attribute;
</propmap>
</reprcomp>
</reprdef>
<note role='example'>
<p>
The following is the definition of a <termref def='dt-user-derived'/>
datatype which is a better representation of postal codes in the
United States, by limiting strings to those which are matched by
a specific <termref def='dt-regex'/>.
</p>
<eg><![CDATA[<simpleType name="better-us-zipcode" base="string">
    <pattern value='[0-9]{5}(-[0-9]{4})?'/>
</simpleType>]]></eg>
</note>
</div3>

<div3 id='xr-enumeration'>
<head>enumeration</head>
<reprdef eltname="enumeration">
<reprcomp abstract="enumeration" ref="dc-scale">
<reprdep>
<propref ref='enumeration-value'/> must be a valid
value of the <propref ref='defn-basetype'/>.
</reprdep>
<propmap name="enumeration-value">
The value of the <code>value</code> &i-attribute;
</propmap>
</reprcomp>
</reprdef>
<note role='example'>
<p>
The following example is a datatype definition for a
<termref def='dt-user-derived'/>
datatype which limits the values of dates to the three
US holidays enumerated. This datatype definition would appear in a schema
authored by an "end-user" and shows how to define a datatype by enumerating
the values in its <termref def='dt-value-space'/>.  The enumerated values must be
type-valid literals for the <termref def='dt-basetype'/>.
</p>
<eg><![CDATA[<simpleType name="holidays" base="date">
    <annotation>
        <documentation>some US holidays</documentation>
    </annotation>
    <enumeration value='--01-01'>
        <annotation>
            <documentation>New Year's day</documentation>
        </annotation>
    </enumeration>
    <enumeration value='--07-04'/>
        <annotation>
            <documentation>4th of July</documentation>
        </annotation>
    </enumeration>
    <enumeration value='--12-25'/>
        <annotation>
            <documentation>Christmas</documentation>
        </annotation>
    </enumeration>
</simpleType>]]></eg>
</note>
</div3>

<!--
<p>
The following <termref def='dt-constraining'/> <termref def='dt-facet'/>s
apply only to datatypes whose <termref def='dt-value-space'/>s have
the <termref def='dt-ordered'/> property.
</p>
-->
<div3 id='xr-maxInclusive'>
<head>maxInclusive</head>
<reprdef eltname="maxInclusive">
<reprcomp abstract="maxInclusive" ref="dt-maxInclusive">
<reprdep>
<propref ref='enumeration-value'/> must be a valid
value of the <propref ref='defn-basetype'/>.
</reprdep>
<propmap name="maxInclusive-value">
The value of the <code>value</code> &i-attribute;
</propmap>
</reprcomp>
</reprdef>
<note>
<p>
The following is the definition of a <termref def='dt-user-derived'/>
datatype which limits values to integers less than or equal to
100, using <termref def='dt-maxInclusive'/>.
</p>
<eg><![CDATA[<simpleType name="one-hundred-or-less" base="integer">
    <maxInclusive value='100'/>
</simpleType>]]></eg>
</note>
</div3>

<div3 id='xr-maxExclusive'>
<head>maxExclusive</head>
<reprdef eltname="maxExclusive">
<reprcomp abstract="maxExclusive" ref="dt-maxExclusive">
<reprdep>
<propref ref='enumeration-value'/> must be a valid
value of the <propref ref='defn-basetype'/>.
</reprdep>
<propmap name="maxExclusive-value">
The value of the <code>value</code> &i-attribute;
</propmap>
</reprcomp>
</reprdef>
<note>
<p>
The following is the definition of a <termref def='dt-user-derived'/>
datatype which limits values to integers less than or equal to
100, using <termref def='dt-maxExclusive'/>.
</p>
<eg><![CDATA[<simpleType name="less-than-one-hundred-and-one" base="integer">
    <maxExclusive value='101'/>
</simpleType>]]></eg>
<p>
Note that the
<termref def='dt-value-space'/> of this datatype is identical to
the previous one (named 'one-hundred-or-less').
</p>
</note>
</div3>

<div3 id='xr-minInclusive'>
<head>minInclusive</head>
<reprdef eltname="minInclusive">
<reprcomp abstract="minInclusive" ref="dt-minInclusive">
<reprdep>
<propref ref='enumeration-value'/> must be a valid
value of the <propref ref='defn-basetype'/>.
</reprdep>
<propmap name="minInclusive-value">
The value of the <code>value</code> &i-attribute;
</propmap>
</reprcomp>
</reprdef>
<note>
<p>
The following is the definition of a <termref def='dt-user-derived'/>
datatype which limits values to integers greater than or equal to
100, using <termref def='dt-minInclusive'/>.
</p>
<eg><![CDATA[<simpleType name="one-hundred-or-more" base="integer">
    <minInclusive value='100'/>
</simpleType>]]></eg>
</note>
</div3>

<div3 id='xr-minExclusive'>
<head>minExclusive</head>
<reprdef eltname="minExclusive">
<reprcomp abstract="minExclusive" ref="dt-minExclusive">
<reprdep>
<propref ref='enumeration-value'/> must be a valid
value of the <propref ref='defn-basetype'/>.
</reprdep>
<propmap name="minExclusive-value">
The value of the <code>value</code> &i-attribute;
</propmap>
</reprcomp>
</reprdef>
<note>
<p>
The following is the definition of a <termref def='dt-user-derived'/>
datatype which limits values to integers greater than or equal to
100, using <termref def='dt-minExclusive'/>.
</p>
<eg><![CDATA[<simpleType name="more-than-ninety-nine" base="integer">
    <minExclusive value='99'/>
</simpleType>]]></eg>
<p>
Note that the
<termref def='dt-value-space'/> of this datatype is identical to
the previous one (named 'one-hundred-or-more').
</p>
</note>
</div3>

<!--
<p>
The following <termref def='dt-constraining'/> <termref def='dt-facet'/>s
apply only to datatypes whose <termref def='dt-value-space'/>s have
the <termref def='dt-numeric'/>
property.
</p>
-->

<div3 id='xr-precision'>
<head>precision</head>
<reprdef eltname="precision">
<reprcomp abstract="precision" ref="dc-precision">
<propmap name="precision-value">
The value of the <code>value</code> &i-attribute;
</propmap>
</reprcomp>
</reprdef>
<note>
<p>
The following is the definition of a <termref def='dt-user-derived'/>
datatype which limits values to integers greater than or equal to
100, using <termref def='dt-minExclusive'/>.
</p>
<eg><![CDATA[<simpleType name="less-than-one-hundred" base="decimal">
    <minExclusive value='99'/>
</simpleType>]]></eg>
</note>
</div3>

<div3 id='xr-scale'>
<head>scale</head>
<reprdef eltname="scale">
<reprcomp abstract="scale" ref="dc-scale">
<propmap name="scale-value">
The value of the <code>value</code> &i-attribute;
</propmap>
</reprcomp>
</reprdef>
<note role='example'>
<p>
The following is the definition of a <termref def='dt-user-derived'/> datatype
which could be used to represent monetary amounts, such as in a financial
management application which does not have figures above $1M
and only allow whole cents. This definition would appear in a schema
authored by an "end-user" and shows how to define a datatype by specifying
facet values which constrain the range of the <termref def='dt-basetype'/> in a manner
specific to the <termref def='dt-basetype'/>
(different than specifying max/min values as before)
</p>
<eg><![CDATA[<simpleType name="amount" base="decimal">
    <precision value='8'/>
    <scale value='2'/>
</simpleType>]]></eg>
</note>
</div3>

<div3 id='xr-encoding'>
<head>encoding</head>
<reprdef eltname="encoding">
<reprcomp abstract="encoding" ref="dt-maxExclusive">
<propmap name="encoding-value">
The value of the <code>value</code> &i-attribute;
</propmap>
</reprcomp>
</reprdef>
<note role='example'>
<p>
The following example is a datatype definition for a
<termref def='dt-user-derived'/> datatype whose
<termref def='dt-value-space'/> is the set of binary streams of
length 4 octets (32 bits) and whose <termref def='dt-lexical-space'/>
is the set of base64 encodings of such binary streams.
This datatype definition would appear in a schema
authored by an "end-user" and shows how to define a datatype by
specifying multiple <termref def='dt-constraining-facet'/>s.
</p>
<eg><![CDATA[<simpleType name='myBinary' base='binary'>
    <length value='4'/>
    <encoding value='base64'/>
</simpleType>]]></eg>
</note>
</div3>

<!--
<p>
The following <termref def='dt-constraining'/> <termref def='dt-facet'/>s
apply only to datatypes whose <termref def='dt-value-space'/>s have
the <termref def='dt-dateTime'/> property.
</p>
-->

<div3 id='xr-period'>
<head>period</head>
<reprdef eltname="period">
<reprcomp abstract="period" ref="dc-scale">
<propmap name="period-value">
The value of the <code>value</code> &i-attribute;
</propmap>
</reprcomp>
</reprdef>
</div3>



</div2>
</div1>
<div1 id='conformance'>
<head>Conformance</head>
<ednote>
<edtext>
This section (both its abstract content and its concrete wording)
has not yet garnered consensus among WG members.
</edtext>
</ednote>
<p>
The XML specification <bibref ref='XML'/> defines two levels of conformance.
Well-formed documents conform to valid XML syntax but may or may not obey
the constraints defined by a DTD. Valid  XML documents conform to the structure
laid down in a DTD.  Thus, if a DTD defines an attribute as an <dtref ref='ID'/>,
instances
of XML documents conforming to the DTD can only be valid if the values of
such attributes are valid XML names and are unique in the document. By
introducing
additional datatypes to XML, this specification extends the notion of validity
in the sense that values defined to have a certain datatype in the schema
must conform to the lexical representations allowed for that datatype.
Values that do not conform to the datatype defined for them in the schema
raise a conformance error.  As, for example, the appearance of a
letter in a value defined as <dtref ref='integer'/>.  Similarly, for a
datatype <termref def='dt-derived'/> from <dtref ref='string'/>
with <termref def='dt-length'/> equal to 5, a value of "ABC" would
raise an error -- length too short -- as would a value of "abcdefgh" -- length
too long.
</p>
<p>
For conformance it is not enough that the representation conform to a legal
literal in the <termref def='dt-lexical-space'/> of the datatype;
it must also represent a legal value in the 
<termref def='dt-value-space'/>. For example, the
<dtref ref="timeInstant"/>, <dtref ref="timeInstant"/>,
<dtref ref="recurringInstant"/>,
<dtref ref="date"/> and <dtref ref="time"/> values
must conform to legal Gregorian
dates and legal time values as specified in the descriptions of these datatypes.  
</p>
<!--
<p>
<termref def='dt-user-derived'/> datatypes are defined by giving values to
certain <termref def='dt-constraining'/> facets.  For example,
a datatype could be <termref def='dt-derived'/> from
<dtref ref='integer'/> within a certain range could be defined by
giving values to <termref def='dt-maxInclusive'/> and <termref def='dt-minInclusive'/>
facets.  A switch on the
datatypes processor could be used to turn validation off for these facets.
This could be used by a processor that used the datatypes processor to eliminate
validation of <termref def='dt-user-derived'/> datatypes.
</p>
-->
<p>
It also needs to be said that there are no expressions on
datatypes; neither are there operations on datatypes.
</p>
<p>
If we decide to allow datatype specification or specialization in instance
documents (see issue "definition-overriding" above) then
validating XML processors should be able to validate the format
of values in XML documents in these cases as well by using the
datatypes processor.
</p>
</div1>

</body>
<back>
<div1 id='schema'>
<head>Schema for Datatype Definitions (normative)</head>
<eg xml:space="preserve" text="datatypes.xsd,txt"/>
<eg xml:space="preserve" text="builtins.xsd,txt"/>
</div1>
<div1 id='dtd-for-datatypeDefs'>
<head>DTD for Datatype Definitions (normative)</head>
<eg xml:space="preserve" text="datatypes.dtd,txt"/>
</div1>
<div1>
<head>Datatypes and Facets</head>
<div2 id='app-fundamental-facets'>
<head>Fundamental Facets</head>
<p>
The following table shows the values of the fundamental facets
for each <termref def='dt-built-in'/> datatype.
</p>
<table border='1' bgcolor='&cellfront;'>
<tbody>
<tr>
<th>&nbsp;</th>
<th>Datatype</th>
<th><termref def='dt-ordered'/></th>
<th><termref def='dt-bounded'/></th>
<th><termref def='dt-cardinality'/></th>
<!--
<th><termref def='dt-exact'/> and <termref def='dt-approximate'/></th>
-->
<th><termref def='dt-numeric'/></th>
</tr>
<tr>
<th rowspan='16'><termref def='dt-primitive'/></th>
<td><dtref ref='string'/></td>
<td>yes</td>
<td>none</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>no</td>
</tr>
<tr>
<td><dtref ref='boolean'/></td>
<td>no</td>
<td>none</td>
<td>finite</td>
<!--
<td>exact</td>
-->
<td>no</td>
</tr>
<tr>
<td><dtref ref='float'/></td>
<td>yes</td>
<td>yes</td>
<td>finite</td>
<!--
<td>exact</td>
-->
<td>yes</td>
</tr>
<tr>
<td><dtref ref='double'/></td>
<td>yes</td>
<td>yes</td>
<td>finite</td>
<!--
<td>exact</td>
-->
<td>yes</td>
</tr>
<tr>
<td><dtref ref='decimal'/></td>
<td>yes</td>
<td>no</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>yes</td>
</tr>
<tr>
<td><dtref ref='timeInstant'/></td>
<td>yes</td>
<td>no</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>no</td>
</tr>
<tr>
<td><dtref ref='timeInstant'/></td>
<td>yes</td>
<td>no</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>no</td>
</tr>
<tr>
<td><dtref ref='recurringInstant'/></td>
<td>yes</td>
<td>no</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>no</td>
</tr>
<tr>
<td><dtref ref='binary'/></td>
<td>no</td>
<td>no</td>
<td>countable infinite</td>
<!--
<td>exact</td>
-->
<td>no</td>
</tr>
<tr>
<td><dtref ref='uri-reference'/></td>
<td>no</td>
<td>no</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>no</td>
</tr>
<tr>
<td><dtref ref='ID'/></td>
<td>no</td>
<td>no</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>no</td>
</tr>
<tr>
<td><dtref ref='IDREF'/></td>
<td>no</td>
<td>no</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>no</td>
</tr>
<tr>
<td><dtref ref='IDREFS'/></td>
<td>no</td>
<td>no</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>no</td>
</tr>
<tr>
<td><dtref ref='ENTITY'/></td>
<td>no</td>
<td>no</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>no</td>
</tr>
<tr>
<td><dtref ref='ENTITIES'/></td>
<td>no</td>
<td>no</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>no</td>
</tr>
<tr>
<td><dtref ref='NOTATION'/></td>
<td>no</td>
<td>no</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>no</td>
</tr>
<tr><td colspan='7'/></tr>
<tr>
<th rowspan='22'><termref def='dt-derived'/></th>
</tr>
<tr>
<td><dtref ref='language'/></td>
<td>no</td>
<td>no</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>no</td>
</tr>
<tr>
<td><dtref ref='NMTOKEN'/></td>
<td>no</td>
<td>none</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>no</td>
</tr>
<tr>
<td><dtref ref='NMTOKENS'/></td>
<td>no</td>
<td>no</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>no</td>
</tr>
<tr>
<td><dtref ref='Name'/></td>
<td>no</td>
<td>no</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>no</td>
</tr>
<tr>
<td><dtref ref='QName'/></td>
<td>no</td>
<td>no</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>no</td>
</tr>
<tr>
<td><dtref ref='NCName'/></td>
<td>no</td>
<td>no</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>no</td>
</tr>
<tr>
<td><dtref ref='integer'/></td>
<td>yes</td>
<td>no</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>yes</td>
</tr>
<tr>
<td><dtref ref='non-positive-integer'/></td>
<td>yes</td>
<td>yes</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>yes</td>
</tr>
<tr>
<td><dtref ref='negative-integer'/></td>
<td>yes</td>
<td>yes</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>yes</td>
</tr>
<tr>
<td><dtref ref='long'/></td>
<td>yes</td>
<td>yes</td>
<td>finite</td>
<!--
<td>exact</td>
-->
<td>yes</td>
</tr>
<tr>
<td><dtref ref='int'/></td>
<td>yes</td>
<td>yes</td>
<td>finite</td>
<!--
<td>exact</td>
-->
<td>yes</td>
</tr>
<tr>
<td><dtref ref='short'/></td>
<td>yes</td>
<td>yes</td>
<td>finite</td>
<!--
<td>exact</td>
-->
<td>yes</td>
</tr>
<tr>
<td><dtref ref='byte'/></td>
<td>yes</td>
<td>yes</td>
<td>finite</td>
<!--
<td>exact</td>
-->
<td>yes</td>
</tr>
<tr>
<td><dtref ref='non-negative-integer'/></td>
<td>yes</td>
<td>yes</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>yes</td>
</tr>
<tr>
<td><dtref ref='unsigned-long'/></td>
<td>yes</td>
<td>yes</td>
<td>finite</td>
<!--
<td>exact</td>
-->
<td>yes</td>
</tr>
<tr>
<td><dtref ref='unsigned-int'/></td>
<td>yes</td>
<td>yes</td>
<td>finite</td>
<!--
<td>exact</td>
-->
<td>yes</td>
</tr>
<tr>
<td><dtref ref='unsigned-short'/></td>
<td>yes</td>
<td>yes</td>
<td>finite</td>
<!--
<td>exact</td>
-->
<td>yes</td>
</tr>
<tr>
<td><dtref ref='unsigned-byte'/></td>
<td>yes</td>
<td>yes</td>
<td>finite</td>
<!--
<td>exact</td>
-->
<td>yes</td>
</tr>
<tr>
<td><dtref ref='positive-integer'/></td>
<td>yes</td>
<td>yes</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>yes</td>
</tr>
<tr>
<td><dtref ref='date'/></td>
<td>yes</td>
<td>no</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>no</td>
</tr>
<tr>
<td><dtref ref='time'/></td>
<td>yes</td>
<td>no</td>
<td>countably infinite</td>
<!--
<td>exact</td>
-->
<td>no</td>
</tr>
</tbody>
</table>
</div2>
<div2 id='app-constraining-facets'>
<head>Constraining Facets</head>
<!--
     this section should really be generated from the source
	 by the stylesheet
  -->
<p>
The <termref def='dt-constraining-facet'/>s are listed
below with all the <termref def='dt-primitive'/>
and <termref def='dt-derived'/> datatypes that they apply to.
</p>
<inverse-facets name='length'/>
<inverse-facets name='minlength'/>
<inverse-facets name='maxlength'/>
<inverse-facets name='pattern'/>
<inverse-facets name='enumeration'/>
<inverse-facets name='maxInclusive'/>
<inverse-facets name='maxExclusive'/>
<inverse-facets name='minInclusive'/>
<inverse-facets name='minExclusive'/>
<inverse-facets name='precision'/>
<inverse-facets name='scale'/>
<inverse-facets name='encoding'/>
<inverse-facets name='period'/>
</div2>
</div1>
<div1 id='isoformats'>
<head>ISO 8601 Date and Time Formats</head>
<div2 id='formatdetails'>
<head>ISO 8601 Conventions</head>
<p>
Three <termref def='dt-primitive'/> datatypes described above,
<dtref ref='timeInstant'/>,
<dtref ref='timeInstant'/>, and <dtref ref='recurringInstant'/>, and two
<termref def='dt-derived'/> dataypes, <dtref ref='date'/> and
<dtref ref='time'/> use
lexical formats inspired by <bibref ref="ISO8601"/>.  This appendix provides
more detail on the ISO formats and discusses some deviations from them for the datatypes we have defined.</p>
<p><bibref ref="ISO8601"/>  "specifies the representation of dates in the Gregorian calendar and times and representations of periods of time".  It should be pointed out that the datatypes described in this specification do not cover all the types of data covered by  <bibref ref="ISO8601"/>, nor do they support all the lexical representations for those types of data.  Specifically, we permit only a single lexical representation for each datatype.</p>
<p> <bibref ref="ISO8601"/> lexical formats are described using "pictures" in
which characters are used in place of digits.  These characters have the following
meanings:</p>
<ulist>
<item><p> C -- represents a digit used in the thousands and hundreds components, the
"century" component, of the time element "year".</p></item>
<item><p> Y -- represents a digit used in the tens and units components of the time
element "year".</p></item>
<item><p> M -- represents a digit used in the time
element "month".</p></item>
<item><p> D -- represents a digit used in the time
element "day".</p></item>
<item><p> h -- represents a digit used in the time
element "hour".</p></item>
<item><p> m -- represents a digit used in the time
element "minute".</p></item>
<item><p> s -- represents a digit used in the time
element "second".  In the formats described in this specification the whole number
of seconds may be followed by decimal seconds to an arbitrary level of precision.
This is represented in the picture by "ss.sss"</p> </item>
</ulist>
<p>For all the information items indicated by the above characters, leading zeros
are required where indicated.</p>
<p>In addition to the above, certain characters are used as designators and appear
as themselves in lexical formats.</p>
<ulist>
<item><p> T -- is used as time designator to indicate the start of the representation
of the time of day in <dtref ref='timeInstant'/> and <dtref ref='recurringInstant'/>.
It is also used to to indicate the start of the representation of the time-units for hour,
minutes, seconds and fractional seconds in <dtref ref='timeInstant'/>.</p></item>
<item><p> Z -- is used as time-zone designator, immediately (without a space) following
a data element expressing the time of day in Coordinated Universal Time (UTC)
in <dtref ref='timeInstant'/>, <dtref ref='recurringInstant'/>, and <dtref ref='time'/></p>
</item>
</ulist>
</div2>
<div2 id='truncatedformats'>
<head>Truncated Formats</head>
<p> <bibref ref="ISO8601"/> supports a variety of "truncated" formats in which some of the characters on the left of specific formats, such as, for example, the century, can be omitted.  Truncated formats are, in general, not permitted for the
datatypes defined in this specification with two exceptions.  The
<dtref ref='recurringInstant'/> datatype uses a truncated format for
<dtref ref='timeInstant'/> to indicate recurring instants of time.  In fact,
only recurring instants that can be represented truncated representations of
<dtref ref='timeInstant'/> are permitted.</p>
<p>Left truncated representations are also allowed for the <dtref ref='date'/>
datatype and can be used to represent recurring dates i.e. the same date every
century, every year or every month.  Right truncated, or reduced precision,
representations are also allowed for <dtref ref='date'/> and can be used
to represent a specific month, a specific year, or a specific century.</p>
</div2>
<div2 id='deviantformats'>
<head>Deviations from ISO 8601 Formats</head>
<div3 id='signallowed'>
<head>Sign Allowed</head>
<p>An optional minus sign is allowed immediately preceding, without a space,
the lexical representations for <dtref ref='timeInstant'/> and
<dtref ref='timeInstant'/>.
</p>
</div3>
<div3 id='motethan9999years'>
<head>More Than 9999 Years</head>
<p>To accommodate year values greater than 9999, more than four digits are
allowed in the year representations of <dtref ref='timeInstant'/>,
<dtref ref='timeInstant'/> and <dtref ref='time'/>.
This follows the <bibref ref = 'ISO8601revision'/>.  
</p>
</div3>
</div2>
</div1>
<!--
<div1 id='regexs'>
<head>Regular Expressions</head>
<p>
<termdef id='dt-regex' term='regular expression'>Dummy definition for
<term>regular expression</term> so I have something to point to
from <termref def='dt-pattern'/></termdef>
</p>
<p>
The following represents a summary of the Unicode regular expression
support which has been proposed for <termref def='dt-pattern'/>.  The next
draft of this specification will contain a full description of the proposal.
</p>
<ulist>
<item><p>
patterns match against the <termref def='dt-value-space'/> and not against
    the lexical space of string (more below)
</p></item>
<item><p>
Unicode support between Level 1 and Level 2 as defined in
    <bibref ref='unicodeRegEx'/>. This support covers all of
	Section 2 as well as Sections 3.1 and 3.2 of <bibref ref='unicodeRegEx'/>.
</p></item>
<item><p>
patterns match against the entire string value.
        This means there are no "^" or "$" metacharacters as in
        <bibref ref='Perl'/>.  To get "substring" matching behavior, simply
        use a pattern such as ".*[a-z].*".
</p></item>
<item><p>
patterns may contain the follow character class escape
    sequences (CCES)
</p>
<ulist>
<item><p>    CCES  Name        Meaning </p></item>
<item><p>     \t   tab         (&amp;#9;)</p></item>
<item><p>     \n   newline     (&amp;#13;)</p></item>
<item><p>     \r   return      (&amp;#10;)</p></item>
<item><p>     \w   word char   (XML prods. 84 | 88)</p></item>
<item><p>     \s   white space (XML prod. 3)</p></item>
<item><p>     \d   digit       (XML prod. 88)</p></item>
<item><p>     \c   name char   (XML prod. 4)</p></item>
<item><p>     \i   initial NMTOKEN char (XML prod. 5)</p></item>
</ulist>
<p>
     Furthermore, \W, \S, \D, \C and \I are allowed, and mean the
     compliment of their lower case form (as in Perl)
</p></item>
<item><p>
patterns may also contain any CCES of the form:           \p{x},
      where x is one of the 1 or 2 letter properties defined in
      the Unicode Character Database <bibref ref='unicodeDB'/>.  The \p{x} syntax
      is as in <bibref ref='Perl5.6'/>.  
</p>
<p>
      Furthermore, \P{x} is allowed and means the
      compliment of its lower case form (as in Perl)
</p>
<p>
      Examples of properties  are:
</p>
<ulist>
<item><p>
     Lu    Letter, Uppercase</p></item>
<item><p>     Nd    Number, Decimal Digit</p></item>
<item><p>     Pc    Punctuation, Connector</p></item>
<item><p>     Sm    Symbol, Math</p></item>
</ulist>
<p>
patterns may also contain CCES of the form:
           \p{Isx},
      where x is one of the block names defined in
      the Unicode Character Database <bibref ref='unicodeDB'/> and Chapter 15
      of the Unicode Specification <bibref ref='Unicode'/>.  The \p{x} syntax
      is as in <bibref ref='Perl5.6'/>.
</p>
<p>
      Furthermore, \P{x} is allowed and means the
      compliment of its lower case form (as in Perl)
</p>
<p>
      Examples of blocks are:
</p>
<ulist>
<item><p>
     BasicLatin        (&amp;#x0;-&amp;#x7F;)</p></item>
<item><p>     Latin-1Supplement (&amp;#x80;-&amp;#xFF;)</p></item>
<item><p>     Greek             (&amp;#x370;-&amp;#x3FF;)</p></item>
<item><p>     HangulSyllables   (&amp;xAC00;-&amp;#xD7A3;)</p></item>
</ulist>
<p>
     Thus, to match any Greek character one would use:
          \p{IsGreek}
</p></item>
<item><p>
patterns may NOT contain octal or hexidecimal escape
    sequences such as:
       \033 or \x1B,
    XML <xnt href='&xmlspec;#dt-charref'>Character References</xnt>
	should be used instead.
</p></item>
<item><p>
within character classes, ranges (e.g. [a-z]) refer
   to code point ranges
</p></item>
<item><p>
character class  subtraction is allowed using the following
    syntax:
       [a-z-[mn]]
</p></item>
<item><p>
character class complimentation is allowed using the
     following syntax:
       [^a-z]
</p></item>
<item><p>
case dependant and case independant matching will be supported
</p></item>
<item><p>
the usual grouping and repetition operators are allowed:
</p>
<p>
        (), |, +, ?, *, {n}, {n,m}, {n,}
</p></item>
<item><p>
notably NOT allowed are:
         the various "zero-width" assertions from Perl:
            \b, \B, lookahead or lookbehind (e.g., (?=...) (?&lt;=...),
         backreferences (e.g., /(a-z).*\1)
</p></item>
</ulist>
<p>
Concerning point #1: patterns match against the <termref def='dt-value-space'/>
and not against
the <termref def='dt-lexical-space'/> of <dtref ref='string'/>...
</p>
<p>
We (or maybe it's just me, I can't remember how extensively the PTF
discussed this issue) are proposing that the <termref def='dt-value-space'/>
of <dtref ref='string'/>
be a normalized form of the lexical space, where normalization
occurs as per the CharModel WD [8] (which amounts to Unicode Normalization
Form C [9]).
</p>
<p>
Any comments appreciated.  We are especially requesting input on alternate
syntax for specifying character class subtraction (point #9 above).  The
sytnax proposed here is from [2] but its not ideal in our opinion.
</p>
</div1>
-->
<div1 id='regexs'>
<head>Regular Expressions</head>
<p>
A <term>regular expression</term> <emph>R</emph>
is a sequence of characters that denotes a <B>set of strings</B> <emph>L(R)</emph>.
When used to constrain the lexical space of a datatype, a regular expression <emph>R</emph>
asserts that only strings in <emph>L(R)</emph> are valid specifications for
values of that type.
</p>

<p><termdef id='dt-regex' term='regular expression'>A <term>regular expression</term> is composed from one or more <termref def='dt-branch'/>es, separated by <code>|</code> characters.
</termdef></p><!--MTT--><table border='1'>
<col width="50%"/><col width="50%"/>
<thead><tr>
<th>For all <termref def='dt-branch'/>es <emph>S</emph>, and for all <termref def='dt-regex'/>s <emph>T</emph>, valid
<termref def='dt-regex'/>s <emph>R</emph> are:</th>
<th>Denoting the set of strings <emph>L(R)</emph> containing:</th></tr>
</thead>
<tbody>
<tr>
  <td align="center"><emph>S</emph></td>
  <td align="center">all strings in <emph>L(S)</emph></td>
</tr>
<tr>
  <td align="center"><emph>S</emph>|<emph>T</emph></td>
  <td align="center">all strings in <emph>L(S)</emph> and all strings in <emph>L(T)</emph></td>
</tr>
</tbody>
</table><p/>


<p><termdef id='dt-branch' term='branch'>A <term>branch</term> consists of zero or more <termref def='dt-piece'/>s, concatenated
together.</termdef></p>
<!--MTT--><table border='1'>
<col width="50%"/><col width="50%"/>
<thead><tr>
<th>For all <termref def='dt-piece'/>s <emph>S</emph>, and for all <termref def='dt-branch'/>es <emph>T</emph>, valid
<termref def='dt-branch'/>es <emph>R</emph> are:</th>
<th>Denoting the set of strings <emph>L(R)</emph> containing:</th></tr>
</thead>
<tbody>
<tr>
  <td align="center"><emph>S</emph></td>
  <td align="center">all strings in <emph>L(S)</emph></td>
</tr>
<tr>
  <td align="center"><emph>S</emph><emph>T</emph></td>
  <td align="center">all strings <emph>st</emph> with <emph>s</emph> in <emph>L(S)</emph> and <emph>t</emph> in <emph>L(T)</emph></td>
</tr>
</tbody>
</table>

<p><termdef id='dt-piece' term='piece'>A <term>piece</term> is an
<termref def='dt-atom'/>, possibly followed by a
<termref def='dt-quantifier'/>.</termdef></p>
<!--MTT--><table border='1'>
<col width="50%"/><col width="50%"/>
<thead><tr>
<th>For all <termref def='dt-atom'/>s <emph>S</emph>, valid
<termref def='dt-piece'/>s <emph>R</emph> are:</th>
<th>Denoting the set of strings <emph>L(R)</emph> containing:</th></tr>
</thead>
<tbody>
<tr>
  <td align="center"><emph>S</emph></td>
  <td align="center">all strings in <emph>L(S)</emph></td>
</tr>
<tr>
  <td align="center"><emph>S</emph>?</td>
  <td align="center">the empty string, and all strings in <emph>L(S)</emph>.</td>
</tr>
<tr>
  <td align="center"><emph>S</emph>*</td>
  <td align="center">All strings <emph>st</emph> with <emph>s</emph> in <emph>L(S?)</emph> and <emph>t</emph> in <emph>L(S*)</emph>.  <emph>( all concatenations of zero or more strings from L(S) )</emph></td>
</tr>
<tr>
  <td align="center"><emph>S</emph>+</td>
  <td align="center">All strings <emph>st</emph> with <emph>s</emph> in <emph>L(S)</emph> and <emph>t</emph> in <emph>L(S*)</emph>.  <emph>( all concatenations of one or more strings from L(S) )</emph></td>
</tr>
</tbody>
</table>


<p><termdef id='dt-atom' term='atom'>An <term>atom</term> is either a
<termref def="dt-normalc"/>, a
<termref def="dt-charclass"/>, or
a parenthesized <termref def='dt-regex'/>.</termdef></p>
<!--MTT--><table border='1'>
<col width="50%"/><col width="50%"/>
<thead><tr>
<th>For all <termref def='dt-normalc'/>s <emph>c</emph>,
<termref def="dt-charclass"/>es <emph>C</emph>, and
<termref def='dt-regex'/>s <emph>S</emph>, valid
<termref def='dt-atom'/>s <emph>R</emph> are:</th>
<th>Denoting the set of strings <emph>L(R)</emph> containing:</th></tr>
</thead>
<tbody>
<tr>
  <td align="center"><emph>c</emph></td>
  <td align="center">the single string consisting only of <emph>c</emph>
</td></tr>
<tr>
  <td align="center"><emph>C</emph></td>
  <td align="center">all strings in <emph>L(C)</emph></td>
</tr>
<tr>
  <td align="center">(<emph>S</emph>)</td>
  <td align="center">all strings in <emph>L(S)</emph></td>
</tr>
</tbody>
</table>

<p><termdef id='dt-quantifier' term='quantifier'>A <term>quantifier</term>
is is either
<code>?</code>,
<code>*</code>, or
<code>+</code>.
</termdef></p>

<p><termdef id='dt-metac' term='metacharacter'>A <term>metacharacter</term>
is either
<code>.</code>,
<code>\</code>,
<code>?</code>,
<code>*</code>,
<code>+</code>,
<code>(</code>,
<code>)</code>,
<code>[</code>, or
<code>]</code>.
These characters have special meanings in <termref def='dt-regex'/>s,
but can be escaped to form <termref def='dt-atom'/>s that denote
the sets of strings containing only themselves, i.e., an escaped
<termref def='dt-metac'/> behaves like a <termref def='dt-normalc'/>.</termdef></p>


<p><termdef id='dt-normalc' term='normal character'>A <term>normal character</term> is
any XML character that is not a metacharacter.  In <termref def='dt-regex'/>s, a normal
character is an atom that denotes
the singleton set of strings containing only itself.</termdef></p>


<div2 id='charcter-classes'>
<head>Character Classes</head>
<p><termdef id='dt-charclass' term='character class'>A <term>character class</term> is an
<termref def="dt-atom"/> <emph>R</emph> that identifies a <B>set of characters</B>
<emph>C(R)</emph>.  The set of strings
<emph>L(R)</emph> denoted by a character class
<emph>R</emph>
contains one single-character string "<emph>c</emph>" for each character <emph>c</emph> in
<emph>C(R)</emph>.</termdef></p>
<p>A character class is either a <termref def="dt-cces"/> or a <termref def="dt-charexpr"/>.</p>

<p><termdef id='dt-charexpr' term='character class expression'>A
<term>character class expression</term> is a <termref def="dt-chargroup"/> surrounded
by <code>[</code> and <code>]</code> characters.  For all character groups <emph>G</emph>, [<emph>G</emph>]
is a valid <term>character class expression</term>, identifying the set of characters
<emph>C</emph>([<emph>G</emph>]) = <emph>C</emph>(<emph>G</emph>).</termdef></p>

<p><termdef id='dt-chargroup' term="character group">A <term>character group</term> is
either <termref def="dt-poschargroup"/>, a <termref def="dt-negchargroup"/>, or
a <termref def="dt-subchargroup"/>.</termdef></p>

<p><termdef id='dt-poschargroup' term="positive character group">A <term>positive character group</term>
consists of one or more <termref def="dt-charrange"/>s or <termref def="dt-cces"/>s, concatenated together.  A positive
character group identifies the set of characters containing all of the characters in all of the
sets identified by its constituent ranges or escapes.</termdef></p>

<!--MTT--><table border='1'>
<col width="50%"/><col width="50%"/>
<thead><tr>
<th>For all <termref def="dt-charrange"/>s <emph>R</emph>, all
<termref def="dt-cces"/>s <emph>E</emph>, and all
<termref def="dt-poschargroup"/>s <emph>P</emph>, valid
<termref def="dt-poschargroup"/>s <emph>G</emph> are:</th>
<th>Identifying the set of characters <emph>C(G)</emph> containing:</th></tr>
</thead>
<tbody>
<tr>
  <td align="center"><emph>R</emph></td>
  <td align="center">all characters in <emph>C(R)</emph>.</td>
</tr>
<tr>
  <td align="center"><emph>E</emph></td>
  <td align="center">all characters in <emph>C(E)</emph>.</td>
</tr>
<tr>
  <td align="center"><emph>RP</emph></td>
  <td align="center">all characters in <emph>C(R)</emph> and all characters in <emph>C(P)</emph>.</td>
</tr>
<tr>
  <td align="center"><emph>EP</emph></td>
  <td align="center">all characters in <emph>C(E)</emph> and all characters in <emph>C(P)</emph>.</td>
</tr>
</tbody>
</table>

<p><termdef id='dt-negchargroup' term="negative character group">A <term>negative character group</term>
is a <termref def="dt-poschargroup"/> preceded by the <code>^</code> character.  For all
<termref def="dt-poschargroup"/>s <emph>P</emph>, ^<emph>P</emph> is a valid negative character
group, and <emph>C(^P)</emph> contains all XML characters that are <B>not</B>
in <emph>C(P)</emph>.</termdef></p>

<p><termdef id='dt-subchargroup' term="character class subtraction">A
<term>character class subtraction</term> is a <termref def="dt-charexpr"/> subtracted
from a positive or negative character group, using the <code>-</code> character.</termdef></p>
<p>For any positive or negative character group <emph>G</emph>, and any <termref def='dt-charexpr'/> <emph>C</emph>,
<emph>G-C</emph> is a valid character class subtraction, identifying the set of all characters in
<emph>C(G)</emph> that are not also in <emph>C(C)</emph>.</p>

<p><termdef id='dt-charrange' term='character range'>A <term>character range</term>
<emph>R</emph> identifies a set of characters <emph>C(R)</emph> containing all XML characters
with Unicode code points in a specified range.</termdef></p>
<p>A single XML character is a character range that identifies the set of characters containing
only itself.  All XML chacters are valid character ranges, except as follows:</p>
<ulist>
<item><p>The <code>[</code>, <code>]</code>, and <code>\</code> characters are not valid character ranges;</p></item>
<item><p>The <code>^</code> character is only valid at the beginning of a <termref def="dt-poschargroup"/>
if it is part of a <termref def="dt-negchargroup"/>; and</p></item>
<item><p>The <code>-</code> character is a valid character range only at the beginning or end of a
<termref def="dt-poschargroup"/>.</p></item>
</ulist>
<p>A character range may also be written in the form <emph>s-e</emph>, identifying the set
that contains all XML characters with Unicode code points greater than or equal to the code point
of <emph>s</emph>, but not greater than the code point of <emph>e</emph>.</p>
<p><emph>s-e</emph> is a valid character range iff:</p>
<ulist>
<item><p><emph>s</emph> is a <termref def="dt-cces1"/>, or an XML character;</p></item>
<item><p><emph>s</emph> is not <code>\</code></p></item>
<item><p>If s is the first character in a <termref def="dt-charexpr"/>, then <emph>s</emph> is not <code>^</code></p></item>
<item><p><emph>e</emph> is a <termref def="dt-cces1"/>, or an XML character;</p></item>
<item><p><emph>e</emph> is not <code>\</code> or <code>[</code>; and</p></item>
<item><p>The code point of <emph>e</emph> is greater than or equal to the code point of <emph>s</emph>;</p>
</item>
</ulist>
<note><p>The code point of a <termref def="dt-cces1"/> is the code point of the single character in
the set of characters that it identifies.</p></note>
<div3 id='cces'>
<head>Character Class Escapes</head>
<p><termdef id='dt-cces' term='character class escape'>A <term>character class escape</term> is a
short sequence of characters that identifies predefined character class.  The valid character
class escapes include the <termref def="dt-cces1"/>s, the <termref def="dt-ccesN"/>s, and the
<termref def="dt-ccescat"/>s.</termdef></p>
<p><termdef id='dt-cces1' term="single character escape">A <term>single character escape</term> identifies
a set containing a only one character -- usually because that
character is difficult or impossible to write directly into a <termref def='dt-regex'/>.</termdef></p>
<!--MTT--><table border='1'>
<col width="50%"/><col width="50%"/>
<thead><tr>
<th>The valid single character escapes are:</th>
<th>Identifying the set of characters <emph>C(R)</emph> containing:</th></tr>
</thead>
<tbody>
<tr>
  <td align="center"><code>\n</code></td>
  <td align="center">the newline character (&amp;#xA;)</td>
</tr>
<tr>
  <td align="center"><code>\r</code></td>
  <td align="center">the return character (&amp;#xD;)</td>
</tr>
<tr>
  <td align="center"><code>\t</code></td>
  <td align="center">the tab character (&amp;#x9;)</td>
</tr>
<tr>
  <td align="center"><code>\\</code></td>
  <td align="center">\</td>
</tr>
<tr>
  <td align="center"><code>\.</code></td>
  <td align="center">.</td>
</tr>
<tr>
  <td align="center"><code>\-</code></td>
  <td align="center">-</td>
</tr>
<tr>
  <td align="center"><code>\^</code></td>
  <td align="center">^</td>
</tr>
<tr>
  <td align="center"><code>\?</code></td>
  <td align="center">?</td>
</tr>
<tr>
  <td align="center"><code>\*</code></td>
  <td align="center">*</td>
</tr>
<tr>
  <td align="center"><code>\+</code></td>
  <td align="center">+</td>
</tr>
<tr>
  <td align="center"><code>\(</code></td>
  <td align="center">(</td>
</tr>
<tr>
  <td align="center"><code>\)</code></td>
  <td align="center">)</td>
</tr>
<tr>
  <td align="center"><code>\[</code></td>
  <td align="center">[</td>
</tr>
<tr>
  <td align="center"><code>\]</code></td>
  <td align="center">]</td>
</tr>
</tbody>
</table>
<p>
<termdef id="dt-ccescat" term="category escape">The
Unicode Standard <bibref ref='Unicode'/> defines a number of character properties
and provides mappings from code points to specific character properties.  The
set containing of all characters that have property
<code>X</code>, may be identified with a <term>category escape</term> <code>\p{X}</code>.
The compliment of this set may be specified with the <term>category escape</term> <code>\P{X}</code>.
(<code>[\P{X}]</code> = <code>[^\p{X}]</code>).
</termdef>
</p>
<p>
The following table specifies the main character properties (for more information, see
Chapter 4 of <bibref ref='Unicode'/>).
</p>
<table border='1' align='center'>
<tbody>
	<tr>
		<th>Category</th><th>Property</th><th>Meaning</th>
	</tr>
	<tr>
		<td rowspan='6'>Letters</td><td align='center'>L</td><td>All Letters</td>
	</tr>
	<tr>
		<td align='center'>Lu</td><td>Uppercase</td>
	</tr>
	<tr>
		<td align='center'>Ll</td><td>Lowercase</td>
	</tr>
	<tr>
		<td align='center'>Lt</td><td>Titlecase</td>
	</tr>
	<tr>
		<td align='center'>Lm</td><td>Modifier</td>
	</tr>
	<tr>
		<td align='center'>Lo</td><td>Other</td>
	</tr>
	<tr>
		<td colspan='3'>&nbsp;</td>
	</tr>
	<tr>
		<td rowspan='4'>Marks</td><td align='center'>M</td><td>All Marks</td>
	</tr>
	<tr>
		<td align='center'>Mn</td><td>Non-Spacing</td>
	</tr>
	<tr>
		<td align='center'>Mc</td><td>Spacing Combining</td>
	</tr>
	<tr>
		<td  align='center'>Me</td><td>Enclosing</td>
	</tr>
	<tr>
		<td colspan='3'>&nbsp;</td>
	</tr>
	<tr>
		<td rowspan='4'>Numbers</td><td align='center'>N</td><td>All Numbers</td>
	</tr>
	<tr>
		<td align='center'>Nd</td><td>Decimal Digit</td>
	</tr>
	<tr>
		<td align='center'>Nl</td><td>Letter</td>
	</tr>
	<tr>
		<td align='center'>No</td><td>Other</td>
	</tr>
	<tr>
		<td colspan='3'>&nbsp;</td>
	</tr>
	<tr>
		<td rowspan='8'>Punctuation</td><td align='center'>P</td><td>All Punctuation</td>
	</tr>
	<tr>
		<td align='center'>Pc</td><td>Connector</td>
	</tr>
	<tr>
		<td align='center'>Pd</td><td>Dash</td>
	</tr>
	<tr>
		<td align='center'>Ps</td><td>Open</td>
	</tr>
	<tr>
		<td align='center'>Pe</td><td>Close</td>
	</tr>
	<tr>
		<td align='center'>Pi</td><td>Initial quote
			(may behave like Ps or Pe depending on usage)</td>
	</tr>
	<tr>
		<td align='center'>Pf</td><td>Final quote
			(may behave like Ps or Pe depending on usage)</td>
	</tr>
	<tr>
		<td align='center'>Po</td><td>Other</td>
	</tr>
	<tr>
		<td colspan='3'>&nbsp;</td>
	</tr>
	<tr>
		<td rowspan='4'>Separators</td><td align='center'>Z</td><td>All Separators</td>
	</tr>
	<tr>
		<td align='center'>Zs</td><td>Space</td>
	</tr>
	<tr>
		<td align='center'>Zl</td><td>Line</td>
	</tr>
	<tr>
		<td align='center'>Zp</td><td>Paragraph</td>
	</tr>
	<tr>
		<td colspan='3'>&nbsp;</td>
	</tr>
	<tr>
		<td rowspan='5'>Symbols</td><td align='center'>S</td><td>All Symbols</td>
	</tr>
	<tr>
		<td align='center'>Sm</td><td>Math</td>
	</tr>
	<tr>
		<td align='center'>Sc</td><td>Currency</td>
	</tr>
	<tr>
		<td align='center'>Sk</td><td>Modifier</td>
	</tr>
	<tr>
		<td align='center'>So</td><td>Other</td>
	</tr>
	<tr>
		<td colspan='3'>&nbsp;</td>
	</tr>
	<tr>
		<td rowspan='6'>Other</td><td align='center'>C</td><td>All Others</td>
	</tr>
	<tr>
		<td align='center'>Cc</td><td>Control</td>
	</tr>
	<tr>
		<td align='center'>Cf</td><td>Format</td>
	</tr>
	<tr>
		<td align='center'>Cs</td><td>Surrogate</td>
	</tr>
	<tr>
		<td align='center'>Co</td><td>Private Use</td>
	</tr>
	<tr>
		<td align='center'>Cn</td><td>Not Assigned</td>
	</tr>
</tbody>
</table>
<p>
<termdef id="dt-ccesN" term="multi-character escape">A
<term>multi-character escape</term>
provides a simple way to identify a commonly used set of characters:
</termdef>
</p>
<table border='1' align='center'>
<col width="50%"/><col width="50%"/>
<thead><tr>
<th>Character Sequence</th>
<th>Equivalent <termref def="dt-charclass"/></th></tr>
</thead>
<tbody>
	<tr>
		<td align='center'>.</td><td align="center">[^\n\r]</td>
	</tr>
	<tr>
		<td align='center'>\s</td><td align="center">[&amp;#x20;\t\n\r]</td>
	</tr>
	<tr>
		<td align='center'>\S</td><td align="center">[^\s]</td>
	</tr>
	<tr>
		<td align='center'>\i</td><td align="center">[\p{L}\p{Nl}:_]</td>
	</tr>
	<tr>
		<td align='center'>\I</td><td align="center">[^\i]</td>
	</tr>
	<tr>
		<td align='center'>\c</td><td align="center">[\p{?}\p{?}]</td>
	</tr>
	<tr>
		<td align='center'>\C</td><td align="center">[^\c]</td>
	</tr>
	<tr>
		<td align='center'>\d</td><td align="center">\p{Nd}</td>
	</tr>
	<tr>
		<td align='center'>\D</td><td align="center">[^\d]</td>
	</tr>
	<tr>
		<td align='center'>\w</td><td align="center">[\p{?}\p{?}]</td>
	</tr>
	<tr>
		<td align='center'>\W</td><td align="center">[^\w]</td>
	</tr>
</tbody>
</table>
</div3>
</div2>
</div1>
<div1 id='biblio'>
<head>References</head>
<!--
   bibls can be in any order and the stylesheet will sort them
   by the value of their key attribute
  -->
<div2 id='normative-biblio'>
<head>Normative</head>
<blist>
<bibl id='ieee754' key='IEEE 754-1985'>
IEEE. <emph>IEEE Standard for Binary Floating-Point Arithmetic.</emph>
See <loc href='http://standards.ieee.org/reading/ieee/std_public/description/busarch/754-1985_desc.html'>
http://standards.ieee.org/reading/ieee/std_public/description/busarch/754-1985_desc.html</loc>
</bibl>
<bibl id='XML-Infoset' key='XML Information Set'>
World Wide Web Consortium.  XML Information Set (public WD)
Available at: <loc href='http://www.w3.org/TR/xml-infoset'>
http://www.w3.org/TR/xml-infoset </loc>
</bibl>
<bibl id='XML' key='XML 1.0 Recommendation'>
World Wide Web Consortium. <emph>Extensible Markup Language (XML) 1.0.</emph>
Available at: <loc href='&xmlspec;'>&xmlspec;</loc>
</bibl>
<bibl id='structural-schemas' key='XML Schema Part 1: Structures'>
XML Schema Part 1: Structures. Available at: <loc href='&xsdl;'>
&xsdl;</loc>
</bibl>
<bibl id='schema-requirements' key='XML Schema Requirements'>
XML Schema Requirements.  Available at:
<loc href='http://www.w3.org/TR/NOTE-xml-schema-req'>
http://www.w3.org/TR/NOTE-xml-schema-req</loc>
</bibl>
<bibl id='ISO10646' key='ISO 10646'>
ISO (International Organization for Standardization).  <emph>ISO/IEC 10646-1993
(E).  Information technology --- Universal Multiple-Octet Coded Character
Set (UCS) --- Part 1: Architecture and Basic Multilingual Plane.</emph>
[Geneva]: International Organization for Standardization, 1993 (plus amendments
AM 1 through AM 7).
</bibl>
<bibl id='Unicode' key='Unicode'>
The Unicode Consortium. <emph>The Unicode Standard, Version 2.0.</emph> Reading,
Mass.:  Addison-Wesley Developers Press, 1996.
</bibl>
<bibl id='unicodeDB' key='Unicode Database'>
The Unicode Consortium. <emph>The Unicode Character Database</emph>.
Available at: <loc href='ftp://ftp.unicode.org/Public/3.0-Update/UnicodeCharacterDatabase-3.0.0.html'>
ftp://ftp.unicode.org/Public/3.0-Update/UnicodeCharacterDatabase-3.0.0.html</loc>
</bibl>
<bibl id='XMLNS' key='Namespaces in XML'>
World Wide Web Consortium.  <emph>Namespaces in XML</emph>. Available at:
<loc href='&xmlnsspec;'>&xmlnsspec;</loc>
</bibl>
<bibl id='RFC2396' key='RFC 2396'>
Tim Berners-Lee, et. al. <emph>RFC 2396: Uniform Resource Identifiers (URI):
Generic Syntax.</emph>. 1998  Available at:
<loc href='http://www.ietf.org/rfc/rfc2396.txt'>
http://www.ietf.org/rfc/rfc2396.txt</loc>
</bibl>
<bibl id='RFC2045' key='RFC 2045'>
N. Freed and N. Borenstein. <emph>RFC 2045: Multipurpose Internet Mail Extensions
(MIME) Part One: Format of Internet Message Bodies</emph>. 1996  Available at:
<loc href='http://www.ietf.org/rfc/rfc2045.txt'>
http://www.ietf.org/rfc/rfc2045.txt</loc>
</bibl>
<bibl id='RFC1766' key='RFC 1766'>
H. Alvestrand, ed. <emph>RFC 1766: Tags for the Identification of Languages</emph>
1995. Available at: <loc href='http://www.ietf.org/rfc/rfc1766.txt'>
http://www.ietf.org/rfc/rfc1766.txt</loc>
</bibl>
</blist>
</div2>
<div2 id='non-normative-biblio'>
<head>Non-normative</head>
<blist>
<!--
<bibl id='ecmascript-regex' key='ECMAScript Regex'>
ECMAScript v2 Draft. Regular Expressions.
See <loc href='http://www2.hursley.ibm.com/tc39/regexp30.pdf'>
http://www2.hursley.ibm.com/tc39/regexp30.pdf</loc>
</bibl>
-->
<bibl id='unicodeRegEx' key='Unicode Regular Expression Guidelines'>
Mark Davis.  <emph>Unicode Regular Expression Guidelines</emph>, 1988.
Available at: <loc href='http://www.unicode.org/unicode/reports/tr18/'>
http://www.unicode.org/unicode/reports/tr18/</loc>
</bibl>
<bibl id='Perl' key='Perl'>
The Perl Programming Language.  See <loc href='http://www.perl.com/pub'>
http://www.perl.com</loc>
</bibl>
<bibl id='Perl5.6' key='Perl 5.6'>
The Perl Programming Language, Version 5.6.  See <loc href='http://www.perl.com/language/misc/ann58/index.html'>
http://www.perl.com/language/misc/ann58/index.html</loc>
</bibl>
<bibl id='SQL' key='SQL'>
SQL Standard.  See <loc href='http://www.jcc.com/SQLPages/jccs_sql.htm'>
http://www.jcc.com/SQLPages/jccs_sql.htm</loc>
</bibl>
<bibl id='clinger1990' key='Clinger, WD (1990)'>
William D Clinger. <emph>How to Read Floating Point Numbers Accurately.</emph>
In <emph>Proceedings of Conference on Programming Language Design and
Implementation</emph>, pages 92-101.
Available at: <loc href='ftp://ftp.ccs.neu.edu/pub/people/will/howtoread.ps'>
ftp://ftp.ccs.neu.edu/pub/people/will/howtoread.ps</loc>
</bibl>
<bibl id='ISO8601' key='ISO 8601'>
ISO (International Organization for Standardization).
<emph>Representations of dates and times, 1988-06-15.</emph>  Available at:
<loc href='http://www.iso.ch/markete/8601.pdf'>
http://www.iso.ch/markete/8601.pdf</loc>  
</bibl>
<bibl id='ISO8601revision' key='ISO 8601 Draft Revision'>
ISO (International Organization for Standardization).
<emph>Representations of dates and times, draft revision, 1998.</emph>
<!--
Available at:
<loc href='http://www.cl.cam.ac.uk/~mgk25/8601v04.pdf'>
http://www.cl.cam.ac.uk/~mgk25/8601v04.pdf</loc>
-->
</bibl>
<bibl id='ISO11404' key='ISO 11404'>
ISO (International Organization for Standardization).
<emph>Language-independent Datatypes.</emph>  See
<loc href=' http://www.iso.ch/cate/d19346.html'>
 http://www.iso.ch/cate/d19346.html</loc>
</bibl>
<bibl id='RDFSchema' key='RDF Schema'>
World Wide Web Consortium. <emph>RDF Schema Specification.</emph>
Available at: <loc href='&rdfschspec;'>&rdfschspec;</loc>
</bibl>
<bibl id='XSL' key='XSL'>
World Wide Web Consortium. <emph>
Extensible Stylesheet Language (XSL).</emph>
Available at: <loc href='&xslspec;'>&xslspec;</loc>
</bibl>
</blist>
</div2>
</div1>
<div1 id='acknowledgments'>
<head>Acknowledgments (non-normative)</head>
<p>
The following have contributed material to this draft:
</p>
<slist>
<sitem>Matt Timmermans</sitem>
<sitem>Mark Reinhold</sitem>
</slist>
<p>
The editors acknowledge the members of the XML Schema Working Group, the members of other W3C Working Groups, and industry experts in other
forums who have contributed directly or indirectly to the process or content of
creating this document. The Working Group is particularly grateful to Lotus
Development Corp. and IBM for providing teleconferencing facilities.
</p>
 <p>The current members of the XML Schema Working Group are:</p>
<orglist>
<member>
 <name>David Beech</name>
 <affiliation>Oracle Corp.</affiliation>
</member>
<member>
 <name>Paul V. Biron</name>
 <affiliation>Health Level Seven</affiliation>
</member>
<member>
 <name>Don Box</name>
 <affiliation>DevelopMentor</affiliation>
</member>
<member>
 <name>Allen Brown</name>
 <affiliation>Microsoft</affiliation>
</member>
<member>
 <name>Greg Bumgardner</name>
 <affiliation>Rogue Wave Software</affiliation>
</member>
<member>
 <name>Lee Buck</name>
 <affiliation>Extensibility</affiliation>
</member>
<member>
  <name>Charles Campbell</name>
  <affiliation>Informix</affiliation>
</member>
<member>
 <name>Peter Chen</name>
 <affiliation>Bootstrap Alliance and LSU</affiliation>
</member>
<member>
 <name>David Cleary</name>
 <affiliation>Progress Software</affiliation>
</member>
<member>
 <name>Dan Connolly</name>
 <affiliation>W3C</affiliation>
 <role>staff contact</role>
</member>
<member>
 <name>Andrew Eisenberg</name>
 <affiliation>Progress Software</affiliation>
</member>
<member>
 <name>Rob Ellman</name>
 <affiliation>Calico Commerce</affiliation>
</member>
<member>
 <name>David Ezell</name>
 <affiliation>Hewlett Packard Company</affiliation>
</member>
<member>
 <name>David Fallside</name>
 <affiliation>IBM</affiliation>
</member>
<member>
 <name>Matthew Fuchs</name>
 <affiliation>Commerce One</affiliation>
</member>
<member>
 <name>Paul Grosso</name>
 <affiliation>ArborText, Inc.</affiliation>
</member>
<member>
 <name>Dave Hollander</name>
 <affiliation>CommerceNet</affiliation>
 <role>co-chair</role>
</member>
<member>
 <name>Mary Holstege</name>
 <affiliation>Calico Commerce</affiliation>
</member>
<member>
 <name>Jane Hunter</name>
 <affiliation>Distributed Systems Technology Centre (DSTC Pty Ltd)</affiliation>
</member>
<member>
 <name>Renato Iannella</name>
 <affiliation>Distributed Systems Technology Centre (DSTC Pty Ltd)</affiliation>
</member>
 <member>
  <name>Rick Jelliffe</name>
  <affiliation>Academia Sinica</affiliation>
 </member>
 <member>
  <name>Dianne Kennedy</name>
  <affiliation>Graphic Communications Association</affiliation>
 </member>
<member>
 <name>Andrew Layman</name>
 <affiliation>Microsoft</affiliation>
</member>
<member>
 <name>Dmitry Lenkov</name>
 <affiliation>Hewlett Packard Company</affiliation>
</member>
<member>
 <name>Eve Maler</name>
 <affiliation>Sun Microsystems</affiliation>
</member>
<member>
 <name>Ashok Malhotra</name>
 <affiliation>IBM</affiliation>
</member>
<member>
 <name>Murray Maloney</name>
 <affiliation>Commerce One</affiliation>
</member>
<member>
 <name>John McCarthy</name>
 <affiliation>Lawrence Berkeley National Laboratory</affiliation>
</member>
<member>
 <name>Noah Mendelsohn</name>
 <affiliation>Lotus Development Corporation</affiliation>
</member>
<member>
 <name>Don Mullen</name>
 <affiliation>Extensibility</affiliation>
</member>
<member>
 <name>Frank Olken</name>
 <affiliation>Lawrence Berkeley National Laboratory</affiliation>
</member>
 <member>
  <name>Dave Peterson</name>
  <affiliation>Graphic Communications Association</affiliation>
 </member>
<member>
 <name>Mark Reinhold</name>
 <affiliation>Sun Microsystems</affiliation>
</member>
<member>
 <name>Jonathan Robie</name>
 <affiliation>Software AG</affiliation>
</member>
 <member>
  <name>Lew Shannon</name>
  <affiliation>NCR</affiliation>
 </member>
<member>
 <name>C. M. Sperberg-McQueen</name>
 <affiliation>W3C</affiliation>
 <role>co-chair</role>
</member>
<member>
 <name>Henry S. Thompson</name>
 <affiliation>University of Edinburgh</affiliation>
</member>
<member>
 <name>Matt Timmermans</name>
 <affiliation>Microstar</affiliation>
</member>
<member>
 <name>Jim Trezzo</name>
 <affiliation>Oracle Corp.</affiliation>
</member>
<member>
 <name>Steph Tryphonas</name>
 <affiliation>Microstar</affiliation>
</member>
<member>
 <name>Mark Tucker</name>
 <affiliation>Health Level Seven</affiliation>
</member>
<member>
<name>Asir Vedamuthu</name>
<affiliation>webMethods</affiliation>
</member> 
<member>
 <name>Priscilla Walmsley</name>
 <affiliation>XMLSolutions</affiliation>
</member>
<member>
 <name>Norm Walsh</name>
 <affiliation>ArborText, Inc.</affiliation>
</member>
<member>
 <name>Aki Yoshida</name>
 <affiliation>SAP AG</affiliation>
</member>
</orglist>
 <p>The XML Schema Working Group has benefited in its work from the
participation and contributions of a number of people not currently
members of the Working Group, including
in particular those named below.  Affiliations given are those current at
the time of their work with the WG.
</p>
 <orglist>
<member>
 <name>Paula Angerstein</name>
 <affiliation>Vignette Corporation</affiliation>
</member>
 <member>
  <name>Gabe Beged-Dov</name>
  <affiliation>Rogue Wave Software</affiliation>
 </member>
<member>
 <name>Dean Burson</name>
 <affiliation>Lotus Development Corporation</affiliation>
</member>
 <member>
  <name>George Feinberg</name>
  <affiliation>Object Design</affiliation>
 </member>
 <member>
  <name>Charles Frankston</name>
  <affiliation>Microsoft</affiliation>
 </member>
 <member>
  <name>Ernesto Guerrieri</name>
  <affiliation>Inso</affiliation>
 </member>
 <member>
  <name>Michael Hyman</name>
  <affiliation>Microsoft</affiliation>
 </member>
<member>
 <name>Setrag Khoshafian</name>
 <affiliation>Technology Deployment International (TDI)</affiliation>
</member>
<member>
 <name>Janet Koenig</name>
 <affiliation>Sun Microsystems</affiliation>
</member>
<member>
 <name>Ara Kullukian</name>
 <affiliation>Technology Deployment International (TDI)</affiliation>
</member>
<member>
 <name>Murata Makoto</name>
 <affiliation>Xerox</affiliation>
</member>
 <member>
  <name>Chris Olds</name>
  <affiliation>Wall Data</affiliation>
 </member>
<member>
 <name>Shriram Revankar</name>
 <affiliation>Xerox</affiliation>
</member>
 <member>
  <name>William Shea</name>
  <affiliation>Merrill Lynch</affiliation>
 </member>
 <member>
  <name>Ralph Swick</name>
  <affiliation>W3C</affiliation>
 </member>
 <member>
  <name>Tony Stewart</name>
  <affiliation>Rivcom</affiliation>
 </member>
 </orglist>
</div1>
<div1 id='open-issues'>
<head>Open Issues</head>
<open-issues/>
</div1>
<div1 id='revisions'>
<head>Revisions from Previous Draft</head>
<revisions/>
</div1>
</back>
</spec>
