You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14450 lines
591 KiB
14450 lines
591 KiB
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<title>XML Schema Part 2: Datatypes</title>
|
|
<style type="text/css">
|
|
code { font-family: monospace; font-size: 100%}
|
|
span.propdef { font-weight: bold; font-family: monospace }
|
|
span.termdef {color: #850021}
|
|
a.termref:visited, a.termref:link {font-family: sans-serif;
|
|
font-style: normal;
|
|
color: black;
|
|
text-decoration: none }
|
|
a.eltref:visited, a.eltref:link { font-family: sans-serif;
|
|
color: black;
|
|
text-decoration: none }
|
|
a.propref:visited, a.xpropref:visited, a.propref:link, a.xpropref:link { color: black; text-decoration: none;
|
|
font-family: sans-serif }
|
|
dl.props, dl.psvi {margin-bottom: .5em; margin-top: 0em}
|
|
div.localToc {margin-top: 0em; margin-left: 8ex}
|
|
div.toc1 {margin-left: 5ex}
|
|
div.toc2 {margin-left: 2ex}
|
|
div.tocLine{margin: 0em; text-indent: -6ex}
|
|
h3.withToc {margin-bottom: 0em}
|
|
div.constraintnote { margin-top: 1em }
|
|
div.constraint {
|
|
margin-left: 1em; }
|
|
|
|
div.constraintlist {
|
|
margin-left: 1em; margin-bottom: 0em
|
|
}
|
|
div.clnumber {
|
|
text-indent: -1em;
|
|
margin-top: 0em; margin-bottom: 0em }
|
|
|
|
div.schemaComp { border: 4px double gray;
|
|
margin: 0em 1em; padding: 0em }
|
|
div.compHeader { margin: 4px;
|
|
font-weight: bold }
|
|
span.schemaComp { color: #A52A2A }
|
|
div.compBody {
|
|
border-top-width: 4px;
|
|
border-top-style: double;
|
|
border-top-color: #d3d3d3;
|
|
padding: 4px ; margin: 0em}
|
|
|
|
div.psviDef { border: 4px double gray;
|
|
margin: 1em 1em; padding: 0em }
|
|
div.psviHeader { margin: 4px;
|
|
font-weight: bold }
|
|
span.psviDef { color: #A52A2A }
|
|
div.psviBody { border-top-width: 4px;
|
|
border-top-style: double;
|
|
border-top-color: #d3d3d3;
|
|
padding: 4px ; margin: 0em}
|
|
|
|
div.reprdef { border: 4px double gray;
|
|
margin: 0em 1em; padding: 0em }
|
|
div.reprHeader { margin: 4px;
|
|
font-weight: bold }
|
|
span.reprdef { color: #A52A2A }
|
|
div.reprBody, div.reprcomp, div.reprdep {
|
|
border-top-width: 4px;
|
|
border-top-style: double;
|
|
border-top-color: #d3d3d3;
|
|
padding: 4px ; margin: 0em}
|
|
table.reprcomp { margin-bottom: -.5em}
|
|
p.element-syntax-1 { font-family: monospace;
|
|
margin-top: 0em; margin-bottom: .5em }
|
|
p.element-syntax { font-family: monospace;
|
|
border-top-width: 1px;
|
|
border-top-style: solid;
|
|
border-top-color: #d3d3d3;
|
|
padding: 4px ; margin: 0em}
|
|
|
|
div.exampleInner pre { margin-left: 1em;
|
|
margin-top: 0em; margin-bottom: 0em}
|
|
div.exampleOuter {border: 4px double gray;
|
|
margin: 0em; padding: 0em}
|
|
div.exampleInner { background-color: #d5dee3;
|
|
border-top-width: 4px;
|
|
border-top-style: double;
|
|
border-top-color: #d3d3d3;
|
|
border-bottom-width: 4px;
|
|
border-bottom-style: double;
|
|
border-bottom-color: #d3d3d3;
|
|
padding: 4px; margin: 0em }
|
|
div.exampleWrapper { margin: 4px }
|
|
div.exampleHeader { font-weight: bold;
|
|
margin: 4px}
|
|
|
|
table.restricts { margin-top: 1em; margin-bottom: 1em; margin-left: -2em}
|
|
table.restricts th { margin-left: 0em }
|
|
table.ubc td, table.ubc th { font-size: smaller }
|
|
table.dtdemo th { text-align: center;
|
|
background-color: #d5dee3}
|
|
table.dtdemo pre { margin-left: 0em; margin-bottom: 0em}
|
|
table.dtdemo td {background-color: #bedce6}
|
|
code { font-family: monospace }
|
|
img { color: white; border: none }
|
|
span.nav { float: right}
|
|
span.arrow { font-style: normal; font-weight: bold }</style>
|
|
<link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-REC">
|
|
</head>
|
|
<body>
|
|
<div class="head">
|
|
<a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/WWW/w3c_home" alt="W3C" height="48" width="72"></a>
|
|
<h1>XML Schema Part 2: Datatypes</h1>
|
|
<h2>W3C Recommendation 02 May 2001</h2>
|
|
<dl>
|
|
<dt>This version:</dt>
|
|
<dd>
|
|
<a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/">http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/</a>
|
|
<br>
|
|
|
|
(in <a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.xml">XML</a> and
|
|
<a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html">HTML</a>, with a
|
|
<a href="http://www.w3.org/2001/XMLSchema.xsd">schema</a> and
|
|
<a href="http://www.w3.org/2001/XMLSchema.dtd">DTD</a> including datatype definitions,
|
|
as well as a <a href="http://www.w3.org/2001/XMLSchema-datatypes.xsd">schema</a>
|
|
for built-in datatypes only, in a separate namespace.)
|
|
</dd>
|
|
<dt>Latest version:</dt>
|
|
<dd>
|
|
<a href="http://www.w3.org/TR/xmlschema-2/">
|
|
http://www.w3.org/TR/xmlschema-2/
|
|
</a>
|
|
<br>
|
|
</dd>
|
|
<dt>Previous version:</dt>
|
|
<dd>
|
|
<a href="http://www.w3.org/TR/2001/PR-xmlschema-2-20010330/">
|
|
http://www.w3.org/TR/2001/PR-xmlschema-2-20010330/
|
|
</a>
|
|
<br>
|
|
</dd>
|
|
<dt>Editors:</dt>
|
|
<dd>
|
|
|
|
Paul V. Biron
|
|
(Kaiser Permanente, for Health Level Seven)
|
|
<a href="mailto:Paul.V.Biron@kp.org"><Paul.V.Biron@kp.org></a>
|
|
<br>
|
|
|
|
Ashok Malhotra
|
|
(Microsoft, formerly of IBM)
|
|
<a href="mailto:ashokma@microsoft.com"><ashokma@microsoft.com></a>
|
|
<br>
|
|
</dd>
|
|
</dl>
|
|
<p class="copyright">
|
|
<a href="http://www.w3.org/Consortium/Legal/ipr-notice-20000612#Copyright"> Copyright</a> ©2001 <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="http://www.lcs.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="http://www.inria.fr/"><abbr lang="fr" title="Institut National de Recherche en Informatique et Automatique">INRIA</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice-20000612#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice-20000612#W3C_Trademarks">trademark</a>, <a href="http://www.w3.org/Consortium/Legal/copyright-documents-19990405">document use</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-software-19980720">software licensing</a> rules apply.</p>
|
|
<hr title="Separator for header">
|
|
</div>
|
|
<h2>
|
|
<a name="abstract">Abstract</a>
|
|
</h2>
|
|
<p>
|
|
<i>XML Schema: Datatypes</i> is part 2 of the specification of the XML
|
|
Schema language. It defines facilities for defining datatypes to be used
|
|
in XML Schemas as well as other XML specifications.
|
|
The datatype language, which is itself represented in
|
|
XML 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>
|
|
<h2>
|
|
<a name="status">Status of this document</a>
|
|
</h2>
|
|
<p>
|
|
<i>This section describes the status of this document at the
|
|
time of its publication. Other documents may supersede this
|
|
document. The latest status of this document series is maintained at
|
|
the W3C.</i>
|
|
</p>
|
|
|
|
<p>This document has been reviewed by W3C Members and other interested
|
|
parties and has been endorsed by the Director as a W3C
|
|
Recommendation. It is a stable document and may be used as reference
|
|
material or cited as a normative reference from another
|
|
document. W3C's role in making the Recommendation is to draw attention
|
|
to the specification and to promote its widespread deployment. This
|
|
enhances the functionality and interoperability of the Web.</p>
|
|
|
|
<p>This document has been produced by the <a href="http://www.w3.org/XML/Schema">W3C XML Schema Working Group</a>
|
|
as part of the W3C <a href="http://www.w3.org/XML/">XML
|
|
Activity</a>. The goals of the XML Schema language are discussed in
|
|
the <a href="http://www.w3.org/TR/NOTE-xml-schema-req">XML Schema
|
|
Requirements</a> document. The authors of this document are the XML
|
|
Schema WG members. Different parts of this specification have
|
|
different editors.</p>
|
|
<p>
|
|
This version of this document incorporates some editorial changes
|
|
from earlier versions.
|
|
</p>
|
|
<p>
|
|
Please report errors in this document to <a href="mailto:www-xml-schema-comments@w3.org">www-xml-schema-comments@w3.org</a> (<a href="http://lists.w3.org/Archives/Public/www-xml-schema-comments/">archive</a>). The list of known errors in this specification is
|
|
available at <a href="http://www.w3.org/2001/05/xmlschema-errata">http://www.w3.org/2001/05/xmlschema-errata</a>.
|
|
</p>
|
|
<p>The English version of this specification is the only normative
|
|
version. Information about translations of this document is available
|
|
at <a href="http://www.w3.org/2001/05/xmlschema-translations">http://www.w3.org/2001/05/xmlschema-translations</a>.</p>
|
|
<p>A list of current W3C Recommendations and other technical documents can be found at
|
|
<a href="http://www.w3.org/TR/">http://www.w3.org/TR/</a>.</p>
|
|
|
|
<h2>
|
|
<a name="contents">Table of contents</a>
|
|
</h2>
|
|
<div class="toc1">
|
|
<div class="tocLine">1 <a href="#Intro">Introduction</a>
|
|
</div>
|
|
<div class="toc2">
|
|
<div class="tocLine">1.1 <a href="#purpose">Purpose</a>
|
|
</div>
|
|
<div class="tocLine">1.2 <a href="#requirements">Requirements</a>
|
|
</div>
|
|
<div class="tocLine">1.3 <a href="#scope">Scope</a>
|
|
</div>
|
|
<div class="tocLine">1.4 <a href="#terminology">Terminology</a>
|
|
</div>
|
|
<div class="tocLine">1.5 <a href="#constraints-and-contributions">Constraints and Contributions</a>
|
|
</div>
|
|
</div>
|
|
<div class="tocLine">2 <a href="#typesystem">Type System</a>
|
|
</div>
|
|
<div class="toc2">
|
|
<div class="tocLine">2.1 <a href="#datatype">Datatype</a>
|
|
</div>
|
|
<div class="tocLine">2.2 <a href="#value-space">Value space</a>
|
|
</div>
|
|
<div class="tocLine">2.3 <a href="#lexical-space">Lexical space</a>
|
|
</div>
|
|
<div class="tocLine">2.4 <a href="#facets">Facets</a>
|
|
</div>
|
|
<div class="tocLine">2.5 <a href="#datatype-dichotomies">Datatype dichotomies</a>
|
|
</div>
|
|
</div>
|
|
<div class="tocLine">3 <a href="#built-in-datatypes">Built-in datatypes</a>
|
|
</div>
|
|
<div class="toc2">
|
|
<div class="tocLine">3.1 <a href="#namespaces">Namespace considerations</a>
|
|
</div>
|
|
<div class="tocLine">3.2 <a href="#built-in-primitive-datatypes">Primitive datatypes</a>
|
|
</div>
|
|
<div class="tocLine">3.3 <a href="#built-in-derived">Derived datatypes</a>
|
|
</div>
|
|
</div>
|
|
<div class="tocLine">4 <a href="#datatype-components">Datatype components</a>
|
|
</div>
|
|
<div class="toc2">
|
|
<div class="tocLine">4.1 <a href="#rf-defn">Simple Type Definition</a>
|
|
</div>
|
|
<div class="tocLine">4.2 <a href="#rf-fund-facets">Fundamental Facets</a>
|
|
</div>
|
|
<div class="tocLine">4.3 <a href="#rf-facets">Constraining Facets</a>
|
|
</div>
|
|
</div>
|
|
<div class="tocLine">5 <a href="#conformance">Conformance</a>
|
|
</div>
|
|
<div class="toc2">
|
|
</div>
|
|
<h3>Appendices</h3>
|
|
<div class="tocLine">A <a href="#schema">Schema for Datatype Definitions (normative)</a>
|
|
</div>
|
|
<div class="tocLine">B <a href="#dtd-for-datatypeDefs">DTD for Datatype Definitions (non-normative)</a>
|
|
</div>
|
|
<div class="tocLine">C <a href="#section-Datatypes-and-Facets">Datatypes and Facets</a>
|
|
</div>
|
|
<div class="tocLine">D <a href="#isoformats">ISO 8601 Date and Time Formats</a>
|
|
</div>
|
|
<div class="tocLine">E <a href="#adding-durations-to-dateTimes">Adding durations to dateTimes</a>
|
|
</div>
|
|
<div class="tocLine">F <a href="#regexs">Regular Expressions</a>
|
|
</div>
|
|
<div class="tocLine">G <a href="#normative-glossary">Glossary (non-normative)</a>
|
|
</div>
|
|
<div class="tocLine">H <a href="#biblio">References</a>
|
|
</div>
|
|
<div class="tocLine">I <a href="#acknowledgments">Acknowledgements (non-normative)</a>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
<div class="div1">
|
|
<h2>
|
|
<a name="Intro"></a>1 Introduction</h2>
|
|
<div class="div2">
|
|
<h3>
|
|
<span class="nav"> <a href="#requirements" class="nav"><img alt="next sub-section" src="next.jpg"></a></span><a name="purpose"></a>1.1 Purpose</h3>
|
|
<p>
|
|
The <a href="#XML">[XML 1.0 (Second Edition)]</a> 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
|
|
<i>documents</i> and those transporting <i>data</i> in XML,
|
|
often require a higher degree of type checking to ensure robustness in
|
|
document understanding and data interchange.
|
|
</p>
|
|
<p>
|
|
The table below offers two typical examples of XML instances
|
|
in which datatypes are implicit: the instance on the left
|
|
represents a billing invoice, the instance on the
|
|
right a memo or perhaps an email message in XML.
|
|
</p>
|
|
<table class="dtdemo" border="1">
|
|
<thead>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Data oriented</th>
|
|
<th rowspan="1" colspan="1">Document oriented</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">
|
|
<pre><invoice>
|
|
<orderDate>1999-01-21</orderDate>
|
|
<shipDate>1999-01-25</shipDate>
|
|
<billingAddress>
|
|
<name>Ashok Malhotra</name>
|
|
<street>123 Microsoft Ave.</street>
|
|
<city>Hawthorne</city>
|
|
<state>NY</state>
|
|
<zip>10532-0000</zip>
|
|
</billingAddress>
|
|
<voice>555-1234</voice>
|
|
<fax>555-4321</fax>
|
|
</invoice></pre>
|
|
</td>
|
|
<td rowspan="1" colspan="1">
|
|
<pre><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></pre>
|
|
</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>
|
|
</div>
|
|
<div class="div2">
|
|
<h3>
|
|
<span class="nav"><a href="#purpose" class="nav"><img alt="previous sub-section" src="previous.jpg"></a> <a href="#scope" class="nav"><img alt="next sub-section" src="next.jpg"></a></span><a name="requirements"></a>1.2 Requirements</h3>
|
|
<p>
|
|
The <a href="#schema-requirements">[XML Schema Requirements]</a> document spells out
|
|
concrete requirements to be fulfilled by this specification,
|
|
which state that the XML Schema Language must:
|
|
</p>
|
|
<ol>
|
|
<li>
|
|
|
|
provide for primitive data typing, including byte, date,
|
|
integer, sequence, SQL and Java primitive datatypes, etc.;
|
|
|
|
</li>
|
|
<li>
|
|
|
|
define a type system that is adequate for import/export
|
|
from database systems (e.g., relational, object, OLAP);
|
|
|
|
</li>
|
|
<li>
|
|
|
|
distinguish requirements relating to lexical data representation
|
|
vs. those governing an underlying information set;
|
|
|
|
</li>
|
|
<li>
|
|
|
|
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).
|
|
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
<div class="div2">
|
|
<h3>
|
|
<span class="nav"><a href="#requirements" class="nav"><img alt="previous sub-section" src="previous.jpg"></a> <a href="#terminology" class="nav"><img alt="next sub-section" src="next.jpg"></a></span><a name="scope"></a>1.3 Scope</h3>
|
|
<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
|
|
<a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#dt-chardata">#PCDATA</a> and attribute
|
|
values of <a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#sec-attribute-types">various
|
|
types </a> in a DTD. It is the intention of this specification
|
|
that it be usable outside of the context of XML Schemas for a wide range
|
|
of other XML-related activities such as <a href="#XSL">[XSL]</a> and
|
|
<a href="#RDFSchema">[RDF Schema]</a>.
|
|
</p>
|
|
</div>
|
|
<div class="div2">
|
|
<h3>
|
|
<span class="nav"><a href="#scope" class="nav"><img alt="previous sub-section" src="previous.jpg"></a> <a href="#constraints-and-contributions" class="nav"><img alt="next sub-section" src="next.jpg"></a></span><a name="terminology"></a>1.4 Terminology</h3>
|
|
<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>
|
|
<dl>
|
|
|
|
<dt>
|
|
<b>
|
|
<span class="termdef"><a name="dt-compatibility">[Definition:] </a>
|
|
for compatibility</span>
|
|
</b>
|
|
</dt>
|
|
<dd>
|
|
|
|
A feature of this specification included solely to ensure that schemas
|
|
which use this feature remain compatible with <a href="#XML">[XML 1.0 (Second Edition)]</a>
|
|
|
|
</dd>
|
|
|
|
|
|
<dt>
|
|
<b>
|
|
<span class="termdef"><a name="dt-may">[Definition:] </a><b>may</b></span>
|
|
</b>
|
|
</dt>
|
|
<dd>
|
|
|
|
Conforming documents and processors are permitted to but need
|
|
not behave as described.
|
|
|
|
</dd>
|
|
|
|
|
|
<dt>
|
|
<b>
|
|
<span class="termdef"><a name="dt-match">[Definition:] </a><b>match</b></span>
|
|
</b>
|
|
</dt>
|
|
<dd>
|
|
|
|
(Of strings or names:) Two strings or names being compared must be
|
|
identical. Characters with multiple possible representations in ISO/IEC 10646 (e.g.
|
|
characters with both precomposed and base+diacritic forms) match only if they have
|
|
the same representation in both strings. No case folding is performed. (Of strings and
|
|
rules in the grammar:) A string matches a grammatical production if it belongs to the
|
|
language generated by that production.
|
|
|
|
</dd>
|
|
|
|
|
|
<dt>
|
|
<b>
|
|
<span class="termdef"><a name="dt-must">[Definition:] </a><b>must</b></span>
|
|
</b>
|
|
</dt>
|
|
<dd>
|
|
|
|
Conforming documents and processors are required to behave as
|
|
described; otherwise they are in <a href="#dt-error" class="termref"><span class="arrow">·</span>error<span class="arrow">·</span></a>.
|
|
|
|
</dd>
|
|
|
|
|
|
<dt>
|
|
<b>
|
|
<span class="termdef"><a name="dt-error">[Definition:] </a><b>error</b></span>
|
|
</b>
|
|
</dt>
|
|
<dd>
|
|
|
|
A violation of the rules of this specification; results are undefined.
|
|
Conforming software <a href="#dt-may" class="termref"><span class="arrow">·</span>may<span class="arrow">·</span></a> detect and report an
|
|
<b>error</b> and <a href="#dt-may" class="termref"><span class="arrow">·</span>may<span class="arrow">·</span></a> recover from it.
|
|
|
|
</dd>
|
|
|
|
</dl>
|
|
</div>
|
|
|
|
<div class="div2">
|
|
<h3>
|
|
<span class="nav"><a href="#terminology" class="nav"><img alt="previous sub-section" src="previous.jpg"></a> </span><a name="constraints-and-contributions"></a>1.5 Constraints and Contributions</h3>
|
|
<p>
|
|
This specification provides three different kinds of normative
|
|
statements about schema components, their representations in XML and
|
|
their contribution to the schema-validation of information items:
|
|
</p>
|
|
<dl>
|
|
|
|
<dt>
|
|
<b>
|
|
<span class="termdef"><a name="dt-cos">[Definition:] </a>
|
|
<b>Constraint on Schemas</b>
|
|
</span>
|
|
</b>
|
|
</dt>
|
|
<dd>
|
|
|
|
Constraints on the schema components themselves, i.e. conditions
|
|
components <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> satisfy to be components at all.
|
|
Largely to be found in <a href="#datatype-components">Datatype components (§4)</a>.
|
|
|
|
</dd>
|
|
|
|
|
|
<dt>
|
|
<b>
|
|
<span class="termdef"><a name="dt-src">[Definition:] </a>
|
|
<b>Schema Representation Constraint</b>
|
|
</span>
|
|
</b>
|
|
</dt>
|
|
<dd>
|
|
|
|
Constraints on the representation of schema components in XML. Some but
|
|
not all of these are expressed in <a href="#schema">Schema for Datatype Definitions (normative) (§A)</a> and
|
|
<a href="#dtd-for-datatypeDefs">DTD for Datatype Definitions (non-normative) (§B)</a>.
|
|
|
|
</dd>
|
|
|
|
|
|
<dt>
|
|
<b>
|
|
<span class="termdef"><a name="dt-cvc">[Definition:] </a>
|
|
<b>Validation Rule</b>
|
|
</span>
|
|
</b>
|
|
</dt>
|
|
<dd>
|
|
|
|
Constraints expressed by schema components which information
|
|
items <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> satisfy to be schema-valid. Largely
|
|
to be found in <a href="#datatype-components">Datatype components (§4)</a>.
|
|
|
|
</dd>
|
|
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
<div class="div1">
|
|
<h2>
|
|
<a name="typesystem"></a>2 Type System</h2>
|
|
<p>
|
|
This section describes the conceptual framework behind the type system
|
|
defined in this specification. The framework has been influenced by the
|
|
<a href="#ISO11404">[ISO 11404]</a> standard on language-independent datatypes as
|
|
well as the datatypes for <a href="#SQL">[SQL]</a> 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
|
|
<i>integer</i> and <i>date</i>. It is not the place of this
|
|
specification to define these abstract concepts; many other publications
|
|
provide excellent definitions.
|
|
</p>
|
|
<div class="div2">
|
|
<h3>
|
|
<span class="nav"> <a href="#value-space" class="nav"><img alt="next sub-section" src="next.jpg"></a></span><a name="datatype"></a>2.1 Datatype</h3>
|
|
<p>
|
|
<span class="termdef"><a name="dt-datatype">[Definition:] </a>In this specification,
|
|
a <b>datatype</b> is a 3-tuple, consisting of
|
|
a) a set of distinct values, called its <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>,
|
|
b) a set of lexical representations, called its
|
|
<a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>, and c) a set of <a href="#dt-facet" class="termref"><span class="arrow">·</span>facet<span class="arrow">·</span></a>s
|
|
that characterize properties of the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>,
|
|
individual values or lexical items.
|
|
</span>
|
|
</p>
|
|
</div>
|
|
<div class="div2">
|
|
<h3>
|
|
<span class="nav"><a href="#datatype" class="nav"><img alt="previous sub-section" src="previous.jpg"></a> <a href="#lexical-space" class="nav"><img alt="next sub-section" src="next.jpg"></a></span><a name="value-space"></a>2.2 Value space</h3>
|
|
<p>
|
|
<span class="termdef"><a name="dt-value-space">[Definition:] </a>A <b>value
|
|
space</b> is the set of values for a given datatype.
|
|
Each value in the <b>value space</b> of a datatype is denoted by
|
|
one or more literals in its <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of a given datatype can
|
|
be defined in one of the following ways:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
defined axiomatically from fundamental notions (intensional definition)
|
|
[see <a href="#dt-primitive" class="termref"><span class="arrow">·</span>primitive<span class="arrow">·</span></a>]
|
|
|
|
</li>
|
|
<li>
|
|
|
|
enumerated outright (extensional definition)
|
|
[see <a href="#dt-enumeration" class="termref"><span class="arrow">·</span>enumeration<span class="arrow">·</span></a>]
|
|
|
|
</li>
|
|
<li>
|
|
|
|
defined by restricting the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
an already defined datatype to a particular subset with a given set
|
|
of properties [see <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>]
|
|
|
|
</li>
|
|
<li>
|
|
|
|
defined as a combination of values from one or more already defined
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>(s) by a specific construction procedure
|
|
[see <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> and <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a>]
|
|
|
|
</li>
|
|
</ul>
|
|
<p>
|
|
</p>
|
|
<p>
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s have certain properties. For example,
|
|
they always have the property of <a href="#dt-cardinality" class="termref"><span class="arrow">·</span>cardinality<span class="arrow">·</span></a>,
|
|
some definition of <i>equality</i>
|
|
and might be <a href="#dt-ordered" class="termref"><span class="arrow">·</span>ordered<span class="arrow">·</span></a>, by which individual
|
|
values within the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> can be compared to
|
|
one another. The properties of <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s that
|
|
are recognized by this specification are defined in
|
|
<a href="#fundamental-facets">Fundamental facets (§2.4.1)</a>.
|
|
</p>
|
|
</div>
|
|
<div class="div2">
|
|
<h3 class="withToc">
|
|
<span class="nav"><a href="#value-space" class="nav"><img alt="previous sub-section" src="previous.jpg"></a> <a href="#facets" class="nav"><img alt="next sub-section" src="next.jpg"></a></span><a name="lexical-space"></a>2.3 Lexical space</h3>
|
|
<p>
|
|
In addition to its <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>, each datatype also
|
|
has a lexical space.
|
|
</p>
|
|
<p>
|
|
<span class="termdef"><a name="dt-lexical-space">[Definition:] </a>A
|
|
<b>lexical space</b> is the set of valid <i>literals</i>
|
|
for a datatype.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
For example, "100" and "1.0E2" are two different literals from the
|
|
<a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <a href="#float">float</a> 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>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
The literals in the <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>s defined in this specification
|
|
have the following characteristics:
|
|
|
|
<dl>
|
|
|
|
<dt>
|
|
<b>
|
|
Interoperability:
|
|
</b>
|
|
</dt>
|
|
<dd>
|
|
|
|
The number of literals for each value has been kept small; for many
|
|
datatypes there is a one-to-one mapping between literals and values.
|
|
This makes it easy to exchange the values between different systems.
|
|
In many cases, conversion from locale-dependent representations will
|
|
be required on both the originator and the recipient side, both for
|
|
computer processing and for interaction with humans.
|
|
|
|
</dd>
|
|
|
|
|
|
<dt>
|
|
<b>
|
|
Basic readability:
|
|
</b>
|
|
</dt>
|
|
<dd>
|
|
|
|
Textual, rather than binary, literals are used.
|
|
This makes hand editing, debugging, and similar activities possible.
|
|
|
|
</dd>
|
|
|
|
|
|
<dt>
|
|
<b>
|
|
Ease of parsing and serializing:
|
|
</b>
|
|
</dt>
|
|
<dd>
|
|
|
|
Where possible, literals correspond to those found in common
|
|
programming languages and libraries.
|
|
|
|
</dd>
|
|
|
|
</dl>
|
|
</blockquote>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="canonical-lexical-representation"></a>2.3.1 Canonical Lexical Representation</h4>
|
|
<p>
|
|
While the datatypes defined in this specification have, for the most part,
|
|
a single lexical representation i.e. each value in the datatype's
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is denoted by a single literal in its
|
|
<a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>, this is not always the case. The
|
|
example in the previous section showed two literals for the datatype
|
|
<a href="#float">float</a> which denote the same value. Similarly, there
|
|
<a href="#dt-may" class="termref"><span class="arrow">·</span>may<span class="arrow">·</span></a> be
|
|
several literals for one of the date or time datatypes that denote the
|
|
same value using different timezone indicators.
|
|
</p>
|
|
<p>
|
|
<span class="termdef"><a name="dt-canonical-representation">[Definition:] </a>A <b>canonical lexical representation</b>
|
|
is a set of literals from among the valid set of literals
|
|
for a datatype such that there is a one-to-one mapping between literals
|
|
in the <b>canonical lexical representation</b> and
|
|
values in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div class="div2">
|
|
<h3 class="withToc">
|
|
<span class="nav"><a href="#lexical-space" class="nav"><img alt="previous sub-section" src="previous.jpg"></a> <a href="#datatype-dichotomies" class="nav"><img alt="next sub-section" src="next.jpg"></a></span><a name="facets"></a>2.4 Facets</h3>
|
|
<div class="localToc">
|
|
<div class="tocLine">2.4.1 <a href="#fundamental-facets">Fundamental facets</a>
|
|
</div>
|
|
<div class="tocLine">2.4.2 <a href="#non-fundamental">Constraining or Non-fundamental facets</a>
|
|
</div>
|
|
</div>
|
|
<p>
|
|
<span class="termdef"><a name="dt-facet">[Definition:] </a>A <b>facet</b> is a single
|
|
defining aspect of a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>. Generally
|
|
speaking, each facet characterizes a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
along independent axes or dimensions.</span>
|
|
</p>
|
|
<p>
|
|
The facets of a datatype serve to distinguish those aspects of
|
|
one datatype which <i>differ</i> 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 <i>synthesis</i> of facet values which together determine the
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> and properties of the datatype.
|
|
</p>
|
|
<p>
|
|
Facets are of two types: <i>fundamental</i> facets that define
|
|
the datatype and <i>non-fundamental</i> or <i>constraining
|
|
</i> facets that constrain the permitted values of a datatype.
|
|
</p>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="fundamental-facets"></a>2.4.1 Fundamental facets</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-fundamental-facet">[Definition:] </a>
|
|
A <b>fundamental facet</b> is an abstract property which
|
|
serves to semantically characterize the values in a
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
All <b>fundamental facets</b> are fully described in
|
|
<a href="#rf-fund-facets">Fundamental Facets (§4.2)</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="non-fundamental"></a>2.4.2 Constraining or Non-fundamental facets</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-constraining-facet">[Definition:] </a>A
|
|
<b>constraining facet</b> is an optional property that can be
|
|
applied to a datatype to constrain its <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
Constraining the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> consequently constrains
|
|
the <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>. Adding
|
|
<a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s to a <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a>
|
|
is described in <a href="#derivation-by-restriction">Derivation by restriction (§4.1.2.1)</a>.
|
|
</p>
|
|
<p>
|
|
All <b>constraining facets</b> are fully described in
|
|
<a href="#rf-facets">Constraining Facets (§4.3)</a>.
|
|
</p>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div2">
|
|
<h3 class="withToc">
|
|
<span class="nav"><a href="#facets" class="nav"><img alt="previous sub-section" src="previous.jpg"></a> </span><a name="datatype-dichotomies"></a>2.5 Datatype dichotomies</h3>
|
|
<div class="localToc">
|
|
<div class="tocLine">2.5.1 <a href="#atomic-vs-list">Atomic vs. list vs. union datatypes</a>
|
|
</div>
|
|
<div class="tocLine">2.5.2 <a href="#primitive-vs-derived">Primitive vs. derived datatypes</a>
|
|
</div>
|
|
<div class="tocLine">2.5.3 <a href="#built-in-vs-user-derived">Built-in vs. user-derived datatypes</a>
|
|
</div>
|
|
</div>
|
|
<p>
|
|
It is useful to categorize the datatypes defined in this specification
|
|
along various dimensions, forming a set of characterization dichotomies.
|
|
</p>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="atomic-vs-list"></a>2.5.1 Atomic vs. list vs. union datatypes</h4>
|
|
<p>
|
|
The first distinction to be made is that between
|
|
<a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a>, <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> and <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a>
|
|
datatypes.
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
<span class="termdef"><a name="dt-atomic">[Definition:] </a><b>Atomic</b> datatypes
|
|
are those having values which are regarded by this specification as
|
|
being indivisible.
|
|
</span>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<span class="termdef"><a name="dt-list">[Definition:] </a><b>List</b>
|
|
datatypes are those having values each of which consists of a
|
|
finite-length (possibly empty) sequence of values of an
|
|
<a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> datatype.
|
|
</span>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<span class="termdef"><a name="dt-union">[Definition:] </a><b>Union</b>
|
|
datatypes are those whose <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s and
|
|
<a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>s are the union of
|
|
the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s and
|
|
<a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>s of one or more other datatypes.
|
|
</span>
|
|
|
|
</li>
|
|
</ul>
|
|
<p>
|
|
For example, a single token which <a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a>es
|
|
<a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-Nmtoken">Nmtoken</a> from
|
|
<a href="#XML">[XML 1.0 (Second Edition)]</a> could be the value of an <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a>
|
|
datatype (<a href="#NMTOKEN">NMTOKEN</a>); while a sequence of such tokens
|
|
could be the value of a <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype
|
|
(<a href="#NMTOKENS">NMTOKENS</a>).
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="atomic"></a>2.5.1.1 Atomic datatypes</h5>
|
|
<p>
|
|
<a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> datatypes can be either
|
|
<a href="#dt-primitive" class="termref"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> or <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>. The
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of an <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> datatype
|
|
is a set of "atomic" values, which for the purposes of this specification,
|
|
are not further decomposable. The <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of
|
|
an <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> datatype is a set of <i>literals</i>
|
|
whose internal structure is specific to the datatype in question.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="list-datatypes"></a>2.5.1.2 List datatypes</h5>
|
|
|
|
<p>
|
|
Several type systems (such as the one described in
|
|
<a href="#ISO11404">[ISO 11404]</a>) treat <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatypes as
|
|
special cases of the more general notions of aggregate or collection
|
|
datatypes.
|
|
</p>
|
|
<p>
|
|
<a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatypes are always <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>.
|
|
The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of a <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a>
|
|
datatype is a set of finite-length sequences of <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a>
|
|
values. The <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of a
|
|
<a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype is a set of literals whose internal
|
|
structure is a white space separated sequence of literals of the
|
|
<a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> datatype of the items in the
|
|
<a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a>
|
|
(where whitespace <a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a>es
|
|
<a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-S">S</a> in <a href="#XML">[XML 1.0 (Second Edition)]</a>).
|
|
</p>
|
|
<p>
|
|
<span class="termdef"><a name="dt-itemType">[Definition:] </a>
|
|
The <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> datatype that participates in the
|
|
definition of a <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype is known as the
|
|
<b>itemType</b> of that <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype.
|
|
</span>
|
|
</p>
|
|
<div class="exampleOuter">
|
|
<div class="exampleHeader">Example</div>
|
|
<div class="exampleInner">
|
|
<pre>
|
|
<simpleType name='sizes'>
|
|
<list itemType='decimal'/>
|
|
</simpleType>
|
|
</pre>
|
|
<pre>
|
|
<cerealSizes xsi:type='sizes'> 8 10.5 12 </cerealSizes>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<p>
|
|
A <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype can be <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
from an <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> datatype whose
|
|
<a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> allows whitespace (such as <a href="#string">string</a>
|
|
or <a href="#anyURI">anyURI</a>). In such a case, regardless of the input, list items
|
|
will be separated at whitespace boundaries.
|
|
</p>
|
|
|
|
<div class="exampleOuter">
|
|
<div class="exampleHeader">Example</div>
|
|
<div class="exampleInner">
|
|
<pre>
|
|
<simpleType name='listOfString'>
|
|
<list itemType='string'/>
|
|
</simpleType>
|
|
</pre>
|
|
<pre>
|
|
<someElement xsi:type='listOfString'>
|
|
this is not list item 1
|
|
this is not list item 2
|
|
this is not list item 3
|
|
</someElement>
|
|
</pre>
|
|
</div>
|
|
<div class="exampleWrapper">
|
|
In the above example, the value of the <i>someElement</i> element
|
|
is not a <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> of <a href="#dt-length" class="termref"><span class="arrow">·</span>length<span class="arrow">·</span></a> 3;
|
|
rather, it is a <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> of <a href="#dt-length" class="termref"><span class="arrow">·</span>length<span class="arrow">·</span></a>
|
|
18.
|
|
</div>
|
|
</div>
|
|
|
|
<p>
|
|
When a datatype is <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from a
|
|
<a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype, the following
|
|
<a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s apply:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#dt-length" class="termref"><span class="arrow">·</span>length<span class="arrow">·</span></a>
|
|
</li>
|
|
<li>
|
|
<a href="#dt-maxLength" class="termref"><span class="arrow">·</span>maxLength<span class="arrow">·</span></a>
|
|
</li>
|
|
<li>
|
|
<a href="#dt-minLength" class="termref"><span class="arrow">·</span>minLength<span class="arrow">·</span></a>
|
|
</li>
|
|
<li>
|
|
<a href="#dt-enumeration" class="termref"><span class="arrow">·</span>enumeration<span class="arrow">·</span></a>
|
|
</li>
|
|
<li>
|
|
<a href="#dt-pattern" class="termref"><span class="arrow">·</span>pattern<span class="arrow">·</span></a>
|
|
</li>
|
|
<li>
|
|
<a href="#dt-whiteSpace" class="termref"><span class="arrow">·</span>whiteSpace<span class="arrow">·</span></a>
|
|
</li>
|
|
</ul>
|
|
<p>
|
|
For each of <a href="#dt-length" class="termref"><span class="arrow">·</span>length<span class="arrow">·</span></a>, <a href="#dt-maxLength" class="termref"><span class="arrow">·</span>maxLength<span class="arrow">·</span></a>
|
|
and <a href="#dt-minLength" class="termref"><span class="arrow">·</span>minLength<span class="arrow">·</span></a>, the <i>unit of length</i> is
|
|
measured in number of list items. The value of <a href="#dt-whiteSpace" class="termref"><span class="arrow">·</span>whiteSpace<span class="arrow">·</span></a>
|
|
is fixed to the value <i>collapse</i>.
|
|
</p>
|
|
<p>
|
|
The <a href="#canonical-lexical-representation">canonical-lexical-representation</a> for the
|
|
<a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype is defined as the lexical form in which
|
|
each item in the <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> has the canonical lexical
|
|
representation of its <a href="#dt-itemType" class="termref"><span class="arrow">·</span>itemType<span class="arrow">·</span></a>.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="union-datatypes"></a>2.5.1.3 Union datatypes</h5>
|
|
<p>
|
|
The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> and <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>
|
|
of a <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a> datatype are the union of the
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s and <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>s of
|
|
its <a href="#dt-memberTypes" class="termref"><span class="arrow">·</span>memberTypes<span class="arrow">·</span></a>.
|
|
<a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a> datatypes are always <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>.
|
|
Currently, there are no <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a>
|
|
datatypes.
|
|
</p>
|
|
<div class="exampleOuter">
|
|
<div class="exampleHeader">Example</div>
|
|
<div class="exampleWrapper">
|
|
A prototypical example of a <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a> type is the
|
|
<a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#p-max_occurs">maxOccurs attribute</a> on the
|
|
<a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-element">element element</a>
|
|
in XML Schema itself: it is a union of nonNegativeInteger
|
|
and an enumeration with the single member, the string "unbounded", as shown below.
|
|
</div>
|
|
<div class="exampleInner">
|
|
<pre>
|
|
<attributeGroup name="occurs">
|
|
<attribute name="minOccurs" type="nonNegativeInteger"
|
|
default="1"/>
|
|
<attribute name="maxOccurs">
|
|
<simpleType>
|
|
<union>
|
|
<simpleType>
|
|
<restriction base='nonNegativeInteger'/>
|
|
</simpleType>
|
|
<simpleType>
|
|
<restriction base='string'>
|
|
<enumeration value='unbounded'/>
|
|
</restriction>
|
|
</simpleType>
|
|
</union>
|
|
</simpleType>
|
|
</attribute>
|
|
</attributeGroup>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<p>
|
|
Any number (greater than 1) of <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> or <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a>
|
|
<a href="#dt-datatype" class="termref"><span class="arrow">·</span>datatype<span class="arrow">·</span></a>s can participate in a <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a> type.
|
|
</p>
|
|
<p>
|
|
<span class="termdef"><a name="dt-memberTypes">[Definition:] </a>
|
|
The datatypes that participate in the
|
|
definition of a <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a> datatype are known as the
|
|
<b>memberTypes</b> of that <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a> datatype.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
The order in which the <a href="#dt-memberTypes" class="termref"><span class="arrow">·</span>memberTypes<span class="arrow">·</span></a> are specified in the
|
|
definition (that is, the order of the <simpleType> children of the <union>
|
|
element, or the order of the <a href="#QName">QName</a>s in the <i>memberTypes</i>
|
|
attribute) is significant.
|
|
During validation, an element or attribute's value is validated against the
|
|
<a href="#dt-memberTypes" class="termref"><span class="arrow">·</span>memberTypes<span class="arrow">·</span></a> in the order in which they appear in the
|
|
definition until a match is found. The evaluation order can be overridden
|
|
with the use of <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#xsi_type">xsi:type</a>.
|
|
</p>
|
|
<div class="exampleOuter">
|
|
<div class="exampleHeader">Example</div>
|
|
<div class="exampleWrapper">
|
|
For example, given the definition below, the first instance of the <size> element
|
|
validates correctly as an <a href="#integer">integer (§3.3.13)</a>, the second and third as
|
|
<a href="#string">string (§3.2.1)</a>.
|
|
</div>
|
|
<div class="exampleInner">
|
|
<pre>
|
|
<xsd:element name='size'>
|
|
<xsd:simpleType>
|
|
<xsd:union>
|
|
<xsd:simpleType>
|
|
<xsd:restriction base='integer'/>
|
|
</xsd:simpleType>
|
|
<xsd:simpleType>
|
|
<xsd:restriction base='string'/>
|
|
</xsd:simpleType>
|
|
</xsd:union>
|
|
</xsd:simpleType>
|
|
</xsd:element>
|
|
</pre>
|
|
<pre>
|
|
<size>1</size>
|
|
<size>large</size>
|
|
<size xsi:type='xsd:string'>1</size>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<p> The <a href="#canonical-lexical-representation">canonical-lexical-representation</a> for a
|
|
<a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a> datatype is defined as the lexical form in which
|
|
the values have the canonical lexical representation
|
|
of the appropriate <a href="#dt-memberTypes" class="termref"><span class="arrow">·</span>memberTypes<span class="arrow">·</span></a>.</p>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
A datatype which is <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> in this specification
|
|
need not be an "atomic" datatype in any programming language used to
|
|
implement this specification. Likewise, a datatype which is a
|
|
<a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> in this specification need not be a "list"
|
|
datatype in any programming language used to implement this specification.
|
|
Furthermore, a datatype which is a <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a> in this
|
|
specification need not be a "union" datatype in any programming
|
|
language used to implement this specification.
|
|
|
|
</blockquote>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="primitive-vs-derived"></a>2.5.2 Primitive vs. derived datatypes</h4>
|
|
<p>
|
|
Next, we distinguish between <a href="#dt-primitive" class="termref"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> and
|
|
<a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> datatypes.
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
<span class="termdef"><a name="dt-primitive">[Definition:] </a><b>Primitive</b>
|
|
datatypes are those that are not defined in terms of other datatypes;
|
|
they exist <i>ab initio</i>.
|
|
</span>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<span class="termdef"><a name="dt-derived">[Definition:] </a><b>Derived</b>
|
|
datatypes are those that are defined in terms of other datatypes.
|
|
</span>
|
|
|
|
</li>
|
|
</ul>
|
|
<p>
|
|
For example, in this specification, <a href="#float">float</a> is a well-defined
|
|
mathematical
|
|
|
|
concept that cannot be defined in terms of other datatypes, while
|
|
a <a href="#integer">integer</a> is a special case of the more general datatype
|
|
<a href="#decimal">decimal</a>.
|
|
</p>
|
|
<p>
|
|
<span class="termdef"><a name="dt-anySimpleType">[Definition:] </a>
|
|
There exists a conceptual datatype, whose name is <b>anySimpleType</b>,
|
|
that is the simple version of the
|
|
<a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-urType">ur-type definition</a> from
|
|
<a href="#structural-schemas">[XML Schema Part 1: Structures]</a>. <b>anySimpleType</b> can be
|
|
considered as the <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of all <a href="#dt-primitive" class="termref"><span class="arrow">·</span>primitive<span class="arrow">·</span></a>
|
|
types. The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>anySimpleType</b>
|
|
can be considered to be the <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a> of the
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s of all <a href="#dt-primitive" class="termref"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> datatypes.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
The datatypes defined by this specification fall into both
|
|
the <a href="#dt-primitive" class="termref"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> and <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
categories. It is felt that a judiciously chosen set of
|
|
<a href="#dt-primitive" class="termref"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> 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
|
|
<a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>.
|
|
</p>
|
|
<p>
|
|
In the example above, <a href="#integer">integer</a> is <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
from <a href="#decimal">decimal</a>.
|
|
</p>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
A datatype which is <a href="#dt-primitive" class="termref"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> in this specification
|
|
need not be a "primitive" datatype in any programming language used to
|
|
implement this specification. Likewise, a datatype which is
|
|
<a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> in this specification need not be a
|
|
"derived" datatype in any programming language used to implement
|
|
this specification.
|
|
|
|
</blockquote>
|
|
<p>
|
|
As described in more detail in <a href="#xr-defn">XML Representation of Simple Type Definition Schema Components (§4.1.2)</a>,
|
|
each <a href="#dt-user-derived" class="termref"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a> datatype <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a>
|
|
be defined in terms of another datatype in one of three ways: 1) by assigning
|
|
<a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s which serve to <i>restrict</i> the
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the <a href="#dt-user-derived" class="termref"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a>
|
|
datatype to a subset of that of the <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a>; 2) by creating
|
|
a <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype whose <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
consists of finite-length sequences of values of its
|
|
<a href="#dt-itemType" class="termref"><span class="arrow">·</span>itemType<span class="arrow">·</span></a>; or 3) by creating a <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a>
|
|
datatype whose <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> consists of the union of the
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> its <a href="#dt-memberTypes" class="termref"><span class="arrow">·</span>memberTypes<span class="arrow">·</span></a>.
|
|
</p>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="restriction"></a>2.5.2.1 Derived by restriction</h5>
|
|
<p>
|
|
|
|
<span class="termdef"><a name="dt-restriction">[Definition:] </a>A datatype is said to be
|
|
<a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> by <b>restriction</b> from another datatype
|
|
when values for zero or more <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s are specified
|
|
that serve to constrain its <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> and/or its
|
|
<a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> to a subset of those of its
|
|
<a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
<span class="termdef"><a name="dt-basetype">[Definition:] </a>Every
|
|
datatype that is <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> by <b>restriction</b>
|
|
is defined in terms of an existing datatype, referred to as its
|
|
<b>base type</b>. <b>base type</b>s can be either
|
|
<a href="#dt-primitive" class="termref"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> or <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="list"></a>2.5.2.2 Derived by list</h5>
|
|
<p>
|
|
A <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype can be <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
from another datatype (its <a href="#dt-itemType" class="termref"><span class="arrow">·</span>itemType<span class="arrow">·</span></a>) by creating
|
|
a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> that consists of a finite-length sequence
|
|
of values of its <a href="#dt-itemType" class="termref"><span class="arrow">·</span>itemType<span class="arrow">·</span></a>.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="union"></a>2.5.2.3 Derived by union</h5>
|
|
<p>
|
|
One datatype can be <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from one or more
|
|
datatypes by <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a>ing their <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s
|
|
and, consequently, their <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>s.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="built-in-vs-user-derived"></a>2.5.3 Built-in vs. user-derived datatypes</h4>
|
|
<ul>
|
|
<li>
|
|
|
|
<span class="termdef"><a name="dt-built-in">[Definition:] </a><b>Built-in</b>
|
|
datatypes are those which are defined in this specification,
|
|
and can be either <a href="#dt-primitive" class="termref"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> or
|
|
<a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>;
|
|
</span>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<span class="termdef"><a name="dt-user-derived">[Definition:] </a>
|
|
<b>User-derived</b> datatypes are those <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
datatypes that are defined by individual schema designers.
|
|
</span>
|
|
|
|
</li>
|
|
</ul>
|
|
<p>
|
|
Conceptually there is no difference between the
|
|
<a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> datatypes
|
|
included in this specification and the <a href="#dt-user-derived" class="termref"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a>
|
|
datatypes which will be created by individual schema designers.
|
|
The <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> 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
|
|
<a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> datatypes in this specification serves to
|
|
demonstrate the mechanics and utility of the datatype generation
|
|
facilities of this specification.
|
|
</p>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
A datatype which is <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> in this specification
|
|
need not be a "built-in" datatype in any programming language used
|
|
to implement this specification. Likewise, a datatype which is
|
|
<a href="#dt-user-derived" class="termref"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a> in this specification need not
|
|
be a "user-derived" datatype in any programming language used to
|
|
implement this specification.
|
|
|
|
</blockquote>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="div1">
|
|
<h2>
|
|
<a name="built-in-datatypes"></a>3 Built-in datatypes</h2>
|
|
<img src="type-hierarchy.gif" alt="Diagram of built-in type hierarchy" usemap="#typeImage" border="0">
|
|
|
|
<map name="typeImage">
|
|
<area shape="rect" alt="anyType" coords="283,1,349,21" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-urType" title="anyType">
|
|
<area shape="rect" alt="anySimpleType" coords="257,62,374,82" href="#dt-anySimpleType" title="anySimpleType">
|
|
<area shape="rect" alt="duration" coords="51,133,124,154" href="#duration" title="duration">
|
|
<area shape="rect" alt="dateTime" coords="130,133,202,154" href="#dateTime" title="dateTime">
|
|
<area shape="rect" alt="time" coords="207,133,246,154" href="#time" title="time">
|
|
<area shape="rect" alt="date" coords="251,133,291,154" href="#date" title="date">
|
|
<area shape="rect" alt="gYearMonth" coords="296,133,386,154" href="#gYearMonth" title="gYearMonth">
|
|
<area shape="rect" alt="gYear" coords="391,133,438,154" href="#gYear" title="gYear">
|
|
<area shape="rect" alt="gMonthDay" coords="443,133,523,154" href="#gMonthDay" title="gMonthDay">
|
|
<area shape="rect" alt="gDay" coords="528,133,567,154" href="#gDay" title="gDay">
|
|
<area shape="rect" alt="gMonth" coords="572,133,627,154" href="#gMonth" title="gMonth">
|
|
<area shape="rect" alt="boolean" coords="37,193,103,214" href="#boolean" title="boolean">
|
|
<area shape="rect" alt="base64Binary" coords="108,193,215,214" href="#base64Binary" title="base64Binary">
|
|
<area shape="rect" alt="hexBinary" coords="220,193,301,214" href="#hexBinary" title="hexBinary">
|
|
<area shape="rect" alt="float" coords="306,193,355,214" href="#float" title="float">
|
|
<area shape="rect" alt="double" coords="375,193,431,214" href="#double" title="double">
|
|
<area shape="rect" alt="anyURI" coords="437,193,492,214" href="#anyURI" title="anyURI">
|
|
<area shape="rect" alt="QName" coords="498,193,547,214" href="#QName" title="QName">
|
|
<area shape="rect" alt="NOTATION" coords="554,193,627,214" href="#NOTATION" title="NOTATION">
|
|
<area shape="rect" alt="string" coords="2,234,58,254" href="#string" title="string">
|
|
<area shape="rect" alt="decimal" coords="337,234,393,254" href="#decimal" title="decimal">
|
|
<area shape="rect" alt="normalizedString" coords="2,274,142,295" href="#normalizedString" title="normalizedString">
|
|
<area shape="rect" alt="integer" coords="333,274,397,295" href="#integer" title="integer">
|
|
<area shape="rect" alt="token" coords="2,336,49,356" href="#token" title="token">
|
|
<area shape="rect" alt="nonPositiveInteger" coords="182,336,340,356" href="#nonPositiveInteger" title="nonPositiveInteger">
|
|
<area shape="rect" alt="long" coords="345,336,384,356" href="#long" title="long">
|
|
<area shape="rect" alt="nonNegativeInteger" coords="389,336,546,356" href="#nonNegativeInteger" title="nonNegativeInteger">
|
|
<area shape="rect" alt="language" coords="2,397,74,417" href="#language" title="language">
|
|
<area shape="rect" alt="Name" coords="80,397,119,417" href="#Name" title="Name">
|
|
<area shape="rect" alt="NMTOKEN" coords="135,397,199,417" href="#NMTOKEN" title="NMTOKEN">
|
|
<area shape="rect" alt="negativeInteger" coords="212,397,345,417" href="#negativeInteger" title="negativeInteger">
|
|
<area shape="rect" alt="int" coords="350,397,380,417" href="#int" title="int">
|
|
<area shape="rect" alt="unsignedLong" coords="385,397,492,417" href="#unsignedLong" title="unsignedLong">
|
|
<area shape="rect" alt="positiveInteger" coords="497,397,627,417" href="#positiveInteger" title="positiveInteger">
|
|
<area shape="rect" alt="NCName" coords="72,437,127,458" href="#NCName" title="NCName">
|
|
<area shape="rect" alt="NMTOKENS" coords="132,437,205,458" href="#NMTOKENS" title="NMTOKENS">
|
|
<area shape="rect" alt="short" coords="342,437,389,458" href="#short" title="short">
|
|
<area shape="rect" alt="unsignedInt" coords="399,437,496,458" href="#unsignedInt" title="unsignedInt">
|
|
<area shape="rect" alt="ID" coords="18,498,39,518" href="#ID" title="ID">
|
|
<area shape="rect" alt="IDREF" coords="76,498,123,518" href="#IDREF" title="IDREF">
|
|
<area shape="rect" alt="ENTITY" coords="140,498,196,518" href="#ENTITY" title="ENTITY">
|
|
<area shape="rect" alt="byte" coords="345,498,385,518" href="#byte" title="byte">
|
|
<area shape="rect" alt="unsignedShort" coords="390,498,504,518" href="#unsignedShort" title="unsignedShort">
|
|
<area shape="rect" alt="IDREFS" coords="72,539,127,559" href="#IDREFS" title="IDREFS">
|
|
<area shape="rect" alt="ENTITIES" coords="132,539,204,559" href="#ENTITIES" title="ENTITIES">
|
|
<area shape="rect" alt="unsignedByte" coords="394,539,500,559" href="#unsignedByte" title="unsignedByte">
|
|
<area shape="default" nohref alt="Built-in Datatypes" title="Built-in Datatypes">
|
|
</map>
|
|
|
|
<p>
|
|
Each built-in datatype in this specification (both
|
|
<a href="#dt-primitive" class="termref"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> and
|
|
<a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>) can be uniquely addressed via a
|
|
URI Reference constructed as follows:
|
|
</p>
|
|
<ol>
|
|
<li>the base URI is the URI of the XML Schema namespace</li>
|
|
<li>the fragment identifier is the name of the datatype</li>
|
|
</ol>
|
|
<p>
|
|
For example, to address the <a href="#int">int</a> datatype, the URI is:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<code>http://www.w3.org/2001/XMLSchema#int</code>
|
|
</li>
|
|
</ul>
|
|
<p>
|
|
Additionally, each facet definition element can be uniquely
|
|
addressed via a URI constructed as follows:
|
|
</p>
|
|
<ol>
|
|
<li>the base URI is the URI of the XML Schema namespace</li>
|
|
<li>the fragment identifier is the name of the facet</li>
|
|
</ol>
|
|
<p>
|
|
For example, to address the maxInclusive facet, the URI is:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<code>http://www.w3.org/2001/XMLSchema#maxInclusive</code>
|
|
</li>
|
|
</ul>
|
|
<p>
|
|
Additionally, each facet usage in a built-in datatype definition
|
|
can be uniquely addressed via a URI constructed as follows:
|
|
</p>
|
|
<ol>
|
|
<li>the base URI is the URI of the XML Schema namespace</li>
|
|
<li>the fragment identifier is the name of the datatype, followed
|
|
by a period (".") followed by the name of the facet</li>
|
|
</ol>
|
|
<p>
|
|
For example, to address the usage of the maxInclusive facet in
|
|
the definition of int, the URI is:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<code>http://www.w3.org/2001/XMLSchema#int.maxInclusive</code>
|
|
</li>
|
|
</ul>
|
|
<div class="div2">
|
|
<h3>
|
|
<span class="nav"> <a href="#built-in-primitive-datatypes" class="nav"><img alt="next sub-section" src="next.jpg"></a></span><a name="namespaces"></a>3.1 Namespace considerations</h3>
|
|
<p>
|
|
The <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> datatypes defined by this specification
|
|
are designed to be used with the XML Schema definition language as well as other
|
|
XML specifications.
|
|
To facilitate usage within the XML Schema definition language, the <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes in this specification have the namespace name:
|
|
</p>
|
|
<ul>
|
|
<li>http://www.w3.org/2001/XMLSchema</li>
|
|
</ul>
|
|
<p>
|
|
To facilitate usage in specifications other than the XML Schema definition language,
|
|
such as those that do not want to know anything about aspects of the
|
|
XML Schema definition language other than the datatypes, each <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatype is also defined in the namespace whose URI is:
|
|
</p>
|
|
<ul>
|
|
<li>http://www.w3.org/2001/XMLSchema-datatypes</li>
|
|
</ul>
|
|
<p>
|
|
This applies to both
|
|
<a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> <a href="#dt-primitive" class="termref"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> and
|
|
<a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> datatypes.
|
|
</p>
|
|
<p>
|
|
Each <a href="#dt-user-derived" class="termref"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a> datatype is also associated with a
|
|
unique namespace. However, <a href="#dt-user-derived" class="termref"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a> datatypes
|
|
do not come from the namespace defined by this specification; rather,
|
|
they come from the namespace of the schema in which they are defined
|
|
(see <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#declare-schema">XML Representation of
|
|
Schemas</a> in <a href="#structural-schemas">[XML Schema Part 1: Structures]</a>).
|
|
</p>
|
|
</div>
|
|
<div class="div2">
|
|
<h3 class="withToc">
|
|
<span class="nav"><a href="#namespaces" class="nav"><img alt="previous sub-section" src="previous.jpg"></a> <a href="#built-in-derived" class="nav"><img alt="next sub-section" src="next.jpg"></a></span><a name="built-in-primitive-datatypes"></a>3.2 Primitive datatypes</h3>
|
|
<div class="localToc">
|
|
<div class="tocLine">3.2.1 <a href="#string">string</a>
|
|
</div>
|
|
<div class="tocLine">3.2.2 <a href="#boolean">boolean</a>
|
|
</div>
|
|
<div class="tocLine">3.2.3 <a href="#decimal">decimal</a>
|
|
</div>
|
|
<div class="tocLine">3.2.4 <a href="#float">float</a>
|
|
</div>
|
|
<div class="tocLine">3.2.5 <a href="#double">double</a>
|
|
</div>
|
|
<div class="tocLine">3.2.6 <a href="#duration">duration</a>
|
|
</div>
|
|
<div class="tocLine">3.2.7 <a href="#dateTime">dateTime</a>
|
|
</div>
|
|
<div class="tocLine">3.2.8 <a href="#time">time</a>
|
|
</div>
|
|
<div class="tocLine">3.2.9 <a href="#date">date</a>
|
|
</div>
|
|
<div class="tocLine">3.2.10 <a href="#gYearMonth">gYearMonth</a>
|
|
</div>
|
|
<div class="tocLine">3.2.11 <a href="#gYear">gYear</a>
|
|
</div>
|
|
<div class="tocLine">3.2.12 <a href="#gMonthDay">gMonthDay</a>
|
|
</div>
|
|
<div class="tocLine">3.2.13 <a href="#gDay">gDay</a>
|
|
</div>
|
|
<div class="tocLine">3.2.14 <a href="#gMonth">gMonth</a>
|
|
</div>
|
|
<div class="tocLine">3.2.15 <a href="#hexBinary">hexBinary</a>
|
|
</div>
|
|
<div class="tocLine">3.2.16 <a href="#base64Binary">base64Binary</a>
|
|
</div>
|
|
<div class="tocLine">3.2.17 <a href="#anyURI">anyURI</a>
|
|
</div>
|
|
<div class="tocLine">3.2.18 <a href="#QName">QName</a>
|
|
</div>
|
|
<div class="tocLine">3.2.19 <a href="#NOTATION">NOTATION</a>
|
|
</div>
|
|
</div>
|
|
<p>
|
|
The <a href="#dt-primitive" class="termref"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> datatypes defined by this specification
|
|
are described below. For each datatype, the
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> and <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>
|
|
are defined, <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s which apply
|
|
to the datatype are listed and any datatypes <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
from this datatype are specified.
|
|
</p>
|
|
<p>
|
|
<a href="#dt-primitive" class="termref"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> datatypes can only be added by revisions
|
|
to this specification.
|
|
</p>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="string"></a>3.2.1 string</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-string">[Definition:] </a>The <b>string</b> datatype
|
|
represents character strings in XML. The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
of <b>string</b> is the set of finite-length sequences of
|
|
<a class="xtermref" href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#dt-character">character</a>s (as defined in
|
|
<a href="#XML">[XML 1.0 (Second Edition)]</a>) that <a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a> the
|
|
<a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-Char">Char</a> production from <a href="#XML">[XML 1.0 (Second Edition)]</a>.
|
|
A <a class="xtermref" href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#dt-character">character</a> is an atomic unit of
|
|
communication; it is not further specified except to note that every
|
|
<a class="xtermref" href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#dt-character">character</a> has a corresponding
|
|
Universal Character Set code point, which is an integer.
|
|
</span>
|
|
</p>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
Many human languages have writing systems that require
|
|
child elements for control of aspects such as bidirectional formating or
|
|
ruby annotation (see <a href="#ruby">[Ruby]</a> and Section 8.2.4
|
|
<a href="http://www.w3.org/TR/1999/REC-html401-19991224/struct/dirlang.html#h-8.2.4">Overriding the
|
|
bidirectional algorithm: the BDO element</a> of <a href="#html4">[HTML 4.01]</a>).
|
|
Thus, <b>string</b>, as a simple type that can contain only
|
|
characters but not child elements, is often not suitable for representing text.
|
|
In such situations, a complex type that allows mixed content should be considered.
|
|
For more information, see Section 5.5
|
|
<a href="http://www.w3.org/TR/2001/REC-xmlschema-0-20010502/#textType">Any Element, Any Attribute</a>
|
|
of <a href="#schema-primer">[XML Schema Language: Part 2 Primer]</a>.
|
|
|
|
</blockquote>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
As noted in <a href="#dc-ordered">ordered</a>, the fact that this specification does
|
|
not specify an <a href="#dt-order-relation" class="termref"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a> for <a href="#dt-string" class="termref"><span class="arrow">·</span>string<span class="arrow">·</span></a>
|
|
does not preclude other applications from treating strings as being ordered.
|
|
|
|
</blockquote>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="string-facets"></a>3.2.1.1 Constraining facets</h5>
|
|
<p>
|
|
<strong>string</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-length">length</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minLength">minLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxLength">maxLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="string-derived-types"></a>3.2.1.2 Derived datatypes</h5>
|
|
<p>
|
|
The following <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<strong>string</strong>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#normalizedString">normalizedString</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="boolean"></a>3.2.2 boolean</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-boolean">[Definition:] </a><b>boolean</b> has the
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> required to support the mathematical
|
|
concept of binary-valued logic: {true, false}.</span>
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="boolean-lexical-representation"></a>3.2.2.1 Lexical representation</h5>
|
|
<p>
|
|
An instance of a datatype that is defined as <a href="#dt-boolean" class="termref"><span class="arrow">·</span>boolean<span class="arrow">·</span></a>
|
|
can have the following legal literals {true, false, 1, 0}.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="boolean-canonical-representation"></a>3.2.2.2 Canonical representation</h5>
|
|
<p>
|
|
The canonical representation for <b>boolean</b> is the set of
|
|
literals {true, false}.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="boolean-facets"></a>3.2.2.3 Constraining facets</h5>
|
|
<p>
|
|
<strong>boolean</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="decimal"></a>3.2.3 decimal</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-decimal">[Definition:] </a><b>decimal</b>
|
|
represents arbitrary precision decimal numbers.
|
|
The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>decimal</b>
|
|
is the set of the values <i>i × 10^-n</i>,
|
|
where <i>i</i> and <i>n</i> are integers
|
|
such that <i>n >= 0</i>.
|
|
The <a href="#dt-order-relation" class="termref"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a> on <b>decimal</b>
|
|
is: <i>x < y iff y - x</i> is positive.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
<span class="termdef"><a name="dt-decimal-with-totalDigits">[Definition:] </a>
|
|
The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of types derived from <b>decimal</b>
|
|
with a value for <a href="#dt-totalDigits" class="termref"><span class="arrow">·</span>totalDigits<span class="arrow">·</span></a> of <i>p</i>
|
|
is the set of values <i>i × 10^-n</i>, where
|
|
<i>n</i> and <i>i</i> are integers such that
|
|
<i>p >= n >= 0</i> and the number of significant decimal digits
|
|
in <i>i</i> is less than or equal to <i>p</i>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
<span class="termdef"><a name="dt-decimal-with-fractionDigits">[Definition:] </a>
|
|
The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of types derived from <b>decimal</b>
|
|
with a value for <a href="#dt-fractionDigits" class="termref"><span class="arrow">·</span>fractionDigits<span class="arrow">·</span></a> of <i>s</i>
|
|
is the set of values <i>i × 10^-n</i>, where
|
|
<i>i</i> and <i>n</i> are integers such
|
|
that <i>0 <= n <= s</i>.
|
|
</span>
|
|
</p>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
All <a href="#dt-minimally-conforming" class="termref"><span class="arrow">·</span>minimally conforming<span class="arrow">·</span></a> processors <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a>
|
|
support decimal numbers with a minimum of 18 decimal digits (i.e., with a
|
|
<a href="#dt-totalDigits" class="termref"><span class="arrow">·</span>totalDigits<span class="arrow">·</span></a> of 18). However,
|
|
<a href="#dt-minimally-conforming" class="termref"><span class="arrow">·</span>minimally conforming<span class="arrow">·</span></a> processors <a href="#dt-may" class="termref"><span class="arrow">·</span>may<span class="arrow">·</span></a>
|
|
set an application-defined limit on the maximum number of decimal digits
|
|
they are prepared to support, in which case that application-defined
|
|
maximum number <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be clearly documented.
|
|
|
|
</blockquote>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="decimal-lexical-representation"></a>3.2.3.1 Lexical representation</h5>
|
|
<p>
|
|
<b>decimal</b> has a lexical representation
|
|
consisting of a finite-length sequence of decimal digits (#x30-#x39) separated
|
|
by a period as a decimal indicator. If <a href="#dt-totalDigits" class="termref"><span class="arrow">·</span>totalDigits<span class="arrow">·</span></a> is
|
|
specified, the number of digits must be less than or equal to
|
|
<a href="#dt-totalDigits" class="termref"><span class="arrow">·</span>totalDigits<span class="arrow">·</span></a>.
|
|
If <a href="#dt-fractionDigits" class="termref"><span class="arrow">·</span>fractionDigits<span class="arrow">·</span></a> is specified, the
|
|
number of digits following the decimal point must be less than or equal to
|
|
the <a href="#dt-fractionDigits" class="termref"><span class="arrow">·</span>fractionDigits<span class="arrow">·</span></a>. An optional leading sign is allowed.
|
|
If the sign is omitted, "+" is assumed. Leading and trailing zeroes are optional.
|
|
If the fractional part is zero, the period and following zero(es) can
|
|
be omitted.
|
|
For example: <code>-1.23, 12678967.543233, +100000.00, 210</code>.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="decimal-canonical-representation"></a>3.2.3.2 Canonical representation</h5>
|
|
<p>
|
|
The canonical representation for <b>decimal</b> is defined by
|
|
prohibiting certain options from the
|
|
<a href="#decimal-lexical-representation">Lexical representation (§3.2.3.1)</a>. Specifically, the preceding
|
|
optional "+" sign is prohibited. The decimal point is required. Leading and
|
|
trailing zeroes are prohibited subject to the following: there must be at least
|
|
one digit to the right and to the left of the decimal point which may be a zero.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="decimal-facets"></a>3.2.3.3 Constraining facets</h5>
|
|
<p>
|
|
<strong>decimal</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-totalDigits">totalDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-fractionDigits">fractionDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="decimal-derived-types"></a>3.2.3.4 Derived datatypes</h5>
|
|
<p>
|
|
The following <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<strong>decimal</strong>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#integer">integer</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="float"></a>3.2.4 float</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-float">[Definition:] </a><b>float</b> corresponds
|
|
to the IEEE single-precision 32-bit floating point type
|
|
<a href="#ieee754">[IEEE 754-1985]</a>. The basic <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<b>float</b> consists of the values
|
|
<i>m × 2^e</i>, where <i>m</i>
|
|
is an integer whose absolute value is less than
|
|
<i>2^24</i>, and <i>e</i> is an integer
|
|
between -149 and 104, inclusive. In addition to the basic
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> described above, the
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>float</b> also contains the
|
|
following <i>special values</i>: positive and negative zero,
|
|
positive and negative infinity and not-a-number.
|
|
The <a href="#dt-order-relation" class="termref"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a> on <b>float</b>
|
|
is: <i>x < y iff y - x</i> is positive.
|
|
Positive zero is greater than negative zero. Not-a-number equals itself and is
|
|
greater than all float values including positive infinity.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
A literal in the <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> representing a
|
|
decimal number <i>d</i> maps to the normalized value
|
|
in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>float</b> that is
|
|
closest to <i>d</i> in the sense defined by
|
|
<a href="#clinger1990">[Clinger, WD (1990)]</a>; if <i>d</i> is
|
|
exactly halfway between two such values then the even value is chosen.
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="float-lexical-representation"></a>3.2.4.1 Lexical representation</h5>
|
|
<p>
|
|
<b>float</b> values have a lexical representation
|
|
consisting of a mantissa followed, optionally, by the character
|
|
"E" or "e", followed by an exponent. The exponent <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a>
|
|
be an <a href="#integer">integer</a>. The mantissa must be a <a href="#decimal">decimal</a> number. The representations
|
|
for exponent and mantissa must follow the lexical rules for
|
|
<a href="#integer">integer</a> and <a href="#decimal">decimal</a>. If the "E" or "e" and
|
|
the following exponent are omitted, an exponent value of 0 is assumed.
|
|
</p>
|
|
<p>
|
|
The <i>special values</i> positive and negative zero, positive
|
|
and negative infinity and not-a-number have lexical representations <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 <b>float</b>.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="float-canonical-representation"></a>3.2.4.2 Canonical representation</h5>
|
|
<p>
|
|
The canonical representation for <b>float</b> is defined by
|
|
prohibiting certain options from the
|
|
<a href="#float-lexical-representation">Lexical representation (§3.2.4.1)</a>. Specifically, the exponent
|
|
must be indicated by "E". Leading zeroes and the preceding optional "+" sign
|
|
are prohibited in the exponent.
|
|
For the mantissa, the preceding optional "+" sign is prohibited
|
|
and the decimal point is required.
|
|
For the exponent, the preceding optional "+" sign is prohibited.
|
|
Leading and trailing zeroes are prohibited subject to the following:
|
|
number representations must
|
|
be normalized such that there is a single
|
|
digit to the left of the decimal point and at least a single digit to the
|
|
right of the decimal point.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="float-facets"></a>3.2.4.3 Constraining facets</h5>
|
|
<p>
|
|
<strong>float</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="double"></a>3.2.5 double</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-double">[Definition:] </a>The <b>double</b>
|
|
datatype corresponds to IEEE double-precision 64-bit floating point
|
|
type <a href="#ieee754">[IEEE 754-1985]</a>. The basic <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
of <b>double</b> consists of the values
|
|
<i>m × 2^e</i>, where <i>m</i>
|
|
is an integer whose absolute value is less than
|
|
<i>2^53</i>, and <i>e</i> is an
|
|
integer between -1075 and 970, inclusive. In addition to the basic
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> described above, the
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>double</b> also contains
|
|
the following <i>special values</i>: positive and negative zero,
|
|
positive and negative infinity and not-a-number.
|
|
The <a href="#dt-order-relation" class="termref"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a> on <b>double</b>
|
|
is: <i>x < y iff y - x</i> is positive.
|
|
Positive zero is greater than negative zero. Not-a-number equals itself and is
|
|
greater than all double values including positive infinity.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
A literal in the <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> representing a
|
|
decimal number <i>d</i> maps to the normalized value
|
|
in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>double</b> that is
|
|
closest to <i>d</i>; if <i>d</i> is
|
|
exactly halfway between two such values then the even value is chosen.
|
|
This is the <i>best approximation</i> of <i>d</i>
|
|
(<a href="#clinger1990">[Clinger, WD (1990)]</a>, <a href="#gay1990">[Gay, DM (1990)]</a>), which is more
|
|
accurate than the mapping required by <a href="#ieee754">[IEEE 754-1985]</a>.
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="double-lexical-representation"></a>3.2.5.1 Lexical representation</h5>
|
|
<p>
|
|
<b>double</b> values have a lexical representation
|
|
consisting of a mantissa followed, optionally, by the character "E" or
|
|
"e", followed by an exponent. The exponent <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be
|
|
an integer. The mantissa must be a decimal number. The representations
|
|
for exponent and mantissa must follow the lexical rules for
|
|
<a href="#integer">integer</a> and <a href="#decimal">decimal</a>. If the "E" or "e"
|
|
and the following exponent are omitted, an exponent value of 0 is assumed.
|
|
</p>
|
|
<p>
|
|
The <i>special values</i> positive and negative zero, positive
|
|
and negative infinity and not-a-number have lexical representations <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 <b>double</b>.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="double-canonical-representation"></a>3.2.5.2 Canonical representation</h5>
|
|
<p>
|
|
The canonical representation for <b>double</b> is defined by
|
|
prohibiting certain options from the
|
|
<a href="#double-lexical-representation">Lexical representation (§3.2.5.1)</a>. Specifically, the exponent
|
|
must be indicated by "E". Leading zeroes and the preceding optional "+" sign
|
|
are prohibited in the exponent.
|
|
For the mantissa, the preceding optional "+" sign is prohibited
|
|
and the decimal point is required.
|
|
For the exponent, the preceding optional "+" sign is prohibited.
|
|
Leading and trailing zeroes are prohibited subject to the following:
|
|
number representations must
|
|
be normalized such that there is a single
|
|
digit to the left of the decimal point and at least a single digit to the
|
|
right of the decimal point.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="double-facets"></a>3.2.5.3 Constraining facets</h5>
|
|
<p>
|
|
<strong>double</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="duration"></a>3.2.6 duration</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-duration">[Definition:] </a>
|
|
<b>duration</b> represents a duration of time.
|
|
The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>duration</b> is
|
|
a six-dimensional space where the coordinates
|
|
designate the Gregorian year, month, day, hour, minute, and second components defined in
|
|
§ 5.5.3.2 of <a href="#ISO8601">[ISO 8601]</a>,
|
|
respectively. These components are ordered
|
|
in their significance by their order of appearance i.e. as year, month, day,
|
|
hour, minute, and second.
|
|
</span>
|
|
</p>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="duration-lexical-repr"></a>3.2.6.1 Lexical representation</h5>
|
|
<p>
|
|
The lexical representation for <b>duration</b> is the
|
|
<a href="#ISO8601">[ISO 8601]</a> extended format P<i>n</i>Y<i>n</i>
|
|
M<i>n</i>DT<i>n</i>H <i>n</i>M<i>n</i>S, where
|
|
<i>n</i>Y represents the number of years, <i>n</i>M the
|
|
number of months, <i>n</i>D the number of days, 'T' is the
|
|
date/time separator, <i>n</i>H the number of hours,
|
|
<i>n</i>M the number of minutes and <i>n</i>S the
|
|
number of seconds. The number of seconds can include decimal digits
|
|
to arbitrary precision.</p>
|
|
<p>
|
|
The values of the
|
|
Year, Month, Day, Hour and Minutes components are not restricted but
|
|
allow an arbitrary integer. Similarly, the value of the Seconds component
|
|
allows an arbitrary decimal. Thus, the lexical representation of
|
|
<b>duration</b> does not follow the alternative
|
|
format of § 5.5.3.2.1 of <a href="#ISO8601">[ISO 8601]</a>.</p>
|
|
<p>
|
|
An optional preceding minus sign ('-') is
|
|
allowed, to indicate a negative duration. If the sign is omitted a
|
|
positive duration is indicated. See also <a href="#isoformats">ISO 8601 Date and Time Formats (§D)</a>.
|
|
</p>
|
|
<p>
|
|
For example, to indicate a duration of 1 year, 2 months, 3 days, 10
|
|
hours, and 30 minutes, one would write: <code>P1Y2M3DT10H30M</code>.
|
|
One could also indicate a duration of minus 120 days as:
|
|
<code>-P120D</code>.
|
|
</p>
|
|
<p>
|
|
Reduced precision and truncated representations of this format are allowed
|
|
provided they conform to the following:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
If the number of years, months, days, hours, minutes, or seconds in any
|
|
expression equals zero, the number and its corresponding designator <a href="#dt-may" class="termref"><span class="arrow">·</span>may<span class="arrow">·</span></a>
|
|
be omitted. However, at least one number and its designator <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a>
|
|
be present.
|
|
|
|
</li>
|
|
<li>
|
|
|
|
The seconds part <a href="#dt-may" class="termref"><span class="arrow">·</span>may<span class="arrow">·</span></a> have a decimal fraction.
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
The designator 'T' shall be absent if all of the time items are absent.
|
|
The designator 'P' must always be present.
|
|
|
|
</li>
|
|
</ul>
|
|
<p>
|
|
For example, P1347Y, P1347M and P1Y2MT2H are all allowed;
|
|
P0Y1347M and P0Y1347M0D are allowed. P-1347M is not allowed although
|
|
-P1347M is allowed. P1Y2MT is not allowed.
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="duration-order"></a>3.2.6.2 Order relation on duration</h5>
|
|
<p>
|
|
In general, the <a href="#dt-order-relation" class="termref"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a> on <b>duration</b>
|
|
is a partial order since there is no determinate relationship between certain
|
|
durations such as one month (P1M) and 30 days (P30D).
|
|
The <a href="#dt-order-relation" class="termref"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a>
|
|
of two <b>duration</b> values <i>x</i> and
|
|
<i>y</i> is <i>x < y iff s+x < s+y</i>
|
|
for each qualified <a href="#dateTime">dateTime</a> <i> s</i>
|
|
in the list below. These values for <i>s</i> cause the greatest deviations in the addition of
|
|
dateTimes and durations. Addition of durations to time instants is defined
|
|
in <a href="#adding-durations-to-dateTimes">Adding durations to dateTimes (§E)</a>.
|
|
</p>
|
|
<ul>
|
|
<li>1696-09-01T00:00:00Z</li>
|
|
<li>1697-02-01T00:00:00Z</li>
|
|
<li>1903-03-01T00:00:00Z</li>
|
|
<li>1903-07-01T00:00:00Z</li>
|
|
</ul>
|
|
<p>
|
|
</p>
|
|
<p>
|
|
The following table shows the strongest relationship that can be determined
|
|
between example durations. The symbol <> means that the order relation is
|
|
indeterminate. Note that because of leap-seconds, a seconds field can vary
|
|
from 59 to 60. However, because of the way that addition is defined in
|
|
<a href="#adding-durations-to-dateTimes">Adding durations to dateTimes (§E)</a>, they are still totally ordered.
|
|
</p>
|
|
<table border="1" cellspacing="0" cellpadding="4">
|
|
<tbody>
|
|
<tr>
|
|
<th rowspan="1" colspan="1"> </th>
|
|
<th colspan="7" style="background-color:#FFFF99" rowspan="1">Relation</th>
|
|
</tr>
|
|
<tr>
|
|
<td style="background-color:#FFFF99" rowspan="1" colspan="1">P<b>1Y</b></td>
|
|
<td rowspan="1" colspan="1">> P<b>364D</b></td>
|
|
<td rowspan="1" colspan="1"><> P<b>365D</b></td>
|
|
<td colspan="3" rowspan="1"> </td>
|
|
<td rowspan="1" colspan="1"><> P<b>366D</b></td>
|
|
<td rowspan="1" colspan="1">< P<b>367D</b></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="background-color:#FFFF99" rowspan="1" colspan="1">P<b>1M</b></td>
|
|
<td rowspan="1" colspan="1">> P<b>27D</b></td>
|
|
<td rowspan="1" colspan="1"><> P<b>28D</b></td>
|
|
<td colspan="2" rowspan="1"><> P<b>29D</b></td>
|
|
<td rowspan="1" colspan="1"><> P<b>30D</b></td>
|
|
<td rowspan="1" colspan="1"><> P<b>31D</b></td>
|
|
<td rowspan="1" colspan="1">< P<b>32D</b></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="background-color:#FFFF99" rowspan="1" colspan="1">P<b>5M</b></td>
|
|
<td rowspan="1" colspan="1">> P<b>149D</b></td>
|
|
<td rowspan="1" colspan="1"><> P<b>150D</b></td>
|
|
<td rowspan="1" colspan="1"><> P<b>151D</b></td>
|
|
<td colspan="2" rowspan="1"><> P<b>152D</b></td>
|
|
<td rowspan="1" colspan="1"><> P<b>153D</b></td>
|
|
<td rowspan="1" colspan="1">< P<b>154D</b></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>
|
|
Implementations are free to optimize the computation of the ordering relationship. For example, the following table can be used to
|
|
compare durations of a small number of months against days.
|
|
</p>
|
|
<table border="1" cellspacing="0" cellpadding="2">
|
|
<tbody>
|
|
<tr>
|
|
<th align="center" rowspan="1" colspan="1"> </th>
|
|
<th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">Months</th>
|
|
<th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">1</th>
|
|
<th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">2</th>
|
|
<th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">3</th>
|
|
<th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">4</th>
|
|
<th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">5</th>
|
|
<th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">6</th>
|
|
<th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">7</th>
|
|
<th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">8</th>
|
|
<th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">9</th>
|
|
<th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">10</th>
|
|
<th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">11</th>
|
|
<th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">12</th>
|
|
<th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">13</th>
|
|
<th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">...</th>
|
|
</tr>
|
|
<tr>
|
|
<th align="center" rowspan="2" style="background-color: #FFFF99" colspan="1">Days</th>
|
|
<th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">Minimum</th>
|
|
<td align="center" rowspan="1" colspan="1">28</td>
|
|
<td align="center" rowspan="1" colspan="1">59</td>
|
|
<td align="center" rowspan="1" colspan="1">89</td>
|
|
<td align="center" rowspan="1" colspan="1">120</td>
|
|
<td align="center" rowspan="1" colspan="1">150</td>
|
|
<td align="center" rowspan="1" colspan="1">181</td>
|
|
<td align="center" rowspan="1" colspan="1">212</td>
|
|
<td align="center" rowspan="1" colspan="1">242</td>
|
|
<td align="center" rowspan="1" colspan="1">273</td>
|
|
<td align="center" rowspan="1" colspan="1">303</td>
|
|
<td align="center" rowspan="1" colspan="1">334</td>
|
|
<td align="center" rowspan="1" colspan="1">365</td>
|
|
<td align="center" rowspan="1" colspan="1">393</td>
|
|
<td align="center" rowspan="1" colspan="1">...</td>
|
|
</tr>
|
|
<tr>
|
|
<th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">Maximum</th>
|
|
<td align="center" rowspan="1" colspan="1">31</td>
|
|
<td align="center" rowspan="1" colspan="1">62</td>
|
|
<td align="center" rowspan="1" colspan="1">92</td>
|
|
<td align="center" rowspan="1" colspan="1">123</td>
|
|
<td align="center" rowspan="1" colspan="1">153</td>
|
|
<td align="center" rowspan="1" colspan="1">184</td>
|
|
<td align="center" rowspan="1" colspan="1">215</td>
|
|
<td align="center" rowspan="1" colspan="1">245</td>
|
|
<td align="center" rowspan="1" colspan="1">276</td>
|
|
<td align="center" rowspan="1" colspan="1">306</td>
|
|
<td align="center" rowspan="1" colspan="1">337</td>
|
|
<td align="center" rowspan="1" colspan="1">366</td>
|
|
<td align="center" rowspan="1" colspan="1">397</td>
|
|
<td align="center" rowspan="1" colspan="1">...</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="facet-comparison-for-durations"></a>3.2.6.3 Facet Comparison for durations</h5>
|
|
<p>In comparing <b>duration</b>
|
|
values with <a href="#dc-minInclusive">minInclusive</a>, <a href="#dc-minExclusive">minExclusive</a>,
|
|
<a href="#dc-maxInclusive">maxInclusive</a> and <a href="#dc-maxExclusive">maxExclusive</a> facet values
|
|
indeterminate comparisons should be considered as "false".
|
|
</p>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="total-order-durations"></a>3.2.6.4 Totally ordered durations</h5>
|
|
<p>
|
|
Certain derived datatypes of durations can be guaranteed have a total order. For
|
|
this, they must have fields from only one row in the list below and the time zone
|
|
must either be required or prohibited.
|
|
</p>
|
|
<ul>
|
|
<li>year, month</li>
|
|
<li>day, hour, minute, second</li>
|
|
</ul>
|
|
<p>
|
|
For example, a datatype could be defined to correspond to the
|
|
<a href="#SQL">[SQL]</a> datatype Year-Month interval that required a four digit
|
|
year field and a two digit month field but required all other fields to be unspecified. This datatype could be defined as below and would have a total order.
|
|
</p>
|
|
<pre><simpleType name='SQL-Year-Month-Interval'>
|
|
<restriction base='duration'>
|
|
<pattern value='P\p{Nd}{4}Y\p{Nd}{2}M'/>
|
|
</restriction>
|
|
</simpleType></pre>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="duration-facets"></a>3.2.6.5 Constraining facets</h5>
|
|
<p>
|
|
<strong>duration</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="dateTime"></a>3.2.7 dateTime</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-dateTime">[Definition:] </a>
|
|
<b>dateTime</b> represents a specific instant of time. The
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>dateTime</b> is the space
|
|
of <i>Combinations of date and time of day</i> values as defined
|
|
in § 5.4 of <a href="#ISO8601">[ISO 8601]</a>.
|
|
</span>
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="dateTime-lexical-repr"></a>3.2.7.1 Lexical representation</h5>
|
|
<p>
|
|
A single lexical representation, which is a subset of the lexical
|
|
representations allowed by <a href="#ISO8601">[ISO 8601]</a>, is allowed for
|
|
<b>dateTime</b>. This lexical representation is the
|
|
<a href="#ISO8601">[ISO 8601]</a> extended format CCYY-MM-DDThh:mm:ss
|
|
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" represent hour,
|
|
minute and second respectively. Additional digits can be used to
|
|
increase the precision of fractional seconds if desired i.e the format
|
|
ss.ss... with any number of digits after the decimal point is supported.
|
|
The fractional seconds part is optional; other parts of the
|
|
lexical form are not optional.
|
|
To accommodate
|
|
year values greater than 9999 additional digits can be added to the
|
|
left of this representation. Leading zeros are required if the year value
|
|
would otherwise have fewer than four digits; otherwise they are forbidden.
|
|
The year 0000 is prohibited.
|
|
</p>
|
|
<p>
|
|
The CCYY field must have at least four digits, the MM, DD, SS, hh, mm
|
|
and ss fields exactly two digits each (not counting fractional seconds);
|
|
leading zeroes must be used if the field would otherwise have too few digits.
|
|
</p>
|
|
<p>
|
|
This representation may be immediately followed by a "Z" to indicate
|
|
Coordinated Universal Time (UTC) or, to indicate the time zone, i.e. the
|
|
difference between the local time and Coordinated Universal Time,
|
|
immediately followed by a sign,
|
|
+ or -, followed by the difference from UTC represented as hh:mm (note:
|
|
the minutes part is required).
|
|
See <a href="#isoformats">ISO 8601 Date and Time Formats (§D)</a> for details about legal values in the
|
|
various fields.
|
|
If the time zone is included, both hours and minutes must be present.
|
|
</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 (UTC), one
|
|
would write: <code>1999-05-31T13:20:00-05:00</code>.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="dateTime-canonical-repr"></a>3.2.7.2 Canonical representation</h5>
|
|
<p>
|
|
The canonical representation for <b>dateTime</b> is defined
|
|
by prohibiting certain options from the
|
|
<a href="#dateTime-lexical-repr">Lexical representation (§3.2.7.1)</a>.
|
|
Specifically, either the time zone must
|
|
be omitted or, if present, the time zone must be Coordinated Universal
|
|
Time (UTC) indicated by a "Z".
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="dateTime-order"></a>3.2.7.3 Order relation on dateTime</h5>
|
|
<p>In general, the <a href="#dt-order-relation" class="termref"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a> on <b>dateTime</b>
|
|
is a partial order since there is no determinate relationship between certain
|
|
instants. For example, there is no determinate
|
|
ordering between
|
|
(a)
|
|
2000-01-20T12:00:00 and (b) 2000-01-20T12:00:00<b>Z</b>. Based on
|
|
timezones currently in use, (c) could vary from 2000-01-20T12:00:00+12:00 to
|
|
2000-01-20T12:00:00-13:00. It is, however, possible for this range to expand or
|
|
contract in the future, based on local laws. Because of this, the following
|
|
definition uses a somewhat broader range of indeterminate values: +14:00..-14:00.</p>
|
|
<p>The following definition uses the notation S[year] to represent the year
|
|
field of S, S[month] to represent the month field, and so on. The notation (Q
|
|
& "-14:00") means adding the timezone -14:00 to Q, where Q did not
|
|
already have a timezone. <i>This is a logical explanation of the process. Actual
|
|
implementations are free to optimize as long as they produce the same results.</i>
|
|
</p>
|
|
<p>
|
|
The ordering between two <b>dateTime</b>s P and Q is defined by the following
|
|
algorithm:
|
|
</p>
|
|
<p>A.Normalize P and Q. That is, if there is a timezone present, but
|
|
it is not Z, convert it to Z using the addition operation defined in
|
|
<a href="#adding-durations-to-dateTimes">Adding durations to dateTimes (§E)</a>
|
|
</p>
|
|
<ul>
|
|
<li>Thus 2000-03-04T23:00:00+03:00 normalizes to 2000-03-04T20:00:00Z</li>
|
|
</ul>
|
|
<p>B. If P and Q either both have a time zone or both do not have a time
|
|
zone, compare P and Q field by field from the year field down to the
|
|
second field, and return a result as soon as it can be determined. That is:</p>
|
|
<ol>
|
|
<li>For each i in {year, month, day, hour, minute, second}
|
|
<ol>
|
|
<li>If P[i] and Q[i] are both not specified, continue to the next i</li>
|
|
<li>If P[i] is not specified and Q[i] is, or vice versa, stop and return
|
|
P <> Q</li>
|
|
<li>If P[i] < Q[i], stop and return P < Q</li>
|
|
<li>If P[i] > Q[i], stop and return P > Q</li>
|
|
</ol>
|
|
|
|
</li>
|
|
<li>Stop and return P = Q</li>
|
|
</ol>
|
|
<p>C.Otherwise, if P contains a time zone and Q does not, compare
|
|
as follows:
|
|
</p>
|
|
<ol>
|
|
<li>P < Q if P < (Q with time zone +14:00)</li>
|
|
<li>P > Q if P > (Q with time zone -14:00)</li>
|
|
<li>P <> Q otherwise, that is, if (Q with time zone +14:00) < P < (Q with time zone -14:00)</li>
|
|
</ol>
|
|
<p>D. Otherwise, if P does not contain a time zone and Q does, compare
|
|
as follows:</p>
|
|
<ol>
|
|
<li> P < Q if (P with time zone -14:00) < Q.</li>
|
|
<li> P > Q if (P with time zone +14:00) > Q.</li>
|
|
<li> P <> Q otherwise, that is, if (P with time zone +14:00) < Q < (P with time zone -14:00)</li>
|
|
</ol>
|
|
<p>Examples:</p>
|
|
<table border="1" cellspacing="0" cellpadding="4">
|
|
<tbody>
|
|
<tr>
|
|
<th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">Determinate</th>
|
|
<th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">Indeterminate</th>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">2000-01-15T00:00:00 <b><</b> 2000-02-15T00:00:00</td>
|
|
<td align="center" rowspan="1" colspan="1">2000-01-01T12:00:00 <b><></b>
|
|
1999-12-31T23:00:00Z</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">2000-01-15T12:00:00 <b><</b> 2000-01-16T12:00:00Z</td>
|
|
<td align="center" rowspan="1" colspan="1">2000-01-16T12:00:00 <b><></b>
|
|
2000-01-16T12:00:00Z</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"> </td>
|
|
<td align="center" rowspan="1" colspan="1">2000-01-16T00:00:00 <b><></b> 2000-01-16T12:00:00Z</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="totally-ordered-instants"></a>3.2.7.4 Totally ordered dateTimes</h5>
|
|
<p>Certain derived types from <b>dateTime</b>
|
|
can be guaranteed have a total order. To
|
|
do so, they must require that a specific set of fields are always specified, and
|
|
that remaining fields (if any) are always unspecified. For example, the date
|
|
datatype without time zone is defined to contain exactly year, month, and day.
|
|
Thus dates without time zone have a total order among themselves.</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="dateTime-facets"></a>3.2.7.5 Constraining facets</h5>
|
|
<p>
|
|
<strong>dateTime</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="time"></a>3.2.8 time</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-time">[Definition:] </a><b>time</b>
|
|
represents an instant of time that recurs every day. The
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>time</b> is the space
|
|
of <i>time of day</i> values as defined in § 5.3 of
|
|
<a href="#ISO8601">[ISO 8601]</a>. Specifically, it is a set of zero-duration daily
|
|
time instances.</span>
|
|
</p>
|
|
<p>
|
|
Since the lexical representation allows an optional time zone
|
|
indicator, <b>time</b> values are partially ordered because it may
|
|
not be able to determine the order of two values one of which has a
|
|
time zone and the other does not. The order relation on
|
|
<b>time</b> values is the
|
|
<a href="#dateTime-order">Order relation on dateTime (§3.2.7.3)</a> using an arbitrary date. See also
|
|
<a href="#adding-durations-to-dateTimes">Adding durations to dateTimes (§E)</a>. Pairs of <b>time</b> values with or without time zone indicators are totally ordered.
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="time-lexical-repr"></a>3.2.8.1 Lexical representation</h5>
|
|
<p>
|
|
The lexical representation for <b>time</b> is the left
|
|
truncated lexical representation for <a href="#dateTime">dateTime</a>:
|
|
hh:mm:ss.sss with optional following time zone indicator. For example,
|
|
to indicate 1:20 pm for Eastern Standard Time which is 5 hours behind
|
|
Coordinated Universal Time (UTC), one would write: 13:20:00-05:00. See also
|
|
<a href="#isoformats">ISO 8601 Date and Time Formats (§D)</a>.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="time-canonical-repr"></a>3.2.8.2 Canonical representation</h5>
|
|
<p>
|
|
The canonical representation for <b>time</b> is defined
|
|
by prohibiting certain options from the
|
|
<a href="#time-lexical-repr">Lexical representation (§3.2.8.1)</a>. Specifically, either the time zone must
|
|
be omitted or, if present, the time zone must be Coordinated Universal
|
|
Time (UTC) indicated by a "Z".
|
|
Additionally, the canonical representation for midnight is 00:00:00.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="time-facets"></a>3.2.8.3 Constraining facets</h5>
|
|
<p>
|
|
<strong>time</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="date"></a>3.2.9 date</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-date">[Definition:] </a><b>date</b>
|
|
represents a calendar date. The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
of <b>date</b> is the set of Gregorian calendar dates as defined
|
|
in § 5.2.1 of <a href="#ISO8601">[ISO 8601]</a>. Specifically,
|
|
it is a set of one-day long, non-periodic instances
|
|
e.g. lexical 1999-10-26 to represent the calendar date 1999-10-26, independent
|
|
of how many hours this day has.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
Since the lexical representation allows an optional time zone
|
|
indicator, <b>date</b> values are partially ordered because it may
|
|
not be possible to unequivocally determine the order of two values one of which has a
|
|
time zone and the other does not. If
|
|
<b>date</b> values are considered as periods of time, the order relation
|
|
on <b>date</b> values is the order relation on their starting instants.
|
|
This is discussed in <a href="#dateTime-order">Order relation on dateTime (§3.2.7.3)</a>. See also
|
|
<a href="#adding-durations-to-dateTimes">Adding durations to dateTimes (§E)</a>. Pairs of <b>date</b> values with or without time zone indicators are totally ordered.
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="date-lexical-repr"></a>3.2.9.1 Lexical representation</h5>
|
|
<p>
|
|
The lexical representation for <b>date</b> is the reduced (right
|
|
truncated) lexical representation for <a href="#dateTime">dateTime</a>:
|
|
CCYY-MM-DD. No left truncation is allowed. An optional following time
|
|
zone qualifier is allowed as for <a href="#dateTime">dateTime</a>. To
|
|
accommodate year values outside the range from 0001 to 9999, additional
|
|
digits can be added to the left of this representation and a preceding "-"
|
|
sign is allowed.
|
|
</p>
|
|
<p>
|
|
For example, to indicate May the 31st, 1999, one would write: 1999-05-31.
|
|
See also <a href="#isoformats">ISO 8601 Date and Time Formats (§D)</a>.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="date-facets"></a>3.2.9.2 Constraining facets</h5>
|
|
<p>
|
|
<strong>date</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="gYearMonth"></a>3.2.10 gYearMonth</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-gYearMonth">[Definition:] </a>
|
|
<b>gYearMonth</b> represents a
|
|
specific gregorian month in a specific gregorian year. The
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>gYearMonth</b>
|
|
is the set of Gregorian calendar months as defined in § 5.2.1 of
|
|
<a href="#ISO8601">[ISO 8601]</a>. Specifically, it is a set of one-month long,
|
|
non-periodic instances
|
|
e.g. 1999-10 to represent the whole month of 1999-10, independent of
|
|
how many days this month has.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
Since the lexical representation allows an optional time zone
|
|
indicator, <b>gYearMonth</b> values are partially ordered because it may
|
|
not be possible to unequivocally determine the order of two values one of
|
|
which has a time zone and the other does not. If <b>gYearMonth</b>
|
|
values are considered as periods of time, the order relation on
|
|
<b>gYearMonth</b> values is the order relation on their starting instants.
|
|
This is discussed in <a href="#dateTime-order">Order relation on dateTime (§3.2.7.3)</a>. See also
|
|
<a href="#adding-durations-to-dateTimes">Adding durations to dateTimes (§E)</a>. Pairs of <b>gYearMonth</b>
|
|
values with or without time zone indicators are totally ordered.
|
|
</p>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
Because month/year combinations in one calendar only rarely correspond
|
|
to month/year combinations in other calendars, values of this type
|
|
are not, in general, convertible to simple values corresponding to month/year
|
|
combinations in other calendars. This type should therefore be used with caution
|
|
in contexts where conversion to other calendars is desired.
|
|
|
|
</blockquote>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="gYearMonth-lexical-repr"></a>3.2.10.1 Lexical representation</h5>
|
|
<p>
|
|
The lexical representation for <b>gYearMonth</b> is the reduced
|
|
(right truncated) lexical representation for <a href="#dateTime">dateTime</a>:
|
|
CCYY-MM. No left truncation is allowed. An optional following time
|
|
zone qualifier is allowed. To accommodate year values outside the range from 0001 to 9999, additional digits
|
|
can be added to the left of this representation and a preceding "-" sign is allowed.
|
|
</p>
|
|
<p>
|
|
For example, to indicate the month of May 1999, one would write: 1999-05.
|
|
See also <a href="#isoformats">ISO 8601 Date and Time Formats (§D)</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="gYearMonth-facets"></a>3.2.10.2 Constraining facets</h5>
|
|
<p>
|
|
<strong>gYearMonth</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="gYear"></a>3.2.11 gYear</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-gYear">[Definition:] </a>
|
|
<b>gYear</b> represents a
|
|
gregorian calendar year. The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<b>gYear</b> is the set of Gregorian calendar years as defined in
|
|
§ 5.2.1 of <a href="#ISO8601">[ISO 8601]</a>. Specifically, it is a set of one-year
|
|
long, non-periodic instances
|
|
e.g. lexical 1999 to represent the whole year 1999, independent of
|
|
how many months and days this year has.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
Since the lexical representation allows an optional time zone
|
|
indicator, <b>gYear</b> values are partially ordered because it may
|
|
not be possible to unequivocally determine the order of two values one of which has a
|
|
time zone and the other does not. If
|
|
<b>gYear</b> values are considered as periods of time, the order relation
|
|
on <b>gYear</b> values is the order relation on their starting instants.
|
|
This is discussed in <a href="#dateTime-order">Order relation on dateTime (§3.2.7.3)</a>. See also
|
|
<a href="#adding-durations-to-dateTimes">Adding durations to dateTimes (§E)</a>. Pairs of <b>gYear</b> values with or without time zone indicators are totally ordered.
|
|
</p>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
Because years in one calendar only rarely correspond to years
|
|
in other calendars, values of this type
|
|
are not, in general, convertible to simple values corresponding to years
|
|
in other calendars. This type should therefore be used with caution
|
|
in contexts where conversion to other calendars is desired.
|
|
|
|
</blockquote>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="gYear-lexical-repr"></a>3.2.11.1 Lexical representation</h5>
|
|
<p>
|
|
The lexical representation for <b>gYear</b> is the reduced (right
|
|
truncated) lexical representation for <a href="#dateTime">dateTime</a>: CCYY.
|
|
No left truncation is allowed. An optional following time
|
|
zone qualifier is allowed as for <a href="#dateTime">dateTime</a>. To
|
|
accommodate year values outside the range from 0001 to 9999, additional
|
|
digits can be added to the left of this representation and a preceding
|
|
"-" sign is allowed.
|
|
</p>
|
|
<p>
|
|
For example, to indicate 1999, one would write: 1999.
|
|
See also <a href="#isoformats">ISO 8601 Date and Time Formats (§D)</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="gYear-facets"></a>3.2.11.2 Constraining facets</h5>
|
|
<p>
|
|
<strong>gYear</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="gMonthDay"></a>3.2.12 gMonthDay</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-gMonthDay">[Definition:] </a>
|
|
<b>gMonthDay</b> is a gregorian date that recurs, specifically a day of
|
|
the year such as the third of May. Arbitrary recurring dates are not
|
|
supported by this datatype. The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<b>gMonthDay</b> is the set of <i>calendar
|
|
dates</i>, as defined in § 3 of <a href="#ISO8601">[ISO 8601]</a>. Specifically,
|
|
it is a set of one-day long, annually periodic instances.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
Since the lexical representation allows an optional time zone
|
|
indicator, <b>gMonthDay</b> values are partially ordered because it may
|
|
not be possible to unequivocally determine the order of two values one of which has a
|
|
time zone and the other does not. If
|
|
<b>gMonthDay</b> values are considered as periods of time, the order relation
|
|
on <b>gMonthDay</b> values is the order relation on their starting instants.
|
|
This is discussed in <a href="#dateTime-order">Order relation on dateTime (§3.2.7.3)</a>. See also
|
|
<a href="#adding-durations-to-dateTimes">Adding durations to dateTimes (§E)</a>. Pairs of <b>gMonthDay</b> values with or without time zone indicators are totally ordered.
|
|
</p>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
Because day/month combinations in one calendar only rarely correspond
|
|
to day/month combinations in other calendars, values of this type do not,
|
|
in general, have any straightforward or intuitive representation
|
|
in terms of most other calendars. This type should therefore be
|
|
used with caution in contexts where conversion to other calendars
|
|
is desired.
|
|
|
|
</blockquote>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="gMonthDay-lexical-repr"></a>3.2.12.1 Lexical representation</h5>
|
|
<p>
|
|
The lexical representation for <b>gMonthDay</b> is the left
|
|
truncated lexical representation for <a href="#date">date</a>: --MM-DD.
|
|
An optional following time
|
|
zone qualifier is allowed as for <a href="#date">date</a>.
|
|
No preceding sign is allowed. No other formats are allowed. See also <a href="#isoformats">ISO 8601 Date and Time Formats (§D)</a>.
|
|
</p>
|
|
<p>This datatype can be used to represent a specific day in a month.
|
|
To say, for example, that my birthday occurs on the 14th of September ever year.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="gMonthDay-facets"></a>3.2.12.2 Constraining facets</h5>
|
|
<p>
|
|
<strong>gMonthDay</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="gDay"></a>3.2.13 gDay</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-gDay">[Definition:] </a>
|
|
<b>gDay</b> is a gregorian day that recurs, specifically a day
|
|
of the month such as the 5th of the month. Arbitrary recurring days
|
|
are not supported by this datatype. The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
of <b>gDay</b> is the space of a set of <i>calendar
|
|
dates</i> as defined in § 3 of <a href="#ISO8601">[ISO 8601]</a>. Specifically,
|
|
it is a set of one-day long, monthly periodic instances.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
This datatype can be used to represent a specific day of the month.
|
|
To say, for example, that I get my paycheck on the 15th of each month.
|
|
</p>
|
|
<p>
|
|
Since the lexical representation allows an optional time zone
|
|
indicator, <b>gDay</b> values are partially ordered because it may
|
|
not be possible to unequivocally determine the order of two values one of
|
|
which has a time zone and the other does not. If
|
|
<b>gDay</b> values are considered as periods of time, the order relation
|
|
on <b>gDay</b> values is the order relation on their starting instants.
|
|
This is discussed in <a href="#dateTime-order">Order relation on dateTime (§3.2.7.3)</a>. See also
|
|
<a href="#adding-durations-to-dateTimes">Adding durations to dateTimes (§E)</a>. Pairs of <b>gDay</b>
|
|
values with or without time zone indicators are totally ordered.
|
|
</p>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
Because days in one calendar only rarely correspond
|
|
to days in other calendars, values of this type do not,
|
|
in general, have any straightforward or intuitive representation
|
|
in terms of most other calendars. This type should therefore be
|
|
used with caution in contexts where conversion to other calendars
|
|
is desired.
|
|
|
|
</blockquote>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="gDay-lexical-repr"></a>3.2.13.1 Lexical representation</h5>
|
|
<p>
|
|
The lexical representation for <b>gDay</b> is the left
|
|
truncated lexical representation for <a href="#date">date</a>: ---DD .
|
|
An optional following time
|
|
zone qualifier is allowed as for <a href="#date">date</a>. No preceding sign is
|
|
allowed. No other formats are allowed. See also <a href="#isoformats">ISO 8601 Date and Time Formats (§D)</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="gDay-facets"></a>3.2.13.2 Constraining facets</h5>
|
|
<p>
|
|
<strong>gDay</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="gMonth"></a>3.2.14 gMonth</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-gMonth">[Definition:] </a>
|
|
<b>gMonth</b> is a gregorian month that recurs every year.
|
|
The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
of <b>gMonth</b> is the space of a set of <i>calendar
|
|
months</i> as defined in § 3 of <a href="#ISO8601">[ISO 8601]</a>. Specifically,
|
|
it is a set of one-month long, yearly periodic instances.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
This datatype can be used to represent a specific month.
|
|
To say, for example, that Thanksgiving falls in the month of November.
|
|
</p>
|
|
<p>
|
|
Since the lexical representation allows an optional time zone
|
|
indicator, <b>gMonth</b> values are partially ordered because it may
|
|
not be possible to unequivocally determine the order of two values one of which has a
|
|
time zone and the other does not. If
|
|
<b>gMonth</b> values are considered as periods of time, the order relation
|
|
on <b>gMonth</b> is the order relation on their starting instants.
|
|
This is discussed in <a href="#dateTime-order">Order relation on dateTime (§3.2.7.3)</a>. See also
|
|
<a href="#adding-durations-to-dateTimes">Adding durations to dateTimes (§E)</a>. Pairs of <b>gMonth</b>
|
|
values with or without time zone indicators are totally ordered.
|
|
</p>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
Because months in one calendar only rarely correspond
|
|
to months in other calendars, values of this type do not,
|
|
in general, have any straightforward or intuitive representation
|
|
in terms of most other calendars. This type should therefore be
|
|
used with caution in contexts where conversion to other calendars
|
|
is desired.
|
|
|
|
</blockquote>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="gMonth-lexical-repr"></a>3.2.14.1 Lexical representation</h5>
|
|
<p>
|
|
The lexical representation for <b>gMonth</b> is the left
|
|
and right truncated lexical representation for <a href="#date">date</a>: --MM--.
|
|
An optional following time
|
|
zone qualifier is allowed as for <a href="#date">date</a>. No preceding sign is
|
|
allowed. No other formats are allowed. See also <a href="#isoformats">ISO 8601 Date and Time Formats (§D)</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="gMonth-facets"></a>3.2.14.2 Constraining facets</h5>
|
|
<p>
|
|
<strong>gMonth</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="hexBinary"></a>3.2.15 hexBinary</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-hexBinary">[Definition:] </a>
|
|
<b>hexBinary</b> represents
|
|
arbitrary hex-encoded binary data. The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<b>hexBinary</b> is the set of finite-length sequences of binary
|
|
octets.
|
|
</span>
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="hexBinary-lexical-representation"></a>3.2.15.1 Lexical Representation</h5>
|
|
<p>
|
|
<b>hexBinary</b> has a lexical representation where
|
|
each binary octet is encoded as a character tuple, consisting of two
|
|
hexadecimal digits ([0-9a-fA-F]) representing the octet code. For example,
|
|
"0FB7" is a <i>hex</i> encoding for the 16-bit integer 4023
|
|
(whose binary representation is 111110110111).
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="hexBinary-canonical-repr"></a>3.2.15.2 Canonical Rrepresentation</h5>
|
|
<p>
|
|
The canonical representation for <b>hexBinary</b> is defined
|
|
by prohibiting certain options from the
|
|
<a href="#hexBinary-lexical-representation">Lexical Representation (§3.2.15.1)</a>. Specifically, the lower case
|
|
hexadecimal digits ([a-f]) are not allowed.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="hexBinary-facets"></a>3.2.15.3 Constraining facets</h5>
|
|
<p>
|
|
<strong>hexBinary</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-length">length</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minLength">minLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxLength">maxLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="base64Binary"></a>3.2.16 base64Binary</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-base64Binary">[Definition:] </a>
|
|
<b>base64Binary</b>
|
|
represents Base64-encoded arbitrary binary data. The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<b>base64Binary</b> is the set of finite-length sequences of binary
|
|
octets. For <b>base64Binary</b> data the
|
|
entire binary stream is encoded using the Base64
|
|
Content-Transfer-Encoding defined in Section 6.8 of <a href="#RFC2045">[RFC 2045]</a>.
|
|
</span>
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="base64Binary-facets"></a>3.2.16.1 Constraining facets</h5>
|
|
<p>
|
|
<strong>base64Binary</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-length">length</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minLength">minLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxLength">maxLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="anyURI"></a>3.2.17 anyURI</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-anyURI">[Definition:] </a>
|
|
<b>anyURI</b> represents a Uniform Resource Identifier Reference
|
|
(URI). An <b>anyURI</b> value can be absolute or relative, and may
|
|
have an optional fragment identifier (i.e., it may be a URI Reference). This
|
|
type should be used to specify the intention that the value fulfills
|
|
the role of a URI as defined by <a href="#RFC2396">[RFC 2396]</a>, as amended by
|
|
<a href="#RFC2732">[RFC 2732]</a>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
The mapping from <b>anyURI</b> values to URIs is as defined in
|
|
Section 5.4 <a href="http://www.w3.org/TR/2000/PR-xlink-20001220/#link-locators">Locator Attribute</a>
|
|
of <a href="#XLink">[XML Linking Language]</a> (see also Section 8
|
|
<a href="http://www.w3.org/TR/2001/WD-charmod-20010126/#sec-URIs">Character Encoding in URI References</a>
|
|
of <a href="#CharMod">[Character Model]</a>). This means
|
|
that a wide range of internationalized resource identifiers can be specified
|
|
when an <b>anyURI</b> is called for, and still be understood as
|
|
URIs per <a href="#RFC2396">[RFC 2396]</a>, as amended by <a href="#RFC2732">[RFC 2732]</a>,
|
|
where appropriate to identify resources.
|
|
</p>
|
|
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
Each URI scheme imposes specialized syntax rules for URIs in
|
|
that scheme, including restrictions on the syntax of allowed fragement
|
|
identifiers. Because it is
|
|
impractical for processors to check that a value is a
|
|
context-appropriate URI reference, this specification follows the
|
|
lead of <a href="#RFC2396">[RFC 2396]</a> (as amended by <a href="#RFC2732">[RFC 2732]</a>)
|
|
in this matter: such rules and restrictions are not part of type validity
|
|
and are not checked by <a href="#dt-minimally-conforming" class="termref"><span class="arrow">·</span>minimally conforming<span class="arrow">·</span></a> processors.
|
|
Thus in practice the above definition imposes only very modest obligations
|
|
on <a href="#dt-minimally-conforming" class="termref"><span class="arrow">·</span>minimally conforming<span class="arrow">·</span></a> processors.
|
|
|
|
</blockquote>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="anyURI-lexical-representation"></a>3.2.17.1 Lexical representation</h5>
|
|
<p>
|
|
The <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <b>anyURI</b> is
|
|
finite-length character sequences which, when the algorithm defined in
|
|
Section 5.4 of <a href="#XLink">[XML Linking Language]</a> is applied to them, result in strings
|
|
which are legal URIs according to <a href="#RFC2396">[RFC 2396]</a>, as amended by
|
|
<a href="#RFC2732">[RFC 2732]</a>.
|
|
</p>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
Spaces are, in principle, allowed in the <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>
|
|
of <b>anyURI</b>, however, their use is highly discouraged
|
|
(unless they are encoded by %20).
|
|
|
|
</blockquote>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="anyURI-facets"></a>3.2.17.2 Constraining facets</h5>
|
|
<p>
|
|
<strong>anyURI</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-length">length</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minLength">minLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxLength">maxLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="QName"></a>3.2.18 QName</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-QName">[Definition:] </a>
|
|
<b>QName</b> represents
|
|
<a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/#dt-qname">XML qualified names</a>.
|
|
The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>QName</b> is the set of
|
|
tuples {<a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/#dt-NSName">namespace name</a>,
|
|
<a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/#dt-localname">local part</a>},
|
|
where <a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/#dt-NSName">namespace name</a>
|
|
is an <a href="#anyURI">anyURI</a>
|
|
and <a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/#dt-localname">local part</a> is
|
|
an <a href="#NCName">NCName</a>.
|
|
|
|
The <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <b>QName</b> is the set
|
|
of strings that <a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a> the <a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-QName">
|
|
QName</a> production of <a href="#XMLNS">[Namespaces in XML]</a>.
|
|
</span>
|
|
</p>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
The mapping between literals in the <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> and
|
|
values in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>QName</b> requires
|
|
a namespace declaration to be in scope for the context in which <b>QName</b>
|
|
is used.
|
|
|
|
</blockquote>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="QName-facets"></a>3.2.18.1 Constraining facets</h5>
|
|
<p>
|
|
<strong>QName</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-length">length</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minLength">minLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxLength">maxLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="NOTATION"></a>3.2.19 NOTATION</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-NOTATION">[Definition:] </a>
|
|
<b>NOTATION</b>
|
|
represents the <a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-NotationType">NOTATION</a> attribute
|
|
type from <a href="#XML">[XML 1.0 (Second Edition)]</a>. The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
of <b>NOTATION</b> is the set <a href="#QName">QName</a>s. The
|
|
<a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <b>NOTATION</b> is the set
|
|
of all names of <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#declare-notation">notations</a>
|
|
declared in the current schema.
|
|
</span>
|
|
</p>
|
|
<div class="constraintnote">
|
|
<a name="enumeration-required-notation"></a><b>Schema Component Constraint: enumeration facet value required for NOTATION</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
It is an <a href="#dt-error" class="termref"><span class="arrow">·</span>error<span class="arrow">·</span></a> for <b>NOTATION</b>
|
|
to be used directly in a schema. Only datatypes that are
|
|
<a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <b>NOTATION</b> by
|
|
specifying a value for <a href="#dt-enumeration" class="termref"><span class="arrow">·</span>enumeration<span class="arrow">·</span></a> can be used
|
|
in a schema.
|
|
|
|
</div>
|
|
</div>
|
|
<p>
|
|
For compatibility (see <a href="#terminology">Terminology (§1.4)</a>) <b>NOTATION</b>
|
|
should be used only on attributes.
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="NOTATION-facets"></a>3.2.19.1 Constraining facets</h5>
|
|
<p>
|
|
<strong>NOTATION</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-length">length</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minLength">minLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxLength">maxLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="div2">
|
|
<h3 class="withToc">
|
|
<span class="nav"><a href="#built-in-primitive-datatypes" class="nav"><img alt="previous sub-section" src="previous.jpg"></a> </span><a name="built-in-derived"></a>3.3 Derived datatypes</h3>
|
|
<div class="localToc">
|
|
<div class="tocLine">3.3.1 <a href="#normalizedString">normalizedString</a>
|
|
</div>
|
|
<div class="tocLine">3.3.2 <a href="#token">token</a>
|
|
</div>
|
|
<div class="tocLine">3.3.3 <a href="#language">language</a>
|
|
</div>
|
|
<div class="tocLine">3.3.4 <a href="#NMTOKEN">NMTOKEN</a>
|
|
</div>
|
|
<div class="tocLine">3.3.5 <a href="#NMTOKENS">NMTOKENS</a>
|
|
</div>
|
|
<div class="tocLine">3.3.6 <a href="#Name">Name</a>
|
|
</div>
|
|
<div class="tocLine">3.3.7 <a href="#NCName">NCName</a>
|
|
</div>
|
|
<div class="tocLine">3.3.8 <a href="#ID">ID</a>
|
|
</div>
|
|
<div class="tocLine">3.3.9 <a href="#IDREF">IDREF</a>
|
|
</div>
|
|
<div class="tocLine">3.3.10 <a href="#IDREFS">IDREFS</a>
|
|
</div>
|
|
<div class="tocLine">3.3.11 <a href="#ENTITY">ENTITY</a>
|
|
</div>
|
|
<div class="tocLine">3.3.12 <a href="#ENTITIES">ENTITIES</a>
|
|
</div>
|
|
<div class="tocLine">3.3.13 <a href="#integer">integer</a>
|
|
</div>
|
|
<div class="tocLine">3.3.14 <a href="#nonPositiveInteger">nonPositiveInteger</a>
|
|
</div>
|
|
<div class="tocLine">3.3.15 <a href="#negativeInteger">negativeInteger</a>
|
|
</div>
|
|
<div class="tocLine">3.3.16 <a href="#long">long</a>
|
|
</div>
|
|
<div class="tocLine">3.3.17 <a href="#int">int</a>
|
|
</div>
|
|
<div class="tocLine">3.3.18 <a href="#short">short</a>
|
|
</div>
|
|
<div class="tocLine">3.3.19 <a href="#byte">byte</a>
|
|
</div>
|
|
<div class="tocLine">3.3.20 <a href="#nonNegativeInteger">nonNegativeInteger</a>
|
|
</div>
|
|
<div class="tocLine">3.3.21 <a href="#unsignedLong">unsignedLong</a>
|
|
</div>
|
|
<div class="tocLine">3.3.22 <a href="#unsignedInt">unsignedInt</a>
|
|
</div>
|
|
<div class="tocLine">3.3.23 <a href="#unsignedShort">unsignedShort</a>
|
|
</div>
|
|
<div class="tocLine">3.3.24 <a href="#unsignedByte">unsignedByte</a>
|
|
</div>
|
|
<div class="tocLine">3.3.25 <a href="#positiveInteger">positiveInteger</a>
|
|
</div>
|
|
</div>
|
|
<p>
|
|
This section gives conceptual definitions for all
|
|
<a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> datatypes
|
|
defined by this specification. The XML representation used to define
|
|
<a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> datatypes (whether
|
|
<a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> or <a href="#dt-user-derived" class="termref"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a>) is
|
|
given in section <a href="#xr-defn">XML Representation of Simple Type Definition Schema Components (§4.1.2)</a> and the complete
|
|
definitions of the <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
<a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> datatypes are provided in Appendix A
|
|
<a href="#schema">Schema for Datatype Definitions (normative) (§A)</a>.
|
|
</p>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="normalizedString"></a>3.3.1 normalizedString</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-normalizedString">[Definition:] </a>
|
|
<b>normalizedString</b>
|
|
represents white space normalized strings.
|
|
The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>normalizedString</b> is the
|
|
set of strings that do not
|
|
contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters.
|
|
The <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <b>normalizedString</b> is the
|
|
set of strings that do not
|
|
contain the carriage return (#xD) nor tab (#x9) characters.
|
|
The <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of <b>normalizedString</b> is <a href="#string">string</a>.
|
|
</span>
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="normalizedString-facets"></a>3.3.1.1 Constraining facets</h5>
|
|
<p>
|
|
<strong>normalizedString</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-length">length</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minLength">minLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxLength">maxLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="normalizedString-derived-types"></a>3.3.1.2 Derived datatypes</h5>
|
|
<p>
|
|
The following <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<strong>normalizedString</strong>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#token">token</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="token"></a>3.3.2 token</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-token">[Definition:] </a>
|
|
<b>token</b>
|
|
represents tokenized strings.
|
|
The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>token</b> is the
|
|
set of strings that do not
|
|
contain the line feed (#xA) nor tab (#x9) characters, that have no
|
|
leading or trailing spaces (#x20) and that have no internal sequences
|
|
of two or more spaces.
|
|
The <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <b>token</b> is the
|
|
set of strings that do not
|
|
contain the line feed (#xA) nor tab (#x9) characters, that have no
|
|
leading or trailing spaces (#x20) and that have no internal sequences
|
|
of two or more spaces.
|
|
The <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of <b>token</b> is <a href="#normalizedString">normalizedString</a>.
|
|
</span>
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="token-facets"></a>3.3.2.1 Constraining facets</h5>
|
|
<p>
|
|
<strong>token</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-length">length</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minLength">minLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxLength">maxLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="token-derived-types"></a>3.3.2.2 Derived datatypes</h5>
|
|
<p>
|
|
The following <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<strong>token</strong>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#language">language</a>
|
|
</li>
|
|
<li>
|
|
<a href="#NMTOKEN">NMTOKEN</a>
|
|
</li>
|
|
<li>
|
|
<a href="#Name">Name</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="language"></a>3.3.3 language</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-language">[Definition:] </a>
|
|
<b>language</b>
|
|
represents natural language identifiers as defined by
|
|
<a href="#RFC1766">[RFC 1766]</a>. The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<b>language</b> is the set of all strings that are valid
|
|
language identifiers as defined in the
|
|
<a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#sec-lang-tag">language identification</a>
|
|
section of <a href="#XML">[XML 1.0 (Second Edition)]</a>. The <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of
|
|
<b>language</b> is the set of all strings that are valid
|
|
language identifiers as defined in the
|
|
<a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#sec-lang-tag">language identification</a>
|
|
section of <a href="#XML">[XML 1.0 (Second Edition)]</a>.
|
|
The <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of <b>language</b> is <a href="#token">token</a>.
|
|
</span>
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="language-facets"></a>3.3.3.1 Constraining facets</h5>
|
|
<p>
|
|
<strong>language</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-length">length</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minLength">minLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxLength">maxLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="NMTOKEN"></a>3.3.4 NMTOKEN</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-NMTOKEN">[Definition:] </a>
|
|
<b>NMTOKEN</b> represents
|
|
the <a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-TokenizedType">NMTOKEN attribute type</a>
|
|
from <a href="#XML">[XML 1.0 (Second Edition)]</a>. The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<b>NMTOKEN</b> is the set of tokens that <a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a>
|
|
the <a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-Nmtoken">Nmtoken</a> production in
|
|
<a href="#XML">[XML 1.0 (Second Edition)]</a>. The <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of
|
|
<b>NMTOKEN</b> is the set of strings that <a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a>
|
|
the <a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-Nmtoken">Nmtoken</a> production in
|
|
<a href="#XML">[XML 1.0 (Second Edition)]</a>. The <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of
|
|
<b>NMTOKEN</b> is <a href="#token">token</a>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
For compatibility (see <a href="#terminology">Terminology (§1.4)</a>) <b>NMTOKEN</b>
|
|
should be used only on attributes.
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="NMTOKEN-facets"></a>3.3.4.1 Constraining facets</h5>
|
|
<p>
|
|
<strong>NMTOKEN</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-length">length</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minLength">minLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxLength">maxLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="NMTOKEN-derived-types"></a>3.3.4.2 Derived datatypes</h5>
|
|
<p>
|
|
The following <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<strong>NMTOKEN</strong>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#NMTOKENS">NMTOKENS</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="NMTOKENS"></a>3.3.5 NMTOKENS</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-NMTOKENS">[Definition:] </a>
|
|
<b>NMTOKENS</b>
|
|
represents the <a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-TokenizedType">NMTOKENS attribute
|
|
type</a> from <a href="#XML">[XML 1.0 (Second Edition)]</a>. The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
of <b>NMTOKENS</b> is the set of finite, non-zero-length sequences of
|
|
<a href="#dt-NMTOKEN" class="termref"><span class="arrow">·</span>NMTOKEN<span class="arrow">·</span></a>s. The <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>
|
|
of <b>NMTOKENS</b> is the set of white space separated lists of tokens,
|
|
of which each token is in the <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of
|
|
<a href="#NMTOKEN">NMTOKEN</a>. The <a href="#dt-itemType" class="termref"><span class="arrow">·</span>itemType<span class="arrow">·</span></a> of
|
|
<b>NMTOKENS</b> is <a href="#NMTOKEN">NMTOKEN</a>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
For compatibility (see <a href="#terminology">Terminology (§1.4)</a>)
|
|
<b>NMTOKENS</b> should be used only on attributes.
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="NMTOKENS-facets"></a>3.3.5.1 Constraining facets</h5>
|
|
<p>
|
|
<strong>NMTOKENS</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-length">length</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minLength">minLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxLength">maxLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="Name"></a>3.3.6 Name</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-Name">[Definition:] </a>
|
|
<b>Name</b>
|
|
represents <a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#dt-name">XML Names</a>.
|
|
The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>Name</b> is
|
|
the set of all strings which <a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a> the
|
|
<a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-Name">Name</a> production of
|
|
<a href="#XML">[XML 1.0 (Second Edition)]</a>. The <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of
|
|
<b>Name</b> is the set of all strings which <a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a>
|
|
the <a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-Name">Name</a> production of
|
|
<a href="#XML">[XML 1.0 (Second Edition)]</a>. The <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of <b>Name</b>
|
|
is <a href="#token">token</a>.
|
|
</span>
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="Name-facets"></a>3.3.6.1 Constraining facets</h5>
|
|
<p>
|
|
<strong>Name</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-length">length</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minLength">minLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxLength">maxLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="Name-derived-types"></a>3.3.6.2 Derived datatypes</h5>
|
|
<p>
|
|
The following <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<strong>Name</strong>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#NCName">NCName</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="NCName"></a>3.3.7 NCName</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-NCName">[Definition:] </a>
|
|
<b>NCName</b> represents XML
|
|
"non-colonized" Names. The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<b>NCName</b> is the set of all strings which <a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a>
|
|
the <a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName">NCName</a> production of
|
|
<a href="#XMLNS">[Namespaces in XML]</a>. The <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of
|
|
<b>NCName</b> is the set of all strings which <a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a>
|
|
the <a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName">NCName</a> production of
|
|
<a href="#XMLNS">[Namespaces in XML]</a>. The <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of
|
|
<b>NCName</b> is <a href="#Name">Name</a>.
|
|
</span>
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="NCName-facets"></a>3.3.7.1 Constraining facets</h5>
|
|
<p>
|
|
<strong>NCName</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-length">length</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minLength">minLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxLength">maxLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="NCName-derived-types"></a>3.3.7.2 Derived datatypes</h5>
|
|
<p>
|
|
The following <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<strong>NCName</strong>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#ID">ID</a>
|
|
</li>
|
|
<li>
|
|
<a href="#IDREF">IDREF</a>
|
|
</li>
|
|
<li>
|
|
<a href="#ENTITY">ENTITY</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="ID"></a>3.3.8 ID</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-ID">[Definition:] </a>
|
|
<b>ID</b> represents the
|
|
<a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-TokenizedType">ID attribute type</a> from
|
|
<a href="#XML">[XML 1.0 (Second Edition)]</a>. The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<b>ID</b> is the set of all strings that <a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a>
|
|
the <a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName">NCName</a> production in
|
|
<a href="#XMLNS">[Namespaces in XML]</a>. The
|
|
<a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <b>ID</b> is the set of all
|
|
strings that <a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a> the
|
|
<a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName">NCName</a> production in
|
|
<a href="#XMLNS">[Namespaces in XML]</a>.
|
|
The <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of <b>ID</b> is <a href="#NCName">NCName</a>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
For compatibility (see <a href="#terminology">Terminology (§1.4)</a>)
|
|
<b>ID</b> should be used only on attributes.
|
|
</p>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="ID-facets"></a>3.3.8.1 Constraining facets</h5>
|
|
<p>
|
|
<strong>ID</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-length">length</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minLength">minLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxLength">maxLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="IDREF"></a>3.3.9 IDREF</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-IDREF">[Definition:] </a>
|
|
<b>IDREF</b> represents the
|
|
<a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-TokenizedType">IDREF attribute type</a> from
|
|
<a href="#XML">[XML 1.0 (Second Edition)]</a>. The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<b>IDREF</b> is the set of all strings that <a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a>
|
|
the <a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName">NCName</a> production in
|
|
<a href="#XMLNS">[Namespaces in XML]</a>. The
|
|
<a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <b>IDREF</b> is the set of
|
|
strings that <a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a> the
|
|
<a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName">NCName</a> production in
|
|
<a href="#XMLNS">[Namespaces in XML]</a>.
|
|
The <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of <b>IDREF</b> is <a href="#NCName">NCName</a>.
|
|
</span>
|
|
</p>
|
|
|
|
<p>
|
|
For compatibility (see <a href="#terminology">Terminology (§1.4)</a>) this datatype
|
|
should be used only on attributes.
|
|
</p>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="IDREF-facets"></a>3.3.9.1 Constraining facets</h5>
|
|
<p>
|
|
<strong>IDREF</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-length">length</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minLength">minLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxLength">maxLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="IDREF-derived-types"></a>3.3.9.2 Derived datatypes</h5>
|
|
<p>
|
|
The following <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<strong>IDREF</strong>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#IDREFS">IDREFS</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="IDREFS"></a>3.3.10 IDREFS</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-IDREFS">[Definition:] </a>
|
|
<b>IDREFS</b> represents the
|
|
<a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-TokenizedType">IDREFS attribute type</a> from
|
|
<a href="#XML">[XML 1.0 (Second Edition)]</a>. The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<b>IDREFS</b> is the set of finite, non-zero-length sequences of
|
|
<a href="#IDREF">IDREF</a>s.
|
|
The <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <b>IDREFS</b> is the
|
|
set of white space separated lists of tokens, of which each token is in the
|
|
<a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <a href="#IDREF">IDREF</a>.
|
|
The <a href="#dt-itemType" class="termref"><span class="arrow">·</span>itemType<span class="arrow">·</span></a> of <b>IDREFS</b> is
|
|
<a href="#IDREF">IDREF</a>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
For compatibility (see <a href="#terminology">Terminology (§1.4)</a>) <b>IDREFS</b>
|
|
should be used only on attributes.
|
|
</p>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="IDREFS-facets"></a>3.3.10.1 Constraining facets</h5>
|
|
<p>
|
|
<strong>IDREFS</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-length">length</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minLength">minLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxLength">maxLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="ENTITY"></a>3.3.11 ENTITY</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-ENTITY">[Definition:] </a>
|
|
<b>ENTITY</b> represents the
|
|
<a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-TokenizedType">ENTITY</a> attribute type from
|
|
<a href="#XML">[XML 1.0 (Second Edition)]</a>. The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<b>ENTITY</b> is the set of all strings that <a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a>
|
|
the <a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName">NCName</a> production in
|
|
<a href="#XMLNS">[Namespaces in XML]</a> and have been declared as an
|
|
<a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#dt-unparsed">unparsed entity</a> in
|
|
a <a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#dt-doctype">document type definition</a>.
|
|
The <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <b>ENTITY</b> is the set
|
|
of all strings that <a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a> the
|
|
<a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName">NCName</a> production in
|
|
<a href="#XMLNS">[Namespaces in XML]</a>.
|
|
The <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of <b>ENTITY</b> is <a href="#NCName">NCName</a>.
|
|
</span>
|
|
</p>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>ENTITY</b> is scoped
|
|
to a specific instance document.
|
|
|
|
</blockquote>
|
|
<p>
|
|
For compatibility (see <a href="#terminology">Terminology (§1.4)</a>) <b>ENTITY</b>
|
|
should be used only on attributes.
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="ENTITY-facets"></a>3.3.11.1 Constraining facets</h5>
|
|
<p>
|
|
<strong>ENTITY</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-length">length</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minLength">minLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxLength">maxLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="ENTITY-derived-types"></a>3.3.11.2 Derived datatypes</h5>
|
|
<p>
|
|
The following <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<strong>ENTITY</strong>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#ENTITIES">ENTITIES</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="ENTITIES"></a>3.3.12 ENTITIES</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-ENTITIES">[Definition:] </a>
|
|
<b>ENTITIES</b>
|
|
represents the <a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-TokenizedType">ENTITIES attribute
|
|
type</a> from <a href="#XML">[XML 1.0 (Second Edition)]</a>. The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
of <b>ENTITIES</b> is the set of finite, non-zero-length sequences of
|
|
<a href="#dt-ENTITY" class="termref"><span class="arrow">·</span>ENTITY<span class="arrow">·</span></a>s that have been declared as
|
|
<a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#dt-unparsed">unparsed entities</a>
|
|
in a <a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#dt-doctype">document type definition</a>.
|
|
The <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <b>ENTITIES</b> is the
|
|
set of white space separated lists of tokens, of which each token is in the
|
|
<a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <a href="#ENTITY">ENTITY</a>.
|
|
The <a href="#dt-itemType" class="termref"><span class="arrow">·</span>itemType<span class="arrow">·</span></a> of <b>ENTITIES</b> is
|
|
<a href="#ENTITY">ENTITY</a>.
|
|
</span>
|
|
</p>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>ENTITIES</b> is scoped
|
|
to a specific instance document.
|
|
|
|
</blockquote>
|
|
<p>
|
|
For compatibility (see <a href="#terminology">Terminology (§1.4)</a>) <b>ENTITIES</b>
|
|
should be used only on attributes.
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="ENTITIES-facets"></a>3.3.12.1 Constraining facets</h5>
|
|
<p>
|
|
<strong>ENTITIES</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-length">length</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minLength">minLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxLength">maxLength</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="integer"></a>3.3.13 integer</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-integer">[Definition:] </a>
|
|
<b>integer</b> is
|
|
<a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#decimal">decimal</a> by fixing the
|
|
value of <a href="#dt-fractionDigits" class="termref"><span class="arrow">·</span>fractionDigits<span class="arrow">·</span></a> to be 0. This results in the standard
|
|
mathematical concept of the integer numbers. The
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>integer</b> is the infinite
|
|
set {...,-2,-1,0,1,2,...}. The <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of
|
|
<b>integer</b> is <a href="#decimal">decimal</a>.
|
|
</span>
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="integer-lexical-representation"></a>3.3.13.1 Lexical representation</h5>
|
|
<p>
|
|
<b>integer</b> has a lexical representation consisting of a finite-length sequence
|
|
of decimal digits (#x30-#x39) with an optional leading sign. If the sign is omitted,
|
|
"+" is assumed. For example: -1, 0, 12678967543233, +100000.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="integer-canonical-repr"></a>3.3.13.2 Canonical representation</h5>
|
|
<p>
|
|
The canonical representation for <b>integer</b> is defined
|
|
by prohibiting certain options from the
|
|
<a href="#integer-lexical-representation">Lexical representation (§3.3.13.1)</a>. Specifically, the preceding optional "+" sign is prohibited and leading zeroes are prohibited.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="integer-facets"></a>3.3.13.3 Constraining facets</h5>
|
|
<p>
|
|
<strong>integer</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-totalDigits">totalDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-fractionDigits">fractionDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="integer-derived-types"></a>3.3.13.4 Derived datatypes</h5>
|
|
<p>
|
|
The following <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<strong>integer</strong>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#nonPositiveInteger">nonPositiveInteger</a>
|
|
</li>
|
|
<li>
|
|
<a href="#long">long</a>
|
|
</li>
|
|
<li>
|
|
<a href="#nonNegativeInteger">nonNegativeInteger</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="nonPositiveInteger"></a>3.3.14 nonPositiveInteger</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-nonPositiveInteger">[Definition:] </a>
|
|
<b>nonPositiveInteger</b> is <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<a href="#integer">integer</a> by setting the value of
|
|
<a href="#dt-maxInclusive" class="termref"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> to be 0. This results in the
|
|
standard mathematical concept of the non-positive integers.
|
|
The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>nonPositiveInteger</b>
|
|
is the infinite set {...,-2,-1,0}. The <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a>
|
|
of <b>nonPositiveInteger</b> is <a href="#integer">integer</a>.
|
|
</span>
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="nonPositiveInteger-lexical-representation"></a>3.3.14.1 Lexical representation</h5>
|
|
<p>
|
|
<b>nonPositiveInteger</b> has a lexical representation consisting
|
|
of a negative sign ("-") followed by a finite-length
|
|
sequence of decimal digits (#x30-#x39). If the sequence of digits consists of all
|
|
zeros then the sign is optional.
|
|
For example: -1, 0, -12678967543233, -100000.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="nonPositiveInteger-canonical-repr"></a>3.3.14.2 Canonical representation</h5>
|
|
<p>
|
|
The canonical representation for <b>nonPositiveInteger</b> is defined
|
|
by prohibiting certain options from the
|
|
<a href="#nonPositiveInteger-lexical-representation">Lexical representation (§3.3.14.1)</a>. Specifically, the
|
|
negative sign ("-") is required with the token "0" and leading zeroes are prohibited.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="nonPositiveInteger-facets"></a>3.3.14.3 Constraining facets</h5>
|
|
<p>
|
|
<strong>nonPositiveInteger</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-totalDigits">totalDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-fractionDigits">fractionDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="nonPositiveInteger-derived-types"></a>3.3.14.4 Derived datatypes</h5>
|
|
<p>
|
|
The following <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<strong>nonPositiveInteger</strong>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#negativeInteger">negativeInteger</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="negativeInteger"></a>3.3.15 negativeInteger</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-negativeInteger">[Definition:] </a>
|
|
<b>negativeInteger</b> is <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<a href="#nonPositiveInteger">nonPositiveInteger</a> by setting the value of
|
|
<a href="#dt-maxInclusive" class="termref"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> to be -1. This results in the
|
|
standard mathematical concept of the negative integers. The
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>negativeInteger</b>
|
|
is the infinite set {...,-2,-1}. The <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a>
|
|
of <b>negativeInteger</b> is <a href="#nonPositiveInteger">nonPositiveInteger</a>.
|
|
</span>
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="negativeInteger-lexical-representation"></a>3.3.15.1 Lexical representation</h5>
|
|
<p>
|
|
<b>negativeInteger</b> has a lexical representation consisting
|
|
of a negative sign ("-") followed by a finite-length
|
|
sequence of decimal digits (#x30-#x39). For example: -1, -12678967543233, -100000.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="negativeInteger-canonical-repr"></a>3.3.15.2 Canonical representation</h5>
|
|
<p>
|
|
The canonical representation for <b>negativeInteger</b> is defined
|
|
by prohibiting certain options from the
|
|
<a href="#negativeInteger-lexical-representation">Lexical representation (§3.3.15.1)</a>. Specifically, leading zeroes are prohibited.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="negativeInteger-facets"></a>3.3.15.3 Constraining facets</h5>
|
|
<p>
|
|
<strong>negativeInteger</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-totalDigits">totalDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-fractionDigits">fractionDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="long"></a>3.3.16 long</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-long">[Definition:] </a>
|
|
<b>long</b> is
|
|
<a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#integer">integer</a> by setting the
|
|
value of <a href="#dt-maxInclusive" class="termref"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> to be 9223372036854775807
|
|
and <a href="#dt-minInclusive" class="termref"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> to be -9223372036854775808.
|
|
The <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of <b>long</b> is
|
|
<a href="#integer">integer</a>.
|
|
</span>
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="long-lexical-representation"></a>3.3.16.1 Lexical representation</h5>
|
|
<p>
|
|
<b>long</b> has a lexical representation consisting
|
|
of an optional sign followed by a finite-length
|
|
sequence of decimal digits (#x30-#x39). If the sign is omitted, "+" is assumed.
|
|
For example: -1, 0,
|
|
12678967543233, +100000.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="long-canonical-repr"></a>3.3.16.2 Canonical representation</h5>
|
|
<p>
|
|
The canonical representation for <b>long</b> is defined
|
|
by prohibiting certain options from the
|
|
<a href="#long-lexical-representation">Lexical representation (§3.3.16.1)</a>. Specifically, the
|
|
the optional "+" sign is prohibited and leading zeroes are prohibited.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="long-facets"></a>3.3.16.3 Constraining facets</h5>
|
|
<p>
|
|
<strong>long</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-totalDigits">totalDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-fractionDigits">fractionDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="long-derived-types"></a>3.3.16.4 Derived datatypes</h5>
|
|
<p>
|
|
The following <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<strong>long</strong>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#int">int</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="int"></a>3.3.17 int</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-int">[Definition:] </a>
|
|
<b>int</b>
|
|
is <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#long">long</a> by setting the
|
|
value of <a href="#dt-maxInclusive" class="termref"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> to be 2147483647 and
|
|
<a href="#dt-minInclusive" class="termref"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> to be -2147483648. The
|
|
<a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of <b>int</b> is <a href="#long">long</a>.
|
|
</span>
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="int-lexical-representation"></a>3.3.17.1 Lexical representation</h5>
|
|
<p>
|
|
<b>int</b> has a lexical representation consisting
|
|
of an optional sign followed by a finite-length
|
|
sequence of decimal digits (#x30-#x39). If the sign is omitted, "+" is assumed.
|
|
For example: -1, 0,
|
|
126789675, +100000.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="int-canonical-repr"></a>3.3.17.2 Canonical representation</h5>
|
|
<p>
|
|
The canonical representation for <b>int</b> is defined
|
|
by prohibiting certain options from the
|
|
<a href="#int-lexical-representation">Lexical representation (§3.3.17.1)</a>. Specifically, the
|
|
the optional "+" sign is prohibited and leading zeroes are prohibited.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="int-facets"></a>3.3.17.3 Constraining facets</h5>
|
|
<p>
|
|
<strong>int</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-totalDigits">totalDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-fractionDigits">fractionDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="int-derived-types"></a>3.3.17.4 Derived datatypes</h5>
|
|
<p>
|
|
The following <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<strong>int</strong>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#short">short</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="short"></a>3.3.18 short</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-short">[Definition:] </a>
|
|
<b>short</b> is
|
|
<a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#int">int</a> by setting the
|
|
value of <a href="#dt-maxInclusive" class="termref"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> to be 32767 and
|
|
<a href="#dt-minInclusive" class="termref"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> to be -32768. The
|
|
<a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of <b>short</b> is
|
|
<a href="#int">int</a>.
|
|
</span>
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="short-lexical-representation"></a>3.3.18.1 Lexical representation</h5>
|
|
<p>
|
|
<b>short</b> has a lexical representation consisting
|
|
of an optional sign followed by a finite-length sequence of decimal
|
|
digits (#x30-#x39). If the sign is omitted, "+" is assumed.
|
|
For example: -1, 0, 12678, +10000.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="short-canonical-repr"></a>3.3.18.2 Canonical representation</h5>
|
|
<p>
|
|
The canonical representation for <b>short</b> is defined
|
|
by prohibiting certain options from the
|
|
<a href="#short-lexical-representation">Lexical representation (§3.3.18.1)</a>. Specifically, the
|
|
the optional "+" sign is prohibited and leading zeroes are prohibited.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="short-facets"></a>3.3.18.3 Constraining facets</h5>
|
|
<p>
|
|
<strong>short</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-totalDigits">totalDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-fractionDigits">fractionDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="short-derived-types"></a>3.3.18.4 Derived datatypes</h5>
|
|
<p>
|
|
The following <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<strong>short</strong>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#byte">byte</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="byte"></a>3.3.19 byte</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-byte">[Definition:] </a>
|
|
<b>byte</b>
|
|
is <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#short">short</a>
|
|
by setting the value of <a href="#dt-maxInclusive" class="termref"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> to be 127
|
|
and <a href="#dt-minInclusive" class="termref"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> to be -128.
|
|
The <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of <b>byte</b> is
|
|
<a href="#short">short</a>.
|
|
</span>
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="byte-lexical-representation"></a>3.3.19.1 Lexical representation</h5>
|
|
<p>
|
|
<b>byte</b> has a lexical representation consisting
|
|
of an optional sign followed by a finite-length
|
|
sequence of decimal digits (#x30-#x39). If the sign is omitted, "+" is assumed.
|
|
For example: -1, 0,
|
|
126, +100.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="byte-canonical-repr"></a>3.3.19.2 Canonical representation</h5>
|
|
<p>
|
|
The canonical representation for <b>byte</b> is defined
|
|
by prohibiting certain options from the
|
|
<a href="#byte-lexical-representation">Lexical representation (§3.3.19.1)</a>. Specifically, the
|
|
the optional "+" sign is prohibited and leading zeroes are prohibited.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="byte-facets"></a>3.3.19.3 Constraining facets</h5>
|
|
<p>
|
|
<strong>byte</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-totalDigits">totalDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-fractionDigits">fractionDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="nonNegativeInteger"></a>3.3.20 nonNegativeInteger</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-nonNegativeInteger">[Definition:] </a>
|
|
<b>nonNegativeInteger</b> is <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<a href="#integer">integer</a> by setting the value of
|
|
<a href="#dt-minInclusive" class="termref"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> to be 0. This results in the
|
|
standard mathematical concept of the non-negative integers. The
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>nonNegativeInteger</b>
|
|
is the infinite set {0,1,2,...}. The <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of
|
|
<b>nonNegativeInteger</b> is <a href="#integer">integer</a>.
|
|
</span>
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="nonNegativeInteger-lexical-representation"></a>3.3.20.1 Lexical representation</h5>
|
|
<p>
|
|
<b>nonNegativeInteger</b> has a lexical representation consisting
|
|
of an optional sign followed by a finite-length
|
|
sequence of decimal digits (#x30-#x39). If the sign is omitted, "+" is assumed.
|
|
For example:
|
|
1, 0, 12678967543233, +100000.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="nonNegativeInteger-canonical-repr"></a>3.3.20.2 Canonical representation</h5>
|
|
<p>
|
|
The canonical representation for <b>nonNegativeInteger</b> is defined
|
|
by prohibiting certain options from the
|
|
<a href="#nonNegativeInteger-lexical-representation">Lexical representation (§3.3.20.1)</a>. Specifically, the
|
|
the optional "+" sign is prohibited and leading zeroes are prohibited.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="nonNegativeInteger-facets"></a>3.3.20.3 Constraining facets</h5>
|
|
<p>
|
|
<strong>nonNegativeInteger</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-totalDigits">totalDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-fractionDigits">fractionDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="nonNegativeInteger-derived-types"></a>3.3.20.4 Derived datatypes</h5>
|
|
<p>
|
|
The following <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<strong>nonNegativeInteger</strong>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#unsignedLong">unsignedLong</a>
|
|
</li>
|
|
<li>
|
|
<a href="#positiveInteger">positiveInteger</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="unsignedLong"></a>3.3.21 unsignedLong</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-unsignedLong">[Definition:] </a>
|
|
<b>unsignedLong</b> is <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<a href="#nonNegativeInteger">nonNegativeInteger</a> by setting the value of
|
|
<a href="#dt-maxInclusive" class="termref"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> to be 18446744073709551615.
|
|
The <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of <b>unsignedLong</b> is
|
|
<a href="#nonNegativeInteger">nonNegativeInteger</a>.
|
|
</span>
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="unsignedLong-lexical-representation"></a>3.3.21.1 Lexical representation</h5>
|
|
<p>
|
|
<b>unsignedLong</b> has a lexical representation consisting
|
|
of a finite-length sequence of decimal digits (#x30-#x39).
|
|
For example: 0,
|
|
12678967543233, 100000.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="unsignedLong-canonical-repr"></a>3.3.21.2 Canonical representation</h5>
|
|
<p>
|
|
The canonical representation for <b>unsignedLong</b> is defined
|
|
by prohibiting certain options from the
|
|
<a href="#unsignedLong-lexical-representation">Lexical representation (§3.3.21.1)</a>. Specifically,
|
|
leading zeroes are prohibited.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="unsignedLong-facets"></a>3.3.21.3 Constraining facets</h5>
|
|
<p>
|
|
<strong>unsignedLong</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-totalDigits">totalDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-fractionDigits">fractionDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="unsignedLong-derived-types"></a>3.3.21.4 Derived datatypes</h5>
|
|
<p>
|
|
The following <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<strong>unsignedLong</strong>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#unsignedInt">unsignedInt</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="unsignedInt"></a>3.3.22 unsignedInt</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-unsignedInt">[Definition:] </a>
|
|
<b>unsignedInt</b> is <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<a href="#unsignedLong">unsignedLong</a> by setting the value of
|
|
<a href="#dt-maxInclusive" class="termref"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> to be 4294967295. The
|
|
<a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of <b>unsignedInt</b> is
|
|
<a href="#unsignedLong">unsignedLong</a>.
|
|
</span>
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="unsignedInt-lexical-representation"></a>3.3.22.1 Lexical representation</h5>
|
|
<p>
|
|
<b>unsignedInt</b> has a lexical representation consisting
|
|
of a finite-length
|
|
sequence of decimal digits (#x30-#x39). For example: 0,
|
|
1267896754, 100000.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="unsignedInt-canonical-repr"></a>3.3.22.2 Canonical representation</h5>
|
|
<p>
|
|
The canonical representation for <b>unsignedInt</b> is defined
|
|
by prohibiting certain options from the
|
|
<a href="#unsignedInt-lexical-representation">Lexical representation (§3.3.22.1)</a>. Specifically,
|
|
leading zeroes are prohibited.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="unsignedInt-facets"></a>3.3.22.3 Constraining facets</h5>
|
|
<p>
|
|
<strong>unsignedInt</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-totalDigits">totalDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-fractionDigits">fractionDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="unsignedInt-derived-types"></a>3.3.22.4 Derived datatypes</h5>
|
|
<p>
|
|
The following <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<strong>unsignedInt</strong>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#unsignedShort">unsignedShort</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="unsignedShort"></a>3.3.23 unsignedShort</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-unsignedShort">[Definition:] </a>
|
|
<b>unsignedShort</b> is <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<a href="#unsignedInt">unsignedInt</a> by setting the value of
|
|
<a href="#dt-maxInclusive" class="termref"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> to be 65535. The
|
|
<a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of <b>unsignedShort</b> is
|
|
<a href="#unsignedInt">unsignedInt</a>.
|
|
</span>
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="unsignedShort-lexical-representation"></a>3.3.23.1 Lexical representation</h5>
|
|
<p>
|
|
<b>unsignedShort</b> has a lexical representation consisting
|
|
of a finite-length
|
|
sequence of decimal digits (#x30-#x39).
|
|
For example: 0,
|
|
12678, 10000.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="unsignedShort-canonical-repr"></a>3.3.23.2 Canonical representation</h5>
|
|
<p>
|
|
The canonical representation for <b>unsignedShort</b> is defined
|
|
by prohibiting certain options from the
|
|
<a href="#unsignedShort-lexical-representation">Lexical representation (§3.3.23.1)</a>. Specifically, the
|
|
leading zeroes are prohibited.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="unsingedShort-facets"></a>3.3.23.3 Constraining facets</h5>
|
|
<p>
|
|
<strong>unsignedShort</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-totalDigits">totalDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-fractionDigits">fractionDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="unsignedShort-derived-types"></a>3.3.23.4 Derived datatypes</h5>
|
|
<p>
|
|
The following <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<strong>unsignedShort</strong>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#unsignedByte">unsignedByte</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="unsignedByte"></a>3.3.24 unsignedByte</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-unsignedByte">[Definition:] </a>
|
|
<b>unsignedByte</b> is <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<a href="#unsignedShort">unsignedShort</a> by setting the value of
|
|
<a href="#dt-maxInclusive" class="termref"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> to be 255. The
|
|
<a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of <b>unsignedByte</b> is
|
|
<a href="#unsignedShort">unsignedShort</a>.
|
|
</span>
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="unsignedByte-lexical-representation"></a>3.3.24.1 Lexical representation</h5>
|
|
<p>
|
|
<b>unsignedByte</b> has a lexical representation consisting
|
|
of a finite-length
|
|
sequence of decimal digits (#x30-#x39).
|
|
For example: 0,
|
|
126, 100.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="unsignedByte-canonical-repr"></a>3.3.24.2 Canonical representation</h5>
|
|
<p>
|
|
The canonical representation for <b>unsignedByte</b> is defined
|
|
by prohibiting certain options from the
|
|
<a href="#unsignedByte-lexical-representation">Lexical representation (§3.3.24.1)</a>. Specifically,
|
|
leading zeroes are prohibited.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="unisngedByte-facets"></a>3.3.24.3 Constraining facets</h5>
|
|
<p>
|
|
<strong>unsignedByte</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-totalDigits">totalDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-fractionDigits">fractionDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="positiveInteger"></a>3.3.25 positiveInteger</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-positiveInteger">[Definition:] </a>
|
|
<b>positiveInteger</b> is <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<a href="#nonNegativeInteger">nonNegativeInteger</a> by setting the value of
|
|
<a href="#dt-minInclusive" class="termref"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> to be 1. This results in the standard
|
|
mathematical concept of the positive integer numbers.
|
|
The <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>positiveInteger</b>
|
|
is the infinite set {1,2,...}. The <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of
|
|
<b>positiveInteger</b> is <a href="#nonNegativeInteger">nonNegativeInteger</a>.
|
|
</span>
|
|
</p>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="positiveInteger-lexical-representation"></a>3.3.25.1 Lexical representation</h5>
|
|
<p>
|
|
<b>positiveInteger</b> has a lexical representation consisting
|
|
of an optional positive sign ("+") followed by a finite-length
|
|
sequence of decimal digits (#x30-#x39).
|
|
For example: 1, 12678967543233, +100000.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="positiveInteger-canonical-repr"></a>3.3.25.2 Canonical representation</h5>
|
|
<p>
|
|
The canonical representation for <b>positiveInteger</b> is defined
|
|
by prohibiting certain options from the
|
|
<a href="#positiveInteger-lexical-representation">Lexical representation (§3.3.25.1)</a>. Specifically, the
|
|
optional "+" sign is prohibited and leading zeroes are prohibited.
|
|
</p>
|
|
</div>
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="positiveInteger-facets"></a>3.3.25.3 Constraining facets</h5>
|
|
<p>
|
|
<strong>positiveInteger</strong> has the
|
|
following <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facets<span class="arrow">·</span></a>:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#rf-totalDigits">totalDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-fractionDigits">fractionDigits</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-pattern">pattern</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-whiteSpace">whiteSpace</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-enumeration">enumeration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxInclusive">maxInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-maxExclusive">maxExclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minInclusive">minInclusive</a>
|
|
</li>
|
|
<li>
|
|
<a href="#rf-minExclusive">minExclusive</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div1">
|
|
<h2>
|
|
<a name="datatype-components"></a>4 Datatype components</h2>
|
|
<p>
|
|
The following sections provide full details on the properties and
|
|
significance of each kind of schema component involved in datatype
|
|
definitions. For each property, the kinds of values it is allowed to have is
|
|
specified. Any property not identified as optional is required to
|
|
be present; optional properties which are not present have
|
|
<a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-null">absent</a> as their value.
|
|
Any property identified as a having a set, subset or <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a>
|
|
value may have an empty value unless this is explicitly ruled out: this is
|
|
not the same as <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-null">absent</a>.
|
|
Any property value identified as a superset or a subset of some set may
|
|
be equal to that set, unless a proper superset or subset is explicitly
|
|
called for.
|
|
</p>
|
|
|
|
<p>
|
|
For more information on the notion of datatype (schema) components,
|
|
see <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#components">Schema Component Details</a>
|
|
of <a href="#structural-schemas">[XML Schema Part 1: Structures]</a>.
|
|
</p>
|
|
|
|
<div class="div2">
|
|
<h3 class="withToc">
|
|
<span class="nav"> <a href="#rf-fund-facets" class="nav"><img alt="next sub-section" src="next.jpg"></a></span><a name="rf-defn"></a>4.1 Simple Type Definition</h3>
|
|
<div class="localToc">
|
|
<div class="tocLine">4.1.1 <a href="#dc-defn">The Simple Type Definition Schema Component</a>
|
|
</div>
|
|
<div class="tocLine">4.1.2 <a href="#xr-defn">XML Representation of Simple Type Definition Schema Components</a>
|
|
</div>
|
|
<div class="tocLine">4.1.3 <a href="#defn-rep-constr">Constraints on XML Representation of Simple Type Definition</a>
|
|
</div>
|
|
<div class="tocLine">4.1.4 <a href="#defn-validation-rules">Simple Type Definition Validation Rules</a>
|
|
</div>
|
|
<div class="tocLine">4.1.5 <a href="#defn-coss">Constraints on Simple Type Definition Schema Components</a>
|
|
</div>
|
|
<div class="tocLine">4.1.6 <a href="#anySimpleType-component">Simple Type Definition for anySimpleType</a>
|
|
</div>
|
|
</div>
|
|
<p>
|
|
Simple Type definitions provide for:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
Establishing the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> and <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>
|
|
of a datatype, through
|
|
the combined set of <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s specified
|
|
in the definition;
|
|
|
|
</li>
|
|
<li>
|
|
|
|
Attaching a unique name (actually a <a href="#QName">QName</a>) to the
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> and <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>.
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="dc-defn"></a>4.1.1 The Simple Type Definition Schema Component</h4>
|
|
<p>
|
|
The Simple Type Definition schema component has the following properties:
|
|
</p>
|
|
<div class="schemaComp">
|
|
<div class="compHeader">
|
|
<span class="schemaComp">Schema Component</span>: <a href="#datatype">Simple Type Definition</a>
|
|
</div>
|
|
<div class="compBody">
|
|
<dl class="props">
|
|
<dt>
|
|
<a name="defn-name"><span class="propdef">{name}</span></a>
|
|
</dt>
|
|
<dd>
|
|
Optional. An NCName as defined by
|
|
<a href="#XMLNS">[Namespaces in XML]</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="defn-target-namespace"><span class="propdef">{target namespace}</span></a>
|
|
</dt>
|
|
<dd>
|
|
Either <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-null">absent</a> or a
|
|
namespace name, as defined in <a href="#XMLNS">[Namespaces in XML]</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="defn-variety"><span class="propdef">{variety}</span></a>
|
|
</dt>
|
|
<dd>
|
|
One of {<i>atomic</i>, <i>list</i>, <i>union</i>}. Depending on the
|
|
value of <a href="#defn-variety" class="propref">{variety}</a>, further properties are defined as follows:
|
|
<dl>
|
|
|
|
<dt>
|
|
<b>atomic</b>
|
|
</dt>
|
|
<dd>
|
|
<dl class="props">
|
|
<dt>
|
|
<a name="defn-primitive"><span class="propdef">{primitive type definition}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> <a href="#dt-primitive" class="termref"><span class="arrow">·</span>primitive<span class="arrow">·</span></a>
|
|
datatype definition (or the <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#simple-ur-type-itself">
|
|
simple ur-type definition</a>).
|
|
</dd>
|
|
</dl>
|
|
</dd>
|
|
|
|
|
|
<dt>
|
|
<b>list</b>
|
|
</dt>
|
|
<dd>
|
|
|
|
<dl class="props">
|
|
<dt>
|
|
<a name="defn-itemType"><span class="propdef">{item type definition}</span></a>
|
|
</dt>
|
|
<dd>
|
|
An <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> or <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a> simple type definition.
|
|
</dd>
|
|
</dl>
|
|
</dd>
|
|
|
|
|
|
<dt>
|
|
<b>union</b>
|
|
</dt>
|
|
<dd>
|
|
<dl class="props">
|
|
<dt>
|
|
<a name="defn-memberTypes"><span class="propdef">{member type definitions}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A non-empty sequence of simple type definitions.
|
|
</dd>
|
|
</dl>
|
|
</dd>
|
|
|
|
</dl>
|
|
</dd>
|
|
<dt>
|
|
<a name="defn-facets"><span class="propdef">{facets}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A possibly empty set of <a href="#facets">Facets (§2.4)</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="defn-fund-facets"><span class="propdef">{fundamental facets}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A set of <a href="#fundamental-facets">Fundamental facets (§2.4.1)</a>
|
|
</dd>
|
|
<dt>
|
|
<a name="defn-basetype"><span class="propdef">{base type definition}</span></a>
|
|
</dt>
|
|
<dd>
|
|
If the datatype has been <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> by
|
|
<a href="#dt-restriction" class="termref"><span class="arrow">·</span>restriction<span class="arrow">·</span></a> then the <a href="#dc-defn">Simple Type Definition</a> component
|
|
from which it is <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>, otherwise
|
|
the <a href="#anySimpleType-component">Simple Type Definition for anySimpleType (§4.1.6)</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="defn-final"><span class="propdef">{final}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A subset of <i>{restriction, list, union}</i>.
|
|
</dd>
|
|
<dt>
|
|
<a name="defn-annotation"><span class="propdef">{annotation}</span></a>
|
|
</dt>
|
|
<dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
<p>
|
|
Datatypes are identified by their <a href="#defn-name" class="propref">{name}</a>
|
|
and <a href="#defn-target-namespace" class="propref">{target namespace}</a>. Except
|
|
for anonymous datatypes (those with no <a href="#defn-name" class="propref">{name}</a>),
|
|
datatype definitions <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be uniquely identified
|
|
within a schema.
|
|
</p>
|
|
<p>
|
|
If <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a>
|
|
then the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the datatype defined will
|
|
be a subset of the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<a href="#defn-basetype" class="propref">{base type definition}</a> (which is a subset of the
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <a href="#defn-primitive" class="propref">{primitive type definition}</a>).
|
|
If <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a>
|
|
then the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the datatype defined will
|
|
be the set of finite-length sequence of values from the
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <a href="#defn-itemType" class="propref">{item type definition}</a>.
|
|
If <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a> then the
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the datatype defined will be the
|
|
union of the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s of each datatype in
|
|
<a href="#defn-memberTypes" class="propref">{member type definitions}</a>.
|
|
</p>
|
|
<p>
|
|
If <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a>
|
|
then the <a href="#defn-variety" class="propref">{variety}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>
|
|
must be <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a>.
|
|
If <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a>
|
|
then the <a href="#defn-variety" class="propref">{variety}</a> of <a href="#defn-itemType" class="propref">{item type definition}</a>
|
|
must be either <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> or <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a>.
|
|
If <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a>
|
|
then
|
|
<a href="#defn-memberTypes" class="propref">{member type definitions}</a> must be a list of datatype definitions.
|
|
</p>
|
|
<p>
|
|
The value of <a href="#defn-facets" class="propref">{facets}</a> consists of the set of
|
|
<a href="#dt-facet" class="termref"><span class="arrow">·</span>facet<span class="arrow">·</span></a>s specified directly in the datatype definition
|
|
unioned with the possibly empty set of <a href="#defn-facets" class="propref">{facets}</a> of
|
|
<a href="#defn-basetype" class="propref">{base type definition}</a>.
|
|
</p>
|
|
<p>
|
|
The value of <a href="#defn-fund-facets" class="propref">{fundamental facets}</a> consists of the set of
|
|
<a href="#dt-fundamental-facet" class="termref"><span class="arrow">·</span>fundamental facet<span class="arrow">·</span></a>s and their values.
|
|
</p>
|
|
<p>
|
|
If <a href="#defn-final" class="propref">{final}</a> is the empty set then the type can be used
|
|
in deriving other types; the explicit values <i>restriction</i>,
|
|
<i>list</i> and <i>union</i> prevent further derivations
|
|
by <a href="#dt-restriction" class="termref"><span class="arrow">·</span>restriction<span class="arrow">·</span></a>, <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> and
|
|
<a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a> respectively.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="xr-defn"></a>4.1.2 XML Representation of Simple Type Definition Schema Components</h4>
|
|
|
|
<p>
|
|
The XML representation for a <a href="#dc-defn">Simple Type Definition</a> schema component
|
|
is a <a href="#element-simpleType" class="eltref"><simpleType></a> element information item. The
|
|
correspondences between the properties of the information item and
|
|
properties of the component are as follows:
|
|
</p>
|
|
<div class="reprdef">
|
|
<div class="reprHeader">
|
|
<span class="reprdef">XML Representation Summary</span>: <code>simpleType</code> Element Information Item</div>
|
|
<div class="reprBody">
|
|
<p class="element-syntax-1">
|
|
<a name="element-simpleType"><simpleType</a>
|
|
<br> final =
|
|
|
|
(<var>#all</var> | (<var>list</var> | <var>union</var> | <var>restriction</var>))
|
|
<br> id = <a href="#ID">ID</a>
|
|
<br> <b>name</b> = <a href="#NCName">NCName</a>
|
|
<br> <em>{any attributes with non-schema namespace . . .}</em>><br>
|
|
<em> Content: </em>(<a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref">annotation</a>?, (<a href="#element-restriction" class="eltref">restriction</a> | <a href="#element-list" class="eltref">list</a> | <a href="#element-union" class="eltref">union</a>))<br></simpleType></p>
|
|
<div class="reprcomp">
|
|
<table class="reprcomp">
|
|
<thead>
|
|
<tr>
|
|
<th><a href="#dc-defn">Datatype Definition</a><strong> Schema Component</strong></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<table border="0" cellpadding="3">
|
|
<thead>
|
|
<tr>
|
|
<th align="left">Property</th><th align="left">Representation</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody valign="top">
|
|
<tr valign="top">
|
|
<td><a href="#defn-name" class="propref">{name}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>, if present,
|
|
otherwise <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-null">null</a>
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#defn-final" class="propref">{final}</a></td><td>
|
|
A set corresponding to the <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the
|
|
<code>final</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>, if present, otherwise of the <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the
|
|
<code>finalDefault</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a> the ancestor
|
|
<a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-schema">schema</a>
|
|
element information item, if present, otherwise the empty string, as follows:
|
|
<dl>
|
|
|
|
<dt>
|
|
<b>the empty string</b>
|
|
</dt>
|
|
<dd>
|
|
the empty set;
|
|
</dd>
|
|
|
|
|
|
<dt>
|
|
<b>
|
|
<code>#all</code>
|
|
</b>
|
|
</dt>
|
|
<dd>
|
|
<i>{restriction, list, union}</i>;
|
|
</dd>
|
|
|
|
|
|
<dt>
|
|
<b><i>otherwise</i></b>
|
|
</dt>
|
|
<dd>
|
|
a set with members drawn from the set above, each being present or
|
|
absent depending on whether the string contains an equivalently named
|
|
space-delimited substring.
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
Although the <code>finalDefault</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a> of
|
|
<a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-schema">schema</a> may include
|
|
values other than
|
|
<i>restriction</i>, <i>list</i> or <i>union</i>, those values
|
|
are ignored in the determination of <a href="#defn-final" class="propref">{final}</a>
|
|
|
|
</blockquote>
|
|
</dd>
|
|
|
|
</dl>
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#defn-target-namespace" class="propref">{target namespace}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>
|
|
of the parent <code>schema</code> element information item.
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#defn-annotation" class="propref">{annotation}</a></td><td>
|
|
The annotation corresponding to the <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref"><annotation></a>
|
|
element information item in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref">[children]</a>, if present, otherwise
|
|
<a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-null">null</a>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<p>
|
|
A <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> datatype can be <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
from a <a href="#dt-primitive" class="termref"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> datatype or another
|
|
<a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> datatype by one of three means:
|
|
by <i>restriction</i>, by <i>list</i> or by <i>union</i>.
|
|
</p>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="derivation-by-restriction"></a>4.1.2.1 Derivation by restriction</h5>
|
|
<div class="reprdef">
|
|
<div class="reprHeader">
|
|
<span class="reprdef">XML Representation Summary</span>: <code>restriction</code> Element Information Item</div>
|
|
<div class="reprBody">
|
|
<p class="element-syntax-1">
|
|
<a name="element-restriction"><restriction</a>
|
|
<br> base = <a href="#QName">QName</a>
|
|
<br> id = <a href="#ID">ID</a>
|
|
<br> <em>{any attributes with non-schema namespace . . .}</em>><br>
|
|
<em> Content: </em>(<a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref">annotation</a>?, (<a href="#element-simpleType" class="eltref">simpleType</a>?, (<a href="#element-minExclusive" class="eltref">minExclusive</a> | <a href="#element-minInclusive" class="eltref">minInclusive</a> | <a href="#element-maxExclusive" class="eltref">maxExclusive</a> | <a href="#element-maxInclusive" class="eltref">maxInclusive</a> | <a href="#element-totalDigits" class="eltref">totalDigits</a> | <a href="#element-fractionDigits" class="eltref">fractionDigits</a> | <a href="#element-length" class="eltref">length</a> | <a href="#element-minLength" class="eltref">minLength</a> | <a href="#element-maxLength" class="eltref">maxLength</a> | <a href="#element-enumeration" class="eltref">enumeration</a> | <a href="#element-whiteSpace" class="eltref">whiteSpace</a> | <a href="#element-pattern" class="eltref">pattern</a>)*))<br></restriction></p>
|
|
<div class="reprcomp">
|
|
<table class="reprcomp">
|
|
<thead>
|
|
<tr>
|
|
<th><a href="#dc-defn">Simple Type Definition</a><strong> Schema Component</strong></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<table border="0" cellpadding="3">
|
|
<thead>
|
|
<tr>
|
|
<th align="left">Property</th><th align="left">Representation</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody valign="top">
|
|
<tr valign="top">
|
|
<td><a href="#defn-variety" class="propref">{variety}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of <a href="#defn-variety" class="propref">{variety}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#defn-facets" class="propref">{facets}</a></td><td>
|
|
The union of the set of <a href="#facets">Facets (§2.4)</a> components
|
|
resolved to by the facet <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref">[children]</a> merged with <a href="#defn-facets" class="propref">{facets}</a>
|
|
from <a href="#defn-basetype" class="propref">{base type definition}</a>, subject to the Facet Restriction Valid
|
|
constraints specified in <a href="#facets">Facets (§2.4)</a>.
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#defn-basetype" class="propref">{base type definition}</a></td><td>
|
|
The <a href="#dc-defn">Simple Type Definition</a> component resolved to by the <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the
|
|
<code>base</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a> or the <a href="#element-simpleType" class="eltref"><simpleType></a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref">[children]</a>,
|
|
whichever is present.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="exampleOuter">
|
|
<div class="exampleHeader">Example</div>
|
|
<div class="exampleWrapper">
|
|
An electronic commerce schema might define a datatype called
|
|
<i>Sku</i> (the barcode number that appears on products) from the
|
|
<a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> datatype <a href="#string">string</a> by
|
|
supplying a value for the <a href="#dt-pattern" class="termref"><span class="arrow">·</span>pattern<span class="arrow">·</span></a> facet.
|
|
</div>
|
|
<div class="exampleInner">
|
|
<pre><simpleType name='Sku'>
|
|
<restriction base='string'>
|
|
<pattern value='\d{3}-[A-Z]{2}'/>
|
|
</restriction>
|
|
</simpleType></pre>
|
|
</div>
|
|
<div class="exampleWrapper">
|
|
In this case, <i>Sku</i> is the name of the new
|
|
<a href="#dt-user-derived" class="termref"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a> datatype, <a href="#string">string</a> is
|
|
its <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> and <a href="#dt-pattern" class="termref"><span class="arrow">·</span>pattern<span class="arrow">·</span></a>
|
|
is the facet.
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="derivation-by-list"></a>4.1.2.2 Derivation by list</h5>
|
|
<div class="reprdef">
|
|
<div class="reprHeader">
|
|
<span class="reprdef">XML Representation Summary</span>: <code>list</code> Element Information Item</div>
|
|
<div class="reprBody">
|
|
<p class="element-syntax-1">
|
|
<a name="element-list"><list</a>
|
|
<br> id = <a href="#ID">ID</a>
|
|
<br> itemType = <a href="#QName">QName</a>
|
|
<br> <em>{any attributes with non-schema namespace . . .}</em>><br>
|
|
<em> Content: </em>(<a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref">annotation</a>?, (<a href="#element-simpleType" class="eltref">simpleType</a>?))<br></list></p>
|
|
<div class="reprcomp">
|
|
<table class="reprcomp">
|
|
<thead>
|
|
<tr>
|
|
<th><a href="#dc-defn">Simple Type Definition</a><strong> Schema Component</strong></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<table border="0" cellpadding="3">
|
|
<thead>
|
|
<tr>
|
|
<th align="left">Property</th><th align="left">Representation</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody valign="top">
|
|
<tr valign="top">
|
|
<td><a href="#defn-variety" class="propref">{variety}</a></td><td>
|
|
list
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#defn-itemType" class="propref">{item type definition}</a></td><td>
|
|
The <a href="#dc-defn">Simple Type Definition</a> component resolved to by the <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the
|
|
<code>itemType</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>
|
|
or the <a href="#element-simpleType" class="eltref"><simpleType></a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref">[children]</a>,
|
|
whichever is present.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<p>
|
|
A <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype must be <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
from an <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> or a <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a> datatype,
|
|
known as the
|
|
<a href="#dt-itemType" class="termref"><span class="arrow">·</span>itemType<span class="arrow">·</span></a> of the <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype.
|
|
This yields a datatype whose <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is composed of
|
|
finite-length sequences of values from the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the
|
|
<a href="#dt-itemType" class="termref"><span class="arrow">·</span>itemType<span class="arrow">·</span></a> and whose <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> is
|
|
composed of white space separated lists of literals of the
|
|
<a href="#dt-itemType" class="termref"><span class="arrow">·</span>itemType<span class="arrow">·</span></a>.
|
|
</p>
|
|
<div class="exampleOuter">
|
|
<div class="exampleHeader">Example</div>
|
|
<div class="exampleWrapper">
|
|
A system might want to store lists of floating point values.
|
|
</div>
|
|
<div class="exampleInner">
|
|
<pre><simpleType name='listOfFloat'>
|
|
<list itemType='float'/>
|
|
</simpleType>
|
|
</pre>
|
|
</div>
|
|
<div class="exampleWrapper">
|
|
In this case, <i>listOfFloat</i> is the name of the new
|
|
<a href="#dt-user-derived" class="termref"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a> datatype, <a href="#float">float</a> is its
|
|
<a href="#dt-itemType" class="termref"><span class="arrow">·</span>itemType<span class="arrow">·</span></a> and <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> is the
|
|
derivation method.
|
|
</div>
|
|
</div>
|
|
<p>
|
|
As mentioned in <a href="#list-datatypes">List datatypes (§2.5.1.2)</a>,
|
|
when a datatype is <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from a
|
|
<a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype, the following
|
|
<a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s can be used:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#dt-length" class="termref"><span class="arrow">·</span>length<span class="arrow">·</span></a>
|
|
</li>
|
|
<li>
|
|
<a href="#dt-maxLength" class="termref"><span class="arrow">·</span>maxLength<span class="arrow">·</span></a>
|
|
</li>
|
|
<li>
|
|
<a href="#dt-minLength" class="termref"><span class="arrow">·</span>minLength<span class="arrow">·</span></a>
|
|
</li>
|
|
<li>
|
|
<a href="#dt-enumeration" class="termref"><span class="arrow">·</span>enumeration<span class="arrow">·</span></a>
|
|
</li>
|
|
<li>
|
|
<a href="#dt-pattern" class="termref"><span class="arrow">·</span>pattern<span class="arrow">·</span></a>
|
|
</li>
|
|
<li>
|
|
<a href="#dt-whiteSpace" class="termref"><span class="arrow">·</span>whiteSpace<span class="arrow">·</span></a>
|
|
</li>
|
|
</ul>
|
|
<p>
|
|
regardless of the <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s that are applicable
|
|
to the <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> datatype that serves as the
|
|
<a href="#dt-itemType" class="termref"><span class="arrow">·</span>itemType<span class="arrow">·</span></a> of the <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a>.
|
|
</p>
|
|
<p>
|
|
For each of <a href="#dt-length" class="termref"><span class="arrow">·</span>length<span class="arrow">·</span></a>, <a href="#dt-maxLength" class="termref"><span class="arrow">·</span>maxLength<span class="arrow">·</span></a>
|
|
and <a href="#dt-minLength" class="termref"><span class="arrow">·</span>minLength<span class="arrow">·</span></a>, the
|
|
<i>unit of length</i> is measured in number of list items.
|
|
The value of <a href="#dt-whiteSpace" class="termref"><span class="arrow">·</span>whiteSpace<span class="arrow">·</span></a>
|
|
is fixed to the value <i>collapse</i>.</p>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="derivation-by-union"></a>4.1.2.3 Derivation by union</h5>
|
|
<div class="reprdef">
|
|
<div class="reprHeader">
|
|
<span class="reprdef">XML Representation Summary</span>: <code>union</code> Element Information Item</div>
|
|
<div class="reprBody">
|
|
<p class="element-syntax-1">
|
|
<a name="element-union"><union</a>
|
|
<br> id = <a href="#ID">ID</a>
|
|
<br> memberTypes = List of <a href="#QName">QName</a>
|
|
<br> <em>{any attributes with non-schema namespace . . .}</em>><br>
|
|
<em> Content: </em>(<a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref">annotation</a>?, (<a href="#element-simpleType" class="eltref">simpleType</a>*))<br></union></p>
|
|
<div class="reprcomp">
|
|
<table class="reprcomp">
|
|
<thead>
|
|
<tr>
|
|
<th><a href="#dc-defn">Simple Type Definition</a><strong> Schema Component</strong></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<table border="0" cellpadding="3">
|
|
<thead>
|
|
<tr>
|
|
<th align="left">Property</th><th align="left">Representation</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody valign="top">
|
|
<tr valign="top">
|
|
<td><a href="#defn-variety" class="propref">{variety}</a></td><td>
|
|
union
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#defn-memberTypes" class="propref">{member type definitions}</a></td><td>
|
|
The sequence of <a href="#dc-defn">Simple Type Definition</a> components resolved to by the
|
|
items in the <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the
|
|
<code>memberTypes</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>, if any,
|
|
in order, followed by the <a href="#dc-defn">Simple Type Definition</a> components resolved to by the
|
|
<a href="#element-simpleType" class="eltref"><simpleType></a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref">[children]</a>, if any, in order.
|
|
If <a href="#defn-variety" class="propref">{variety}</a> is <i>union</i> for
|
|
any <a href="#dc-defn">Simple Type Definition</a> components resolved to above, then
|
|
the that <a href="#dc-defn">Simple Type Definition</a> is replaced by its
|
|
<a href="#defn-memberTypes" class="propref">{member type definitions}</a>.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<p>
|
|
A <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a> datatype can be <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
from one or more <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a>, <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> or
|
|
other <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a> datatypes, known as the <a href="#dt-memberTypes" class="termref"><span class="arrow">·</span>memberTypes<span class="arrow">·</span></a>
|
|
of that <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a> datatype.
|
|
</p>
|
|
<div class="exampleOuter">
|
|
<div class="exampleHeader">Example</div>
|
|
<div class="exampleWrapper">
|
|
As an example, taken from a typical display oriented text markup language,
|
|
one might want to express font sizes as an integer between 8 and 72, or with
|
|
one of the tokens "small", "medium" or "large". The <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a>
|
|
type definition below would accomplish that.
|
|
</div>
|
|
<div class="exampleInner">
|
|
<pre>
|
|
<xsd:attribute name="size">
|
|
<xsd:simpleType>
|
|
<xsd:union>
|
|
<xsd:simpleType>
|
|
<xsd:restriction base="xsd:positiveInteger">
|
|
<xsd:minInclusive value="8"/>
|
|
<xsd:maxInclusive value="72"/>
|
|
</xsd:restriction>
|
|
</xsd:simpleType>
|
|
<xsd:simpleType>
|
|
<xsd:restriction base="xsd:NMTOKEN">
|
|
<xsd:enumeration value="small"/>
|
|
<xsd:enumeration value="medium"/>
|
|
<xsd:enumeration value="large"/>
|
|
</xsd:restriction>
|
|
</xsd:simpleType>
|
|
</xsd:union>
|
|
</xsd:simpleType>
|
|
</xsd:attribute>
|
|
</pre>
|
|
<pre>
|
|
<p>
|
|
<font size='large'>A header</font>
|
|
</p>
|
|
<p>
|
|
<font size='12'>this is a test</font>
|
|
</p>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<p>
|
|
As mentioned in <a href="#union-datatypes">Union datatypes (§2.5.1.3)</a>,
|
|
when a datatype is <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from a
|
|
<a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a> datatype, the only following
|
|
<a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s can be used:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a href="#dt-pattern" class="termref"><span class="arrow">·</span>pattern<span class="arrow">·</span></a>
|
|
</li>
|
|
<li>
|
|
<a href="#dt-enumeration" class="termref"><span class="arrow">·</span>enumeration<span class="arrow">·</span></a>
|
|
</li>
|
|
</ul>
|
|
<p>
|
|
regardless of the <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s that are
|
|
applicable to the datatypes that participate in the <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="defn-rep-constr"></a>4.1.3 Constraints on XML Representation of Simple Type Definition</h4>
|
|
|
|
<div class="constraintnote">
|
|
<a name="src-single-facet-value"></a><b>Schema Representation Constraint: Single Facet Value</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
Unless otherwise specifically allowed by this specification
|
|
(<a href="#src-multiple-patterns">Multiple patterns (§4.3.4.3)</a> and
|
|
<a href="#src-multiple-enumerations">Multiple enumerations (§4.3.5.3)</a>) any given
|
|
<a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a> can only be specifed once within
|
|
a single derivation step.
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="constraintnote">
|
|
<a name="src-list-itemType-or-simpleType"></a><b>Schema Representation Constraint: itemType attribute or simpleType child</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
Either the <code>itemType</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a> or the
|
|
<a href="#element-simpleType" class="eltref"><simpleType></a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref">[child]</a> of the <a href="#element-list" class="eltref"><list></a> element
|
|
must be present, but not both.
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="constraintnote">
|
|
<a name="src-restriction-base-or-simpleType"></a><b>Schema Representation Constraint: base attribute or simpleType child</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
Either the <code>base</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a> or the
|
|
<code>simpleType</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref">[child]</a> of the <a href="#element-restriction" class="eltref"><restriction></a>
|
|
element must be present, but not both.
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="constraintnote">
|
|
<a name="src-union-memberTypes-or-simpleTypes"></a><b>Schema Representation Constraint: memberTypes attribute or simpleType children</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
Either the <code>memberTypes</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a> of the <a href="#element-union" class="eltref"><union></a>
|
|
element must be non-empty or
|
|
there must be at least one <code>simpleType</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref">[child]</a>.
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="defn-validation-rules"></a>4.1.4 Simple Type Definition Validation Rules</h4>
|
|
|
|
<div class="constraintnote">
|
|
<a name="cvc-facet-valid"></a><b>Validation Rule: Facet Valid</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
A value in a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is facet-valid with
|
|
respect to a <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a> component if:
|
|
|
|
<div class="constraintlist">
|
|
<div class="clnumber">1
|
|
|
|
the value is facet-valid with respect to the particular
|
|
<a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a> as specified below.
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="constraintnote">
|
|
<a name="cvc-datatype-valid"></a><b>Validation Rule: Datatype Valid</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
A string is datatype-valid with respect to a datatype definition if:
|
|
|
|
<div class="constraintlist">
|
|
<div class="clnumber">1
|
|
|
|
it <a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a>es a literal in the
|
|
<a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of the datatype, determined as follows:
|
|
|
|
<div class="constraintlist">
|
|
<div class="clnumber">1.1
|
|
|
|
if <a href="#dt-pattern" class="termref"><span class="arrow">·</span>pattern<span class="arrow">·</span></a> is a member of <a href="#defn-facets" class="propref">{facets}</a>,
|
|
then the string must be <a href="#cvc-pattern-valid">pattern valid (§4.3.4.4)</a>;
|
|
|
|
</div>
|
|
<div class="clnumber">1.2
|
|
|
|
if <a href="#dt-pattern" class="termref"><span class="arrow">·</span>pattern<span class="arrow">·</span></a> is not a member of <a href="#defn-facets" class="propref">{facets}</a>,
|
|
then
|
|
|
|
<div class="constraintlist">
|
|
<div class="clnumber">1.2.1
|
|
|
|
if <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> then
|
|
the string must <a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a> a literal in the
|
|
<a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <a href="#defn-basetype" class="propref">{base type definition}</a>
|
|
|
|
</div>
|
|
<div class="clnumber">1.2.2
|
|
|
|
if <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> then
|
|
the string must be a sequence of white space separated tokens, each of
|
|
which <a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a>es a literal in the
|
|
<a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <a href="#defn-itemType" class="propref">{item type definition}</a>
|
|
|
|
</div>
|
|
<div class="clnumber">1.2.3
|
|
|
|
if <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a> then
|
|
the string must <a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a> a literal in the
|
|
<a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of at least one member of
|
|
<a href="#defn-memberTypes" class="propref">{member type definitions}</a>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="clnumber">2
|
|
|
|
the value denoted by the literal <a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a>ed in the previous step
|
|
is a member of the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the datatype, as determined
|
|
by it being <a href="#cvc-facet-valid">Facet Valid (§4.1.4)</a>
|
|
with respect to each member of <a href="#defn-facets" class="propref">{facets}</a> (except
|
|
for <a href="#dt-pattern" class="termref"><span class="arrow">·</span>pattern<span class="arrow">·</span></a>).
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="defn-coss"></a>4.1.5 Constraints on Simple Type Definition Schema Components</h4>
|
|
|
|
<div class="constraintnote">
|
|
<a name="cos-applicable-facets"></a><b>Schema Component Constraint: applicable facets</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
|
|
The <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s which are allowed
|
|
to be members of <a href="#defn-facets" class="propref">{facets}</a> are dependent on
|
|
<a href="#defn-basetype" class="propref">{base type definition}</a> as specified in the following table:
|
|
|
|
<table border="1" bgcolor="#bedce6">
|
|
<tr>
|
|
<th><a href="#defn-basetype">{base type definition}</a></th><th>applicable <a href="#defn-facets">{facets}</a></th>
|
|
</tr>
|
|
<tr>
|
|
<th colspan="2" align="center">
|
|
If <a href="#defn-variety">{variety}</a> is <a href="#dt-list">list</a>,
|
|
then
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<td>[all datatypes]</td><td><a href="#dt-length">length</a>,
|
|
<a href="#dt-minLength">minLength</a>,
|
|
<a href="#dt-maxLength">maxLength</a>,
|
|
<a href="#dt-pattern">pattern</a>,
|
|
<a href="#dt-enumeration">enumeration</a>,
|
|
<a href="#dt-whiteSpace">whiteSpace</a></td>
|
|
</tr>
|
|
<tr>
|
|
<th colspan="2" align="center">
|
|
If <a href="#defn-variety">{variety}</a> is
|
|
<a href="#dt-union">union</a>, then
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<td>[all datatypes]</td><td><a href="#dt-pattern">pattern</a>,
|
|
<a href="#dt-enumeration">enumeration</a></td>
|
|
</tr>
|
|
<tr>
|
|
<th colspan="2" align="center">
|
|
else if <a href="#defn-variety">{variety}</a> is
|
|
<a href="#dt-atomic">atomic</a>, then
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#string">string</a></td><td><a href="#dc-length">length</a>, <a href="#dc-minLength">minLength</a>, <a href="#dc-maxLength">maxLength</a>, <a href="#dc-pattern">pattern</a>, <a href="#dc-enumeration">enumeration</a>, <a href="#dc-whiteSpace">whiteSpace</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#boolean">boolean</a></td><td><a href="#dc-pattern">pattern</a>, <a href="#dc-whiteSpace">whiteSpace</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#float">float</a></td><td><a href="#dc-pattern">pattern</a>, <a href="#dc-enumeration">enumeration</a>, <a href="#dc-whiteSpace">whiteSpace</a>, <a href="#dc-maxInclusive">maxInclusive</a>, <a href="#dc-maxExclusive">maxExclusive</a>, <a href="#dc-minInclusive">minInclusive</a>, <a href="#dc-minExclusive">minExclusive</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#double">double</a></td><td><a href="#dc-pattern">pattern</a>, <a href="#dc-enumeration">enumeration</a>, <a href="#dc-whiteSpace">whiteSpace</a>, <a href="#dc-maxInclusive">maxInclusive</a>, <a href="#dc-maxExclusive">maxExclusive</a>, <a href="#dc-minInclusive">minInclusive</a>, <a href="#dc-minExclusive">minExclusive</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#decimal">decimal</a></td><td><a href="#dc-totalDigits">totalDigits</a>, <a href="#dc-fractionDigits">fractionDigits</a>, <a href="#dc-pattern">pattern</a>, <a href="#dc-whiteSpace">whiteSpace</a>, <a href="#dc-enumeration">enumeration</a>, <a href="#dc-maxInclusive">maxInclusive</a>, <a href="#dc-maxExclusive">maxExclusive</a>, <a href="#dc-minInclusive">minInclusive</a>, <a href="#dc-minExclusive">minExclusive</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#duration">duration</a></td><td><a href="#dc-pattern">pattern</a>, <a href="#dc-enumeration">enumeration</a>, <a href="#dc-whiteSpace">whiteSpace</a>, <a href="#dc-maxInclusive">maxInclusive</a>, <a href="#dc-maxExclusive">maxExclusive</a>, <a href="#dc-minInclusive">minInclusive</a>, <a href="#dc-minExclusive">minExclusive</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#dateTime">dateTime</a></td><td><a href="#dc-pattern">pattern</a>, <a href="#dc-enumeration">enumeration</a>, <a href="#dc-whiteSpace">whiteSpace</a>, <a href="#dc-maxInclusive">maxInclusive</a>, <a href="#dc-maxExclusive">maxExclusive</a>, <a href="#dc-minInclusive">minInclusive</a>, <a href="#dc-minExclusive">minExclusive</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#time">time</a></td><td><a href="#dc-pattern">pattern</a>, <a href="#dc-enumeration">enumeration</a>, <a href="#dc-whiteSpace">whiteSpace</a>, <a href="#dc-maxInclusive">maxInclusive</a>, <a href="#dc-maxExclusive">maxExclusive</a>, <a href="#dc-minInclusive">minInclusive</a>, <a href="#dc-minExclusive">minExclusive</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#date">date</a></td><td><a href="#dc-pattern">pattern</a>, <a href="#dc-enumeration">enumeration</a>, <a href="#dc-whiteSpace">whiteSpace</a>, <a href="#dc-maxInclusive">maxInclusive</a>, <a href="#dc-maxExclusive">maxExclusive</a>, <a href="#dc-minInclusive">minInclusive</a>, <a href="#dc-minExclusive">minExclusive</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#gYearMonth">gYearMonth</a></td><td><a href="#dc-pattern">pattern</a>, <a href="#dc-enumeration">enumeration</a>, <a href="#dc-whiteSpace">whiteSpace</a>, <a href="#dc-maxInclusive">maxInclusive</a>, <a href="#dc-maxExclusive">maxExclusive</a>, <a href="#dc-minInclusive">minInclusive</a>, <a href="#dc-minExclusive">minExclusive</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#gYear">gYear</a></td><td><a href="#dc-pattern">pattern</a>, <a href="#dc-enumeration">enumeration</a>, <a href="#dc-whiteSpace">whiteSpace</a>, <a href="#dc-maxInclusive">maxInclusive</a>, <a href="#dc-maxExclusive">maxExclusive</a>, <a href="#dc-minInclusive">minInclusive</a>, <a href="#dc-minExclusive">minExclusive</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#gMonthDay">gMonthDay</a></td><td><a href="#dc-pattern">pattern</a>, <a href="#dc-enumeration">enumeration</a>, <a href="#dc-whiteSpace">whiteSpace</a>, <a href="#dc-maxInclusive">maxInclusive</a>, <a href="#dc-maxExclusive">maxExclusive</a>, <a href="#dc-minInclusive">minInclusive</a>, <a href="#dc-minExclusive">minExclusive</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#gDay">gDay</a></td><td><a href="#dc-pattern">pattern</a>, <a href="#dc-enumeration">enumeration</a>, <a href="#dc-whiteSpace">whiteSpace</a>, <a href="#dc-maxInclusive">maxInclusive</a>, <a href="#dc-maxExclusive">maxExclusive</a>, <a href="#dc-minInclusive">minInclusive</a>, <a href="#dc-minExclusive">minExclusive</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#gMonth">gMonth</a></td><td><a href="#dc-pattern">pattern</a>, <a href="#dc-enumeration">enumeration</a>, <a href="#dc-whiteSpace">whiteSpace</a>, <a href="#dc-maxInclusive">maxInclusive</a>, <a href="#dc-maxExclusive">maxExclusive</a>, <a href="#dc-minInclusive">minInclusive</a>, <a href="#dc-minExclusive">minExclusive</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#hexBinary">hexBinary</a></td><td><a href="#dc-length">length</a>, <a href="#dc-minLength">minLength</a>, <a href="#dc-maxLength">maxLength</a>, <a href="#dc-pattern">pattern</a>, <a href="#dc-enumeration">enumeration</a>, <a href="#dc-whiteSpace">whiteSpace</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#base64Binary">base64Binary</a></td><td><a href="#dc-length">length</a>, <a href="#dc-minLength">minLength</a>, <a href="#dc-maxLength">maxLength</a>, <a href="#dc-pattern">pattern</a>, <a href="#dc-enumeration">enumeration</a>, <a href="#dc-whiteSpace">whiteSpace</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#anyURI">anyURI</a></td><td><a href="#dc-length">length</a>, <a href="#dc-minLength">minLength</a>, <a href="#dc-maxLength">maxLength</a>, <a href="#dc-pattern">pattern</a>, <a href="#dc-enumeration">enumeration</a>, <a href="#dc-whiteSpace">whiteSpace</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#QName">QName</a></td><td><a href="#dc-length">length</a>, <a href="#dc-minLength">minLength</a>, <a href="#dc-maxLength">maxLength</a>, <a href="#dc-pattern">pattern</a>, <a href="#dc-enumeration">enumeration</a>, <a href="#dc-whiteSpace">whiteSpace</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#NOTATION">NOTATION</a></td><td><a href="#dc-length">length</a>, <a href="#dc-minLength">minLength</a>, <a href="#dc-maxLength">maxLength</a>, <a href="#dc-pattern">pattern</a>, <a href="#dc-enumeration">enumeration</a>, <a href="#dc-whiteSpace">whiteSpace</a></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="constraintnote">
|
|
<a name="cos-list-of-atomic"></a><b>Schema Component Constraint: list of atomic</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
If <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a>, then
|
|
the <a href="#defn-variety" class="propref">{variety}</a> of <a href="#defn-itemType" class="propref">{item type definition}</a>
|
|
<a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> or
|
|
<a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a>.
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="constraintnote">
|
|
<a name="cos-no-circular-unions"></a><b>Schema Component Constraint: no circular unions</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
If <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a>,
|
|
then
|
|
it is an <a href="#dt-error" class="termref"><span class="arrow">·</span>error<span class="arrow">·</span></a> if
|
|
<a href="#defn-name" class="propref">{name}</a> and <a href="#defn-target-namespace" class="propref">{target namespace}</a>
|
|
<a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a> <a href="#defn-name" class="propref">{name}</a>
|
|
and <a href="#defn-target-namespace" class="propref">{target namespace}</a> of any member of
|
|
<a href="#defn-memberTypes" class="propref">{member type definitions}</a>.
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="anySimpleType-component"></a>4.1.6 Simple Type Definition for anySimpleType</h4>
|
|
<p>
|
|
There is a simple type definition nearly equivalent to the simple version
|
|
of the <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-urType">ur-type definition</a> present
|
|
in every schema by definition. It has the following properties:
|
|
</p>
|
|
<div class="schemaComp">
|
|
<div class="compHeader">
|
|
<span class="schemaComp">Schema Component</span>: <a href="#dt-anySimpleType">anySimpleType</a>
|
|
</div>
|
|
<div class="compBody">
|
|
<dl class="props">
|
|
<dt>
|
|
<a name="anySimpleType-name"><span class="propdef">{name}</span></a>
|
|
</dt>
|
|
<dd>
|
|
anySimpleType
|
|
</dd>
|
|
<dt>
|
|
<a name="anySimpleType-target_namespace"><span class="propdef">{target namespace}</span></a>
|
|
</dt>
|
|
<dd>
|
|
http://www.w3.org/2001/XMLSchema
|
|
</dd>
|
|
<dt>
|
|
<a name="anySimpleType-basetype"><span class="propdef">{basetype definition}</span></a>
|
|
</dt>
|
|
<dd>
|
|
<a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#ur-type-itself">the ur-type definition</a>
|
|
</dd>
|
|
<dt>
|
|
<a name="anySimpleType-final"><span class="propdef">{final}</span></a>
|
|
</dt>
|
|
<dd>
|
|
the empty set
|
|
</dd>
|
|
<dt>
|
|
<a name="anySimpleType-variety"><span class="propdef">{variety}</span></a>
|
|
</dt>
|
|
<dd>
|
|
<a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-null">absent</a>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div2">
|
|
<h3 class="withToc">
|
|
<span class="nav"><a href="#rf-defn" class="nav"><img alt="previous sub-section" src="previous.jpg"></a> <a href="#rf-facets" class="nav"><img alt="next sub-section" src="next.jpg"></a></span><a name="rf-fund-facets"></a>4.2 Fundamental Facets</h3>
|
|
<div class="localToc">
|
|
<div class="tocLine">4.2.1 <a href="#equal">equal</a>
|
|
</div>
|
|
<div class="tocLine">4.2.2 <a href="#rf-ordered">ordered</a>
|
|
</div>
|
|
<div class="tocLine">4.2.3 <a href="#rf-bounded">bounded</a>
|
|
</div>
|
|
<div class="tocLine">4.2.4 <a href="#rf-cardinality">cardinality</a>
|
|
</div>
|
|
<div class="tocLine">4.2.5 <a href="#rf-numeric">numeric</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="equal"></a>4.2.1 equal</h4>
|
|
<p>
|
|
Every <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> supports the notion of equality,
|
|
with the following rules:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
for any <i>a</i> and <i>b</i> in
|
|
the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>,
|
|
either <i>a</i> is equal to <i>b</i>,
|
|
denoted <i>a = b</i>, or <i>a</i>
|
|
is not equal to <i>b</i>, denoted <i>a != b</i>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
there is no pair <i>a</i> and <i>b</i>
|
|
from the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> such that both
|
|
<i>a = b</i> and <i>a != b</i>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
for all <i>a</i> in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>,
|
|
<i>a = a</i>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
for any <i>a</i> and <i>b</i>
|
|
in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>,
|
|
<i>a = b</i> if and only if <i>b = a</i>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
for any <i>a</i>, <i>b</i> and
|
|
<i>c</i> in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>,
|
|
if <i>a = b</i> and
|
|
<i>b = c</i>, then <i>a = c</i>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
for any <i>a</i> and <i>b</i>
|
|
in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
if <i>a = b</i>, then <i>a</i>
|
|
and <i>b</i> cannot be distinguished
|
|
(i.e., equality is identity)
|
|
|
|
</li>
|
|
</ul>
|
|
<p>
|
|
Note that a consequence of the above is that, given <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
<i>A</i> and <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
<i>B</i> where <i>A</i> and
|
|
<i>B</i> are not related by <a href="#dt-restriction" class="termref"><span class="arrow">·</span>restriction<span class="arrow">·</span></a>
|
|
or <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a>,
|
|
for every pair of values <i>a</i> from
|
|
<i>A</i> and <i>b</i> from
|
|
<i>B</i>, <i>a != b</i>.
|
|
</p>
|
|
<p>
|
|
On every datatype, the operation Equal is defined in terms of the equality
|
|
property of the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>: for any values
|
|
<i>a, b</i> drawn from the
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>, <i>Equal(a,b)</i> is
|
|
true if <i>a = b</i>, and false otherwise.
|
|
</p>
|
|
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
There is no schema component corresponding to the <b>equal</b>
|
|
<a href="#dt-fundamental-facet" class="termref"><span class="arrow">·</span>fundamental facet<span class="arrow">·</span></a>.
|
|
|
|
</blockquote>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="rf-ordered"></a>4.2.2 ordered</h4>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-order-relation">[Definition:] </a>An
|
|
<b>order relation</b> on a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
is a mathematical relation that imposes a
|
|
<a href="#dt-total-order" class="termref"><span class="arrow">·</span>total order<span class="arrow">·</span></a> or a <a href="#dt-partial-order" class="termref"><span class="arrow">·</span>partial order<span class="arrow">·</span></a> on the
|
|
members of the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
<span class="termdef"><a name="dt-ordered">[Definition:] </a>A
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>, and hence a datatype, is said to be
|
|
<b>ordered</b> if there exists an
|
|
<a href="#dt-order-relation" class="termref"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a> defined for that
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
<span class="termdef"><a name="dt-partial-order">[Definition:] </a>
|
|
A <b>partial order</b> is an <a href="#dt-order-relation" class="termref"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a>
|
|
that is <b>irreflexive</b>, <b>asymmetric</b> and
|
|
<b>transitive</b>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
A <a href="#dt-partial-order" class="termref"><span class="arrow">·</span>partial order<span class="arrow">·</span></a> has the following properties:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
|
|
for no <i>a</i> in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>,
|
|
<i>a < a</i>
|
|
(irreflexivity)
|
|
|
|
</li>
|
|
<li>
|
|
|
|
|
|
for all <i>a</i> and <i>b</i>
|
|
in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>,
|
|
<i>a < b</i>
|
|
implies not(<i>b < a</i>)
|
|
(asymmetry)
|
|
|
|
</li>
|
|
<li>
|
|
|
|
|
|
for all <i>a</i>, <i>b</i>
|
|
and <i>c</i> in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>,
|
|
<i>a < b</i> and <i>b < c</i>
|
|
implies <i>a < c</i>
|
|
(transitivity)
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
<p>
|
|
The notation <i>a <> b</i> is used to indicate the
|
|
case when <i>a != b</i> and neither
|
|
<i>a < b</i> nor <i>b < a</i>
|
|
</p>
|
|
<p>
|
|
<span class="termdef"><a name="dt-total-order">[Definition:] </a>
|
|
A <b>total order</b> is an <a href="#dt-partial-order" class="termref"><span class="arrow">·</span>partial order<span class="arrow">·</span></a>
|
|
such that for no <i>a</i> and <i>b</i>
|
|
is it the case that <i>a <> b</i>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
A <a href="#dt-total-order" class="termref"><span class="arrow">·</span>total order<span class="arrow">·</span></a> has all of the properties specified
|
|
above for <a href="#dt-partial-order" class="termref"><span class="arrow">·</span>partial order<span class="arrow">·</span></a>, plus
|
|
the following property:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
|
|
for all <i>a</i> and <i>b</i>
|
|
in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>,
|
|
either <i>a < b</i> or <i>b < a</i>
|
|
or <i>a = b</i>
|
|
|
|
</li>
|
|
</ul>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
The fact that this specification does not define an
|
|
<a href="#dt-order-relation" class="termref"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a> for some datatype does not
|
|
mean that some other application cannot treat that datatype as
|
|
being ordered by imposing its own order relation.
|
|
|
|
</blockquote>
|
|
|
|
<p>
|
|
<a href="#dt-ordered" class="termref"><span class="arrow">·</span>ordered<span class="arrow">·</span></a> provides for:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
indicating whether an <a href="#dt-order-relation" class="termref"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a> is
|
|
defined on a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>, and if so,
|
|
whether that <a href="#dt-order-relation" class="termref"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a> is
|
|
a <a href="#dt-partial-order" class="termref"><span class="arrow">·</span>partial order<span class="arrow">·</span></a> or a <a href="#dt-total-order" class="termref"><span class="arrow">·</span>total order<span class="arrow">·</span></a>
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="dc-ordered"></a>4.2.2.1 The ordered Schema Component</h5>
|
|
<div class="schemaComp">
|
|
<div class="compHeader">
|
|
<span class="schemaComp">Schema Component</span>: <a href="#dt-ordered">ordered</a>
|
|
</div>
|
|
<div class="compBody">
|
|
<dl class="props">
|
|
<dt>
|
|
<a name="ordered-value"><span class="propdef">{value}</span></a>
|
|
</dt>
|
|
<dd>
|
|
One of <i>{false, partial, total}</i>.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<p>
|
|
<a href="#ordered-value" class="propref">{value}</a> depends on <a href="#defn-variety" class="propref">{variety}</a>,
|
|
<a href="#defn-facets" class="propref">{facets}</a> and <a href="#defn-memberTypes" class="propref">{member type definitions}</a>
|
|
in the <a href="#dc-defn">Simple Type Definition</a> component in which a
|
|
<a href="#dt-ordered" class="termref"><span class="arrow">·</span>ordered<span class="arrow">·</span></a> component appears as a member of
|
|
<a href="#defn-fund-facets" class="propref">{fundamental facets}</a>.
|
|
</p>
|
|
|
|
<p>
|
|
When <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a>,
|
|
<a href="#ordered-value" class="propref">{value}</a> is inherited from
|
|
<a href="#ordered-value" class="propref">{value}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>.
|
|
For all <a href="#dt-primitive" class="termref"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> types <a href="#numeric-value" class="propref">{value}</a>
|
|
is as specified in the table in <a href="#app-fundamental-facets">Fundamental Facets (§C.1)</a>.
|
|
</p>
|
|
<p>
|
|
When <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a>,
|
|
<a href="#ordered-value" class="propref">{value}</a> is <i>false</i>.
|
|
</p>
|
|
|
|
<p>
|
|
When <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a>,
|
|
if <a href="#ordered-value" class="propref">{value}</a> is <i>true</i>
|
|
for every member of <a href="#defn-memberTypes" class="propref">{member type definitions}</a>
|
|
and all members of <a href="#defn-memberTypes" class="propref">{member type definitions}</a> share a common
|
|
ancestor, then <a href="#ordered-value" class="propref">{value}</a> is <i>true</i>;
|
|
else <a href="#ordered-value" class="propref">{value}</a> is <i>false</i>.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="rf-bounded"></a>4.2.3 bounded</h4>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-inclusive-upper-bound">[Definition:] </a>
|
|
A value <i>u</i> in an <a href="#dt-ordered" class="termref"><span class="arrow">·</span>ordered<span class="arrow">·</span></a>
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <i>U</i>
|
|
is said to be an <b>inclusive upper bound</b> of a
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <i>V</i>
|
|
(where <i>V</i> is a subset of <i>U</i>)
|
|
if for all <i>v</i> in <i>V</i>,
|
|
<i>u</i> >= <i>v</i>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
<span class="termdef"><a name="dt-exclusive-upper-bound">[Definition:] </a>
|
|
A value <i>u</i> in an <a href="#dt-ordered" class="termref"><span class="arrow">·</span>ordered<span class="arrow">·</span></a>
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <i>U</i>
|
|
is said to be an <b>exclusive upper bound</b> of a
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <i>V</i>
|
|
(where <i>V</i> is a subset of <i>U</i>)
|
|
if for all <i>v</i> in <i>V</i>,
|
|
<i>u</i> > <i>v</i>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
<span class="termdef"><a name="dt-inclusive-lower-bound">[Definition:] </a>
|
|
A value <i>l</i> in an <a href="#dt-ordered" class="termref"><span class="arrow">·</span>ordered<span class="arrow">·</span></a>
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <i>L</i>
|
|
is said to be an <b>inclusive lower bound</b> of a
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <i>V</i>
|
|
(where <i>V</i> is a subset of <i>L</i>)
|
|
if for all <i>v</i> in <i>V</i>,
|
|
<i>l</i> <= <i>v</i>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
<span class="termdef"><a name="dt-exclusive-lower-bound">[Definition:] </a>
|
|
A value <i>l</i> in an <a href="#dt-ordered" class="termref"><span class="arrow">·</span>ordered<span class="arrow">·</span></a>
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <i>L</i>
|
|
is said to be an <b>exclusive lower bound</b> of a
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <i>V</i>
|
|
(where <i>V</i> is a subset of <i>L</i>)
|
|
if for all <i>v</i> in <i>V</i>,
|
|
<i>l</i> < <i>v</i>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
<span class="termdef"><a name="dt-bounded">[Definition:] </a>A datatype is <b>bounded</b>
|
|
if its <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> has either an
|
|
<a href="#dt-inclusive-upper-bound" class="termref"><span class="arrow">·</span>inclusive upper bound<span class="arrow">·</span></a> or an <a href="#dt-exclusive-upper-bound" class="termref"><span class="arrow">·</span>exclusive upper bound<span class="arrow">·</span></a>
|
|
and either an <a href="#dt-inclusive-lower-bound" class="termref"><span class="arrow">·</span>inclusive lower bound<span class="arrow">·</span></a> and an
|
|
<a href="#dt-exclusive-lower-bound" class="termref"><span class="arrow">·</span>exclusive lower bound<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p>
|
|
|
|
<p>
|
|
<a href="#dt-bounded" class="termref"><span class="arrow">·</span>bounded<span class="arrow">·</span></a> provides for:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
indicating whether a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is
|
|
<a href="#dt-bounded" class="termref"><span class="arrow">·</span>bounded<span class="arrow">·</span></a>
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="dc-bounded"></a>4.2.3.1 The bounded Schema Component</h5>
|
|
<div class="schemaComp">
|
|
<div class="compHeader">
|
|
<span class="schemaComp">Schema Component</span>: <a href="#dt-bounded">bounded</a>
|
|
</div>
|
|
<div class="compBody">
|
|
<dl class="props">
|
|
<dt>
|
|
<a name="bounded-value"><span class="propdef">{value}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A <a href="#boolean">boolean</a>.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<p>
|
|
<a href="#bounded-value" class="propref">{value}</a> depends on <a href="#defn-variety" class="propref">{variety}</a>,
|
|
<a href="#defn-facets" class="propref">{facets}</a> and <a href="#defn-memberTypes" class="propref">{member type definitions}</a>
|
|
in the <a href="#dc-defn">Simple Type Definition</a> component in which a
|
|
<a href="#dt-bounded" class="termref"><span class="arrow">·</span>bounded<span class="arrow">·</span></a> component appears as a member of
|
|
<a href="#defn-fund-facets" class="propref">{fundamental facets}</a>.
|
|
</p>
|
|
|
|
<p>
|
|
When <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a>,
|
|
if one of <a href="#dt-minInclusive" class="termref"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> or <a href="#dt-minExclusive" class="termref"><span class="arrow">·</span>minExclusive<span class="arrow">·</span></a>
|
|
and one of <a href="#dt-maxInclusive" class="termref"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> or <a href="#dt-maxExclusive" class="termref"><span class="arrow">·</span>maxExclusive<span class="arrow">·</span></a>
|
|
are among <a href="#defn-facets" class="propref">{facets}</a> , then
|
|
<a href="#bounded-value" class="propref">{value}</a> is <i>true</i>; else
|
|
<a href="#bounded-value" class="propref">{value}</a> is <i>false</i>.
|
|
</p>
|
|
<p>
|
|
When <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a>,
|
|
if <a href="#dt-length" class="termref"><span class="arrow">·</span>length<span class="arrow">·</span></a> or both of
|
|
<a href="#dt-minLength" class="termref"><span class="arrow">·</span>minLength<span class="arrow">·</span></a> and <a href="#dt-maxLength" class="termref"><span class="arrow">·</span>maxLength<span class="arrow">·</span></a>
|
|
are among <a href="#defn-facets" class="propref">{facets}</a>, then
|
|
<a href="#bounded-value" class="propref">{value}</a> is <i>true</i>; else
|
|
<a href="#bounded-value" class="propref">{value}</a> is <i>false</i>.
|
|
</p>
|
|
|
|
<p>
|
|
When <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a>,
|
|
if <a href="#bounded-value" class="propref">{value}</a> is <i>true</i>
|
|
for every member of <a href="#defn-memberTypes" class="propref">{member type definitions}</a>
|
|
and all members of <a href="#defn-memberTypes" class="propref">{member type definitions}</a> share a common
|
|
ancestor, then <a href="#bounded-value" class="propref">{value}</a> is <i>true</i>;
|
|
else <a href="#bounded-value" class="propref">{value}</a> is <i>false</i>.
|
|
</p>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="rf-cardinality"></a>4.2.4 cardinality</h4>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-cardinality">[Definition:] </a>Every
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> has associated with it the concept of
|
|
<b>cardinality</b>. Some <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s
|
|
are finite, some are countably infinite while still others could
|
|
conceivably be uncountably infinite (although no <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
defined by this specification is uncountable infinite). A datatype is
|
|
said to have the cardinality of its
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
It
|
|
is sometimes useful to categorize <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s
|
|
(and hence, datatypes) as to their cardinality. There are two
|
|
significant cases:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s that are finite
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s that are countably infinite
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
<p>
|
|
<a href="#dt-cardinality" class="termref"><span class="arrow">·</span>cardinality<span class="arrow">·</span></a> provides for:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
indicating whether the <a href="#dt-cardinality" class="termref"><span class="arrow">·</span>cardinality<span class="arrow">·</span></a>
|
|
of a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is
|
|
<i>finite</i> or <i>countably infinite</i>
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="dc-cardinality"></a>4.2.4.1 The cardinality Schema Component</h5>
|
|
<div class="schemaComp">
|
|
<div class="compHeader">
|
|
<span class="schemaComp">Schema Component</span>: <a href="#dt-cardinality">cardinality</a>
|
|
</div>
|
|
<div class="compBody">
|
|
<dl class="props">
|
|
<dt>
|
|
<a name="cardinality-value"><span class="propdef">{value}</span></a>
|
|
</dt>
|
|
<dd>
|
|
One of <i>{finite, countably infinite}</i>.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<p>
|
|
<a href="#cardinality-value" class="propref">{value}</a> depends on <a href="#defn-variety" class="propref">{variety}</a>,
|
|
<a href="#defn-facets" class="propref">{facets}</a> and <a href="#defn-memberTypes" class="propref">{member type definitions}</a>
|
|
in the <a href="#dc-defn">Simple Type Definition</a> component in which a
|
|
<a href="#dt-cardinality" class="termref"><span class="arrow">·</span>cardinality<span class="arrow">·</span></a> component appears as a member of
|
|
<a href="#defn-fund-facets" class="propref">{fundamental facets}</a>.
|
|
</p>
|
|
|
|
<p>
|
|
When <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> and
|
|
<a href="#cardinality-value" class="propref">{value}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>
|
|
is <i>finite</i>, then <a href="#cardinality-value" class="propref">{value}</a> is
|
|
<i>finite</i>.
|
|
</p>
|
|
|
|
<p>
|
|
When <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> and
|
|
<a href="#cardinality-value" class="propref">{value}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>
|
|
is <i>countably infinite</i> and <b>either</b> of the following
|
|
conditions are true, then <a href="#cardinality-value" class="propref">{value}</a> is
|
|
<i>finite</i>; else <a href="#cardinality-value" class="propref">{value}</a>
|
|
is <i>countably infinite</i>:
|
|
</p>
|
|
|
|
<ol>
|
|
<li>
|
|
|
|
one of <a href="#dt-length" class="termref"><span class="arrow">·</span>length<span class="arrow">·</span></a>, <a href="#dt-maxLength" class="termref"><span class="arrow">·</span>maxLength<span class="arrow">·</span></a>,
|
|
<a href="#dt-totalDigits" class="termref"><span class="arrow">·</span>totalDigits<span class="arrow">·</span></a> is among <a href="#defn-facets" class="propref">{facets}</a>,
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<b>all</b> of the following are true:
|
|
|
|
<ol>
|
|
<li>
|
|
|
|
one of <a href="#dt-minInclusive" class="termref"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> or
|
|
<a href="#dt-minExclusive" class="termref"><span class="arrow">·</span>minExclusive<span class="arrow">·</span></a>
|
|
is among <a href="#defn-facets" class="propref">{facets}</a>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
one of <a href="#dt-maxInclusive" class="termref"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> or
|
|
<a href="#dt-maxExclusive" class="termref"><span class="arrow">·</span>maxExclusive<span class="arrow">·</span></a>
|
|
is among <a href="#defn-facets" class="propref">{facets}</a>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<b>either</b> of the following are true:
|
|
|
|
<ol>
|
|
<li>
|
|
|
|
<a href="#dt-fractionDigits" class="termref"><span class="arrow">·</span>fractionDigits<span class="arrow">·</span></a> is among <a href="#defn-facets" class="propref">{facets}</a>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<a href="#defn-basetype" class="propref">{base type definition}</a> is one of <a href="#date">date</a>,
|
|
<a href="#gYearMonth">gYearMonth</a>, <a href="#gYear">gYear</a>, <a href="#gMonthDay">gMonthDay</a>,
|
|
<a href="#gDay">gDay</a> or <a href="#gMonth">gMonth</a> or any type <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
from them
|
|
|
|
</li>
|
|
</ol>
|
|
</li>
|
|
</ol>
|
|
</li>
|
|
</ol>
|
|
|
|
<p>
|
|
When <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a>,
|
|
if <a href="#dt-length" class="termref"><span class="arrow">·</span>length<span class="arrow">·</span></a> or both of
|
|
<a href="#dt-minLength" class="termref"><span class="arrow">·</span>minLength<span class="arrow">·</span></a> and <a href="#dt-maxLength" class="termref"><span class="arrow">·</span>maxLength<span class="arrow">·</span></a>
|
|
are among <a href="#defn-facets" class="propref">{facets}</a>, then
|
|
<a href="#cardinality-value" class="propref">{value}</a> is <i>finite</i>; else
|
|
<a href="#cardinality-value" class="propref">{value}</a> is <i>countably infinite</i>.
|
|
</p>
|
|
|
|
<p>
|
|
When <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a>,
|
|
if <a href="#cardinality-value" class="propref">{value}</a> is <i>finite</i>
|
|
for every member of <a href="#defn-memberTypes" class="propref">{member type definitions}</a>, then
|
|
<a href="#cardinality-value" class="propref">{value}</a> is <i>finite</i>;
|
|
else <a href="#cardinality-value" class="propref">{value}</a> is <i>countably infinite</i>.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="rf-numeric"></a>4.2.5 numeric</h4>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-numeric">[Definition:] </a>A datatype is said to be
|
|
<b>numeric</b> if its values are conceptually quantities (in some
|
|
mathematical number system).
|
|
</span>
|
|
</p>
|
|
<p>
|
|
<span class="termdef"><a name="dt-non-numeric">[Definition:] </a>A datatype whose values
|
|
are not <a href="#dt-numeric" class="termref"><span class="arrow">·</span>numeric<span class="arrow">·</span></a> is said to be
|
|
<b>non-numeric</b>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
<a href="#dt-numeric" class="termref"><span class="arrow">·</span>numeric<span class="arrow">·</span></a> provides for:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
indicating whether a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is
|
|
<a href="#dt-numeric" class="termref"><span class="arrow">·</span>numeric<span class="arrow">·</span></a>
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="dc-numeric"></a>4.2.5.1 The numeric Schema Component</h5>
|
|
<div class="schemaComp">
|
|
<div class="compHeader">
|
|
<span class="schemaComp">Schema Component</span>: <a href="#dt-numeric">numeric</a>
|
|
</div>
|
|
<div class="compBody">
|
|
<dl class="props">
|
|
<dt>
|
|
<a name="numeric-value"><span class="propdef">{value}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A <a href="#boolean">boolean</a>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<p>
|
|
<a href="#numeric-value" class="propref">{value}</a> depends on <a href="#defn-variety" class="propref">{variety}</a>,
|
|
<a href="#defn-facets" class="propref">{facets}</a>, <a href="#defn-basetype" class="propref">{base type definition}</a> and
|
|
<a href="#defn-memberTypes" class="propref">{member type definitions}</a> in the <a href="#dc-defn">Simple Type Definition</a> component
|
|
in which a <a href="#dt-cardinality" class="termref"><span class="arrow">·</span>cardinality<span class="arrow">·</span></a> component appears as a member of
|
|
<a href="#defn-fund-facets" class="propref">{fundamental facets}</a>.
|
|
</p>
|
|
|
|
<p>
|
|
When <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a>,
|
|
<a href="#numeric-value" class="propref">{value}</a> is inherited from
|
|
<a href="#numeric-value" class="propref">{value}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>.
|
|
For all <a href="#dt-primitive" class="termref"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> types <a href="#numeric-value" class="propref">{value}</a>
|
|
is as specified in the table in <a href="#app-fundamental-facets">Fundamental Facets (§C.1)</a>.
|
|
</p>
|
|
|
|
<p>
|
|
When <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a>,
|
|
<a href="#numeric-value" class="propref">{value}</a> is <i>false</i>.
|
|
</p>
|
|
|
|
<p>
|
|
When <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a>,
|
|
if <a href="#numeric-value" class="propref">{value}</a> is <i>true</i>
|
|
for every member of <a href="#defn-memberTypes" class="propref">{member type definitions}</a>, then
|
|
<a href="#numeric-value" class="propref">{value}</a> is <i>true</i>;
|
|
else <a href="#numeric-value" class="propref">{value}</a> is <i>false</i>.
|
|
</p>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div2">
|
|
<h3 class="withToc">
|
|
<span class="nav"><a href="#rf-fund-facets" class="nav"><img alt="previous sub-section" src="previous.jpg"></a> </span><a name="rf-facets"></a>4.3 Constraining Facets</h3>
|
|
<div class="localToc">
|
|
<div class="tocLine">4.3.1 <a href="#rf-length">length</a>
|
|
</div>
|
|
<div class="tocLine">4.3.2 <a href="#rf-minLength">minLength</a>
|
|
</div>
|
|
<div class="tocLine">4.3.3 <a href="#rf-maxLength">maxLength</a>
|
|
</div>
|
|
<div class="tocLine">4.3.4 <a href="#rf-pattern">pattern</a>
|
|
</div>
|
|
<div class="tocLine">4.3.5 <a href="#rf-enumeration">enumeration</a>
|
|
</div>
|
|
<div class="tocLine">4.3.6 <a href="#rf-whiteSpace">whiteSpace</a>
|
|
</div>
|
|
<div class="tocLine">4.3.7 <a href="#rf-maxInclusive">maxInclusive</a>
|
|
</div>
|
|
<div class="tocLine">4.3.8 <a href="#rf-maxExclusive">maxExclusive</a>
|
|
</div>
|
|
<div class="tocLine">4.3.9 <a href="#rf-minExclusive">minExclusive</a>
|
|
</div>
|
|
<div class="tocLine">4.3.10 <a href="#rf-minInclusive">minInclusive</a>
|
|
</div>
|
|
<div class="tocLine">4.3.11 <a href="#rf-totalDigits">totalDigits</a>
|
|
</div>
|
|
<div class="tocLine">4.3.12 <a href="#rf-fractionDigits">fractionDigits</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="rf-length"></a>4.3.1 length</h4>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-length">[Definition:] </a>
|
|
<b>length</b> is the number
|
|
of <i>units of length</i>, where <i>units of length</i>
|
|
varies depending on the type that is being <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from.
|
|
The value of
|
|
<b>length</b> <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be a
|
|
<a href="#nonNegativeInteger">nonNegativeInteger</a>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
For <a href="#string">string</a> and datatypes <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#string">string</a>,
|
|
<b>length</b> is measured in units of <a class="xtermref" href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#dt-character">
|
|
character</a>s as defined in <a href="#XML">[XML 1.0 (Second Edition)]</a>.
|
|
For <a href="#anyURI">anyURI</a>, <b>length</b> is measured in units of
|
|
characters (as for <a href="#string">string</a>).
|
|
For <a href="#hexBinary">hexBinary</a> and <a href="#base64Binary">base64Binary</a> and datatypes <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from them,
|
|
<b>length</b> is measured in octets (8 bits) of binary data.
|
|
For datatypes <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> by <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a>,
|
|
<b>length</b> is measured in number of list items.
|
|
</p>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
For <a href="#string">string</a> and datatypes <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#string">string</a>,
|
|
<b>length</b> will not always coincide with "string length" as perceived
|
|
by some users or with the number of storage units in some digital representation.
|
|
Therefore, care should be taken when specifying a value for <b>length</b>
|
|
and in attempting to infer storage requirements from a given value for
|
|
<b>length</b>.
|
|
|
|
</blockquote>
|
|
|
|
<p>
|
|
<a href="#dt-length" class="termref"><span class="arrow">·</span>length<span class="arrow">·</span></a> provides for:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
Constraining a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
to values with a specific number of <i>units of length</i>,
|
|
where <i>units of length</i>
|
|
varies depending on <a href="#defn-basetype" class="propref">{base type definition}</a>.
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="exampleOuter">
|
|
<div class="exampleHeader">Example</div>
|
|
<div class="exampleWrapper">
|
|
The following is the definition of a <a href="#dt-user-derived" class="termref"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a>
|
|
datatype to represent product codes which must be
|
|
exactly 8 characters in length. By fixing the value of the
|
|
<b>length</b> facet we ensure that types derived from productCode can
|
|
change or set the values of other facets, such as <b>pattern</b>, but
|
|
cannot change the length.
|
|
</div>
|
|
<div class="exampleInner">
|
|
<pre><simpleType name='productCode'>
|
|
<restriction base='string'>
|
|
<length value='8' fixed='true'/>
|
|
</restriction>
|
|
</simpleType></pre>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="dc-length"></a>4.3.1.1 The length Schema Component</h5>
|
|
|
|
<div class="schemaComp">
|
|
<div class="compHeader">
|
|
<span class="schemaComp">Schema Component</span>: <a href="#dt-length">length</a>
|
|
</div>
|
|
<div class="compBody">
|
|
<dl class="props">
|
|
<dt>
|
|
<a name="length-value"><span class="propdef">{value}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A <a href="#nonNegativeInteger">nonNegativeInteger</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="length-fixed"><span class="propdef">{fixed}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A <a href="#boolean">boolean</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="length-annotation"><span class="propdef">{annotation}</span></a>
|
|
</dt>
|
|
<dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<p>
|
|
If <a href="#length-fixed" class="propref">{fixed}</a> is <i>true</i>, then types for which
|
|
the current type is the <a href="#defn-basetype" class="propref">{base type definition}</a> cannot specify a
|
|
value for <a href="#dc-length">length</a> other than <a href="#length-value" class="propref">{value}</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="xr-length"></a>4.3.1.2 XML Representation of length Schema Components</h5>
|
|
|
|
<p>
|
|
The XML representation for a <a href="#dc-length">length</a> schema
|
|
component is a <a href="#element-length" class="eltref"><length></a> element information item. The
|
|
correspondences between the properties of the information item and
|
|
properties of the component are as follows:
|
|
</p>
|
|
|
|
<div class="reprdef">
|
|
<div class="reprHeader">
|
|
<span class="reprdef">XML Representation Summary</span>: <code>length</code> Element Information Item</div>
|
|
<div class="reprBody">
|
|
<p class="element-syntax-1">
|
|
<a name="element-length"><length</a>
|
|
<br> fixed = <a href="#boolean">boolean</a> : false<br> id = <a href="#ID">ID</a>
|
|
<br> <b>value</b> = <a href="#nonNegativeInteger">nonNegativeInteger</a>
|
|
<br> <em>{any attributes with non-schema namespace . . .}</em>><br>
|
|
<em> Content: </em>(<a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref">annotation</a>?)<br></length></p>
|
|
<div class="reprcomp">
|
|
<table class="reprcomp">
|
|
<thead>
|
|
<tr>
|
|
<th><a href="#dc-fractionDigits">length</a><strong> Schema Component</strong></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<table border="0" cellpadding="3">
|
|
<thead>
|
|
<tr>
|
|
<th align="left">Property</th><th align="left">Representation</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody valign="top">
|
|
<tr valign="top">
|
|
<td><a href="#length-value" class="propref">{value}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>value</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#length-fixed" class="propref">{fixed}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>fixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>, if present, otherwise false
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#defn-annotation" class="propref">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref"><annotation></a>
|
|
element information items in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref">[children]</a>, if any.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="length-validation-rules"></a>4.3.1.3 length Validation Rules</h5>
|
|
|
|
<div class="constraintnote">
|
|
<a name="cvc-length-valid"></a><b>Validation Rule: Length Valid</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
A value in a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is facet-valid with
|
|
respect to <a href="#dt-length" class="termref"><span class="arrow">·</span>length<span class="arrow">·</span></a>, determined as follows:
|
|
|
|
<div class="constraintlist">
|
|
<div class="clnumber">1
|
|
|
|
if the <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> then
|
|
<div class="constraintlist">
|
|
<div class="clnumber">1.1
|
|
|
|
if <a href="#defn-primitive" class="propref">{primitive type definition}</a> is <a href="#string">string</a>, then the
|
|
length of the value, as measured in <a class="xtermref" href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#dt-character">
|
|
character</a>s
|
|
<a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be equal to <a href="#length-value" class="propref">{value}</a>;
|
|
|
|
</div>
|
|
<div class="clnumber">1.2
|
|
|
|
if <a href="#defn-primitive" class="propref">{primitive type definition}</a> is <a href="#hexBinary">hexBinary</a> or <a href="#base64Binary">base64Binary</a>, then the
|
|
length of the value, as measured in octets of the binary data,
|
|
<a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be equal to <a href="#length-value" class="propref">{value}</a>;
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="clnumber">2
|
|
|
|
if the <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a>,
|
|
then the length of the value, as measured
|
|
in list items, <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be equal to <a href="#length-value" class="propref">{value}</a>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="length-coss"></a>4.3.1.4 Constraints on length Schema Components</h5>
|
|
<div class="constraintnote">
|
|
<a name="length-minLength-maxLength"></a><b>Schema Component Constraint: length and minLength or maxLength</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
It is an <a href="#dt-error" class="termref"><span class="arrow">·</span>error<span class="arrow">·</span></a> for both
|
|
<a href="#dc-length">length</a> and either of
|
|
<a href="#dc-minLength">minLength</a> or <a href="#dc-maxLength">maxLength</a>
|
|
to be members of <a href="#defn-facets" class="propref">{facets}</a>.
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="constraintnote">
|
|
<a name="length-valid-restriction"></a><b>Schema Component Constraint: length valid restriction</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
It is an <a href="#dt-error" class="termref"><span class="arrow">·</span>error<span class="arrow">·</span></a> if <a href="#dc-length">length</a>
|
|
is among the members of <a href="#defn-facets" class="propref">{facets}</a> of
|
|
<a href="#defn-basetype" class="propref">{base type definition}</a> and <a href="#length-value" class="propref">{value}</a> is
|
|
not equal to the <a href="#length-value" class="propref">{value}</a> of the parent
|
|
<a href="#dc-length">length</a>.
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="rf-minLength"></a>4.3.2 minLength</h4>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-minLength">[Definition:] </a>
|
|
<b>minLength</b> is
|
|
the minimum number of <i>units of length</i>, where
|
|
<i>units of length</i> varies depending on the type that is being
|
|
<a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from.
|
|
The value of <b>minLength</b>
|
|
<a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be a <a href="#nonNegativeInteger">nonNegativeInteger</a>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
For <a href="#string">string</a> and datatypes <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#string">string</a>,
|
|
<b>minLength</b> is measured in units of <a class="xtermref" href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#dt-character">
|
|
character</a>s as defined in <a href="#XML">[XML 1.0 (Second Edition)]</a>.
|
|
For <a href="#hexBinary">hexBinary</a> and <a href="#base64Binary">base64Binary</a> and datatypes <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from them,
|
|
<b>minLength</b> is measured in octets (8 bits) of binary data.
|
|
For datatypes <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> by <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a>,
|
|
<b>minLength</b> is measured in number of list items.
|
|
</p>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
For <a href="#string">string</a> and datatypes <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#string">string</a>,
|
|
<b>minLength</b> will not always coincide with "string length" as perceived
|
|
by some users or with the number of storage units in some digital representation.
|
|
Therefore, care should be taken when specifying a value for <b>minLength</b>
|
|
and in attempting to infer storage requirements from a given value for
|
|
<b>minLength</b>.
|
|
|
|
</blockquote>
|
|
|
|
<p>
|
|
<a href="#dt-minLength" class="termref"><span class="arrow">·</span>minLength<span class="arrow">·</span></a> provides for:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
Constraining a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
to values with at least a specific number of <i>units of length</i>,
|
|
where <i>units of length</i>
|
|
varies depending on <a href="#defn-basetype" class="propref">{base type definition}</a>.
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="exampleOuter">
|
|
<div class="exampleHeader">Example</div>
|
|
<div class="exampleWrapper">
|
|
The following is the definition of a <a href="#dt-user-derived" class="termref"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a>
|
|
datatype which requires strings to have at least one character (i.e.,
|
|
the empty string is not in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
of this datatype).
|
|
</div>
|
|
<div class="exampleInner">
|
|
<pre><simpleType name='non-empty-string'>
|
|
<restriction base='string'>
|
|
<minLength value='1'/>
|
|
</restriction>
|
|
</simpleType></pre>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="dc-minLength"></a>4.3.2.1 The minLength Schema Component</h5>
|
|
|
|
<div class="schemaComp">
|
|
<div class="compHeader">
|
|
<span class="schemaComp">Schema Component</span>: <a href="#dt-minLength">minLength</a>
|
|
</div>
|
|
<div class="compBody">
|
|
<dl class="props">
|
|
<dt>
|
|
<a name="minLength-value"><span class="propdef">{value}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A <a href="#nonNegativeInteger">nonNegativeInteger</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="minLength-fixed"><span class="propdef">{fixed}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A <a href="#boolean">boolean</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="minLength-annotation"><span class="propdef">{annotation}</span></a>
|
|
</dt>
|
|
<dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<p>
|
|
If <a href="#minLength-fixed" class="propref">{fixed}</a> is <i>true</i>, then types for which
|
|
the current type is the <a href="#defn-basetype" class="propref">{base type definition}</a> cannot specify a
|
|
value for <a href="#dc-minLength">minLength</a> other than <a href="#minLength-value" class="propref">{value}</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="xr-minLength"></a>4.3.2.2 XML Representation of minLength Schema Component</h5>
|
|
|
|
<p>
|
|
The XML representation for a <a href="#dc-minLength">minLength</a> schema
|
|
component is a <a href="#element-minLength" class="eltref"><minLength></a> element information item. The
|
|
correspondences between the properties of the information item and
|
|
properties of the component are as follows:
|
|
</p>
|
|
|
|
<div class="reprdef">
|
|
<div class="reprHeader">
|
|
<span class="reprdef">XML Representation Summary</span>: <code>minLength</code> Element Information Item</div>
|
|
<div class="reprBody">
|
|
<p class="element-syntax-1">
|
|
<a name="element-minLength"><minLength</a>
|
|
<br> fixed = <a href="#boolean">boolean</a> : false<br> id = <a href="#ID">ID</a>
|
|
<br> <b>value</b> = <a href="#nonNegativeInteger">nonNegativeInteger</a>
|
|
<br> <em>{any attributes with non-schema namespace . . .}</em>><br>
|
|
<em> Content: </em>(<a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref">annotation</a>?)<br></minLength></p>
|
|
<div class="reprcomp">
|
|
<table class="reprcomp">
|
|
<thead>
|
|
<tr>
|
|
<th><a href="#dc-fractionDigits">minLength</a><strong> Schema Component</strong></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<table border="0" cellpadding="3">
|
|
<thead>
|
|
<tr>
|
|
<th align="left">Property</th><th align="left">Representation</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody valign="top">
|
|
<tr valign="top">
|
|
<td><a href="#minLength-value" class="propref">{value}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>value</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#minLength-fixed" class="propref">{fixed}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>fixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>, if present, otherwise false
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#defn-annotation" class="propref">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref"><annotation></a>
|
|
element information items in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref">[children]</a>, if any.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="minLength-validation-rules"></a>4.3.2.3 minLength Validation Rules</h5>
|
|
<div class="constraintnote">
|
|
<a name="cvc-minLength-valid"></a><b>Validation Rule: minLength Valid</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
A value in a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is facet-valid with
|
|
respect to <a href="#dt-minLength" class="termref"><span class="arrow">·</span>minLength<span class="arrow">·</span></a>, determined as follows:
|
|
|
|
<div class="constraintlist">
|
|
<div class="clnumber">1
|
|
|
|
if the <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> then
|
|
<div class="constraintlist">
|
|
<div class="clnumber">1.1
|
|
|
|
if <a href="#defn-primitive" class="propref">{primitive type definition}</a> is <a href="#string">string</a>, then the
|
|
length of the value, as measured in<a class="xtermref" href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#dt-character">
|
|
character</a>s
|
|
<a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be greater than or equal to
|
|
<a href="#minLength-value" class="propref">{value}</a>;
|
|
|
|
</div>
|
|
<div class="clnumber">1.2
|
|
|
|
if <a href="#defn-primitive" class="propref">{primitive type definition}</a> is <a href="#hexBinary">hexBinary</a> or <a href="#base64Binary">base64Binary</a>, then the
|
|
length of the value, as measured in octets of the binary data,
|
|
<a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be greater than or equal to
|
|
<a href="#minLength-value" class="propref">{value}</a>;
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="clnumber">2
|
|
|
|
if the <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a>,
|
|
then the length of the value, as measured
|
|
in list items, <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be greater than or equal
|
|
to <a href="#minLength-value" class="propref">{value}</a>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="minLength-coss"></a>4.3.2.4 Constraints on minLength Schema Components</h5>
|
|
<div class="constraintnote">
|
|
<a name="minLength-less-than-equal-to-maxLength"></a><b>Schema Component Constraint: minLength <= maxLength</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
If both <a href="#dc-minLength">minLength</a> and <a href="#dc-maxLength">maxLength</a>
|
|
are members of <a href="#defn-facets" class="propref">{facets}</a>, then the
|
|
<a href="#minLength-value" class="propref">{value}</a> of <a href="#dc-minLength">minLength</a>
|
|
<a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be less than or equal to the
|
|
<a href="#maxLength-value" class="propref">{value}</a> of <a href="#dc-maxLength">maxLength</a>.
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="constraintnote">
|
|
<a name="minLength-valid-restriction"></a><b>Schema Component Constraint: minLength valid restriction</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
It is an <a href="#dt-error" class="termref"><span class="arrow">·</span>error<span class="arrow">·</span></a> if <a href="#dc-minLength">minLength</a>
|
|
is among the members of <a href="#defn-facets" class="propref">{facets}</a> of
|
|
<a href="#defn-basetype" class="propref">{base type definition}</a> and <a href="#minLength-value" class="propref">{value}</a> is
|
|
less than the <a href="#minLength-value" class="propref">{value}</a> of the parent
|
|
<a href="#dc-minLength">minLength</a>.
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="rf-maxLength"></a>4.3.3 maxLength</h4>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-maxLength">[Definition:] </a>
|
|
<b>maxLength</b> is
|
|
the maximum number of <i>units of length</i>, where
|
|
<i>units of length</i> varies
|
|
depending on the type that is being <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from.
|
|
The value of <b>maxLength</b>
|
|
<a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be a <a href="#nonNegativeInteger">nonNegativeInteger</a>.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
For <a href="#string">string</a> and datatypes <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#string">string</a>,
|
|
<b>maxLength</b> is measured in units of <a class="xtermref" href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#dt-character">
|
|
character</a>s as defined in <a href="#XML">[XML 1.0 (Second Edition)]</a>.
|
|
For <a href="#hexBinary">hexBinary</a> and <a href="#base64Binary">base64Binary</a> and datatypes <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from them,
|
|
<b>maxLength</b> is measured in octets (8 bits) of binary data.
|
|
For datatypes <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> by <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a>,
|
|
<b>maxLength</b> is measured in number of list items.
|
|
</p>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
For <a href="#string">string</a> and datatypes <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#string">string</a>,
|
|
<b>maxLength</b> will not always coincide with "string length" as perceived
|
|
by some users or with the number of storage units in some digital representation.
|
|
Therefore, care should be taken when specifying a value for <b>maxLength</b>
|
|
and in attempting to infer storage requirements from a given value for
|
|
<b>maxLength</b>.
|
|
|
|
</blockquote>
|
|
|
|
<p>
|
|
<a href="#dt-maxLength" class="termref"><span class="arrow">·</span>maxLength<span class="arrow">·</span></a> provides for:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
Constraining a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
to values with at most a specific number of <i>units of length</i>,
|
|
where <i>units of length</i>
|
|
varies depending on <a href="#defn-basetype" class="propref">{base type definition}</a>.
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="exampleOuter">
|
|
<div class="exampleHeader">Example</div>
|
|
<div class="exampleWrapper">
|
|
The following is the definition of a <a href="#dt-user-derived" class="termref"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a>
|
|
datatype which might be used to accept form input with an upper limit
|
|
to the number of characters that are acceptable.
|
|
</div>
|
|
<div class="exampleInner">
|
|
<pre><simpleType name='form-input'>
|
|
<restriction base='string'>
|
|
<maxLength value='50'/>
|
|
</restriction>
|
|
</simpleType></pre>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="dc-maxLength"></a>4.3.3.1 The maxLength Schema Component</h5>
|
|
<div class="schemaComp">
|
|
<div class="compHeader">
|
|
<span class="schemaComp">Schema Component</span>: <a href="#dt-maxLength">maxLength</a>
|
|
</div>
|
|
<div class="compBody">
|
|
<dl class="props">
|
|
<dt>
|
|
<a name="maxLength-value"><span class="propdef">{value}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A <a href="#nonNegativeInteger">nonNegativeInteger</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="maxLength-fixed"><span class="propdef">{fixed}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A <a href="#boolean">boolean</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="maxLength-annotation"><span class="propdef">{annotation}</span></a>
|
|
</dt>
|
|
<dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<p>
|
|
If <a href="#maxLength-fixed" class="propref">{fixed}</a> is <i>true</i>, then types for which
|
|
the current type is the <a href="#defn-basetype" class="propref">{base type definition}</a> cannot specify a
|
|
value for <a href="#dc-maxLength">maxLength</a> other than <a href="#maxLength-value" class="propref">{value}</a>.
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="xr-maxLength"></a>4.3.3.2 XML Representation of maxLength Schema Components</h5>
|
|
|
|
<p>
|
|
The XML representation for a <a href="#dc-maxLength">maxLength</a> schema
|
|
component is a <a href="#element-maxLength" class="eltref"><maxLength></a> element information item. The
|
|
correspondences between the properties of the information item and
|
|
properties of the component are as follows:
|
|
</p>
|
|
|
|
<div class="reprdef">
|
|
<div class="reprHeader">
|
|
<span class="reprdef">XML Representation Summary</span>: <code>maxLength</code> Element Information Item</div>
|
|
<div class="reprBody">
|
|
<p class="element-syntax-1">
|
|
<a name="element-maxLength"><maxLength</a>
|
|
<br> fixed = <a href="#boolean">boolean</a> : false<br> id = <a href="#ID">ID</a>
|
|
<br> <b>value</b> = <a href="#nonNegativeInteger">nonNegativeInteger</a>
|
|
<br> <em>{any attributes with non-schema namespace . . .}</em>><br>
|
|
<em> Content: </em>(<a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref">annotation</a>?)<br></maxLength></p>
|
|
<div class="reprcomp">
|
|
<table class="reprcomp">
|
|
<thead>
|
|
<tr>
|
|
<th><a href="#dc-fractionDigits">maxLength</a><strong> Schema Component</strong></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<table border="0" cellpadding="3">
|
|
<thead>
|
|
<tr>
|
|
<th align="left">Property</th><th align="left">Representation</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody valign="top">
|
|
<tr valign="top">
|
|
<td><a href="#maxLength-value" class="propref">{value}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>value</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#maxLength-fixed" class="propref">{fixed}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>fixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>, if present, otherwise false
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#defn-annotation" class="propref">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref"><annotation></a>
|
|
element information items in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref">[children]</a>, if any.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="maxLength-validation-rules"></a>4.3.3.3 maxLength Validation Rules</h5>
|
|
<div class="constraintnote">
|
|
<a name="cvc-maxLength-valid"></a><b>Validation Rule: maxLength Valid</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
A value in a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is facet-valid with
|
|
respect to <a href="#dt-maxLength" class="termref"><span class="arrow">·</span>maxLength<span class="arrow">·</span></a>, determined as follows:
|
|
|
|
<div class="constraintlist">
|
|
<div class="clnumber">1
|
|
|
|
if the <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> then
|
|
<div class="constraintlist">
|
|
<div class="clnumber">1.1
|
|
|
|
if <a href="#defn-primitive" class="propref">{primitive type definition}</a> is <a href="#string">string</a>, then the
|
|
length of the value, as measured in <a class="xtermref" href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#dt-character">
|
|
character</a>s
|
|
<a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be less than or equal to
|
|
<a href="#maxLength-value" class="propref">{value}</a>;
|
|
|
|
</div>
|
|
<div class="clnumber">1.2
|
|
|
|
if <a href="#defn-primitive" class="propref">{primitive type definition}</a> is <a href="#hexBinary">hexBinary</a> or <a href="#base64Binary">base64Binary</a>, then the
|
|
length of the value, as measured in octets of the binary data,
|
|
<a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be less than or equal to <a href="#maxLength-value" class="propref">{value}</a>;
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="clnumber">2
|
|
|
|
if the <a href="#defn-variety" class="propref">{variety}</a> is <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a>,
|
|
then the length of the value, as measured
|
|
in list items, <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be less than or equal to
|
|
<a href="#maxLength-value" class="propref">{value}</a>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="maxLength-coss"></a>4.3.3.4 Constraints on maxLength Schema Components</h5>
|
|
<div class="constraintnote">
|
|
<a name="maxLength-valid-restriction"></a><b>Schema Component Constraint: maxLength valid restriction</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
It is an <a href="#dt-error" class="termref"><span class="arrow">·</span>error<span class="arrow">·</span></a> if <a href="#dc-maxLength">maxLength</a>
|
|
is among the members of <a href="#defn-facets" class="propref">{facets}</a> of
|
|
<a href="#defn-basetype" class="propref">{base type definition}</a> and <a href="#maxLength-value" class="propref">{value}</a> is
|
|
greater than the <a href="#maxLength-value" class="propref">{value}</a> of the parent
|
|
<a href="#dc-maxLength">maxLength</a>.
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="rf-pattern"></a>4.3.4 pattern</h4>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-pattern">[Definition:] </a>
|
|
<b>pattern</b> is a constraint on the
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of a datatype which is achieved by
|
|
constraining the <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> to literals
|
|
which match a specific pattern. The value of <b>pattern</b>
|
|
<a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be a <a href="#dt-regex" class="termref"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p>
|
|
|
|
<p>
|
|
<a href="#dt-pattern" class="termref"><span class="arrow">·</span>pattern<span class="arrow">·</span></a> provides for:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
Constraining a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
to values that are denoted by literals which match a specific
|
|
<a href="#dt-regex" class="termref"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a>.
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="exampleOuter">
|
|
<div class="exampleHeader">Example</div>
|
|
<div class="exampleWrapper">
|
|
The following is the definition of a <a href="#dt-user-derived" class="termref"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a>
|
|
datatype which is a better representation of postal codes in the
|
|
United States, by limiting strings to those which are matched by
|
|
a specific <a href="#dt-regex" class="termref"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a>.
|
|
</div>
|
|
<div class="exampleInner">
|
|
<pre><simpleType name='better-us-zipcode'>
|
|
<restriction base='string'>
|
|
<pattern value='[0-9]{5}(-[0-9]{4})?'/>
|
|
</restriction>
|
|
</simpleType></pre>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="dc-pattern"></a>4.3.4.1 The pattern Schema Component</h5>
|
|
<div class="schemaComp">
|
|
<div class="compHeader">
|
|
<span class="schemaComp">Schema Component</span>: <a href="#dt-pattern">pattern</a>
|
|
</div>
|
|
<div class="compBody">
|
|
<dl class="props">
|
|
<dt>
|
|
<a name="pattern-value"><span class="propdef">{value}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A <a href="#dt-regex" class="termref"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="pattern-annotation"><span class="propdef">{annotation}</span></a>
|
|
</dt>
|
|
<dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="xr-pattern"></a>4.3.4.2 XML Representation of pattern Schema Components</h5>
|
|
<p>
|
|
The XML representation for a <a href="#dc-pattern">pattern</a> schema
|
|
component is a <a href="#element-pattern" class="eltref"><pattern></a> element information item. The
|
|
correspondences between the properties of the information item and
|
|
properties of the component are as follows:
|
|
</p>
|
|
|
|
<div class="reprdef">
|
|
<div class="reprHeader">
|
|
<span class="reprdef">XML Representation Summary</span>: <code>pattern</code> Element Information Item</div>
|
|
<div class="reprBody">
|
|
<p class="element-syntax-1">
|
|
<a name="element-pattern"><pattern</a>
|
|
<br> id = <a href="#ID">ID</a>
|
|
<br> <b>value</b> = <a href="#dt-anySimpleType">anySimpleType</a>
|
|
<br> <em>{any attributes with non-schema namespace . . .}</em>><br>
|
|
<em> Content: </em>(<a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref">annotation</a>?)<br></pattern></p>
|
|
<div class="reprdep">
|
|
<a href="#pattern-value" class="propref">{value}</a> <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be a valid
|
|
<a href="#dt-regex" class="termref"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a>.
|
|
</div>
|
|
<div class="reprcomp">
|
|
<table class="reprcomp">
|
|
<thead>
|
|
<tr>
|
|
<th><a href="#dc-fractionDigits">pattern</a><strong> Schema Component</strong></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<table border="0" cellpadding="3">
|
|
<thead>
|
|
<tr>
|
|
<th align="left">Property</th><th align="left">Representation</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody valign="top">
|
|
<tr valign="top">
|
|
<td><a href="#pattern-value" class="propref">{value}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>value</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#defn-annotation" class="propref">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref"><annotation></a>
|
|
element information items in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref">[children]</a>, if any.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="pattern-rep-constr"></a>4.3.4.3 Constraints on XML Representation of pattern</h5>
|
|
<div class="constraintnote">
|
|
<a name="src-multiple-patterns"></a><b>Schema Representation Constraint: Multiple patterns</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
If multiple <a href="#element-pattern" class="eltref"><pattern></a> element information items appear as
|
|
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref">[children]</a> of a <a href="#element-simpleType" class="eltref"><simpleType></a>, the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[value]</a>s should
|
|
be combined as if they appeared in a single
|
|
<a href="#dt-regex" class="termref"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a> as separate
|
|
<a href="#dt-branch" class="termref"><span class="arrow">·</span>branch<span class="arrow">·</span></a>es.
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
It is a consequence of the schema representation constraint
|
|
<a href="#src-multiple-patterns">Multiple patterns (§4.3.4.3)</a> and of the rules for
|
|
<a href="#dt-restriction" class="termref"><span class="arrow">·</span>restriction<span class="arrow">·</span></a> that <a href="#dt-pattern" class="termref"><span class="arrow">·</span>pattern<span class="arrow">·</span></a>
|
|
facets specified on the <i>same</i> step in a type
|
|
derivation are <b>OR</b>ed together, while <a href="#dt-pattern" class="termref"><span class="arrow">·</span>pattern<span class="arrow">·</span></a>
|
|
facets specified on <i>different</i> steps of a type derivation
|
|
are <b>AND</b>ed together.
|
|
<p>
|
|
</p>
|
|
|
|
Thus, to impose two <a href="#dt-pattern" class="termref"><span class="arrow">·</span>pattern<span class="arrow">·</span></a> constraints simultaneously,
|
|
schema authors may either write a single <a href="#dt-pattern" class="termref"><span class="arrow">·</span>pattern<span class="arrow">·</span></a> which
|
|
expresses the intersection of the two <a href="#dt-pattern" class="termref"><span class="arrow">·</span>pattern<span class="arrow">·</span></a>s they wish to
|
|
impose, or define each <a href="#dt-pattern" class="termref"><span class="arrow">·</span>pattern<span class="arrow">·</span></a> on a separate type derivation
|
|
step.
|
|
|
|
</blockquote>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="pattern-validation-rules"></a>4.3.4.4 pattern Validation Rules</h5>
|
|
<div class="constraintnote">
|
|
<a name="cvc-pattern-valid"></a><b>Validation Rule: pattern valid</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
A literal in a <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> is facet-valid with
|
|
respect to <a href="#dt-pattern" class="termref"><span class="arrow">·</span>pattern<span class="arrow">·</span></a> if:
|
|
|
|
<div class="constraintlist">
|
|
<div class="clnumber">1
|
|
|
|
the literal is among the set of character sequences denoted by
|
|
the <a href="#dt-regex" class="termref"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a> specified in <a href="#pattern-value" class="propref">{value}</a>.
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="rf-enumeration"></a>4.3.5 enumeration</h4>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-enumeration">[Definition:] </a>
|
|
<b>enumeration</b> constrains the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
to a specified set of values.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
<b>enumeration</b> does not impose an order relation on the
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> it creates; the value of the
|
|
<a href="#dt-ordered" class="termref"><span class="arrow">·</span>ordered<span class="arrow">·</span></a> property of the <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
datatype remains that of the datatype from which it is
|
|
<a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>.
|
|
</p>
|
|
|
|
<p>
|
|
<a href="#dt-enumeration" class="termref"><span class="arrow">·</span>enumeration<span class="arrow">·</span></a> provides for:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
Constraining a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
to a specified set of values.
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="exampleOuter">
|
|
<div class="exampleHeader">Example</div>
|
|
<div class="exampleWrapper">
|
|
The following example is a datatype definition for a
|
|
<a href="#dt-user-derived" class="termref"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a> 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
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>. The enumerated values must be
|
|
type-valid literals for the <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a>.
|
|
</div>
|
|
<div class="exampleInner">
|
|
<pre><simpleType name='holidays'>
|
|
<annotation>
|
|
<documentation>some US holidays</documentation>
|
|
</annotation>
|
|
<restriction base='gMonthDay'>
|
|
<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>
|
|
</restriction>
|
|
</simpleType></pre>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="dc-enumeration"></a>4.3.5.1 The enumeration Schema Component</h5>
|
|
<div class="schemaComp">
|
|
<div class="compHeader">
|
|
<span class="schemaComp">Schema Component</span>: <a href="#dt-enumeration">enumeration</a>
|
|
</div>
|
|
<div class="compBody">
|
|
<dl class="props">
|
|
<dt>
|
|
<a name="enumeration-value"><span class="propdef">{value}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A set of values from the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the
|
|
<a href="#defn-basetype" class="propref">{base type definition}</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="enumeration-annotation"><span class="propdef">{annotation}</span></a>
|
|
</dt>
|
|
<dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="xr-enumeration"></a>4.3.5.2 XML Representation of enumeration Schema Components</h5>
|
|
<p>
|
|
The XML representation for an <a href="#dc-enumeration">enumeration</a> schema
|
|
component is an <a href="#element-enumeration" class="eltref"><enumeration></a> element information item. The
|
|
correspondences between the properties of the information item and
|
|
properties of the component are as follows:
|
|
</p>
|
|
|
|
<div class="reprdef">
|
|
<div class="reprHeader">
|
|
<span class="reprdef">XML Representation Summary</span>: <code>enumeration</code> Element Information Item</div>
|
|
<div class="reprBody">
|
|
<p class="element-syntax-1">
|
|
<a name="element-enumeration"><enumeration</a>
|
|
<br> id = <a href="#ID">ID</a>
|
|
<br> <b>value</b> = <a href="#dt-anySimpleType">anySimpleType</a>
|
|
<br> <em>{any attributes with non-schema namespace . . .}</em>><br>
|
|
<em> Content: </em>(<a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref">annotation</a>?)<br></enumeration></p>
|
|
<div class="reprdep">
|
|
<a href="#enumeration-value" class="propref">{value}</a> <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be
|
|
in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <a href="#defn-basetype" class="propref">{base type definition}</a>.
|
|
</div>
|
|
<div class="reprcomp">
|
|
<table class="reprcomp">
|
|
<thead>
|
|
<tr>
|
|
<th><a href="#dc-enumeration">enumeration</a><strong> Schema Component</strong></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<table border="0" cellpadding="3">
|
|
<thead>
|
|
<tr>
|
|
<th align="left">Property</th><th align="left">Representation</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody valign="top">
|
|
<tr valign="top">
|
|
<td><a href="#enumeration-value" class="propref">{value}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>value</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#defn-annotation" class="propref">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref"><annotation></a>
|
|
element information items in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref">[children]</a>, if any.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="enumeration-rep-constr"></a>4.3.5.3 Constraints on XML Representation of enumeration</h5>
|
|
<div class="constraintnote">
|
|
<a name="src-multiple-enumerations"></a><b>Schema Representation Constraint: Multiple enumerations</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
If multiple <a href="#element-enumeration" class="eltref"><enumeration></a> element information items appear
|
|
as <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref">[children]</a> of a <a href="#element-simpleType" class="eltref"><simpleType></a> the
|
|
<a href="#enumeration-value" class="propref">{value}</a> of the <a href="#dc-enumeration">enumeration</a>
|
|
component should be the set of all such <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[value]</a>s.
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="enumeration-validation-rules"></a>4.3.5.4 enumeration Validation Rules</h5>
|
|
<div class="constraintnote">
|
|
<a name="cvc-enumeration-valid"></a><b>Validation Rule: enumeration valid</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
A value in a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is facet-valid with
|
|
respect to <a href="#dt-enumeration" class="termref"><span class="arrow">·</span>enumeration<span class="arrow">·</span></a> if
|
|
the value is one of the values specified in
|
|
<a href="#enumeration-value" class="propref">{value}</a>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="enumeration-coss"></a>4.3.5.5 Constraints on enumeration Schema Components</h5>
|
|
<div class="constraintnote">
|
|
<a name="enumeration-valid-restriction"></a><b>Schema Component Constraint: enumeration valid restriction</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
It is an <a href="#dt-error" class="termref"><span class="arrow">·</span>error<span class="arrow">·</span></a> if any member of <a href="#enumeration-value" class="propref">{value}</a> is not in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
of <a href="#defn-basetype" class="propref">{base type definition}</a>.
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="rf-whiteSpace"></a>4.3.6 whiteSpace</h4>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-whiteSpace">[Definition:] </a>
|
|
<b>whiteSpace</b> constrains the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
of types <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#string">string</a> such that
|
|
the various behaviors
|
|
specified in <a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#AVNormalize">Attribute Value Normalization</a>
|
|
in <a href="#XML">[XML 1.0 (Second Edition)]</a> are realized. The value of
|
|
<b>whiteSpace</b> must be one of {preserve, replace, collapse}.
|
|
</span>
|
|
</p>
|
|
<dl>
|
|
|
|
<dt>
|
|
<b>preserve</b>
|
|
</dt>
|
|
<dd>
|
|
|
|
No normalization is done, the value is not changed (this is the
|
|
behavior required by <a href="#XML">[XML 1.0 (Second Edition)]</a> for element content)
|
|
|
|
</dd>
|
|
|
|
|
|
<dt>
|
|
<b>replace</b>
|
|
</dt>
|
|
<dd>
|
|
|
|
All occurrences of #x9 (tab), #xA (line feed) and #xD (carriage return)
|
|
are replaced with #x20 (space)
|
|
|
|
</dd>
|
|
|
|
|
|
<dt>
|
|
<b>collapse</b>
|
|
</dt>
|
|
<dd>
|
|
|
|
After the processing implied by <b>replace</b>, contiguous
|
|
sequences of #x20's are collapsed to a single #x20, and leading and
|
|
trailing #x20's are removed.
|
|
|
|
</dd>
|
|
|
|
</dl>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
The notation #xA used here (and elsewhere in this specification) represents
|
|
the Universal Character Set (UCS) code point <code>hexadecimal A</code> (line feed), which is denoted by
|
|
U+000A. This notation is to be distinguished from <code>&#xA;</code>,
|
|
which is the XML <a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-CharRef">character reference</a>
|
|
to that same UCS code point.
|
|
|
|
</blockquote>
|
|
<p>
|
|
<b>whiteSpace</b> is applicable to all <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> and
|
|
<a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatypes. For all <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a>
|
|
datatypes other than <a href="#string">string</a> (and types <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
by <a href="#dt-restriction" class="termref"><span class="arrow">·</span>restriction<span class="arrow">·</span></a> from it) the value of <b>whiteSpace</b> is
|
|
<code>collapse</code> and cannot be changed by a schema author; for
|
|
<a href="#string">string</a> the value of <b>whiteSpace</b> is
|
|
<code>preserve</code>; for any type <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> by
|
|
<a href="#dt-restriction" class="termref"><span class="arrow">·</span>restriction<span class="arrow">·</span></a> from
|
|
<a href="#string">string</a> the value of <b>whiteSpace</b> can
|
|
be any of the three legal values. For all datatypes
|
|
<a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> by <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> the
|
|
value of <b>whiteSpace</b> is <code>collapse</code> and cannot
|
|
be changed by a schema author. For all datatypes
|
|
<a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> by <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a>
|
|
<b>whiteSpace</b> does not apply directly; however, the
|
|
normalization behavior of <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a> types is controlled by
|
|
the value of <b>whiteSpace</b> on that one of the
|
|
<a href="#dt-memberTypes" class="termref"><span class="arrow">·</span>memberTypes<span class="arrow">·</span></a> against which the <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a>
|
|
is successfully validated.
|
|
</p>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
For more information on <b>whiteSpace</b>, see the
|
|
discussion on white space normalization in
|
|
<a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#components">Schema Component Details</a>
|
|
in <a href="#structural-schemas">[XML Schema Part 1: Structures]</a>.
|
|
|
|
</blockquote>
|
|
|
|
<p>
|
|
<a href="#dt-whiteSpace" class="termref"><span class="arrow">·</span>whiteSpace<span class="arrow">·</span></a> provides for:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
Constraining a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> according to
|
|
the white space normalization rules.
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="exampleOuter">
|
|
<div class="exampleHeader">Example</div>
|
|
<div class="exampleWrapper">
|
|
The following example is the datatype definition for
|
|
the <a href="#token">token</a> <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
<a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
datatype.
|
|
</div>
|
|
<div class="exampleInner">
|
|
<pre><simpleType name='token'>
|
|
<restriction base='normalizedString'>
|
|
<whiteSpace value='collapse'/>
|
|
</restriction>
|
|
</simpleType></pre>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="dc-whiteSpace"></a>4.3.6.1 The whiteSpace Schema Component</h5>
|
|
<div class="schemaComp">
|
|
<div class="compHeader">
|
|
<span class="schemaComp">Schema Component</span>: <a href="#dt-whiteSpace">whiteSpace</a>
|
|
</div>
|
|
<div class="compBody">
|
|
<dl class="props">
|
|
<dt>
|
|
<a name="whiteSpace-value"><span class="propdef">{value}</span></a>
|
|
</dt>
|
|
<dd>
|
|
One of <code>{preserve, replace, collapse}</code>.
|
|
</dd>
|
|
<dt>
|
|
<a name="whiteSpace-fixed"><span class="propdef">{fixed}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A <a href="#boolean">boolean</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="whiteSpace-annotation"><span class="propdef">{annotation}</span></a>
|
|
</dt>
|
|
<dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<p>
|
|
If <a href="#whiteSpace-fixed" class="propref">{fixed}</a> is <i>true</i>, then types for which
|
|
the current type is the <a href="#defn-basetype" class="propref">{base type definition}</a> cannot specify a
|
|
value for <a href="#dc-whiteSpace">whiteSpace</a> other than <a href="#whiteSpace-value" class="propref">{value}</a>.
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="xr-whiteSpace"></a>4.3.6.2 XML Representation of whiteSpace Schema Components</h5>
|
|
|
|
<p>
|
|
The XML representation for a <a href="#dc-whiteSpace">whiteSpace</a> schema
|
|
component is a <a href="#element-whiteSpace" class="eltref"><whiteSpace></a> element information item. The
|
|
correspondences between the properties of the information item and
|
|
properties of the component are as follows:
|
|
</p>
|
|
|
|
<div class="reprdef">
|
|
<div class="reprHeader">
|
|
<span class="reprdef">XML Representation Summary</span>: <code>whiteSpace</code> Element Information Item</div>
|
|
<div class="reprBody">
|
|
<p class="element-syntax-1">
|
|
<a name="element-whiteSpace"><whiteSpace</a>
|
|
<br> fixed = <a href="#boolean">boolean</a> : false<br> id = <a href="#ID">ID</a>
|
|
<br> <b>value</b> = (<var>collapse</var> | <var>preserve</var> | <var>replace</var>)<br> <em>{any attributes with non-schema namespace . . .}</em>><br>
|
|
<em> Content: </em>(<a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref">annotation</a>?)<br></whiteSpace></p>
|
|
<div class="reprcomp">
|
|
<table class="reprcomp">
|
|
<thead>
|
|
<tr>
|
|
<th><a href="#dc-whiteSpace">whiteSpace</a><strong> Schema Component</strong></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<table border="0" cellpadding="3">
|
|
<thead>
|
|
<tr>
|
|
<th align="left">Property</th><th align="left">Representation</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody valign="top">
|
|
<tr valign="top">
|
|
<td><a href="#whiteSpace-value" class="propref">{value}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>value</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#whiteSpace-fixed" class="propref">{fixed}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>fixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>, if present, otherwise false
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#defn-annotation" class="propref">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref"><annotation></a>
|
|
element information items in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref">[children]</a>, if any.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="whiteSpace-validation-rules"></a>4.3.6.3 whiteSpace Validation Rules</h5>
|
|
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
There are no <a href="#dt-cvc" class="termref"><span class="arrow">·</span>Validation Rule<span class="arrow">·</span></a>s associated <a href="#dt-whiteSpace" class="termref"><span class="arrow">·</span>whiteSpace<span class="arrow">·</span></a>.
|
|
For more information, see the
|
|
discussion on white space normalization in
|
|
<a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#components">Schema Component Details</a>
|
|
in <a href="#structural-schemas">[XML Schema Part 1: Structures]</a>.
|
|
|
|
</blockquote>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="whiteSpace-coss"></a>4.3.6.4 Constraints on whiteSpace Schema Components</h5>
|
|
<div class="constraintnote">
|
|
<a name="whiteSpace-valid-restriction"></a><b>Schema Component Constraint: whiteSpace valid restriction</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
It is an <a href="#dt-error" class="termref"><span class="arrow">·</span>error<span class="arrow">·</span></a> if <a href="#dc-whiteSpace">whiteSpace</a>
|
|
is among the members of <a href="#defn-facets" class="propref">{facets}</a> of
|
|
<a href="#defn-basetype" class="propref">{base type definition}</a> and any of the following conditions is
|
|
true:
|
|
|
|
<div class="constraintlist">
|
|
<div class="clnumber">1
|
|
|
|
<a href="#whiteSpace-value" class="propref">{value}</a> is <i>replace</i> or <i>preserve</i>
|
|
and the <a href="#whiteSpace-value" class="propref">{value}</a> of the parent
|
|
<a href="#dc-whiteSpace">whiteSpace</a> is <i>collapse</i>
|
|
|
|
</div>
|
|
<div class="clnumber">2
|
|
|
|
<a href="#whiteSpace-value" class="propref">{value}</a> is <i>preserve</i>
|
|
and the <a href="#whiteSpace-value" class="propref">{value}</a> of the parent
|
|
<a href="#dc-whiteSpace">whiteSpace</a> is <i>replace</i>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="rf-maxInclusive"></a>4.3.7 maxInclusive</h4>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-maxInclusive">[Definition:] </a>
|
|
<b>maxInclusive</b> is the <a href="#dt-inclusive-upper-bound" class="termref"><span class="arrow">·</span>inclusive upper bound<span class="arrow">·</span></a>
|
|
of the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> for a datatype with the
|
|
<a href="#dt-ordered" class="termref"><span class="arrow">·</span>ordered<span class="arrow">·</span></a> property. The value of
|
|
<b>maxInclusive</b> <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be
|
|
in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the
|
|
<a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p>
|
|
|
|
<p>
|
|
<a href="#dt-maxInclusive" class="termref"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> provides for:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
Constraining a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> to values
|
|
with a specific <a href="#dt-inclusive-upper-bound" class="termref"><span class="arrow">·</span>inclusive upper bound<span class="arrow">·</span></a>.
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="exampleOuter">
|
|
<div class="exampleHeader">Example</div>
|
|
<div class="exampleWrapper">
|
|
The following is the definition of a <a href="#dt-user-derived" class="termref"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a>
|
|
datatype which limits values to integers less than or equal to
|
|
100, using <a href="#dt-maxInclusive" class="termref"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a>.
|
|
</div>
|
|
<div class="exampleInner">
|
|
<pre><simpleType name='one-hundred-or-less'>
|
|
<restriction base='integer'>
|
|
<maxInclusive value='100'/>
|
|
</restriction>
|
|
</simpleType></pre>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="dc-maxInclusive"></a>4.3.7.1 The maxInclusive Schema Component</h5>
|
|
<div class="schemaComp">
|
|
<div class="compHeader">
|
|
<span class="schemaComp">Schema Component</span>: <a href="#dt-maxInclusive">maxInclusive</a>
|
|
</div>
|
|
<div class="compBody">
|
|
<dl class="props">
|
|
<dt>
|
|
<a name="maxInclusive-value"><span class="propdef">{value}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A value from the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the
|
|
<a href="#defn-basetype" class="propref">{base type definition}</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="maxInclusive-fixed"><span class="propdef">{fixed}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A <a href="#boolean">boolean</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="maxInclusive-annotation"><span class="propdef">{annotation}</span></a>
|
|
</dt>
|
|
<dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<p>
|
|
If <a href="#maxInclusive-fixed" class="propref">{fixed}</a> is <i>true</i>, then types for which
|
|
the current type is the <a href="#defn-basetype" class="propref">{base type definition}</a> cannot specify a
|
|
value for <a href="#dc-maxInclusive">maxInclusive</a> other than <a href="#maxInclusive-value" class="propref">{value}</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="xr-maxInclusive"></a>4.3.7.2 XML Representation of maxInclusive Schema Components</h5>
|
|
<p>
|
|
The XML representation for a <a href="#dc-maxInclusive">maxInclusive</a> schema
|
|
component is a <a href="#element-maxInclusive" class="eltref"><maxInclusive></a> element information item. The
|
|
correspondences between the properties of the information item and
|
|
properties of the component are as follows:
|
|
</p>
|
|
|
|
<div class="reprdef">
|
|
<div class="reprHeader">
|
|
<span class="reprdef">XML Representation Summary</span>: <code>maxInclusive</code> Element Information Item</div>
|
|
<div class="reprBody">
|
|
<p class="element-syntax-1">
|
|
<a name="element-maxInclusive"><maxInclusive</a>
|
|
<br> fixed = <a href="#boolean">boolean</a> : false<br> id = <a href="#ID">ID</a>
|
|
<br> <b>value</b> = <a href="#dt-anySimpleType">anySimpleType</a>
|
|
<br> <em>{any attributes with non-schema namespace . . .}</em>><br>
|
|
<em> Content: </em>(<a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref">annotation</a>?)<br></maxInclusive></p>
|
|
<div class="reprdep">
|
|
<a href="#maxInclusive-value" class="propref">{value}</a> <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be
|
|
in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <a href="#defn-basetype" class="propref">{base type definition}</a>.
|
|
</div>
|
|
<div class="reprcomp">
|
|
<table class="reprcomp">
|
|
<thead>
|
|
<tr>
|
|
<th><a href="#dt-maxInclusive">maxInclusive</a><strong> Schema Component</strong></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<table border="0" cellpadding="3">
|
|
<thead>
|
|
<tr>
|
|
<th align="left">Property</th><th align="left">Representation</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody valign="top">
|
|
<tr valign="top">
|
|
<td><a href="#maxInclusive-value" class="propref">{value}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>value</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#maxInclusive-fixed" class="propref">{fixed}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>fixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>, if present, otherwise false, if present, otherwise false
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#defn-annotation" class="propref">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref"><annotation></a>
|
|
element information items in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref">[children]</a>, if any.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="maxInclusive-validation-rules"></a>4.3.7.3 maxInclusive Validation Rules</h5>
|
|
<div class="constraintnote">
|
|
<a name="cvc-maxInclusive-valid"></a><b>Validation Rule: maxInclusive Valid</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
A value in an <a href="#dt-ordered" class="termref"><span class="arrow">·</span>ordered<span class="arrow">·</span></a> <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
is facet-valid with respect to <a href="#dt-maxInclusive" class="termref"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a>, determined as
|
|
follows:
|
|
|
|
<div class="constraintlist">
|
|
<div class="clnumber">1
|
|
|
|
if the <a href="#dt-numeric" class="termref"><span class="arrow">·</span>numeric<span class="arrow">·</span></a> property in
|
|
<a href="#defn-fund-facets" class="propref">{fundamental facets}</a> is <i>true</i>, then the value
|
|
<a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be numerically less than or
|
|
equal to <a href="#maxInclusive-value" class="propref">{value}</a>;
|
|
|
|
</div>
|
|
<div class="clnumber">2
|
|
|
|
if the <a href="#dt-numeric" class="termref"><span class="arrow">·</span>numeric<span class="arrow">·</span></a> property in
|
|
<a href="#defn-fund-facets" class="propref">{fundamental facets}</a> is <i>false</i> (i.e.,
|
|
<a href="#defn-basetype" class="propref">{base type definition}</a> is one of the date and time related
|
|
datatypes), then the value <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be chronologically
|
|
less than or equal to <a href="#maxInclusive-value" class="propref">{value}</a>;
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="maxInclusive-coss"></a>4.3.7.4 Constraints on maxInclusive Schema Components</h5>
|
|
<div class="constraintnote">
|
|
<a name="minInclusive-less-than-equal-to-maxInclusive"></a><b>Schema Component Constraint: minInclusive <= maxInclusive</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
It is an <a href="#dt-error" class="termref"><span class="arrow">·</span>error<span class="arrow">·</span></a> for the value specified for
|
|
<a href="#dt-minInclusive" class="termref"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> to be greater than the value
|
|
specified for <a href="#dt-maxInclusive" class="termref"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> for the same datatype.
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="constraintnote">
|
|
<a name="maxInclusive-valid-restriction"></a><b>Schema Component Constraint: maxInclusive valid restriction</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
It is an <a href="#dt-error" class="termref"><span class="arrow">·</span>error<span class="arrow">·</span></a> if any of the following conditions
|
|
is true:
|
|
|
|
<div class="constraintlist">
|
|
<div class="clnumber">1
|
|
|
|
<a href="#dc-maxInclusive">maxInclusive</a> is among the members of
|
|
<a href="#defn-facets" class="propref">{facets}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>
|
|
and <a href="#maxInclusive-value" class="propref">{value}</a> is
|
|
greater than the <a href="#maxInclusive-value" class="propref">{value}</a> of the parent
|
|
<a href="#dc-maxInclusive">maxInclusive</a>
|
|
|
|
</div>
|
|
<div class="clnumber">2
|
|
|
|
<a href="#dc-maxExclusive">maxExclusive</a> is among the members of
|
|
<a href="#defn-facets" class="propref">{facets}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>
|
|
and <a href="#maxInclusive-value" class="propref">{value}</a> is
|
|
greater than or equal to the <a href="#maxExclusive-value" class="propref">{value}</a> of the parent
|
|
<a href="#dc-maxExclusive">maxExclusive</a>
|
|
|
|
</div>
|
|
<div class="clnumber">3
|
|
|
|
<a href="#dc-minInclusive">minInclusive</a> is among the members of
|
|
<a href="#defn-facets" class="propref">{facets}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>
|
|
and <a href="#maxInclusive-value" class="propref">{value}</a> is
|
|
less than the <a href="#minInclusive-value" class="propref">{value}</a> of the parent
|
|
<a href="#dc-minInclusive">minInclusive</a>
|
|
|
|
</div>
|
|
<div class="clnumber">4
|
|
|
|
<a href="#dc-minExclusive">minExclusive</a> is among the members of
|
|
<a href="#defn-facets" class="propref">{facets}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>
|
|
and <a href="#maxInclusive-value" class="propref">{value}</a> is
|
|
less than or equal to the <a href="#minExclusive-value" class="propref">{value}</a> of the parent
|
|
<a href="#dc-minExclusive">minExclusive</a>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="rf-maxExclusive"></a>4.3.8 maxExclusive</h4>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-maxExclusive">[Definition:] </a>
|
|
<b>maxExclusive</b> is the <a href="#dt-exclusive-upper-bound" class="termref"><span class="arrow">·</span>exclusive upper bound<span class="arrow">·</span></a>
|
|
of the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> for a datatype with the
|
|
<a href="#dt-ordered" class="termref"><span class="arrow">·</span>ordered<span class="arrow">·</span></a> property. The value of <b>maxExclusive</b>
|
|
<a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the
|
|
<a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p>
|
|
|
|
<p>
|
|
<a href="#dt-maxExclusive" class="termref"><span class="arrow">·</span>maxExclusive<span class="arrow">·</span></a> provides for:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
Constraining a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> to values
|
|
with a specific <a href="#dt-exclusive-upper-bound" class="termref"><span class="arrow">·</span>exclusive upper bound<span class="arrow">·</span></a>.
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="exampleOuter">
|
|
<div class="exampleHeader">Example</div>
|
|
<div class="exampleWrapper">
|
|
The following is the definition of a <a href="#dt-user-derived" class="termref"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a>
|
|
datatype which limits values to integers less than or equal to
|
|
100, using <a href="#dt-maxExclusive" class="termref"><span class="arrow">·</span>maxExclusive<span class="arrow">·</span></a>.
|
|
</div>
|
|
<div class="exampleInner">
|
|
<pre><simpleType name='less-than-one-hundred-and-one'>
|
|
<restriction base='integer'>
|
|
<maxExclusive value='101'/>
|
|
</restriction>
|
|
</simpleType></pre>
|
|
</div>
|
|
<div class="exampleWrapper">
|
|
Note that the
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of this datatype is identical to
|
|
the previous one (named 'one-hundred-or-less').
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="dc-maxExclusive"></a>4.3.8.1 The maxExclusive Schema Component</h5>
|
|
<div class="schemaComp">
|
|
<div class="compHeader">
|
|
<span class="schemaComp">Schema Component</span>: <a href="#dt-maxExclusive">maxExclusive</a>
|
|
</div>
|
|
<div class="compBody">
|
|
<dl class="props">
|
|
<dt>
|
|
<a name="maxExclusive-value"><span class="propdef">{value}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A value from the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the
|
|
<a href="#defn-basetype" class="propref">{base type definition}</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="maxExclusive-fixed"><span class="propdef">{fixed}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A <a href="#boolean">boolean</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="maxExclusive-annotation"><span class="propdef">{annotation}</span></a>
|
|
</dt>
|
|
<dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<p>
|
|
If <a href="#maxExclusive-fixed" class="propref">{fixed}</a> is <i>true</i>, then types for which
|
|
the current type is the <a href="#defn-basetype" class="propref">{base type definition}</a> cannot specify a
|
|
value for <a href="#dc-maxExclusive">maxExclusive</a> other than <a href="#maxExclusive-value" class="propref">{value}</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="xr-maxExclusive"></a>4.3.8.2 XML Representation of maxExclusive Schema Components</h5>
|
|
<p>
|
|
The XML representation for a <a href="#dc-maxExclusive">maxExclusive</a> schema
|
|
component is a <a href="#element-maxExclusive" class="eltref"><maxExclusive></a> element information item. The
|
|
correspondences between the properties of the information item and
|
|
properties of the component are as follows:
|
|
</p>
|
|
|
|
<div class="reprdef">
|
|
<div class="reprHeader">
|
|
<span class="reprdef">XML Representation Summary</span>: <code>maxExclusive</code> Element Information Item</div>
|
|
<div class="reprBody">
|
|
<p class="element-syntax-1">
|
|
<a name="element-maxExclusive"><maxExclusive</a>
|
|
<br> fixed = <a href="#boolean">boolean</a> : false<br> id = <a href="#ID">ID</a>
|
|
<br> <b>value</b> = <a href="#dt-anySimpleType">anySimpleType</a>
|
|
<br> <em>{any attributes with non-schema namespace . . .}</em>><br>
|
|
<em> Content: </em>(<a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref">annotation</a>?)<br></maxExclusive></p>
|
|
<div class="reprdep">
|
|
<a href="#maxExclusive-value" class="propref">{value}</a> <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be
|
|
in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <a href="#defn-basetype" class="propref">{base type definition}</a>.
|
|
</div>
|
|
<div class="reprcomp">
|
|
<table class="reprcomp">
|
|
<thead>
|
|
<tr>
|
|
<th><a href="#dt-maxExclusive">maxExclusive</a><strong> Schema Component</strong></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<table border="0" cellpadding="3">
|
|
<thead>
|
|
<tr>
|
|
<th align="left">Property</th><th align="left">Representation</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody valign="top">
|
|
<tr valign="top">
|
|
<td><a href="#maxExclusive-value" class="propref">{value}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>value</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#maxExclusive-fixed" class="propref">{fixed}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>fixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>, if present, otherwise false
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#defn-annotation" class="propref">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref"><annotation></a>
|
|
element information items in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref">[children]</a>, if any.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="maxExclusive-validation-rules"></a>4.3.8.3 maxExclusive Validation Rules</h5>
|
|
<div class="constraintnote">
|
|
<a name="cvc-maxExclusive-valid"></a><b>Validation Rule: maxExclusive Valid</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
A value in an <a href="#dt-ordered" class="termref"><span class="arrow">·</span>ordered<span class="arrow">·</span></a> <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
is facet-valid with respect to <a href="#dt-maxExclusive" class="termref"><span class="arrow">·</span>maxExclusive<span class="arrow">·</span></a>, determined
|
|
as follows:
|
|
|
|
<div class="constraintlist">
|
|
<div class="clnumber">1
|
|
|
|
if the <a href="#dt-numeric" class="termref"><span class="arrow">·</span>numeric<span class="arrow">·</span></a> property in
|
|
<a href="#defn-fund-facets" class="propref">{fundamental facets}</a> is <i>true</i>, then the
|
|
value <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be numerically less than
|
|
<a href="#maxExclusive-value" class="propref">{value}</a>;
|
|
|
|
</div>
|
|
<div class="clnumber">2
|
|
|
|
if the <a href="#dt-numeric" class="termref"><span class="arrow">·</span>numeric<span class="arrow">·</span></a> property in
|
|
<a href="#defn-fund-facets" class="propref">{fundamental facets}</a> is <i>false</i> (i.e.,
|
|
<a href="#defn-basetype" class="propref">{base type definition}</a> is one of the date and time related
|
|
datatypes), then the value <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be chronologically
|
|
less than <a href="#maxExclusive-value" class="propref">{value}</a>;
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="maxExclusive-coss"></a>4.3.8.4 Constraints on maxExclusive Schema Components</h5>
|
|
<div class="constraintnote">
|
|
<a name="maxInclusive-maxExclusive"></a><b>Schema Component Constraint: maxInclusive and maxExclusive</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
It is an <a href="#dt-error" class="termref"><span class="arrow">·</span>error<span class="arrow">·</span></a> for both
|
|
<a href="#dt-maxInclusive" class="termref"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> and <a href="#dt-maxExclusive" class="termref"><span class="arrow">·</span>maxExclusive<span class="arrow">·</span></a>
|
|
to be specified in the same derivation step of a datatype definition.
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="constraintnote">
|
|
<a name="minExclusive-less-than-equal-to-maxExclusive"></a><b>Schema Component Constraint: minExclusive <= maxExclusive</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
It is an <a href="#dt-error" class="termref"><span class="arrow">·</span>error<span class="arrow">·</span></a> for the value specified for
|
|
<a href="#dt-minExclusive" class="termref"><span class="arrow">·</span>minExclusive<span class="arrow">·</span></a> to be greater than the value
|
|
specified for <a href="#dt-maxExclusive" class="termref"><span class="arrow">·</span>maxExclusive<span class="arrow">·</span></a> for the same datatype.
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="constraintnote">
|
|
<a name="maxExclusive-valid-restriction"></a><b>Schema Component Constraint: maxExclusive valid restriction</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
It is an <a href="#dt-error" class="termref"><span class="arrow">·</span>error<span class="arrow">·</span></a> if any of the following conditions
|
|
is true:
|
|
|
|
<div class="constraintlist">
|
|
<div class="clnumber">1
|
|
|
|
<a href="#dc-maxExclusive">maxExclusive</a> is among the members of
|
|
<a href="#defn-facets" class="propref">{facets}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>
|
|
and <a href="#maxExclusive-value" class="propref">{value}</a> is
|
|
greater than the <a href="#maxExclusive-value" class="propref">{value}</a> of the parent
|
|
<a href="#dc-maxExclusive">maxExclusive</a>
|
|
|
|
</div>
|
|
<div class="clnumber">2
|
|
|
|
<a href="#dc-maxInclusive">maxInclusive</a> is among the members of
|
|
<a href="#defn-facets" class="propref">{facets}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>
|
|
and <a href="#maxExclusive-value" class="propref">{value}</a> is
|
|
greater than the <a href="#maxInclusive-value" class="propref">{value}</a> of the parent
|
|
<a href="#dc-maxInclusive">maxInclusive</a>
|
|
|
|
</div>
|
|
<div class="clnumber">3
|
|
|
|
<a href="#dc-minInclusive">minInclusive</a> is among the members of
|
|
<a href="#defn-facets" class="propref">{facets}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>
|
|
and <a href="#maxExclusive-value" class="propref">{value}</a> is
|
|
less than or equal to the <a href="#minInclusive-value" class="propref">{value}</a> of the parent
|
|
<a href="#dc-minInclusive">minInclusive</a>
|
|
|
|
</div>
|
|
<div class="clnumber">4
|
|
|
|
<a href="#dc-minExclusive">minExclusive</a> is among the members of
|
|
<a href="#defn-facets" class="propref">{facets}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>
|
|
and <a href="#maxExclusive-value" class="propref">{value}</a> is
|
|
less than or equal to the <a href="#minExclusive-value" class="propref">{value}</a> of the parent
|
|
<a href="#dc-minExclusive">minExclusive</a>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="rf-minExclusive"></a>4.3.9 minExclusive</h4>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-minExclusive">[Definition:] </a>
|
|
<b>minExclusive</b> is the <a href="#dt-exclusive-lower-bound" class="termref"><span class="arrow">·</span>exclusive lower bound<span class="arrow">·</span></a>
|
|
of the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> for a datatype with the
|
|
<a href="#dt-ordered" class="termref"><span class="arrow">·</span>ordered<span class="arrow">·</span></a> property.
|
|
The value of <b>minExclusive</b> <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a>
|
|
be in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the
|
|
<a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p>
|
|
|
|
<p>
|
|
<a href="#dt-minExclusive" class="termref"><span class="arrow">·</span>minExclusive<span class="arrow">·</span></a> provides for:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
Constraining a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> to values
|
|
with a specific <a href="#dt-exclusive-lower-bound" class="termref"><span class="arrow">·</span>exclusive lower bound<span class="arrow">·</span></a>.
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="exampleOuter">
|
|
<div class="exampleHeader">Example</div>
|
|
<div class="exampleWrapper">
|
|
The following is the definition of a <a href="#dt-user-derived" class="termref"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a>
|
|
datatype which limits values to integers greater than or equal to
|
|
100, using <a href="#dt-minExclusive" class="termref"><span class="arrow">·</span>minExclusive<span class="arrow">·</span></a>.
|
|
</div>
|
|
<div class="exampleInner">
|
|
<pre><simpleType name='more-than-ninety-nine'>
|
|
<restriction base='integer'>
|
|
<minExclusive value='99'/>
|
|
</restriction>
|
|
</simpleType></pre>
|
|
</div>
|
|
<div class="exampleWrapper">
|
|
Note that the
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of this datatype is identical to
|
|
the previous one (named 'one-hundred-or-more').
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="dc-minExclusive"></a>4.3.9.1 The minExclusive Schema Component</h5>
|
|
<div class="schemaComp">
|
|
<div class="compHeader">
|
|
<span class="schemaComp">Schema Component</span>: <a href="#dt-minExclusive">minExclusive</a>
|
|
</div>
|
|
<div class="compBody">
|
|
<dl class="props">
|
|
<dt>
|
|
<a name="minExclusive-value"><span class="propdef">{value}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A value from the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the
|
|
<a href="#defn-basetype" class="propref">{base type definition}</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="minExclusive-fixed"><span class="propdef">{fixed}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A <a href="#boolean">boolean</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="minExclusive-annotation"><span class="propdef">{annotation}</span></a>
|
|
</dt>
|
|
<dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<p>
|
|
If <a href="#minExclusive-fixed" class="propref">{fixed}</a> is <i>true</i>, then types for which
|
|
the current type is the <a href="#defn-basetype" class="propref">{base type definition}</a> cannot specify a
|
|
value for <a href="#dc-minExclusive">minExclusive</a> other than <a href="#minExclusive-value" class="propref">{value}</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="xr-minExclusive"></a>4.3.9.2 XML Representation of minExclusive Schema Components</h5>
|
|
|
|
<p>
|
|
The XML representation for a <a href="#dc-minExclusive">minExclusive</a> schema
|
|
component is a <a href="#element-minExclusive" class="eltref"><minExclusive></a> element information item. The
|
|
correspondences between the properties of the information item and
|
|
properties of the component are as follows:
|
|
</p>
|
|
|
|
<div class="reprdef">
|
|
<div class="reprHeader">
|
|
<span class="reprdef">XML Representation Summary</span>: <code>minExclusive</code> Element Information Item</div>
|
|
<div class="reprBody">
|
|
<p class="element-syntax-1">
|
|
<a name="element-minExclusive"><minExclusive</a>
|
|
<br> fixed = <a href="#boolean">boolean</a> : false<br> id = <a href="#ID">ID</a>
|
|
<br> <b>value</b> = <a href="#dt-anySimpleType">anySimpleType</a>
|
|
<br> <em>{any attributes with non-schema namespace . . .}</em>><br>
|
|
<em> Content: </em>(<a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref">annotation</a>?)<br></minExclusive></p>
|
|
<div class="reprdep">
|
|
<a href="#minExclusive-value" class="propref">{value}</a> <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be
|
|
in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <a href="#defn-basetype" class="propref">{base type definition}</a>.
|
|
</div>
|
|
<div class="reprcomp">
|
|
<table class="reprcomp">
|
|
<thead>
|
|
<tr>
|
|
<th><a href="#dt-minExclusive">minExclusive</a><strong> Schema Component</strong></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<table border="0" cellpadding="3">
|
|
<thead>
|
|
<tr>
|
|
<th align="left">Property</th><th align="left">Representation</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody valign="top">
|
|
<tr valign="top">
|
|
<td><a href="#minExclusive-value" class="propref">{value}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>value</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#minExclusive-fixed" class="propref">{fixed}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>fixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>, if present, otherwise false
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#defn-annotation" class="propref">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref"><annotation></a>
|
|
element information items in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref">[children]</a>, if any.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="minExclusive-validation-rules"></a>4.3.9.3 minExclusive Validation Rules</h5>
|
|
<div class="constraintnote">
|
|
<a name="cvc-minExclusive-valid"></a><b>Validation Rule: minExclusive Valid</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
A value in an <a href="#dt-ordered" class="termref"><span class="arrow">·</span>ordered<span class="arrow">·</span></a> <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
is facet-valid with respect to <a href="#dt-minExclusive" class="termref"><span class="arrow">·</span>minExclusive<span class="arrow">·</span></a> if:
|
|
|
|
<div class="constraintlist">
|
|
<div class="clnumber">1
|
|
|
|
if the <a href="#dt-numeric" class="termref"><span class="arrow">·</span>numeric<span class="arrow">·</span></a> property in
|
|
<a href="#defn-fund-facets" class="propref">{fundamental facets}</a> is <i>true</i>, then the
|
|
value <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be numerically greater than
|
|
<a href="#minExclusive-value" class="propref">{value}</a>;
|
|
|
|
</div>
|
|
<div class="clnumber">2
|
|
|
|
if the <a href="#dt-numeric" class="termref"><span class="arrow">·</span>numeric<span class="arrow">·</span></a> property in
|
|
<a href="#defn-fund-facets" class="propref">{fundamental facets}</a> is <i>false</i> (i.e.,
|
|
<a href="#defn-basetype" class="propref">{base type definition}</a> is one of the date and time related
|
|
datatypes), then the value <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be chronologically
|
|
greater than <a href="#minExclusive-value" class="propref">{value}</a>;
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="minExclusive-coss"></a>4.3.9.4 Constraints on minExclusive Schema Components</h5>
|
|
<div class="constraintnote">
|
|
<a name="minInclusive-minExclusive"></a><b>Schema Component Constraint: minInclusive and minExclusive</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
It is an <a href="#dt-error" class="termref"><span class="arrow">·</span>error<span class="arrow">·</span></a> for both
|
|
<a href="#dt-minInclusive" class="termref"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> and <a href="#dt-minExclusive" class="termref"><span class="arrow">·</span>minExclusive<span class="arrow">·</span></a>
|
|
to be specified for the same datatype.
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="constraintnote">
|
|
<a name="minExclusive-less-than-maxInclusive"></a><b>Schema Component Constraint: minExclusive < maxInclusive</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
It is an <a href="#dt-error" class="termref"><span class="arrow">·</span>error<span class="arrow">·</span></a> for the value specified for
|
|
<a href="#dt-minExclusive" class="termref"><span class="arrow">·</span>minExclusive<span class="arrow">·</span></a> to be greater than or equal to the value
|
|
specified for <a href="#dt-maxInclusive" class="termref"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> for the same datatype.
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="constraintnote">
|
|
<a name="minExclusive-valid-restriction"></a><b>Schema Component Constraint: minExclusive valid restriction</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
It is an <a href="#dt-error" class="termref"><span class="arrow">·</span>error<span class="arrow">·</span></a> if any of the following conditions
|
|
is true:
|
|
|
|
<div class="constraintlist">
|
|
<div class="clnumber">1
|
|
|
|
<a href="#dc-minExclusive">minExclusive</a> is among the members of
|
|
<a href="#defn-facets" class="propref">{facets}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>
|
|
and <a href="#minExclusive-value" class="propref">{value}</a> is
|
|
less than the <a href="#minExclusive-value" class="propref">{value}</a> of the parent
|
|
<a href="#dc-minExclusive">minExclusive</a>
|
|
|
|
</div>
|
|
<div class="clnumber">2
|
|
|
|
<a href="#dc-maxInclusive">maxInclusive</a> is among the members of
|
|
<a href="#defn-facets" class="propref">{facets}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>
|
|
and <a href="#minExclusive-value" class="propref">{value}</a> is
|
|
greater the <a href="#maxInclusive-value" class="propref">{value}</a> of the parent
|
|
<a href="#dc-maxInclusive">maxInclusive</a>
|
|
|
|
</div>
|
|
<div class="clnumber">3
|
|
|
|
<a href="#dc-minInclusive">minInclusive</a> is among the members of
|
|
<a href="#defn-facets" class="propref">{facets}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>
|
|
and <a href="#minExclusive-value" class="propref">{value}</a> is
|
|
less than the <a href="#minInclusive-value" class="propref">{value}</a> of the parent
|
|
<a href="#dc-minInclusive">minInclusive</a>
|
|
|
|
</div>
|
|
<div class="clnumber">4
|
|
|
|
<a href="#dc-maxExclusive">maxExclusive</a> is among the members of
|
|
<a href="#defn-facets" class="propref">{facets}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>
|
|
and <a href="#maxExclusive-value" class="propref">{value}</a> is
|
|
greater than or equal to the <a href="#maxExclusive-value" class="propref">{value}</a> of the parent
|
|
<a href="#dc-maxExclusive">maxExclusive</a>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="rf-minInclusive"></a>4.3.10 minInclusive</h4>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-minInclusive">[Definition:] </a>
|
|
<b>minInclusive</b> is the <a href="#dt-inclusive-lower-bound" class="termref"><span class="arrow">·</span>inclusive lower bound<span class="arrow">·</span></a>
|
|
of the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> for a datatype with the
|
|
<a href="#dt-ordered" class="termref"><span class="arrow">·</span>ordered<span class="arrow">·</span></a> property. The value of
|
|
<b>minInclusive</b>
|
|
<a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the
|
|
<a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p>
|
|
|
|
<p>
|
|
<a href="#dt-minInclusive" class="termref"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> provides for:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
Constraining a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> to values
|
|
with a specific <a href="#dt-inclusive-lower-bound" class="termref"><span class="arrow">·</span>inclusive lower bound<span class="arrow">·</span></a>.
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="exampleOuter">
|
|
<div class="exampleHeader">Example</div>
|
|
<div class="exampleWrapper">
|
|
The following is the definition of a <a href="#dt-user-derived" class="termref"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a>
|
|
datatype which limits values to integers greater than or equal to
|
|
100, using <a href="#dt-minInclusive" class="termref"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a>.
|
|
</div>
|
|
<div class="exampleInner">
|
|
<pre><simpleType name='one-hundred-or-more'>
|
|
<restriction base='integer'>
|
|
<minInclusive value='100'/>
|
|
</restriction>
|
|
</simpleType></pre>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="dc-minInclusive"></a>4.3.10.1 The minInclusive Schema Component</h5>
|
|
<div class="schemaComp">
|
|
<div class="compHeader">
|
|
<span class="schemaComp">Schema Component</span>: <a href="#dt-minInclusive">minInclusive</a>
|
|
</div>
|
|
<div class="compBody">
|
|
<dl class="props">
|
|
<dt>
|
|
<a name="minInclusive-value"><span class="propdef">{value}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A value from the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the
|
|
<a href="#defn-basetype" class="propref">{base type definition}</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="minInclusive-fixed"><span class="propdef">{fixed}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A <a href="#boolean">boolean</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="minInclusive-annotation"><span class="propdef">{annotation}</span></a>
|
|
</dt>
|
|
<dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<p>
|
|
If <a href="#minInclusive-fixed" class="propref">{fixed}</a> is <i>true</i>, then types for which
|
|
the current type is the <a href="#defn-basetype" class="propref">{base type definition}</a> cannot specify a
|
|
value for <a href="#dc-minInclusive">minInclusive</a> other than <a href="#minInclusive-value" class="propref">{value}</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="xr-minInclusive"></a>4.3.10.2 XML Representation of minInclusive Schema Components</h5>
|
|
<p>
|
|
The XML representation for a <a href="#dc-minInclusive">minInclusive</a> schema
|
|
component is a <a href="#element-minInclusive" class="eltref"><minInclusive></a> element information item. The
|
|
correspondences between the properties of the information item and
|
|
properties of the component are as follows:
|
|
</p>
|
|
|
|
<div class="reprdef">
|
|
<div class="reprHeader">
|
|
<span class="reprdef">XML Representation Summary</span>: <code>minInclusive</code> Element Information Item</div>
|
|
<div class="reprBody">
|
|
<p class="element-syntax-1">
|
|
<a name="element-minInclusive"><minInclusive</a>
|
|
<br> fixed = <a href="#boolean">boolean</a> : false<br> id = <a href="#ID">ID</a>
|
|
<br> <b>value</b> = <a href="#dt-anySimpleType">anySimpleType</a>
|
|
<br> <em>{any attributes with non-schema namespace . . .}</em>><br>
|
|
<em> Content: </em>(<a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref">annotation</a>?)<br></minInclusive></p>
|
|
<div class="reprdep">
|
|
<a href="#minInclusive-value" class="propref">{value}</a> <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be
|
|
in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <a href="#defn-basetype" class="propref">{base type definition}</a>.
|
|
</div>
|
|
<div class="reprcomp">
|
|
<table class="reprcomp">
|
|
<thead>
|
|
<tr>
|
|
<th><a href="#dt-minInclusive">minInclusive</a><strong> Schema Component</strong></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<table border="0" cellpadding="3">
|
|
<thead>
|
|
<tr>
|
|
<th align="left">Property</th><th align="left">Representation</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody valign="top">
|
|
<tr valign="top">
|
|
<td><a href="#minInclusive-value" class="propref">{value}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>value</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#minInclusive-fixed" class="propref">{fixed}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>fixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>, if present, otherwise false
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#defn-annotation" class="propref">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref"><annotation></a>
|
|
element information items in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref">[children]</a>, if any.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="minInclusive-validation-rules"></a>4.3.10.3 minInclusive Validation Rules</h5>
|
|
<div class="constraintnote">
|
|
<a name="cvc-minInclusive-valid"></a><b>Validation Rule: minInclusive Valid</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
A value in an <a href="#dt-ordered" class="termref"><span class="arrow">·</span>ordered<span class="arrow">·</span></a> <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
is facet-valid with respect to <a href="#dt-minInclusive" class="termref"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> if:
|
|
|
|
<div class="constraintlist">
|
|
<div class="clnumber">1
|
|
|
|
if the <a href="#dt-numeric" class="termref"><span class="arrow">·</span>numeric<span class="arrow">·</span></a> property in
|
|
<a href="#defn-fund-facets" class="propref">{fundamental facets}</a> is <i>true</i>, then the
|
|
value <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be numerically greater than or equal to
|
|
<a href="#minInclusive-value" class="propref">{value}</a>;
|
|
|
|
</div>
|
|
<div class="clnumber">2
|
|
|
|
if the <a href="#dt-numeric" class="termref"><span class="arrow">·</span>numeric<span class="arrow">·</span></a> property in
|
|
<a href="#defn-fund-facets" class="propref">{fundamental facets}</a> is <i>false</i> (i.e.,
|
|
<a href="#defn-basetype" class="propref">{base type definition}</a> is one of the date and time related
|
|
datatypes), then the value <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be chronologically
|
|
greater than or equal to <a href="#minInclusive-value" class="propref">{value}</a>;
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="minInclusive-coss"></a>4.3.10.4 Constraints on minInclusive Schema Components</h5>
|
|
<div class="constraintnote">
|
|
<a name="minInclusive-less-than-maxExclusive"></a><b>Schema Component Constraint: minInclusive < maxExclusive</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
It is an <a href="#dt-error" class="termref"><span class="arrow">·</span>error<span class="arrow">·</span></a> for the value specified for
|
|
<a href="#dt-minInclusive" class="termref"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> to be greater than or equal to the value
|
|
specified for <a href="#dt-maxExclusive" class="termref"><span class="arrow">·</span>maxExclusive<span class="arrow">·</span></a> for the same datatype.
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="constraintnote">
|
|
<a name="minInclusive-valid-restriction"></a><b>Schema Component Constraint: minInclusive valid restriction</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
It is an <a href="#dt-error" class="termref"><span class="arrow">·</span>error<span class="arrow">·</span></a> if any of the following conditions
|
|
is true:
|
|
|
|
<div class="constraintlist">
|
|
<div class="clnumber">1
|
|
|
|
<a href="#dc-minInclusive">minInclusive</a> is among the members of
|
|
<a href="#defn-facets" class="propref">{facets}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>
|
|
and <a href="#minInclusive-value" class="propref">{value}</a> is
|
|
less than the <a href="#minInclusive-value" class="propref">{value}</a> of the parent
|
|
<a href="#dc-minInclusive">minInclusive</a>
|
|
|
|
</div>
|
|
<div class="clnumber">2
|
|
|
|
<a href="#dc-maxInclusive">maxInclusive</a> is among the members of
|
|
<a href="#defn-facets" class="propref">{facets}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>
|
|
and <a href="#minInclusive-value" class="propref">{value}</a> is
|
|
greater the <a href="#maxInclusive-value" class="propref">{value}</a> of the parent
|
|
<a href="#dc-maxInclusive">maxInclusive</a>
|
|
|
|
</div>
|
|
<div class="clnumber">3
|
|
|
|
<a href="#dc-minExclusive">minExclusive</a> is among the members of
|
|
<a href="#defn-facets" class="propref">{facets}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>
|
|
and <a href="#minInclusive-value" class="propref">{value}</a> is
|
|
less than or equal to the <a href="#minExclusive-value" class="propref">{value}</a> of the parent
|
|
<a href="#dc-minExclusive">minExclusive</a>
|
|
|
|
</div>
|
|
<div class="clnumber">4
|
|
|
|
<a href="#dc-maxExclusive">maxExclusive</a> is among the members of
|
|
<a href="#defn-facets" class="propref">{facets}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>
|
|
and <a href="#minInclusive-value" class="propref">{value}</a> is
|
|
greater than or equal to the <a href="#maxExclusive-value" class="propref">{value}</a> of the parent
|
|
<a href="#dc-maxExclusive">maxExclusive</a>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="rf-totalDigits"></a>4.3.11 totalDigits</h4>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-totalDigits">[Definition:] </a>
|
|
<b>totalDigits</b>
|
|
is the maximum number of digits in values of datatypes
|
|
<a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#decimal">decimal</a>. The value of
|
|
<b>totalDigits</b> <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be a
|
|
<a href="#positiveInteger">positiveInteger</a>.
|
|
</span>
|
|
</p>
|
|
|
|
<p>
|
|
<a href="#dt-totalDigits" class="termref"><span class="arrow">·</span>totalDigits<span class="arrow">·</span></a> provides for:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
Constraining a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> to values
|
|
with a specific maximum number of decimal digits (#x30-#x39).
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="exampleOuter">
|
|
<div class="exampleHeader">Example</div>
|
|
<div class="exampleWrapper">
|
|
The following is the definition of a <a href="#dt-user-derived" class="termref"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a>
|
|
datatype which could be used to represent monetary amounts, such as
|
|
in a financial management application which does not have figures
|
|
of $1M or more and only allows 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
|
|
<a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> in a manner specific to the
|
|
<a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a> (different than specifying max/min values
|
|
as before).
|
|
</div>
|
|
<div class="exampleInner">
|
|
<pre><simpleType name='amount'>
|
|
<restriction base='decimal'>
|
|
<totalDigits value='8'/>
|
|
<fractionDigits value='2' fixed='true'/>
|
|
</restriction>
|
|
</simpleType></pre>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="dc-totalDigits"></a>4.3.11.1 The totalDigits Schema Component</h5>
|
|
<div class="schemaComp">
|
|
<div class="compHeader">
|
|
<span class="schemaComp">Schema Component</span>: <a href="#dt-totalDigits">totalDigits</a>
|
|
</div>
|
|
<div class="compBody">
|
|
<dl class="props">
|
|
<dt>
|
|
<a name="totalDigits-value"><span class="propdef">{value}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A <a href="#positiveInteger">positiveInteger</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="totalDigits-fixed"><span class="propdef">{fixed}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A <a href="#boolean">boolean</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="totalDigits-annotation"><span class="propdef">{annotation}</span></a>
|
|
</dt>
|
|
<dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<p>
|
|
If <a href="#totalDigits-fixed" class="propref">{fixed}</a> is <i>true</i>, then types for which
|
|
the current type is the <a href="#defn-basetype" class="propref">{base type definition}</a> cannot specify a
|
|
value for <a href="#dc-totalDigits">totalDigits</a> other than
|
|
<a href="#totalDigits-value" class="propref">{value}</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="xr-totalDigits"></a>4.3.11.2 XML Representation of totalDigits Schema Components</h5>
|
|
|
|
<p>
|
|
The XML representation for a <a href="#dc-totalDigits">totalDigits</a> schema
|
|
component is a <a href="#element-totalDigits" class="eltref"><totalDigits></a> element information item. The
|
|
correspondences between the properties of the information item and
|
|
properties of the component are as follows:
|
|
</p>
|
|
|
|
<div class="reprdef">
|
|
<div class="reprHeader">
|
|
<span class="reprdef">XML Representation Summary</span>: <code>totalDigits</code> Element Information Item</div>
|
|
<div class="reprBody">
|
|
<p class="element-syntax-1">
|
|
<a name="element-totalDigits"><totalDigits</a>
|
|
<br> fixed = <a href="#boolean">boolean</a> : false<br> id = <a href="#ID">ID</a>
|
|
<br> <b>value</b> = <a href="#positiveInteger">positiveInteger</a>
|
|
<br> <em>{any attributes with non-schema namespace . . .}</em>><br>
|
|
<em> Content: </em>(<a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref">annotation</a>?)<br></totalDigits></p>
|
|
<div class="reprcomp">
|
|
<table class="reprcomp">
|
|
<thead>
|
|
<tr>
|
|
<th><a href="#dc-totalDigits">totalDigits</a><strong> Schema Component</strong></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<table border="0" cellpadding="3">
|
|
<thead>
|
|
<tr>
|
|
<th align="left">Property</th><th align="left">Representation</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody valign="top">
|
|
<tr valign="top">
|
|
<td><a href="#totalDigits-value" class="propref">{value}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>value</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#totalDigits-fixed" class="propref">{fixed}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>fixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>, if present, otherwise false
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#defn-annotation" class="propref">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref"><annotation></a>
|
|
element information items in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref">[children]</a>, if any.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="totalDigits-validation-rules"></a>4.3.11.3 totalDigits Validation Rules</h5>
|
|
<div class="constraintnote">
|
|
<a name="cvc-totalDigits-valid"></a><b>Validation Rule: totalDigits Valid</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
A value in a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is facet-valid with
|
|
respect to <a href="#dt-totalDigits" class="termref"><span class="arrow">·</span>totalDigits<span class="arrow">·</span></a> if:
|
|
|
|
<div class="constraintlist">
|
|
<div class="clnumber">1
|
|
|
|
the number of decimal digits in the value is less than or equal to
|
|
<a href="#totalDigits-value" class="propref">{value}</a>;
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="totalDigits-coss"></a>4.3.11.4 Constraints on totalDigits Schema Components</h5>
|
|
<div class="constraintnote">
|
|
<a name="totalDigits-valid-restriction"></a><b>Schema Component Constraint: totalDigits valid restriction</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
It is an <a href="#dt-error" class="termref"><span class="arrow">·</span>error<span class="arrow">·</span></a> if
|
|
<a href="#dc-totalDigits">totalDigits</a> is among the members of
|
|
<a href="#defn-facets" class="propref">{facets}</a> of <a href="#defn-basetype" class="propref">{base type definition}</a>
|
|
and <a href="#totalDigits-value" class="propref">{value}</a> is
|
|
greater than the <a href="#totalDigits-value" class="propref">{value}</a> of the parent
|
|
<a href="#dc-totalDigits">totalDigits</a>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="rf-fractionDigits"></a>4.3.12 fractionDigits</h4>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-fractionDigits">[Definition:] </a>
|
|
<b>fractionDigits</b>
|
|
is the maximum number of digits in the fractional part
|
|
of values of datatypes <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<a href="#decimal">decimal</a>. The value of <b>fractionDigits</b>
|
|
<a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> be a <a href="#nonNegativeInteger">nonNegativeInteger</a> .
|
|
</span>
|
|
</p>
|
|
|
|
<p>
|
|
<a href="#dt-fractionDigits" class="termref"><span class="arrow">·</span>fractionDigits<span class="arrow">·</span></a> provides for:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
Constraining a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> to values
|
|
with a specific maximum number of decimal digits in the fractional
|
|
part.
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="exampleOuter">
|
|
<div class="exampleHeader">Example</div>
|
|
<div class="exampleWrapper">
|
|
The following is the definition of a <a href="#dt-user-derived" class="termref"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a>
|
|
datatype which could be used to represent the magnitude
|
|
of a person's body temperature on the Celsius scale.
|
|
This definition would appear in a schema authored by an "end-user"
|
|
and shows how to define a datatype by specifying facet values which
|
|
constrain the range of the <a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a>.
|
|
</div>
|
|
<div class="exampleInner">
|
|
<pre><simpleType name='celsiusBodyTemp'>
|
|
<restriction base='decimal'>
|
|
<totalDigits value='4'/>
|
|
<fractionDigits value='1'/>
|
|
<minInclusive value='36.4'/>
|
|
<maxInclusive value='40.5'/>
|
|
</restriction>
|
|
</simpleType>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="dc-fractionDigits"></a>4.3.12.1 The fractionDigits Schema Component</h5>
|
|
<div class="schemaComp">
|
|
<div class="compHeader">
|
|
<span class="schemaComp">Schema Component</span>: <a href="#dt-fractionDigits">fractionDigits</a>
|
|
</div>
|
|
<div class="compBody">
|
|
<dl class="props">
|
|
<dt>
|
|
<a name="fractionDigits-value"><span class="propdef">{value}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A <a href="#nonNegativeInteger">nonNegativeInteger</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="fractionDigits-fixed"><span class="propdef">{fixed}</span></a>
|
|
</dt>
|
|
<dd>
|
|
A <a href="#boolean">boolean</a>.
|
|
</dd>
|
|
<dt>
|
|
<a name="fractionDigits-annotation"><span class="propdef">{annotation}</span></a>
|
|
</dt>
|
|
<dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<p>
|
|
If <a href="#fractionDigits-fixed" class="propref">{fixed}</a> is <i>true</i>, then types for which
|
|
the current type is the <a href="#defn-basetype" class="propref">{base type definition}</a> cannot specify a
|
|
value for <a href="#dc-fractionDigits">fractionDigits</a> other than
|
|
<a href="#fractionDigits-value" class="propref">{value}</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="xr-fractionDigits"></a>4.3.12.2 XML Representation of fractionDigits Schema Components</h5>
|
|
|
|
<p>
|
|
The XML representation for a <a href="#dc-fractionDigits">fractionDigits</a> schema
|
|
component is a <a href="#element-fractionDigits" class="eltref"><fractionDigits></a> element information item. The
|
|
correspondences between the properties of the information item and
|
|
properties of the component are as follows:
|
|
</p>
|
|
|
|
<div class="reprdef">
|
|
<div class="reprHeader">
|
|
<span class="reprdef">XML Representation Summary</span>: <code>fractionDigits</code> Element Information Item</div>
|
|
<div class="reprBody">
|
|
<p class="element-syntax-1">
|
|
<a name="element-fractionDigits"><fractionDigits</a>
|
|
<br> fixed = <a href="#boolean">boolean</a> : false<br> id = <a href="#ID">ID</a>
|
|
<br> <b>value</b> = <a href="#nonNegativeInteger">nonNegativeInteger</a>
|
|
<br> <em>{any attributes with non-schema namespace . . .}</em>><br>
|
|
<em> Content: </em>(<a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref">annotation</a>?)<br></fractionDigits></p>
|
|
<div class="reprcomp">
|
|
<table class="reprcomp">
|
|
<thead>
|
|
<tr>
|
|
<th><a href="#dc-fractionDigits">fractionDigits</a><strong> Schema Component</strong></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<table border="0" cellpadding="3">
|
|
<thead>
|
|
<tr>
|
|
<th align="left">Property</th><th align="left">Representation</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody valign="top">
|
|
<tr valign="top">
|
|
<td><a href="#fractionDigits-value" class="propref">{value}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>value</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#fractionDigits-fixed" class="propref">{fixed}</a></td><td>
|
|
The <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vv">actual value</a> of the <code>fixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref">[attribute]</a>, if present, otherwise false
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><a href="#defn-annotation" class="propref">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation" class="eltref"><annotation></a>
|
|
element information items in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref">[children]</a>, if any.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="fractionDigits-validation-rules"></a>4.3.12.3 fractionDigits Validation Rules</h5>
|
|
<div class="constraintnote">
|
|
<a name="cvc-fractionDigits-valid"></a><b>Validation Rule: fractionDigits Valid</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
A value in a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is facet-valid with
|
|
respect to <a href="#dt-fractionDigits" class="termref"><span class="arrow">·</span>fractionDigits<span class="arrow">·</span></a> if:
|
|
|
|
<div class="constraintlist">
|
|
<div class="clnumber">1
|
|
|
|
the number of decimal digits in the fractional part of the
|
|
value is less than or equal to <a href="#fractionDigits-value" class="propref">{value}</a>;
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div4">
|
|
<h5>
|
|
<a name="fractionDigits-coss"></a>4.3.12.4 Constraints on fractionDigits Schema Components</h5>
|
|
<div class="constraintnote">
|
|
<a name="fractionDigits-totalDigits"></a><b>Schema Component Constraint: fractionDigits less than or equal to totalDigits</b>
|
|
<br>
|
|
<div class="constraint">
|
|
|
|
|
|
It is an <a href="#dt-error" class="termref"><span class="arrow">·</span>error<span class="arrow">·</span></a> for <a href="#dt-fractionDigits" class="termref"><span class="arrow">·</span>fractionDigits<span class="arrow">·</span></a> to
|
|
be greater than <a href="#dt-totalDigits" class="termref"><span class="arrow">·</span>totalDigits<span class="arrow">·</span></a>.
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="div1">
|
|
<h2>
|
|
<a name="conformance"></a>5 Conformance</h2>
|
|
<p>
|
|
This specification describes two levels of conformance for
|
|
datatype processors. The first is
|
|
required of all processors. Support for the other will depend on the
|
|
application environments for which the processor is intended.
|
|
</p>
|
|
<p>
|
|
<span class="termdef"><a name="dt-minimally-conforming">[Definition:] </a>
|
|
<b>Minimally conforming</b> processors <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a>
|
|
completely and correctly implement the <a href="#dt-cos" class="termref"><span class="arrow">·</span>Constraint on Schemas<span class="arrow">·</span></a> and
|
|
<a href="#dt-cvc" class="termref"><span class="arrow">·</span>Validation Rule<span class="arrow">·</span></a>
|
|
.
|
|
</span>
|
|
</p>
|
|
<p>
|
|
<span class="termdef"><a name="dt-interchange">[Definition:] </a>
|
|
Processors which accept schemas in the form of XML documents as described
|
|
in <a href="#xr-defn">XML Representation of Simple Type Definition Schema Components (§4.1.2)</a> (and other relevant portions of
|
|
<a href="#datatype-components">Datatype components (§4)</a>) are additionally said to provide
|
|
<b>conformance to the XML Representation of Schemas</b>,
|
|
and <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a>, when processing schema documents, completely and
|
|
correctly implement all
|
|
<a href="#dt-src" class="termref"><span class="arrow">·</span>Schema Representation Constraint<span class="arrow">·</span></a>s
|
|
in this specification, and <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> adhere exactly to the
|
|
specifications in <a href="#xr-defn">XML Representation of Simple Type Definition Schema Components (§4.1.2)</a> (and other relevant portions of
|
|
<a href="#datatype-components">Datatype components (§4)</a>) for mapping
|
|
the contents of such
|
|
documents to <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-component">schema components</a>
|
|
for use in validation.
|
|
</span>
|
|
</p>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
By separating the conformance requirements relating to the concrete
|
|
syntax of XML schema documents, this specification admits processors
|
|
which validate using schemas stored in optimized binary representations,
|
|
dynamically created schemas represented as programming language data
|
|
structures, or implementations in which particular schemas are compiled
|
|
into executable code such as C or Java. Such processors can be said to
|
|
be <a href="#dt-minimally-conforming" class="termref"><span class="arrow">·</span>minimally conforming<span class="arrow">·</span></a>
|
|
but not necessarily in <a href="#dt-interchange" class="termref"><span class="arrow">·</span>conformance to
|
|
the XML Representation of Schemas<span class="arrow">·</span></a>.
|
|
|
|
</blockquote>
|
|
</div>
|
|
|
|
|
|
<hr title="Separator from footer">
|
|
<div class="appendices">
|
|
<div class="div1">
|
|
<h2>
|
|
<a name="schema"></a>A Schema for Datatype Definitions (normative)</h2>
|
|
<pre><?xml version='1.0'?>
|
|
<!-- XML Schema schema for XML Schemas: Part 2: Datatypes -->
|
|
<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN"
|
|
"XMLSchema.dtd" [
|
|
|
|
<!--
|
|
keep this schema XML1.0 DTD valid
|
|
-->
|
|
<!ENTITY % schemaAttrs 'xmlns:hfp CDATA #IMPLIED'>
|
|
|
|
<!ELEMENT hfp:hasFacet EMPTY>
|
|
<!ATTLIST hfp:hasFacet
|
|
name NMTOKEN #REQUIRED>
|
|
|
|
<!ELEMENT hfp:hasProperty EMPTY>
|
|
<!ATTLIST hfp:hasProperty
|
|
name NMTOKEN #REQUIRED
|
|
value CDATA #REQUIRED>
|
|
<!--
|
|
Make sure that processors that do not read the external
|
|
subset will know about the various IDs we declare
|
|
-->
|
|
<!ATTLIST xs:simpleType id ID #IMPLIED>
|
|
<!ATTLIST xs:maxExclusive id ID #IMPLIED>
|
|
<!ATTLIST xs:minExclusive id ID #IMPLIED>
|
|
<!ATTLIST xs:maxInclusive id ID #IMPLIED>
|
|
<!ATTLIST xs:minInclusive id ID #IMPLIED>
|
|
<!ATTLIST xs:totalDigits id ID #IMPLIED>
|
|
<!ATTLIST xs:fractionDigits id ID #IMPLIED>
|
|
<!ATTLIST xs:length id ID #IMPLIED>
|
|
<!ATTLIST xs:minLength id ID #IMPLIED>
|
|
<!ATTLIST xs:maxLength id ID #IMPLIED>
|
|
<!ATTLIST xs:enumeration id ID #IMPLIED>
|
|
<!ATTLIST xs:pattern id ID #IMPLIED>
|
|
<!ATTLIST xs:appinfo id ID #IMPLIED>
|
|
<!ATTLIST xs:documentation id ID #IMPLIED>
|
|
<!ATTLIST xs:list id ID #IMPLIED>
|
|
<!ATTLIST xs:union id ID #IMPLIED>
|
|
]>
|
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
targetNamespace="http://www.w3.org/2001/XMLSchema"
|
|
version="Id: datatypes.xsd,v 1.52 2001/04/27 11:49:21 ht Exp "
|
|
xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty"
|
|
elementFormDefault="qualified"
|
|
blockDefault="#all"
|
|
xml:lang="en">
|
|
|
|
<xs:annotation>
|
|
<xs:documentation source="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes">
|
|
The schema corresponding to this document is normative,
|
|
with respect to the syntactic constraints it expresses in the
|
|
XML Schema language. The documentation (within &lt;documentation>
|
|
elements) below, is not normative, but rather highlights important
|
|
aspects of the W3C Recommendation of which this is a part
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
|
|
<xs:annotation>
|
|
<xs:documentation>
|
|
First the built-in primitive datatypes. These definitions are for
|
|
information only, the real built-in definitions are magic. Note in
|
|
particular that there is no type named 'anySimpleType'. The
|
|
primitives should really be derived from no type at all, and
|
|
anySimpleType should be derived as a union of all the primitives.
|
|
</xs:documentation>
|
|
|
|
<xs:documentation>
|
|
For each built-in datatype in this schema (both primitive and
|
|
derived) can be uniquely addressed via a URI constructed
|
|
as follows:
|
|
1) the base URI is the URI of the XML Schema namespace
|
|
2) the fragment identifier is the name of the datatype
|
|
|
|
For example, to address the int datatype, the URI is:
|
|
|
|
http://www.w3.org/2001/XMLSchema#int
|
|
|
|
Additionally, each facet definition element can be uniquely
|
|
addressed via a URI constructed as follows:
|
|
1) the base URI is the URI of the XML Schema namespace
|
|
2) the fragment identifier is the name of the facet
|
|
|
|
For example, to address the maxInclusive facet, the URI is:
|
|
|
|
http://www.w3.org/2001/XMLSchema#maxInclusive
|
|
|
|
Additionally, each facet usage in a built-in datatype definition
|
|
can be uniquely addressed via a URI constructed as follows:
|
|
1) the base URI is the URI of the XML Schema namespace
|
|
2) the fragment identifier is the name of the datatype, followed
|
|
by a period (".") followed by the name of the facet
|
|
|
|
For example, to address the usage of the maxInclusive facet in
|
|
the definition of int, the URI is:
|
|
|
|
http://www.w3.org/2001/XMLSchema#int.maxInclusive
|
|
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
|
|
<xs:simpleType name="string" id="string">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasFacet name="length"/>
|
|
<hfp:hasFacet name="minLength"/>
|
|
<hfp:hasFacet name="maxLength"/>
|
|
<hfp:hasFacet name="pattern"/>
|
|
<hfp:hasFacet name="enumeration"/>
|
|
<hfp:hasFacet name="whiteSpace"/>
|
|
<hfp:hasProperty name="ordered" value="false"/>
|
|
<hfp:hasProperty name="bounded" value="false"/>
|
|
<hfp:hasProperty name="cardinality" value="countably infinite"/>
|
|
<hfp:hasProperty name="numeric" value="false"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#string"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:anySimpleType">
|
|
<xs:whiteSpace value="preserve" id="string.preserve"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="boolean" id="boolean">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasFacet name="pattern"/>
|
|
<hfp:hasFacet name="whiteSpace"/>
|
|
<hfp:hasProperty name="ordered" value="false"/>
|
|
<hfp:hasProperty name="bounded" value="false"/>
|
|
<hfp:hasProperty name="cardinality" value="finite"/>
|
|
<hfp:hasProperty name="numeric" value="false"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#boolean"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:anySimpleType">
|
|
<xs:whiteSpace value="collapse" fixed="true"
|
|
id="boolean.whiteSpace"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="float" id="float">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasFacet name="pattern"/>
|
|
<hfp:hasFacet name="enumeration"/>
|
|
<hfp:hasFacet name="whiteSpace"/>
|
|
<hfp:hasFacet name="maxInclusive"/>
|
|
<hfp:hasFacet name="maxExclusive"/>
|
|
<hfp:hasFacet name="minInclusive"/>
|
|
<hfp:hasFacet name="minExclusive"/>
|
|
<hfp:hasProperty name="ordered" value="total"/>
|
|
<hfp:hasProperty name="bounded" value="true"/>
|
|
<hfp:hasProperty name="cardinality" value="finite"/>
|
|
<hfp:hasProperty name="numeric" value="true"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#float"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:anySimpleType">
|
|
<xs:whiteSpace value="collapse" fixed="true"
|
|
id="float.whiteSpace"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="double" id="double">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasFacet name="pattern"/>
|
|
<hfp:hasFacet name="enumeration"/>
|
|
<hfp:hasFacet name="whiteSpace"/>
|
|
<hfp:hasFacet name="maxInclusive"/>
|
|
<hfp:hasFacet name="maxExclusive"/>
|
|
<hfp:hasFacet name="minInclusive"/>
|
|
<hfp:hasFacet name="minExclusive"/>
|
|
<hfp:hasProperty name="ordered" value="total"/>
|
|
<hfp:hasProperty name="bounded" value="true"/>
|
|
<hfp:hasProperty name="cardinality" value="finite"/>
|
|
<hfp:hasProperty name="numeric" value="true"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#double"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:anySimpleType">
|
|
<xs:whiteSpace value="collapse" fixed="true"
|
|
id="double.whiteSpace"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="decimal" id="decimal">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasFacet name="totalDigits"/>
|
|
<hfp:hasFacet name="fractionDigits"/>
|
|
<hfp:hasFacet name="pattern"/>
|
|
<hfp:hasFacet name="whiteSpace"/>
|
|
<hfp:hasFacet name="enumeration"/>
|
|
<hfp:hasFacet name="maxInclusive"/>
|
|
<hfp:hasFacet name="maxExclusive"/>
|
|
<hfp:hasFacet name="minInclusive"/>
|
|
<hfp:hasFacet name="minExclusive"/>
|
|
<hfp:hasProperty name="ordered" value="total"/>
|
|
<hfp:hasProperty name="bounded" value="false"/>
|
|
<hfp:hasProperty name="cardinality"
|
|
value="countably infinite"/>
|
|
<hfp:hasProperty name="numeric" value="true"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#decimal"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:anySimpleType">
|
|
<xs:whiteSpace value="collapse" fixed="true"
|
|
id="decimal.whiteSpace"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="duration" id="duration">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasFacet name="pattern"/>
|
|
<hfp:hasFacet name="enumeration"/>
|
|
<hfp:hasFacet name="whiteSpace"/>
|
|
<hfp:hasFacet name="maxInclusive"/>
|
|
<hfp:hasFacet name="maxExclusive"/>
|
|
<hfp:hasFacet name="minInclusive"/>
|
|
<hfp:hasFacet name="minExclusive"/>
|
|
<hfp:hasProperty name="ordered" value="partial"/>
|
|
<hfp:hasProperty name="bounded" value="false"/>
|
|
<hfp:hasProperty name="cardinality"
|
|
value="countably infinite"/>
|
|
<hfp:hasProperty name="numeric" value="false"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#duration"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:anySimpleType">
|
|
<xs:whiteSpace value="collapse" fixed="true"
|
|
id="duration.whiteSpace"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="dateTime" id="dateTime">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasFacet name="pattern"/>
|
|
<hfp:hasFacet name="enumeration"/>
|
|
<hfp:hasFacet name="whiteSpace"/>
|
|
<hfp:hasFacet name="maxInclusive"/>
|
|
<hfp:hasFacet name="maxExclusive"/>
|
|
<hfp:hasFacet name="minInclusive"/>
|
|
<hfp:hasFacet name="minExclusive"/>
|
|
<hfp:hasProperty name="ordered" value="partial"/>
|
|
<hfp:hasProperty name="bounded" value="false"/>
|
|
<hfp:hasProperty name="cardinality"
|
|
value="countably infinite"/>
|
|
<hfp:hasProperty name="numeric" value="false"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#dateTime"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:anySimpleType">
|
|
<xs:whiteSpace value="collapse" fixed="true"
|
|
id="dateTime.whiteSpace"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="time" id="time">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasFacet name="pattern"/>
|
|
<hfp:hasFacet name="enumeration"/>
|
|
<hfp:hasFacet name="whiteSpace"/>
|
|
<hfp:hasFacet name="maxInclusive"/>
|
|
<hfp:hasFacet name="maxExclusive"/>
|
|
<hfp:hasFacet name="minInclusive"/>
|
|
<hfp:hasFacet name="minExclusive"/>
|
|
<hfp:hasProperty name="ordered" value="partial"/>
|
|
<hfp:hasProperty name="bounded" value="false"/>
|
|
<hfp:hasProperty name="cardinality"
|
|
value="countably infinite"/>
|
|
<hfp:hasProperty name="numeric" value="false"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#time"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:anySimpleType">
|
|
<xs:whiteSpace value="collapse" fixed="true"
|
|
id="time.whiteSpace"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="date" id="date">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasFacet name="pattern"/>
|
|
<hfp:hasFacet name="enumeration"/>
|
|
<hfp:hasFacet name="whiteSpace"/>
|
|
<hfp:hasFacet name="maxInclusive"/>
|
|
<hfp:hasFacet name="maxExclusive"/>
|
|
<hfp:hasFacet name="minInclusive"/>
|
|
<hfp:hasFacet name="minExclusive"/>
|
|
<hfp:hasProperty name="ordered" value="partial"/>
|
|
<hfp:hasProperty name="bounded" value="false"/>
|
|
<hfp:hasProperty name="cardinality"
|
|
value="countably infinite"/>
|
|
<hfp:hasProperty name="numeric" value="false"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#date"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:anySimpleType">
|
|
<xs:whiteSpace value="collapse" fixed="true"
|
|
id="date.whiteSpace"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="gYearMonth" id="gYearMonth">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasFacet name="pattern"/>
|
|
<hfp:hasFacet name="enumeration"/>
|
|
<hfp:hasFacet name="whiteSpace"/>
|
|
<hfp:hasFacet name="maxInclusive"/>
|
|
<hfp:hasFacet name="maxExclusive"/>
|
|
<hfp:hasFacet name="minInclusive"/>
|
|
<hfp:hasFacet name="minExclusive"/>
|
|
<hfp:hasProperty name="ordered" value="partial"/>
|
|
<hfp:hasProperty name="bounded" value="false"/>
|
|
<hfp:hasProperty name="cardinality"
|
|
value="countably infinite"/>
|
|
<hfp:hasProperty name="numeric" value="false"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#gYearMonth"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:anySimpleType">
|
|
<xs:whiteSpace value="collapse" fixed="true"
|
|
id="gYearMonth.whiteSpace"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="gYear" id="gYear">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasFacet name="pattern"/>
|
|
<hfp:hasFacet name="enumeration"/>
|
|
<hfp:hasFacet name="whiteSpace"/>
|
|
<hfp:hasFacet name="maxInclusive"/>
|
|
<hfp:hasFacet name="maxExclusive"/>
|
|
<hfp:hasFacet name="minInclusive"/>
|
|
<hfp:hasFacet name="minExclusive"/>
|
|
<hfp:hasProperty name="ordered" value="partial"/>
|
|
<hfp:hasProperty name="bounded" value="false"/>
|
|
<hfp:hasProperty name="cardinality"
|
|
value="countably infinite"/>
|
|
<hfp:hasProperty name="numeric" value="false"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#gYear"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:anySimpleType">
|
|
<xs:whiteSpace value="collapse" fixed="true"
|
|
id="gYear.whiteSpace"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="gMonthDay" id="gMonthDay">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasFacet name="pattern"/>
|
|
<hfp:hasFacet name="enumeration"/>
|
|
<hfp:hasFacet name="whiteSpace"/>
|
|
<hfp:hasFacet name="maxInclusive"/>
|
|
<hfp:hasFacet name="maxExclusive"/>
|
|
<hfp:hasFacet name="minInclusive"/>
|
|
<hfp:hasFacet name="minExclusive"/>
|
|
<hfp:hasProperty name="ordered" value="partial"/>
|
|
<hfp:hasProperty name="bounded" value="false"/>
|
|
<hfp:hasProperty name="cardinality"
|
|
value="countably infinite"/>
|
|
<hfp:hasProperty name="numeric" value="false"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#gMonthDay"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:anySimpleType">
|
|
<xs:whiteSpace value="collapse" fixed="true"
|
|
id="gMonthDay.whiteSpace"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="gDay" id="gDay">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasFacet name="pattern"/>
|
|
<hfp:hasFacet name="enumeration"/>
|
|
<hfp:hasFacet name="whiteSpace"/>
|
|
<hfp:hasFacet name="maxInclusive"/>
|
|
<hfp:hasFacet name="maxExclusive"/>
|
|
<hfp:hasFacet name="minInclusive"/>
|
|
<hfp:hasFacet name="minExclusive"/>
|
|
<hfp:hasProperty name="ordered" value="partial"/>
|
|
<hfp:hasProperty name="bounded" value="false"/>
|
|
<hfp:hasProperty name="cardinality"
|
|
value="countably infinite"/>
|
|
<hfp:hasProperty name="numeric" value="false"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#gDay"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:anySimpleType">
|
|
<xs:whiteSpace value="collapse" fixed="true"
|
|
id="gDay.whiteSpace"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="gMonth" id="gMonth">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasFacet name="pattern"/>
|
|
<hfp:hasFacet name="enumeration"/>
|
|
<hfp:hasFacet name="whiteSpace"/>
|
|
<hfp:hasFacet name="maxInclusive"/>
|
|
<hfp:hasFacet name="maxExclusive"/>
|
|
<hfp:hasFacet name="minInclusive"/>
|
|
<hfp:hasFacet name="minExclusive"/>
|
|
<hfp:hasProperty name="ordered" value="partial"/>
|
|
<hfp:hasProperty name="bounded" value="false"/>
|
|
<hfp:hasProperty name="cardinality"
|
|
value="countably infinite"/>
|
|
<hfp:hasProperty name="numeric" value="false"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#gMonth"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:anySimpleType">
|
|
<xs:whiteSpace value="collapse" fixed="true"
|
|
id="gMonth.whiteSpace"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="hexBinary" id="hexBinary">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasFacet name="length"/>
|
|
<hfp:hasFacet name="minLength"/>
|
|
<hfp:hasFacet name="maxLength"/>
|
|
<hfp:hasFacet name="pattern"/>
|
|
<hfp:hasFacet name="enumeration"/>
|
|
<hfp:hasFacet name="whiteSpace"/>
|
|
<hfp:hasProperty name="ordered" value="false"/>
|
|
<hfp:hasProperty name="bounded" value="false"/>
|
|
<hfp:hasProperty name="cardinality"
|
|
value="countably infinite"/>
|
|
<hfp:hasProperty name="numeric" value="false"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#binary"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:anySimpleType">
|
|
<xs:whiteSpace value="collapse" fixed="true"
|
|
id="hexBinary.whiteSpace"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="base64Binary" id="base64Binary">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasFacet name="length"/>
|
|
<hfp:hasFacet name="minLength"/>
|
|
<hfp:hasFacet name="maxLength"/>
|
|
<hfp:hasFacet name="pattern"/>
|
|
<hfp:hasFacet name="enumeration"/>
|
|
<hfp:hasFacet name="whiteSpace"/>
|
|
<hfp:hasProperty name="ordered" value="false"/>
|
|
<hfp:hasProperty name="bounded" value="false"/>
|
|
<hfp:hasProperty name="cardinality"
|
|
value="countably infinite"/>
|
|
<hfp:hasProperty name="numeric" value="false"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#base64Binary"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:anySimpleType">
|
|
<xs:whiteSpace value="collapse" fixed="true"
|
|
id="base64Binary.whiteSpace"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="anyURI" id="anyURI">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasFacet name="length"/>
|
|
<hfp:hasFacet name="minLength"/>
|
|
<hfp:hasFacet name="maxLength"/>
|
|
<hfp:hasFacet name="pattern"/>
|
|
<hfp:hasFacet name="enumeration"/>
|
|
<hfp:hasFacet name="whiteSpace"/>
|
|
<hfp:hasProperty name="ordered" value="false"/>
|
|
<hfp:hasProperty name="bounded" value="false"/>
|
|
<hfp:hasProperty name="cardinality"
|
|
value="countably infinite"/>
|
|
<hfp:hasProperty name="numeric" value="false"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#anyURI"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:anySimpleType">
|
|
<xs:whiteSpace value="collapse" fixed="true"
|
|
id="anyURI.whiteSpace"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="QName" id="QName">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasFacet name="length"/>
|
|
<hfp:hasFacet name="minLength"/>
|
|
<hfp:hasFacet name="maxLength"/>
|
|
<hfp:hasFacet name="pattern"/>
|
|
<hfp:hasFacet name="enumeration"/>
|
|
<hfp:hasFacet name="whiteSpace"/>
|
|
<hfp:hasProperty name="ordered" value="false"/>
|
|
<hfp:hasProperty name="bounded" value="false"/>
|
|
<hfp:hasProperty name="cardinality"
|
|
value="countably infinite"/>
|
|
<hfp:hasProperty name="numeric" value="false"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#QName"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:anySimpleType">
|
|
<xs:whiteSpace value="collapse" fixed="true"
|
|
id="QName.whiteSpace"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="NOTATION" id="NOTATION">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasFacet name="length"/>
|
|
<hfp:hasFacet name="minLength"/>
|
|
<hfp:hasFacet name="maxLength"/>
|
|
<hfp:hasFacet name="pattern"/>
|
|
<hfp:hasFacet name="enumeration"/>
|
|
<hfp:hasFacet name="whiteSpace"/>
|
|
<hfp:hasProperty name="ordered" value="false"/>
|
|
<hfp:hasProperty name="bounded" value="false"/>
|
|
<hfp:hasProperty name="cardinality"
|
|
value="countably infinite"/>
|
|
<hfp:hasProperty name="numeric" value="false"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#NOTATION"/>
|
|
<xs:documentation>
|
|
NOTATION cannot be used directly in a schema; rather a type
|
|
must be derived from it by specifying at least one enumeration
|
|
facet whose value is the name of a NOTATION declared in the
|
|
schema.
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:anySimpleType">
|
|
<xs:whiteSpace value="collapse" fixed="true"
|
|
id="NOTATION.whiteSpace"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:annotation>
|
|
<xs:documentation>
|
|
Now the derived primitive types
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
|
|
<xs:simpleType name="normalizedString" id="normalizedString">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#normalizedString"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:string">
|
|
<xs:whiteSpace value="replace"
|
|
id="normalizedString.whiteSpace"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="token" id="token">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#token"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:normalizedString">
|
|
<xs:whiteSpace value="collapse" id="token.whiteSpace"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="language" id="language">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#language"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:token">
|
|
<xs:pattern
|
|
value="([a-zA-Z]{2}|[iI]-[a-zA-Z]+|[xX]-[a-zA-Z]{1,8})(-[a-zA-Z]{1,8})*"
|
|
id="language.pattern">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/REC-xml#NT-LanguageID">
|
|
pattern specifies the content of section 2.12 of XML 1.0e2
|
|
and RFC 1766
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:pattern>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="IDREFS" id="IDREFS">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasFacet name="length"/>
|
|
<hfp:hasFacet name="minLength"/>
|
|
<hfp:hasFacet name="maxLength"/>
|
|
<hfp:hasFacet name="enumeration"/>
|
|
<hfp:hasFacet name="whiteSpace"/>
|
|
<hfp:hasProperty name="ordered" value="false"/>
|
|
<hfp:hasProperty name="bounded" value="false"/>
|
|
<hfp:hasProperty name="cardinality"
|
|
value="countably infinite"/>
|
|
<hfp:hasProperty name="numeric" value="false"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#IDREFS"/>
|
|
</xs:annotation>
|
|
<xs:restriction>
|
|
<xs:simpleType>
|
|
<xs:list itemType="xs:IDREF"/>
|
|
</xs:simpleType>
|
|
<xs:minLength value="1" id="IDREFS.minLength"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="ENTITIES" id="ENTITIES">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasFacet name="length"/>
|
|
<hfp:hasFacet name="minLength"/>
|
|
<hfp:hasFacet name="maxLength"/>
|
|
<hfp:hasFacet name="enumeration"/>
|
|
<hfp:hasFacet name="whiteSpace"/>
|
|
<hfp:hasProperty name="ordered" value="false"/>
|
|
<hfp:hasProperty name="bounded" value="false"/>
|
|
<hfp:hasProperty name="cardinality"
|
|
value="countably infinite"/>
|
|
<hfp:hasProperty name="numeric" value="false"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#ENTITIES"/>
|
|
</xs:annotation>
|
|
<xs:restriction>
|
|
<xs:simpleType>
|
|
<xs:list itemType="xs:ENTITY"/>
|
|
</xs:simpleType>
|
|
<xs:minLength value="1" id="ENTITIES.minLength"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="NMTOKEN" id="NMTOKEN">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#NMTOKEN"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:token">
|
|
<xs:pattern value="\c+" id="NMTOKEN.pattern">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/REC-xml#NT-Nmtoken">
|
|
pattern matches production 7 from the XML spec
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:pattern>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="NMTOKENS" id="NMTOKENS">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasFacet name="length"/>
|
|
<hfp:hasFacet name="minLength"/>
|
|
<hfp:hasFacet name="maxLength"/>
|
|
<hfp:hasFacet name="enumeration"/>
|
|
<hfp:hasFacet name="whiteSpace"/>
|
|
<hfp:hasProperty name="ordered" value="false"/>
|
|
<hfp:hasProperty name="bounded" value="false"/>
|
|
<hfp:hasProperty name="cardinality"
|
|
value="countably infinite"/>
|
|
<hfp:hasProperty name="numeric" value="false"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#NMTOKENS"/>
|
|
</xs:annotation>
|
|
<xs:restriction>
|
|
<xs:simpleType>
|
|
<xs:list itemType="xs:NMTOKEN"/>
|
|
</xs:simpleType>
|
|
<xs:minLength value="1" id="NMTOKENS.minLength"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="Name" id="Name">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#Name"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:token">
|
|
<xs:pattern value="\i\c*" id="Name.pattern">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/REC-xml#NT-Name">
|
|
pattern matches production 5 from the XML spec
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:pattern>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="NCName" id="NCName">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#NCName"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:Name">
|
|
<xs:pattern value="[\i-[:]][\c-[:]]*" id="NCName.pattern">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/REC-xml-names/#NT-NCName">
|
|
pattern matches production 4 from the Namespaces in XML spec
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:pattern>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="ID" id="ID">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#ID"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:NCName"/>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="IDREF" id="IDREF">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#IDREF"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:NCName"/>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="ENTITY" id="ENTITY">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#ENTITY"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:NCName"/>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="integer" id="integer">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#integer"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:decimal">
|
|
<xs:fractionDigits value="0" fixed="true" id="integer.fractionDigits"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="nonPositiveInteger" id="nonPositiveInteger">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#nonPositiveInteger"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:integer">
|
|
<xs:maxInclusive value="0" id="nonPositiveInteger.maxInclusive"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="negativeInteger" id="negativeInteger">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#negativeInteger"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:nonPositiveInteger">
|
|
<xs:maxInclusive value="-1" id="negativeInteger.maxInclusive"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="long" id="long">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasProperty name="bounded" value="true"/>
|
|
<hfp:hasProperty name="cardinality" value="finite"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#long"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:integer">
|
|
<xs:minInclusive value="-9223372036854775808" id="long.minInclusive"/>
|
|
<xs:maxInclusive value="9223372036854775807" id="long.maxInclusive"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="int" id="int">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#int"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:long">
|
|
<xs:minInclusive value="-2147483648" id="int.minInclusive"/>
|
|
<xs:maxInclusive value="2147483647" id="int.maxInclusive"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="short" id="short">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#short"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:int">
|
|
<xs:minInclusive value="-32768" id="short.minInclusive"/>
|
|
<xs:maxInclusive value="32767" id="short.maxInclusive"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="byte" id="byte">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#byte"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:short">
|
|
<xs:minInclusive value="-128" id="byte.minInclusive"/>
|
|
<xs:maxInclusive value="127" id="byte.maxInclusive"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="nonNegativeInteger" id="nonNegativeInteger">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:integer">
|
|
<xs:minInclusive value="0" id="nonNegativeInteger.minInclusive"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="unsignedLong" id="unsignedLong">
|
|
<xs:annotation>
|
|
<xs:appinfo>
|
|
<hfp:hasProperty name="bounded" value="true"/>
|
|
<hfp:hasProperty name="cardinality" value="finite"/>
|
|
</xs:appinfo>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#unsignedLong"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:nonNegativeInteger">
|
|
<xs:maxInclusive value="18446744073709551615"
|
|
id="unsignedLong.maxInclusive"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="unsignedInt" id="unsignedInt">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#unsignedInt"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:unsignedLong">
|
|
<xs:maxInclusive value="4294967295"
|
|
id="unsignedInt.maxInclusive"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="unsignedShort" id="unsignedShort">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#unsignedShort"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:unsignedInt">
|
|
<xs:maxInclusive value="65535"
|
|
id="unsignedShort.maxInclusive"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="unsignedByte" id="unsignedBtype">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#unsignedByte"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:unsignedShort">
|
|
<xs:maxInclusive value="255" id="unsignedByte.maxInclusive"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="positiveInteger" id="positiveInteger">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#positiveInteger"/>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:nonNegativeInteger">
|
|
<xs:minInclusive value="1" id="positiveInteger.minInclusive"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="derivationControl">
|
|
<xs:annotation>
|
|
<xs:documentation>
|
|
A utility type, not for public use</xs:documentation>
|
|
</xs:annotation>
|
|
<xs:restriction base="xs:NMTOKEN">
|
|
<xs:enumeration value="substitution"/>
|
|
<xs:enumeration value="extension"/>
|
|
<xs:enumeration value="restriction"/>
|
|
<xs:enumeration value="list"/>
|
|
<xs:enumeration value="union"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:group name="simpleDerivation">
|
|
<xs:choice>
|
|
<xs:element ref="xs:restriction"/>
|
|
<xs:element ref="xs:list"/>
|
|
<xs:element ref="xs:union"/>
|
|
</xs:choice>
|
|
</xs:group>
|
|
|
|
<xs:simpleType name="simpleDerivationSet">
|
|
<xs:annotation>
|
|
<xs:documentation>
|
|
#all or (possibly empty) subset of {restriction, union, list}
|
|
</xs:documentation>
|
|
<xs:documentation>
|
|
A utility type, not for public use</xs:documentation>
|
|
</xs:annotation>
|
|
<xs:union>
|
|
<xs:simpleType>
|
|
<xs:restriction base="xs:token">
|
|
<xs:enumeration value="#all"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
<xs:simpleType>
|
|
<xs:restriction base="xs:derivationControl">
|
|
<xs:enumeration value="list"/>
|
|
<xs:enumeration value="union"/>
|
|
<xs:enumeration value="restriction"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
</xs:union>
|
|
</xs:simpleType>
|
|
|
|
<xs:complexType name="simpleType" abstract="true">
|
|
<xs:complexContent>
|
|
<xs:extension base="xs:annotated">
|
|
<xs:group ref="xs:simpleDerivation"/>
|
|
<xs:attribute name="final" type="xs:simpleDerivationSet"/>
|
|
<xs:attribute name="name" type="xs:NCName">
|
|
<xs:annotation>
|
|
<xs:documentation>
|
|
Can be restricted to required or forbidden
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:attribute>
|
|
</xs:extension>
|
|
</xs:complexContent>
|
|
</xs:complexType>
|
|
|
|
<xs:complexType name="topLevelSimpleType">
|
|
<xs:complexContent>
|
|
<xs:restriction base="xs:simpleType">
|
|
<xs:sequence>
|
|
<xs:element ref="xs:annotation" minOccurs="0"/>
|
|
<xs:group ref="xs:simpleDerivation"/>
|
|
</xs:sequence>
|
|
<xs:attribute name="name" use="required"
|
|
type="xs:NCName">
|
|
<xs:annotation>
|
|
<xs:documentation>
|
|
Required at the top level
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:attribute>
|
|
</xs:restriction>
|
|
</xs:complexContent>
|
|
</xs:complexType>
|
|
|
|
<xs:complexType name="localSimpleType">
|
|
<xs:complexContent>
|
|
<xs:restriction base="xs:simpleType">
|
|
<xs:sequence>
|
|
<xs:element ref="xs:annotation" minOccurs="0"/>
|
|
<xs:group ref="xs:simpleDerivation"/>
|
|
</xs:sequence>
|
|
<xs:attribute name="name" use="prohibited">
|
|
<xs:annotation>
|
|
<xs:documentation>
|
|
Forbidden when nested
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:attribute>
|
|
<xs:attribute name="final" use="prohibited"/>
|
|
</xs:restriction>
|
|
</xs:complexContent>
|
|
</xs:complexType>
|
|
|
|
<xs:element name="simpleType" type="xs:topLevelSimpleType" id="simpleType">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-simpleType"/>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
|
|
<xs:group name="facets">
|
|
<xs:annotation>
|
|
<xs:documentation>
|
|
We should use a substitution group for facets, but
|
|
that's ruled out because it would allow users to
|
|
add their own, which we're not ready for yet.
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
<xs:choice>
|
|
<xs:element ref="xs:minExclusive"/>
|
|
<xs:element ref="xs:minInclusive"/>
|
|
<xs:element ref="xs:maxExclusive"/>
|
|
<xs:element ref="xs:maxInclusive"/>
|
|
<xs:element ref="xs:totalDigits"/>
|
|
<xs:element ref="xs:fractionDigits"/>
|
|
<xs:element ref="xs:length"/>
|
|
<xs:element ref="xs:minLength"/>
|
|
<xs:element ref="xs:maxLength"/>
|
|
<xs:element ref="xs:enumeration"/>
|
|
<xs:element ref="xs:whiteSpace"/>
|
|
<xs:element ref="xs:pattern"/>
|
|
</xs:choice>
|
|
</xs:group>
|
|
|
|
<xs:group name="simpleRestrictionModel">
|
|
<xs:sequence>
|
|
<xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/>
|
|
<xs:group ref="xs:facets" minOccurs="0" maxOccurs="unbounded"/>
|
|
</xs:sequence>
|
|
</xs:group>
|
|
|
|
<xs:element name="restriction" id="restriction">
|
|
<xs:complexType>
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-restriction">
|
|
base attribute and simpleType child are mutually
|
|
exclusive, but one or other is required
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
<xs:complexContent>
|
|
<xs:extension base="xs:annotated">
|
|
<xs:group ref="xs:simpleRestrictionModel"/>
|
|
<xs:attribute name="base" type="xs:QName" use="optional"/>
|
|
</xs:extension>
|
|
</xs:complexContent>
|
|
</xs:complexType>
|
|
</xs:element>
|
|
|
|
<xs:element name="list" id="list">
|
|
<xs:complexType>
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-list">
|
|
itemType attribute and simpleType child are mutually
|
|
exclusive, but one or other is required
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
<xs:complexContent>
|
|
<xs:extension base="xs:annotated">
|
|
<xs:sequence>
|
|
<xs:element name="simpleType" type="xs:localSimpleType"
|
|
minOccurs="0"/>
|
|
</xs:sequence>
|
|
<xs:attribute name="itemType" type="xs:QName" use="optional"/>
|
|
</xs:extension>
|
|
</xs:complexContent>
|
|
</xs:complexType>
|
|
</xs:element>
|
|
|
|
<xs:element name="union" id="union">
|
|
<xs:complexType>
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-union">
|
|
memberTypes attribute must be non-empty or there must be
|
|
at least one simpleType child
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
<xs:complexContent>
|
|
<xs:extension base="xs:annotated">
|
|
<xs:sequence>
|
|
<xs:element name="simpleType" type="xs:localSimpleType"
|
|
minOccurs="0" maxOccurs="unbounded"/>
|
|
</xs:sequence>
|
|
<xs:attribute name="memberTypes" use="optional">
|
|
<xs:simpleType>
|
|
<xs:list itemType="xs:QName"/>
|
|
</xs:simpleType>
|
|
</xs:attribute>
|
|
</xs:extension>
|
|
</xs:complexContent>
|
|
</xs:complexType>
|
|
</xs:element>
|
|
|
|
<xs:complexType name="facet">
|
|
<xs:complexContent>
|
|
<xs:extension base="xs:annotated">
|
|
<xs:attribute name="value" use="required"/>
|
|
<xs:attribute name="fixed" type="xs:boolean" use="optional"
|
|
default="false"/>
|
|
</xs:extension>
|
|
</xs:complexContent>
|
|
</xs:complexType>
|
|
|
|
<xs:complexType name="noFixedFacet">
|
|
<xs:complexContent>
|
|
<xs:restriction base="xs:facet">
|
|
<xs:sequence>
|
|
<xs:element ref="xs:annotation" minOccurs="0"/>
|
|
</xs:sequence>
|
|
<xs:attribute name="fixed" use="prohibited"/>
|
|
</xs:restriction>
|
|
</xs:complexContent>
|
|
</xs:complexType>
|
|
|
|
<xs:element name="minExclusive" id="minExclusive" type="xs:facet">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-minExclusive"/>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
<xs:element name="minInclusive" id="minInclusive" type="xs:facet">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-minInclusive"/>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
|
|
<xs:element name="maxExclusive" id="maxExclusive" type="xs:facet">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-maxExclusive"/>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
<xs:element name="maxInclusive" id="maxInclusive" type="xs:facet">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-maxInclusive"/>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
|
|
<xs:complexType name="numFacet">
|
|
<xs:complexContent>
|
|
<xs:restriction base="xs:facet">
|
|
<xs:sequence>
|
|
<xs:element ref="xs:annotation" minOccurs="0"/>
|
|
</xs:sequence>
|
|
<xs:attribute name="value" type="xs:nonNegativeInteger" use="required"/>
|
|
</xs:restriction>
|
|
</xs:complexContent>
|
|
</xs:complexType>
|
|
|
|
<xs:element name="totalDigits" id="totalDigits">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-totalDigits"/>
|
|
</xs:annotation>
|
|
<xs:complexType>
|
|
<xs:complexContent>
|
|
<xs:restriction base="xs:numFacet">
|
|
<xs:sequence>
|
|
<xs:element ref="xs:annotation" minOccurs="0"/>
|
|
</xs:sequence>
|
|
<xs:attribute name="value" type="xs:positiveInteger" use="required"/>
|
|
</xs:restriction>
|
|
</xs:complexContent>
|
|
</xs:complexType>
|
|
</xs:element>
|
|
<xs:element name="fractionDigits" id="fractionDigits" type="xs:numFacet">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-fractionDigits"/>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
|
|
<xs:element name="length" id="length" type="xs:numFacet">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-length"/>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
<xs:element name="minLength" id="minLength" type="xs:numFacet">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-minLength"/>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
<xs:element name="maxLength" id="maxLength" type="xs:numFacet">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-maxLength"/>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
|
|
<xs:element name="enumeration" id="enumeration" type="xs:noFixedFacet">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-enumeration"/>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
|
|
<xs:element name="whiteSpace" id="whiteSpace">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-whiteSpace"/>
|
|
</xs:annotation>
|
|
<xs:complexType>
|
|
<xs:complexContent>
|
|
<xs:restriction base="xs:facet">
|
|
<xs:sequence>
|
|
<xs:element ref="xs:annotation" minOccurs="0"/>
|
|
</xs:sequence>
|
|
<xs:attribute name="value" use="required">
|
|
<xs:simpleType>
|
|
<xs:restriction base="xs:NMTOKEN">
|
|
<xs:enumeration value="preserve"/>
|
|
<xs:enumeration value="replace"/>
|
|
<xs:enumeration value="collapse"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
</xs:attribute>
|
|
</xs:restriction>
|
|
</xs:complexContent>
|
|
</xs:complexType>
|
|
</xs:element>
|
|
|
|
<xs:element name="pattern" id="pattern" type="xs:noFixedFacet">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-pattern"/>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
|
|
</xs:schema>
|
|
</pre>
|
|
</div>
|
|
<div class="div1">
|
|
<h2>
|
|
<a name="dtd-for-datatypeDefs"></a>B DTD for Datatype Definitions (non-normative)</h2>
|
|
<pre><!--
|
|
DTD for XML Schemas: Part 2: Datatypes
|
|
Id: datatypes.dtd,v 1.23 2001/03/16 17:36:30 ht Exp
|
|
Note this DTD is NOT normative, or even definitive.
|
|
-->
|
|
|
|
<!--
|
|
This DTD cannot be used on its own, it is intended
|
|
only for incorporation in XMLSchema.dtd, q.v.
|
|
-->
|
|
|
|
<!-- Define all the element names, with optional prefix -->
|
|
<!ENTITY % simpleType "%p;simpleType">
|
|
<!ENTITY % restriction "%p;restriction">
|
|
<!ENTITY % list "%p;list">
|
|
<!ENTITY % union "%p;union">
|
|
<!ENTITY % maxExclusive "%p;maxExclusive">
|
|
<!ENTITY % minExclusive "%p;minExclusive">
|
|
<!ENTITY % maxInclusive "%p;maxInclusive">
|
|
<!ENTITY % minInclusive "%p;minInclusive">
|
|
<!ENTITY % totalDigits "%p;totalDigits">
|
|
<!ENTITY % fractionDigits "%p;fractionDigits">
|
|
<!ENTITY % length "%p;length">
|
|
<!ENTITY % minLength "%p;minLength">
|
|
<!ENTITY % maxLength "%p;maxLength">
|
|
<!ENTITY % enumeration "%p;enumeration">
|
|
<!ENTITY % whiteSpace "%p;whiteSpace">
|
|
<!ENTITY % pattern "%p;pattern">
|
|
|
|
<!--
|
|
Customisation entities for the ATTLIST of each element
|
|
type. Define one of these if your schema takes advantage
|
|
of the anyAttribute='##other' in the schema for schemas
|
|
-->
|
|
|
|
<!ENTITY % simpleTypeAttrs "">
|
|
<!ENTITY % restrictionAttrs "">
|
|
<!ENTITY % listAttrs "">
|
|
<!ENTITY % unionAttrs "">
|
|
<!ENTITY % maxExclusiveAttrs "">
|
|
<!ENTITY % minExclusiveAttrs "">
|
|
<!ENTITY % maxInclusiveAttrs "">
|
|
<!ENTITY % minInclusiveAttrs "">
|
|
<!ENTITY % totalDigitsAttrs "">
|
|
<!ENTITY % fractionDigitsAttrs "">
|
|
<!ENTITY % lengthAttrs "">
|
|
<!ENTITY % minLengthAttrs "">
|
|
<!ENTITY % maxLengthAttrs "">
|
|
<!ENTITY % enumerationAttrs "">
|
|
<!ENTITY % whiteSpaceAttrs "">
|
|
<!ENTITY % patternAttrs "">
|
|
|
|
<!-- Define some entities for informative use as attribute
|
|
types -->
|
|
<!ENTITY % URIref "CDATA">
|
|
<!ENTITY % XPathExpr "CDATA">
|
|
<!ENTITY % QName "NMTOKEN">
|
|
<!ENTITY % QNames "NMTOKENS">
|
|
<!ENTITY % NCName "NMTOKEN">
|
|
<!ENTITY % nonNegativeInteger "NMTOKEN">
|
|
<!ENTITY % boolean "(true|false)">
|
|
<!ENTITY % simpleDerivationSet "CDATA">
|
|
<!--
|
|
#all or space-separated list drawn from derivationChoice
|
|
-->
|
|
|
|
<!--
|
|
Note that the use of 'facet' below is less restrictive
|
|
than is really intended: There should in fact be no
|
|
more than one of each of minInclusive, minExclusive,
|
|
maxInclusive, maxExclusive, totalDigits, fractionDigits,
|
|
length, maxLength, minLength within datatype,
|
|
and the min- and max- variants of Inclusive and Exclusive
|
|
are mutually exclusive. On the other hand, pattern and
|
|
enumeration may repeat.
|
|
-->
|
|
<!ENTITY % minBound "(%minInclusive; | %minExclusive;)">
|
|
<!ENTITY % maxBound "(%maxInclusive; | %maxExclusive;)">
|
|
<!ENTITY % bounds "%minBound; | %maxBound;">
|
|
<!ENTITY % numeric "%totalDigits; | %fractionDigits;">
|
|
<!ENTITY % ordered "%bounds; | %numeric;">
|
|
<!ENTITY % unordered
|
|
"%pattern; | %enumeration; | %whiteSpace; | %length; |
|
|
%maxLength; | %minLength;">
|
|
<!ENTITY % facet "%ordered; | %unordered;">
|
|
<!ENTITY % facetAttr
|
|
"value CDATA #REQUIRED
|
|
id ID #IMPLIED">
|
|
<!ENTITY % fixedAttr "fixed %boolean; #IMPLIED">
|
|
<!ENTITY % facetModel "(%annotation;)?">
|
|
<!ELEMENT %simpleType;
|
|
((%annotation;)?, (%restriction; | %list; | %union;))>
|
|
<!ATTLIST %simpleType;
|
|
name %NCName; #IMPLIED
|
|
final %simpleDerivationSet; #IMPLIED
|
|
id ID #IMPLIED
|
|
%simpleTypeAttrs;>
|
|
<!-- name is required at top level -->
|
|
<!ELEMENT %restriction; ((%annotation;)?,
|
|
(%restriction1; |
|
|
((%simpleType;)?,(%facet;)*)),
|
|
(%attrDecls;))>
|
|
<!ATTLIST %restriction;
|
|
base %QName; #IMPLIED
|
|
id ID #IMPLIED
|
|
%restrictionAttrs;>
|
|
<!--
|
|
base and simpleType child are mutually exclusive,
|
|
one is required.
|
|
|
|
restriction is shared between simpleType and
|
|
simpleContent and complexContent (in XMLSchema.xsd).
|
|
restriction1 is for the latter cases, when this
|
|
is restricting a complex type, as is attrDecls.
|
|
-->
|
|
<!ELEMENT %list; ((%annotation;)?,(%simpleType;)?)>
|
|
<!ATTLIST %list;
|
|
itemType %QName; #IMPLIED
|
|
id ID #IMPLIED
|
|
%listAttrs;>
|
|
<!--
|
|
itemType and simpleType child are mutually exclusive,
|
|
one is required
|
|
-->
|
|
<!ELEMENT %union; ((%annotation;)?,(%simpleType;)*)>
|
|
<!ATTLIST %union;
|
|
id ID #IMPLIED
|
|
memberTypes %QNames; #IMPLIED
|
|
%unionAttrs;>
|
|
<!--
|
|
At least one item in memberTypes or one simpleType
|
|
child is required
|
|
-->
|
|
|
|
<!ELEMENT %maxExclusive; %facetModel;>
|
|
<!ATTLIST %maxExclusive;
|
|
%facetAttr;
|
|
%fixedAttr;
|
|
%maxExclusiveAttrs;>
|
|
<!ELEMENT %minExclusive; %facetModel;>
|
|
<!ATTLIST %minExclusive;
|
|
%facetAttr;
|
|
%fixedAttr;
|
|
%minExclusiveAttrs;>
|
|
|
|
<!ELEMENT %maxInclusive; %facetModel;>
|
|
<!ATTLIST %maxInclusive;
|
|
%facetAttr;
|
|
%fixedAttr;
|
|
%maxInclusiveAttrs;>
|
|
<!ELEMENT %minInclusive; %facetModel;>
|
|
<!ATTLIST %minInclusive;
|
|
%facetAttr;
|
|
%fixedAttr;
|
|
%minInclusiveAttrs;>
|
|
|
|
<!ELEMENT %totalDigits; %facetModel;>
|
|
<!ATTLIST %totalDigits;
|
|
%facetAttr;
|
|
%fixedAttr;
|
|
%totalDigitsAttrs;>
|
|
<!ELEMENT %fractionDigits; %facetModel;>
|
|
<!ATTLIST %fractionDigits;
|
|
%facetAttr;
|
|
%fixedAttr;
|
|
%fractionDigitsAttrs;>
|
|
|
|
<!ELEMENT %length; %facetModel;>
|
|
<!ATTLIST %length;
|
|
%facetAttr;
|
|
%fixedAttr;
|
|
%lengthAttrs;>
|
|
<!ELEMENT %minLength; %facetModel;>
|
|
<!ATTLIST %minLength;
|
|
%facetAttr;
|
|
%fixedAttr;
|
|
%minLengthAttrs;>
|
|
<!ELEMENT %maxLength; %facetModel;>
|
|
<!ATTLIST %maxLength;
|
|
%facetAttr;
|
|
%fixedAttr;
|
|
%maxLengthAttrs;>
|
|
|
|
<!-- This one can be repeated -->
|
|
<!ELEMENT %enumeration; %facetModel;>
|
|
<!ATTLIST %enumeration;
|
|
%facetAttr;
|
|
%enumerationAttrs;>
|
|
|
|
<!ELEMENT %whiteSpace; %facetModel;>
|
|
<!ATTLIST %whiteSpace;
|
|
%facetAttr;
|
|
%fixedAttr;
|
|
%whiteSpaceAttrs;>
|
|
|
|
<!-- This one can be repeated -->
|
|
<!ELEMENT %pattern; %facetModel;>
|
|
<!ATTLIST %pattern;
|
|
%facetAttr;
|
|
%patternAttrs;>
|
|
</pre>
|
|
</div>
|
|
<div class="div1">
|
|
<h2>
|
|
<a name="section-Datatypes-and-Facets"></a>C Datatypes and Facets</h2>
|
|
<div class="div2">
|
|
<h3>
|
|
<span class="nav"> </span><a name="app-fundamental-facets"></a>C.1 Fundamental Facets</h3>
|
|
<p>
|
|
The following table shows the values of the fundamental facets
|
|
for each <a href="#dt-built-in" class="termref"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> datatype.
|
|
</p>
|
|
<table border="1" bgcolor="#bedce6">
|
|
<tbody>
|
|
<tr>
|
|
<th> </th><th>Datatype</th><th><a href="#dt-ordered">ordered</a></th><th><a href="#dt-bounded">bounded</a></th><th><a href="#dt-cardinality">cardinality</a></th><th><a href="#dt-numeric">numeric</a></th>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="19"><a href="#dt-primitive">primitive</a></td><td><a href="#string">string</a></td><td>false</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#boolean">boolean</a></td><td>false</td><td>false</td><td>finite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#float">float</a></td><td>total</td><td>true</td><td>finite</td><td>true</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#double">double</a></td><td>total</td><td>true</td><td>finite</td><td>true</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#decimal">decimal</a></td><td>total</td><td>false</td><td>countably infinite</td><td>true</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#duration">duration</a></td><td>partial</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#dateTime">dateTime</a></td><td>partial</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#time">time</a></td><td>partial</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#date">date</a></td><td>partial</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#gYearMonth">gYearMonth</a></td><td>partial</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#gYear">gYear</a></td><td>partial</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#gMonthDay">gMonthDay</a></td><td>partial</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#gDay">gDay</a></td><td>partial</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#gMonth">gMonth</a></td><td>partial</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#hexBinary">hexBinary</a></td><td>false</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#base64Binary">base64Binary</a></td><td>false</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#anyURI">anyURI</a></td><td>false</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#QName">QName</a></td><td>false</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#NOTATION">NOTATION</a></td><td>false</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="7"></td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="25"><a href="#dt-derived">derived</a></td><td><a href="#normalizedString">normalizedString</a></td><td>false</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#token">token</a></td><td>false</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#language">language</a></td><td>false</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#IDREFS">IDREFS</a></td><td>false</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#ENTITIES">ENTITIES</a></td><td>false</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#NMTOKEN">NMTOKEN</a></td><td>false</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#NMTOKENS">NMTOKENS</a></td><td>false</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#Name">Name</a></td><td>false</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#NCName">NCName</a></td><td>false</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#ID">ID</a></td><td>false</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#IDREF">IDREF</a></td><td>false</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#ENTITY">ENTITY</a></td><td>false</td><td>false</td><td>countably infinite</td><td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#integer">integer</a></td><td>total</td><td>false</td><td>countably infinite</td><td>true</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#nonPositiveInteger">nonPositiveInteger</a></td><td>total</td><td>false</td><td>countably infinite</td><td>true</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#negativeInteger">negativeInteger</a></td><td>total</td><td>false</td><td>countably infinite</td><td>true</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#long">long</a></td><td>total</td><td>true</td><td>finite</td><td>true</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#int">int</a></td><td>total</td><td>true</td><td>finite</td><td>true</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#short">short</a></td><td>total</td><td>true</td><td>finite</td><td>true</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#byte">byte</a></td><td>total</td><td>true</td><td>finite</td><td>true</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#nonNegativeInteger">nonNegativeInteger</a></td><td>total</td><td>false</td><td>countably infinite</td><td>true</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#unsignedLong">unsignedLong</a></td><td>total</td><td>true</td><td>finite</td><td>true</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#unsignedInt">unsignedInt</a></td><td>total</td><td>true</td><td>finite</td><td>true</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#unsignedShort">unsignedShort</a></td><td>total</td><td>true</td><td>finite</td><td>true</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#unsignedByte">unsignedByte</a></td><td>total</td><td>true</td><td>finite</td><td>true</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#positiveInteger">positiveInteger</a></td><td>total</td><td>false</td><td>countably infinite</td><td>true</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="div1">
|
|
<h2>
|
|
<a name="isoformats"></a>D ISO 8601 Date and Time Formats</h2>
|
|
<div class="div2">
|
|
<h3>
|
|
<span class="nav"> <a href="#truncatedformats" class="nav"><img alt="next sub-section" src="next.jpg"></a></span><a name="formatdetails"></a>D.1 ISO 8601 Conventions</h3>
|
|
<p>
|
|
The <a href="#dt-primitive" class="termref"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> datatypes
|
|
<a href="#duration">duration</a>, <a href="#dateTime">dateTime</a>, <a href="#time">time</a>,
|
|
<a href="#date">date</a>, <a href="#gYearMonth">gYearMonth</a>, <a href="#gMonthDay">gMonthDay</a>,
|
|
<a href="#gDay">gDay</a>, <a href="#gMonth">gMonth</a> and <a href="#gYear">gYear</a>
|
|
use lexical formats inspired by
|
|
<a href="#ISO8601">[ISO 8601]</a>. This appendix provides more detail on the ISO
|
|
formats and discusses some deviations from them for the datatypes
|
|
defined in this specification.
|
|
</p>
|
|
<p>
|
|
<a href="#ISO8601">[ISO 8601]</a> "specifies the representation of dates in the
|
|
proleptic Gregorian calendar and times and representations of periods of time".
|
|
The proleptic Gregorian calendar includes dates prior to 1582 (the year it came
|
|
into use as an ecclesiastical calendar).
|
|
It should be pointed out that the datatypes described in this
|
|
specification do not cover all the types of data covered by
|
|
<a href="#ISO8601">[ISO 8601]</a>, nor do they support all the lexical
|
|
representations for those types of data.
|
|
</p>
|
|
<p>
|
|
<a href="#ISO8601">[ISO 8601]</a> lexical formats are described using "pictures"
|
|
in which characters are used in place of digits. For the primitive datatypes
|
|
<a href="#dateTime">dateTime</a>, <a href="#time">time</a>,
|
|
<a href="#date">date</a>, <a href="#gYearMonth">gYearMonth</a>, <a href="#gMonthDay">gMonthDay</a>,
|
|
<a href="#gDay">gDay</a>, <a href="#gMonth">gMonth</a> and <a href="#gYear">gYear</a>.
|
|
these characters have the following meanings:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
C -- represents a digit used in the thousands and hundreds components,
|
|
the "century" component, of the time element "year". Legal values are
|
|
from 0 to 9.
|
|
|
|
</li>
|
|
<li>
|
|
|
|
Y -- represents a digit used in the tens and units components of the time
|
|
element "year". Legal values are from 0 to 9.
|
|
|
|
</li>
|
|
<li>
|
|
|
|
M -- represents a digit used in the time element "month". The two
|
|
digits in a MM format can have values from 1 to 12.
|
|
|
|
</li>
|
|
<li>
|
|
|
|
D -- represents a digit used in the time element "day". The two digits
|
|
in a DD format can have values from 1 to 28 if the month value equals 2,
|
|
1 to 29 if the month value equals 2 and the year is a leap year, 1 to 30
|
|
if the month value equals 4, 6, 9 or 11, and 1 to 31 if the month value
|
|
equals 1, 3, 5, 7, 8, 10 or 12.
|
|
|
|
</li>
|
|
<li>
|
|
|
|
h -- represents a digit used in the time element "hour". The two digits
|
|
in a hh format can have values from 0 to 23.
|
|
|
|
</li>
|
|
<li>
|
|
|
|
m -- represents a digit used in the time element "minute". The two digits
|
|
in a mm format can have values from 0 to 59.
|
|
|
|
</li>
|
|
<li>
|
|
|
|
s -- represents a digit used in the time element "second". The two
|
|
digits in a ss format can have values from 0 to 60. In the formats
|
|
described in this specification the whole number of seconds <a href="#dt-may" class="termref"><span class="arrow">·</span>may<span class="arrow">·</span></a>
|
|
be followed by decimal seconds to an arbitrary level of precision.
|
|
This is represented in the picture by "ss.sss". A value of 60 or more is
|
|
allowed only in the case of leap seconds. <p>
|
|
</p>
|
|
Strictly speaking, a value of
|
|
60 or more is not sensible unless the month and day could
|
|
represent March 31, June 30, September 30, or December 31 <i>in UTC</i>.
|
|
Because the leap second is added or subtracted as the last second of the day
|
|
in UTC time, the long (or short) minute could occur at other times in local
|
|
time. In cases where the leap second is used with an inappropriate month
|
|
and day it, and any fractional seconds, should considered as added or
|
|
subtracted from the following minute.
|
|
|
|
</li>
|
|
</ul>
|
|
<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>
|
|
<ul>
|
|
<li>
|
|
|
|
T -- is used as time designator to indicate the start of the
|
|
representation of the time of day in <a href="#dateTime">dateTime</a>.
|
|
|
|
</li>
|
|
<li>
|
|
|
|
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
|
|
<a href="#dateTime">dateTime</a>, <a href="#time">time</a>,
|
|
<a href="#date">date</a>, <a href="#gYearMonth">gYearMonth</a>, <a href="#gMonthDay">gMonthDay</a>,
|
|
<a href="#gDay">gDay</a>, <a href="#gMonth">gMonth</a>, and <a href="#gYear">gYear</a>.
|
|
|
|
</li>
|
|
</ul>
|
|
<p>In the lexical format for <a href="#duration">duration</a> the following
|
|
characters are also used as designators and appear as themselves in
|
|
lexical formats:</p>
|
|
<ul>
|
|
<li>
|
|
P -- is used as the time duration designator, preceding a data element
|
|
representing a given duration of time.
|
|
</li>
|
|
<li>
|
|
Y -- follows the number of years in a time duration.</li>
|
|
<li>M -- follows the number of months or minutes in a time duration.</li>
|
|
<li>D -- follows the number of days in a time duration.</li>
|
|
<li>H -- follows the number of hours in a time duration.</li>
|
|
<li>S -- follows the number of seconds in a time duration.</li>
|
|
</ul>
|
|
<p>
|
|
The values of the
|
|
Year, Month, Day, Hour and Minutes components are not restricted but
|
|
allow an arbitrary integer. Similarly, the value of the Seconds component
|
|
allows an arbitrary decimal. Thus, the lexical format for
|
|
<a href="#duration">duration</a> and datatypes derived from it
|
|
does not follow the alternative
|
|
format of § 5.5.3.2.1 of <a href="#ISO8601">[ISO 8601]</a>.</p>
|
|
</div>
|
|
<div class="div2">
|
|
<h3>
|
|
<span class="nav"><a href="#formatdetails" class="nav"><img alt="previous sub-section" src="previous.jpg"></a> <a href="#deviantformats" class="nav"><img alt="next sub-section" src="next.jpg"></a></span><a name="truncatedformats"></a>D.2 Truncated and Reduced Formats</h3>
|
|
<p>
|
|
<a href="#ISO8601">[ISO 8601]</a> supports a variety of "truncated" formats in
|
|
which some of the characters on the left of specific formats, for example,
|
|
the
|
|
century, can be omitted.
|
|
Truncated formats are, in
|
|
general, not permitted for the datatypes defined in this specification
|
|
with three exceptions. The <a href="#time">time</a> datatype uses
|
|
a truncated format for <a href="#dateTime">dateTime</a>
|
|
which represents an instant of time that recurs every day.
|
|
Similarly, the <a href="#gMonthDay">gMonthDay</a> and <a href="#gDay">gDay</a>
|
|
datatypes use left-truncated formats for <a href="#date">date</a>.
|
|
The datatype <a href="#gMonth">gMonth</a> uses a right and left truncated format for
|
|
<a href="#date">date</a>.
|
|
</p>
|
|
<p>
|
|
<a href="#ISO8601">[ISO 8601]</a> also supports a variety of "reduced" or right-truncated
|
|
formats in which some of the characters to the right of specific formats,
|
|
such as the
|
|
time specification, can be omitted. Right truncated formats are also, in
|
|
general,
|
|
not permitted for the datatypes defined in this specification
|
|
with the following exceptions:
|
|
right-truncated representations of <a href="#dateTime">dateTime</a> are used as
|
|
lexical representations for <a href="#date">date</a>, <a href="#gMonth">gMonth</a>,
|
|
<a href="#gYear">gYear</a>.
|
|
</p>
|
|
</div>
|
|
<div class="div2">
|
|
<h3 class="withToc">
|
|
<span class="nav"><a href="#truncatedformats" class="nav"><img alt="previous sub-section" src="previous.jpg"></a> </span><a name="deviantformats"></a>D.3 Deviations from ISO 8601 Formats</h3>
|
|
<div class="localToc">
|
|
<div class="tocLine">D.3.1 <a href="#signallowed">Sign Allowed</a>
|
|
</div>
|
|
<div class="tocLine">D.3.2 <a href="#noYearZero">No Year Zero</a>
|
|
</div>
|
|
<div class="tocLine">D.3.3 <a href="#morethan9999years">More Than 9999 Years</a>
|
|
</div>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="signallowed"></a>D.3.1 Sign Allowed</h4>
|
|
<p>
|
|
An optional minus sign is allowed immediately preceding, without a space,
|
|
the lexical representations for <a href="#duration">duration</a>, <a href="#dateTime">dateTime</a>,
|
|
<a href="#date">date</a>, <a href="#gMonth">gMonth</a>, <a href="#gYear">gYear</a>.
|
|
</p>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="noYearZero"></a>D.3.2 No Year Zero</h4>
|
|
<p>
|
|
The year "0000" is an illegal year value.
|
|
</p>
|
|
</div>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="morethan9999years"></a>D.3.3 More Than 9999 Years</h4>
|
|
<p>
|
|
To accommodate year values greater than 9999, more than four digits are
|
|
allowed in the year representations of <a href="#dateTime">dateTime</a>,
|
|
<a href="#date">date</a>, <a href="#gYearMonth">gYearMonth</a>, and <a href="#gYear">gYear</a>.
|
|
This follows
|
|
<a href="#ISO8601revision">[ISO 8601 Draft Revision]</a>.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div1">
|
|
<h2>
|
|
<a name="adding-durations-to-dateTimes"></a>E Adding durations to dateTimes</h2>
|
|
<p>
|
|
Given a <a href="#dateTime">dateTime</a> S and a <a href="#duration">duration</a> D, this
|
|
appendix specifies how to compute a <a href="#dateTime">dateTime</a> E where E is the
|
|
end of the time period with start S and duration D i.e. E = S + D. Such
|
|
computations are used, for example, to determine whether a <a href="#dateTime">dateTime</a>
|
|
is within a specific time period. This appendix also addresses the addition of
|
|
<a href="#duration">duration</a>s to the datatypes <a href="#date">date</a>,
|
|
<a href="#gYearMonth">gYearMonth</a>, <a href="#gYear">gYear</a>, <a href="#gDay">gDay</a> and
|
|
<a href="#gMonth">gMonth</a>, which can be viewed as a set of <a href="#dateTime">dateTime</a>s.
|
|
In such cases, the addition is made to the first or starting
|
|
<a href="#dateTime">dateTime</a> in the set.
|
|
</p>
|
|
<p>
|
|
<i>This is a logical explanation of the process.
|
|
Actual implementations are free to optimize as long as they produce the same
|
|
results. </i> The calculation uses the notation S[year] to represent the year
|
|
field of S, S[month] to represent the month field, and so on. It also depends on
|
|
the following functions:</p>
|
|
<ul>
|
|
<li>
|
|
fQuotient(a, b) = the greatest integer less than or equal to a/b
|
|
<ul>
|
|
<li>fQuotient(-1,3) = -1 </li>
|
|
<li>fQuotient(0,3)...fQuotient(2,3) = 0</li>
|
|
<li>fQuotient(3,3) = 1</li>
|
|
<li>fQuotient(3.123,3) = 1</li>
|
|
</ul>
|
|
|
|
</li>
|
|
<li>
|
|
modulo(a, b) = a - fQuotient(a,b)*b
|
|
<ul>
|
|
<li>modulo(-1,3) = 2</li>
|
|
<li>modulo(0,3)...modulo(2,3) = 0...2</li>
|
|
<li>modulo(3,3) = 0</li>
|
|
<li>modulo(3.123,3) = 0.123</li>
|
|
</ul>
|
|
|
|
</li>
|
|
<li>
|
|
fQuotient(a, low, high) = fQuotient(a - low, high - low)
|
|
<ul>
|
|
<li>fQuotient(0, 1, 13) = -1</li>
|
|
<li>fQuotient(1, 1, 13) ... fQuotient(12, 1, 13) = 0</li>
|
|
<li>fQuotient(13, 1, 13) = 1</li>
|
|
<li>fQuotient(13.123, 1, 13) = 1</li>
|
|
</ul>
|
|
|
|
</li>
|
|
<li>
|
|
modulo(a, low, high) = modulo(a - low, high - low) + low
|
|
<ul>
|
|
<li>modulo(0, 1, 13) = 12</li>
|
|
<li>modulo(1, 1, 13) ... modulo(12, 1, 13) = 1...12 </li>
|
|
<li>modulo(13, 1, 13) = 1</li>
|
|
<li>modulo(13.123, 1, 13) = 1.123</li>
|
|
</ul>
|
|
|
|
</li>
|
|
<li>
|
|
maximumDayInMonthFor(yearValue, monthValue) =
|
|
<ul>
|
|
<li>M := modulo(monthValue, 1, 13)</li>
|
|
<li>Y := yearValue + fQuotient(monthValue, 1, 13)</li>
|
|
<li>Return a value based on M and Y:</li>
|
|
</ul>
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
<p>
|
|
</p>
|
|
<table border="1">
|
|
<tbody>
|
|
<tr>
|
|
<td style="background-color:#FFFF99" rowspan="1" colspan="1"><b>31</b></td>
|
|
<td colspan="2" rowspan="1">M = January, March, May, July, August, October, or
|
|
December</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="background-color:#FFFF99" rowspan="1" colspan="1"><b>30</b></td>
|
|
<td colspan="2" rowspan="1">M = April, June, September, or November</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="background-color:#FFFF99" rowspan="1" colspan="1"><b>29</b></td>
|
|
<td rowspan="1" colspan="1">M = February AND (modulo(Y, 400) = 0 OR
|
|
(modulo(Y, 100) != 0) AND modulo(Y, 4) = 0)</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="background-color:#FFFF99" rowspan="1" colspan="1"><b>28</b></td>
|
|
<td rowspan="1" colspan="1">Otherwise</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>
|
|
</p>
|
|
<div class="div2">
|
|
<h3>
|
|
<span class="nav"> <a href="#adding-durations-to-instants-commutativity-associativity" class="nav"><img alt="next sub-section" src="next.jpg"></a></span><a name="section-Algorithm"></a>E.1 Algorithm</h3>
|
|
<p>
|
|
Essentially, this calculation is equivalent to separating D into <year,month>
|
|
and <day,hour,minute,second> fields. The <year,month> is added to S.
|
|
If the day is out of range, it is <i>pinned</i> to be within range. Thus April
|
|
31 turns into April 30. Then the <day,hour,minute,second> is added. This
|
|
latter addition can cause the year and month to change.
|
|
</p>
|
|
<p>
|
|
Leap seconds are handled by the computation by treating them as overflows.
|
|
Essentially, a value of 60
|
|
seconds in S is treated as if it were a duration of 60 seconds added to S
|
|
(with a zero seconds field). All calculations
|
|
thereafter use 60 seconds per minute.
|
|
</p>
|
|
<p>
|
|
Thus the addition of either PT1M or PT60S to any dateTime will always
|
|
produce the same result. This is a special definition of addition which
|
|
is designed to match common practice, and -- most importantly -- be stable
|
|
over time.
|
|
</p>
|
|
<p>
|
|
A definition that attempted to take leap-seconds into account would need to
|
|
be constantly updated, and could not predict the results of future
|
|
implementation's additions. The decision to introduce a leap second in UTC
|
|
is the responsibility of the <a href="#IERS">[International Earth Rotation Service (IERS)]</a>. They make periodic
|
|
announcements as to when
|
|
leap seconds are to be added, but this is not known more than a year in
|
|
advance. For more information on leap seconds, see <a href="#USNavy">[U.S. Naval Observatory Time Service Department]</a>.
|
|
</p>
|
|
<p>
|
|
The following is the precise specification. These steps must be followed in
|
|
the same order. If a field in D is not specified, it is treated as if it were
|
|
zero. If a field in S is not specified, it is treated in the calculation as if
|
|
it were the minimum allowed value in that field, however, after the calculation
|
|
is concluded, the corresponding field in E is removed (set to unspecified).
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<i>Months (may be modified additionally below)</i>
|
|
<ul>
|
|
<li>temp := S[month] + D[month]</li>
|
|
<li>E[month] := modulo(temp, 1, 13)</li>
|
|
<li>carry := fQuotient(temp, 1, 13)</li>
|
|
</ul>
|
|
|
|
</li>
|
|
<li>
|
|
<i>Years (may be modified additionally below)</i>
|
|
<ul>
|
|
<li>E[year] := S[year] + D[year] + carry</li>
|
|
</ul>
|
|
|
|
</li>
|
|
<li>
|
|
<i>Zone</i>
|
|
<ul>
|
|
<li>E[zone] := S[zone]</li>
|
|
</ul>
|
|
|
|
</li>
|
|
<li>
|
|
<i>Seconds</i>
|
|
<ul>
|
|
<li>temp := S[second] + D[second]</li>
|
|
<li>E[second] := modulo(temp, 60)</li>
|
|
<li>carry := fQuotient(temp, 60)</li>
|
|
</ul>
|
|
|
|
</li>
|
|
<li>
|
|
<i>Minutes</i>
|
|
<ul>
|
|
<li>temp := S[minute] + D[minute] + carry</li>
|
|
<li>E[minute] := modulo(temp, 60)</li>
|
|
<li>carry := fQuotient(temp, 60)</li>
|
|
</ul>
|
|
|
|
</li>
|
|
<li>
|
|
<i>Hours</i>
|
|
<ul>
|
|
<li>temp := S[hour] + D[hour] + carry</li>
|
|
<li>E[hour] := modulo(temp, 24)</li>
|
|
<li>carry := fQuotient(temp, 24)</li>
|
|
</ul>
|
|
|
|
</li>
|
|
<li>
|
|
<i>Days</i>
|
|
<ul>
|
|
<li>if S[day] > maximumDayInMonthFor(E[year], E[month])
|
|
<ul>
|
|
<li>tempDays := maximumDayInMonthFor(E[year], E[month])</li>
|
|
</ul>
|
|
|
|
</li>
|
|
<li>else if S[day] < 1
|
|
<ul>
|
|
<li>tempDays := 1</li>
|
|
</ul>
|
|
|
|
</li>
|
|
<li>else
|
|
<ul>
|
|
<li>tempDays := S[day]</li>
|
|
</ul>
|
|
|
|
</li>
|
|
<li>E[day] := tempDays + D[day] + carry</li>
|
|
<li>
|
|
<b>START LOOP</b>
|
|
<ul>
|
|
<li>
|
|
<b>IF </b>E[day] < 1
|
|
<ul>
|
|
<li>E[day] := E[day] + maximumDayInMonthFor(E[year], E[month] - 1)</li>
|
|
<li>carry := -1</li>
|
|
</ul>
|
|
|
|
</li>
|
|
<li>
|
|
<b>ELSE IF </b>E[day] > maximumDayInMonthFor(E[year], E[month])
|
|
<ul>
|
|
<li>E[day] := E[day] - maximumDayInMonthFor(E[year], E[month])</li>
|
|
<li>carry := 1</li>
|
|
</ul>
|
|
|
|
</li>
|
|
<li>
|
|
<b>ELSE EXIT LOOP</b>
|
|
</li>
|
|
<li>temp := E[month] + carry</li>
|
|
<li>E[month] := modulo(temp, 1, 13)</li>
|
|
<li>E[year] := E[year] + fQuotient(temp, 1, 13)</li>
|
|
<li>
|
|
<b>GOTO START LOOP</b>
|
|
</li>
|
|
</ul>
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
</li>
|
|
</ul>
|
|
<p>
|
|
<i>Examples:</i>
|
|
</p>
|
|
<table border="1" cellspacing="0" cellpadding="4">
|
|
<tbody>
|
|
<tr>
|
|
<th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">dateTime</th>
|
|
<th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">duration</th>
|
|
<th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">result</th>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">2000-01-12T12:13:14Z</td>
|
|
<td align="center" rowspan="1" colspan="1">P1Y3M5DT7H10M3.3S</td>
|
|
<td align="center" rowspan="1" colspan="1">2001-04-17T19:23:17.3Z</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">2000-01</td>
|
|
<td align="center" rowspan="1" colspan="1">-P3M</td>
|
|
<td align="center" rowspan="1" colspan="1">1999-10</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">2000-01-12</td>
|
|
<td align="center" rowspan="1" colspan="1">PT33H</td>
|
|
<td align="center" rowspan="1" colspan="1">2000-01-13</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="div2">
|
|
<h3>
|
|
<span class="nav"><a href="#" class="nav"><img alt="previous sub-section" src="previous.jpg"></a> </span><a name="adding-durations-to-instants-commutativity-associativity"></a>E.2 Commutativity and Associativity</h3>
|
|
<p>
|
|
Time durations are added by simply adding each of their fields, respectively,
|
|
without overflow.
|
|
</p>
|
|
<p>
|
|
The order of addition of durations to instants <i>is</i> significant.
|
|
For example, there are cases where:
|
|
</p>
|
|
<p>((dateTime + duration1) + duration2) != ((dateTime +
|
|
duration2) + duration1)</p>
|
|
<p>
|
|
<i>Example:</i>
|
|
</p>
|
|
<p>(2000-03-30 + P1D) + P1M = 2000-03-31 + P1M = 2001-<b>04-30</b>
|
|
</p>
|
|
<p>(2000-03-30 + P1M) + P1D = 2000-04-30 + P1D = 2000-<b>05-01</b>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="div1">
|
|
<h2>
|
|
<a name="regexs"></a>F Regular Expressions</h2>
|
|
<p>
|
|
A <a href="#dt-regex" class="termref"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a> <i>R</i> is a sequence of
|
|
characters that denote a <b>set of strings</b> <i>L(R)</i>.
|
|
When used to constrain a <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>, a
|
|
<b>regular expression</b> <i>R</i> asserts that only strings
|
|
in <i>L(R)</i> are valid literals for values of that type.
|
|
</p>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-regex">[Definition:] </a>A
|
|
<b>regular expression</b> is composed from zero or more
|
|
<a href="#dt-branch" class="termref"><span class="arrow">·</span>branch<span class="arrow">·</span></a>es, separated by <code>|</code> characters.
|
|
</span>
|
|
</p>
|
|
<div class="scrap">
|
|
<table cellpadding="5" border="1" bgcolor="#f5dcb3" width="100%">
|
|
<tbody>
|
|
<tr align="left">
|
|
<td><strong><font color="red">Regular Expression</font></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<table border="0" bgcolor="#f5dcb3">
|
|
<tbody>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-regExp"></a><code>[1] </code></td><td><code>regExp</code></td><td><code> ::= </code></td><td><code>
|
|
<a href="#nt-branch">branch</a>
|
|
( '|' <a href="#nt-branch">branch</a> )*
|
|
</code></td><td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>
|
|
</p>
|
|
<table border="1">
|
|
<col width="50%" span="1">
|
|
<col width="50%" span="1">
|
|
<thead>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">
|
|
For all <a href="#dt-branch" class="termref"><span class="arrow">·</span>branch<span class="arrow">·</span></a>es <i>S</i>, and for all
|
|
<a href="#dt-regex" class="termref"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a>s <i>T</i>, valid
|
|
<a href="#dt-regex" class="termref"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a>s <i>R</i> are:
|
|
</th>
|
|
<th rowspan="1" colspan="1">
|
|
Denoting the set of strings <i>L(R)</i> containing:
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">(empty string)</td>
|
|
<td align="center" rowspan="1" colspan="1">the set containing just the empty string
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><i>S</i></td>
|
|
<td align="center" rowspan="1" colspan="1">all strings in <i>L(S)</i></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><i>S</i>|<i>T</i></td>
|
|
<td align="center" rowspan="1" colspan="1">all strings in <i>L(S)</i> and
|
|
all strings in <i>L(T)</i></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-branch">[Definition:] </a>
|
|
A <b>branch</b> consists
|
|
of zero or more <a href="#dt-piece" class="termref"><span class="arrow">·</span>piece<span class="arrow">·</span></a>s, concatenated together.
|
|
</span>
|
|
</p>
|
|
<div class="scrap">
|
|
<table cellpadding="5" border="1" bgcolor="#f5dcb3" width="100%">
|
|
<tbody>
|
|
<tr align="left">
|
|
<td><strong><font color="red">Branch</font></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<table border="0" bgcolor="#f5dcb3">
|
|
<tbody>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-branch"></a><code>[2] </code></td><td><code>branch</code></td><td><code> ::= </code></td><td><code><a href="#nt-piece">piece</a>*</code></td><td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>
|
|
</p>
|
|
<table border="1">
|
|
<col width="50%" span="1">
|
|
<col width="50%" span="1">
|
|
<thead>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">
|
|
For all <a href="#dt-piece" class="termref"><span class="arrow">·</span>piece<span class="arrow">·</span></a>s <i>S</i>, and for all
|
|
<a href="#dt-branch" class="termref"><span class="arrow">·</span>branch<span class="arrow">·</span></a>es <i>T</i>, valid
|
|
<a href="#dt-branch" class="termref"><span class="arrow">·</span>branch<span class="arrow">·</span></a>es <i>R</i> are:
|
|
</th>
|
|
<th rowspan="1" colspan="1">
|
|
Denoting the set of strings <i>L(R)</i> containing:
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><i>S</i></td>
|
|
<td align="center" rowspan="1" colspan="1">all strings in <i>L(S)</i></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><i>S</i><i>T</i></td>
|
|
<td align="center" rowspan="1" colspan="1">all strings <i>st</i> with <i>s</i> in
|
|
<i>L(S)</i> and <i>t</i> in <i>L(T)</i></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-piece">[Definition:] </a>
|
|
A <b>piece</b> is an
|
|
<a href="#dt-atom" class="termref"><span class="arrow">·</span>atom<span class="arrow">·</span></a>, possibly followed by a
|
|
<a href="#dt-quantifier" class="termref"><span class="arrow">·</span>quantifier<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p>
|
|
|
|
<div class="scrap">
|
|
<table cellpadding="5" border="1" bgcolor="#f5dcb3" width="100%">
|
|
<tbody>
|
|
<tr align="left">
|
|
<td><strong><font color="red">Piece</font></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<table border="0" bgcolor="#f5dcb3">
|
|
<tbody>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-piece"></a><code>[3] </code></td><td><code>piece</code></td><td><code> ::= </code></td><td><code><a href="#nt-atom">atom</a> <a href="#nt-quantifier">quantifier</a>?</code></td><td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>
|
|
</p>
|
|
<table border="1">
|
|
<col width="50%" span="1">
|
|
<col width="50%" span="1">
|
|
<thead>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">
|
|
For all <a href="#dt-atom" class="termref"><span class="arrow">·</span>atom<span class="arrow">·</span></a>s <i>S</i> and non-negative
|
|
integers <i>n</i>, <i>m</i> such that
|
|
<i>n <= m</i>, valid <a href="#dt-piece" class="termref"><span class="arrow">·</span>piece<span class="arrow">·</span></a>s
|
|
<i>R</i> are:
|
|
</th>
|
|
<th rowspan="1" colspan="1">
|
|
Denoting the set of strings <i>L(R)</i> containing:
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><i>S</i></td>
|
|
<td align="center" rowspan="1" colspan="1">all strings in <i>L(S)</i></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><i>S</i>?</td>
|
|
<td align="center" rowspan="1" colspan="1">the empty string, and all strings in
|
|
<i>L(S)</i>.</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><i>S</i>*</td>
|
|
<td align="center" rowspan="1" colspan="1">
|
|
All strings in <i>L(S?)</i> and all strings <i>st</i>
|
|
with <i>s</i> in <i>L(S*)</i>
|
|
and <i>t</i> in <i>L(S)</i>. <i>( all concatenations
|
|
of zero or more strings from L(S) )</i>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><i>S</i>+</td>
|
|
<td align="center" rowspan="1" colspan="1">
|
|
All strings <i>st</i> with <i>s</i> in <i>L(S)</i>
|
|
and <i>t</i> in <i>L(S*)</i>. <i>( all concatenations
|
|
of one or more strings from L(S) )</i>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><i>S</i>{n,m}</td>
|
|
<td align="center" rowspan="1" colspan="1">
|
|
All strings <i>st</i> with <i>s</i> in <i>L(S)</i>
|
|
and <i>t</i> in <i>L(S{n-1,m-1})</i>. <i>( All
|
|
sequences of at least n, and at most m, strings from L(S) )</i>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><i>S</i>{n}</td>
|
|
<td align="center" rowspan="1" colspan="1">
|
|
All strings in <i>L(S{n,n})</i>. <i>( All
|
|
sequences of exactly n strings from L(S) )</i>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><i>S</i>{n,}</td>
|
|
<td align="center" rowspan="1" colspan="1">
|
|
All strings in L(S{n}S*) <i>( All
|
|
sequences of at least n, strings from L(S) )</i>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><i>S</i>{0,m}</td>
|
|
<td align="center" rowspan="1" colspan="1">
|
|
All strings <i>st</i> with <i>s</i> in <i>L(S?)</i>
|
|
and <i>t</i> in <i>L(S{0,m-1})</i>. <i>( All
|
|
sequences of at most m, strings from L(S) )</i>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><i>S</i>{0,0}</td>
|
|
<td align="center" rowspan="1" colspan="1">
|
|
The set containing only the empty string
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
The regular expression language in the Perl Programming Language
|
|
<a href="#Perl">[Perl]</a> does not include a quantifier of the form
|
|
<code>S{,m)</code>, since it is logically equivalent to <code>S{0,m}</code>.
|
|
We have, therefore, left this logical possibility out of the regular
|
|
expression language defined by this specification. We welcome
|
|
further input from implementors and schema authors on this issue.
|
|
|
|
</blockquote>
|
|
<p>
|
|
<span class="termdef"><a name="dt-quantifier">[Definition:] </a>
|
|
A <b>quantifier</b>
|
|
is one of <code>?</code>, <code>*</code>, <code>+</code>,
|
|
<code>{n,m}</code> or <code>{n,}</code>, which have the meanings
|
|
defined in the table above.
|
|
</span>
|
|
</p>
|
|
<div class="scrap">
|
|
<table cellpadding="5" border="1" bgcolor="#f5dcb3" width="100%">
|
|
<tbody>
|
|
<tr align="left">
|
|
<td><strong><font color="red">Quanitifer</font></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<table border="0" bgcolor="#f5dcb3">
|
|
<tbody>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-quantifier"></a><code>[4] </code></td><td><code>quantifier</code></td><td><code> ::= </code></td><td><code>[?*+] | ( '{' <a href="#nt-quantity">quantity</a> '}' )</code></td><td></td>
|
|
</tr>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-quantity"></a><code>[5] </code></td><td><code>quantity</code></td><td><code> ::= </code></td><td><code><a href="#nt-quantRange">quantRange</a> |
|
|
<a href="#nt-quantMin">quantMin</a> | <a href="#nt-QuantExact">QuantExact</a></code></td><td></td>
|
|
</tr>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-quantRange"></a><code>[6] </code></td><td><code>quantRange</code></td><td><code> ::= </code></td><td><code><a href="#nt-QuantExact">QuantExact</a> ',' <a href="#nt-QuantExact">QuantExact</a></code></td><td></td>
|
|
</tr>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-quantMin"></a><code>[7] </code></td><td><code>quantMin</code></td><td><code> ::= </code></td><td><code><a href="#nt-QuantExact">QuantExact</a> ','</code></td><td></td>
|
|
</tr>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-QuantExact"></a><code>[8] </code></td><td><code>QuantExact</code></td><td><code> ::= </code></td><td><code>[0-9]+</code></td><td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>
|
|
<span class="termdef"><a name="dt-atom">[Definition:] </a>
|
|
An <b>atom</b> is either a
|
|
<a href="#dt-normalc" class="termref"><span class="arrow">·</span>normal character<span class="arrow">·</span></a>, a <a href="#dt-charclass" class="termref"><span class="arrow">·</span>character class<span class="arrow">·</span></a>, or
|
|
a parenthesized <a href="#dt-regex" class="termref"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a>.</span>
|
|
</p>
|
|
|
|
<div class="scrap">
|
|
<table cellpadding="5" border="1" bgcolor="#f5dcb3" width="100%">
|
|
<tbody>
|
|
<tr align="left">
|
|
<td><strong><font color="red">Atom</font></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<table border="0" bgcolor="#f5dcb3">
|
|
<tbody>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-atom"></a><code>[9] </code></td><td><code>atom</code></td><td><code> ::= </code></td><td><code><a href="#nt-Char">Char</a> |
|
|
<a href="#nt-charClass">charClass</a> | ( '('
|
|
<a href="#nt-regExp">regExp</a> ')' )</code></td><td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>
|
|
</p>
|
|
<table border="1">
|
|
<col width="50%" span="1">
|
|
<col width="50%" span="1">
|
|
<thead>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">
|
|
For all <a href="#dt-normalc" class="termref"><span class="arrow">·</span>normal character<span class="arrow">·</span></a>s <i>c</i>,
|
|
<a href="#dt-charclass" class="termref"><span class="arrow">·</span>character class<span class="arrow">·</span></a>es <i>C</i>, and
|
|
<a href="#dt-regex" class="termref"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a>s <i>S</i>, valid
|
|
<a href="#dt-atom" class="termref"><span class="arrow">·</span>atom<span class="arrow">·</span></a>s <i>R</i> are:
|
|
</th>
|
|
<th rowspan="1" colspan="1">
|
|
Denoting the set of strings <i>L(R)</i> containing:
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><i>c</i></td>
|
|
<td align="center" rowspan="1" colspan="1">the single string consisting only of <i>c</i></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><i>C</i></td>
|
|
<td align="center" rowspan="1" colspan="1">all strings in <i>L(C)</i></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">(<i>S</i>)</td>
|
|
<td align="center" rowspan="1" colspan="1">all strings in <i>L(S)</i></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-metac">[Definition:] </a>
|
|
A <b>metacharacter</b>
|
|
is either <code>.</code>, <code>\</code>, <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 <a href="#dt-regex" class="termref"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a>s,
|
|
but can be escaped to form <a href="#dt-atom" class="termref"><span class="arrow">·</span>atom<span class="arrow">·</span></a>s that denote the
|
|
sets of strings containing only themselves, i.e., an escaped
|
|
<a href="#dt-metac" class="termref"><span class="arrow">·</span>metacharacter<span class="arrow">·</span></a> behaves like a <a href="#dt-normalc" class="termref"><span class="arrow">·</span>normal character<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-normalc">[Definition:] </a>
|
|
A
|
|
<b>normal character</b> is any XML character that is not a
|
|
metacharacter. In <a href="#dt-regex" class="termref"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a>s, a normal character is an
|
|
atom that denotes the singleton set of strings containing only itself.
|
|
</span>
|
|
</p>
|
|
<div class="scrap">
|
|
<table cellpadding="5" border="1" bgcolor="#f5dcb3" width="100%">
|
|
<tbody>
|
|
<tr align="left">
|
|
<td><strong><font color="red">Normal Character</font></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<table border="0" bgcolor="#f5dcb3">
|
|
<tbody>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-Char"></a><code>[10] </code></td><td><code>Char</code></td><td><code> ::= </code></td><td><code>[^.\?*+()|#x5B#x5D]</code></td><td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<p>
|
|
Note that a <a href="#dt-normalc" class="termref"><span class="arrow">·</span>normal character<span class="arrow">·</span></a> can be represented either as
|
|
itself, or with a <a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#dt-charref">character
|
|
reference</a>.
|
|
</p>
|
|
<div class="div2">
|
|
<h3 class="withToc">
|
|
<span class="nav"> </span><a name="charcter-classes"></a>F.1 Character Classes</h3>
|
|
<p>
|
|
<span class="termdef"><a name="dt-charclass">[Definition:] </a>
|
|
A
|
|
<b>character class</b> is an <a href="#dt-atom" class="termref"><span class="arrow">·</span>atom<span class="arrow">·</span></a>
|
|
<i>R</i> that identifies a <b>set of characters</b>
|
|
<i>C(R)</i>. The set of strings <i>L(R)</i> denoted by a
|
|
character class <i>R</i> contains one single-character string
|
|
"<i>c</i>" for each character <i>c</i> in <i>C(R)</i>.
|
|
</span>
|
|
</p>
|
|
<div class="scrap">
|
|
<table cellpadding="5" border="1" bgcolor="#f5dcb3" width="100%">
|
|
<tbody>
|
|
<tr align="left">
|
|
<td><strong><font color="red">Character Class</font></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<table border="0" bgcolor="#f5dcb3">
|
|
<tbody>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-charClass"></a><code>[11] </code></td><td><code>charClass</code></td><td><code> ::= </code></td><td><code>
|
|
<a href="#nt-charClassEsc">charClassEsc</a> | <a href="#nt-charClassExpr">charClassExpr</a>
|
|
</code></td><td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>
|
|
A character class is either a <a href="#dt-cces" class="termref"><span class="arrow">·</span>character class escape<span class="arrow">·</span></a> or a
|
|
<a href="#dt-charexpr" class="termref"><span class="arrow">·</span>character class expression<span class="arrow">·</span></a>.
|
|
</p>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-charexpr">[Definition:] </a>
|
|
A
|
|
<b>character class expression</b> is a <a href="#dt-chargroup" class="termref"><span class="arrow">·</span>character group<span class="arrow">·</span></a> surrounded
|
|
by <code>[</code> and <code>]</code> characters. For all character
|
|
groups <i>G</i>, [<i>G</i>] is a valid <b>character class
|
|
expression</b>, identifying the set of characters
|
|
<i>C</i>([<i>G</i>]) = <i>C</i>(<i>G</i>).
|
|
</span>
|
|
</p>
|
|
<div class="scrap">
|
|
<table cellpadding="5" border="1" bgcolor="#f5dcb3" width="100%">
|
|
<tbody>
|
|
<tr align="left">
|
|
<td><strong><font color="red">Character Class Expression</font></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<table border="0" bgcolor="#f5dcb3">
|
|
<tbody>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-charClassExpr"></a><code>[12] </code></td><td><code>charClassExpr</code></td><td><code> ::= </code></td><td><code>'[' <a href="#nt-charGroup">charGroup</a> ']'</code></td><td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>
|
|
<span class="termdef"><a name="dt-chargroup">[Definition:] </a>
|
|
A
|
|
<b>character group</b> is either a <a href="#dt-poschargroup" class="termref"><span class="arrow">·</span>positive character group<span class="arrow">·</span></a>,
|
|
a <a href="#dt-negchargroup" class="termref"><span class="arrow">·</span>negative character group<span class="arrow">·</span></a>, or a <a href="#dt-subchargroup" class="termref"><span class="arrow">·</span>character class subtraction<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p>
|
|
|
|
<div class="scrap">
|
|
<table cellpadding="5" border="1" bgcolor="#f5dcb3" width="100%">
|
|
<tbody>
|
|
<tr align="left">
|
|
<td><strong><font color="red">Character Group</font></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<table border="0" bgcolor="#f5dcb3">
|
|
<tbody>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-charGroup"></a><code>[13] </code></td><td><code>charGroup</code></td><td><code> ::= </code></td><td><code>
|
|
<a href="#nt-posCharGroup">posCharGroup</a> |
|
|
<a href="#nt-negCharGroup">negCharGroup</a> |
|
|
<a href="#nt-charClassSub">charClassSub</a>
|
|
</code></td><td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>
|
|
<span class="termdef"><a name="dt-poschargroup">[Definition:] </a>
|
|
A <b>positive character group</b> consists of one or more
|
|
<a href="#dt-charrange" class="termref"><span class="arrow">·</span>character range<span class="arrow">·</span></a>s or <a href="#dt-cces" class="termref"><span class="arrow">·</span>character class escape<span class="arrow">·</span></a>s, concatenated
|
|
together. A <b>positive character group</b> identifies the set of
|
|
characters containing all of the characters in all of the sets identified
|
|
by its constituent ranges or escapes.
|
|
</span>
|
|
</p>
|
|
|
|
<div class="scrap">
|
|
<table cellpadding="5" border="1" bgcolor="#f5dcb3" width="100%">
|
|
<tbody>
|
|
<tr align="left">
|
|
<td><strong><font color="red">Positive Character Group</font></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<table border="0" bgcolor="#f5dcb3">
|
|
<tbody>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-posCharGroup"></a><code>[14] </code></td><td><code>posCharGroup</code></td><td><code> ::= </code></td><td><code>
|
|
(
|
|
<a href="#nt-charRange">charRange</a> | <a href="#nt-charClassEsc">charClassEsc</a>
|
|
)+
|
|
</code></td><td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>
|
|
</p>
|
|
<table border="1">
|
|
<col width="50%" span="1">
|
|
<col width="50%" span="1">
|
|
<thead>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">
|
|
For all <a href="#dt-charrange" class="termref"><span class="arrow">·</span>character range<span class="arrow">·</span></a>s <i>R</i>, all
|
|
<a href="#dt-cces" class="termref"><span class="arrow">·</span>character class escape<span class="arrow">·</span></a>s <i>E</i>, and all
|
|
<a href="#dt-poschargroup" class="termref"><span class="arrow">·</span>positive character group<span class="arrow">·</span></a>s <i>P</i>, valid
|
|
<a href="#dt-poschargroup" class="termref"><span class="arrow">·</span>positive character group<span class="arrow">·</span></a>s <i>G</i> are:
|
|
</th>
|
|
<th rowspan="1" colspan="1">
|
|
Identifying the set of characters <i>C(G)</i> containing:
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><i>R</i></td>
|
|
<td align="center" rowspan="1" colspan="1">all characters in <i>C(R)</i>.</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><i>E</i></td>
|
|
<td align="center" rowspan="1" colspan="1">all characters in <i>C(E)</i>.</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><i>RP</i></td>
|
|
<td align="center" rowspan="1" colspan="1">all characters in <i>C(R)</i> and all
|
|
characters in <i>C(P)</i>.</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><i>EP</i></td>
|
|
<td align="center" rowspan="1" colspan="1">all characters in <i>C(E)</i> and all
|
|
characters in <i>C(P)</i>.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-negchargroup">[Definition:] </a>
|
|
A <b>negative character group</b> is a
|
|
<a href="#dt-poschargroup" class="termref"><span class="arrow">·</span>positive character group<span class="arrow">·</span></a> preceded by the <code>^</code> character.
|
|
For all <a href="#dt-poschargroup" class="termref"><span class="arrow">·</span>positive character group<span class="arrow">·</span></a>s <i>P</i>, ^<i>P</i>
|
|
is a valid <b>negative character group</b>, and <i>C(^P)</i>
|
|
contains all XML characters that are <i>not</i> in <i>C(P)</i>.
|
|
</span>
|
|
</p>
|
|
|
|
<div class="scrap">
|
|
<table cellpadding="5" border="1" bgcolor="#f5dcb3" width="100%">
|
|
<tbody>
|
|
<tr align="left">
|
|
<td><strong><font color="red">Negative Character Group</font></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<table border="0" bgcolor="#f5dcb3">
|
|
<tbody>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-negCharGroup"></a><code>[15] </code></td><td><code>negCharGroup</code></td><td><code> ::= </code></td><td><code>'^' <a href="#nt-posCharGroup">posCharGroup</a></code></td><td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>
|
|
<span class="termdef"><a name="dt-subchargroup">[Definition:] </a>
|
|
A
|
|
<b>character class subtraction</b> is a <a href="#dt-charexpr" class="termref"><span class="arrow">·</span>character class expression<span class="arrow">·</span></a>
|
|
subtracted from a <a href="#dt-poschargroup" class="termref"><span class="arrow">·</span>positive character group<span class="arrow">·</span></a> or
|
|
<a href="#dt-negchargroup" class="termref"><span class="arrow">·</span>negative character group<span class="arrow">·</span></a>, using the <code>-</code> character.
|
|
</span>
|
|
</p>
|
|
<div class="scrap">
|
|
<table cellpadding="5" border="1" bgcolor="#f5dcb3" width="100%">
|
|
<tbody>
|
|
<tr align="left">
|
|
<td><strong><font color="red">Character Class Subtraction</font></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<table border="0" bgcolor="#f5dcb3">
|
|
<tbody>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-charClassSub"></a><code>[16] </code></td><td><code>charClassSub</code></td><td><code> ::= </code></td><td><code>
|
|
( <a href="#nt-posCharGroup">posCharGroup</a> |
|
|
<a href="#nt-negCharGroup">negCharGroup</a> ) '-'
|
|
<a href="#nt-charClassExpr">charClassExpr</a>
|
|
</code></td><td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>
|
|
For any <a href="#dt-poschargroup" class="termref"><span class="arrow">·</span>positive character group<span class="arrow">·</span></a> or
|
|
<a href="#dt-negchargroup" class="termref"><span class="arrow">·</span>negative character group<span class="arrow">·</span></a> <i>G</i>, and any
|
|
<a href="#dt-charexpr" class="termref"><span class="arrow">·</span>character class expression<span class="arrow">·</span></a> <i>C</i>, <i>G-C</i> is a valid
|
|
<a href="#dt-subchargroup" class="termref"><span class="arrow">·</span>character class subtraction<span class="arrow">·</span></a>, identifying the set of all characters in
|
|
<i>C(G)</i> that are not also in <i>C(C)</i>.
|
|
</p>
|
|
|
|
<p>
|
|
<span class="termdef"><a name="dt-charrange">[Definition:] </a>
|
|
A
|
|
<b>character range</b> <i>R</i> identifies a set of
|
|
characters <i>C(R)</i> containing all XML characters with UCS
|
|
code points in a specified range.
|
|
</span>
|
|
</p>
|
|
<div class="scrap">
|
|
<table cellpadding="5" border="1" bgcolor="#f5dcb3" width="100%">
|
|
<tbody>
|
|
<tr align="left">
|
|
<td><strong><font color="red">Character Range</font></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<table border="0" bgcolor="#f5dcb3">
|
|
<tbody>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-charRange"></a><code>[17] </code></td><td><code>charRange</code></td><td><code> ::= </code></td><td><code>
|
|
<a href="#nt-seRange">seRange</a> |
|
|
<a href="#nt-XmlCharRef">XmlCharRef</a> |
|
|
<a href="#nt-XmlCharIncDash">XmlCharIncDash</a>
|
|
</code></td><td></td>
|
|
</tr>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-seRange"></a><code>[18] </code></td><td><code>seRange</code></td><td><code> ::= </code></td><td><code><a href="#nt-charOrEsc">charOrEsc</a> '-' <a href="#nt-charOrEsc">charOrEsc</a></code></td><td></td>
|
|
</tr>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-XmlCharRef"></a><code>[19] </code></td><td><code>XmlCharRef</code></td><td><code> ::= </code></td><td><code>( '&#' [0-9]+ ';' ) | (' &#x' [0-9a-fA-F]+ ';' )</code></td><td></td>
|
|
</tr>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-charOrEsc"></a><code>[20] </code></td><td><code>charOrEsc</code></td><td><code> ::= </code></td><td><code><a href="#nt-XmlChar">XmlChar</a> | <a href="#nt-SingleCharEsc">SingleCharEsc</a></code></td><td></td>
|
|
</tr>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-XmlChar"></a><code>[21] </code></td><td><code>XmlChar</code></td><td><code> ::= </code></td><td><code>[^\#x2D#x5B#x5D]</code></td><td></td>
|
|
</tr>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-XmlCharIncDash"></a><code>[22] </code></td><td><code>XmlCharIncDash</code></td><td><code> ::= </code></td><td><code>[^\#x5B#x5D]</code></td><td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>
|
|
A single XML character is a <a href="#dt-charrange" class="termref"><span class="arrow">·</span>character range<span class="arrow">·</span></a> that identifies
|
|
the set of characters containing only itself. All XML characters are valid
|
|
character ranges, except as follows:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
The <code>[</code>, <code>]</code>, and <code>\</code> characters are not
|
|
valid character ranges;
|
|
|
|
</li>
|
|
<li>
|
|
|
|
The <code>^</code> character is only valid at the beginning of a
|
|
<a href="#dt-poschargroup" class="termref"><span class="arrow">·</span>positive character group<span class="arrow">·</span></a> if it is part of a
|
|
<a href="#dt-negchargroup" class="termref"><span class="arrow">·</span>negative character group<span class="arrow">·</span></a>; and
|
|
|
|
</li>
|
|
<li>
|
|
|
|
The <code>-</code> character is a valid character range only at the
|
|
beginning or end of a <a href="#dt-poschargroup" class="termref"><span class="arrow">·</span>positive character group<span class="arrow">·</span></a>.
|
|
|
|
</li>
|
|
</ul>
|
|
<p>
|
|
A <a href="#dt-charrange" class="termref"><span class="arrow">·</span>character range<span class="arrow">·</span></a> <a href="#dt-may" class="termref"><span class="arrow">·</span>may<span class="arrow">·</span></a> also be written
|
|
in the form <i>s-e</i>, identifying the set that contains all XML characters
|
|
with UCS code points greater than or equal to the code point
|
|
of <i>s</i>, but not greater than the code point of <i>e</i>.
|
|
</p>
|
|
<p>
|
|
<i>s-e</i> is a valid character range iff:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
|
|
<i>s</i> is a <a href="#dt-cces1" class="termref"><span class="arrow">·</span>single character escape<span class="arrow">·</span></a>, or an XML character;
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<i>s</i> is not <code>\</code>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
If s is the first character in a <a href="#dt-charexpr" class="termref"><span class="arrow">·</span>character class expression<span class="arrow">·</span></a>, then
|
|
<i>s</i> is not <code>^</code>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<i>e</i> is a <a href="#dt-cces1" class="termref"><span class="arrow">·</span>single character escape<span class="arrow">·</span></a>, or an XML character;
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<i>e</i> is not <code>\</code> or <code>[</code>; and
|
|
|
|
</li>
|
|
<li>
|
|
|
|
The code point of <i>e</i> is greater than or equal to the code
|
|
point of <i>s</i>;
|
|
|
|
</li>
|
|
</ul>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
The code point of a <a href="#dt-cces1" class="termref"><span class="arrow">·</span>single character escape<span class="arrow">·</span></a> is the code point of the
|
|
single character in the set of characters that it identifies.
|
|
|
|
</blockquote>
|
|
<div class="div3">
|
|
<h4>
|
|
<a name="cces"></a>F.1.1 Character Class Escapes</h4>
|
|
<p>
|
|
<span class="termdef"><a name="dt-cces">[Definition:] </a>
|
|
A <b>character class escape</b> is a short sequence of characters
|
|
that identifies predefined character class. The valid character
|
|
class escapes are the <a href="#dt-cces1" class="termref"><span class="arrow">·</span>single character escape<span class="arrow">·</span></a>s, the
|
|
<a href="#dt-ccesN" class="termref"><span class="arrow">·</span>multi-character escape<span class="arrow">·</span></a>s, and the <a href="#dt-ccescat" class="termref"><span class="arrow">·</span>category escape<span class="arrow">·</span></a>s (including
|
|
the <a href="#dt-ccesblock" class="termref"><span class="arrow">·</span>block escape<span class="arrow">·</span></a>s).
|
|
</span>
|
|
</p>
|
|
<div class="scrap">
|
|
<table cellpadding="5" border="1" bgcolor="#f5dcb3" width="100%">
|
|
<tbody>
|
|
<tr align="left">
|
|
<td><strong><font color="red">Character Class Escape</font></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<table border="0" bgcolor="#f5dcb3">
|
|
<tbody>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-charClassEsc"></a><code>[23] </code></td><td><code>charClassEsc</code></td><td><code> ::= </code></td><td><code>
|
|
(
|
|
<a href="#nt-SingleCharEsc">SingleCharEsc</a> |
|
|
<a href="#nt-MultiCharEsc">MultiCharEsc</a> |
|
|
<a href="#nt-catEsc">catEsc</a> |
|
|
<a href="#nt-complEsc">complEsc</a>
|
|
)
|
|
</code></td><td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>
|
|
<span class="termdef"><a name="dt-cces1">[Definition:] </a>
|
|
A
|
|
<b>single character escape</b> identifies a set containing a only
|
|
one character -- usually because that character is difficult or
|
|
impossible to write directly into a <a href="#dt-regex" class="termref"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p>
|
|
|
|
<div class="scrap">
|
|
<table cellpadding="5" border="1" bgcolor="#f5dcb3" width="100%">
|
|
<tbody>
|
|
<tr align="left">
|
|
<td><strong><font color="red">Single Character Escape</font></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<table border="0" bgcolor="#f5dcb3">
|
|
<tbody>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-SingleCharEsc"></a><code>[24] </code></td><td><code>SingleCharEsc</code></td><td><code> ::= </code></td><td><code>'\' [nrt\|.?*+(){}#x2D#x5B#x5D#x5E]</code></td><td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>
|
|
</p>
|
|
<table border="1">
|
|
<col width="50%" span="1">
|
|
<col width="50%" span="1">
|
|
<thead>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">
|
|
The valid <a href="#dt-cces1" class="termref"><span class="arrow">·</span>single character escape<span class="arrow">·</span></a>s are:
|
|
</th>
|
|
<th rowspan="1" colspan="1">
|
|
Identifying the set of characters <i>C(R)</i> containing:
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><code>\n</code></td>
|
|
<td align="center" rowspan="1" colspan="1">the newline character (#xA)</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><code>\r</code></td>
|
|
<td align="center" rowspan="1" colspan="1">the return character (#xD)</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><code>\t</code></td>
|
|
<td align="center" rowspan="1" colspan="1">the tab character (#x9)</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><code>\\</code></td>
|
|
<td align="center" rowspan="1" colspan="1">\</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><code>\|</code></td>
|
|
<td align="center" rowspan="1" colspan="1">|</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><code>\.</code></td>
|
|
<td align="center" rowspan="1" colspan="1">.</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><code>\-</code></td>
|
|
<td align="center" rowspan="1" colspan="1">-</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><code>\^</code></td>
|
|
<td align="center" rowspan="1" colspan="1">^</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><code>\?</code></td>
|
|
<td align="center" rowspan="1" colspan="1">?</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><code>\*</code></td>
|
|
<td align="center" rowspan="1" colspan="1">*</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><code>\+</code></td>
|
|
<td align="center" rowspan="1" colspan="1">+</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><code>\{</code></td>
|
|
<td align="center" rowspan="1" colspan="1">{</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><code>\}</code></td>
|
|
<td align="center" rowspan="1" colspan="1">}</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><code>\(</code></td>
|
|
<td align="center" rowspan="1" colspan="1">(</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><code>\)</code></td>
|
|
<td align="center" rowspan="1" colspan="1">)</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><code>\[</code></td>
|
|
<td align="center" rowspan="1" colspan="1">[</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1"><code>\]</code></td>
|
|
<td align="center" rowspan="1" colspan="1">]</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>
|
|
<span class="termdef"><a name="dt-ccescat">[Definition:] </a>
|
|
<a href="#UnicodeDB">[Unicode Database]</a> specifies a number of possible
|
|
values for the "General Category" property
|
|
and provides mappings from code points to specific character properties.
|
|
The set containing all characters that have property <code>X</code>,
|
|
can be identified with a <b>category escape</b> <code>\p{X}</code>.
|
|
The complement of this set is specified with the
|
|
<b>category escape</b> <code>\P{X}</code>.
|
|
(<code>[\P{X}]</code> = <code>[^\p{X}]</code>).
|
|
</span>
|
|
</p>
|
|
<div class="scrap">
|
|
<table cellpadding="5" border="1" bgcolor="#f5dcb3" width="100%">
|
|
<tbody>
|
|
<tr align="left">
|
|
<td><strong><font color="red">Category Escape</font></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<table border="0" bgcolor="#f5dcb3">
|
|
<tbody>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-catEsc"></a><code>[25] </code></td><td><code>catEsc</code></td><td><code> ::= </code></td><td><code>'\p{' <a href="#nt-charProp">charProp</a> '}'</code></td><td></td>
|
|
</tr>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-complEsc"></a><code>[26] </code></td><td><code>complEsc</code></td><td><code> ::= </code></td><td><code>'\P{' <a href="#nt-charProp">charProp</a> '}'</code></td><td></td>
|
|
</tr>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-charProp"></a><code>[27] </code></td><td><code>charProp</code></td><td><code> ::= </code></td><td><code><a href="#nt-IsCategory">IsCategory</a> | <a href="#nt-IsBlock">IsBlock</a></code></td><td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
<a href="#UnicodeDB">[Unicode Database]</a> is subject to future revision. For example, the
|
|
mapping from code points to character properties might be updated.
|
|
All <a href="#dt-minimally-conforming" class="termref"><span class="arrow">·</span>minimally conforming<span class="arrow">·</span></a> processors <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a>
|
|
support the character properties defined in the version of <a href="#UnicodeDB">[Unicode Database]</a>
|
|
that is current at the time this specification became a W3C
|
|
Recommendation. However, implementors are encouraged to support the
|
|
character properties defined in any future version.
|
|
|
|
</blockquote>
|
|
<p>
|
|
The following table specifies the recognized values of the
|
|
"General Category" property.
|
|
</p>
|
|
|
|
<table border="1" align="center">
|
|
<tbody>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Category</th>
|
|
<th rowspan="1" colspan="1">Property</th>
|
|
<th rowspan="1" colspan="1">Meaning</th>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="6" colspan="1">Letters</td>
|
|
<td align="center" rowspan="1" colspan="1">L</td>
|
|
<td rowspan="1" colspan="1">All Letters</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Lu</td>
|
|
<td rowspan="1" colspan="1">uppercase</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Ll</td>
|
|
<td rowspan="1" colspan="1">lowercase</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Lt</td>
|
|
<td rowspan="1" colspan="1">titlecase</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Lm</td>
|
|
<td rowspan="1" colspan="1">modifier</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Lo</td>
|
|
<td rowspan="1" colspan="1">other</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" rowspan="1"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="4" colspan="1">Marks</td>
|
|
<td align="center" rowspan="1" colspan="1">M</td>
|
|
<td rowspan="1" colspan="1">All Marks</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Mn</td>
|
|
<td rowspan="1" colspan="1">nonspacing</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Mc</td>
|
|
<td rowspan="1" colspan="1">spacing combining</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Me</td>
|
|
<td rowspan="1" colspan="1">enclosing</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" rowspan="1"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="4" colspan="1">Numbers</td>
|
|
<td align="center" rowspan="1" colspan="1">N</td>
|
|
<td rowspan="1" colspan="1">All Numbers</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Nd</td>
|
|
<td rowspan="1" colspan="1">decimal digit</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Nl</td>
|
|
<td rowspan="1" colspan="1">letter</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">No</td>
|
|
<td rowspan="1" colspan="1">other</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" rowspan="1"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="8" colspan="1">Punctuation</td>
|
|
<td align="center" rowspan="1" colspan="1">P</td>
|
|
<td rowspan="1" colspan="1">All Punctuation</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Pc</td>
|
|
<td rowspan="1" colspan="1">connector</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Pd</td>
|
|
<td rowspan="1" colspan="1">dash</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Ps</td>
|
|
<td rowspan="1" colspan="1">open</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Pe</td>
|
|
<td rowspan="1" colspan="1">close</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Pi</td>
|
|
<td rowspan="1" colspan="1">initial quote
|
|
(may behave like Ps or Pe depending on usage)</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Pf</td>
|
|
<td rowspan="1" colspan="1">final quote
|
|
(may behave like Ps or Pe depending on usage)</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Po</td>
|
|
<td rowspan="1" colspan="1">other</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" rowspan="1"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="4" colspan="1">Separators</td>
|
|
<td align="center" rowspan="1" colspan="1">Z</td>
|
|
<td rowspan="1" colspan="1">All Separators</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Zs</td>
|
|
<td rowspan="1" colspan="1">space</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Zl</td>
|
|
<td rowspan="1" colspan="1">line</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Zp</td>
|
|
<td rowspan="1" colspan="1">paragraph</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" rowspan="1"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="5" colspan="1">Symbols</td>
|
|
<td align="center" rowspan="1" colspan="1">S</td>
|
|
<td rowspan="1" colspan="1">All Symbols</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Sm</td>
|
|
<td rowspan="1" colspan="1">math</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Sc</td>
|
|
<td rowspan="1" colspan="1">currency</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Sk</td>
|
|
<td rowspan="1" colspan="1">modifier</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">So</td>
|
|
<td rowspan="1" colspan="1">other</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" rowspan="1"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="6" colspan="1">Other</td>
|
|
<td align="center" rowspan="1" colspan="1">C</td>
|
|
<td rowspan="1" colspan="1">All Others</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Cc</td>
|
|
<td rowspan="1" colspan="1">control</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Cf</td>
|
|
<td rowspan="1" colspan="1">format</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Co</td>
|
|
<td rowspan="1" colspan="1">private use</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">Cn</td>
|
|
<td rowspan="1" colspan="1">not assigned</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="scrap">
|
|
<table cellpadding="5" border="1" bgcolor="#f5dcb3" width="100%">
|
|
<tbody>
|
|
<tr align="left">
|
|
<td><strong><font color="red">Categories</font></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<table border="0" bgcolor="#f5dcb3">
|
|
<tbody>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-IsCategory"></a><code>[28] </code></td><td><code>IsCategory</code></td><td><code> ::= </code></td><td><code>
|
|
<a href="#nt-Letters">Letters</a> |
|
|
<a href="#nt-Marks">Marks</a> |
|
|
<a href="#nt-Numbers">Numbers</a> |
|
|
<a href="#nt-Punctuation">Punctuation</a> |
|
|
<a href="#nt-Separators">Separators</a> |
|
|
<a href="#nt-Symbols">Symbols</a> |
|
|
<a href="#nt-Others">Others</a>
|
|
</code></td><td></td>
|
|
</tr>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-Letters"></a><code>[29] </code></td><td><code>Letters</code></td><td><code> ::= </code></td><td><code>'L' [ultmo]?</code></td><td></td>
|
|
</tr>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-Marks"></a><code>[30] </code></td><td><code>Marks</code></td><td><code> ::= </code></td><td><code>'M' [nce]?</code></td><td></td>
|
|
</tr>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-Numbers"></a><code>[31] </code></td><td><code>Numbers</code></td><td><code> ::= </code></td><td><code>'N' [dlo]?</code></td><td></td>
|
|
</tr>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-Punctuation"></a><code>[32] </code></td><td><code>Punctuation</code></td><td><code> ::= </code></td><td><code>'P' [cdseifo]?</code></td><td></td>
|
|
</tr>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-Separators"></a><code>[33] </code></td><td><code>Separators</code></td><td><code> ::= </code></td><td><code>'Z' [slp]?</code></td><td></td>
|
|
</tr>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-Symbols"></a><code>[34] </code></td><td><code>Symbols</code></td><td><code> ::= </code></td><td><code>'S' [mcko]?</code></td><td></td>
|
|
</tr>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-Others"></a><code>[35] </code></td><td><code>Others</code></td><td><code> ::= </code></td><td><code>'C' [cfon]?</code></td><td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
The properties mentioned above exclude the <code>Cs</code> property.
|
|
The <code>Cs</code> property identifies "surrogate" characters, which do not
|
|
occur at the level of the "character abstraction" that XML instance documents
|
|
operate on.
|
|
|
|
</blockquote>
|
|
<p>
|
|
<span class="termdef"><a name="dt-ccesblock">[Definition:] </a>
|
|
<a href="#UnicodeDB">[Unicode Database]</a> groups code points into a number of blocks
|
|
such as Basic Latin (i.e., ASCII), Latin-1 Supplement, Hangul Jamo,
|
|
CJK Compatibility, etc.
|
|
The set containing all characters that have block name <code>X</code>
|
|
(with all white space stripped out),
|
|
can be identified with a <b>block escape</b> <code>\p{IsX}</code>.
|
|
The complement of this set is specified with the
|
|
<b>block escape</b> <code>\P{IsX}</code>.
|
|
(<code>[\P{IsX}]</code> = <code>[^\p{IsX}]</code>).
|
|
</span>
|
|
</p>
|
|
<div class="scrap">
|
|
<table cellpadding="5" border="1" bgcolor="#f5dcb3" width="100%">
|
|
<tbody>
|
|
<tr align="left">
|
|
<td><strong><font color="red">Block Escape</font></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<table border="0" bgcolor="#f5dcb3">
|
|
<tbody>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-IsBlock"></a><code>[36] </code></td><td><code>IsBlock</code></td><td><code> ::= </code></td><td><code>'Is' [a-zA-Z0-9#x2D]+</code></td><td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>
|
|
The following table specifies the recognized block names (for more
|
|
information, see the "Blocks.txt" file in <a href="#UnicodeDB">[Unicode Database]</a>).
|
|
</p>
|
|
|
|
<table border="1" align="center" cellpadding="5" class="ubc">
|
|
<tbody>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Start Code</th>
|
|
<th rowspan="1" colspan="1">End Code</th>
|
|
<th rowspan="1" colspan="1">Block Name</th>
|
|
<th rowspan="1" colspan="1"> </th>
|
|
<th rowspan="1" colspan="1">Start Code</th>
|
|
<th rowspan="1" colspan="1">End Code</th>
|
|
<th rowspan="1" colspan="1">Block Name</th>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x0000</td>
|
|
<td rowspan="1" colspan="1">#x007F</td>
|
|
<td rowspan="1" colspan="1">BasicLatin</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x0080</td>
|
|
<td rowspan="1" colspan="1">#x00FF</td>
|
|
<td rowspan="1" colspan="1">Latin-1Supplement</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x0100</td>
|
|
<td rowspan="1" colspan="1">#x017F</td>
|
|
<td rowspan="1" colspan="1">LatinExtended-A</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x0180</td>
|
|
<td rowspan="1" colspan="1">#x024F</td>
|
|
<td rowspan="1" colspan="1">LatinExtended-B</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x0250</td>
|
|
<td rowspan="1" colspan="1">#x02AF</td>
|
|
<td rowspan="1" colspan="1">IPAExtensions</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x02B0</td>
|
|
<td rowspan="1" colspan="1">#x02FF</td>
|
|
<td rowspan="1" colspan="1">SpacingModifierLetters</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x0300</td>
|
|
<td rowspan="1" colspan="1">#x036F</td>
|
|
<td rowspan="1" colspan="1">CombiningDiacriticalMarks</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x0370</td>
|
|
<td rowspan="1" colspan="1">#x03FF</td>
|
|
<td rowspan="1" colspan="1">Greek</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x0400</td>
|
|
<td rowspan="1" colspan="1">#x04FF</td>
|
|
<td rowspan="1" colspan="1">Cyrillic</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x0530</td>
|
|
<td rowspan="1" colspan="1">#x058F</td>
|
|
<td rowspan="1" colspan="1">Armenian</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x0590</td>
|
|
<td rowspan="1" colspan="1">#x05FF</td>
|
|
<td rowspan="1" colspan="1">Hebrew</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x0600</td>
|
|
<td rowspan="1" colspan="1">#x06FF</td>
|
|
<td rowspan="1" colspan="1">Arabic</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x0700</td>
|
|
<td rowspan="1" colspan="1">#x074F</td>
|
|
<td rowspan="1" colspan="1">Syriac</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x0780</td>
|
|
<td rowspan="1" colspan="1">#x07BF</td>
|
|
<td rowspan="1" colspan="1">Thaana</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x0900</td>
|
|
<td rowspan="1" colspan="1">#x097F</td>
|
|
<td rowspan="1" colspan="1">Devanagari</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x0980</td>
|
|
<td rowspan="1" colspan="1">#x09FF</td>
|
|
<td rowspan="1" colspan="1">Bengali</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x0A00</td>
|
|
<td rowspan="1" colspan="1">#x0A7F</td>
|
|
<td rowspan="1" colspan="1">Gurmukhi</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x0A80</td>
|
|
<td rowspan="1" colspan="1">#x0AFF</td>
|
|
<td rowspan="1" colspan="1">Gujarati</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x0B00</td>
|
|
<td rowspan="1" colspan="1">#x0B7F</td>
|
|
<td rowspan="1" colspan="1">Oriya</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x0B80</td>
|
|
<td rowspan="1" colspan="1">#x0BFF</td>
|
|
<td rowspan="1" colspan="1">Tamil</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x0C00</td>
|
|
<td rowspan="1" colspan="1">#x0C7F</td>
|
|
<td rowspan="1" colspan="1">Telugu</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x0C80</td>
|
|
<td rowspan="1" colspan="1">#x0CFF</td>
|
|
<td rowspan="1" colspan="1">Kannada</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x0D00</td>
|
|
<td rowspan="1" colspan="1">#x0D7F</td>
|
|
<td rowspan="1" colspan="1">Malayalam</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x0D80</td>
|
|
<td rowspan="1" colspan="1">#x0DFF</td>
|
|
<td rowspan="1" colspan="1">Sinhala</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x0E00</td>
|
|
<td rowspan="1" colspan="1">#x0E7F</td>
|
|
<td rowspan="1" colspan="1">Thai</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x0E80</td>
|
|
<td rowspan="1" colspan="1">#x0EFF</td>
|
|
<td rowspan="1" colspan="1">Lao</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x0F00</td>
|
|
<td rowspan="1" colspan="1">#x0FFF</td>
|
|
<td rowspan="1" colspan="1">Tibetan</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x1000</td>
|
|
<td rowspan="1" colspan="1">#x109F</td>
|
|
<td rowspan="1" colspan="1">Myanmar</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x10A0</td>
|
|
<td rowspan="1" colspan="1">#x10FF</td>
|
|
<td rowspan="1" colspan="1">Georgian</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x1100</td>
|
|
<td rowspan="1" colspan="1">#x11FF</td>
|
|
<td rowspan="1" colspan="1">HangulJamo</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x1200</td>
|
|
<td rowspan="1" colspan="1">#x137F</td>
|
|
<td rowspan="1" colspan="1">Ethiopic</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x13A0</td>
|
|
<td rowspan="1" colspan="1">#x13FF</td>
|
|
<td rowspan="1" colspan="1">Cherokee</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x1400</td>
|
|
<td rowspan="1" colspan="1">#x167F</td>
|
|
<td rowspan="1" colspan="1">UnifiedCanadianAboriginalSyllabics</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x1680</td>
|
|
<td rowspan="1" colspan="1">#x169F</td>
|
|
<td rowspan="1" colspan="1">Ogham</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x16A0</td>
|
|
<td rowspan="1" colspan="1">#x16FF</td>
|
|
<td rowspan="1" colspan="1">Runic</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x1780</td>
|
|
<td rowspan="1" colspan="1">#x17FF</td>
|
|
<td rowspan="1" colspan="1">Khmer</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x1800</td>
|
|
<td rowspan="1" colspan="1">#x18AF</td>
|
|
<td rowspan="1" colspan="1">Mongolian</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x1E00</td>
|
|
<td rowspan="1" colspan="1">#x1EFF</td>
|
|
<td rowspan="1" colspan="1">LatinExtendedAdditional</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x1F00</td>
|
|
<td rowspan="1" colspan="1">#x1FFF</td>
|
|
<td rowspan="1" colspan="1">GreekExtended</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x2000</td>
|
|
<td rowspan="1" colspan="1">#x206F</td>
|
|
<td rowspan="1" colspan="1">GeneralPunctuation</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x2070</td>
|
|
<td rowspan="1" colspan="1">#x209F</td>
|
|
<td rowspan="1" colspan="1">SuperscriptsandSubscripts</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x20A0</td>
|
|
<td rowspan="1" colspan="1">#x20CF</td>
|
|
<td rowspan="1" colspan="1">CurrencySymbols</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x20D0</td>
|
|
<td rowspan="1" colspan="1">#x20FF</td>
|
|
<td rowspan="1" colspan="1">CombiningMarksforSymbols</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x2100</td>
|
|
<td rowspan="1" colspan="1">#x214F</td>
|
|
<td rowspan="1" colspan="1">LetterlikeSymbols</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x2150</td>
|
|
<td rowspan="1" colspan="1">#x218F</td>
|
|
<td rowspan="1" colspan="1">NumberForms</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x2190</td>
|
|
<td rowspan="1" colspan="1">#x21FF</td>
|
|
<td rowspan="1" colspan="1">Arrows</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x2200</td>
|
|
<td rowspan="1" colspan="1">#x22FF</td>
|
|
<td rowspan="1" colspan="1">MathematicalOperators</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x2300</td>
|
|
<td rowspan="1" colspan="1">#x23FF</td>
|
|
<td rowspan="1" colspan="1">MiscellaneousTechnical</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x2400</td>
|
|
<td rowspan="1" colspan="1">#x243F</td>
|
|
<td rowspan="1" colspan="1">ControlPictures</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x2440</td>
|
|
<td rowspan="1" colspan="1">#x245F</td>
|
|
<td rowspan="1" colspan="1">OpticalCharacterRecognition</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x2460</td>
|
|
<td rowspan="1" colspan="1">#x24FF</td>
|
|
<td rowspan="1" colspan="1">EnclosedAlphanumerics</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x2500</td>
|
|
<td rowspan="1" colspan="1">#x257F</td>
|
|
<td rowspan="1" colspan="1">BoxDrawing</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x2580</td>
|
|
<td rowspan="1" colspan="1">#x259F</td>
|
|
<td rowspan="1" colspan="1">BlockElements</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x25A0</td>
|
|
<td rowspan="1" colspan="1">#x25FF</td>
|
|
<td rowspan="1" colspan="1">GeometricShapes</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x2600</td>
|
|
<td rowspan="1" colspan="1">#x26FF</td>
|
|
<td rowspan="1" colspan="1">MiscellaneousSymbols</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x2700</td>
|
|
<td rowspan="1" colspan="1">#x27BF</td>
|
|
<td rowspan="1" colspan="1">Dingbats</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x2800</td>
|
|
<td rowspan="1" colspan="1">#x28FF</td>
|
|
<td rowspan="1" colspan="1">BraillePatterns</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x2E80</td>
|
|
<td rowspan="1" colspan="1">#x2EFF</td>
|
|
<td rowspan="1" colspan="1">CJKRadicalsSupplement</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x2F00</td>
|
|
<td rowspan="1" colspan="1">#x2FDF</td>
|
|
<td rowspan="1" colspan="1">KangxiRadicals</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x2FF0</td>
|
|
<td rowspan="1" colspan="1">#x2FFF</td>
|
|
<td rowspan="1" colspan="1">IdeographicDescriptionCharacters</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x3000</td>
|
|
<td rowspan="1" colspan="1">#x303F</td>
|
|
<td rowspan="1" colspan="1">CJKSymbolsandPunctuation</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x3040</td>
|
|
<td rowspan="1" colspan="1">#x309F</td>
|
|
<td rowspan="1" colspan="1">Hiragana</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x30A0</td>
|
|
<td rowspan="1" colspan="1">#x30FF</td>
|
|
<td rowspan="1" colspan="1">Katakana</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x3100</td>
|
|
<td rowspan="1" colspan="1">#x312F</td>
|
|
<td rowspan="1" colspan="1">Bopomofo</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x3130</td>
|
|
<td rowspan="1" colspan="1">#x318F</td>
|
|
<td rowspan="1" colspan="1">HangulCompatibilityJamo</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x3190</td>
|
|
<td rowspan="1" colspan="1">#x319F</td>
|
|
<td rowspan="1" colspan="1">Kanbun</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x31A0</td>
|
|
<td rowspan="1" colspan="1">#x31BF</td>
|
|
<td rowspan="1" colspan="1">BopomofoExtended</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x3200</td>
|
|
<td rowspan="1" colspan="1">#x32FF</td>
|
|
<td rowspan="1" colspan="1">EnclosedCJKLettersandMonths</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x3300</td>
|
|
<td rowspan="1" colspan="1">#x33FF</td>
|
|
<td rowspan="1" colspan="1">CJKCompatibility</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x3400</td>
|
|
<td rowspan="1" colspan="1">#x4DB5</td>
|
|
<td rowspan="1" colspan="1">CJKUnifiedIdeographsExtensionA</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x4E00</td>
|
|
<td rowspan="1" colspan="1">#x9FFF</td>
|
|
<td rowspan="1" colspan="1">CJKUnifiedIdeographs</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#xA000</td>
|
|
<td rowspan="1" colspan="1">#xA48F</td>
|
|
<td rowspan="1" colspan="1">YiSyllables</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#xA490</td>
|
|
<td rowspan="1" colspan="1">#xA4CF</td>
|
|
<td rowspan="1" colspan="1">YiRadicals</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#xAC00</td>
|
|
<td rowspan="1" colspan="1">#xD7A3</td>
|
|
<td rowspan="1" colspan="1">HangulSyllables</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#xD800</td>
|
|
<td rowspan="1" colspan="1">#xDB7F</td>
|
|
<td rowspan="1" colspan="1">HighSurrogates</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#xDB80</td>
|
|
<td rowspan="1" colspan="1">#xDBFF</td>
|
|
<td rowspan="1" colspan="1">HighPrivateUseSurrogates</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#xDC00</td>
|
|
<td rowspan="1" colspan="1">#xDFFF</td>
|
|
<td rowspan="1" colspan="1">LowSurrogates</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#xE000</td>
|
|
<td rowspan="1" colspan="1">#xF8FF</td>
|
|
<td rowspan="1" colspan="1">PrivateUse</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#xF900</td>
|
|
<td rowspan="1" colspan="1">#xFAFF</td>
|
|
<td rowspan="1" colspan="1">CJKCompatibilityIdeographs</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#xFB00</td>
|
|
<td rowspan="1" colspan="1">#xFB4F</td>
|
|
<td rowspan="1" colspan="1">AlphabeticPresentationForms</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#xFB50</td>
|
|
<td rowspan="1" colspan="1">#xFDFF</td>
|
|
<td rowspan="1" colspan="1">ArabicPresentationForms-A</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#xFE20</td>
|
|
<td rowspan="1" colspan="1">#xFE2F</td>
|
|
<td rowspan="1" colspan="1">CombiningHalfMarks</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#xFE30</td>
|
|
<td rowspan="1" colspan="1">#xFE4F</td>
|
|
<td rowspan="1" colspan="1">CJKCompatibilityForms</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#xFE50</td>
|
|
<td rowspan="1" colspan="1">#xFE6F</td>
|
|
<td rowspan="1" colspan="1">SmallFormVariants</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#xFE70</td>
|
|
<td rowspan="1" colspan="1">#xFEFE</td>
|
|
<td rowspan="1" colspan="1">ArabicPresentationForms-B</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#xFEFF</td>
|
|
<td rowspan="1" colspan="1">#xFEFF</td>
|
|
<td rowspan="1" colspan="1">Specials</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#xFF00</td>
|
|
<td rowspan="1" colspan="1">#xFFEF</td>
|
|
<td rowspan="1" colspan="1">HalfwidthandFullwidthForms</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#xFFF0</td>
|
|
<td rowspan="1" colspan="1">#xFFFD</td>
|
|
<td rowspan="1" colspan="1">Specials</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x10300</td>
|
|
<td rowspan="1" colspan="1">#x1032F</td>
|
|
<td rowspan="1" colspan="1">OldItalic</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x10330</td>
|
|
<td rowspan="1" colspan="1">#x1034F</td>
|
|
<td rowspan="1" colspan="1">Gothic</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x10400</td>
|
|
<td rowspan="1" colspan="1">#x1044F</td>
|
|
<td rowspan="1" colspan="1">Deseret</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x1D000</td>
|
|
<td rowspan="1" colspan="1">#x1D0FF</td>
|
|
<td rowspan="1" colspan="1">ByzantineMusicalSymbols</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x1D100</td>
|
|
<td rowspan="1" colspan="1">#x1D1FF</td>
|
|
<td rowspan="1" colspan="1">MusicalSymbols</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x1D400</td>
|
|
<td rowspan="1" colspan="1">#x1D7FF</td>
|
|
<td rowspan="1" colspan="1">MathematicalAlphanumericSymbols</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x20000</td>
|
|
<td rowspan="1" colspan="1">#x2A6D6</td>
|
|
<td rowspan="1" colspan="1">CJKUnifiedIdeographsExtensionB</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#x2F800</td>
|
|
<td rowspan="1" colspan="1">#x2FA1F</td>
|
|
<td rowspan="1" colspan="1">CJKCompatibilityIdeographsSupplement</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#xE0000</td>
|
|
<td rowspan="1" colspan="1">#xE007F</td>
|
|
<td rowspan="1" colspan="1">Tags</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1">#xF0000</td>
|
|
<td rowspan="1" colspan="1">#xFFFFD</td>
|
|
<td rowspan="1" colspan="1">PrivateUse</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">#x100000</td>
|
|
<td rowspan="1" colspan="1">#x10FFFD</td>
|
|
<td rowspan="1" colspan="1">PrivateUse</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
<a href="#UnicodeDB">[Unicode Database]</a> is subject to future revision.
|
|
For example, the
|
|
grouping of code points into blocks might be updated.
|
|
All <a href="#dt-minimally-conforming" class="termref"><span class="arrow">·</span>minimally conforming<span class="arrow">·</span></a> processors <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a>
|
|
support the blocks defined in the version of <a href="#UnicodeDB">[Unicode Database]</a>
|
|
that is current at the time this specification became a W3C
|
|
Recommendation. However, implementors are encouraged to support the
|
|
blocks defined in any future version of the Unicode Standard.
|
|
|
|
</blockquote>
|
|
<p>
|
|
For example, the <a href="#dt-ccesblock" class="termref"><span class="arrow">·</span>block escape<span class="arrow">·</span></a> for identifying the
|
|
ASCII characters is <code>\p{IsBasicLatin}</code>.
|
|
</p>
|
|
<p>
|
|
<span class="termdef"><a name="dt-ccesN">[Definition:] </a>
|
|
A
|
|
<b>multi-character escape</b> provides a simple way to identify
|
|
a commonly used set of characters:
|
|
</span>
|
|
</p>
|
|
<div class="scrap">
|
|
<table cellpadding="5" border="1" bgcolor="#f5dcb3" width="100%">
|
|
<tbody>
|
|
<tr align="left">
|
|
<td><strong><font color="red">Multi-Character Escape</font></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<table border="0" bgcolor="#f5dcb3">
|
|
<tbody>
|
|
<tr valign="baseline">
|
|
<td><a name="nt-MultiCharEsc"></a><code>[37] </code></td><td><code>MultiCharEsc</code></td><td><code> ::= </code></td><td><code>'.' | ('\' [sSiIcCdDwW])</code></td><td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>
|
|
</p>
|
|
<table border="1" align="center" cellpadding="5">
|
|
<col width="33%" span="1">
|
|
<col width="33%" span="1">
|
|
<col width="33%" span="1">
|
|
<thead>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Character sequence</th>
|
|
|
|
<th rowspan="1" colspan="1">Equivalent <a href="#dt-charclass" class="termref"><span class="arrow">·</span>character class<span class="arrow">·</span></a></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">.</td>
|
|
|
|
<td align="center" rowspan="1" colspan="1">[^\n\r]</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">\s</td>
|
|
|
|
<td align="center" rowspan="1" colspan="1">[#x20\t\n\r]</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">\S</td>
|
|
|
|
<td align="center" rowspan="1" colspan="1">[^\s]</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">\i</td>
|
|
|
|
<td align="center" rowspan="1" colspan="1">
|
|
the set of initial name characters, those
|
|
<a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a>ed by
|
|
<a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-Letter">Letter</a> | '_' | ':'</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">\I</td>
|
|
|
|
<td align="center" rowspan="1" colspan="1">[^\i]</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">\c</td>
|
|
|
|
<td align="center" rowspan="1" colspan="1">
|
|
|
|
the set of name characters, those
|
|
<a href="#dt-match" class="termref"><span class="arrow">·</span>match<span class="arrow">·</span></a>ed by
|
|
<a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-NameChar">NameChar</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">\C</td>
|
|
|
|
<td align="center" rowspan="1" colspan="1">[^\c]</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">\d</td>
|
|
|
|
<td align="center" rowspan="1" colspan="1">\p{Nd}</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">\D</td>
|
|
|
|
<td align="center" rowspan="1" colspan="1">[^\d]</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">\w</td>
|
|
|
|
<td align="center" rowspan="1" colspan="1">
|
|
[#x0000-#x10FFFF]-[\p{P}\p{Z}\p{C}]
|
|
(<i>all characters except the set of "punctuation",
|
|
"separator" and "other" characters</i>)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" rowspan="1" colspan="1">\W</td>
|
|
|
|
<td align="center" rowspan="1" colspan="1">[^\w]</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<blockquote>
|
|
<b>NOTE: </b>
|
|
|
|
The <a href="#dt-regex" class="termref"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a> language defined here does not
|
|
attempt to provide a general solution to "regular expressions" over
|
|
UCS character sequences. In particular, it does not easily provide
|
|
for matching sequences of base characters and combining marks.
|
|
The language is targeted at support of "Level 1" features as defined in
|
|
<a href="#unicodeRegEx">[Unicode Regular Expression Guidelines]</a>. It is hoped that future versions of this
|
|
specification will provide support for "Level 2" features.
|
|
|
|
</blockquote>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="div1">
|
|
<h2>
|
|
<a name="normative-glossary"></a>G Glossary (non-normative)</h2>
|
|
<p>The listing below is for the benefit of readers of a printed version of this
|
|
document: it collects together all the definitions which appear in the
|
|
document above.</p>
|
|
<dl>
|
|
<dt>
|
|
<a href="#dt-atomic">atomic</a>
|
|
</dt>
|
|
<dd>
|
|
<b>Atomic</b> datatypes
|
|
are those having values which are regarded by this specification as
|
|
being indivisible.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-basetype">base type</a>
|
|
</dt>
|
|
<dd>Every
|
|
datatype that is <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> by <b>restriction</b>
|
|
is defined in terms of an existing datatype, referred to as its
|
|
<b>base type</b>. <b>base type</b>s can be either
|
|
<a href="#dt-primitive" class="termref"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> or <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-bounded">bounded</a>
|
|
</dt>
|
|
<dd>A datatype is <b>bounded</b>
|
|
if its <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> has either an
|
|
<a href="#dt-inclusive-upper-bound" class="termref"><span class="arrow">·</span>inclusive upper bound<span class="arrow">·</span></a> or an <a href="#dt-exclusive-upper-bound" class="termref"><span class="arrow">·</span>exclusive upper bound<span class="arrow">·</span></a>
|
|
and either an <a href="#dt-inclusive-lower-bound" class="termref"><span class="arrow">·</span>inclusive lower bound<span class="arrow">·</span></a> and an
|
|
<a href="#dt-exclusive-lower-bound" class="termref"><span class="arrow">·</span>exclusive lower bound<span class="arrow">·</span></a>.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-built-in">built-in</a>
|
|
</dt>
|
|
<dd>
|
|
<b>Built-in</b>
|
|
datatypes are those which are defined in this specification,
|
|
and can be either <a href="#dt-primitive" class="termref"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> or
|
|
<a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>;
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-canonical-representation">canonical lexical representation</a>
|
|
</dt>
|
|
<dd>A <b>canonical lexical representation</b>
|
|
is a set of literals from among the valid set of literals
|
|
for a datatype such that there is a one-to-one mapping between literals
|
|
in the <b>canonical lexical representation</b> and
|
|
values in the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-cardinality">cardinality</a>
|
|
</dt>
|
|
<dd>Every
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> has associated with it the concept of
|
|
<b>cardinality</b>. Some <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s
|
|
are finite, some are countably infinite while still others could
|
|
conceivably be uncountably infinite (although no <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
defined by this specification is uncountable infinite). A datatype is
|
|
said to have the cardinality of its
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-interchange">conformance to the XML Representation of Schemas</a>
|
|
</dt>
|
|
<dd>
|
|
Processors which accept schemas in the form of XML documents as described
|
|
in <a href="#xr-defn">XML Representation of Simple Type Definition Schema Components (§4.1.2)</a> (and other relevant portions of
|
|
<a href="#datatype-components">Datatype components (§4)</a>) are additionally said to provide
|
|
<b>conformance to the XML Representation of Schemas</b>,
|
|
and <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a>, when processing schema documents, completely and
|
|
correctly implement all
|
|
<a href="#dt-src" class="termref"><span class="arrow">·</span>Schema Representation Constraint<span class="arrow">·</span></a>s
|
|
in this specification, and <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a> adhere exactly to the
|
|
specifications in <a href="#xr-defn">XML Representation of Simple Type Definition Schema Components (§4.1.2)</a> (and other relevant portions of
|
|
<a href="#datatype-components">Datatype components (§4)</a>) for mapping
|
|
the contents of such
|
|
documents to <a class="xtermref" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-component">schema components</a>
|
|
for use in validation.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-constraining-facet">constraining facet</a>
|
|
</dt>
|
|
<dd>A
|
|
<b>constraining facet</b> is an optional property that can be
|
|
applied to a datatype to constrain its <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-cos">Constraint on Schemas</a>
|
|
</dt>
|
|
<dd>
|
|
<b>Constraint on Schemas</b>
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-datatype">datatype</a>
|
|
</dt>
|
|
<dd>In this specification,
|
|
a <b>datatype</b> is a 3-tuple, consisting of
|
|
a) a set of distinct values, called its <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>,
|
|
b) a set of lexical representations, called its
|
|
<a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>, and c) a set of <a href="#dt-facet" class="termref"><span class="arrow">·</span>facet<span class="arrow">·</span></a>s
|
|
that characterize properties of the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>,
|
|
individual values or lexical items.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-derived">derived</a>
|
|
</dt>
|
|
<dd>
|
|
<b>Derived</b>
|
|
datatypes are those that are defined in terms of other datatypes.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-error">error</a>
|
|
</dt>
|
|
<dd>
|
|
<b>error</b>
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-exclusive-lower-bound">exclusive lower bound</a>
|
|
</dt>
|
|
<dd>
|
|
A value <i>l</i> in an <a href="#dt-ordered" class="termref"><span class="arrow">·</span>ordered<span class="arrow">·</span></a>
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <i>L</i>
|
|
is said to be an <b>exclusive lower bound</b> of a
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <i>V</i>
|
|
(where <i>V</i> is a subset of <i>L</i>)
|
|
if for all <i>v</i> in <i>V</i>,
|
|
<i>l</i> < <i>v</i>.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-exclusive-upper-bound">exclusive upper bound</a>
|
|
</dt>
|
|
<dd>
|
|
A value <i>u</i> in an <a href="#dt-ordered" class="termref"><span class="arrow">·</span>ordered<span class="arrow">·</span></a>
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <i>U</i>
|
|
is said to be an <b>exclusive upper bound</b> of a
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <i>V</i>
|
|
(where <i>V</i> is a subset of <i>U</i>)
|
|
if for all <i>v</i> in <i>V</i>,
|
|
<i>u</i> > <i>v</i>.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-facet">facet</a>
|
|
</dt>
|
|
<dd>A <b>facet</b> is a single
|
|
defining aspect of a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>. Generally
|
|
speaking, each facet characterizes a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
along independent axes or dimensions.</dd>
|
|
<dt>
|
|
<a href="#dt-compatibility">for compatibility</a>
|
|
</dt>
|
|
<dd>
|
|
for compatibility</dd>
|
|
<dt>
|
|
<a href="#dt-fundamental-facet">fundamental facet</a>
|
|
</dt>
|
|
<dd>
|
|
A <b>fundamental facet</b> is an abstract property which
|
|
serves to semantically characterize the values in a
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-inclusive-lower-bound">inclusive lower bound</a>
|
|
</dt>
|
|
<dd>
|
|
A value <i>l</i> in an <a href="#dt-ordered" class="termref"><span class="arrow">·</span>ordered<span class="arrow">·</span></a>
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <i>L</i>
|
|
is said to be an <b>inclusive lower bound</b> of a
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <i>V</i>
|
|
(where <i>V</i> is a subset of <i>L</i>)
|
|
if for all <i>v</i> in <i>V</i>,
|
|
<i>l</i> <= <i>v</i>.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-inclusive-upper-bound">inclusive upper bound</a>
|
|
</dt>
|
|
<dd>
|
|
A value <i>u</i> in an <a href="#dt-ordered" class="termref"><span class="arrow">·</span>ordered<span class="arrow">·</span></a>
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <i>U</i>
|
|
is said to be an <b>inclusive upper bound</b> of a
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <i>V</i>
|
|
(where <i>V</i> is a subset of <i>U</i>)
|
|
if for all <i>v</i> in <i>V</i>,
|
|
<i>u</i> >= <i>v</i>.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-itemType">itemType</a>
|
|
</dt>
|
|
<dd>
|
|
The <a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> datatype that participates in the
|
|
definition of a <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype is known as the
|
|
<b>itemType</b> of that <a href="#dt-list" class="termref"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-lexical-space">lexical space</a>
|
|
</dt>
|
|
<dd>A
|
|
<b>lexical space</b> is the set of valid <i>literals</i>
|
|
for a datatype.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-list">list</a>
|
|
</dt>
|
|
<dd>
|
|
<b>List</b>
|
|
datatypes are those having values each of which consists of a
|
|
finite-length (possibly empty) sequence of values of an
|
|
<a href="#dt-atomic" class="termref"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> datatype.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-match">match</a>
|
|
</dt>
|
|
<dd>
|
|
<b>match</b>
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-may">may</a>
|
|
</dt>
|
|
<dd>
|
|
<b>may</b>
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-memberTypes">memberTypes</a>
|
|
</dt>
|
|
<dd>
|
|
The datatypes that participate in the
|
|
definition of a <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a> datatype are known as the
|
|
<b>memberTypes</b> of that <a href="#dt-union" class="termref"><span class="arrow">·</span>union<span class="arrow">·</span></a> datatype.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-minimally-conforming">minimally conforming</a>
|
|
</dt>
|
|
<dd>
|
|
<b>Minimally conforming</b> processors <a href="#dt-must" class="termref"><span class="arrow">·</span>must<span class="arrow">·</span></a>
|
|
completely and correctly implement the <a href="#dt-cos" class="termref"><span class="arrow">·</span>Constraint on Schemas<span class="arrow">·</span></a> and
|
|
<a href="#dt-cvc" class="termref"><span class="arrow">·</span>Validation Rule<span class="arrow">·</span></a>
|
|
.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-must">must</a>
|
|
</dt>
|
|
<dd>
|
|
<b>must</b>
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-non-numeric">non-numeric</a>
|
|
</dt>
|
|
<dd>A datatype whose values
|
|
are not <a href="#dt-numeric" class="termref"><span class="arrow">·</span>numeric<span class="arrow">·</span></a> is said to be
|
|
<b>non-numeric</b>.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-numeric">numeric</a>
|
|
</dt>
|
|
<dd>A datatype is said to be
|
|
<b>numeric</b> if its values are conceptually quantities (in some
|
|
mathematical number system).
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-ordered">ordered</a>
|
|
</dt>
|
|
<dd>A
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>, and hence a datatype, is said to be
|
|
<b>ordered</b> if there exists an
|
|
<a href="#dt-order-relation" class="termref"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a> defined for that
|
|
<a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-order-relation">order-relation</a>
|
|
</dt>
|
|
<dd>An
|
|
<b>order relation</b> on a <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
is a mathematical relation that imposes a
|
|
<a href="#dt-total-order" class="termref"><span class="arrow">·</span>total order<span class="arrow">·</span></a> or a <a href="#dt-partial-order" class="termref"><span class="arrow">·</span>partial order<span class="arrow">·</span></a> on the
|
|
members of the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-partial-order">partial order</a>
|
|
</dt>
|
|
<dd>
|
|
A <b>partial order</b> is an <a href="#dt-order-relation" class="termref"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a>
|
|
that is <b>irreflexive</b>, <b>asymmetric</b> and
|
|
<b>transitive</b>.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-primitive">primitive</a>
|
|
</dt>
|
|
<dd>
|
|
<b>Primitive</b>
|
|
datatypes are those that are not defined in terms of other datatypes;
|
|
they exist <i>ab initio</i>.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-regex">regular expression</a>
|
|
</dt>
|
|
<dd>A
|
|
<b>regular expression</b> is composed from zero or more
|
|
<a href="#dt-branch" class="termref"><span class="arrow">·</span>branch<span class="arrow">·</span></a>es, separated by <code>|</code> characters.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-restriction">restriction</a>
|
|
</dt>
|
|
<dd>A datatype is said to be
|
|
<a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a> by <b>restriction</b> from another datatype
|
|
when values for zero or more <a href="#dt-constraining-facet" class="termref"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s are specified
|
|
that serve to constrain its <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a> and/or its
|
|
<a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> to a subset of those of its
|
|
<a href="#dt-basetype" class="termref"><span class="arrow">·</span>base type<span class="arrow">·</span></a>.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-src">Schema Representation Constraint</a>
|
|
</dt>
|
|
<dd>
|
|
<b>Schema Representation Constraint</b>
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-total-order">total order</a>
|
|
</dt>
|
|
<dd>
|
|
A <b>total order</b> is an <a href="#dt-partial-order" class="termref"><span class="arrow">·</span>partial order<span class="arrow">·</span></a>
|
|
such that for no <i>a</i> and <i>b</i>
|
|
is it the case that <i>a <> b</i>.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-union">union</a>
|
|
</dt>
|
|
<dd>
|
|
<b>Union</b>
|
|
datatypes are those whose <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s and
|
|
<a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>s are the union of
|
|
the <a href="#dt-value-space" class="termref"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s and
|
|
<a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>s of one or more other datatypes.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-user-derived">user-derived</a>
|
|
</dt>
|
|
<dd>
|
|
<b>User-derived</b> datatypes are those <a href="#dt-derived" class="termref"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
datatypes that are defined by individual schema designers.
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-cvc">Validation Rule</a>
|
|
</dt>
|
|
<dd>
|
|
<b>Validation Rule</b>
|
|
</dd>
|
|
<dt>
|
|
<a href="#dt-value-space">value space</a>
|
|
</dt>
|
|
<dd>A <b>value
|
|
space</b> is the set of values for a given datatype.
|
|
Each value in the <b>value space</b> of a datatype is denoted by
|
|
one or more literals in its <a href="#dt-lexical-space" class="termref"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>.
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
<div class="div1">
|
|
<h2>
|
|
<a name="biblio"></a>H References</h2>
|
|
|
|
<div class="div2">
|
|
<h3>
|
|
<span class="nav"> <a href="#non-normative-biblio" class="nav"><img alt="next sub-section" src="next.jpg"></a></span><a name="normative-biblio"></a>H.1 Normative</h3>
|
|
<dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt>
|
|
<b><a name="clinger1990">Clinger, WD (1990)</a></b>
|
|
</dt>
|
|
<dd>
|
|
William D Clinger. <i>How to Read Floating Point Numbers Accurately.</i>
|
|
In <i>Proceedings of Conference on Programming Language Design and
|
|
Implementation</i>, pages 92-101.
|
|
Available at: <a href="ftp://ftp.ccs.neu.edu/pub/people/will/howtoread.ps">
|
|
ftp://ftp.ccs.neu.edu/pub/people/will/howtoread.ps</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="ieee754">IEEE 754-1985</a></b>
|
|
</dt>
|
|
<dd>
|
|
IEEE. <i>IEEE Standard for Binary Floating-Point Arithmetic.</i>
|
|
See <a 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</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="XMLNS">Namespaces in XML</a></b>
|
|
</dt>
|
|
<dd>
|
|
World Wide Web Consortium. <i>Namespaces in XML</i>. Available at:
|
|
<a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/">http://www.w3.org/TR/1999/REC-xml-names-19990114/</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="RFC1766">RFC 1766</a></b>
|
|
</dt>
|
|
<dd>
|
|
H. Alvestrand, ed. <i>RFC 1766: Tags for the Identification of Languages</i>
|
|
1995. Available at: <a href="http://www.ietf.org/rfc/rfc1766.txt">
|
|
http://www.ietf.org/rfc/rfc1766.txt</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="RFC2045">RFC 2045</a></b>
|
|
</dt>
|
|
<dd>
|
|
N. Freed and N. Borenstein. <i>RFC 2045: Multipurpose Internet Mail Extensions
|
|
(MIME) Part One: Format of Internet Message Bodies</i>. 1996. Available at:
|
|
<a href="http://www.ietf.org/rfc/rfc2045.txt">
|
|
http://www.ietf.org/rfc/rfc2045.txt</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="RFC2396">RFC 2396</a></b>
|
|
</dt>
|
|
<dd>
|
|
Tim Berners-Lee, et. al. <i>RFC 2396: Uniform Resource Identifiers (URI):
|
|
Generic Syntax.</i>. 1998. Available at:
|
|
<a href="http://www.ietf.org/rfc/rfc2396.txt">
|
|
http://www.ietf.org/rfc/rfc2396.txt</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="RFC2732">RFC 2732</a></b>
|
|
</dt>
|
|
<dd>
|
|
<i>RFC
|
|
2732: Format for Literal IPv6 Addresses in URL's</i>. 1999.
|
|
Available at:
|
|
<a href="http://www.ietf.org/rfc/rfc2732.txt">
|
|
http://www.ietf.org/rfc/rfc2732.txt</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="UnicodeDB">Unicode Database</a></b>
|
|
</dt>
|
|
<dd>
|
|
The Unicode Consortium. <i>The Unicode Character Database</i>.
|
|
Available at: <a href="http://www.unicode.org/Public/3.1-Update/UnicodeCharacterDatabase-3.1.0.html">
|
|
http://www.unicode.org/Public/3.1-Update/UnicodeCharacterDatabase-3.1.0.html</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="XML">XML 1.0 (Second Edition)</a></b>
|
|
</dt>
|
|
<dd>
|
|
World Wide Web Consortium. <i>Extensible Markup Language (XML) 1.0, Second
|
|
Edition.</i>
|
|
Available at: <a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814">http://www.w3.org/TR/2000/WD-xml-2e-20000814</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="XLink">XML Linking Language</a></b>
|
|
</dt>
|
|
<dd>
|
|
World Wide Web Consortium. XML Linking Language (XLink).
|
|
Available at: <a href="http://www.w3.org/TR/2000/PR-xlink-20001220/">
|
|
http://www.w3.org/TR/2000/PR-xlink-20001220/</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="structural-schemas">XML Schema Part 1: Structures</a></b>
|
|
</dt>
|
|
<dd>
|
|
XML Schema Part 1: Structures. Available at: <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/">
|
|
http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="schema-requirements">XML Schema Requirements</a></b>
|
|
</dt>
|
|
<dd>
|
|
World Wide Web Consortium. XML Schema Requirements. Available at:
|
|
<a href="http://www.w3.org/TR/1999/NOTE-xml-schema-req-19990215">
|
|
http://www.w3.org/TR/1999/NOTE-xml-schema-req-19990215</a>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="div2">
|
|
<h3>
|
|
<span class="nav"><a href="#normative-biblio" class="nav"><img alt="previous sub-section" src="previous.jpg"></a> </span><a name="non-normative-biblio"></a>H.2 Non-normative</h3>
|
|
<dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt>
|
|
<b><a name="CharMod">Character Model</a></b>
|
|
</dt>
|
|
<dd>
|
|
Martin J. Dürst and François Yergeau, eds.
|
|
Character Model for the World Wide Web. World Wide Web Consortium
|
|
Working Draft. 2001.
|
|
Available at:
|
|
<a href="http://www.w3.org/TR/2001/WD-charmod-20010126/">http://www.w3.org/TR/2001/WD-charmod-20010126/</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="gay1990">Gay, DM (1990)</a></b>
|
|
</dt>
|
|
<dd>
|
|
David M. Gay. <i>Correctly Rounded Binary-Decimal and
|
|
Decimal-Binary Conversions.</i> AT&T Bell Laboratories Numerical
|
|
Analysis Manuscript 90-10, November 1990.
|
|
Available at:
|
|
<a href="http://cm.bell-labs.com/cm/cs/doc/90/4-10.ps.gz">
|
|
http://cm.bell-labs.com/cm/cs/doc/90/4-10.ps.gz</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="html4">HTML 4.01</a></b>
|
|
</dt>
|
|
<dd>
|
|
World Wide Web Consortium. Hypertext Markup Language, version 4.01. Available at:
|
|
<a href="http://www.w3.org/TR/1999/REC-html401-19991224/">
|
|
http://www.w3.org/TR/1999/REC-html401-19991224/</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="draft-masinter-url-i18n-07">IETF INTERNET-DRAFT: IRIs</a></b>
|
|
</dt>
|
|
<dd>
|
|
L. Masinter and M. Durst.
|
|
<i>Internationalized Resource Identifiers</i>
|
|
2001. Available at:
|
|
<a href="http://www.ietf.org/internet-drafts/draft-masinter-url-i18n-07.txt">
|
|
http://www.ietf.org/internet-drafts/draft-masinter-url-i18n-07.txt</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="IERS">International Earth Rotation Service (IERS)</a></b>
|
|
</dt>
|
|
<dd>
|
|
International Earth Rotation Service (IERS).
|
|
See <a href="http://maia.usno.navy.mil">http://maia.usno.navy.mil</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="ISO11404">ISO 11404</a></b>
|
|
</dt>
|
|
<dd>
|
|
ISO (International Organization for Standardization).
|
|
<i>Language-independent Datatypes.</i> See
|
|
<a href=" http://www.iso.ch/cate/d19346.html">
|
|
http://www.iso.ch/cate/d19346.html</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="ISO8601">ISO 8601</a></b>
|
|
</dt>
|
|
<dd>
|
|
ISO (International Organization for Standardization).
|
|
<i>Representations of dates and times, 1988-06-15.</i> Available at:
|
|
<a href="http://www.iso.ch/markete/8601.pdf">
|
|
http://www.iso.ch/markete/8601.pdf</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="ISO8601revision">ISO 8601 Draft Revision</a></b>
|
|
</dt>
|
|
<dd>
|
|
ISO (International Organization for Standardization).
|
|
<i>Representations of dates and times, draft revision, 2000.</i>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="Perl">Perl</a></b>
|
|
</dt>
|
|
<dd>
|
|
The Perl Programming Language. See <a href="http://www.perl.com/pub/language/info/software.html">
|
|
http://www.perl.com/pub/language/info/software.html</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="RDFSchema">RDF Schema</a></b>
|
|
</dt>
|
|
<dd>
|
|
World Wide Web Consortium. <i>RDF Schema Specification.</i>
|
|
Available at:
|
|
<a href="http://www.w3.org/TR/2000/CR-rdf-schema-20000327/">
|
|
http://www.w3.org/TR/2000/CR-rdf-schema-20000327/</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="ruby">Ruby</a></b>
|
|
</dt>
|
|
<dd>
|
|
World Wide Web Consortium. Ruby Annotation. Available at:
|
|
<a href="http://www.w3.org/TR/2001/WD-ruby-20010216/">
|
|
http://www.w3.org/TR/2001/WD-ruby-20010216/</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="SQL">SQL</a></b>
|
|
</dt>
|
|
<dd>
|
|
ISO (International Organization for Standardization). <i>ISO/IEC
|
|
9075-2:1999, Information technology --- Database languages ---
|
|
SQL --- Part 2: Foundation (SQL/Foundation)</i>.
|
|
[Geneva]: International Organization for Standardization, 1999.
|
|
See <a href="http://www.iso.ch/cate/d26197.html">
|
|
http://www.iso.ch/cate/d26197.html</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="USNavy">U.S. Naval Observatory Time Service Department</a></b>
|
|
</dt>
|
|
<dd>
|
|
<i>Information about Leap Seconds</i>
|
|
Available at:
|
|
<a href="http://tycho.usno.navy.mil/leapsec.990505.html">http://tycho.usno.navy.mil/leapsec.990505.html</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="unicodeRegEx">Unicode Regular Expression Guidelines</a></b>
|
|
</dt>
|
|
<dd>
|
|
Mark Davis. <i>Unicode Regular Expression Guidelines</i>, 1988.
|
|
Available at: <a href="http://www.unicode.org/unicode/reports/tr18/">
|
|
http://www.unicode.org/unicode/reports/tr18/</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="schema-primer">XML Schema Language: Part 2 Primer</a></b>
|
|
</dt>
|
|
<dd>
|
|
World Wide Web Consortium. XML Schema Language: Part 2 Primer. Available at:
|
|
<a href="http://www.w3.org/TR/2001/REC-xmlschema-0-20010502/">
|
|
http://www.w3.org/TR/2001/REC-xmlschema-0-20010502/</a>
|
|
</dd>
|
|
<dt>
|
|
<b><a name="XSL">XSL</a></b>
|
|
</dt>
|
|
<dd>
|
|
World Wide Web Consortium.
|
|
<i>Extensible Stylesheet Language (XSL).</i>
|
|
Available at: <a href="http://www.w3.org/TR/2000/CR-xsl-20001121/">
|
|
http://www.w3.org/TR/2000/CR-xsl-20001121/</a>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
<div class="div1">
|
|
<h2>
|
|
<a name="acknowledgments"></a>I Acknowledgements (non-normative)</h2>
|
|
<p>The following have contributed material to this draft:</p>
|
|
<ul>
|
|
<li>Asir S. Vedamuthu, webMethods, Inc</li>
|
|
<li>Mark Davis, IBM</li>
|
|
</ul>
|
|
<p>
|
|
Co-editor Ashok Malhotra's work on this specification from March 1999 until
|
|
February 2001 was supported by IBM.
|
|
</p>
|
|
<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>
|
|
Jim Barnette, Defense Information Systems Agency (DISA); Paul V. Biron, Health Level Seven; Don Box, DevelopMentor; Allen Brown, Microsoft; Lee Buck, TIBCO Extensibility; Charles E. Campbell, Informix; Wayne Carr, Intel; Peter Chen, Bootstrap Alliance and LSU; David Cleary, Progress Software; Dan Connolly, W3C (staff contact); Ugo Corda, Xerox; Roger L. Costello, MITRE; Haavard Danielson, Progress Software; Josef Dietl, Mozquito Technologies; David Ezell, Hewlett-Packard Company; Alexander Falk, Altova GmbH; David Fallside, IBM; Dan Fox, Defense Logistics Information Service (DLIS); Matthew Fuchs, Commerce One; Andrew Goodchild, Distributed Systems Technology Centre (DSTC Pty Ltd); Paul Grosso, Arbortext, Inc; Martin Gudgin, DevelopMentor; Dave Hollander, Contivo, Inc (co-chair); Mary Holstege, Invited Expert; Jane Hunter, Distributed Systems Technology Centre (DSTC Pty Ltd); Rick Jelliffe, Academia Sinica; Simon Johnston, Rational Software; Bob Lojek, Mozquito Technologies; Ashok Malhotra, Microsoft; Lisa Martin, IBM; Noah Mendelsohn, Lotus Development Corporation; Adrian Michel, Commerce One; Alex Milowski, Invited Expert; Don Mullen, TIBCO Extensibility; Dave Peterson, Graphic Communications Association; Jonathan Robie, Software AG; Eric Sedlar, Oracle Corp.; C. M. Sperberg-McQueen, W3C (co-chair); Bob Streich, Calico Commerce; William K. Stumbo, Xerox; Henry S. Thompson, University of Edinburgh; Mark Tucker, Health Level Seven; Asir S. Vedamuthu, webMethods, Inc; Priscilla Walmsley, XMLSolutions; Norm Walsh, Sun Microsystems; Aki Yoshida, SAP AG; Kongyi Zhou, Oracle Corp.
|
|
<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>
|
|
Paula Angerstein, Vignette Corporation; David Beech, Oracle Corp.; Gabe Beged-Dov, Rogue Wave Software; Greg Bumgardner, Rogue Wave Software; Dean Burson, Lotus Development Corporation; Mike Cokus, MITRE; Andrew Eisenberg, Progress Software; Rob Ellman, Calico Commerce; George Feinberg, Object Design; Charles Frankston, Microsoft; Ernesto Guerrieri, Inso; Michael Hyman, Microsoft; Renato Iannella, Distributed Systems Technology Centre (DSTC Pty Ltd); Dianne Kennedy, Graphic Communications Association; Janet Koenig, Sun Microsystems; Setrag Khoshafian, Technology Deployment International (TDI); Ara Kullukian, Technology Deployment International (TDI); Andrew Layman, Microsoft; Dmitry Lenkov, Hewlett-Packard Company; John McCarthy, Lawrence Berkeley National Laboratory; Murata Makoto, Xerox; Eve Maler, Sun Microsystems; Murray Maloney, Muzmo Communication, acting for Commerce One; Chris Olds, Wall Data; Frank Olken, Lawrence Berkeley National Laboratory; Shriram Revankar, Xerox; Mark Reinhold, Sun Microsystems; John C. Schneider, MITRE; Lew Shannon, NCR; William Shea, Merrill Lynch; Ralph Swick, W3C; Tony Stewart, Rivcom; Matt Timmermans, Microstar; Jim Trezzo, Oracle Corp.; Steph Tryphonas, Microstar
|
|
</div>
|
|
|
|
</div>
|
|
<div class="issues">
|
|
</div>
|
|
</body>
|
|
</html>
|