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.
7386 lines
629 KiB
7386 lines
629 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="EN" xmlns="http://www.w3.org/1999/xhtml"><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"/><title>XML Schema Part 2: Datatypes Second Edition</title><style type="text/css">
|
|
code { font-family: monospace; }
|
|
|
|
div.constraint,
|
|
div.issue,
|
|
div.note,
|
|
div.notice { margin-left: 2em; }
|
|
|
|
ol.enumar { list-style-type: decimal; }
|
|
ol.enumla { list-style-type: lower-alpha; }
|
|
ol.enumlr { list-style-type: lower-roman; }
|
|
ol.enumua { list-style-type: upper-alpha; }
|
|
ol.enumur { list-style-type: upper-roman; }
|
|
|
|
|
|
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}
|
|
|
|
img { color: white; border: none }
|
|
span.nav { float: right}
|
|
span.arrow { font-style: normal; font-weight: bold }
|
|
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.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}
|
|
span.edtext { color: red }
|
|
|
|
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}
|
|
table.scrap {background-color: #f5dcb3}
|
|
|
|
img { color: white; border: none }
|
|
span.nav { float: right}
|
|
span.arrow { font-style: normal; font-weight: bold }
|
|
</style><link href="http://www.w3.org/StyleSheets/TR/W3C-REC.css" type="text/css" rel="stylesheet"/></head><body><div class="head"><p><a href="http://www.w3.org/"><img width="72" height="48" alt="W3C" src="http://www.w3.org/Icons/w3c_home"/></a></p>
|
|
<h1><a id="title" name="title"/>XML Schema Part 2: Datatypes Second Edition</h1>
|
|
<h2><a id="w3c-doctype" name="w3c-doctype"/>W3C Recommendation 28 October 2004</h2>
|
|
<!--*
|
|
<h2><a id="w3c-doctype" name="w3c-doctype"/>W3C Recommendation 2 May 2001, Second Edition 28 October 2004</h2>
|
|
*-->
|
|
<dl><dt>This version:</dt><dd> <a href="http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/">http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/</a> </dd><dt>Latest version:</dt><dd>
|
|
<a href="http://www.w3.org/TR/xmlschema-2/">
|
|
http://www.w3.org/TR/xmlschema-2/
|
|
</a>
|
|
</dd><dt>Previous version:</dt><dd>
|
|
<a href="http://www.w3.org/TR/2004/PER-xmlschema-2-20040318/">http://www.w3.org/TR/2004/PER-xmlschema-2-20040318/</a>
|
|
</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></dd>
|
|
<dd>Ashok Malhotra, Microsoft (formerly of IBM)
|
|
<a href="mailto:ashokma@microsoft.com"><ashokma@microsoft.com></a>
|
|
</dd>
|
|
</dl>
|
|
<p>Please refer to the <a href="http://www.w3.org/2004/03/xmlschema-errata"
|
|
><strong>errata</strong></a>
|
|
for this document, which may include some normative corrections.</p>
|
|
<p>This document is also available in these non-normative formats: <a href="http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.xml">XML</a>, <a href="http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes-with-errata.html">XHTML with visible change markup</a>, <a href="http://www.w3.org/2001/XMLSchema.xsd">Independent copy of the schema for schema documents</a>, <a href="http://www.w3.org/2001/XMLSchema-datatypes.xsd">A schema for built-in datatypes only, in a separate namespace</a>, and <a href="http://www.w3.org/2001/XMLSchema.dtd">Independent copy of the DTD for schema documents</a>.
|
|
See also <a
|
|
href="http://www.w3.org/2003/03/Translations/byTechnology?technology=xmlschema"
|
|
><strong>translations</strong></a>.</p>
|
|
<p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2004 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.org/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a>
|
|
<!--*
|
|
and <a href="http://www.w3.org/Consortium/Legal/copyright-software">software licensing</a>
|
|
*-->
|
|
rules apply.</p></div><hr/><div>
|
|
<h2><a id="abstract" name="abstract"/>Abstract</h2><p>
|
|
<em>XML Schema: Datatypes</em> 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></div><div>
|
|
<h2><a id="status" name="status"/>Status of this Document</h2><p><em>This section describes the status of this document at the
|
|
time of its publication. Other documents may supersede this document.
|
|
A list of current W3C publications and the latest
|
|
revision of this technical report can be found in the <a href="http://www.w3.org/TR/">W3C technical reports index</a> at
|
|
http://www.w3.org/TR/.</em></p><p>This is a <a href="http://www.w3.org/2004/02/Process-20040205/tr.html#RecsW3C">W3C
|
|
Recommendation</a>, which forms part of the Second Edition of XML
|
|
Schema. 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/Activity">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
|
|
members of the XML Schema Working Group. Different parts of this
|
|
specification have different editors.
|
|
</p><p>
|
|
This document was produced under the <a href="http://www.w3.org/TR/2002/NOTE-patent-practice-20020124">24
|
|
January 2002 Current Patent Practice (CPP)</a> as amended by the <a href="http://www.w3.org/2004/02/05-pp-transition">W3C Patent Policy
|
|
Transition Procedure</a>. The Working Group maintains a <a href="http://www.w3.org/2002/11/xml-schema-IPR-statements.html">public
|
|
list of patent disclosures</a> relevant to this document;
|
|
that page also includes instructions for disclosing a patent.
|
|
An individual who
|
|
has actual knowledge of a patent which the individual believes
|
|
contains Essential Claim(s) with respect to this specification should
|
|
disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
|
|
6 of the W3C Patent Policy</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>This second edition is <em>not</em> a new version,
|
|
it merely incorporates the changes dictated by the corrections to
|
|
errors found in the <a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/">first
|
|
edition</a> as agreed by the XML Schema Working Group, as a
|
|
convenience to readers. A separate list of all such corrections 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 errata list for this second edition is available at <a href="http://www.w3.org/2004/03/xmlschema-errata">http://www.w3.org/2004/03/xmlschema-errata</a>.</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>).
|
|
</p>
|
|
<div class="note"><b>Note: </b>Ashok Malhotra's
|
|
affiliation has changed since the completion of
|
|
editorial work on this second edition. He is now at Oracle, and can be
|
|
contacted at <a href="mailto:ashok.malhotra@oracle.com"
|
|
><ashok.malhotra@oracle.com></a>.
|
|
</div>
|
|
</div><div class="toc">
|
|
<h2><a id="contents" name="contents"/>Table of Contents</h2><p class="toc">1 <a href="#Intro">Introduction</a><br/>
|
|
    1.1 <a href="#purpose">Purpose</a><br/>
|
|
    1.2 <a href="#requirements">Requirements</a><br/>
|
|
    1.3 <a href="#scope">Scope</a><br/>
|
|
    1.4 <a href="#terminology">Terminology</a><br/>
|
|
    1.5 <a href="#constraints-and-contributions">Constraints and Contributions</a><br/>
|
|
2 <a href="#typesystem">Type System</a><br/>
|
|
    2.1 <a href="#datatype">Datatype</a><br/>
|
|
    2.2 <a href="#value-space">Value space</a><br/>
|
|
    2.3 <a href="#lexical-space">Lexical space</a><br/>
|
|
    2.4 <a href="#facets">Facets</a><br/>
|
|
    2.5 <a href="#datatype-dichotomies">Datatype dichotomies</a><br/>
|
|
3 <a href="#built-in-datatypes">Built-in datatypes</a><br/>
|
|
    3.1 <a href="#namespaces">Namespace considerations</a><br/>
|
|
    3.2 <a href="#built-in-primitive-datatypes">Primitive datatypes</a><br/>
|
|
    3.3 <a href="#built-in-derived">Derived datatypes</a><br/>
|
|
4 <a href="#datatype-components">Datatype components</a><br/>
|
|
    4.1 <a href="#rf-defn">Simple Type Definition</a><br/>
|
|
    4.2 <a href="#rf-fund-facets">Fundamental Facets</a><br/>
|
|
    4.3 <a href="#rf-facets">Constraining Facets</a><br/>
|
|
5 <a href="#conformance">Conformance</a><br/>
|
|
</p>
|
|
<h3><a id="appendices" name="appendices"/>Appendices</h3><p class="toc">A <a href="#schema">Schema for Datatype Definitions (normative)</a><br/>
|
|
B <a href="#dtd-for-datatypeDefs">DTD for Datatype Definitions (non-normative)</a><br/>
|
|
C <a href="#d0e11239">Datatypes and Facets</a><br/>
|
|
    C.1 <a href="#app-fundamental-facets">Fundamental Facets</a><br/>
|
|
D <a href="#isoformats">ISO 8601 Date and Time Formats</a><br/>
|
|
    D.1 <a href="#formatdetails">ISO 8601 Conventions</a><br/>
|
|
    D.2 <a href="#truncatedformats">Truncated and Reduced Formats</a><br/>
|
|
    D.3 <a href="#deviantformats">Deviations from ISO 8601 Formats</a><br/>
|
|
E <a href="#adding-durations-to-dateTimes">Adding durations to dateTimes</a><br/>
|
|
    E.1 <a href="#d0e11648">Algorithm</a><br/>
|
|
    E.2 <a href="#adding-durations-to-instants-commutativity-associativity">Commutativity and Associativity</a><br/>
|
|
F <a href="#regexs">Regular Expressions</a><br/>
|
|
    F.1 <a href="#charcter-classes">Character Classes</a><br/>
|
|
G <a href="#normative-glossary">Glossary (non-normative)</a><br/>
|
|
H <a href="#biblio">References</a><br/>
|
|
    H.1 <a href="#normative-biblio">Normative</a><br/>
|
|
    H.2 <a href="#non-normative-biblio">Non-normative</a><br/>
|
|
I <a href="#acknowledgments">Acknowledgements (non-normative)</a><br/>
|
|
</p></div><hr/><div class="body"><div class="div1">
|
|
<h2><a id="Intro" name="Intro"/>1 Introduction</h2><div class="div2">
|
|
<h3><span class="nav"> <a class="nav" href="#requirements"><img src="next.jpg" alt="next sub-section"/></a></span><a id="purpose" name="purpose"/>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
|
|
<em>documents</em> and those transporting <em>data</em> in XML,
|
|
often require a higher degree of type checking to ensure robustness in
|
|
document understanding and data interchange.
|
|
</p><p>
|
|
The table below offers two typical examples of XML instances
|
|
in which datatypes are implicit: the instance on the left
|
|
represents a billing invoice, the instance on the
|
|
right a memo or perhaps an email message in XML.
|
|
</p><table border="1" class="dtdemo"><thead><tr><th>Data oriented</th><th>Document oriented</th></tr></thead><tbody><tr><td>
|
|
<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>
|
|
<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 class="nav" href="#purpose"><img src="previous.jpg" alt="previous sub-section"/></a> <a class="nav" href="#scope"><img src="next.jpg" alt="next sub-section"/></a></span><a id="requirements" name="requirements"/>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 class="enumar"><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 class="nav" href="#requirements"><img src="previous.jpg" alt="previous sub-section"/></a> <a class="nav" href="#terminology"><img src="next.jpg" alt="next sub-section"/></a></span><a id="scope" name="scope"/>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 class="nav" href="#scope"><img src="previous.jpg" alt="previous sub-section"/></a> <a class="nav" href="#constraints-and-contributions"><img src="next.jpg" alt="next sub-section"/></a></span><a id="terminology" name="terminology"/>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 class="label">
|
|
<span class="termdef"><a id="dt-compatibility" name="dt-compatibility">[Definition:]  </a>
|
|
for compatibility</span>
|
|
</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 class="label">
|
|
<span class="termdef"><a id="dt-may" name="dt-may">[Definition:]  </a><b>may</b></span>
|
|
</dt><dd>
|
|
Conforming documents and processors are permitted to but need
|
|
not behave as described.
|
|
</dd><dt class="label">
|
|
<span class="termdef"><a id="dt-match" name="dt-match">[Definition:]  </a><b>match</b></span>
|
|
</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 class="label">
|
|
<span class="termdef"><a id="dt-must" name="dt-must">[Definition:]  </a><b>must</b></span>
|
|
</dt><dd>
|
|
Conforming documents and processors are required to behave as
|
|
described; otherwise they are in <a class="termref" href="#dt-error"><span class="arrow">·</span>error<span class="arrow">·</span></a>.
|
|
</dd><dt class="label">
|
|
<span class="termdef"><a id="dt-error" name="dt-error">[Definition:]  </a><b>error</b></span>
|
|
</dt><dd>
|
|
A violation of the rules of this specification; results are undefined.
|
|
Conforming software <a class="termref" href="#dt-may"><span class="arrow">·</span>may<span class="arrow">·</span></a> detect and report an
|
|
<b>error</b> and <a class="termref" href="#dt-may"><span class="arrow">·</span>may<span class="arrow">·</span></a> recover from it.
|
|
</dd></dl></div><div class="div2">
|
|
<h3><span class="nav"><a class="nav" href="#terminology"><img src="previous.jpg" alt="previous sub-section"/></a> </span><a id="constraints-and-contributions" name="constraints-and-contributions"/>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 class="label">
|
|
<span class="termdef"><a id="dt-cos" name="dt-cos">[Definition:]  </a>
|
|
<b>Constraint on Schemas</b>
|
|
</span>
|
|
</dt><dd>
|
|
Constraints on the schema components themselves, i.e. conditions
|
|
components <a class="termref" href="#dt-must"><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 class="label">
|
|
<span class="termdef"><a id="dt-src" name="dt-src">[Definition:]  </a>
|
|
<b>Schema Representation Constraint</b>
|
|
</span>
|
|
</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 class="label">
|
|
<span class="termdef"><a id="dt-cvc" name="dt-cvc">[Definition:]  </a>
|
|
<b>Validation Rule</b>
|
|
</span>
|
|
</dt><dd>
|
|
Constraints expressed by schema components which information
|
|
items <a class="termref" href="#dt-must"><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 id="typesystem" name="typesystem"/>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
|
|
<em>integer</em> and <em>date</em>. 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 class="nav" href="#value-space"><img src="next.jpg" alt="next sub-section"/></a></span><a id="datatype" name="datatype"/>2.1 Datatype</h3><p>
|
|
<span class="termdef"><a id="dt-datatype" 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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>,
|
|
b) a set of lexical representations, called its
|
|
<a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>, and c) a set of <a class="termref" href="#dt-facet"><span class="arrow">·</span>facet<span class="arrow">·</span></a>s
|
|
that characterize properties of the <a class="termref" href="#dt-value-space"><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 class="nav" href="#datatype"><img src="previous.jpg" alt="previous sub-section"/></a> <a class="nav" href="#lexical-space"><img src="next.jpg" alt="next sub-section"/></a></span><a id="value-space" name="value-space"/>2.2 Value space</h3><p>
|
|
<span class="termdef"><a id="dt-value-space" 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 class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p><p>
|
|
The <a class="termref" href="#dt-value-space"><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 class="termref" href="#dt-primitive"><span class="arrow">·</span>primitive<span class="arrow">·</span></a>]
|
|
</li><li>
|
|
enumerated outright (extensional definition)
|
|
[see <a class="termref" href="#dt-enumeration"><span class="arrow">·</span>enumeration<span class="arrow">·</span></a>]
|
|
</li><li>
|
|
defined by restricting the <a class="termref" href="#dt-value-space"><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 class="termref" href="#dt-derived"><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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>(s) by a specific construction procedure
|
|
[see <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> and <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a>]
|
|
</li></ul><p>
|
|
</p><p>
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s have certain properties. For example,
|
|
they always have the property of <a class="termref" href="#dt-cardinality"><span class="arrow">·</span>cardinality<span class="arrow">·</span></a>,
|
|
some definition of <em>equality</em>
|
|
and might be <a class="termref" href="#dt-ordered"><span class="arrow">·</span>ordered<span class="arrow">·</span></a>, by which individual
|
|
values within the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> can be compared to
|
|
one another. The properties of <a class="termref" href="#dt-value-space"><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 class="nav" href="#value-space"><img src="previous.jpg" alt="previous sub-section"/></a> <a class="nav" href="#facets"><img src="next.jpg" alt="next sub-section"/></a></span><a id="lexical-space" name="lexical-space"/>2.3 Lexical space</h3><p>
|
|
In addition to its <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>, each datatype also
|
|
has a lexical space.
|
|
</p><p>
|
|
<span class="termdef"><a id="dt-lexical-space" name="dt-lexical-space">[Definition:]  </a>A
|
|
<b>lexical space</b> is the set of valid <em>literals</em>
|
|
for a datatype.
|
|
</span>
|
|
</p><p>
|
|
For example, "100" and "1.0E2" are two different literals from the
|
|
<a class="termref" href="#dt-lexical-space"><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><div class="note"><b>Note: </b>
|
|
The literals in the <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>s defined in this specification
|
|
have the following characteristics:
|
|
<dl><dt class="label">
|
|
Interoperability:
|
|
</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 class="label">
|
|
Basic readability:
|
|
</dt><dd>
|
|
Textual, rather than binary, literals are used.
|
|
This makes hand editing, debugging, and similar activities possible.
|
|
</dd><dt class="label">
|
|
Ease of parsing and serializing:
|
|
</dt><dd>
|
|
Where possible, literals correspond to those found in common
|
|
programming languages and libraries.
|
|
</dd></dl></div><div class="div3">
|
|
<h4><a id="canonical-lexical-representation" name="canonical-lexical-representation"/>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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is denoted by a single literal in its
|
|
<a class="termref" href="#dt-lexical-space"><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 class="termref" href="#dt-may"><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 id="dt-canonical-representation" 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 class="termref" href="#dt-value-space"><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 class="nav" href="#lexical-space"><img src="previous.jpg" alt="previous sub-section"/></a> <a class="nav" href="#datatype-dichotomies"><img src="next.jpg" alt="next sub-section"/></a></span><a id="facets" name="facets"/>2.4 Facets</h3><div class="localToc">        2.4.1 <a href="#fundamental-facets">Fundamental facets</a><br/>
|
|
        2.4.2 <a href="#non-fundamental">Constraining or Non-fundamental facets</a><br/>
|
|
</div><p>
|
|
<span class="termdef"><a id="dt-facet" name="dt-facet">[Definition:]  </a>A <b>facet</b> is a single
|
|
defining aspect of a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>. Generally
|
|
speaking, each facet characterizes a <a class="termref" href="#dt-value-space"><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 <em>differ</em> 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 <em>synthesis</em> of facet values which together determine the
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> and properties of the datatype.
|
|
</p><p>
|
|
Facets are of two types: <em>fundamental</em> facets that define
|
|
the datatype and <em>non-fundamental</em> or <em>constraining
|
|
</em> facets that constrain the permitted values of a datatype.
|
|
</p><div class="div3">
|
|
<h4><a id="fundamental-facets" name="fundamental-facets"/>2.4.1 Fundamental facets</h4><p>
|
|
<span class="termdef"><a id="dt-fundamental-facet" 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 class="termref" href="#dt-value-space"><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 id="non-fundamental" name="non-fundamental"/>2.4.2 Constraining or Non-fundamental facets</h4><p>
|
|
<span class="termdef"><a id="dt-constraining-facet" 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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p><p>
|
|
Constraining the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> consequently constrains
|
|
the <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>. Adding
|
|
<a class="termref" href="#dt-constraining-facet"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s to a <a class="termref" href="#dt-basetype"><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 class="nav" href="#facets"><img src="previous.jpg" alt="previous sub-section"/></a> </span><a id="datatype-dichotomies" name="datatype-dichotomies"/>2.5 Datatype dichotomies</h3><div class="localToc">        2.5.1 <a href="#atomic-vs-list">Atomic vs. list vs. union datatypes</a><br/>
|
|
        2.5.2 <a href="#primitive-vs-derived">Primitive vs. derived datatypes</a><br/>
|
|
        2.5.3 <a href="#built-in-vs-user-derived">Built-in vs. user-derived datatypes</a><br/>
|
|
</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 id="atomic-vs-list" name="atomic-vs-list"/>2.5.1 Atomic vs. list vs. union datatypes</h4><p>
|
|
The first distinction to be made is that between
|
|
<a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a>, <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> and <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a>
|
|
datatypes.
|
|
</p><ul><li>
|
|
<span class="termdef"><a id="dt-atomic" 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 id="dt-list" 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 class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> datatype.
|
|
</span>
|
|
</li><li>
|
|
<span class="termdef"><a id="dt-union" name="dt-union">[Definition:]  </a><b>Union</b>
|
|
datatypes are those whose <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s and
|
|
<a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>s are the union of
|
|
the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s and
|
|
<a class="termref" href="#dt-lexical-space"><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 class="termref" href="#dt-match"><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 class="termref" href="#dt-atomic"><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 class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype
|
|
(<a href="#NMTOKENS">NMTOKENS</a>).
|
|
</p><div class="div4">
|
|
<h5><a id="atomic" name="atomic"/>2.5.1.1 Atomic datatypes</h5><p>
|
|
<a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> datatypes can be either
|
|
<a class="termref" href="#dt-primitive"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> or <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a>. The
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of an <a class="termref" href="#dt-atomic"><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 class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of
|
|
an <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> datatype is a set of <em>literals</em>
|
|
whose internal structure is specific to the datatype in question.
|
|
</p></div><div class="div4">
|
|
<h5><a id="list-datatypes" name="list-datatypes"/>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 class="termref" href="#dt-list"><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 class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatypes are always <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a>.
|
|
The <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of a <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a>
|
|
datatype is a set of finite-length sequences of <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a>
|
|
values. The <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of a
|
|
<a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype is a set of literals whose internal
|
|
structure is a space-separated
|
|
sequence of literals of the
|
|
<a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> datatype of the items in the
|
|
<a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a>.
|
|
</p><p>
|
|
<span class="termdef"><a id="dt-itemType" name="dt-itemType">[Definition:]  </a>
|
|
The <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> or <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a>
|
|
datatype that participates in the definition of a <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype
|
|
is known as the <b>itemType</b> of that <a class="termref" href="#dt-list"><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 class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype can be <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
from an <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> datatype whose
|
|
<a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> allows space
|
|
(such as <a href="#string">string</a>
|
|
or <a href="#anyURI">anyURI</a>)or a
|
|
<a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a> datatype any of whose <a class="propref" href="#defn-memberTypes">{member type definitions}</a>'s
|
|
<a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> allows space.
|
|
In such a case, regardless of the input, list items
|
|
will be separated at space 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 <em>someElement</em> element
|
|
is not a <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> of <a class="termref" href="#dt-length"><span class="arrow">·</span>length<span class="arrow">·</span></a> 3;
|
|
rather, it is a <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> of <a class="termref" href="#dt-length"><span class="arrow">·</span>length<span class="arrow">·</span></a>
|
|
18.
|
|
</div></div><p>
|
|
When a datatype is <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from a
|
|
<a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype, the following
|
|
<a class="termref" href="#dt-constraining-facet"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s apply:
|
|
</p><ul><li><a class="termref" href="#dt-length"><span class="arrow">·</span>length<span class="arrow">·</span></a></li><li><a class="termref" href="#dt-maxLength"><span class="arrow">·</span>maxLength<span class="arrow">·</span></a></li><li><a class="termref" href="#dt-minLength"><span class="arrow">·</span>minLength<span class="arrow">·</span></a></li><li><a class="termref" href="#dt-enumeration"><span class="arrow">·</span>enumeration<span class="arrow">·</span></a></li><li><a class="termref" href="#dt-pattern"><span class="arrow">·</span>pattern<span class="arrow">·</span></a></li><li><a class="termref" href="#dt-whiteSpace"><span class="arrow">·</span>whiteSpace<span class="arrow">·</span></a></li></ul><p>
|
|
For each of <a class="termref" href="#dt-length"><span class="arrow">·</span>length<span class="arrow">·</span></a>, <a class="termref" href="#dt-maxLength"><span class="arrow">·</span>maxLength<span class="arrow">·</span></a>
|
|
and <a class="termref" href="#dt-minLength"><span class="arrow">·</span>minLength<span class="arrow">·</span></a>, the <em>unit of length</em> is
|
|
measured in number of list items. The value of <a class="termref" href="#dt-whiteSpace"><span class="arrow">·</span>whiteSpace<span class="arrow">·</span></a>
|
|
is fixed to the value <em>collapse</em>.
|
|
</p><p>
|
|
|
|
For <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatypes the <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>
|
|
|
|
is composed of space-separated
|
|
literals of its <a class="termref" href="#dt-itemType"><span class="arrow">·</span>itemType<span class="arrow">·</span></a>. Hence, any
|
|
<a class="termref" href="#dt-pattern"><span class="arrow">·</span>pattern<span class="arrow">·</span></a> specified when a new datatype is
|
|
<a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from a <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype is matched against
|
|
each literal of the <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype and
|
|
not against the literals of the datatype that serves as its
|
|
<a class="termref" href="#dt-itemType"><span class="arrow">·</span>itemType<span class="arrow">·</span></a>.
|
|
|
|
</p><div class="exampleOuter"><div class="exampleHeader">Example</div><div class="exampleInner"><pre>
|
|
<xs:simpleType name='myList'>
|
|
<xs:list itemType='xs:integer'/>
|
|
</xs:simpleType>
|
|
<xs:simpleType name='myRestrictedList'>
|
|
<xs:restriction base='myList'>
|
|
<xs:pattern value='123 (\d+\s)*456'/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
<someElement xsi:type='myRestrictedList'>123 456</someElement>
|
|
<someElement xsi:type='myRestrictedList'>123 987 456</someElement>
|
|
<someElement xsi:type='myRestrictedList'>123 987 567 456</someElement>
|
|
|
|
</pre></div></div><p>
|
|
The <a href="#canonical-lexical-representation">canonical-lexical-representation</a> for the
|
|
<a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype is defined as the lexical form in which
|
|
each item in the <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> has the canonical lexical
|
|
representation of its <a class="termref" href="#dt-itemType"><span class="arrow">·</span>itemType<span class="arrow">·</span></a>.
|
|
</p></div><div class="div4">
|
|
<h5><a id="union-datatypes" name="union-datatypes"/>2.5.1.3 Union datatypes</h5><p>
|
|
The <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> and <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>
|
|
of a <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a> datatype are the union of the
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s and <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>s of
|
|
its <a class="termref" href="#dt-memberTypes"><span class="arrow">·</span>memberTypes<span class="arrow">·</span></a>.
|
|
<a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a> datatypes are always <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a>.
|
|
Currently, there are no <a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> <a class="termref" href="#dt-union"><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 class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a> type is the
|
|
<a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#p-max_occurs">maxOccurs attribute</a> on the
|
|
<a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#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"
|
|
use="optional" default="1"/>
|
|
<attribute name="maxOccurs"use="optional" default="1">
|
|
<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 class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> or <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a>
|
|
<a class="termref" href="#dt-datatype"><span class="arrow">·</span>datatype<span class="arrow">·</span></a>s can participate in a <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a> type.
|
|
</p><p>
|
|
<span class="termdef"><a id="dt-memberTypes" name="dt-memberTypes">[Definition:]  </a>
|
|
The datatypes that participate in the
|
|
definition of a <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a> datatype are known as the
|
|
<b>memberTypes</b> of that <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a> datatype.
|
|
</span>
|
|
</p><p>
|
|
The order in which the <a class="termref" href="#dt-memberTypes"><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 <em>memberTypes</em>
|
|
attribute) is significant.
|
|
During validation, an element or attribute's value is validated against the
|
|
<a class="termref" href="#dt-memberTypes"><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/2004/REC-xmlschema-1-20041028/structures.html#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 class="termref" href="#dt-union"><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 class="termref" href="#dt-memberTypes"><span class="arrow">·</span>memberTypes<span class="arrow">·</span></a>.</p><div class="note"><b>Note: </b>
|
|
A datatype which is <a class="termref" href="#dt-atomic"><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 class="termref" href="#dt-list"><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 class="termref" href="#dt-union"><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.
|
|
</div></div></div><div class="div3">
|
|
<h4><a id="primitive-vs-derived" name="primitive-vs-derived"/>2.5.2 Primitive vs. derived datatypes</h4><p>
|
|
Next, we distinguish between <a class="termref" href="#dt-primitive"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> and
|
|
<a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> datatypes.
|
|
</p><ul><li>
|
|
<span class="termdef"><a id="dt-primitive" name="dt-primitive">[Definition:]  </a><b>Primitive</b>
|
|
datatypes are those that are not defined in terms of other datatypes;
|
|
they exist <em>ab initio</em>.
|
|
</span>
|
|
</li><li>
|
|
<span class="termdef"><a id="dt-derived" 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 id="dt-anySimpleType" name="dt-anySimpleType">[Definition:]  </a>
|
|
|
|
The simple ur-type definition is a special restriction of the
|
|
<a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-urType">ur-type definition</a>
|
|
whose name is <b>anySimpleType</b> in the XML Schema namespace.
|
|
<b>anySimpleType</b> can be
|
|
considered as the <a class="termref" href="#dt-basetype"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of all <a class="termref" href="#dt-primitive"><span class="arrow">·</span>primitive<span class="arrow">·</span></a>
|
|
datatypes.
|
|
<b>anySimpleType</b> is considered to have an unconstrained lexical space and a
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> consisting of the union of the
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s of all the
|
|
<a class="termref" href="#dt-primitive"><span class="arrow">·</span>primitive<span class="arrow">·</span></a>
|
|
datatypes and the set of all lists of all members of the
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s of all the
|
|
<a class="termref" href="#dt-primitive"><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 class="termref" href="#dt-primitive"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> and <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
categories. It is felt that a judiciously chosen set of
|
|
<a class="termref" href="#dt-primitive"><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 class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a>.
|
|
</p><p>
|
|
In the example above, <a href="#integer">integer</a> is <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
from <a href="#decimal">decimal</a>.
|
|
</p><div class="note"><b>Note: </b>
|
|
A datatype which is <a class="termref" href="#dt-primitive"><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 class="termref" href="#dt-derived"><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.
|
|
</div><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 class="termref" href="#dt-user-derived"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a> datatype <a class="termref" href="#dt-must"><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 class="termref" href="#dt-constraining-facet"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s which serve to <em>restrict</em> the
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the <a class="termref" href="#dt-user-derived"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a>
|
|
datatype to a subset of that of the <a class="termref" href="#dt-basetype"><span class="arrow">·</span>base type<span class="arrow">·</span></a>; 2) by creating
|
|
a <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype whose <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
consists of finite-length sequences of values of its
|
|
<a class="termref" href="#dt-itemType"><span class="arrow">·</span>itemType<span class="arrow">·</span></a>; or 3) by creating a <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a>
|
|
datatype whose <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> consists of the union of the
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s of its <a class="termref" href="#dt-memberTypes"><span class="arrow">·</span>memberTypes<span class="arrow">·</span></a>.
|
|
</p><div class="div4">
|
|
<h5><a id="restriction" name="restriction"/>2.5.2.1 Derived by restriction</h5><p>
|
|
|
|
<span class="termdef"><a id="dt-restriction" name="dt-restriction">[Definition:]  </a>A datatype is said to be
|
|
<a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> by <b>restriction</b> from another datatype
|
|
when values for zero or more <a class="termref" href="#dt-constraining-facet"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s are specified
|
|
that serve to constrain its <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> and/or its
|
|
<a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> to a subset of those of its
|
|
<a class="termref" href="#dt-basetype"><span class="arrow">·</span>base type<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p><p>
|
|
<span class="termdef"><a id="dt-basetype" name="dt-basetype">[Definition:]  </a>Every
|
|
datatype that is <a class="termref" href="#dt-derived"><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 class="termref" href="#dt-primitive"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> or <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p></div><div class="div4">
|
|
<h5><a id="list" name="list"/>2.5.2.2 Derived by list</h5><p>
|
|
A <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype can be <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
from another datatype (its <a class="termref" href="#dt-itemType"><span class="arrow">·</span>itemType<span class="arrow">·</span></a>) by creating
|
|
a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> that consists of a finite-length sequence
|
|
of values of its <a class="termref" href="#dt-itemType"><span class="arrow">·</span>itemType<span class="arrow">·</span></a>.
|
|
</p></div><div class="div4">
|
|
<h5><a id="union" name="union"/>2.5.2.3 Derived by union</h5><p>
|
|
One datatype can be <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from one or more
|
|
datatypes by <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a>ing their <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s
|
|
and, consequently, their <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>s.
|
|
</p></div></div><div class="div3">
|
|
<h4><a id="built-in-vs-user-derived" name="built-in-vs-user-derived"/>2.5.3 Built-in vs. user-derived datatypes</h4><ul><li>
|
|
<span class="termdef"><a id="dt-built-in" name="dt-built-in">[Definition:]  </a><b>Built-in</b>
|
|
datatypes are those which are defined in this specification,
|
|
and can be either <a class="termref" href="#dt-primitive"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> or
|
|
<a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a>;
|
|
</span>
|
|
</li><li>
|
|
<span class="termdef"><a id="dt-user-derived" name="dt-user-derived">[Definition:]  </a>
|
|
<b>User-derived</b> datatypes are those <a class="termref" href="#dt-derived"><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 class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> datatypes
|
|
included in this specification and the <a class="termref" href="#dt-user-derived"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a>
|
|
datatypes which will be created by individual schema designers.
|
|
The <a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> <a class="termref" href="#dt-derived"><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 class="termref" href="#dt-derived"><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><div class="note"><b>Note: </b>
|
|
A datatype which is <a class="termref" href="#dt-built-in"><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 class="termref" href="#dt-user-derived"><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.
|
|
</div></div></div></div><div class="div1">
|
|
<h2><a id="built-in-datatypes" name="built-in-datatypes"/>3 Built-in datatypes</h2><img border="0" usemap="#typeImage" alt="Diagram of built-in type hierarchy" src="type-hierarchy.gif"/><map id="typeImage" name="typeImage"><area title="anyType" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-urType" coords="283,1,349,21" alt="anyType" shape="rect"/><area title="anySimpleType" href="#dt-anySimpleType" coords="257,62,374,82" alt="anySimpleType" shape="rect"/><area title="duration" href="#duration" coords="51,133,124,154" alt="duration" shape="rect"/><area title="dateTime" href="#dateTime" coords="130,133,202,154" alt="dateTime" shape="rect"/><area title="time" href="#time" coords="207,133,246,154" alt="time" shape="rect"/><area title="date" href="#date" coords="251,133,291,154" alt="date" shape="rect"/><area title="gYearMonth" href="#gYearMonth" coords="296,133,386,154" alt="gYearMonth" shape="rect"/><area title="gYear" href="#gYear" coords="391,133,438,154" alt="gYear" shape="rect"/><area title="gMonthDay" href="#gMonthDay" coords="443,133,523,154" alt="gMonthDay" shape="rect"/><area title="gDay" href="#gDay" coords="528,133,567,154" alt="gDay" shape="rect"/><area title="gMonth" href="#gMonth" coords="572,133,627,154" alt="gMonth" shape="rect"/><area title="boolean" href="#boolean" coords="37,193,103,214" alt="boolean" shape="rect"/><area title="base64Binary" href="#base64Binary" coords="108,193,215,214" alt="base64Binary" shape="rect"/><area title="hexBinary" href="#hexBinary" coords="220,193,301,214" alt="hexBinary" shape="rect"/><area title="float" href="#float" coords="306,193,355,214" alt="float" shape="rect"/><area title="double" href="#double" coords="375,193,431,214" alt="double" shape="rect"/><area title="anyURI" href="#anyURI" coords="437,193,492,214" alt="anyURI" shape="rect"/><area title="QName" href="#QName" coords="498,193,547,214" alt="QName" shape="rect"/><area title="NOTATION" href="#NOTATION" coords="554,193,627,214" alt="NOTATION" shape="rect"/><area title="string" href="#string" coords="2,234,58,254" alt="string" shape="rect"/><area title="decimal" href="#decimal" coords="337,234,393,254" alt="decimal" shape="rect"/><area title="normalizedString" href="#normalizedString" coords="2,274,142,295" alt="normalizedString" shape="rect"/><area title="integer" href="#integer" coords="333,274,397,295" alt="integer" shape="rect"/><area title="token" href="#token" coords="2,336,49,356" alt="token" shape="rect"/><area title="nonPositiveInteger" href="#nonPositiveInteger" coords="182,336,340,356" alt="nonPositiveInteger" shape="rect"/><area title="long" href="#long" coords="345,336,384,356" alt="long" shape="rect"/><area title="nonNegativeInteger" href="#nonNegativeInteger" coords="389,336,546,356" alt="nonNegativeInteger" shape="rect"/><area title="language" href="#language" coords="2,397,74,417" alt="language" shape="rect"/><area title="Name" href="#Name" coords="80,397,119,417" alt="Name" shape="rect"/><area title="NMTOKEN" href="#NMTOKEN" coords="135,397,199,417" alt="NMTOKEN" shape="rect"/><area title="negativeInteger" href="#negativeInteger" coords="212,397,345,417" alt="negativeInteger" shape="rect"/><area title="int" href="#int" coords="350,397,380,417" alt="int" shape="rect"/><area title="unsignedLong" href="#unsignedLong" coords="385,397,492,417" alt="unsignedLong" shape="rect"/><area title="positiveInteger" href="#positiveInteger" coords="497,397,627,417" alt="positiveInteger" shape="rect"/><area title="NCName" href="#NCName" coords="72,437,127,458" alt="NCName" shape="rect"/><area title="NMTOKENS" href="#NMTOKENS" coords="132,437,205,458" alt="NMTOKENS" shape="rect"/><area title="short" href="#short" coords="342,437,389,458" alt="short" shape="rect"/><area title="unsignedInt" href="#unsignedInt" coords="399,437,496,458" alt="unsignedInt" shape="rect"/><area title="ID" href="#ID" coords="18,498,39,518" alt="ID" shape="rect"/><area title="IDREF" href="#IDREF" coords="76,498,123,518" alt="IDREF" shape="rect"/><area title="ENTITY" href="#ENTITY" coords="140,498,196,518" alt="ENTITY" shape="rect"/><area title="byte" href="#byte" coords="345,498,385,518" alt="byte" shape="rect"/><area title="unsignedShort" href="#unsignedShort" coords="390,498,504,518" alt="unsignedShort" shape="rect"/><area title="IDREFS" href="#IDREFS" coords="72,539,127,559" alt="IDREFS" shape="rect"/><area title="ENTITIES" href="#ENTITIES" coords="132,539,204,559" alt="ENTITIES" shape="rect"/><area title="unsignedByte" href="#unsignedByte" coords="394,539,500,559" alt="unsignedByte" shape="rect"/><area title="Built-in Datatypes" alt="Built-in Datatypes" nohref="nohref" shape="default"/></map><p>
|
|
Each built-in datatype in this specification (both
|
|
<a class="termref" href="#dt-primitive"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> and
|
|
<a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a>) can be uniquely addressed via a
|
|
URI Reference constructed as follows:
|
|
</p><ol class="enumar"><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 class="enumar"><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 class="enumar"><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 class="nav" href="#built-in-primitive-datatypes"><img src="next.jpg" alt="next sub-section"/></a></span><a id="namespaces" name="namespaces"/>3.1 Namespace considerations</h3><p>
|
|
The <a class="termref" href="#dt-built-in"><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 class="termref" href="#dt-built-in"><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 class="termref" href="#dt-built-in"><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 class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> <a class="termref" href="#dt-primitive"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> and
|
|
<a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> datatypes.
|
|
</p><p>
|
|
Each <a class="termref" href="#dt-user-derived"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a> datatype is also associated with a
|
|
unique namespace. However, <a class="termref" href="#dt-user-derived"><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/2004/REC-xmlschema-1-20041028/structures.html#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 class="nav" href="#namespaces"><img src="previous.jpg" alt="previous sub-section"/></a> <a class="nav" href="#built-in-derived"><img src="next.jpg" alt="next sub-section"/></a></span><a id="built-in-primitive-datatypes" name="built-in-primitive-datatypes"/>3.2 Primitive datatypes</h3><div class="localToc">        3.2.1 <a href="#string">string</a><br/>
|
|
        3.2.2 <a href="#boolean">boolean</a><br/>
|
|
        3.2.3 <a href="#decimal">decimal</a><br/>
|
|
        3.2.4 <a href="#float">float</a><br/>
|
|
        3.2.5 <a href="#double">double</a><br/>
|
|
        3.2.6 <a href="#duration">duration</a><br/>
|
|
        3.2.7 <a href="#dateTime">dateTime</a><br/>
|
|
        3.2.8 <a href="#time">time</a><br/>
|
|
        3.2.9 <a href="#date">date</a><br/>
|
|
        3.2.10 <a href="#gYearMonth">gYearMonth</a><br/>
|
|
        3.2.11 <a href="#gYear">gYear</a><br/>
|
|
        3.2.12 <a href="#gMonthDay">gMonthDay</a><br/>
|
|
        3.2.13 <a href="#gDay">gDay</a><br/>
|
|
        3.2.14 <a href="#gMonth">gMonth</a><br/>
|
|
        3.2.15 <a href="#hexBinary">hexBinary</a><br/>
|
|
        3.2.16 <a href="#base64Binary">base64Binary</a><br/>
|
|
        3.2.17 <a href="#anyURI">anyURI</a><br/>
|
|
        3.2.18 <a href="#QName">QName</a><br/>
|
|
        3.2.19 <a href="#NOTATION">NOTATION</a><br/>
|
|
</div><p>
|
|
The <a class="termref" href="#dt-primitive"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> datatypes defined by this specification
|
|
are described below. For each datatype, the
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> and <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>
|
|
are defined, <a class="termref" href="#dt-constraining-facet"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s which apply
|
|
to the datatype are listed and any datatypes <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
from this datatype are specified.
|
|
</p><p>
|
|
<a class="termref" href="#dt-primitive"><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 id="string" name="string"/>3.2.1 string</h4><p>
|
|
<span class="termdef"><a id="dt-string" name="dt-string">[Definition:]  </a>The <b>string</b> datatype
|
|
represents character strings in XML. The <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
of <b>string</b> is the set of finite-length sequences of
|
|
<a 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 class="termref" href="#dt-match"><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 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 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><div class="note"><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 0 Primer]</a>.
|
|
</div><div class="note"><b>Note: </b>
|
|
As noted in <a href="#dc-ordered">ordered</a>, the fact that this specification does
|
|
not specify an <a class="termref" href="#dt-order-relation"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a> for <a class="termref" href="#dt-string"><span class="arrow">·</span>string<span class="arrow">·</span></a>
|
|
does not preclude other applications from treating strings as being ordered.
|
|
</div><div class="div4">
|
|
<h5><a id="string-facets" name="string-facets"/>3.2.1.1 Constraining facets</h5><p><strong>string</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="string-derived-types" name="string-derived-types"/>3.2.1.2 Derived datatypes</h5><p>
|
|
The following <a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a class="termref" href="#dt-derived"><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 id="boolean" name="boolean"/>3.2.2 boolean</h4><p>
|
|
<span class="termdef"><a id="dt-boolean" name="dt-boolean">[Definition:]  </a><b>boolean</b> has the
|
|
<a class="termref" href="#dt-value-space"><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 id="boolean-lexical-representation" name="boolean-lexical-representation"/>3.2.2.1 Lexical representation</h5><p>
|
|
An instance of a datatype that is defined as <a class="termref" href="#dt-boolean"><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 id="boolean-canonical-representation" name="boolean-canonical-representation"/>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 id="boolean-facets" name="boolean-facets"/>3.2.2.3 Constraining facets</h5><p><strong>boolean</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="decimal" name="decimal"/>3.2.3 decimal</h4><p>
|
|
<span class="termdef"><a id="dt-decimal" name="dt-decimal">[Definition:]  </a><b>decimal</b>
|
|
represents a subset of the real numbers, which can be represented by decimal numerals.
|
|
The <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>decimal</b>
|
|
is the set of
|
|
numbers that can be obtained by multiplying an integer by a non-positive
|
|
power of ten, i.e., expressible as <em>i × 10^-n</em>
|
|
where <em>i</em> and <em>n</em> are integers
|
|
and <em>n >= 0</em>.
|
|
Precision is not reflected in this value space;
|
|
the number 2.0 is not distinct from the number 2.00.
|
|
The <a class="termref" href="#dt-order-relation"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a> on <b>decimal</b>
|
|
is the order relation on real numbers, restricted
|
|
to this subset.
|
|
</span>
|
|
</p><p>
|
|
|
|
</p><p>
|
|
|
|
</p><div class="note"><b>Note: </b>
|
|
All <a class="termref" href="#dt-minimally-conforming"><span class="arrow">·</span>minimally conforming<span class="arrow">·</span></a> processors <a class="termref" href="#dt-must"><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 class="termref" href="#dt-totalDigits"><span class="arrow">·</span>totalDigits<span class="arrow">·</span></a> of 18). However,
|
|
<a class="termref" href="#dt-minimally-conforming"><span class="arrow">·</span>minimally conforming<span class="arrow">·</span></a> processors <a class="termref" href="#dt-may"><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 class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be clearly documented.
|
|
</div><div class="div4">
|
|
<h5><a id="decimal-lexical-representation" name="decimal-lexical-representation"/>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.
|
|
|
|
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 id="decimal-canonical-representation" name="decimal-canonical-representation"/>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 id="decimal-facets" name="decimal-facets"/>3.2.3.3 Constraining facets</h5><p><strong>decimal</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="decimal-derived-types" name="decimal-derived-types"/>3.2.3.4 Derived datatypes</h5><p>
|
|
The following <a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a class="termref" href="#dt-derived"><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 id="float" name="float"/>3.2.4 float</h4><p>
|
|
<span class="termdef"><a id="dt-float" name="dt-float">[Definition:]  </a><b>float</b>
|
|
is patterned after the IEEE single-precision 32-bit floating point type
|
|
<a href="#ieee754">[IEEE 754-1985]</a>. The basic <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<b>float</b> consists of the values
|
|
<em>m × 2^e</em>, where <em>m</em>
|
|
is an integer whose absolute value is less than
|
|
<em>2^24</em>, and <em>e</em> is an integer
|
|
between -149 and 104, inclusive. In addition to the basic
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> described above, the
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>float</b> also contains the
|
|
following
|
|
three
|
|
<em>special values</em>:
|
|
|
|
positive and negative infinity and not-a-number
|
|
(NaN).
|
|
The <a class="termref" href="#dt-order-relation"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a> on <b>float</b>
|
|
is: <em>x < y iff y - x</em> is positive
|
|
for x and y in the value space.
|
|
Positive infinity is greater than all other non-NaN values.
|
|
NaN equals itself but is <a class="termref" href="#dt-incomparable"><span class="arrow">·</span>incomparable<span class="arrow">·</span></a> with (neither greater than nor less than)
|
|
any other value in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>.
|
|
|
|
</span>
|
|
</p><div class="note"><b>Note: </b>
|
|
|
|
"Equality" in this Recommendation is defined to be "identity" (i.e., values that
|
|
are identical in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> are equal and vice versa).
|
|
Identity must be used for the few operations that are defined in this Recommendation.
|
|
Applications using any of the datatypes defined in this Recommendation may use different
|
|
definitions of equality for computational purposes; <a href="#ieee754">[IEEE 754-1985]</a>-based computation systems
|
|
are examples. Nothing in this Recommendation should be construed as requiring that
|
|
such applications use identity as their equality relationship when computing.
|
|
|
|
<p/>
|
|
|
|
Any value <a class="termref" href="#dt-incomparable"><span class="arrow">·</span>incomparable<span class="arrow">·</span></a> with the value used for the four bounding facets
|
|
(<a class="termref" href="#dt-minInclusive"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a>, <a class="termref" href="#dt-maxInclusive"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a>,
|
|
<a class="termref" href="#dt-minExclusive"><span class="arrow">·</span>minExclusive<span class="arrow">·</span></a>, and <a class="termref" href="#dt-maxExclusive"><span class="arrow">·</span>maxExclusive<span class="arrow">·</span></a>) will be
|
|
excluded from the resulting restricted <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>. In particular,
|
|
when "NaN" is used as a facet value for a bounding facet, since no other
|
|
<b>float</b> values are <a class="termref" href="#dt-comparable"><span class="arrow">·</span>comparable<span class="arrow">·</span></a> with it, the result is a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
either having NaN as its only member (the inclusive cases) or that is empty
|
|
(the exclusive cases). If any other value is used for a bounding facet,
|
|
NaN will be excluded from the resulting restricted <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>;
|
|
to add NaN back in requires union with the NaN-only space.
|
|
|
|
<p/>
|
|
|
|
This datatype differs from that of <a href="#ieee754">[IEEE 754-1985]</a> in that there is only one
|
|
NaN and only one zero. This makes the equality and ordering of values in the data
|
|
space differ from that of <a href="#ieee754">[IEEE 754-1985]</a> only in that for schema purposes NaN = NaN.
|
|
|
|
</div><p>
|
|
A literal in the <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> representing a
|
|
decimal number <em>d</em> maps to the normalized value
|
|
in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>float</b> that is
|
|
closest to <em>d</em> in the sense defined by
|
|
<a href="#clinger1990">[Clinger, WD (1990)]</a>; if <em>d</em> is
|
|
exactly halfway between two such values then the even value is chosen.
|
|
</p><div class="div4">
|
|
<h5><a id="float-lexical-representation" name="float-lexical-representation"/>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 class="termref" href="#dt-must"><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 <em>special values</em>
|
|
|
|
positive
|
|
and negative infinity and not-a-number have lexical representations
|
|
|
|
<code>INF</code>, <code>-INF</code> and
|
|
<code>NaN</code>, respectively.
|
|
|
|
Lexical representations for zero may take a positive or negative sign.
|
|
|
|
</p><p>
|
|
For example, <code>-1E4, 1267.43233E12, 12.78e-2, 12</code>
|
|
<code>, -0, 0</code>
|
|
and <code>INF</code> are all legal literals for <b>float</b>.
|
|
</p></div><div class="div4">
|
|
<h5><a id="float-canonical-representation" name="float-canonical-representation"/>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.
|
|
|
|
If the exponent is zero, it must be indicated by "E0".
|
|
|
|
For the mantissa, the preceding optional "+" sign is prohibited
|
|
and the decimal point is required.
|
|
|
|
Leading and trailing zeroes are prohibited subject to the following:
|
|
number representations must
|
|
be normalized such that there is a single digit
|
|
which is non-zero
|
|
to the left of the decimal point and at least a single digit to the
|
|
right of the decimal point
|
|
|
|
unless the value being represented is zero. The canonical
|
|
representation for zero is 0.0E0.
|
|
</p></div><div class="div4">
|
|
<h5><a id="float-facets" name="float-facets"/>3.2.4.3 Constraining facets</h5><p><strong>float</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="double" name="double"/>3.2.5 double</h4><p>
|
|
<span class="termdef"><a id="dt-double" name="dt-double">[Definition:]  </a>The <b>double</b>
|
|
datatype
|
|
is patterned after the
|
|
|
|
IEEE double-precision 64-bit floating point
|
|
type <a href="#ieee754">[IEEE 754-1985]</a>. The basic <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
of <b>double</b> consists of the values
|
|
<em>m × 2^e</em>, where <em>m</em>
|
|
is an integer whose absolute value is less than
|
|
<em>2^53</em>, and <em>e</em> is an
|
|
integer between -1075 and 970, inclusive. In addition to the basic
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> described above, the
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>double</b> also contains
|
|
the following
|
|
three
|
|
<em>special values</em>:
|
|
|
|
positive and negative infinity and not-a-number
|
|
(NaN).
|
|
The <a class="termref" href="#dt-order-relation"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a> on <b>double</b>
|
|
is: <em>x < y iff y - x</em> is positive
|
|
for x and y in the value space.
|
|
Positive infinity is greater than all other non-NaN values.
|
|
NaN equals itself but is <a class="termref" href="#dt-incomparable"><span class="arrow">·</span>incomparable<span class="arrow">·</span></a> with (neither greater than nor less than)
|
|
any other value in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>.
|
|
|
|
</span>
|
|
</p><div class="note"><b>Note: </b>
|
|
|
|
"Equality" in this Recommendation is defined to be "identity" (i.e., values that
|
|
are identical in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> are equal and vice versa).
|
|
Identity must be used for the few operations that are defined in this Recommendation.
|
|
Applications using any of the datatypes defined in this Recommendation may use different
|
|
definitions of equality for computational purposes; <a href="#ieee754">[IEEE 754-1985]</a>-based computation systems
|
|
are examples. Nothing in this Recommendation should be construed as requiring that
|
|
such applications use identity as their equality relationship when computing.
|
|
|
|
<p/>
|
|
|
|
Any value <a class="termref" href="#dt-incomparable"><span class="arrow">·</span>incomparable<span class="arrow">·</span></a> with the value used for the four bounding facets
|
|
(<a class="termref" href="#dt-minInclusive"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a>, <a class="termref" href="#dt-maxInclusive"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a>,
|
|
<a class="termref" href="#dt-minExclusive"><span class="arrow">·</span>minExclusive<span class="arrow">·</span></a>, and <a class="termref" href="#dt-maxExclusive"><span class="arrow">·</span>maxExclusive<span class="arrow">·</span></a>) will be
|
|
excluded from the resulting restricted <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>. In particular,
|
|
when "NaN" is used as a facet value for a bounding facet, since no other
|
|
<b>double</b> values are <a class="termref" href="#dt-comparable"><span class="arrow">·</span>comparable<span class="arrow">·</span></a> with it, the result is a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
either having NaN as its only member (the inclusive cases) or that is empty
|
|
(the exclusive cases). If any other value is used for a bounding facet,
|
|
NaN will be excluded from the resulting restricted <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>;
|
|
to add NaN back in requires union with the NaN-only space.
|
|
|
|
<p/>
|
|
|
|
This datatype differs from that of <a href="#ieee754">[IEEE 754-1985]</a> in that there is only one
|
|
NaN and only one zero. This makes the equality and ordering of values in the data
|
|
space differ from that of <a href="#ieee754">[IEEE 754-1985]</a> only in that for schema purposes NaN = NaN.
|
|
|
|
</div><p>
|
|
A literal in the <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> representing a
|
|
decimal number <em>d</em> maps to the normalized value
|
|
in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>double</b> that is
|
|
closest to <em>d</em>; if <em>d</em> is
|
|
exactly halfway between two such values then the even value is chosen.
|
|
This is the <em>best approximation</em> of <em>d</em>
|
|
(<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 id="double-lexical-representation" name="double-lexical-representation"/>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 class="termref" href="#dt-must"><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 <em>special values</em>
|
|
|
|
positive
|
|
and negative infinity and not-a-number have lexical representations
|
|
|
|
<code>INF</code>, <code>-INF</code> and
|
|
<code>NaN</code>, respectively.
|
|
|
|
Lexical representations for zero may take a positive or negative sign.
|
|
|
|
</p><p>
|
|
For example, <code>-1E4, 1267.43233E12, 12.78e-2, 12</code>
|
|
<code>, -0, 0</code>
|
|
and <code>INF</code>
|
|
are all legal literals for <b>double</b>.
|
|
</p></div><div class="div4">
|
|
<h5><a id="double-canonical-representation" name="double-canonical-representation"/>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.
|
|
|
|
If the exponent is zero, it must be indicated by "E0".
|
|
|
|
For the mantissa, the preceding optional "+" sign is prohibited
|
|
and the decimal point is required.
|
|
|
|
Leading and trailing zeroes are prohibited subject to the following:
|
|
number representations must
|
|
be normalized such that there is a single digit
|
|
which is non-zero
|
|
to the left of the decimal point and at least a single digit to the
|
|
right of the decimal point
|
|
|
|
unless the value being represented is zero. The canonical
|
|
representation for zero is 0.0E0.
|
|
</p></div><div class="div4">
|
|
<h5><a id="double-facets" name="double-facets"/>3.2.5.3 Constraining facets</h5><p><strong>double</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="duration" name="duration"/>3.2.6 duration</h4><p>
|
|
<span class="termdef"><a id="dt-duration" name="dt-duration">[Definition:]  </a>
|
|
<b>duration</b> represents a duration of time.
|
|
The <a class="termref" href="#dt-value-space"><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="note"><a id="year-sec-conformance" name="year-sec-conformance"/><p class="prefix"><b>Note:</b></p>
|
|
All <a class="termref" href="#dt-minimally-conforming"><span class="arrow">·</span>minimally conforming<span class="arrow">·</span></a> processors <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a>
|
|
support year values with a minimum of 4 digits (i.e., <code>YYYY</code>) and a minimum fractional second precision of milliseconds or three decimal digits (i.e. <code>s.sss</code>). However,
|
|
<a class="termref" href="#dt-minimally-conforming"><span class="arrow">·</span>minimally conforming<span class="arrow">·</span></a> processors <a class="termref" href="#dt-may"><span class="arrow">·</span>may<span class="arrow">·</span></a>
|
|
set an application-defined limit on the maximum number of digits
|
|
they are prepared to support in these two cases, in which case that application-defined
|
|
maximum number <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be clearly documented.
|
|
</div><div class="div4">
|
|
<h5><a id="duration-lexical-repr" name="duration-lexical-repr"/>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<em>n</em>Y<em>n</em>
|
|
M<em>n</em>DT<em>n</em>H <em>n</em>M<em>n</em>S, where
|
|
<em>n</em>Y represents the number of years, <em>n</em>M the
|
|
number of months, <em>n</em>D the number of days, 'T' is the
|
|
date/time separator, <em>n</em>H the number of hours,
|
|
<em>n</em>M the number of minutes and <em>n</em>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
|
|
unsigned integer, i.e., an integer that
|
|
conforms to the pattern <code>[0-9]+</code>..
|
|
Similarly, the value of the Seconds component
|
|
allows an arbitrary unsigned decimal.
|
|
Following <a href="#ISO8601">[ISO 8601]</a>, at least one digit must
|
|
follow the decimal point if it appears. That is, the value of the Seconds component
|
|
must conform to the pattern <code>[0-9]+(\.[0-9]+)?</code>.
|
|
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 class="termref" href="#dt-may"><span class="arrow">·</span>may<span class="arrow">·</span></a>
|
|
be omitted. However, at least one number and its designator <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a>
|
|
be present.
|
|
</li><li>
|
|
The seconds part <a class="termref" href="#dt-may"><span class="arrow">·</span>may<span class="arrow">·</span></a> have a decimal fraction.
|
|
</li><li>
|
|
The designator 'T' must
|
|
be absent if and only 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 id="duration-order" name="duration-order"/>3.2.6.2 Order relation on duration</h5><p>
|
|
In general, the <a class="termref" href="#dt-order-relation"><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 class="termref" href="#dt-order-relation"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a>
|
|
of two <b>duration</b> values <em>x</em> and
|
|
<em>y</em> is <em>x < y iff s+x < s+y</em>
|
|
for each qualified <a href="#dateTime">dateTime</a> <em> s</em>
|
|
in the list below. These values for <em>s</em> 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 cellpadding="4" cellspacing="0" border="1"><tbody><tr><th> </th><th style="background-color:#FFFF99" colspan="7">Relation</th></tr><tr><td style="background-color:#FFFF99">P<b>1Y</b></td><td>> P<b>364D</b></td><td><> P<b>365D</b></td><td colspan="3"> </td><td><> P<b>366D</b></td><td>< P<b>367D</b></td></tr><tr><td style="background-color:#FFFF99">P<b>1M</b></td><td>> P<b>27D</b></td><td><> P<b>28D</b></td><td colspan="2"><> P<b>29D</b></td><td><> P<b>30D</b></td><td><> P<b>31D</b></td><td>< P<b>32D</b></td></tr><tr><td style="background-color:#FFFF99">P<b>5M</b></td><td>> P<b>149D</b></td><td><> P<b>150D</b></td><td><> P<b>151D</b></td><td colspan="2"><> P<b>152D</b></td><td><> P<b>153D</b></td><td>< 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 cellpadding="2" cellspacing="0" border="1"><tbody><tr><th align="center"> </th><th style="background-color: #FFFF99" align="center">Months</th><th style="background-color: #FFFF99" align="center">1</th><th style="background-color: #FFFF99" align="center">2</th><th style="background-color: #FFFF99" align="center">3</th><th style="background-color: #FFFF99" align="center">4</th><th style="background-color: #FFFF99" align="center">5</th><th style="background-color: #FFFF99" align="center">6</th><th style="background-color: #FFFF99" align="center">7</th><th style="background-color: #FFFF99" align="center">8</th><th style="background-color: #FFFF99" align="center">9</th><th style="background-color: #FFFF99" align="center">10</th><th style="background-color: #FFFF99" align="center">11</th><th style="background-color: #FFFF99" align="center">12</th><th style="background-color: #FFFF99" align="center">13</th><th style="background-color: #FFFF99" align="center">...</th></tr><tr><th style="background-color: #FFFF99" rowspan="2" align="center">Days</th><th style="background-color: #FFFF99" align="center">Minimum</th><td align="center">28</td><td align="center">59</td><td align="center">89</td><td align="center">120</td><td align="center">150</td><td align="center">181</td><td align="center">212</td><td align="center">242</td><td align="center">273</td><td align="center">303</td><td align="center">334</td><td align="center">365</td><td align="center">393</td><td align="center">...</td></tr><tr><th style="background-color: #FFFF99" align="center">Maximum</th><td align="center">31</td><td align="center">62</td><td align="center">92</td><td align="center">123</td><td align="center">153</td><td align="center">184</td><td align="center">215</td><td align="center">245</td><td align="center">276</td><td align="center">306</td><td align="center">337</td><td align="center">366</td><td align="center">397</td><td align="center">...</td></tr></tbody></table></div><div class="div4">
|
|
<h5><a id="facet-comparison-for-durations" name="facet-comparison-for-durations"/>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 id="total-order-durations" name="total-order-durations"/>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 id="duration-facets" name="duration-facets"/>3.2.6.5 Constraining facets</h5><p><strong>duration</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="dateTime" name="dateTime"/>3.2.7 dateTime</h4><p>
|
|
<span class="termdef"><a id="dt-dateTime" name="dt-dateTime">[Definition:]  </a>
|
|
<b>dateTime</b> values may be viewed as objects with integer-valued
|
|
year, month, day, hour and minute properties, a decimal-valued second property,
|
|
and a boolean timezoned property.
|
|
Each such object also has one decimal-valued
|
|
method or computed property, timeOnTimeline, whose value is always a decimal
|
|
number; the values are dimensioned in seconds, the integer 0 is
|
|
0001-01-01T00:00:00 and the value of timeOnTimeline for other <b>dateTime</b>
|
|
values is computed using the Gregorian algorithm as modified for leap-seconds.
|
|
The timeOnTimeline values form two related "timelines", one for timezoned
|
|
values and one for non-timezoned values.
|
|
Each timeline is a copy of the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <a href="#decimal">decimal</a>,
|
|
with integers given units of seconds.
|
|
</span>
|
|
</p><p>
|
|
The <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<b>dateTime</b> is closely related to the dates and times described in ISO 8601.
|
|
For clarity, the text above specifies a particular origin point for the
|
|
timeline.
|
|
It should be noted, however, that schema processors need not expose the
|
|
timeOnTimeline value to schema users, and there is no requirement that a
|
|
timeline-based implementation use the particular origin described here in
|
|
its internal representation.
|
|
Other interpretations of the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> which lead to the
|
|
same results (i.e., are isomorphic) are of course acceptable.
|
|
</p><p>
|
|
All timezoned times are Coordinated Universal Time (UTC, sometimes called
|
|
"Greenwich Mean Time"). Other timezones indicated in lexical representations
|
|
are converted to UTC during conversion of literals to values.
|
|
"Local" or untimezoned times are presumed to be the time in the timezone of some
|
|
unspecified locality as prescribed by the appropriate legal authority;
|
|
currently there are no legally prescribed timezones which are durations
|
|
whose magnitude is greater than 14 hours. The value of each numeric-valued property
|
|
(other than timeOnTimeline) is limited to the maximum value within the interval
|
|
determined by the next-higher property. For example, the day value can never be 32,
|
|
and cannot even be 29 for month 02 and year 2002 (February 2002).
|
|
</p><div class="note"><a id="year-zero" name="year-zero"/><p class="prefix"><b>Note:</b></p>The date and time datatypes described in this recommendation were inspired
|
|
by <a href="#ISO8601">[ISO 8601]</a>. '0001' is the lexical representation of the year 1 of the Common Era
|
|
(1
|
|
CE, sometimes written "AD 1" or "1 AD"). There is no year 0, and '0000' is not a valid lexical representation. '-0001' is the lexical representation of the year 1 Before
|
|
Common Era (1 BCE, sometimes written "1 BC").<p/>Those using this (1.0) version of this Recommendation to
|
|
represent negative years should be aware that the interpretation of lexical
|
|
representations beginning with a <code>'-'</code> is likely to change in
|
|
subsequent versions.<p/>
|
|
<a href="#ISO8601">[ISO 8601]</a>
|
|
makes no mention of the year 0; in <a href="#ISO8601-1998">[ISO 8601:1998 Draft Revision]</a>
|
|
the form '0000' was disallowed and this recommendation disallows it as well.
|
|
However, <a href="#ISO8601-2000">[ISO 8601:2000 Second Edition]</a>, which became available just as we were completing version
|
|
1.0, allows the form '0000', representing the year 1 BCE. A number of external commentators
|
|
have also suggested that '0000' be
|
|
allowed, as the lexical representation for 1 BCE, which is the normal usage in
|
|
astronomical contexts.
|
|
It is the intention of the XML Schema
|
|
Working Group to allow '0000' as a lexical representation in the
|
|
<b>dateTime</b>, <b>date</b>, <b>gYear</b>, and
|
|
<b>gYearMonth</b> datatypes in a subsequent version
|
|
of this Recommendation. '0000' will be the lexical representation of 1
|
|
BCE (which is a leap year), '-0001' will become the lexical representation of 2
|
|
BCE (not 1 BCE as in this (1.0) version), '-0002' of 3 BCE, etc.
|
|
</div><div class="note"><b>Note: </b>See the conformance note in <a href="#year-sec-conformance"> (§3.2.6)</a> which
|
|
applies to this datatype as well.</div><div class="div4">
|
|
<h5><a id="dateTime-lexical-representation" name="dateTime-lexical-representation"/>3.2.7.1 Lexical representation</h5><p>
|
|
The <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <b>dateTime</b> consists of
|
|
finite-length sequences of characters of the form:
|
|
<code>'-'? yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s+)? (zzzzzz)?</code>,
|
|
where
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</p><ul><li>'-'? <em>yyyy</em> is a four-or-more digit optionally negative-signed
|
|
numeral that represents the year; if more than four digits, leading zeros
|
|
are prohibited, and '0000' is prohibited (see the Note above <a href="#year-zero"> (§3.2.7)</a>; also note that a plus sign is <b>not</b> permitted);</li><li>the remaining '-'s are separators between parts of the date portion;</li><li>the first <em>mm</em> is a two-digit numeral that represents the month;</li><li><em>dd</em> is a two-digit numeral that represents the day;</li><li>'T' is a separator indicating that time-of-day follows;</li><li><em>hh</em> is a two-digit numeral that represents the hour; '24' is permitted if the
|
|
minutes and seconds represented are zero, and the <b>dateTime</b> value so
|
|
represented is the first instant of the following day (the hour property of a
|
|
<b>dateTime</b> object in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> cannot have
|
|
a value greater than 23);</li><li>':' is a separator between parts of the time-of-day portion;</li><li>the second <em>mm</em> is a two-digit numeral that represents the minute;</li><li><em>ss</em> is a two-integer-digit numeral that represents the
|
|
whole seconds;</li><li>'.' <em>s+</em> (if present) represents the
|
|
fractional seconds;</li><li><em>zzzzzz</em> (if present) represents the timezone (as described below).</li></ul><p>
|
|
For example, 2002-10-10T12:00:00-05:00 (noon on 10 October 2002, Central Daylight
|
|
Savings Time as well as Eastern Standard Time in the U.S.) is 2002-10-10T17:00:00Z,
|
|
five hours later than 2002-10-10T12:00:00Z.
|
|
</p><p>
|
|
For further guidance on arithmetic with <b>dateTime</b>s and durations,
|
|
see <a href="#adding-durations-to-dateTimes">Adding durations to dateTimes (§E)</a>.
|
|
</p></div><div class="div4">
|
|
<h5><a id="dateTime-canonical-representation" name="dateTime-canonical-representation"/>3.2.7.2 Canonical representation</h5><p>
|
|
Except for trailing fractional zero digits in the seconds representation,
|
|
'24:00:00' time representations, and timezone (for timezoned values), the mapping
|
|
from literals to values is one-to-one. Where there is more than
|
|
one possible representation, the canonical representation is as follows:
|
|
|
|
</p><ul><li>The 2-digit numeral representing the hour must not be '<code>24</code>';</li><li>The fractional second string, if present, must not end in '<code>0</code>';</li><li>for timezoned values, the timezone must be
|
|
represented with '<code>Z</code>'
|
|
(All timezoned <b>dateTime</b> values are UTC.).</li></ul><p>
|
|
</p></div><div class="div4">
|
|
<h5><a id="dateTime-timezones" name="dateTime-timezones"/>3.2.7.3 Timezones</h5><p>
|
|
Timezones are durations with (integer-valued) hour and minute properties
|
|
(with the hour magnitude limited to at most 14, and the minute magnitude
|
|
limited to at most 59, except that if the hour magnitude is 14, the minute
|
|
value must be 0); they may be both positive or both negative.
|
|
</p><p>
|
|
The lexical representation of a timezone is a string of the form:
|
|
<code>(('+' | '-') hh ':' mm) | 'Z'</code>,
|
|
where</p><ul><li><em>hh</em> is a two-digit numeral (with leading zeros as required) that
|
|
represents the hours,</li><li><em>mm</em> is a two-digit numeral that represents the minutes,</li><li>'+' indicates a nonnegative duration,</li><li>'-' indicates a nonpositive duration.</li></ul><p>The mapping so defined is one-to-one, except that '+00:00', '-00:00', and 'Z'
|
|
all represent the same zero-length duration timezone, UTC; 'Z' is its canonical
|
|
representation.</p><p>
|
|
When a timezone is added to a UTC <b>dateTime</b>, the result is the date
|
|
and time "in that timezone". For example, 2002-10-10T12:00:00+05:00 is
|
|
2002-10-10T07:00:00Z and 2002-10-10T00:00:00+05:00 is 2002-10-09T19:00:00Z.
|
|
</p></div><div class="div4">
|
|
<h5><a id="dateTime-order" name="dateTime-order"/>3.2.7.4 Order relation on dateTime</h5><p>
|
|
<b>dateTime</b> value objects on either timeline are totally ordered by their timeOnTimeline
|
|
values; between the two timelines, <b>dateTime</b> value objects are ordered by their
|
|
timeOnTimeline values when their timeOnTimeline values differ by more than
|
|
fourteen hours, with those whose difference is a duration of 14 hours or less
|
|
being <a class="termref" href="#dt-incomparable"><span class="arrow">·</span>incomparable<span class="arrow">·</span></a>.
|
|
</p><p>
|
|
In general, the <a class="termref" href="#dt-order-relation"><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. <em>This is a logical explanation of the process. Actual
|
|
implementations are free to optimize as long as they produce the same results.</em>
|
|
</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 class="enumar"><li>For each i in {year, month, day, hour, minute, second}
|
|
<ol class="enumla"><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 class="enumar"><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 class="enumar"><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 cellpadding="4" cellspacing="0" border="1"><tbody><tr><th style="background-color: #FFFF99" align="center">Determinate</th><th style="background-color: #FFFF99" align="center">Indeterminate</th></tr><tr><td align="center">2000-01-15T00:00:00 <b><</b> 2000-02-15T00:00:00</td><td align="center">2000-01-01T12:00:00 <b><></b>
|
|
1999-12-31T23:00:00Z</td></tr><tr><td align="center">2000-01-15T12:00:00 <b><</b> 2000-01-16T12:00:00Z</td><td align="center">2000-01-16T12:00:00 <b><></b>
|
|
2000-01-16T12:00:00Z</td></tr><tr><td align="center"> </td><td align="center">2000-01-16T00:00:00 <b><></b> 2000-01-16T12:00:00Z</td></tr></tbody></table></div><div class="div4">
|
|
<h5><a id="totally-ordered-instants" name="totally-ordered-instants"/>3.2.7.5 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 id="dateTime-facets" name="dateTime-facets"/>3.2.7.6 Constraining facets</h5><p><strong>dateTime</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="time" name="time"/>3.2.8 time</h4><p>
|
|
<span class="termdef"><a id="dt-time" name="dt-time">[Definition:]  </a><b>time</b>
|
|
represents an instant of time that recurs every day. The
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>time</b> is the space
|
|
of <em>time of day</em> 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.4)</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="note"><b>Note: </b>See the conformance note in <a href="#year-sec-conformance"> (§3.2.6)</a> which
|
|
applies to the seconds part of this datatype as well.</div><div class="div4">
|
|
<h5><a id="time-lexical-repr" name="time-lexical-repr"/>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 id="time-canonical-repr" name="time-canonical-repr"/>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 id="time-facets" name="time-facets"/>3.2.8.3 Constraining facets</h5><p><strong>time</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="date" name="date"/>3.2.9 date</h4><p>
|
|
<span class="termdef"><a id="dt-date" name="dt-date">[Definition:]  </a>
|
|
The <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>date</b>
|
|
consists of top-open intervals of exactly one day in length on the timelines of
|
|
<a href="#dateTime">dateTime</a>, beginning on the beginning moment of each day (in
|
|
each timezone), i.e. '00:00:00', up to but not including '24:00:00' (which is
|
|
identical with '00:00:00' of the next day). For nontimezoned values, the top-open
|
|
intervals disjointly cover the nontimezoned timeline, one per day. For timezoned
|
|
values, the intervals begin at every minute and therefore overlap.
|
|
</span>
|
|
</p><p>
|
|
A "date object" is an object with year, month, and day properties just like those
|
|
of <a href="#dateTime">dateTime</a> objects, plus an optional <em>timezone-valued</em>
|
|
timezone property. (As with values of <a href="#dateTime">dateTime</a> timezones are a
|
|
special case of durations.)
|
|
Just as a <a href="#dateTime">dateTime</a> object corresponds to a point on one of the
|
|
timelines, a <b>date</b> object corresponds to an interval on one
|
|
of the two timelines as just described.
|
|
</p><p>
|
|
Timezoned <b>date</b> values track the starting moment of their day, as
|
|
determined by their timezone; said timezone is generally recoverable for
|
|
canonical representations.
|
|
<span class="termdef"><a id="recoverable-timezone" name="recoverable-timezone">[Definition:]  </a>
|
|
The <b>recoverable timezone</b> is that duration which
|
|
is the result of subtracting the first moment (or any moment) of the timezoned
|
|
<b>date</b> from the first moment (or the corresponding moment) UTC on the
|
|
same <b>date</b>.</span> <a class="termref" href="#recoverable-timezone"><span class="arrow">·</span>recoverable timezone<span class="arrow">·</span></a>s are
|
|
always durations between '+12:00' and '-11:59'. This "timezone normalization"
|
|
(which follows automatically from the definition of the <b>date</b>
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>) is explained more in
|
|
<a href="#date-lexical-representation">Lexical representation (§3.2.9.1)</a>.
|
|
</p><p>
|
|
For example: the first moment of 2002-10-10+13:00 is 2002-10-10T00:00:00+13,
|
|
which is 2002-10-09T11:00:00Z, which is also the first moment of 2002-10-09-11:00.
|
|
Therefore 2002-10-10+13:00 is 2002-10-09-11:00; <em>they are the same interval</em>.
|
|
</p><div class="note"><b>Note: </b>
|
|
For most timezones, either the first moment or last moment of the day (a
|
|
<a href="#dateTime">dateTime</a> value, always UTC) will have a <b>date</b> portion
|
|
different from that of the <b>date</b> itself!
|
|
However, noon of that <b>date</b> (the midpoint of the interval) in that
|
|
(normalized) timezone will always have the same <b>date</b> portion as the
|
|
<b>date</b> itself, even when that noon point in time is normalized to
|
|
UTC. For example, 2002-10-10-05:00 begins during 2002-10-09Z and 2002-10-10+05:00
|
|
ends during 2002-10-11Z, but noon of both 2002-10-10-05:00 and 2002-10-10+05:00
|
|
falls in the interval which is 2002-10-10Z.
|
|
</div><div class="note"><b>Note: </b>See the conformance note in <a href="#year-sec-conformance"> (§3.2.6)</a> which
|
|
applies to the year part of this datatype as well.</div><div class="div4">
|
|
<h5><a id="date-lexical-representation" name="date-lexical-representation"/>3.2.9.1 Lexical representation</h5><p>
|
|
For the following discussion, let the "date portion" of a <a href="#dateTime">dateTime</a>
|
|
or <b>date</b> object be an object similar to a <a href="#dateTime">dateTime</a> or
|
|
<b>date</b> object, with similar year, month, and day properties, but no
|
|
others, having the same value for these properties as the original
|
|
<a href="#dateTime">dateTime</a> or <b>date</b> object.
|
|
</p><p>
|
|
The <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <b>date</b> consists of finite-length
|
|
sequences of characters of the form:
|
|
<code>'-'? yyyy '-' mm '-' dd zzzzzz?</code>
|
|
where the <b>date</b> and optional timezone are represented exactly the
|
|
same way as they are for <a href="#dateTime">dateTime</a>. The first moment of the
|
|
interval is that represented by:
|
|
<code>'-' yyyy '-' mm '-' dd 'T00:00:00' zzzzzz?</code>
|
|
and the least upper bound of the interval is the timeline point represented
|
|
(noncanonically) by:
|
|
<code>'-' yyyy '-' mm '-' dd 'T24:00:00' zzzzzz?</code>.
|
|
</p><div class="note"><b>Note: </b>
|
|
The <a class="termref" href="#recoverable-timezone"><span class="arrow">·</span>recoverable timezone<span class="arrow">·</span></a> of a <b>date</b> will always be
|
|
a duration between '+12:00' and '11:59'. Timezone lexical representations, as
|
|
explained for <a href="#dateTime">dateTime</a>, can range from '+14:00' to '-14:00'.
|
|
The result is that literals of <b>date</b>s with very large or very
|
|
negative timezones will map to a "normalized" <b>date</b> value with a
|
|
<a class="termref" href="#recoverable-timezone"><span class="arrow">·</span>recoverable timezone<span class="arrow">·</span></a> different from that represented in the original
|
|
representation, and a matching difference of +/- 1 day in the <b>date</b> itself.
|
|
</div></div><div class="div4">
|
|
<h5><a id="date-canonical-representation" name="date-canonical-representation"/>3.2.9.2 Canonical representation</h5><p>
|
|
Given a member of the <b>date</b> <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>, the
|
|
<b>date</b> portion of the canonical representation (the entire representation
|
|
for nontimezoned values, and all but the timezone representation for timezoned values)
|
|
is always the <b>date</b> portion of the <a href="#dateTime">dateTime</a> canonical
|
|
representation of the interval midpoint (the <a href="#dateTime">dateTime</a> representation,
|
|
truncated on the right to eliminate 'T' and all following characters).
|
|
For timezoned values, append the canonical representation of the <a class="termref" href="#recoverable-timezone"><span class="arrow">·</span>recoverable timezone<span class="arrow">·</span></a>.
|
|
</p></div></div><div class="div3">
|
|
<h4><a id="gYearMonth" name="gYearMonth"/>3.2.10 gYearMonth</h4><p>
|
|
<span class="termdef"><a id="dt-gYearMonth" name="dt-gYearMonth">[Definition:]  </a>
|
|
<b>gYearMonth</b> represents a
|
|
specific gregorian month in a specific gregorian year. The
|
|
<a class="termref" href="#dt-value-space"><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.4)</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><div class="note"><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.
|
|
</div><div class="note"><b>Note: </b>See the conformance note in <a href="#year-sec-conformance"> (§3.2.6)</a> which
|
|
applies to the year part of this datatype as well.</div><div class="div4">
|
|
<h5><a id="gYearMonth-lexical-repr" name="gYearMonth-lexical-repr"/>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 id="gYearMonth-facets" name="gYearMonth-facets"/>3.2.10.2 Constraining facets</h5><p><strong>gYearMonth</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="gYear" name="gYear"/>3.2.11 gYear</h4><p>
|
|
<span class="termdef"><a id="dt-gYear" name="dt-gYear">[Definition:]  </a>
|
|
<b>gYear</b> represents a
|
|
gregorian calendar year. The <a class="termref" href="#dt-value-space"><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.4)</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><div class="note"><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.
|
|
</div><div class="note"><b>Note: </b>See the conformance note in <a href="#year-sec-conformance"> (§3.2.6)</a> which
|
|
applies to the year part of this datatype as well.</div><div class="div4">
|
|
<h5><a id="gYear-lexical-repr" name="gYear-lexical-repr"/>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 id="gYear-facets" name="gYear-facets"/>3.2.11.2 Constraining facets</h5><p><strong>gYear</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="gMonthDay" name="gMonthDay"/>3.2.12 gMonthDay</h4><p>
|
|
<span class="termdef"><a id="dt-gMonthDay" 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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<b>gMonthDay</b> is the set of <em>calendar
|
|
dates</em>, 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,
|
|
in an arbitrary leap year, 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.4)</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><div class="note"><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.
|
|
</div><div class="div4">
|
|
<h5><a id="gMonthDay-lexical-repr" name="gMonthDay-lexical-repr"/>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 id="gMonthDay-facets" name="gMonthDay-facets"/>3.2.12.2 Constraining facets</h5><p><strong>gMonthDay</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="gDay" name="gDay"/>3.2.13 gDay</h4><p>
|
|
<span class="termdef"><a id="dt-gDay" 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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
of <b>gDay</b> is the space of a set of <em>calendar
|
|
dates</em> 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,
|
|
in an arbitrary month that has 31 days,
|
|
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.4)</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><div class="note"><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.
|
|
</div><div class="div4">
|
|
<h5><a id="gDay-lexical-repr" name="gDay-lexical-repr"/>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 id="gDay-facets" name="gDay-facets"/>3.2.13.2 Constraining facets</h5><p><strong>gDay</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="gMonth" name="gMonth"/>3.2.14 gMonth</h4><p>
|
|
<span class="termdef"><a id="dt-gMonth" name="dt-gMonth">[Definition:]  </a>
|
|
<b>gMonth</b> is a gregorian month that recurs every year.
|
|
The <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
of <b>gMonth</b> is the space of a set of <em>calendar
|
|
months</em> 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.4)</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><div class="note"><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.
|
|
</div><div class="div4">
|
|
<h5><a id="gMonth-lexical-repr" name="gMonth-lexical-repr"/>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 id="gMonth-facets" name="gMonth-facets"/>3.2.14.2 Constraining facets</h5><p><strong>gMonth</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="hexBinary" name="hexBinary"/>3.2.15 hexBinary</h4><p>
|
|
<span class="termdef"><a id="dt-hexBinary" name="dt-hexBinary">[Definition:]  </a>
|
|
<b>hexBinary</b> represents
|
|
arbitrary hex-encoded binary data. The <a class="termref" href="#dt-value-space"><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 id="hexBinary-lexical-representation" name="hexBinary-lexical-representation"/>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 <em>hex</em> encoding for the 16-bit integer 4023
|
|
(whose binary representation is 111110110111).
|
|
</p></div><div class="div4">
|
|
<h5><a id="hexBinary-canonical-repr" name="hexBinary-canonical-repr"/>3.2.15.2 Canonical Representation</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 id="hexBinary-facets" name="hexBinary-facets"/>3.2.15.3 Constraining facets</h5><p><strong>hexBinary</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="base64Binary" name="base64Binary"/>3.2.16 base64Binary</h4><p>
|
|
<span class="termdef"><a id="dt-base64Binary" name="dt-base64Binary">[Definition:]  </a>
|
|
<b>base64Binary</b>
|
|
represents Base64-encoded arbitrary binary data. The <a class="termref" href="#dt-value-space"><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
|
|
|
|
Alphabet in
|
|
<a href="#RFC2045">[RFC 2045]</a>.
|
|
</span>
|
|
</p><p>
|
|
The lexical forms of <b>base64Binary</b> values are limited to the 65 characters
|
|
of the Base64 Alphabet defined in <a href="#RFC2045">[RFC 2045]</a>, i.e., <code>a-z</code>,
|
|
<code>A-Z</code>, <code>0-9</code>, the plus sign (+), the forward slash (/) and the
|
|
equal sign (=), together with the characters defined in <a href="#XML">[XML 1.0 (Second Edition)]</a> as white space.
|
|
No other characters are allowed.
|
|
</p><p>
|
|
For compatibility with older mail gateways, <a href="#RFC2045">[RFC 2045]</a> suggests that
|
|
base64 data should have lines limited to at most 76 characters in length. This
|
|
line-length limitation is not mandated in the lexical forms of <b>base64Binary</b>
|
|
data and must not be enforced by XML Schema processors.
|
|
</p><p>
|
|
The lexical space of <b>base64Binary</b> is given by the following grammar
|
|
(the notation is that used in <a href="#XML">[XML 1.0 (Second Edition)]</a>); legal lexical forms must match
|
|
the <b>Base64Binary</b> production.
|
|
</p><p>
|
|
<code>Base64Binary  ::=  ((B64S B64S B64S B64S)*<br/>
|
|
                     ((B64S B64S B64S B64) |<br/>
|
|
                      (B64S B64S B16S '=') |<br/>
|
|
                      (B64S B04S '=' #x20? '=')))?<br/><br/>B64S         ::= B64 #x20?<br/><br/>
|
|
B16S         ::= B16 #x20?<br/><br/>
|
|
B04S         ::= B04 #x20?</code>
|
|
<code>
|
|
<br/><br/>
|
|
B04         ::=  [AQgw]<br/>
|
|
B16         ::=  [AEIMQUYcgkosw048]<br/>
|
|
B64         ::=  [A-Za-z0-9+/]
|
|
</code>
|
|
</p><p>
|
|
Note that this grammar requires the number of non-whitespace characters in the lexical
|
|
form to be a multiple of four, and for equals signs to appear only at the end of the
|
|
lexical form; strings which do not meet these constraints are not legal lexical forms
|
|
of <b>base64Binary</b> because they cannot successfully be decoded by base64
|
|
decoders.
|
|
</p><div class="note"><b>Note: </b>The above definition of the lexical space is more restrictive than that
|
|
given in <a href="#RFC2045">[RFC 2045]</a> as regards whitespace -- this is not an issue
|
|
in practice. Any string compatible with the RFC can occur in
|
|
an element or attribute validated by this type, because the <a class="termref" href="#dt-whiteSpace"><span class="arrow">·</span>whiteSpace<span class="arrow">·</span></a> facet of this type is fixed
|
|
to <i>collapse</i>, which means that all leading and trailing whitespace
|
|
will be stripped, and all internal whitespace collapsed to single space
|
|
characters, <em>before</em> the above grammar is enforced.</div><p>
|
|
The canonical lexical form of a <b>base64Binary</b> data value is the base64
|
|
encoding of the value which matches the Canonical-base64Binary production in the following
|
|
grammar:
|
|
</p><p>
|
|
<code>Canonical-base64Binary  ::=  (B64
|
|
B64 B64 B64)*<br/>
|
|
                               ((B64 B64 B16 '=') | (B64 B04 '=='))?</code>
|
|
</p><div class="note"><b>Note: </b>For some values the canonical form defined above does not conform to
|
|
<a href="#RFC2045">[RFC 2045]</a>, which requires
|
|
breaking with linefeeds at appropriate intervals.</div><p>
|
|
The length of a <b>base64Binary</b> value is the number of octets it contains.
|
|
This may be calculated from the lexical form by removing whitespace and padding characters
|
|
and performing the calculation shown in the pseudo-code below:
|
|
</p><p>
|
|
<code>
|
|
lex2    := killwhitespace(lexform)    -- remove whitespace characters<br/>
|
|
lex3    := strip_equals(lex2)         -- strip padding characters at end<br/>
|
|
length  := floor (length(lex3) * 3 / 4)         -- calculate length
|
|
</code>
|
|
</p><p>
|
|
Note on encoding: <a href="#RFC2045">[RFC 2045]</a> explicitly references US-ASCII encoding. However,
|
|
decoding of <b>base64Binary</b> data in an XML entity is to be performed on the
|
|
Unicode characters obtained after character encoding processing as specified by
|
|
<a href="#XML">[XML 1.0 (Second Edition)]</a>
|
|
</p><div class="div4">
|
|
<h5><a id="base64Binary-facets" name="base64Binary-facets"/>3.2.16.1 Constraining facets</h5><p><strong>base64Binary</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="anyURI" name="anyURI"/>3.2.17 anyURI</h4><p>
|
|
<span class="termdef"><a id="dt-anyURI" 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 by the URI reference escaping procedure
|
|
defined in
|
|
Section 5.4 <a href="http://www.w3.org/TR/2001/REC-xlink-20010627/#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><div class="note"><b>Note: </b>
|
|
Section 5.4 <a href="http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators">Locator Attribute</a>
|
|
of <a href="#XLink">[XML Linking Language]</a> requires that relative URI references be absolutized
|
|
as defined in <a href="#XBase">[XML Base]</a> before use. This is an XLink-specific
|
|
requirement and is not appropriate for XML Schema, since neither the
|
|
<a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> nor the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
of the <a href="#anyURI">anyURI</a> type are restricted to absolute URIs. Accordingly
|
|
absolutization must not be performed by schema processors as part of schema
|
|
validation.
|
|
</div><div class="note"><b>Note: </b>
|
|
Each URI scheme imposes specialized syntax rules for URIs in
|
|
that scheme, including restrictions on the syntax of allowed
|
|
fragment
|
|
identifiers. Because it is
|
|
impractical for processors to check that a value is a
|
|
context-appropriate URI reference, 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 class="termref" href="#dt-minimally-conforming"><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 class="termref" href="#dt-minimally-conforming"><span class="arrow">·</span>minimally conforming<span class="arrow">·</span></a> processors.
|
|
</div><div class="div4">
|
|
<h5><a id="anyURI-lexical-representation" name="anyURI-lexical-representation"/>3.2.17.1 Lexical representation</h5><p>
|
|
The <a class="termref" href="#dt-lexical-space"><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><div class="note"><b>Note: </b>
|
|
Spaces are, in principle, allowed in the <a class="termref" href="#dt-lexical-space"><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).
|
|
</div></div><div class="div4">
|
|
<h5><a id="anyURI-facets" name="anyURI-facets"/>3.2.17.2 Constraining facets</h5><p><strong>anyURI</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="QName" name="QName"/>3.2.18 QName</h4><p>
|
|
<span class="termdef"><a id="dt-QName" 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 class="termref" href="#dt-value-space"><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 class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <b>QName</b> is the set
|
|
of strings that <a class="termref" href="#dt-match"><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><div class="note"><b>Note: </b>
|
|
The mapping between literals in the <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> and
|
|
values in the <a class="termref" href="#dt-value-space"><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.
|
|
</div><div class="div4">
|
|
<h5><a id="QName-facets" name="QName-facets"/>3.2.18.1 Constraining facets</h5><p><strong>QName</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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><p>
|
|
|
|
The use of <a class="termref" href="#dt-length"><span class="arrow">·</span>length<span class="arrow">·</span></a>, <a class="termref" href="#dt-minLength"><span class="arrow">·</span>minLength<span class="arrow">·</span></a> and
|
|
<a class="termref" href="#dt-maxLength"><span class="arrow">·</span>maxLength<span class="arrow">·</span></a>
|
|
on datatypes <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#QName">QName</a> is
|
|
deprecated. Future versions of this specification may
|
|
remove these facets for this datatype.
|
|
|
|
</p></div></div><div class="div3">
|
|
<h4><a id="NOTATION" name="NOTATION"/>3.2.19 NOTATION</h4><p>
|
|
<span class="termdef"><a id="dt-NOTATION" 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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
of <b>NOTATION</b> is the set of <a href="#QName">QName</a>s
|
|
of notations declared in the current schema.
|
|
The <a class="termref" href="#dt-lexical-space"><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/2004/REC-xmlschema-1-20041028/structures.html#declare-notation">notations</a>
|
|
declared in the current schema (in the form of <a href="#QName">QName</a>s).
|
|
</span>
|
|
</p><div class="constraintnote"><a name="enumeration-required-notation" id="enumeration-required-notation"/><b>Schema Component Constraint: enumeration facet value required for NOTATION</b><br/><div class="constraint">
|
|
It is an <a class="termref" href="#dt-error"><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 class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <b>NOTATION</b> by
|
|
specifying a value for <a class="termref" href="#dt-enumeration"><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
|
|
and should only be used in schemas with no
|
|
target namespace.
|
|
</p><div class="div4">
|
|
<h5><a id="NOTATION-facets" name="NOTATION-facets"/>3.2.19.1 Constraining facets</h5><p><strong>NOTATION</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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><p>
|
|
|
|
The use of <a class="termref" href="#dt-length"><span class="arrow">·</span>length<span class="arrow">·</span></a>, <a class="termref" href="#dt-minLength"><span class="arrow">·</span>minLength<span class="arrow">·</span></a> and <a class="termref" href="#dt-maxLength"><span class="arrow">·</span>maxLength<span class="arrow">·</span></a>
|
|
on datatypes <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#NOTATION">NOTATION</a> is
|
|
deprecated. Future versions of this specification may
|
|
remove these facets for this datatype.
|
|
|
|
</p></div></div></div><div class="div2">
|
|
<h3 class="withToc"><span class="nav"><a class="nav" href="#built-in-primitive-datatypes"><img src="previous.jpg" alt="previous sub-section"/></a> </span><a id="built-in-derived" name="built-in-derived"/>3.3 Derived datatypes</h3><div class="localToc">        3.3.1 <a href="#normalizedString">normalizedString</a><br/>
|
|
        3.3.2 <a href="#token">token</a><br/>
|
|
        3.3.3 <a href="#language">language</a><br/>
|
|
        3.3.4 <a href="#NMTOKEN">NMTOKEN</a><br/>
|
|
        3.3.5 <a href="#NMTOKENS">NMTOKENS</a><br/>
|
|
        3.3.6 <a href="#Name">Name</a><br/>
|
|
        3.3.7 <a href="#NCName">NCName</a><br/>
|
|
        3.3.8 <a href="#ID">ID</a><br/>
|
|
        3.3.9 <a href="#IDREF">IDREF</a><br/>
|
|
        3.3.10 <a href="#IDREFS">IDREFS</a><br/>
|
|
        3.3.11 <a href="#ENTITY">ENTITY</a><br/>
|
|
        3.3.12 <a href="#ENTITIES">ENTITIES</a><br/>
|
|
        3.3.13 <a href="#integer">integer</a><br/>
|
|
        3.3.14 <a href="#nonPositiveInteger">nonPositiveInteger</a><br/>
|
|
        3.3.15 <a href="#negativeInteger">negativeInteger</a><br/>
|
|
        3.3.16 <a href="#long">long</a><br/>
|
|
        3.3.17 <a href="#int">int</a><br/>
|
|
        3.3.18 <a href="#short">short</a><br/>
|
|
        3.3.19 <a href="#byte">byte</a><br/>
|
|
        3.3.20 <a href="#nonNegativeInteger">nonNegativeInteger</a><br/>
|
|
        3.3.21 <a href="#unsignedLong">unsignedLong</a><br/>
|
|
        3.3.22 <a href="#unsignedInt">unsignedInt</a><br/>
|
|
        3.3.23 <a href="#unsignedShort">unsignedShort</a><br/>
|
|
        3.3.24 <a href="#unsignedByte">unsignedByte</a><br/>
|
|
        3.3.25 <a href="#positiveInteger">positiveInteger</a><br/>
|
|
</div><p>
|
|
This section gives conceptual definitions for all
|
|
<a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> datatypes
|
|
defined by this specification. The XML representation used to define
|
|
<a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> datatypes (whether
|
|
<a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> or <a class="termref" href="#dt-user-derived"><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 class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> 
|
|
<a class="termref" href="#dt-derived"><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 id="normalizedString" name="normalizedString"/>3.3.1 normalizedString</h4><p>
|
|
<span class="termdef"><a id="dt-normalizedString" name="dt-normalizedString">[Definition:]  </a>
|
|
<b>normalizedString</b>
|
|
represents white space normalized strings.
|
|
The <a class="termref" href="#dt-value-space"><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 class="termref" href="#dt-lexical-space"><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),
|
|
line feed (#xA)
|
|
nor tab (#x9) characters.
|
|
The <a class="termref" href="#dt-basetype"><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 id="normalizedString-facets" name="normalizedString-facets"/>3.3.1.1 Constraining facets</h5><p><strong>normalizedString</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="normalizedString-derived-types" name="normalizedString-derived-types"/>3.3.1.2 Derived datatypes</h5><p>
|
|
The following <a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a class="termref" href="#dt-derived"><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 id="token" name="token"/>3.3.2 token</h4><p>
|
|
<span class="termdef"><a id="dt-token" name="dt-token">[Definition:]  </a>
|
|
<b>token</b>
|
|
represents tokenized strings.
|
|
The <a class="termref" href="#dt-value-space"><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
|
|
carriage return (#xD),
|
|
line feed (#xA) nor tab (#x9) characters, that have no
|
|
leading or trailing spaces (#x20) and that have no internal sequences
|
|
of two or more spaces.
|
|
The <a class="termref" href="#dt-lexical-space"><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
|
|
carriage return (#xD),
|
|
line feed (#xA) nor tab (#x9) characters, that have no
|
|
leading or trailing spaces (#x20) and that have no internal sequences
|
|
of two or more spaces.
|
|
The <a class="termref" href="#dt-basetype"><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 id="token-facets" name="token-facets"/>3.3.2.1 Constraining facets</h5><p><strong>token</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="token-derived-types" name="token-derived-types"/>3.3.2.2 Derived datatypes</h5><p>
|
|
The following <a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a class="termref" href="#dt-derived"><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 id="language" name="language"/>3.3.3 language</h4><p>
|
|
<span class="termdef"><a id="dt-language" name="dt-language">[Definition:]  </a>
|
|
<b>language</b>
|
|
represents natural language identifiers as defined by
|
|
by <a href="#RFC3066">[RFC 3066]</a>
|
|
.
|
|
The <a class="termref" href="#dt-value-space"><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
|
|
<a href="#RFC3066">[RFC 3066]</a>
|
|
.
|
|
The <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of
|
|
<b>language</b> is the set of all strings that
|
|
conform to the pattern <code>[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*</code>
|
|
.
|
|
The <a class="termref" href="#dt-basetype"><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 id="language-facets" name="language-facets"/>3.3.3.1 Constraining facets</h5><p><strong>language</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="NMTOKEN" name="NMTOKEN"/>3.3.4 NMTOKEN</h4><p>
|
|
<span class="termdef"><a id="dt-NMTOKEN" 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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<b>NMTOKEN</b> is the set of tokens that <a class="termref" href="#dt-match"><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 class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of
|
|
<b>NMTOKEN</b> is the set of strings that <a class="termref" href="#dt-match"><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 class="termref" href="#dt-basetype"><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 id="NMTOKEN-facets" name="NMTOKEN-facets"/>3.3.4.1 Constraining facets</h5><p><strong>NMTOKEN</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="NMTOKEN-derived-types" name="NMTOKEN-derived-types"/>3.3.4.2 Derived datatypes</h5><p>
|
|
The following <a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a class="termref" href="#dt-derived"><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 id="NMTOKENS" name="NMTOKENS"/>3.3.5 NMTOKENS</h4><p>
|
|
<span class="termdef"><a id="dt-NMTOKENS" 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 class="termref" href="#dt-value-space"><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 class="termref" href="#dt-NMTOKEN"><span class="arrow">·</span>NMTOKEN<span class="arrow">·</span></a>s. The <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>
|
|
of <b>NMTOKENS</b> is the set of space-separated lists of tokens,
|
|
of which each token is in the <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of
|
|
<a href="#NMTOKEN">NMTOKEN</a>. The <a class="termref" href="#dt-itemType"><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 id="NMTOKENS-facets" name="NMTOKENS-facets"/>3.3.5.1 Constraining facets</h5><p><strong>NMTOKENS</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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><li><a href="#rf-pattern">pattern</a></li></ul></div></div><div class="div3">
|
|
<h4><a id="Name" name="Name"/>3.3.6 Name</h4><p>
|
|
<span class="termdef"><a id="dt-Name" 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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>Name</b> is
|
|
the set of all strings which <a class="termref" href="#dt-match"><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 class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of
|
|
<b>Name</b> is the set of all strings which <a class="termref" href="#dt-match"><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 class="termref" href="#dt-basetype"><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 id="Name-facets" name="Name-facets"/>3.3.6.1 Constraining facets</h5><p><strong>Name</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="Name-derived-types" name="Name-derived-types"/>3.3.6.2 Derived datatypes</h5><p>
|
|
The following <a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a class="termref" href="#dt-derived"><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 id="NCName" name="NCName"/>3.3.7 NCName</h4><p>
|
|
<span class="termdef"><a id="dt-NCName" name="dt-NCName">[Definition:]  </a>
|
|
<b>NCName</b> represents XML
|
|
"non-colonized" Names. The <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<b>NCName</b> is the set of all strings which <a class="termref" href="#dt-match"><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 class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of
|
|
<b>NCName</b> is the set of all strings which <a class="termref" href="#dt-match"><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 class="termref" href="#dt-basetype"><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 id="NCName-facets" name="NCName-facets"/>3.3.7.1 Constraining facets</h5><p><strong>NCName</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="NCName-derived-types" name="NCName-derived-types"/>3.3.7.2 Derived datatypes</h5><p>
|
|
The following <a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a class="termref" href="#dt-derived"><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 id="ID" name="ID"/>3.3.8 ID</h4><p>
|
|
<span class="termdef"><a id="dt-ID" 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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<b>ID</b> is the set of all strings that <a class="termref" href="#dt-match"><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 class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <b>ID</b> is the set of all
|
|
strings that <a class="termref" href="#dt-match"><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 class="termref" href="#dt-basetype"><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 id="ID-facets" name="ID-facets"/>3.3.8.1 Constraining facets</h5><p><strong>ID</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="IDREF" name="IDREF"/>3.3.9 IDREF</h4><p>
|
|
<span class="termdef"><a id="dt-IDREF" 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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<b>IDREF</b> is the set of all strings that <a class="termref" href="#dt-match"><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 class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <b>IDREF</b> is the set of
|
|
strings that <a class="termref" href="#dt-match"><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 class="termref" href="#dt-basetype"><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 id="IDREF-facets" name="IDREF-facets"/>3.3.9.1 Constraining facets</h5><p><strong>IDREF</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="IDREF-derived-types" name="IDREF-derived-types"/>3.3.9.2 Derived datatypes</h5><p>
|
|
The following <a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a class="termref" href="#dt-derived"><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 id="IDREFS" name="IDREFS"/>3.3.10 IDREFS</h4><p>
|
|
<span class="termdef"><a id="dt-IDREFS" 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 class="termref" href="#dt-value-space"><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 class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <b>IDREFS</b> is the
|
|
set of space-separated lists of tokens, of which each token is in the
|
|
<a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <a href="#IDREF">IDREF</a>.
|
|
The <a class="termref" href="#dt-itemType"><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 id="IDREFS-facets" name="IDREFS-facets"/>3.3.10.1 Constraining facets</h5><p><strong>IDREFS</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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><li><a href="#rf-pattern">pattern</a></li></ul></div></div><div class="div3">
|
|
<h4><a id="ENTITY" name="ENTITY"/>3.3.11 ENTITY</h4><p>
|
|
<span class="termdef"><a id="dt-ENTITY" 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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<b>ENTITY</b> is the set of all strings that <a class="termref" href="#dt-match"><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 class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <b>ENTITY</b> is the set
|
|
of all strings that <a class="termref" href="#dt-match"><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 class="termref" href="#dt-basetype"><span class="arrow">·</span>base type<span class="arrow">·</span></a> of <b>ENTITY</b> is <a href="#NCName">NCName</a>.
|
|
</span>
|
|
</p><div class="note"><b>Note: </b>
|
|
The <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>ENTITY</b> is scoped
|
|
to a specific instance document.
|
|
</div><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 id="ENTITY-facets" name="ENTITY-facets"/>3.3.11.1 Constraining facets</h5><p><strong>ENTITY</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="ENTITY-derived-types" name="ENTITY-derived-types"/>3.3.11.2 Derived datatypes</h5><p>
|
|
The following <a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a class="termref" href="#dt-derived"><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 id="ENTITIES" name="ENTITIES"/>3.3.12 ENTITIES</h4><p>
|
|
<span class="termdef"><a id="dt-ENTITIES" 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 class="termref" href="#dt-value-space"><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 class="termref" href="#dt-ENTITY"><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 class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <b>ENTITIES</b> is the
|
|
set of space-separated lists of tokens, of which each token is in the
|
|
<a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <a href="#ENTITY">ENTITY</a>.
|
|
The <a class="termref" href="#dt-itemType"><span class="arrow">·</span>itemType<span class="arrow">·</span></a> of <b>ENTITIES</b> is
|
|
<a href="#ENTITY">ENTITY</a>.
|
|
</span>
|
|
</p><div class="note"><b>Note: </b>
|
|
The <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>ENTITIES</b> is scoped
|
|
to a specific instance document.
|
|
</div><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 id="ENTITIES-facets" name="ENTITIES-facets"/>3.3.12.1 Constraining facets</h5><p><strong>ENTITIES</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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><li><a href="#rf-pattern">pattern</a></li></ul></div></div><div class="div3">
|
|
<h4><a id="integer" name="integer"/>3.3.13 integer</h4><p>
|
|
<span class="termdef"><a id="dt-integer" name="dt-integer">[Definition:]  </a>
|
|
<b>integer</b> is
|
|
<a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#decimal">decimal</a> by fixing the
|
|
value of <a class="termref" href="#dt-fractionDigits"><span class="arrow">·</span>fractionDigits<span class="arrow">·</span></a> to be 0and
|
|
disallowing the trailing decimal point.
|
|
This results in the standard
|
|
mathematical concept of the integer numbers. The
|
|
<a class="termref" href="#dt-value-space"><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 class="termref" href="#dt-basetype"><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 id="integer-lexical-representation" name="integer-lexical-representation"/>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 id="integer-canonical-repr" name="integer-canonical-repr"/>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 id="integer-facets" name="integer-facets"/>3.3.13.3 Constraining facets</h5><p><strong>integer</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="integer-derived-types" name="integer-derived-types"/>3.3.13.4 Derived datatypes</h5><p>
|
|
The following <a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a class="termref" href="#dt-derived"><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 id="nonPositiveInteger" name="nonPositiveInteger"/>3.3.14 nonPositiveInteger</h4><p>
|
|
<span class="termdef"><a id="dt-nonPositiveInteger" name="dt-nonPositiveInteger">[Definition:]  </a>
|
|
<b>nonPositiveInteger</b> is <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<a href="#integer">integer</a> by setting the value of
|
|
<a class="termref" href="#dt-maxInclusive"><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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>nonPositiveInteger</b>
|
|
is the infinite set {...,-2,-1,0}. The <a class="termref" href="#dt-basetype"><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 id="nonPositiveInteger-lexical-representation" name="nonPositiveInteger-lexical-representation"/>3.3.14.1 Lexical representation</h5><p>
|
|
<b>nonPositiveInteger</b> has a lexical representation consisting of
|
|
an optional preceding sign
|
|
|
|
followed by a finite-length sequence of decimal digits (#x30-#x39).
|
|
|
|
The sign may be "+" or may be omitted only for
|
|
lexical forms denoting zero; in all other lexical forms, the negative
|
|
sign ("-") must be present.
|
|
For example: -1, 0, -12678967543233, -100000.
|
|
</p></div><div class="div4">
|
|
<h5><a id="nonPositiveInteger-canonical-repr" name="nonPositiveInteger-canonical-repr"/>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>.
|
|
|
|
In the canonical form for zero, the sign must be
|
|
omitted. Leading zeroes are prohibited.
|
|
</p></div><div class="div4">
|
|
<h5><a id="nonPositiveInteger-facets" name="nonPositiveInteger-facets"/>3.3.14.3 Constraining facets</h5><p><strong>nonPositiveInteger</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="nonPositiveInteger-derived-types" name="nonPositiveInteger-derived-types"/>3.3.14.4 Derived datatypes</h5><p>
|
|
The following <a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a class="termref" href="#dt-derived"><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 id="negativeInteger" name="negativeInteger"/>3.3.15 negativeInteger</h4><p>
|
|
<span class="termdef"><a id="dt-negativeInteger" name="dt-negativeInteger">[Definition:]  </a>
|
|
<b>negativeInteger</b> is <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<a href="#nonPositiveInteger">nonPositiveInteger</a> by setting the value of
|
|
<a class="termref" href="#dt-maxInclusive"><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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>negativeInteger</b>
|
|
is the infinite set {...,-2,-1}. The <a class="termref" href="#dt-basetype"><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 id="negativeInteger-lexical-representation" name="negativeInteger-lexical-representation"/>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 id="negativeInteger-canonical-repr" name="negativeInteger-canonical-repr"/>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 id="negativeInteger-facets" name="negativeInteger-facets"/>3.3.15.3 Constraining facets</h5><p><strong>negativeInteger</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="long" name="long"/>3.3.16 long</h4><p>
|
|
<span class="termdef"><a id="dt-long" name="dt-long">[Definition:]  </a>
|
|
<b>long</b> is
|
|
<a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#integer">integer</a> by setting the
|
|
value of <a class="termref" href="#dt-maxInclusive"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> to be 9223372036854775807
|
|
and <a class="termref" href="#dt-minInclusive"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> to be -9223372036854775808.
|
|
The <a class="termref" href="#dt-basetype"><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 id="long-lexical-representation" name="long-lexical-representation"/>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 id="long-canonical-repr" name="long-canonical-repr"/>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 id="long-facets" name="long-facets"/>3.3.16.3 Constraining facets</h5><p><strong>long</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="long-derived-types" name="long-derived-types"/>3.3.16.4 Derived datatypes</h5><p>
|
|
The following <a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a class="termref" href="#dt-derived"><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 id="int" name="int"/>3.3.17 int</h4><p>
|
|
<span class="termdef"><a id="dt-int" name="dt-int">[Definition:]  </a>
|
|
<b>int</b>
|
|
is <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#long">long</a> by setting the
|
|
value of <a class="termref" href="#dt-maxInclusive"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> to be 2147483647 and
|
|
<a class="termref" href="#dt-minInclusive"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> to be -2147483648. The
|
|
<a class="termref" href="#dt-basetype"><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 id="int-lexical-representation" name="int-lexical-representation"/>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 id="int-canonical-repr" name="int-canonical-repr"/>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 id="int-facets" name="int-facets"/>3.3.17.3 Constraining facets</h5><p><strong>int</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="int-derived-types" name="int-derived-types"/>3.3.17.4 Derived datatypes</h5><p>
|
|
The following <a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a class="termref" href="#dt-derived"><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 id="short" name="short"/>3.3.18 short</h4><p>
|
|
<span class="termdef"><a id="dt-short" name="dt-short">[Definition:]  </a>
|
|
<b>short</b> is
|
|
<a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#int">int</a> by setting the
|
|
value of <a class="termref" href="#dt-maxInclusive"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> to be 32767 and
|
|
<a class="termref" href="#dt-minInclusive"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> to be -32768. The
|
|
<a class="termref" href="#dt-basetype"><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 id="short-lexical-representation" name="short-lexical-representation"/>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 id="short-canonical-repr" name="short-canonical-repr"/>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 id="short-facets" name="short-facets"/>3.3.18.3 Constraining facets</h5><p><strong>short</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="short-derived-types" name="short-derived-types"/>3.3.18.4 Derived datatypes</h5><p>
|
|
The following <a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a class="termref" href="#dt-derived"><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 id="byte" name="byte"/>3.3.19 byte</h4><p>
|
|
<span class="termdef"><a id="dt-byte" name="dt-byte">[Definition:]  </a>
|
|
<b>byte</b>
|
|
is <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#short">short</a>
|
|
by setting the value of <a class="termref" href="#dt-maxInclusive"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> to be 127
|
|
and <a class="termref" href="#dt-minInclusive"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> to be -128.
|
|
The <a class="termref" href="#dt-basetype"><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 id="byte-lexical-representation" name="byte-lexical-representation"/>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 id="byte-canonical-repr" name="byte-canonical-repr"/>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 id="byte-facets" name="byte-facets"/>3.3.19.3 Constraining facets</h5><p><strong>byte</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="nonNegativeInteger" name="nonNegativeInteger"/>3.3.20 nonNegativeInteger</h4><p>
|
|
<span class="termdef"><a id="dt-nonNegativeInteger" name="dt-nonNegativeInteger">[Definition:]  </a>
|
|
<b>nonNegativeInteger</b> is <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<a href="#integer">integer</a> by setting the value of
|
|
<a class="termref" href="#dt-minInclusive"><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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>nonNegativeInteger</b>
|
|
is the infinite set {0,1,2,...}. The <a class="termref" href="#dt-basetype"><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 id="nonNegativeInteger-lexical-representation" name="nonNegativeInteger-lexical-representation"/>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,
|
|
the positive sign ("+") is assumed.
|
|
If the sign is present, it must be "+" except for lexical forms
|
|
denoting zero, which may be preceded by a positive ("+") or a negative ("-") sign.
|
|
For example:
|
|
1, 0, 12678967543233, +100000.
|
|
</p></div><div class="div4">
|
|
<h5><a id="nonNegativeInteger-canonical-repr" name="nonNegativeInteger-canonical-repr"/>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 id="nonNegativeInteger-facets" name="nonNegativeInteger-facets"/>3.3.20.3 Constraining facets</h5><p><strong>nonNegativeInteger</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="nonNegativeInteger-derived-types" name="nonNegativeInteger-derived-types"/>3.3.20.4 Derived datatypes</h5><p>
|
|
The following <a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a class="termref" href="#dt-derived"><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 id="unsignedLong" name="unsignedLong"/>3.3.21 unsignedLong</h4><p>
|
|
<span class="termdef"><a id="dt-unsignedLong" name="dt-unsignedLong">[Definition:]  </a>
|
|
<b>unsignedLong</b> is <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<a href="#nonNegativeInteger">nonNegativeInteger</a> by setting the value of
|
|
<a class="termref" href="#dt-maxInclusive"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> to be 18446744073709551615.
|
|
The <a class="termref" href="#dt-basetype"><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 id="unsignedLong-lexical-representation" name="unsignedLong-lexical-representation"/>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 id="unsignedLong-canonical-repr" name="unsignedLong-canonical-repr"/>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 id="unsignedLong-facets" name="unsignedLong-facets"/>3.3.21.3 Constraining facets</h5><p><strong>unsignedLong</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="unsignedLong-derived-types" name="unsignedLong-derived-types"/>3.3.21.4 Derived datatypes</h5><p>
|
|
The following <a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a class="termref" href="#dt-derived"><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 id="unsignedInt" name="unsignedInt"/>3.3.22 unsignedInt</h4><p>
|
|
<span class="termdef"><a id="dt-unsignedInt" name="dt-unsignedInt">[Definition:]  </a>
|
|
<b>unsignedInt</b> is <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<a href="#unsignedLong">unsignedLong</a> by setting the value of
|
|
<a class="termref" href="#dt-maxInclusive"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> to be 4294967295. The
|
|
<a class="termref" href="#dt-basetype"><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 id="unsignedInt-lexical-representation" name="unsignedInt-lexical-representation"/>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 id="unsignedInt-canonical-repr" name="unsignedInt-canonical-repr"/>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 id="unsignedInt-facets" name="unsignedInt-facets"/>3.3.22.3 Constraining facets</h5><p><strong>unsignedInt</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="unsignedInt-derived-types" name="unsignedInt-derived-types"/>3.3.22.4 Derived datatypes</h5><p>
|
|
The following <a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a class="termref" href="#dt-derived"><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 id="unsignedShort" name="unsignedShort"/>3.3.23 unsignedShort</h4><p>
|
|
<span class="termdef"><a id="dt-unsignedShort" name="dt-unsignedShort">[Definition:]  </a>
|
|
<b>unsignedShort</b> is <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<a href="#unsignedInt">unsignedInt</a> by setting the value of
|
|
<a class="termref" href="#dt-maxInclusive"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> to be 65535. The
|
|
<a class="termref" href="#dt-basetype"><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 id="unsignedShort-lexical-representation" name="unsignedShort-lexical-representation"/>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 id="unsignedShort-canonical-repr" name="unsignedShort-canonical-repr"/>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 id="unsingedShort-facets" name="unsingedShort-facets"/>3.3.23.3 Constraining facets</h5><p><strong>unsignedShort</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="unsignedShort-derived-types" name="unsignedShort-derived-types"/>3.3.23.4 Derived datatypes</h5><p>
|
|
The following <a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a>
|
|
datatypes are <a class="termref" href="#dt-derived"><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 id="unsignedByte" name="unsignedByte"/>3.3.24 unsignedByte</h4><p>
|
|
<span class="termdef"><a id="dt-unsignedByte" name="dt-unsignedByte">[Definition:]  </a>
|
|
<b>unsignedByte</b> is <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<a href="#unsignedShort">unsignedShort</a> by setting the value of
|
|
<a class="termref" href="#dt-maxInclusive"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> to be 255. The
|
|
<a class="termref" href="#dt-basetype"><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 id="unsignedByte-lexical-representation" name="unsignedByte-lexical-representation"/>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 id="unsignedByte-canonical-repr" name="unsignedByte-canonical-repr"/>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 id="unisngedByte-facets" name="unisngedByte-facets"/>3.3.24.3 Constraining facets</h5><p><strong>unsignedByte</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="positiveInteger" name="positiveInteger"/>3.3.25 positiveInteger</h4><p>
|
|
<span class="termdef"><a id="dt-positiveInteger" name="dt-positiveInteger">[Definition:]  </a>
|
|
<b>positiveInteger</b> is <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from
|
|
<a href="#nonNegativeInteger">nonNegativeInteger</a> by setting the value of
|
|
<a class="termref" href="#dt-minInclusive"><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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <b>positiveInteger</b>
|
|
is the infinite set {1,2,...}. The <a class="termref" href="#dt-basetype"><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 id="positiveInteger-lexical-representation" name="positiveInteger-lexical-representation"/>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 id="positiveInteger-canonical-repr" name="positiveInteger-canonical-repr"/>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 id="positiveInteger-facets" name="positiveInteger-facets"/>3.3.25.3 Constraining facets</h5><p><strong>positiveInteger</strong> has the
|
|
following <a class="termref" href="#dt-constraining-facet"><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 id="datatype-components" name="datatype-components"/>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/2004/REC-xmlschema-1-20041028/structures.html#key-null">absent</a> as their value.
|
|
Any property identified as a having a set, subset or <a class="termref" href="#dt-list"><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/2004/REC-xmlschema-1-20041028/structures.html#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/2004/REC-xmlschema-1-20041028/structures.html#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 class="nav" href="#rf-fund-facets"><img src="next.jpg" alt="next sub-section"/></a></span><a id="rf-defn" name="rf-defn"/>4.1 Simple Type Definition</h3><div class="localToc">        4.1.1 <a href="#dc-defn">The Simple Type Definition Schema Component</a><br/>
|
|
        4.1.2 <a href="#xr-defn">XML Representation of Simple Type Definition Schema Components</a><br/>
|
|
        4.1.3 <a href="#defn-rep-constr">Constraints on XML Representation of Simple Type Definition</a><br/>
|
|
        4.1.4 <a href="#defn-validation-rules">Simple Type Definition Validation Rules</a><br/>
|
|
        4.1.5 <a href="#defn-coss">Constraints on Simple Type Definition Schema Components</a><br/>
|
|
        4.1.6 <a href="#anySimpleType-component">Simple Type Definition for anySimpleType</a><br/>
|
|
</div><p>
|
|
Simple Type definitions provide for:
|
|
</p><ul><li>
|
|
Establishing the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> and <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>
|
|
of a datatype, through
|
|
the combined set of <a class="termref" href="#dt-constraining-facet"><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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> and <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>.
|
|
</li></ul><div class="div3">
|
|
<h4><a id="dc-defn" name="dc-defn"/>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" id="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" id="defn-target-namespace"><span class="propdef">{target namespace}</span></a></dt><dd>
|
|
Either <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-null">absent</a> or a
|
|
namespace name, as defined in <a href="#XMLNS">[Namespaces in XML]</a>.
|
|
</dd>
|
|
<dt><a name="defn-variety" id="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 class="propref" href="#defn-variety">{variety}</a>, further properties are defined as follows:
|
|
<dl><dt class="label">atomic</dt><dd><dl class="props">
|
|
<dt><a name="defn-primitive" id="defn-primitive"><span class="propdef">{primitive type definition}</span></a></dt><dd>
|
|
A <a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> <a class="termref" href="#dt-primitive"><span class="arrow">·</span>primitive<span class="arrow">·</span></a>
|
|
datatype definition).
|
|
</dd>
|
|
</dl></dd><dt class="label">list</dt><dd><dl class="props">
|
|
<dt><a name="defn-itemType" id="defn-itemType"><span class="propdef">{item type definition}</span></a></dt><dd>
|
|
An <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> or <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a> simple type definition.
|
|
</dd>
|
|
</dl></dd><dt class="label">union</dt><dd><dl class="props">
|
|
<dt><a name="defn-memberTypes" id="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" id="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" id="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" id="defn-basetype"><span class="propdef">{base type definition}</span></a></dt><dd>
|
|
If the datatype has been <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> by
|
|
<a class="termref" href="#dt-restriction"><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 class="termref" href="#dt-derived"><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" id="defn-final"><span class="propdef">{final}</span></a></dt><dd>
|
|
A subset of <em>{restriction, list, union}</em>.
|
|
</dd>
|
|
<dt><a name="defn-annotation" id="defn-annotation"><span class="propdef">{annotation}</span></a></dt><dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div></div><p>
|
|
Datatypes are identified by their <a class="propref" href="#defn-name">{name}</a>
|
|
and <a class="propref" href="#defn-target-namespace">{target namespace}</a>. Except
|
|
for anonymous datatypes (those with no <a class="propref" href="#defn-name">{name}</a>),
|
|
datatype definitions <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be uniquely identified
|
|
within a schema.
|
|
</p><p>
|
|
If <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a>
|
|
then the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the datatype defined will
|
|
be a subset of the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<a class="propref" href="#defn-basetype">{base type definition}</a> (which is a subset of the
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <a class="propref" href="#defn-primitive">{primitive type definition}</a>).
|
|
If <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a>
|
|
then the <a class="termref" href="#dt-value-space"><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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <a class="propref" href="#defn-itemType">{item type definition}</a>.
|
|
If <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a> then the
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the datatype defined will be the
|
|
union of the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s of each datatype in
|
|
<a class="propref" href="#defn-memberTypes">{member type definitions}</a>.
|
|
</p><p>
|
|
If <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a>
|
|
then the <a class="propref" href="#defn-variety">{variety}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>
|
|
must be <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a>.
|
|
If <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a>
|
|
then the <a class="propref" href="#defn-variety">{variety}</a> of <a class="propref" href="#defn-itemType">{item type definition}</a>
|
|
must be either <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> or <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a>.
|
|
If <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a>
|
|
then
|
|
<a class="propref" href="#defn-memberTypes">{member type definitions}</a> must be a list of datatype definitions.
|
|
</p><p>
|
|
The value of <a class="propref" href="#defn-facets">{facets}</a> consists of the set of
|
|
<a class="termref" href="#dt-facet"><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 class="propref" href="#defn-facets">{facets}</a> of
|
|
<a class="propref" href="#defn-basetype">{base type definition}</a>.
|
|
</p><p>
|
|
The value of <a class="propref" href="#defn-fund-facets">{fundamental facets}</a> consists of the set of
|
|
<a class="termref" href="#dt-fundamental-facet"><span class="arrow">·</span>fundamental facet<span class="arrow">·</span></a>s and their values.
|
|
</p><p>
|
|
If <a class="propref" href="#defn-final">{final}</a> is the empty set then the type can be used
|
|
in deriving other types; the explicit values <em>restriction</em>,
|
|
<em>list</em> and <em>union</em> prevent further derivations
|
|
by <a class="termref" href="#dt-restriction"><span class="arrow">·</span>restriction<span class="arrow">·</span></a>, <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> and
|
|
<a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a> respectively.
|
|
</p></div><div class="div3">
|
|
<h4><a id="xr-defn" name="xr-defn"/>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 class="eltref" href="#element-simpleType"><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" id="element-simpleType"><simpleType</a><br/>  final =
|
|
|
|
(<var>#all</var> | List of (<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 class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation">annotation</a>?, (<a class="eltref" href="#element-restriction">restriction</a> | <a class="eltref" href="#element-list">list</a> | <a class="eltref" href="#element-union">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 cellpadding="3" border="0"><thead><tr><th align="left">Property</th><th align="left">Representation</th></tr></thead><tbody valign="top"><tr valign="top"><td><a class="propref" href="#defn-name">{name}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>name</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>, if present,
|
|
otherwise <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-null">null</a>
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#defn-final">{final}</a></td><td>
|
|
A set corresponding to the <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the
|
|
<code>final</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>, if present, otherwise
|
|
the <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the
|
|
<code>finalDefault</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a> of the ancestor
|
|
<a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-schema">schema</a>
|
|
element information item, if present, otherwise the empty string, as follows:
|
|
<dl><dt class="label">the empty string</dt><dd>the empty set;</dd><dt class="label">
|
|
<code>#all</code>
|
|
</dt><dd><em>{restriction, list, union}</em>;</dd><dt class="label"><em>otherwise</em></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.<div class="note"><b>Note: </b>Although the <code>finalDefault</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a> of
|
|
<a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#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 class="propref" href="#defn-final">{final}</a>
|
|
</div></dd></dl>
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#defn-target-namespace">{target namespace}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>targetNamespace</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>
|
|
of the parent <code>schema</code> element information item.
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#defn-annotation">{annotation}</a></td><td>
|
|
The annotation corresponding to the <a class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation"><annotation></a>
|
|
element information item in the <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.element">[children]</a>, if present, otherwise
|
|
<a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-null">null</a>
|
|
</td></tr></tbody></table></td></tr></tbody></table></div>
|
|
</div></div><p>
|
|
A <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> datatype can be <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
from a <a class="termref" href="#dt-primitive"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> datatype or another
|
|
<a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> datatype by one of three means:
|
|
by <em>restriction</em>, by <em>list</em> or by <em>union</em>.
|
|
</p><div class="div4">
|
|
<h5><a id="derivation-by-restriction" name="derivation-by-restriction"/>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" id="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 class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation">annotation</a>?, (<a class="eltref" href="#element-simpleType">simpleType</a>?, (<a class="eltref" href="#element-minExclusive">minExclusive</a> | <a class="eltref" href="#element-minInclusive">minInclusive</a> | <a class="eltref" href="#element-maxExclusive">maxExclusive</a> | <a class="eltref" href="#element-maxInclusive">maxInclusive</a> | <a class="eltref" href="#element-totalDigits">totalDigits</a> | <a class="eltref" href="#element-fractionDigits">fractionDigits</a> | <a class="eltref" href="#element-length">length</a> | <a class="eltref" href="#element-minLength">minLength</a> | <a class="eltref" href="#element-maxLength">maxLength</a> | <a class="eltref" href="#element-enumeration">enumeration</a> | <a class="eltref" href="#element-whiteSpace">whiteSpace</a> | <a class="eltref" href="#element-pattern">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 cellpadding="3" border="0"><thead><tr><th align="left">Property</th><th align="left">Representation</th></tr></thead><tbody valign="top"><tr valign="top"><td><a class="propref" href="#defn-variety">{variety}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of <a class="propref" href="#defn-variety">{variety}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#defn-facets">{facets}</a></td><td>
|
|
The union of the set of <a href="#facets">Facets (§2.4)</a> components
|
|
resolved to by the facet <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.element">[children]</a> merged with <a class="propref" href="#defn-facets">{facets}</a>
|
|
from <a class="propref" href="#defn-basetype">{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 class="propref" href="#defn-basetype">{base type definition}</a></td><td>
|
|
The <a href="#dc-defn">Simple Type Definition</a> component resolved to by the <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the
|
|
<code>base</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a> or the <a class="eltref" href="#element-simpleType"><simpleType></a> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.element">[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
|
|
<em>Sku</em> (the barcode number that appears on products) from the
|
|
<a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> datatype <a href="#string">string</a> by
|
|
supplying a value for the <a class="termref" href="#dt-pattern"><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, <em>Sku</em> is the name of the new
|
|
<a class="termref" href="#dt-user-derived"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a> datatype, <a href="#string">string</a> is
|
|
its <a class="termref" href="#dt-basetype"><span class="arrow">·</span>base type<span class="arrow">·</span></a> and <a class="termref" href="#dt-pattern"><span class="arrow">·</span>pattern<span class="arrow">·</span></a>
|
|
is the facet.
|
|
</div></div></div><div class="div4">
|
|
<h5><a id="derivation-by-list" name="derivation-by-list"/>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" id="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 class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation">annotation</a>?, <a class="eltref" href="#element-simpleType">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 cellpadding="3" border="0"><thead><tr><th align="left">Property</th><th align="left">Representation</th></tr></thead><tbody valign="top"><tr valign="top"><td><a class="propref" href="#defn-variety">{variety}</a></td><td>
|
|
list
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#defn-itemType">{item type definition}</a></td><td>
|
|
The <a href="#dc-defn">Simple Type Definition</a> component resolved to by the <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the
|
|
<code>itemType</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>
|
|
or the <a class="eltref" href="#element-simpleType"><simpleType></a> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.element">[children]</a>,
|
|
whichever is present.
|
|
</td></tr></tbody></table></td></tr></tbody></table></div>
|
|
</div></div><p>
|
|
A <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype must be <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
from an <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> or a <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a> datatype,
|
|
known as the
|
|
<a class="termref" href="#dt-itemType"><span class="arrow">·</span>itemType<span class="arrow">·</span></a> of the <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype.
|
|
This yields a datatype whose <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is composed of
|
|
finite-length sequences of values from the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the
|
|
<a class="termref" href="#dt-itemType"><span class="arrow">·</span>itemType<span class="arrow">·</span></a> and whose <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> is
|
|
composed of space-separated lists of literals of the
|
|
<a class="termref" href="#dt-itemType"><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, <em>listOfFloat</em> is the name of the new
|
|
<a class="termref" href="#dt-user-derived"><span class="arrow">·</span>user-derived<span class="arrow">·</span></a> datatype, <a href="#float">float</a> is its
|
|
<a class="termref" href="#dt-itemType"><span class="arrow">·</span>itemType<span class="arrow">·</span></a> and <a class="termref" href="#dt-list"><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 class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from a
|
|
<a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype, the following
|
|
<a class="termref" href="#dt-constraining-facet"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s can be used:
|
|
</p><ul><li><a class="termref" href="#dt-length"><span class="arrow">·</span>length<span class="arrow">·</span></a></li><li><a class="termref" href="#dt-maxLength"><span class="arrow">·</span>maxLength<span class="arrow">·</span></a></li><li><a class="termref" href="#dt-minLength"><span class="arrow">·</span>minLength<span class="arrow">·</span></a></li><li><a class="termref" href="#dt-enumeration"><span class="arrow">·</span>enumeration<span class="arrow">·</span></a></li><li><a class="termref" href="#dt-pattern"><span class="arrow">·</span>pattern<span class="arrow">·</span></a></li><li><a class="termref" href="#dt-whiteSpace"><span class="arrow">·</span>whiteSpace<span class="arrow">·</span></a></li></ul><p>
|
|
regardless of the <a class="termref" href="#dt-constraining-facet"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s that are applicable
|
|
to the <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> datatype that serves as the
|
|
<a class="termref" href="#dt-itemType"><span class="arrow">·</span>itemType<span class="arrow">·</span></a> of the <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a>.
|
|
</p><p>
|
|
For each of <a class="termref" href="#dt-length"><span class="arrow">·</span>length<span class="arrow">·</span></a>, <a class="termref" href="#dt-maxLength"><span class="arrow">·</span>maxLength<span class="arrow">·</span></a>
|
|
and <a class="termref" href="#dt-minLength"><span class="arrow">·</span>minLength<span class="arrow">·</span></a>, the
|
|
<em>unit of length</em> is measured in number of list items.
|
|
The value of <a class="termref" href="#dt-whiteSpace"><span class="arrow">·</span>whiteSpace<span class="arrow">·</span></a>
|
|
is fixed to the value <em>collapse</em>.</p></div><div class="div4">
|
|
<h5><a id="derivation-by-union" name="derivation-by-union"/>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" id="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 class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation">annotation</a>?, <a class="eltref" href="#element-simpleType">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 cellpadding="3" border="0"><thead><tr><th align="left">Property</th><th align="left">Representation</th></tr></thead><tbody valign="top"><tr valign="top"><td><a class="propref" href="#defn-variety">{variety}</a></td><td>
|
|
union
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#defn-memberTypes">{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 href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the
|
|
<code>memberTypes</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>, if any,
|
|
in order, followed by the <a href="#dc-defn">Simple Type Definition</a> components resolved to by the
|
|
<a class="eltref" href="#element-simpleType"><simpleType></a> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.element">[children]</a>, if any, in order.
|
|
If <a class="propref" href="#defn-variety">{variety}</a> is <em>union</em> for
|
|
any <a href="#dc-defn">Simple Type Definition</a> components resolved to above, then
|
|
the <a href="#dc-defn">Simple Type Definition</a> is replaced by its
|
|
<a class="propref" href="#defn-memberTypes">{member type definitions}</a>.
|
|
</td></tr></tbody></table></td></tr></tbody></table></div>
|
|
</div></div><p>
|
|
A <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a> datatype can be <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
from one or more <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a>, <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> or
|
|
other <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a> datatypes, known as the <a class="termref" href="#dt-memberTypes"><span class="arrow">·</span>memberTypes<span class="arrow">·</span></a>
|
|
of that <a class="termref" href="#dt-union"><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 class="termref" href="#dt-union"><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 class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from a
|
|
<a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a> datatype, the only following
|
|
<a class="termref" href="#dt-constraining-facet"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s can be used:
|
|
</p><ul><li><a class="termref" href="#dt-pattern"><span class="arrow">·</span>pattern<span class="arrow">·</span></a></li><li><a class="termref" href="#dt-enumeration"><span class="arrow">·</span>enumeration<span class="arrow">·</span></a></li></ul><p>
|
|
regardless of the <a class="termref" href="#dt-constraining-facet"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s that are
|
|
applicable to the datatypes that participate in the <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a>
|
|
</p></div></div><div class="div3">
|
|
<h4><a id="defn-rep-constr" name="defn-rep-constr"/>4.1.3 Constraints on XML Representation of Simple Type Definition</h4><div class="constraintnote"><a name="src-single-facet-value" id="src-single-facet-value"/><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 class="termref" href="#dt-constraining-facet"><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" id="src-list-itemType-or-simpleType"/><b>Schema Representation Constraint: itemType attribute or simpleType child</b><br/><div class="constraint">
|
|
Either the <code>itemType</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a> or the
|
|
<a class="eltref" href="#element-simpleType"><simpleType></a> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.element">[child]</a> of the <a class="eltref" href="#element-list"><list></a> element
|
|
must be present, but not both.
|
|
</div></div><div class="constraintnote"><a name="src-restriction-base-or-simpleType" id="src-restriction-base-or-simpleType"/><b>Schema Representation Constraint: base attribute or simpleType child</b><br/><div class="constraint">
|
|
Either the <code>base</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a> or the
|
|
<code>simpleType</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.element">[child]</a> of the <a class="eltref" href="#element-restriction"><restriction></a>
|
|
element must be present, but not both.
|
|
</div></div><div class="constraintnote"><a name="src-union-memberTypes-or-simpleTypes" id="src-union-memberTypes-or-simpleTypes"/><b>Schema Representation Constraint: memberTypes attribute or simpleType children</b><br/><div class="constraint">
|
|
Either the <code>memberTypes</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a> of the <a class="eltref" href="#element-union"><union></a>
|
|
element must be non-empty or
|
|
there must be at least one <code>simpleType</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.element">[child]</a>.
|
|
</div></div></div><div class="div3">
|
|
<h4><a id="defn-validation-rules" name="defn-validation-rules"/>4.1.4 Simple Type Definition Validation Rules</h4><div class="constraintnote"><a name="cvc-facet-valid" id="cvc-facet-valid"/><b>Validation Rule: Facet Valid</b><br/><div class="constraint">
|
|
A value in a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is facet-valid with
|
|
respect to a <a class="termref" href="#dt-constraining-facet"><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 class="termref" href="#dt-constraining-facet"><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" id="cvc-datatype-valid"/><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 class="termref" href="#dt-match"><span class="arrow">·</span>match<span class="arrow">·</span></a>es a literal in the
|
|
<a class="termref" href="#dt-lexical-space"><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 class="termref" href="#dt-pattern"><span class="arrow">·</span>pattern<span class="arrow">·</span></a> is a member of <a class="propref" href="#defn-facets">{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 class="termref" href="#dt-pattern"><span class="arrow">·</span>pattern<span class="arrow">·</span></a> is not a member of <a class="propref" href="#defn-facets">{facets}</a>,
|
|
then
|
|
<div class="constraintlist"><div class="clnumber">1.2.1
|
|
if <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> then
|
|
the string must <a class="termref" href="#dt-match"><span class="arrow">·</span>match<span class="arrow">·</span></a> a literal in the
|
|
<a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of <a class="propref" href="#defn-basetype">{base type definition}</a>
|
|
</div><div class="clnumber">1.2.2
|
|
if <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> then the string must
|
|
be a sequence of space-separated tokens, each of which <a class="termref" href="#dt-match"><span class="arrow">·</span>match<span class="arrow">·</span></a>es a literal in the <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>
|
|
of <a class="propref" href="#defn-itemType">{item type definition}</a>
|
|
</div><div class="clnumber">1.2.3
|
|
if <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a> then
|
|
the string must <a class="termref" href="#dt-match"><span class="arrow">·</span>match<span class="arrow">·</span></a> a literal in the
|
|
<a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> of at least one member of
|
|
<a class="propref" href="#defn-memberTypes">{member type definitions}</a>
|
|
</div></div></div></div></div><div class="clnumber">2
|
|
the value denoted by the literal <a class="termref" href="#dt-match"><span class="arrow">·</span>match<span class="arrow">·</span></a>ed in the previous step
|
|
is a member of the <a class="termref" href="#dt-value-space"><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 class="propref" href="#defn-facets">{facets}</a> (except
|
|
for <a class="termref" href="#dt-pattern"><span class="arrow">·</span>pattern<span class="arrow">·</span></a>).
|
|
</div></div></div></div></div><div class="div3">
|
|
<h4><a id="defn-coss" name="defn-coss"/>4.1.5 Constraints on Simple Type Definition Schema Components</h4><div class="constraintnote"><a name="cos-applicable-facets" id="cos-applicable-facets"/><b>Schema Component Constraint: applicable facets</b><br/><div class="constraint">
|
|
The <a class="termref" href="#dt-constraining-facet"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s which are allowed
|
|
to be members of <a class="propref" href="#defn-facets">{facets}</a> are dependent on
|
|
<a class="propref" href="#defn-basetype">{base type definition}</a> as specified in the following table:
|
|
<table bgcolor="#bedce6" border="1"><tr><th><a href="#defn-basetype">{base type definition}</a></th><th>applicable <a href="#defn-facets">{facets}</a></th></tr><tr><th align="center" colspan="2">
|
|
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 align="center" colspan="2">
|
|
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 align="center" colspan="2">
|
|
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" id="cos-list-of-atomic"/><b>Schema Component Constraint: list of atomic</b><br/><div class="constraint">
|
|
If <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a>, then
|
|
the <a class="propref" href="#defn-variety">{variety}</a> of <a class="propref" href="#defn-itemType">{item type definition}</a>
|
|
 <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> or
|
|
<a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a>.
|
|
</div></div><div class="constraintnote"><a name="cos-no-circular-unions" id="cos-no-circular-unions"/><b>Schema Component Constraint: no circular unions</b><br/><div class="constraint">
|
|
If <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a>,
|
|
then
|
|
it is an <a class="termref" href="#dt-error"><span class="arrow">·</span>error<span class="arrow">·</span></a> if
|
|
<a class="propref" href="#defn-name">{name}</a> and <a class="propref" href="#defn-target-namespace">{target namespace}</a>
|
|
 <a class="termref" href="#dt-match"><span class="arrow">·</span>match<span class="arrow">·</span></a> <a class="propref" href="#defn-name">{name}</a>
|
|
and <a class="propref" href="#defn-target-namespace">{target namespace}</a> of any member of
|
|
<a class="propref" href="#defn-memberTypes">{member type definitions}</a>.
|
|
</div></div></div><div class="div3">
|
|
<h4><a id="anySimpleType-component" name="anySimpleType-component"/>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 href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#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" id="anySimpleType-name"><span class="propdef">{name}</span></a></dt><dd>
|
|
anySimpleType
|
|
</dd>
|
|
<dt><a name="anySimpleType-target_namespace" id="anySimpleType-target_namespace"><span class="propdef">{target namespace}</span></a></dt><dd>
|
|
http://www.w3.org/2001/XMLSchema
|
|
</dd>
|
|
<dt><a name="anySimpleType-basetype" id="anySimpleType-basetype"><span class="propdef">{basetype definition}</span></a></dt><dd>
|
|
<a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#ur-type-itself">the ur-type definition</a>
|
|
</dd>
|
|
<dt><a name="anySimpleType-final" id="anySimpleType-final"><span class="propdef">{final}</span></a></dt><dd>
|
|
the empty set
|
|
</dd>
|
|
<dt><a name="anySimpleType-variety" id="anySimpleType-variety"><span class="propdef">{variety}</span></a></dt><dd>
|
|
<a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-null">absent</a>
|
|
</dd>
|
|
</dl>
|
|
</div></div></div></div><div class="div2">
|
|
<h3 class="withToc"><span class="nav"><a class="nav" href="#rf-defn"><img src="previous.jpg" alt="previous sub-section"/></a> <a class="nav" href="#rf-facets"><img src="next.jpg" alt="next sub-section"/></a></span><a id="rf-fund-facets" name="rf-fund-facets"/>4.2 Fundamental Facets</h3><div class="localToc">        4.2.1 <a href="#equal">equal</a><br/>
|
|
        4.2.2 <a href="#rf-ordered">ordered</a><br/>
|
|
        4.2.3 <a href="#rf-bounded">bounded</a><br/>
|
|
        4.2.4 <a href="#rf-cardinality">cardinality</a><br/>
|
|
        4.2.5 <a href="#rf-numeric">numeric</a><br/>
|
|
</div><div class="div3">
|
|
<h4><a id="equal" name="equal"/>4.2.1 equal</h4><p>
|
|
Every <a class="termref" href="#dt-value-space"><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 <em>a</em> and <em>b</em> in
|
|
the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>,
|
|
either <em>a</em> is equal to <em>b</em>,
|
|
denoted <em>a = b</em>, or <em>a</em>
|
|
is not equal to <em>b</em>, denoted <em>a != b</em>
|
|
</li><li>
|
|
there is no pair <em>a</em> and <em>b</em>
|
|
from the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> such that both
|
|
<em>a = b</em> and <em>a != b</em>
|
|
</li><li>
|
|
for all <em>a</em> in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>,
|
|
<em>a = a</em>
|
|
</li><li>
|
|
for any <em>a</em> and <em>b</em>
|
|
in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>,
|
|
<em>a = b</em> if and only if <em>b = a</em>
|
|
</li><li>
|
|
for any <em>a</em>, <em>b</em> and
|
|
<em>c</em> in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>,
|
|
if <em>a = b</em> and
|
|
<em>b = c</em>, then <em>a = c</em>
|
|
</li><li>
|
|
for any <em>a</em> and <em>b</em>
|
|
in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
if <em>a = b</em>, then <em>a</em>
|
|
and <em>b</em> cannot be distinguished
|
|
(i.e., equality is identity)
|
|
</li><li>
|
|
the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s of all
|
|
<a class="termref" href="#dt-primitive"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> datatypes are disjoint (they do not
|
|
share any values)
|
|
|
|
</li></ul><p>
|
|
|
|
</p><p>
|
|
On every datatype, the operation Equal is defined in terms of the equality
|
|
property of the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>: for any values
|
|
<em>a, b</em> drawn from the
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>, <em>Equal(a,b)</em> is
|
|
true if <em>a = b</em>, and false otherwise.
|
|
</p><p>
|
|
Note that in consequence of the above:
|
|
</p><ul><li>given <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <em>A</em> and
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <em>B</em> where
|
|
<em>A</em> and <em>B</em> are disjoint,
|
|
every pair of values <em>a</em> from <em>A</em>
|
|
and <em>b</em> from <em>B</em>,
|
|
<em>a != b</em></li><li>
|
|
two values which are members of the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
of the same <a class="termref" href="#dt-primitive"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> datatype may always be
|
|
compared with each other
|
|
</li><li>
|
|
if a datatype <em>T</em> is
|
|
<a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> by <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a> from
|
|
<a class="termref" href="#dt-memberTypes"><span class="arrow">·</span>memberTypes<span class="arrow">·</span></a> <em>A, B, ...</em>
|
|
then the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <em>T</em> is the
|
|
union of <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s of its
|
|
<a class="termref" href="#dt-memberTypes"><span class="arrow">·</span>memberTypes<span class="arrow">·</span></a> <em>A, B, ...</em>.
|
|
Some values in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<em>T</em> are also values in the
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <em>A</em>.
|
|
Other values in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<em>T</em> will be values in the
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <em>B</em> and so on.
|
|
Values in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <em>T</em>
|
|
which are also in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of
|
|
<em>A</em> can be compared with other values in the
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <em>A</em> according
|
|
to the above rules. Similarly for values of type
|
|
<em>T</em> and <em>B</em> and all the other
|
|
<a class="termref" href="#dt-memberTypes"><span class="arrow">·</span>memberTypes<span class="arrow">·</span></a>.
|
|
</li><li>
|
|
if a datatype <em>T'</em> is <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
by <a class="termref" href="#dt-restriction"><span class="arrow">·</span>restriction<span class="arrow">·</span></a> from an atomic datatype <em>T</em>
|
|
then the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <em>T'</em> is
|
|
a subset of the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <em>T</em>.
|
|
Values in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s of
|
|
<em>T</em> and <em>T'</em> can be compared
|
|
according to the above rules
|
|
</li><li>
|
|
if datatypes <em>T'</em> and <em>T''</em> are
|
|
<a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> by <a class="termref" href="#dt-restriction"><span class="arrow">·</span>restriction<span class="arrow">·</span></a> from a
|
|
common atomic ancestor <em>T</em> then the
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s of <em>T'</em> and
|
|
<em>T''</em> may overlap. Values in the
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s
|
|
of <em>T'</em> and <em>T''</em> can be
|
|
compared according to the above rules
|
|
</li></ul><div class="note"><b>Note: </b>
|
|
There is no schema component corresponding to the <b>equal</b>
|
|
<a class="termref" href="#dt-fundamental-facet"><span class="arrow">·</span>fundamental facet<span class="arrow">·</span></a>.
|
|
</div></div><div class="div3">
|
|
<h4><a id="rf-ordered" name="rf-ordered"/>4.2.2 ordered</h4><p>
|
|
<span class="termdef"><a id="dt-order-relation" name="dt-order-relation">[Definition:]  </a>An
|
|
<b>order relation</b> on a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
is a mathematical relation that imposes a
|
|
<a class="termref" href="#dt-total-order"><span class="arrow">·</span>total order<span class="arrow">·</span></a> or a <a class="termref" href="#dt-partial-order"><span class="arrow">·</span>partial order<span class="arrow">·</span></a> on the
|
|
members of the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p><p>
|
|
<span class="termdef"><a id="dt-ordered" name="dt-ordered">[Definition:]  </a>A
|
|
<a class="termref" href="#dt-value-space"><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 class="termref" href="#dt-order-relation"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a> defined for that
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p><p>
|
|
<span class="termdef"><a id="dt-partial-order" name="dt-partial-order">[Definition:]  </a>
|
|
A <b>partial order</b> is an <a class="termref" href="#dt-order-relation"><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 class="termref" href="#dt-partial-order"><span class="arrow">·</span>partial order<span class="arrow">·</span></a> has the following properties:
|
|
</p><ul><li>
|
|
|
|
for no <em>a</em> in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>,
|
|
<em>a < a</em>
|
|
(irreflexivity)
|
|
</li><li>
|
|
|
|
for all <em>a</em> and <em>b</em>
|
|
in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>,
|
|
<em>a < b</em>
|
|
implies not(<em>b < a</em>)
|
|
(asymmetry)
|
|
</li><li>
|
|
|
|
for all <em>a</em>, <em>b</em>
|
|
and <em>c</em> in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>,
|
|
<em>a < b</em> and <em>b < c</em>
|
|
implies <em>a < c</em>
|
|
(transitivity)
|
|
</li></ul><p>
|
|
The notation <em>a <> b</em> is used to indicate the
|
|
case when <em>a != b</em> and neither
|
|
<em>a < b</em> nor <em>b < a</em>.
|
|
|
|
For any values <em>a</em> and <em>b</em>
|
|
from different <a class="termref" href="#dt-primitive"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s,
|
|
<em>a <> b</em>.
|
|
</p><p><span class="termdef"><a id="dt-incomparable" name="dt-incomparable">[Definition:]  </a>When <em>a <> b</em>, <em>a</em> and <em>b</em> are <b>incomparable</b>,</span><span class="termdef"><a id="dt-comparable" name="dt-comparable">[Definition:]  </a>otherwise they are <b>comparable</b>.</span></p><p>
|
|
<span class="termdef"><a id="dt-total-order" name="dt-total-order">[Definition:]  </a>
|
|
A <b>total order</b> is an <a class="termref" href="#dt-partial-order"><span class="arrow">·</span>partial order<span class="arrow">·</span></a>
|
|
such that for no <em>a</em> and <em>b</em>
|
|
is it the case that <em>a <> b</em>.
|
|
</span>
|
|
</p><p>
|
|
A <a class="termref" href="#dt-total-order"><span class="arrow">·</span>total order<span class="arrow">·</span></a> has all of the properties specified
|
|
above for <a class="termref" href="#dt-partial-order"><span class="arrow">·</span>partial order<span class="arrow">·</span></a>, plus
|
|
the following property:
|
|
</p><ul><li>
|
|
for all <em>a</em> and <em>b</em>
|
|
in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>,
|
|
either <em>a < b</em> or <em>b < a</em>
|
|
or <em>a = b</em>
|
|
</li></ul><div class="note"><b>Note: </b>
|
|
The fact that this specification does not define an
|
|
<a class="termref" href="#dt-order-relation"><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.
|
|
</div><p>
|
|
<a class="termref" href="#dt-ordered"><span class="arrow">·</span>ordered<span class="arrow">·</span></a> provides for:
|
|
</p><ul><li>
|
|
indicating whether an <a class="termref" href="#dt-order-relation"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a> is
|
|
defined on a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>, and if so,
|
|
whether that <a class="termref" href="#dt-order-relation"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a> is
|
|
a <a class="termref" href="#dt-partial-order"><span class="arrow">·</span>partial order<span class="arrow">·</span></a> or a <a class="termref" href="#dt-total-order"><span class="arrow">·</span>total order<span class="arrow">·</span></a>
|
|
</li></ul><div class="div4">
|
|
<h5><a id="dc-ordered" name="dc-ordered"/>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" id="ordered-value"><span class="propdef">{value}</span></a></dt><dd>
|
|
One of <em>{false, partial, total}</em>.
|
|
</dd>
|
|
</dl>
|
|
</div></div><p>
|
|
<a class="propref" href="#ordered-value">{value}</a> depends on <a class="propref" href="#defn-variety">{variety}</a>,
|
|
<a class="propref" href="#defn-facets">{facets}</a> and <a class="propref" href="#defn-memberTypes">{member type definitions}</a>
|
|
in the <a href="#dc-defn">Simple Type Definition</a> component in which a
|
|
<a class="termref" href="#dt-ordered"><span class="arrow">·</span>ordered<span class="arrow">·</span></a> component appears as a member of
|
|
<a class="propref" href="#defn-fund-facets">{fundamental facets}</a>.
|
|
</p><p>
|
|
When <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a>,
|
|
<a class="propref" href="#ordered-value">{value}</a> is inherited from
|
|
<a class="propref" href="#ordered-value">{value}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>.
|
|
For all <a class="termref" href="#dt-primitive"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> types <a class="propref" href="#numeric-value">{value}</a>
|
|
is as specified in the table in <a href="#app-fundamental-facets">Fundamental Facets (§C.1)</a>.
|
|
</p><p>
|
|
When <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a>,
|
|
<a class="propref" href="#ordered-value">{value}</a> is <em>false</em>.
|
|
</p><p>
|
|
When <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a>,
|
|
|
|
<a class="propref" href="#ordered-value">{value}</a> is <em>partial</em> unless one of the
|
|
following:
|
|
</p><ul><li>
|
|
If every member of <a class="propref" href="#defn-memberTypes">{member type definitions}</a> is derived from
|
|
a common ancestor other than the simple ur-type, then <a class="propref" href="#ordered-value">{value}</a>
|
|
is the same as that ancestor's <b>ordered</b> facet
|
|
</li><li>
|
|
If every member of <a class="propref" href="#defn-memberTypes">{member type definitions}</a> has a
|
|
<a class="propref" href="#ordered-value">{value}</a> of <em>false</em> for the <b>ordered</b>
|
|
facet, then <a class="propref" href="#ordered-value">{value}</a> is <em>false</em>
|
|
</li></ul></div></div><div class="div3">
|
|
<h4><a id="rf-bounded" name="rf-bounded"/>4.2.3 bounded</h4><p>
|
|
<span class="termdef"><a id="dt-inclusive-upper-bound" name="dt-inclusive-upper-bound">[Definition:]  </a>
|
|
A value <em>u</em> in an <a class="termref" href="#dt-ordered"><span class="arrow">·</span>ordered<span class="arrow">·</span></a>
|
|
 <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <em>U</em>
|
|
is said to be an <b>inclusive upper bound</b> of a
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <em>V</em>
|
|
(where <em>V</em> is a subset of <em>U</em>)
|
|
if for all <em>v</em> in <em>V</em>,
|
|
<em>u</em> >= <em>v</em>.
|
|
</span>
|
|
</p><p>
|
|
<span class="termdef"><a id="dt-exclusive-upper-bound" name="dt-exclusive-upper-bound">[Definition:]  </a>
|
|
A value <em>u</em> in an <a class="termref" href="#dt-ordered"><span class="arrow">·</span>ordered<span class="arrow">·</span></a>
|
|
 <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <em>U</em>
|
|
is said to be an <b>exclusive upper bound</b> of a
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <em>V</em>
|
|
(where <em>V</em> is a subset of <em>U</em>)
|
|
if for all <em>v</em> in <em>V</em>,
|
|
<em>u</em> > <em>v</em>.
|
|
</span>
|
|
</p><p>
|
|
<span class="termdef"><a id="dt-inclusive-lower-bound" name="dt-inclusive-lower-bound">[Definition:]  </a>
|
|
A value <em>l</em> in an <a class="termref" href="#dt-ordered"><span class="arrow">·</span>ordered<span class="arrow">·</span></a>
|
|
 <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <em>L</em>
|
|
is said to be an <b>inclusive lower bound</b> of a
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <em>V</em>
|
|
(where <em>V</em> is a subset of <em>L</em>)
|
|
if for all <em>v</em> in <em>V</em>,
|
|
<em>l</em> <= <em>v</em>.
|
|
</span>
|
|
</p><p>
|
|
<span class="termdef"><a id="dt-exclusive-lower-bound" name="dt-exclusive-lower-bound">[Definition:]  </a>
|
|
A value <em>l</em> in an <a class="termref" href="#dt-ordered"><span class="arrow">·</span>ordered<span class="arrow">·</span></a>
|
|
 <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <em>L</em>
|
|
is said to be an <b>exclusive lower bound</b> of a
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <em>V</em>
|
|
(where <em>V</em> is a subset of <em>L</em>)
|
|
if for all <em>v</em> in <em>V</em>,
|
|
<em>l</em> < <em>v</em>.
|
|
</span>
|
|
</p><p>
|
|
<span class="termdef"><a id="dt-bounded" name="dt-bounded">[Definition:]  </a>A datatype is <b>bounded</b>
|
|
if its <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> has either an
|
|
<a class="termref" href="#dt-inclusive-upper-bound"><span class="arrow">·</span>inclusive upper bound<span class="arrow">·</span></a> or an <a class="termref" href="#dt-exclusive-upper-bound"><span class="arrow">·</span>exclusive upper bound<span class="arrow">·</span></a>
|
|
and either an <a class="termref" href="#dt-inclusive-lower-bound"><span class="arrow">·</span>inclusive lower bound<span class="arrow">·</span></a> or
|
|
an
|
|
<a class="termref" href="#dt-exclusive-lower-bound"><span class="arrow">·</span>exclusive lower bound<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p><p>
|
|
<a class="termref" href="#dt-bounded"><span class="arrow">·</span>bounded<span class="arrow">·</span></a> provides for:
|
|
</p><ul><li>
|
|
indicating whether a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is
|
|
<a class="termref" href="#dt-bounded"><span class="arrow">·</span>bounded<span class="arrow">·</span></a>
|
|
</li></ul><div class="div4">
|
|
<h5><a id="dc-bounded" name="dc-bounded"/>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" id="bounded-value"><span class="propdef">{value}</span></a></dt><dd>
|
|
A <a href="#boolean">boolean</a>.
|
|
</dd>
|
|
</dl>
|
|
</div></div><p>
|
|
<a class="propref" href="#bounded-value">{value}</a> depends on <a class="propref" href="#defn-variety">{variety}</a>,
|
|
<a class="propref" href="#defn-facets">{facets}</a> and <a class="propref" href="#defn-memberTypes">{member type definitions}</a>
|
|
in the <a href="#dc-defn">Simple Type Definition</a> component in which a
|
|
<a class="termref" href="#dt-bounded"><span class="arrow">·</span>bounded<span class="arrow">·</span></a> component appears as a member of
|
|
<a class="propref" href="#defn-fund-facets">{fundamental facets}</a>.
|
|
</p><p>
|
|
When <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a>,
|
|
if one of <a class="termref" href="#dt-minInclusive"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> or <a class="termref" href="#dt-minExclusive"><span class="arrow">·</span>minExclusive<span class="arrow">·</span></a>
|
|
and one of <a class="termref" href="#dt-maxInclusive"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> or <a class="termref" href="#dt-maxExclusive"><span class="arrow">·</span>maxExclusive<span class="arrow">·</span></a>
|
|
are among <a class="propref" href="#defn-facets">{facets}</a> , then
|
|
<a class="propref" href="#bounded-value">{value}</a> is <em>true</em>; else
|
|
<a class="propref" href="#bounded-value">{value}</a> is <em>false</em>.
|
|
</p><p>
|
|
When <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a>,
|
|
if <a class="termref" href="#dt-length"><span class="arrow">·</span>length<span class="arrow">·</span></a> or both of
|
|
<a class="termref" href="#dt-minLength"><span class="arrow">·</span>minLength<span class="arrow">·</span></a> and <a class="termref" href="#dt-maxLength"><span class="arrow">·</span>maxLength<span class="arrow">·</span></a>
|
|
are among <a class="propref" href="#defn-facets">{facets}</a>, then
|
|
<a class="propref" href="#bounded-value">{value}</a> is <em>true</em>; else
|
|
<a class="propref" href="#bounded-value">{value}</a> is <em>false</em>.
|
|
</p><p>
|
|
When <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a>,
|
|
if <a class="propref" href="#bounded-value">{value}</a> is <em>true</em>
|
|
for every member of <a class="propref" href="#defn-memberTypes">{member type definitions}</a>
|
|
and all members of <a class="propref" href="#defn-memberTypes">{member type definitions}</a> share a common
|
|
ancestor, then <a class="propref" href="#bounded-value">{value}</a> is <em>true</em>;
|
|
else <a class="propref" href="#bounded-value">{value}</a> is <em>false</em>.
|
|
</p></div></div><div class="div3">
|
|
<h4><a id="rf-cardinality" name="rf-cardinality"/>4.2.4 cardinality</h4><p>
|
|
<span class="termdef"><a id="dt-cardinality" name="dt-cardinality">[Definition:]  </a>Every
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> has associated with it the concept of
|
|
<b>cardinality</b>. Some <a class="termref" href="#dt-value-space"><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 class="termref" href="#dt-value-space"><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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p><p>
|
|
It
|
|
is sometimes useful to categorize <a class="termref" href="#dt-value-space"><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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s that are finite
|
|
</li><li>
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s that are countably infinite
|
|
</li></ul><p>
|
|
<a class="termref" href="#dt-cardinality"><span class="arrow">·</span>cardinality<span class="arrow">·</span></a> provides for:
|
|
</p><ul><li>
|
|
indicating whether the <a class="termref" href="#dt-cardinality"><span class="arrow">·</span>cardinality<span class="arrow">·</span></a>
|
|
of a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is
|
|
<em>finite</em> or <em>countably infinite</em>
|
|
</li></ul><div class="div4">
|
|
<h5><a id="dc-cardinality" name="dc-cardinality"/>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" id="cardinality-value"><span class="propdef">{value}</span></a></dt><dd>
|
|
One of <em>{finite, countably infinite}</em>.
|
|
</dd>
|
|
</dl>
|
|
</div></div><p>
|
|
<a class="propref" href="#cardinality-value">{value}</a> depends on <a class="propref" href="#defn-variety">{variety}</a>,
|
|
<a class="propref" href="#defn-facets">{facets}</a> and <a class="propref" href="#defn-memberTypes">{member type definitions}</a>
|
|
in the <a href="#dc-defn">Simple Type Definition</a> component in which a
|
|
<a class="termref" href="#dt-cardinality"><span class="arrow">·</span>cardinality<span class="arrow">·</span></a> component appears as a member of
|
|
<a class="propref" href="#defn-fund-facets">{fundamental facets}</a>.
|
|
</p><p>
|
|
When <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> and
|
|
<a class="propref" href="#cardinality-value">{value}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>
|
|
is <em>finite</em>, then <a class="propref" href="#cardinality-value">{value}</a> is
|
|
<em>finite</em>.
|
|
</p><p>
|
|
When <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> and
|
|
<a class="propref" href="#cardinality-value">{value}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>
|
|
is <em>countably infinite</em> and <b>either</b> of the following
|
|
conditions are true, then <a class="propref" href="#cardinality-value">{value}</a> is
|
|
<em>finite</em>; else <a class="propref" href="#cardinality-value">{value}</a>
|
|
is <em>countably infinite</em>:
|
|
</p><ol class="enumar"><li>
|
|
one of <a class="termref" href="#dt-length"><span class="arrow">·</span>length<span class="arrow">·</span></a>, <a class="termref" href="#dt-maxLength"><span class="arrow">·</span>maxLength<span class="arrow">·</span></a>,
|
|
<a class="termref" href="#dt-totalDigits"><span class="arrow">·</span>totalDigits<span class="arrow">·</span></a> is among <a class="propref" href="#defn-facets">{facets}</a>,
|
|
</li><li>
|
|
<b>all</b> of the following are true:
|
|
<ol class="enumla"><li>
|
|
one of <a class="termref" href="#dt-minInclusive"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> or
|
|
<a class="termref" href="#dt-minExclusive"><span class="arrow">·</span>minExclusive<span class="arrow">·</span></a>
|
|
is among <a class="propref" href="#defn-facets">{facets}</a>
|
|
</li><li>
|
|
one of <a class="termref" href="#dt-maxInclusive"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> or
|
|
<a class="termref" href="#dt-maxExclusive"><span class="arrow">·</span>maxExclusive<span class="arrow">·</span></a>
|
|
is among <a class="propref" href="#defn-facets">{facets}</a>
|
|
</li><li>
|
|
<b>either</b> of the following are true:
|
|
<ol class="enumlr"><li>
|
|
<a class="termref" href="#dt-fractionDigits"><span class="arrow">·</span>fractionDigits<span class="arrow">·</span></a> is among <a class="propref" href="#defn-facets">{facets}</a>
|
|
</li><li>
|
|
<a class="propref" href="#defn-basetype">{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 class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
from them
|
|
</li></ol></li></ol></li></ol><p>
|
|
When <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a>,
|
|
if <a class="termref" href="#dt-length"><span class="arrow">·</span>length<span class="arrow">·</span></a> or both of
|
|
<a class="termref" href="#dt-minLength"><span class="arrow">·</span>minLength<span class="arrow">·</span></a> and <a class="termref" href="#dt-maxLength"><span class="arrow">·</span>maxLength<span class="arrow">·</span></a>
|
|
are among <a class="propref" href="#defn-facets">{facets}</a>, then
|
|
<a class="propref" href="#cardinality-value">{value}</a> is <em>finite</em>; else
|
|
<a class="propref" href="#cardinality-value">{value}</a> is <em>countably infinite</em>.
|
|
</p><p>
|
|
When <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a>,
|
|
if <a class="propref" href="#cardinality-value">{value}</a> is <em>finite</em>
|
|
for every member of <a class="propref" href="#defn-memberTypes">{member type definitions}</a>, then
|
|
<a class="propref" href="#cardinality-value">{value}</a> is <em>finite</em>;
|
|
else <a class="propref" href="#cardinality-value">{value}</a> is <em>countably infinite</em>.
|
|
</p></div></div><div class="div3">
|
|
<h4><a id="rf-numeric" name="rf-numeric"/>4.2.5 numeric</h4><p>
|
|
<span class="termdef"><a id="dt-numeric" 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 id="dt-non-numeric" name="dt-non-numeric">[Definition:]  </a>A datatype whose values
|
|
are not <a class="termref" href="#dt-numeric"><span class="arrow">·</span>numeric<span class="arrow">·</span></a> is said to be
|
|
<b>non-numeric</b>.
|
|
</span>
|
|
</p><p>
|
|
<a class="termref" href="#dt-numeric"><span class="arrow">·</span>numeric<span class="arrow">·</span></a> provides for:
|
|
</p><ul><li>
|
|
indicating whether a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is
|
|
<a class="termref" href="#dt-numeric"><span class="arrow">·</span>numeric<span class="arrow">·</span></a>
|
|
</li></ul><div class="div4">
|
|
<h5><a id="dc-numeric" name="dc-numeric"/>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" id="numeric-value"><span class="propdef">{value}</span></a></dt><dd>
|
|
A <a href="#boolean">boolean</a>
|
|
</dd>
|
|
</dl>
|
|
</div></div><p>
|
|
<a class="propref" href="#numeric-value">{value}</a> depends on <a class="propref" href="#defn-variety">{variety}</a>,
|
|
<a class="propref" href="#defn-facets">{facets}</a>, <a class="propref" href="#defn-basetype">{base type definition}</a> and
|
|
<a class="propref" href="#defn-memberTypes">{member type definitions}</a> in the <a href="#dc-defn">Simple Type Definition</a> component
|
|
in which a <a class="termref" href="#dt-cardinality"><span class="arrow">·</span>cardinality<span class="arrow">·</span></a> component appears as a member of
|
|
<a class="propref" href="#defn-fund-facets">{fundamental facets}</a>.
|
|
</p><p>
|
|
When <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a>,
|
|
<a class="propref" href="#numeric-value">{value}</a> is inherited from
|
|
<a class="propref" href="#numeric-value">{value}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>.
|
|
For all <a class="termref" href="#dt-primitive"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> types <a class="propref" href="#numeric-value">{value}</a>
|
|
is as specified in the table in <a href="#app-fundamental-facets">Fundamental Facets (§C.1)</a>.
|
|
</p><p>
|
|
When <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a>,
|
|
<a class="propref" href="#numeric-value">{value}</a> is <em>false</em>.
|
|
</p><p>
|
|
When <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a>,
|
|
if <a class="propref" href="#numeric-value">{value}</a> is <em>true</em>
|
|
for every member of <a class="propref" href="#defn-memberTypes">{member type definitions}</a>, then
|
|
<a class="propref" href="#numeric-value">{value}</a> is <em>true</em>;
|
|
else <a class="propref" href="#numeric-value">{value}</a> is <em>false</em>.
|
|
</p></div></div></div><div class="div2">
|
|
<h3 class="withToc"><span class="nav"><a class="nav" href="#rf-fund-facets"><img src="previous.jpg" alt="previous sub-section"/></a> </span><a id="rf-facets" name="rf-facets"/>4.3 Constraining Facets</h3><div class="localToc">        4.3.1 <a href="#rf-length">length</a><br/>
|
|
        4.3.2 <a href="#rf-minLength">minLength</a><br/>
|
|
        4.3.3 <a href="#rf-maxLength">maxLength</a><br/>
|
|
        4.3.4 <a href="#rf-pattern">pattern</a><br/>
|
|
        4.3.5 <a href="#rf-enumeration">enumeration</a><br/>
|
|
        4.3.6 <a href="#rf-whiteSpace">whiteSpace</a><br/>
|
|
        4.3.7 <a href="#rf-maxInclusive">maxInclusive</a><br/>
|
|
        4.3.8 <a href="#rf-maxExclusive">maxExclusive</a><br/>
|
|
        4.3.9 <a href="#rf-minExclusive">minExclusive</a><br/>
|
|
        4.3.10 <a href="#rf-minInclusive">minInclusive</a><br/>
|
|
        4.3.11 <a href="#rf-totalDigits">totalDigits</a><br/>
|
|
        4.3.12 <a href="#rf-fractionDigits">fractionDigits</a><br/>
|
|
</div><div class="div3">
|
|
<h4><a id="rf-length" name="rf-length"/>4.3.1 length</h4><p>
|
|
<span class="termdef"><a id="dt-length" name="dt-length">[Definition:]  </a>
|
|
<b>length</b> is the number
|
|
of <em>units of length</em>, where <em>units of length</em>
|
|
varies depending on the type that is being <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from.
|
|
The value of
|
|
<b>length</b> <a class="termref" href="#dt-must"><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 class="termref" href="#dt-derived"><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 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 class="termref" href="#dt-derived"><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 class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> by <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a>,
|
|
<b>length</b> is measured in number of list items.
|
|
</p><div class="note"><b>Note: </b>
|
|
For <a href="#string">string</a> and datatypes <a class="termref" href="#dt-derived"><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>.
|
|
</div><p>
|
|
<a class="termref" href="#dt-length"><span class="arrow">·</span>length<span class="arrow">·</span></a> provides for:
|
|
</p><ul><li>
|
|
Constraining a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
to values with a specific number of <em>units of length</em>,
|
|
where <em>units of length</em>
|
|
varies depending on <a class="propref" href="#defn-basetype">{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 class="termref" href="#dt-user-derived"><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 id="dc-length" name="dc-length"/>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" id="length-value"><span class="propdef">{value}</span></a></dt><dd>
|
|
A <a href="#nonNegativeInteger">nonNegativeInteger</a>.
|
|
</dd>
|
|
<dt><a name="length-fixed" id="length-fixed"><span class="propdef">{fixed}</span></a></dt><dd>
|
|
A <a href="#boolean">boolean</a>.
|
|
</dd>
|
|
<dt><a name="length-annotation" id="length-annotation"><span class="propdef">{annotation}</span></a></dt><dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div></div><p>
|
|
If <a class="propref" href="#length-fixed">{fixed}</a> is <em>true</em>, then types for which
|
|
the current type is the <a class="propref" href="#defn-basetype">{base type definition}</a> cannot specify a
|
|
value for <a href="#dc-length">length</a> other than <a class="propref" href="#length-value">{value}</a>.
|
|
</p></div><div class="div4">
|
|
<h5><a id="xr-length" name="xr-length"/>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 class="eltref" href="#element-length"><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" id="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 class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation">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 cellpadding="3" border="0"><thead><tr><th align="left">Property</th><th align="left">Representation</th></tr></thead><tbody valign="top"><tr valign="top"><td><a class="propref" href="#length-value">{value}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>value</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#length-fixed">{fixed}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>fixed</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>, if present, otherwise false
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#defn-annotation">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation"><annotation></a>
|
|
element information items in the <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.element">[children]</a>, if any.
|
|
</td></tr></tbody></table></td></tr></tbody></table></div>
|
|
</div></div></div><div class="div4">
|
|
<h5><a id="length-validation-rules" name="length-validation-rules"/>4.3.1.3 length Validation Rules</h5><div class="constraintnote"><a name="cvc-length-valid" id="cvc-length-valid"/><b>Validation Rule: Length Valid</b><br/><div class="constraint">
|
|
A value in a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is facet-valid with
|
|
respect to <a class="termref" href="#dt-length"><span class="arrow">·</span>length<span class="arrow">·</span></a>, determined as follows:
|
|
<div class="constraintlist"><div class="clnumber">1
|
|
if the <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> then
|
|
<div class="constraintlist"><div class="clnumber">1.1
|
|
if <a class="propref" href="#defn-primitive">{primitive type definition}</a> is <a href="#string">string</a> or <a href="#anyURI">anyURI</a>, then the
|
|
length of the value, as measured in <a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#dt-character">
|
|
character</a>s
|
|
<a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be equal to <a class="propref" href="#length-value">{value}</a>;
|
|
</div><div class="clnumber">1.2
|
|
if <a class="propref" href="#defn-primitive">{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 class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be equal to <a class="propref" href="#length-value">{value}</a>;
|
|
</div><div class="clnumber">1.3
|
|
|
|
if <a class="propref" href="#defn-primitive">{primitive type definition}</a> is <a href="#QName">QName</a> or <a href="#NOTATION">NOTATION</a>, then
|
|
any <a class="propref" href="#length-value">{value}</a> is facet-valid.
|
|
</div></div>
|
|
</div><div class="clnumber">2
|
|
if the <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a>,
|
|
then the length of the value, as measured
|
|
in list items, <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be equal to <a class="propref" href="#length-value">{value}</a>
|
|
</div></div></div></div><p>
|
|
|
|
The use of <a class="termref" href="#dt-length"><span class="arrow">·</span>length<span class="arrow">·</span></a>
|
|
on datatypes <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#QName">QName</a> and <a href="#NOTATION">NOTATION</a>
|
|
is deprecated. Future versions of this
|
|
specification may remove this facet for these datatypes.
|
|
|
|
</p></div><div class="div4">
|
|
<h5><a id="length-coss" name="length-coss"/>4.3.1.4 Constraints on length Schema Components</h5><div class="constraintnote"><a name="length-minLength-maxLength" id="length-minLength-maxLength"/><b>Schema Component Constraint: length and minLength or maxLength</b><br/><div class="constraint">If <a href="#dc-length">length</a> is a member of <a class="propref" href="#defn-facets">{facets}</a> then
|
|
<div class="constraintlist"><div class="clnumber">1 It is an error for <a href="#dc-minLength">minLength</a> to be a member of
|
|
<a class="propref" href="#defn-facets">{facets}</a> unless
|
|
<div class="constraintlist"><div class="clnumber">1.1 the <a class="propref" href="#minLength-value">{value}</a> of <a href="#dc-minLength">minLength</a> <= the <a class="propref" href="#length-value">{value}</a> of <a href="#dc-length">length</a> and</div><div class="clnumber">1.2 there is type definition from which this one is derived by
|
|
one or more restriction steps in which <a href="#dc-minLength">minLength</a> has the same
|
|
<a class="propref" href="#minLength-value">{value}</a> and <a href="#dc-length">length</a> is not specified.</div></div>
|
|
</div><div class="clnumber">2 It is an error for <a href="#dc-maxLength">maxLength</a> to be a member of
|
|
<a class="propref" href="#defn-facets">{facets}</a> unless
|
|
<div class="constraintlist"><div class="clnumber">2.1 the <a class="propref" href="#length-value">{value}</a> of <a href="#dc-length">length</a> <= the <a class="propref" href="#maxLength-value">{value}</a> of <a href="#dc-maxLength">maxLength</a> and</div><div class="clnumber">2.2 there is type definition from which this one is derived by
|
|
one or more restriction steps in which <a href="#dc-maxLength">maxLength</a> has the same
|
|
<a class="propref" href="#maxLength-value">{value}</a> and <a href="#dc-length">length</a> is not specified.</div></div>
|
|
</div></div>
|
|
</div></div><div class="constraintnote"><a name="length-valid-restriction" id="length-valid-restriction"/><b>Schema Component Constraint: length valid restriction</b><br/><div class="constraint">
|
|
It is an <a class="termref" href="#dt-error"><span class="arrow">·</span>error<span class="arrow">·</span></a> if <a href="#dc-length">length</a>
|
|
is among the members of <a class="propref" href="#defn-facets">{facets}</a> of
|
|
<a class="propref" href="#defn-basetype">{base type definition}</a> and <a class="propref" href="#length-value">{value}</a> is
|
|
not equal to the <a class="propref" href="#length-value">{value}</a> of the parent
|
|
<a href="#dc-length">length</a>.
|
|
</div></div></div></div><div class="div3">
|
|
<h4><a id="rf-minLength" name="rf-minLength"/>4.3.2 minLength</h4><p>
|
|
<span class="termdef"><a id="dt-minLength" name="dt-minLength">[Definition:]  </a>
|
|
<b>minLength</b> is
|
|
the minimum number of <em>units of length</em>, where
|
|
<em>units of length</em> varies depending on the type that is being
|
|
<a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from.
|
|
The value of <b>minLength</b>
|
|
 <a class="termref" href="#dt-must"><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 class="termref" href="#dt-derived"><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 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 class="termref" href="#dt-derived"><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 class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> by <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a>,
|
|
<b>minLength</b> is measured in number of list items.
|
|
</p><div class="note"><b>Note: </b>
|
|
For <a href="#string">string</a> and datatypes <a class="termref" href="#dt-derived"><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>.
|
|
</div><p>
|
|
<a class="termref" href="#dt-minLength"><span class="arrow">·</span>minLength<span class="arrow">·</span></a> provides for:
|
|
</p><ul><li>
|
|
Constraining a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
to values with at least a specific number of <em>units of length</em>,
|
|
where <em>units of length</em>
|
|
varies depending on <a class="propref" href="#defn-basetype">{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 class="termref" href="#dt-user-derived"><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 class="termref" href="#dt-value-space"><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 id="dc-minLength" name="dc-minLength"/>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" id="minLength-value"><span class="propdef">{value}</span></a></dt><dd>
|
|
A <a href="#nonNegativeInteger">nonNegativeInteger</a>.
|
|
</dd>
|
|
<dt><a name="minLength-fixed" id="minLength-fixed"><span class="propdef">{fixed}</span></a></dt><dd>
|
|
A <a href="#boolean">boolean</a>.
|
|
</dd>
|
|
<dt><a name="minLength-annotation" id="minLength-annotation"><span class="propdef">{annotation}</span></a></dt><dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div></div><p>
|
|
If <a class="propref" href="#minLength-fixed">{fixed}</a> is <em>true</em>, then types for which
|
|
the current type is the <a class="propref" href="#defn-basetype">{base type definition}</a> cannot specify a
|
|
value for <a href="#dc-minLength">minLength</a> other than <a class="propref" href="#minLength-value">{value}</a>.
|
|
</p></div><div class="div4">
|
|
<h5><a id="xr-minLength" name="xr-minLength"/>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 class="eltref" href="#element-minLength"><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" id="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 class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation">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 cellpadding="3" border="0"><thead><tr><th align="left">Property</th><th align="left">Representation</th></tr></thead><tbody valign="top"><tr valign="top"><td><a class="propref" href="#minLength-value">{value}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>value</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#minLength-fixed">{fixed}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>fixed</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>, if present, otherwise false
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#defn-annotation">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation"><annotation></a>
|
|
element information items in the <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.element">[children]</a>, if any.
|
|
</td></tr></tbody></table></td></tr></tbody></table></div>
|
|
</div></div></div><div class="div4">
|
|
<h5><a id="minLength-validation-rules" name="minLength-validation-rules"/>4.3.2.3 minLength Validation Rules</h5><div class="constraintnote"><a name="cvc-minLength-valid" id="cvc-minLength-valid"/><b>Validation Rule: minLength Valid</b><br/><div class="constraint">
|
|
A value in a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is facet-valid with
|
|
respect to <a class="termref" href="#dt-minLength"><span class="arrow">·</span>minLength<span class="arrow">·</span></a>, determined as follows:
|
|
<div class="constraintlist"><div class="clnumber">1
|
|
if the <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> then
|
|
<div class="constraintlist"><div class="clnumber">1.1
|
|
if <a class="propref" href="#defn-primitive">{primitive type definition}</a> is <a href="#string">string</a> or
|
|
<a href="#anyURI">anyURI</a>, then the
|
|
length of the value, as measured in<a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#dt-character">
|
|
character</a>s
|
|
<a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be greater than or equal to
|
|
<a class="propref" href="#minLength-value">{value}</a>;
|
|
</div><div class="clnumber">1.2
|
|
if <a class="propref" href="#defn-primitive">{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 class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be greater than or equal to
|
|
<a class="propref" href="#minLength-value">{value}</a>;
|
|
</div><div class="clnumber">1.3
|
|
|
|
if <a class="propref" href="#defn-primitive">{primitive type definition}</a> is <a href="#QName">QName</a> or <a href="#NOTATION">NOTATION</a>, then
|
|
any <a class="propref" href="#minLength-value">{value}</a> is facet-valid.
|
|
</div></div>
|
|
</div><div class="clnumber">2
|
|
if the <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a>,
|
|
then the length of the value, as measured
|
|
in list items, <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be greater than or equal
|
|
to <a class="propref" href="#minLength-value">{value}</a>
|
|
</div></div></div></div><p>
|
|
|
|
The use of <a class="termref" href="#dt-minLength"><span class="arrow">·</span>minLength<span class="arrow">·</span></a>
|
|
on datatypes <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#QName">QName</a> and <a href="#NOTATION">NOTATION</a>
|
|
is deprecated. Future versions of this
|
|
specification may remove this facet for these datatypes.
|
|
|
|
</p></div><div class="div4">
|
|
<h5><a id="minLength-coss" name="minLength-coss"/>4.3.2.4 Constraints on minLength Schema Components</h5><div class="constraintnote"><a name="minLength-less-than-equal-to-maxLength" id="minLength-less-than-equal-to-maxLength"/><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 class="propref" href="#defn-facets">{facets}</a>, then the
|
|
<a class="propref" href="#minLength-value">{value}</a> of <a href="#dc-minLength">minLength</a>
|
|
 <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be less than or equal to the
|
|
<a class="propref" href="#maxLength-value">{value}</a> of <a href="#dc-maxLength">maxLength</a>.
|
|
</div></div><div class="constraintnote"><a name="minLength-valid-restriction" id="minLength-valid-restriction"/><b>Schema Component Constraint: minLength valid restriction</b><br/><div class="constraint">
|
|
It is an <a class="termref" href="#dt-error"><span class="arrow">·</span>error<span class="arrow">·</span></a> if <a href="#dc-minLength">minLength</a>
|
|
is among the members of <a class="propref" href="#defn-facets">{facets}</a> of
|
|
<a class="propref" href="#defn-basetype">{base type definition}</a> and <a class="propref" href="#minLength-value">{value}</a> is
|
|
less than the <a class="propref" href="#minLength-value">{value}</a> of the parent
|
|
<a href="#dc-minLength">minLength</a>.
|
|
</div></div></div></div><div class="div3">
|
|
<h4><a id="rf-maxLength" name="rf-maxLength"/>4.3.3 maxLength</h4><p>
|
|
<span class="termdef"><a id="dt-maxLength" name="dt-maxLength">[Definition:]  </a>
|
|
<b>maxLength</b> is
|
|
the maximum number of <em>units of length</em>, where
|
|
<em>units of length</em> varies
|
|
depending on the type that is being <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from.
|
|
The value of <b>maxLength</b>
|
|
 <a class="termref" href="#dt-must"><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 class="termref" href="#dt-derived"><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 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 class="termref" href="#dt-derived"><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 class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> by <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a>,
|
|
<b>maxLength</b> is measured in number of list items.
|
|
</p><div class="note"><b>Note: </b>
|
|
For <a href="#string">string</a> and datatypes <a class="termref" href="#dt-derived"><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>.
|
|
</div><p>
|
|
<a class="termref" href="#dt-maxLength"><span class="arrow">·</span>maxLength<span class="arrow">·</span></a> provides for:
|
|
</p><ul><li>
|
|
Constraining a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
to values with at most a specific number of <em>units of length</em>,
|
|
where <em>units of length</em>
|
|
varies depending on <a class="propref" href="#defn-basetype">{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 class="termref" href="#dt-user-derived"><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 id="dc-maxLength" name="dc-maxLength"/>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" id="maxLength-value"><span class="propdef">{value}</span></a></dt><dd>
|
|
A <a href="#nonNegativeInteger">nonNegativeInteger</a>.
|
|
</dd>
|
|
<dt><a name="maxLength-fixed" id="maxLength-fixed"><span class="propdef">{fixed}</span></a></dt><dd>
|
|
A <a href="#boolean">boolean</a>.
|
|
</dd>
|
|
<dt><a name="maxLength-annotation" id="maxLength-annotation"><span class="propdef">{annotation}</span></a></dt><dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div></div><p>
|
|
If <a class="propref" href="#maxLength-fixed">{fixed}</a> is <em>true</em>, then types for which
|
|
the current type is the <a class="propref" href="#defn-basetype">{base type definition}</a> cannot specify a
|
|
value for <a href="#dc-maxLength">maxLength</a> other than <a class="propref" href="#maxLength-value">{value}</a>.
|
|
</p></div><div class="div4">
|
|
<h5><a id="xr-maxLength" name="xr-maxLength"/>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 class="eltref" href="#element-maxLength"><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" id="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 class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation">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 cellpadding="3" border="0"><thead><tr><th align="left">Property</th><th align="left">Representation</th></tr></thead><tbody valign="top"><tr valign="top"><td><a class="propref" href="#maxLength-value">{value}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>value</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#maxLength-fixed">{fixed}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>fixed</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>, if present, otherwise false
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#defn-annotation">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation"><annotation></a>
|
|
element information items in the <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.element">[children]</a>, if any.
|
|
</td></tr></tbody></table></td></tr></tbody></table></div>
|
|
</div></div></div><div class="div4">
|
|
<h5><a id="maxLength-validation-rules" name="maxLength-validation-rules"/>4.3.3.3 maxLength Validation Rules</h5><div class="constraintnote"><a name="cvc-maxLength-valid" id="cvc-maxLength-valid"/><b>Validation Rule: maxLength Valid</b><br/><div class="constraint">
|
|
A value in a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is facet-valid with
|
|
respect to <a class="termref" href="#dt-maxLength"><span class="arrow">·</span>maxLength<span class="arrow">·</span></a>, determined as follows:
|
|
<div class="constraintlist"><div class="clnumber">1
|
|
if the <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> then
|
|
<div class="constraintlist"><div class="clnumber">1.1
|
|
if <a class="propref" href="#defn-primitive">{primitive type definition}</a> is <a href="#string">string</a> or
|
|
<a href="#anyURI">anyURI</a>, then the
|
|
length of the value, as measured in <a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#dt-character">
|
|
character</a>s
|
|
<a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be less than or equal to
|
|
<a class="propref" href="#maxLength-value">{value}</a>;
|
|
</div><div class="clnumber">1.2
|
|
if <a class="propref" href="#defn-primitive">{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 class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be less than or equal to <a class="propref" href="#maxLength-value">{value}</a>;
|
|
</div><div class="clnumber">1.3
|
|
|
|
if <a class="propref" href="#defn-primitive">{primitive type definition}</a> is <a href="#QName">QName</a> or <a href="#NOTATION">NOTATION</a>, then
|
|
any <a class="propref" href="#maxLength-value">{value}</a> is facet-valid.
|
|
</div></div>
|
|
</div><div class="clnumber">2
|
|
if the <a class="propref" href="#defn-variety">{variety}</a> is <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a>,
|
|
then the length of the value, as measured
|
|
in list items, <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be less than or equal to
|
|
<a class="propref" href="#maxLength-value">{value}</a>
|
|
</div></div></div></div><p>
|
|
|
|
The use of <a class="termref" href="#dt-maxLength"><span class="arrow">·</span>maxLength<span class="arrow">·</span></a>
|
|
on datatypes <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#QName">QName</a> and <a href="#NOTATION">NOTATION</a>
|
|
is deprecated. Future versions of this
|
|
specification may remove this facet for these datatypes.
|
|
|
|
</p></div><div class="div4">
|
|
<h5><a id="maxLength-coss" name="maxLength-coss"/>4.3.3.4 Constraints on maxLength Schema Components</h5><div class="constraintnote"><a name="maxLength-valid-restriction" id="maxLength-valid-restriction"/><b>Schema Component Constraint: maxLength valid restriction</b><br/><div class="constraint">
|
|
It is an <a class="termref" href="#dt-error"><span class="arrow">·</span>error<span class="arrow">·</span></a> if <a href="#dc-maxLength">maxLength</a>
|
|
is among the members of <a class="propref" href="#defn-facets">{facets}</a> of
|
|
<a class="propref" href="#defn-basetype">{base type definition}</a> and <a class="propref" href="#maxLength-value">{value}</a> is
|
|
greater than the <a class="propref" href="#maxLength-value">{value}</a> of the parent
|
|
<a href="#dc-maxLength">maxLength</a>.
|
|
</div></div></div></div><div class="div3">
|
|
<h4><a id="rf-pattern" name="rf-pattern"/>4.3.4 pattern</h4><p>
|
|
<span class="termdef"><a id="dt-pattern" name="dt-pattern">[Definition:]  </a>
|
|
<b>pattern</b> is a constraint on the
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of a datatype which is achieved by
|
|
constraining the <a class="termref" href="#dt-lexical-space"><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 class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be a <a class="termref" href="#dt-regex"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p><p>
|
|
<a class="termref" href="#dt-pattern"><span class="arrow">·</span>pattern<span class="arrow">·</span></a> provides for:
|
|
</p><ul><li>
|
|
Constraining a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
to values that are denoted by literals which match a specific
|
|
<a class="termref" href="#dt-regex"><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 class="termref" href="#dt-user-derived"><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 class="termref" href="#dt-regex"><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 id="dc-pattern" name="dc-pattern"/>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" id="pattern-value"><span class="propdef">{value}</span></a></dt><dd>
|
|
A <a class="termref" href="#dt-regex"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a>.
|
|
</dd>
|
|
<dt><a name="pattern-annotation" id="pattern-annotation"><span class="propdef">{annotation}</span></a></dt><dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div></div></div><div class="div4">
|
|
<h5><a id="xr-pattern" name="xr-pattern"/>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 class="eltref" href="#element-pattern"><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" id="element-pattern"><pattern</a><br/>  id = <a href="#ID">ID</a><br/>  <b>value</b> = <a href="#string">string</a><br/>  <em>{any attributes with non-schema namespace . . .}</em>><br/><em>  Content: </em>(<a class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation">annotation</a>?)<br/></pattern></p>
|
|
<div class="reprdep">
|
|
<a class="propref" href="#pattern-value">{value}</a> <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be a valid
|
|
<a class="termref" href="#dt-regex"><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 cellpadding="3" border="0"><thead><tr><th align="left">Property</th><th align="left">Representation</th></tr></thead><tbody valign="top"><tr valign="top"><td><a class="propref" href="#pattern-value">{value}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>value</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#defn-annotation">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation"><annotation></a>
|
|
element information items in the <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.element">[children]</a>, if any.
|
|
</td></tr></tbody></table></td></tr></tbody></table></div>
|
|
</div></div></div><div class="div4">
|
|
<h5><a id="pattern-rep-constr" name="pattern-rep-constr"/>4.3.4.3 Constraints on XML Representation of pattern</h5><div class="constraintnote"><a name="src-multiple-patterns" id="src-multiple-patterns"/><b>Schema Representation Constraint: Multiple patterns</b><br/><div class="constraint">
|
|
If multiple <a class="eltref" href="#element-pattern"><pattern></a> element information items appear as
|
|
<a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.element">[children]</a> of a <a class="eltref" href="#element-simpleType"><simpleType></a>, the <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[value]</a>s should
|
|
be combined as if they appeared in a single
|
|
<a class="termref" href="#dt-regex"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a> as separate
|
|
<a class="termref" href="#dt-branch"><span class="arrow">·</span>branch<span class="arrow">·</span></a>es.
|
|
</div></div><div class="note"><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 class="termref" href="#dt-restriction"><span class="arrow">·</span>restriction<span class="arrow">·</span></a> that <a class="termref" href="#dt-pattern"><span class="arrow">·</span>pattern<span class="arrow">·</span></a>
|
|
facets specified on the <em>same</em> step in a type
|
|
derivation are <b>OR</b>ed together, while <a class="termref" href="#dt-pattern"><span class="arrow">·</span>pattern<span class="arrow">·</span></a>
|
|
facets specified on <em>different</em> steps of a type derivation
|
|
are <b>AND</b>ed together.
|
|
<p/>
|
|
Thus, to impose two <a class="termref" href="#dt-pattern"><span class="arrow">·</span>pattern<span class="arrow">·</span></a> constraints simultaneously,
|
|
schema authors may either write a single <a class="termref" href="#dt-pattern"><span class="arrow">·</span>pattern<span class="arrow">·</span></a> which
|
|
expresses the intersection of the two <a class="termref" href="#dt-pattern"><span class="arrow">·</span>pattern<span class="arrow">·</span></a>s they wish to
|
|
impose, or define each <a class="termref" href="#dt-pattern"><span class="arrow">·</span>pattern<span class="arrow">·</span></a> on a separate type derivation
|
|
step.
|
|
</div></div><div class="div4">
|
|
<h5><a id="pattern-validation-rules" name="pattern-validation-rules"/>4.3.4.4 pattern Validation Rules</h5><div class="constraintnote"><a name="cvc-pattern-valid" id="cvc-pattern-valid"/><b>Validation Rule: pattern valid</b><br/><div class="constraint">
|
|
A literal in a <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> is facet-valid with
|
|
respect to <a class="termref" href="#dt-pattern"><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 class="termref" href="#dt-regex"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a> specified in <a class="propref" href="#pattern-value">{value}</a>.
|
|
</div></div></div></div></div></div><div class="div3">
|
|
<h4><a id="rf-enumeration" name="rf-enumeration"/>4.3.5 enumeration</h4><p>
|
|
<span class="termdef"><a id="dt-enumeration" name="dt-enumeration">[Definition:]  </a>
|
|
<b>enumeration</b> constrains the <a class="termref" href="#dt-value-space"><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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> it creates; the value of the
|
|
<a class="termref" href="#dt-ordered"><span class="arrow">·</span>ordered<span class="arrow">·</span></a> property of the <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
datatype remains that of the datatype from which it is
|
|
<a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a>.
|
|
</p><p>
|
|
<a class="termref" href="#dt-enumeration"><span class="arrow">·</span>enumeration<span class="arrow">·</span></a> provides for:
|
|
</p><ul><li>
|
|
Constraining a <a class="termref" href="#dt-value-space"><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 class="termref" href="#dt-user-derived"><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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>. The enumerated values must be
|
|
type-valid literals for the <a class="termref" href="#dt-basetype"><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 id="dc-enumeration" name="dc-enumeration"/>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" id="enumeration-value"><span class="propdef">{value}</span></a></dt><dd>
|
|
A set of values from the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the
|
|
<a class="propref" href="#defn-basetype">{base type definition}</a>.
|
|
</dd>
|
|
<dt><a name="enumeration-annotation" id="enumeration-annotation"><span class="propdef">{annotation}</span></a></dt><dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div></div></div><div class="div4">
|
|
<h5><a id="xr-enumeration" name="xr-enumeration"/>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 class="eltref" href="#element-enumeration"><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" id="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 class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation">annotation</a>?)<br/></enumeration></p>
|
|
<div class="reprdep">
|
|
<a class="propref" href="#enumeration-value">{value}</a> <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be
|
|
in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <a class="propref" href="#defn-basetype">{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 cellpadding="3" border="0"><thead><tr><th align="left">Property</th><th align="left">Representation</th></tr></thead><tbody valign="top"><tr valign="top"><td><a class="propref" href="#enumeration-value">{value}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>value</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#defn-annotation">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation"><annotation></a>
|
|
element information items in the <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.element">[children]</a>, if any.
|
|
</td></tr></tbody></table></td></tr></tbody></table></div>
|
|
</div></div></div><div class="div4">
|
|
<h5><a id="enumeration-rep-constr" name="enumeration-rep-constr"/>4.3.5.3 Constraints on XML Representation of enumeration</h5><div class="constraintnote"><a name="src-multiple-enumerations" id="src-multiple-enumerations"/><b>Schema Representation Constraint: Multiple enumerations</b><br/><div class="constraint">
|
|
If multiple <a class="eltref" href="#element-enumeration"><enumeration></a> element information items appear
|
|
as <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.element">[children]</a> of a <a class="eltref" href="#element-simpleType"><simpleType></a> the
|
|
<a class="propref" href="#enumeration-value">{value}</a> of the <a href="#dc-enumeration">enumeration</a>
|
|
component should be the set of all such <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[value]</a>s.
|
|
</div></div></div><div class="div4">
|
|
<h5><a id="enumeration-validation-rules" name="enumeration-validation-rules"/>4.3.5.4 enumeration Validation Rules</h5><div class="constraintnote"><a name="cvc-enumeration-valid" id="cvc-enumeration-valid"/><b>Validation Rule: enumeration valid</b><br/><div class="constraint">
|
|
A value in a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is facet-valid with
|
|
respect to <a class="termref" href="#dt-enumeration"><span class="arrow">·</span>enumeration<span class="arrow">·</span></a> if
|
|
the value is one of the values specified in
|
|
<a class="propref" href="#enumeration-value">{value}</a>
|
|
</div></div></div><div class="div4">
|
|
<h5><a id="enumeration-coss" name="enumeration-coss"/>4.3.5.5 Constraints on enumeration Schema Components</h5><div class="constraintnote"><a name="enumeration-valid-restriction" id="enumeration-valid-restriction"/><b>Schema Component Constraint: enumeration valid restriction</b><br/><div class="constraint">
|
|
It is an <a class="termref" href="#dt-error"><span class="arrow">·</span>error<span class="arrow">·</span></a> if any member of <a class="propref" href="#enumeration-value">{value}</a> is not in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
of <a class="propref" href="#defn-basetype">{base type definition}</a>.
|
|
</div></div></div></div><div class="div3">
|
|
<h4><a id="rf-whiteSpace" name="rf-whiteSpace"/>4.3.6 whiteSpace</h4><p>
|
|
<span class="termdef"><a id="dt-whiteSpace" name="dt-whiteSpace">[Definition:]  </a>
|
|
<b>whiteSpace</b> constrains the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
of types <a class="termref" href="#dt-derived"><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 class="label">preserve</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 class="label">replace</dt><dd>
|
|
All occurrences of #x9 (tab), #xA (line feed) and #xD (carriage return)
|
|
are replaced with #x20 (space)
|
|
</dd><dt class="label">collapse</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><div class="note"><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.
|
|
</div><p>
|
|
<b>whiteSpace</b> is applicable to all <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> and
|
|
<a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatypes. For all <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a>
|
|
datatypes other than <a href="#string">string</a> (and types <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
by <a class="termref" href="#dt-restriction"><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 class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> by
|
|
<a class="termref" href="#dt-restriction"><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 class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> by <a class="termref" href="#dt-list"><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 class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> by <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a>
|
|
 <b>whiteSpace</b> does not apply directly; however, the
|
|
normalization behavior of <a class="termref" href="#dt-union"><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 class="termref" href="#dt-memberTypes"><span class="arrow">·</span>memberTypes<span class="arrow">·</span></a> against which the <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a>
|
|
is successfully validated.
|
|
</p><div class="note"><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/2004/REC-xmlschema-1-20041028/structures.html#components">Schema Component Details</a>
|
|
in <a href="#structural-schemas">[XML Schema Part 1: Structures]</a>.
|
|
</div><p>
|
|
<a class="termref" href="#dt-whiteSpace"><span class="arrow">·</span>whiteSpace<span class="arrow">·</span></a> provides for:
|
|
</p><ul><li>
|
|
Constraining a <a class="termref" href="#dt-value-space"><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 class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> 
|
|
<a class="termref" href="#dt-derived"><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 id="dc-whiteSpace" name="dc-whiteSpace"/>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" id="whiteSpace-value"><span class="propdef">{value}</span></a></dt><dd>
|
|
One of <code>{preserve, replace, collapse}</code>.
|
|
</dd>
|
|
<dt><a name="whiteSpace-fixed" id="whiteSpace-fixed"><span class="propdef">{fixed}</span></a></dt><dd>
|
|
A <a href="#boolean">boolean</a>.
|
|
</dd>
|
|
<dt><a name="whiteSpace-annotation" id="whiteSpace-annotation"><span class="propdef">{annotation}</span></a></dt><dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div></div><p>
|
|
If <a class="propref" href="#whiteSpace-fixed">{fixed}</a> is <em>true</em>, then types for which
|
|
the current type is the <a class="propref" href="#defn-basetype">{base type definition}</a> cannot specify a
|
|
value for <a href="#dc-whiteSpace">whiteSpace</a> other than <a class="propref" href="#whiteSpace-value">{value}</a>.
|
|
</p></div><div class="div4">
|
|
<h5><a id="xr-whiteSpace" name="xr-whiteSpace"/>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 class="eltref" href="#element-whiteSpace"><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" id="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 class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation">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 cellpadding="3" border="0"><thead><tr><th align="left">Property</th><th align="left">Representation</th></tr></thead><tbody valign="top"><tr valign="top"><td><a class="propref" href="#whiteSpace-value">{value}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>value</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#whiteSpace-fixed">{fixed}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>fixed</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>, if present, otherwise false
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#defn-annotation">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation"><annotation></a>
|
|
element information items in the <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.element">[children]</a>, if any.
|
|
</td></tr></tbody></table></td></tr></tbody></table></div>
|
|
</div></div></div><div class="div4">
|
|
<h5><a id="whiteSpace-validation-rules" name="whiteSpace-validation-rules"/>4.3.6.3 whiteSpace Validation Rules</h5><div class="note"><b>Note: </b>
|
|
There are no <a class="termref" href="#dt-cvc"><span class="arrow">·</span>Validation Rule<span class="arrow">·</span></a>s associated <a class="termref" href="#dt-whiteSpace"><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/2004/REC-xmlschema-1-20041028/structures.html#components">Schema Component Details</a>
|
|
in <a href="#structural-schemas">[XML Schema Part 1: Structures]</a>.
|
|
</div></div><div class="div4">
|
|
<h5><a id="whiteSpace-coss" name="whiteSpace-coss"/>4.3.6.4 Constraints on whiteSpace Schema Components</h5><div class="constraintnote"><a name="whiteSpace-valid-restriction" id="whiteSpace-valid-restriction"/><b>Schema Component Constraint: whiteSpace valid restriction</b><br/><div class="constraint">
|
|
It is an <a class="termref" href="#dt-error"><span class="arrow">·</span>error<span class="arrow">·</span></a> if <a href="#dc-whiteSpace">whiteSpace</a>
|
|
is among the members of <a class="propref" href="#defn-facets">{facets}</a> of
|
|
<a class="propref" href="#defn-basetype">{base type definition}</a> and any of the following conditions is
|
|
true:
|
|
<div class="constraintlist"><div class="clnumber">1
|
|
<a class="propref" href="#whiteSpace-value">{value}</a> is <em>replace</em> or <em>preserve</em>
|
|
and the <a class="propref" href="#whiteSpace-value">{value}</a> of the parent
|
|
<a href="#dc-whiteSpace">whiteSpace</a> is <em>collapse</em>
|
|
</div><div class="clnumber">2
|
|
<a class="propref" href="#whiteSpace-value">{value}</a> is <em>preserve</em>
|
|
and the <a class="propref" href="#whiteSpace-value">{value}</a> of the parent
|
|
<a href="#dc-whiteSpace">whiteSpace</a> is <em>replace</em>
|
|
</div></div></div></div></div></div><div class="div3">
|
|
<h4><a id="rf-maxInclusive" name="rf-maxInclusive"/>4.3.7 maxInclusive</h4><p>
|
|
<span class="termdef"><a id="dt-maxInclusive" name="dt-maxInclusive">[Definition:]  </a>
|
|
<b>maxInclusive</b> is the <a class="termref" href="#dt-inclusive-upper-bound"><span class="arrow">·</span>inclusive upper bound<span class="arrow">·</span></a>
|
|
of the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> for a datatype with the
|
|
<a class="termref" href="#dt-ordered"><span class="arrow">·</span>ordered<span class="arrow">·</span></a> property. The value of
|
|
<b>maxInclusive</b> <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be
|
|
in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the
|
|
<a class="termref" href="#dt-basetype"><span class="arrow">·</span>base type<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p><p>
|
|
<a class="termref" href="#dt-maxInclusive"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> provides for:
|
|
</p><ul><li>
|
|
Constraining a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> to values
|
|
with a specific <a class="termref" href="#dt-inclusive-upper-bound"><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 class="termref" href="#dt-user-derived"><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 class="termref" href="#dt-maxInclusive"><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 id="dc-maxInclusive" name="dc-maxInclusive"/>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" id="maxInclusive-value"><span class="propdef">{value}</span></a></dt><dd>
|
|
A value from the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the
|
|
<a class="propref" href="#defn-basetype">{base type definition}</a>.
|
|
</dd>
|
|
<dt><a name="maxInclusive-fixed" id="maxInclusive-fixed"><span class="propdef">{fixed}</span></a></dt><dd>
|
|
A <a href="#boolean">boolean</a>.
|
|
</dd>
|
|
<dt><a name="maxInclusive-annotation" id="maxInclusive-annotation"><span class="propdef">{annotation}</span></a></dt><dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div></div><p>
|
|
If <a class="propref" href="#maxInclusive-fixed">{fixed}</a> is <em>true</em>, then types for which
|
|
the current type is the <a class="propref" href="#defn-basetype">{base type definition}</a> cannot specify a
|
|
value for <a href="#dc-maxInclusive">maxInclusive</a> other than <a class="propref" href="#maxInclusive-value">{value}</a>.
|
|
</p></div><div class="div4">
|
|
<h5><a id="xr-maxInclusive" name="xr-maxInclusive"/>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 class="eltref" href="#element-maxInclusive"><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" id="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 class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation">annotation</a>?)<br/></maxInclusive></p>
|
|
<div class="reprdep">
|
|
<a class="propref" href="#maxInclusive-value">{value}</a> <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be
|
|
in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <a class="propref" href="#defn-basetype">{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 cellpadding="3" border="0"><thead><tr><th align="left">Property</th><th align="left">Representation</th></tr></thead><tbody valign="top"><tr valign="top"><td><a class="propref" href="#maxInclusive-value">{value}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>value</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#maxInclusive-fixed">{fixed}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>fixed</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>, if present, otherwise false, if present, otherwise false
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#defn-annotation">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation"><annotation></a>
|
|
element information items in the <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.element">[children]</a>, if any.
|
|
</td></tr></tbody></table></td></tr></tbody></table></div>
|
|
</div></div></div><div class="div4">
|
|
<h5><a id="maxInclusive-validation-rules" name="maxInclusive-validation-rules"/>4.3.7.3 maxInclusive Validation Rules</h5><div class="constraintnote"><a name="cvc-maxInclusive-valid" id="cvc-maxInclusive-valid"/><b>Validation Rule: maxInclusive Valid</b><br/><div class="constraint">
|
|
A value in an <a class="termref" href="#dt-ordered"><span class="arrow">·</span>ordered<span class="arrow">·</span></a> <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
is facet-valid with respect to <a class="termref" href="#dt-maxInclusive"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a>, determined as
|
|
follows:
|
|
<div class="constraintlist"><div class="clnumber">1
|
|
if the <a class="termref" href="#dt-numeric"><span class="arrow">·</span>numeric<span class="arrow">·</span></a> property in
|
|
<a class="propref" href="#defn-fund-facets">{fundamental facets}</a> is <em>true</em>, then the value
|
|
<a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be numerically less than or
|
|
equal to <a class="propref" href="#maxInclusive-value">{value}</a>;
|
|
</div><div class="clnumber">2
|
|
if the <a class="termref" href="#dt-numeric"><span class="arrow">·</span>numeric<span class="arrow">·</span></a> property in
|
|
<a class="propref" href="#defn-fund-facets">{fundamental facets}</a> is <em>false</em> (i.e.,
|
|
<a class="propref" href="#defn-basetype">{base type definition}</a> is one of the date and time related
|
|
datatypes), then the value <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be chronologically
|
|
less than or equal to <a class="propref" href="#maxInclusive-value">{value}</a>;
|
|
</div></div></div></div></div><div class="div4">
|
|
<h5><a id="maxInclusive-coss" name="maxInclusive-coss"/>4.3.7.4 Constraints on maxInclusive Schema Components</h5><div class="constraintnote"><a name="minInclusive-less-than-equal-to-maxInclusive" id="minInclusive-less-than-equal-to-maxInclusive"/><b>Schema Component Constraint: minInclusive <= maxInclusive</b><br/><div class="constraint">
|
|
It is an <a class="termref" href="#dt-error"><span class="arrow">·</span>error<span class="arrow">·</span></a> for the value specified for
|
|
<a class="termref" href="#dt-minInclusive"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> to be greater than the value
|
|
specified for <a class="termref" href="#dt-maxInclusive"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> for the same datatype.
|
|
</div></div><div class="constraintnote"><a name="maxInclusive-valid-restriction" id="maxInclusive-valid-restriction"/><b>Schema Component Constraint: maxInclusive valid restriction</b><br/><div class="constraint">
|
|
It is an <a class="termref" href="#dt-error"><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 class="propref" href="#defn-facets">{facets}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>
|
|
and <a class="propref" href="#maxInclusive-value">{value}</a> is
|
|
greater than the <a class="propref" href="#maxInclusive-value">{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 class="propref" href="#defn-facets">{facets}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>
|
|
and <a class="propref" href="#maxInclusive-value">{value}</a> is
|
|
greater than or equal to the <a class="propref" href="#maxExclusive-value">{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 class="propref" href="#defn-facets">{facets}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>
|
|
and <a class="propref" href="#maxInclusive-value">{value}</a> is
|
|
less than the <a class="propref" href="#minInclusive-value">{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 class="propref" href="#defn-facets">{facets}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>
|
|
and <a class="propref" href="#maxInclusive-value">{value}</a> is
|
|
less than or equal to the <a class="propref" href="#minExclusive-value">{value}</a> of the parent
|
|
<a href="#dc-minExclusive">minExclusive</a>
|
|
</div></div></div></div></div></div><div class="div3">
|
|
<h4><a id="rf-maxExclusive" name="rf-maxExclusive"/>4.3.8 maxExclusive</h4><p>
|
|
<span class="termdef"><a id="dt-maxExclusive" name="dt-maxExclusive">[Definition:]  </a>
|
|
<b>maxExclusive</b> is the <a class="termref" href="#dt-exclusive-upper-bound"><span class="arrow">·</span>exclusive upper bound<span class="arrow">·</span></a>
|
|
of the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> for a datatype with the
|
|
<a class="termref" href="#dt-ordered"><span class="arrow">·</span>ordered<span class="arrow">·</span></a> property. The value of <b>maxExclusive</b>
|
|
 <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the
|
|
<a class="termref" href="#dt-basetype"><span class="arrow">·</span>base type<span class="arrow">·</span></a> or be equal to <a class="propref" href="#maxExclusive-value">{value}</a> in
|
|
<a class="propref" href="#defn-basetype">{base type definition}</a>.
|
|
</span>
|
|
</p><p>
|
|
<a class="termref" href="#dt-maxExclusive"><span class="arrow">·</span>maxExclusive<span class="arrow">·</span></a> provides for:
|
|
</p><ul><li>
|
|
Constraining a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> to values
|
|
with a specific <a class="termref" href="#dt-exclusive-upper-bound"><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 class="termref" href="#dt-user-derived"><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 class="termref" href="#dt-maxExclusive"><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 class="termref" href="#dt-value-space"><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 id="dc-maxExclusive" name="dc-maxExclusive"/>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" id="maxExclusive-value"><span class="propdef">{value}</span></a></dt><dd>
|
|
A value from the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the
|
|
<a class="propref" href="#defn-basetype">{base type definition}</a>.
|
|
</dd>
|
|
<dt><a name="maxExclusive-fixed" id="maxExclusive-fixed"><span class="propdef">{fixed}</span></a></dt><dd>
|
|
A <a href="#boolean">boolean</a>.
|
|
</dd>
|
|
<dt><a name="maxExclusive-annotation" id="maxExclusive-annotation"><span class="propdef">{annotation}</span></a></dt><dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div></div><p>
|
|
If <a class="propref" href="#maxExclusive-fixed">{fixed}</a> is <em>true</em>, then types for which
|
|
the current type is the <a class="propref" href="#defn-basetype">{base type definition}</a> cannot specify a
|
|
value for <a href="#dc-maxExclusive">maxExclusive</a> other than <a class="propref" href="#maxExclusive-value">{value}</a>.
|
|
</p></div><div class="div4">
|
|
<h5><a id="xr-maxExclusive" name="xr-maxExclusive"/>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 class="eltref" href="#element-maxExclusive"><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" id="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 class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation">annotation</a>?)<br/></maxExclusive></p>
|
|
<div class="reprdep">
|
|
<a class="propref" href="#maxExclusive-value">{value}</a> <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be
|
|
in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <a class="propref" href="#defn-basetype">{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 cellpadding="3" border="0"><thead><tr><th align="left">Property</th><th align="left">Representation</th></tr></thead><tbody valign="top"><tr valign="top"><td><a class="propref" href="#maxExclusive-value">{value}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>value</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#maxExclusive-fixed">{fixed}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>fixed</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>, if present, otherwise false
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#defn-annotation">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation"><annotation></a>
|
|
element information items in the <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.element">[children]</a>, if any.
|
|
</td></tr></tbody></table></td></tr></tbody></table></div>
|
|
</div></div></div><div class="div4">
|
|
<h5><a id="maxExclusive-validation-rules" name="maxExclusive-validation-rules"/>4.3.8.3 maxExclusive Validation Rules</h5><div class="constraintnote"><a name="cvc-maxExclusive-valid" id="cvc-maxExclusive-valid"/><b>Validation Rule: maxExclusive Valid</b><br/><div class="constraint">
|
|
A value in an <a class="termref" href="#dt-ordered"><span class="arrow">·</span>ordered<span class="arrow">·</span></a> <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
is facet-valid with respect to <a class="termref" href="#dt-maxExclusive"><span class="arrow">·</span>maxExclusive<span class="arrow">·</span></a>, determined
|
|
as follows:
|
|
<div class="constraintlist"><div class="clnumber">1
|
|
if the <a class="termref" href="#dt-numeric"><span class="arrow">·</span>numeric<span class="arrow">·</span></a> property in
|
|
<a class="propref" href="#defn-fund-facets">{fundamental facets}</a> is <em>true</em>, then the
|
|
value <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be numerically less than
|
|
<a class="propref" href="#maxExclusive-value">{value}</a>;
|
|
</div><div class="clnumber">2
|
|
if the <a class="termref" href="#dt-numeric"><span class="arrow">·</span>numeric<span class="arrow">·</span></a> property in
|
|
<a class="propref" href="#defn-fund-facets">{fundamental facets}</a> is <em>false</em> (i.e.,
|
|
<a class="propref" href="#defn-basetype">{base type definition}</a> is one of the date and time related
|
|
datatypes), then the value <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be chronologically
|
|
less than <a class="propref" href="#maxExclusive-value">{value}</a>;
|
|
</div></div></div></div></div><div class="div4">
|
|
<h5><a id="maxExclusive-coss" name="maxExclusive-coss"/>4.3.8.4 Constraints on maxExclusive Schema Components</h5><div class="constraintnote"><a name="maxInclusive-maxExclusive" id="maxInclusive-maxExclusive"/><b>Schema Component Constraint: maxInclusive and maxExclusive</b><br/><div class="constraint">
|
|
It is an <a class="termref" href="#dt-error"><span class="arrow">·</span>error<span class="arrow">·</span></a> for both
|
|
<a class="termref" href="#dt-maxInclusive"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> and <a class="termref" href="#dt-maxExclusive"><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" id="minExclusive-less-than-equal-to-maxExclusive"/><b>Schema Component Constraint: minExclusive <= maxExclusive</b><br/><div class="constraint">
|
|
It is an <a class="termref" href="#dt-error"><span class="arrow">·</span>error<span class="arrow">·</span></a> for the value specified for
|
|
<a class="termref" href="#dt-minExclusive"><span class="arrow">·</span>minExclusive<span class="arrow">·</span></a> to be greater than the value
|
|
specified for <a class="termref" href="#dt-maxExclusive"><span class="arrow">·</span>maxExclusive<span class="arrow">·</span></a> for the same datatype.
|
|
</div></div><div class="constraintnote"><a name="maxExclusive-valid-restriction" id="maxExclusive-valid-restriction"/><b>Schema Component Constraint: maxExclusive valid restriction</b><br/><div class="constraint">
|
|
It is an <a class="termref" href="#dt-error"><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 class="propref" href="#defn-facets">{facets}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>
|
|
and <a class="propref" href="#maxExclusive-value">{value}</a> is
|
|
greater than the <a class="propref" href="#maxExclusive-value">{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 class="propref" href="#defn-facets">{facets}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>
|
|
and <a class="propref" href="#maxExclusive-value">{value}</a> is
|
|
greater than the <a class="propref" href="#maxInclusive-value">{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 class="propref" href="#defn-facets">{facets}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>
|
|
and <a class="propref" href="#maxExclusive-value">{value}</a> is
|
|
less than or equal to the <a class="propref" href="#minInclusive-value">{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 class="propref" href="#defn-facets">{facets}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>
|
|
and <a class="propref" href="#maxExclusive-value">{value}</a> is
|
|
less than or equal to the <a class="propref" href="#minExclusive-value">{value}</a> of the parent
|
|
<a href="#dc-minExclusive">minExclusive</a>
|
|
</div></div></div></div></div></div><div class="div3">
|
|
<h4><a id="rf-minExclusive" name="rf-minExclusive"/>4.3.9 minExclusive</h4><p>
|
|
<span class="termdef"><a id="dt-minExclusive" name="dt-minExclusive">[Definition:]  </a>
|
|
<b>minExclusive</b> is the <a class="termref" href="#dt-exclusive-lower-bound"><span class="arrow">·</span>exclusive lower bound<span class="arrow">·</span></a>
|
|
of the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> for a datatype with the
|
|
<a class="termref" href="#dt-ordered"><span class="arrow">·</span>ordered<span class="arrow">·</span></a> property.
|
|
The value of <b>minExclusive</b> <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a>
|
|
be in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the
|
|
<a class="termref" href="#dt-basetype"><span class="arrow">·</span>base type<span class="arrow">·</span></a>
|
|
or be equal to <a class="propref" href="#minExclusive-value">{value}</a> in
|
|
<a class="propref" href="#defn-basetype">{base type definition}</a>.
|
|
</span>
|
|
</p><p>
|
|
<a class="termref" href="#dt-minExclusive"><span class="arrow">·</span>minExclusive<span class="arrow">·</span></a> provides for:
|
|
</p><ul><li>
|
|
Constraining a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> to values
|
|
with a specific <a class="termref" href="#dt-exclusive-lower-bound"><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 class="termref" href="#dt-user-derived"><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 class="termref" href="#dt-minExclusive"><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 class="termref" href="#dt-value-space"><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 id="dc-minExclusive" name="dc-minExclusive"/>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" id="minExclusive-value"><span class="propdef">{value}</span></a></dt><dd>
|
|
A value from the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the
|
|
<a class="propref" href="#defn-basetype">{base type definition}</a>.
|
|
</dd>
|
|
<dt><a name="minExclusive-fixed" id="minExclusive-fixed"><span class="propdef">{fixed}</span></a></dt><dd>
|
|
A <a href="#boolean">boolean</a>.
|
|
</dd>
|
|
<dt><a name="minExclusive-annotation" id="minExclusive-annotation"><span class="propdef">{annotation}</span></a></dt><dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div></div><p>
|
|
If <a class="propref" href="#minExclusive-fixed">{fixed}</a> is <em>true</em>, then types for which
|
|
the current type is the <a class="propref" href="#defn-basetype">{base type definition}</a> cannot specify a
|
|
value for <a href="#dc-minExclusive">minExclusive</a> other than <a class="propref" href="#minExclusive-value">{value}</a>.
|
|
</p></div><div class="div4">
|
|
<h5><a id="xr-minExclusive" name="xr-minExclusive"/>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 class="eltref" href="#element-minExclusive"><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" id="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 class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation">annotation</a>?)<br/></minExclusive></p>
|
|
<div class="reprdep">
|
|
<a class="propref" href="#minExclusive-value">{value}</a> <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be
|
|
in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <a class="propref" href="#defn-basetype">{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 cellpadding="3" border="0"><thead><tr><th align="left">Property</th><th align="left">Representation</th></tr></thead><tbody valign="top"><tr valign="top"><td><a class="propref" href="#minExclusive-value">{value}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>value</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#minExclusive-fixed">{fixed}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>fixed</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>, if present, otherwise false
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#defn-annotation">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation"><annotation></a>
|
|
element information items in the <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.element">[children]</a>, if any.
|
|
</td></tr></tbody></table></td></tr></tbody></table></div>
|
|
</div></div></div><div class="div4">
|
|
<h5><a id="minExclusive-validation-rules" name="minExclusive-validation-rules"/>4.3.9.3 minExclusive Validation Rules</h5><div class="constraintnote"><a name="cvc-minExclusive-valid" id="cvc-minExclusive-valid"/><b>Validation Rule: minExclusive Valid</b><br/><div class="constraint">
|
|
A value in an <a class="termref" href="#dt-ordered"><span class="arrow">·</span>ordered<span class="arrow">·</span></a> <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
is facet-valid with respect to <a class="termref" href="#dt-minExclusive"><span class="arrow">·</span>minExclusive<span class="arrow">·</span></a> if:
|
|
<div class="constraintlist"><div class="clnumber">1
|
|
if the <a class="termref" href="#dt-numeric"><span class="arrow">·</span>numeric<span class="arrow">·</span></a> property in
|
|
<a class="propref" href="#defn-fund-facets">{fundamental facets}</a> is <em>true</em>, then the
|
|
value <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be numerically greater than
|
|
<a class="propref" href="#minExclusive-value">{value}</a>;
|
|
</div><div class="clnumber">2
|
|
if the <a class="termref" href="#dt-numeric"><span class="arrow">·</span>numeric<span class="arrow">·</span></a> property in
|
|
<a class="propref" href="#defn-fund-facets">{fundamental facets}</a> is <em>false</em> (i.e.,
|
|
<a class="propref" href="#defn-basetype">{base type definition}</a> is one of the date and time related
|
|
datatypes), then the value <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be chronologically
|
|
greater than <a class="propref" href="#minExclusive-value">{value}</a>;
|
|
</div></div></div></div></div><div class="div4">
|
|
<h5><a id="minExclusive-coss" name="minExclusive-coss"/>4.3.9.4 Constraints on minExclusive Schema Components</h5><div class="constraintnote"><a name="minInclusive-minExclusive" id="minInclusive-minExclusive"/><b>Schema Component Constraint: minInclusive and minExclusive</b><br/><div class="constraint">
|
|
It is an <a class="termref" href="#dt-error"><span class="arrow">·</span>error<span class="arrow">·</span></a> for both
|
|
<a class="termref" href="#dt-minInclusive"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> and <a class="termref" href="#dt-minExclusive"><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" id="minExclusive-less-than-maxInclusive"/><b>Schema Component Constraint: minExclusive < maxInclusive</b><br/><div class="constraint">
|
|
It is an <a class="termref" href="#dt-error"><span class="arrow">·</span>error<span class="arrow">·</span></a> for the value specified for
|
|
<a class="termref" href="#dt-minExclusive"><span class="arrow">·</span>minExclusive<span class="arrow">·</span></a> to be greater than or equal to the value
|
|
specified for <a class="termref" href="#dt-maxInclusive"><span class="arrow">·</span>maxInclusive<span class="arrow">·</span></a> for the same datatype.
|
|
</div></div><div class="constraintnote"><a name="minExclusive-valid-restriction" id="minExclusive-valid-restriction"/><b>Schema Component Constraint: minExclusive valid restriction</b><br/><div class="constraint">
|
|
It is an <a class="termref" href="#dt-error"><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 class="propref" href="#defn-facets">{facets}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>
|
|
and <a class="propref" href="#minExclusive-value">{value}</a> is
|
|
less than the <a class="propref" href="#minExclusive-value">{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 class="propref" href="#defn-facets">{facets}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>
|
|
and <a class="propref" href="#minExclusive-value">{value}</a> is
|
|
greater the <a class="propref" href="#maxInclusive-value">{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 class="propref" href="#defn-facets">{facets}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>
|
|
and <a class="propref" href="#minExclusive-value">{value}</a> is
|
|
less than the <a class="propref" href="#minInclusive-value">{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 class="propref" href="#defn-facets">{facets}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>
|
|
and <a class="propref" href="#maxExclusive-value">{value}</a> is
|
|
greater than or equal to the <a class="propref" href="#maxExclusive-value">{value}</a> of the parent
|
|
<a href="#dc-maxExclusive">maxExclusive</a>
|
|
</div></div></div></div></div></div><div class="div3">
|
|
<h4><a id="rf-minInclusive" name="rf-minInclusive"/>4.3.10 minInclusive</h4><p>
|
|
<span class="termdef"><a id="dt-minInclusive" name="dt-minInclusive">[Definition:]  </a>
|
|
<b>minInclusive</b> is the <a class="termref" href="#dt-inclusive-lower-bound"><span class="arrow">·</span>inclusive lower bound<span class="arrow">·</span></a>
|
|
of the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> for a datatype with the
|
|
<a class="termref" href="#dt-ordered"><span class="arrow">·</span>ordered<span class="arrow">·</span></a> property. The value of
|
|
<b>minInclusive</b>
|
|
 <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the
|
|
<a class="termref" href="#dt-basetype"><span class="arrow">·</span>base type<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p><p>
|
|
<a class="termref" href="#dt-minInclusive"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> provides for:
|
|
</p><ul><li>
|
|
Constraining a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> to values
|
|
with a specific <a class="termref" href="#dt-inclusive-lower-bound"><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 class="termref" href="#dt-user-derived"><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 class="termref" href="#dt-minInclusive"><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 id="dc-minInclusive" name="dc-minInclusive"/>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" id="minInclusive-value"><span class="propdef">{value}</span></a></dt><dd>
|
|
A value from the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of the
|
|
<a class="propref" href="#defn-basetype">{base type definition}</a>.
|
|
</dd>
|
|
<dt><a name="minInclusive-fixed" id="minInclusive-fixed"><span class="propdef">{fixed}</span></a></dt><dd>
|
|
A <a href="#boolean">boolean</a>.
|
|
</dd>
|
|
<dt><a name="minInclusive-annotation" id="minInclusive-annotation"><span class="propdef">{annotation}</span></a></dt><dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div></div><p>
|
|
If <a class="propref" href="#minInclusive-fixed">{fixed}</a> is <em>true</em>, then types for which
|
|
the current type is the <a class="propref" href="#defn-basetype">{base type definition}</a> cannot specify a
|
|
value for <a href="#dc-minInclusive">minInclusive</a> other than <a class="propref" href="#minInclusive-value">{value}</a>.
|
|
</p></div><div class="div4">
|
|
<h5><a id="xr-minInclusive" name="xr-minInclusive"/>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 class="eltref" href="#element-minInclusive"><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" id="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 class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation">annotation</a>?)<br/></minInclusive></p>
|
|
<div class="reprdep">
|
|
<a class="propref" href="#minInclusive-value">{value}</a> <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be
|
|
in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of <a class="propref" href="#defn-basetype">{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 cellpadding="3" border="0"><thead><tr><th align="left">Property</th><th align="left">Representation</th></tr></thead><tbody valign="top"><tr valign="top"><td><a class="propref" href="#minInclusive-value">{value}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>value</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#minInclusive-fixed">{fixed}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>fixed</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>, if present, otherwise false
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#defn-annotation">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation"><annotation></a>
|
|
element information items in the <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.element">[children]</a>, if any.
|
|
</td></tr></tbody></table></td></tr></tbody></table></div>
|
|
</div></div></div><div class="div4">
|
|
<h5><a id="minInclusive-validation-rules" name="minInclusive-validation-rules"/>4.3.10.3 minInclusive Validation Rules</h5><div class="constraintnote"><a name="cvc-minInclusive-valid" id="cvc-minInclusive-valid"/><b>Validation Rule: minInclusive Valid</b><br/><div class="constraint">
|
|
A value in an <a class="termref" href="#dt-ordered"><span class="arrow">·</span>ordered<span class="arrow">·</span></a> <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
is facet-valid with respect to <a class="termref" href="#dt-minInclusive"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> if:
|
|
<div class="constraintlist"><div class="clnumber">1
|
|
if the <a class="termref" href="#dt-numeric"><span class="arrow">·</span>numeric<span class="arrow">·</span></a> property in
|
|
<a class="propref" href="#defn-fund-facets">{fundamental facets}</a> is <em>true</em>, then the
|
|
value <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be numerically greater than or equal to
|
|
<a class="propref" href="#minInclusive-value">{value}</a>;
|
|
</div><div class="clnumber">2
|
|
if the <a class="termref" href="#dt-numeric"><span class="arrow">·</span>numeric<span class="arrow">·</span></a> property in
|
|
<a class="propref" href="#defn-fund-facets">{fundamental facets}</a> is <em>false</em> (i.e.,
|
|
<a class="propref" href="#defn-basetype">{base type definition}</a> is one of the date and time related
|
|
datatypes), then the value <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be chronologically
|
|
greater than or equal to <a class="propref" href="#minInclusive-value">{value}</a>;
|
|
</div></div></div></div></div><div class="div4">
|
|
<h5><a id="minInclusive-coss" name="minInclusive-coss"/>4.3.10.4 Constraints on minInclusive Schema Components</h5><div class="constraintnote"><a name="minInclusive-less-than-maxExclusive" id="minInclusive-less-than-maxExclusive"/><b>Schema Component Constraint: minInclusive < maxExclusive</b><br/><div class="constraint">
|
|
It is an <a class="termref" href="#dt-error"><span class="arrow">·</span>error<span class="arrow">·</span></a> for the value specified for
|
|
<a class="termref" href="#dt-minInclusive"><span class="arrow">·</span>minInclusive<span class="arrow">·</span></a> to be greater than or equal to the value
|
|
specified for <a class="termref" href="#dt-maxExclusive"><span class="arrow">·</span>maxExclusive<span class="arrow">·</span></a> for the same datatype.
|
|
</div></div><div class="constraintnote"><a name="minInclusive-valid-restriction" id="minInclusive-valid-restriction"/><b>Schema Component Constraint: minInclusive valid restriction</b><br/><div class="constraint">
|
|
It is an <a class="termref" href="#dt-error"><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 class="propref" href="#defn-facets">{facets}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>
|
|
and <a class="propref" href="#minInclusive-value">{value}</a> is
|
|
less than the <a class="propref" href="#minInclusive-value">{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 class="propref" href="#defn-facets">{facets}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>
|
|
and <a class="propref" href="#minInclusive-value">{value}</a> is
|
|
greater the <a class="propref" href="#maxInclusive-value">{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 class="propref" href="#defn-facets">{facets}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>
|
|
and <a class="propref" href="#minInclusive-value">{value}</a> is
|
|
less than or equal to the <a class="propref" href="#minExclusive-value">{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 class="propref" href="#defn-facets">{facets}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>
|
|
and <a class="propref" href="#minInclusive-value">{value}</a> is
|
|
greater than or equal to the <a class="propref" href="#maxExclusive-value">{value}</a> of the parent
|
|
<a href="#dc-maxExclusive">maxExclusive</a>
|
|
</div></div></div></div></div></div><div class="div3">
|
|
<h4><a id="rf-totalDigits" name="rf-totalDigits"/>4.3.11 totalDigits</h4><p>
|
|
<span class="termdef"><a id="dt-totalDigits" name="dt-totalDigits">[Definition:]  </a>
|
|
<b>totalDigits</b>
|
|
controls the maximum number of values in
|
|
the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
|
|
of datatypes <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#decimal">decimal</a>,
|
|
by restricting it to numbers that are expressible as
|
|
<em>i × 10^-n</em> where <em>i</em>
|
|
and <em>n</em> are integers such that
|
|
<em>|i| < 10^totalDigits</em> and
|
|
<em>0 <= n <= totalDigits</em>.
|
|
The value of
|
|
<b>totalDigits</b> <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a> be a
|
|
<a href="#positiveInteger">positiveInteger</a>.
|
|
</span>
|
|
</p><p>
|
|
|
|
The term <b>totalDigits</b> is chosen to reflect the fact that it
|
|
restricts the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> to those values that can
|
|
be represented lexically using at most <em>totalDigits</em>
|
|
digits. Note that it does not restrict the <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>
|
|
directly; a lexical representation that adds
|
|
additional leading zero digits or trailing fractional zero digits is
|
|
still permitted.
|
|
|
|
</p><div class="div4">
|
|
<h5><a id="dc-totalDigits" name="dc-totalDigits"/>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" id="totalDigits-value"><span class="propdef">{value}</span></a></dt><dd>
|
|
A <a href="#positiveInteger">positiveInteger</a>.
|
|
</dd>
|
|
<dt><a name="totalDigits-fixed" id="totalDigits-fixed"><span class="propdef">{fixed}</span></a></dt><dd>
|
|
A <a href="#boolean">boolean</a>.
|
|
</dd>
|
|
<dt><a name="totalDigits-annotation" id="totalDigits-annotation"><span class="propdef">{annotation}</span></a></dt><dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div></div><p>
|
|
If <a class="propref" href="#totalDigits-fixed">{fixed}</a> is <em>true</em>, then types for which
|
|
the current type is the <a class="propref" href="#defn-basetype">{base type definition}</a> cannot specify a
|
|
value for <a href="#dc-totalDigits">totalDigits</a> other than
|
|
<a class="propref" href="#totalDigits-value">{value}</a>.
|
|
</p></div><div class="div4">
|
|
<h5><a id="xr-totalDigits" name="xr-totalDigits"/>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 class="eltref" href="#element-totalDigits"><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" id="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 class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation">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 cellpadding="3" border="0"><thead><tr><th align="left">Property</th><th align="left">Representation</th></tr></thead><tbody valign="top"><tr valign="top"><td><a class="propref" href="#totalDigits-value">{value}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>value</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#totalDigits-fixed">{fixed}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>fixed</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>, if present, otherwise false
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#defn-annotation">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation"><annotation></a>
|
|
element information items in the <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.element">[children]</a>, if any.
|
|
</td></tr></tbody></table></td></tr></tbody></table></div>
|
|
</div></div></div><div class="div4">
|
|
<h5><a id="totalDigits-validation-rules" name="totalDigits-validation-rules"/>4.3.11.3 totalDigits Validation Rules</h5><div class="constraintnote"><a name="cvc-totalDigits-valid" id="cvc-totalDigits-valid"/><b>Validation Rule: totalDigits Valid</b><br/><div class="constraint">
|
|
A value in a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is facet-valid with
|
|
respect to <a class="termref" href="#dt-totalDigits"><span class="arrow">·</span>totalDigits<span class="arrow">·</span></a> if:
|
|
<div class="constraintlist"><div class="clnumber">1
|
|
|
|
that value is expressible as <em>i × 10^-n</em> where
|
|
<em>i</em> and <em>n</em> are integers such that
|
|
<em>|i| < 10^<a class="propref" href="#totalDigits-value">{value}</a></em> and
|
|
<em>0 <= n <= <a class="propref" href="#totalDigits-value">{value}</a></em>.
|
|
|
|
|
|
</div></div></div></div></div><div class="div4">
|
|
<h5><a id="totalDigits-coss" name="totalDigits-coss"/>4.3.11.4 Constraints on totalDigits Schema Components</h5><div class="constraintnote"><a name="totalDigits-valid-restriction" id="totalDigits-valid-restriction"/><b>Schema Component Constraint: totalDigits valid restriction</b><br/><div class="constraint">
|
|
It is an <a class="termref" href="#dt-error"><span class="arrow">·</span>error<span class="arrow">·</span></a> if
|
|
<a href="#dc-totalDigits">totalDigits</a> is among the members of
|
|
<a class="propref" href="#defn-facets">{facets}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a>
|
|
and <a class="propref" href="#totalDigits-value">{value}</a> is
|
|
greater than the <a class="propref" href="#totalDigits-value">{value}</a> of the parent
|
|
<a href="#dc-totalDigits">totalDigits</a>
|
|
</div></div></div></div><div class="div3">
|
|
<h4><a id="rf-fractionDigits" name="rf-fractionDigits"/>4.3.12 fractionDigits</h4><p>
|
|
<span class="termdef"><a id="dt-fractionDigits" name="dt-fractionDigits">[Definition:]  </a>
|
|
<b>fractionDigits</b>
|
|
controls the size of the minimum difference
|
|
between values
|
|
|
|
in the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> of datatypes <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a>
|
|
from <b>decimal</b>,
|
|
by restricting the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> to numbers that are
|
|
expressible as <em>i × 10^-n</em> where
|
|
<em>i</em> and <em>n</em>
|
|
are integers and <em>0 <= n <= fractionDigits</em>.
|
|
The value of <b>fractionDigits</b> <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a>
|
|
be a <a href="#nonNegativeInteger">nonNegativeInteger</a>.
|
|
</span>
|
|
</p><p>
|
|
|
|
The term <b>fractionDigits</b> is chosen to reflect the fact that it
|
|
restricts the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> to those values that can be
|
|
represented lexically using at most <em>fractionDigits</em>
|
|
to the right of the decimal point. Note that it does not restrict the
|
|
<a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> directly; a
|
|
non-<a class="termref" href="#dt-canonical-representation"><span class="arrow">·</span>canonical lexical representation<span class="arrow">·</span></a> that adds additional
|
|
leading zero digits or trailing fractional zero digits is still permitted.
|
|
|
|
</p><div class="exampleOuter"><div class="exampleHeader">Example</div><div class="exampleWrapper">
|
|
The following is the definition of a <a class="termref" href="#dt-user-derived"><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 class="termref" href="#dt-basetype"><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 id="dc-fractionDigits" name="dc-fractionDigits"/>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" id="fractionDigits-value"><span class="propdef">{value}</span></a></dt><dd>
|
|
A <a href="#nonNegativeInteger">nonNegativeInteger</a>.
|
|
</dd>
|
|
<dt><a name="fractionDigits-fixed" id="fractionDigits-fixed"><span class="propdef">{fixed}</span></a></dt><dd>
|
|
A <a href="#boolean">boolean</a>.
|
|
</dd>
|
|
<dt><a name="fractionDigits-annotation" id="fractionDigits-annotation"><span class="propdef">{annotation}</span></a></dt><dd>
|
|
Optional. An <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#Annotation">annotation</a>.
|
|
</dd>
|
|
</dl>
|
|
</div></div><p>
|
|
If <a class="propref" href="#fractionDigits-fixed">{fixed}</a> is <em>true</em>, then types for which
|
|
the current type is the <a class="propref" href="#defn-basetype">{base type definition}</a> cannot specify a
|
|
value for <a href="#dc-fractionDigits">fractionDigits</a> other than
|
|
<a class="propref" href="#fractionDigits-value">{value}</a>.
|
|
</p></div><div class="div4">
|
|
<h5><a id="xr-fractionDigits" name="xr-fractionDigits"/>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 class="eltref" href="#element-fractionDigits"><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" id="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 class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation">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 cellpadding="3" border="0"><thead><tr><th align="left">Property</th><th align="left">Representation</th></tr></thead><tbody valign="top"><tr valign="top"><td><a class="propref" href="#fractionDigits-value">{value}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>value</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#fractionDigits-fixed">{fixed}</a></td><td>
|
|
The <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-vv">actual value</a> of the <code>fixed</code> <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[attribute]</a>, if present, otherwise false
|
|
</td></tr><tr valign="top"><td><a class="propref" href="#defn-annotation">{annotation}</a></td><td>
|
|
The annotations corresponding to all the <a class="eltref" href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-annotation"><annotation></a>
|
|
element information items in the <a class="xpropref" href="http://www.w3.org/TR/xml-infoset/#infoitem.element">[children]</a>, if any.
|
|
</td></tr></tbody></table></td></tr></tbody></table></div>
|
|
</div></div></div><div class="div4">
|
|
<h5><a id="fractionDigits-validation-rules" name="fractionDigits-validation-rules"/>4.3.12.3 fractionDigits Validation Rules</h5><div class="constraintnote"><a name="cvc-fractionDigits-valid" id="cvc-fractionDigits-valid"/><b>Validation Rule: fractionDigits Valid</b><br/><div class="constraint">
|
|
A value in a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> is facet-valid with
|
|
respect to <a class="termref" href="#dt-fractionDigits"><span class="arrow">·</span>fractionDigits<span class="arrow">·</span></a> if:
|
|
<div class="constraintlist"><div class="clnumber">1
|
|
|
|
that value is expressible as <em>i × 10^-n</em> where
|
|
<em>i</em> and <em>n</em>
|
|
are integers and <em>0 <= n <= <a class="propref" href="#fractionDigits-value">{value}</a></em>.
|
|
|
|
|
|
</div></div></div></div></div><div class="div4">
|
|
<h5><a id="fractionDigits-coss" name="fractionDigits-coss"/>4.3.12.4 Constraints on fractionDigits Schema Components</h5><div class="constraintnote"><a name="fractionDigits-totalDigits" id="fractionDigits-totalDigits"/><b>Schema Component Constraint: fractionDigits less than or equal to totalDigits</b><br/><div class="constraint">
|
|
It is an <a class="termref" href="#dt-error"><span class="arrow">·</span>error<span class="arrow">·</span></a> for <a class="termref" href="#dt-fractionDigits"><span class="arrow">·</span>fractionDigits<span class="arrow">·</span></a> to
|
|
be greater than <a class="termref" href="#dt-totalDigits"><span class="arrow">·</span>totalDigits<span class="arrow">·</span></a>.
|
|
</div></div><div class="constraintnote"><a name="fractionDigits-valid-restriction" id="fractionDigits-valid-restriction"/><b>Schema Component Constraint: fractionDigits valid restriction</b><br/><div class="constraint">
|
|
It is an <a class="termref" href="#dt-error"><span class="arrow">·</span>error<span class="arrow">·</span></a> if <a class="termref" href="#dt-fractionDigits"><span class="arrow">·</span>fractionDigits<span class="arrow">·</span></a>
|
|
is among the members of <a class="propref" href="#defn-facets">{facets}</a> of <a class="propref" href="#defn-basetype">{base type definition}</a> and
|
|
<a class="propref" href="#fractionDigits-value">{value}</a> is greater than the <a class="propref" href="#fractionDigits-value">{value}</a> of the parent
|
|
<a class="termref" href="#dt-fractionDigits"><span class="arrow">·</span>fractionDigits<span class="arrow">·</span></a>.
|
|
</div></div></div></div></div></div><div class="div1">
|
|
<h2><a id="conformance" name="conformance"/>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 id="dt-minimally-conforming" name="dt-minimally-conforming">[Definition:]  </a>
|
|
<b>Minimally conforming</b> processors <a class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a>
|
|
completely and correctly implement the <a class="termref" href="#dt-cos"><span class="arrow">·</span>Constraint on Schemas<span class="arrow">·</span></a> and
|
|
<a class="termref" href="#dt-cvc"><span class="arrow">·</span>Validation Rule<span class="arrow">·</span></a>
|
|
.
|
|
</span>
|
|
</p><p>
|
|
<span class="termdef"><a id="dt-interchange" 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 class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a>, when processing schema documents, completely and
|
|
correctly implement all
|
|
<a class="termref" href="#dt-src"><span class="arrow">·</span>Schema Representation Constraint<span class="arrow">·</span></a>s
|
|
in this specification, and <a class="termref" href="#dt-must"><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 href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#key-component">schema components</a>
|
|
for use in validation.
|
|
</span>
|
|
</p><div class="note"><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 class="termref" href="#dt-minimally-conforming"><span class="arrow">·</span>minimally conforming<span class="arrow">·</span></a>
|
|
but not necessarily in <a class="termref" href="#dt-interchange"><span class="arrow">·</span>conformance to
|
|
the XML Representation of Schemas<span class="arrow">·</span></a>.
|
|
</div></div></div><div class="back"><div class="div1">
|
|
<h2><a id="schema" name="schema"/>A Schema for Datatype Definitions (normative)</h2><pre><!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>
|
|
]>
|
|
|
|
<?xml version='1.0'?>
|
|
<xs:schema xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty"
|
|
xmlns:xs="http://www.w3.org/2001/XMLSchema" blockDefault="#all"
|
|
elementFormDefault="qualified" xml:lang="en"
|
|
targetNamespace="http://www.w3.org/2001/XMLSchema"
|
|
version="Id: datatypes.xsd,v 1.4 2004/05/29 10:26:33 ht Exp ">
|
|
<xs:annotation>
|
|
<xs:documentation source="../datatypes/datatypes-with-errata.html">
|
|
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.
|
|
</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 fixed="true" value="collapse" 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="partial"/>
|
|
<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 fixed="true" value="collapse" 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="partial"/>
|
|
<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 fixed="true" value="collapse" 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 fixed="true" value="collapse" 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 fixed="true" value="collapse" 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 fixed="true" value="collapse" 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 fixed="true" value="collapse" 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 fixed="true" value="collapse" 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 fixed="true" value="collapse" 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 fixed="true" value="collapse" 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 fixed="true" value="collapse" 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 fixed="true" value="collapse" 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 fixed="true" value="collapse" 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 fixed="true" value="collapse" 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 fixed="true" value="collapse" 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 fixed="true" value="collapse" 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 fixed="true" value="collapse" 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 fixed="true" value="collapse" 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]{1,8}(-[a-zA-Z0-9]{1,8})*"
|
|
id="language.pattern">
|
|
<xs:annotation>
|
|
<xs:documentation source="http://www.ietf.org/rfc/rfc3066.txt">
|
|
pattern specifies the content of section 2.12 of XML 1.0e2
|
|
and RFC 3066 (Revised version of 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:hasFacet name="pattern"/>
|
|
<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:hasFacet name="pattern"/>
|
|
<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:hasFacet name="pattern"/>
|
|
<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 fixed="true" value="0" id="integer.fractionDigits"/>
|
|
<xs:pattern value="[\-+]?[0-9]+"/>
|
|
</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="unsignedByte">
|
|
<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:list>
|
|
<xs:simpleType>
|
|
<xs:restriction base="xs:derivationControl">
|
|
<xs:enumeration value="list"/>
|
|
<xs:enumeration value="union"/>
|
|
<xs:enumeration value="restriction"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
</xs:list>
|
|
</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" type="xs:NCName" use="required">
|
|
<xs:annotation>
|
|
<xs:documentation>
|
|
Required at the top level
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:attribute>
|
|
<xs:anyAttribute namespace="##other" processContents="lax"/>
|
|
</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:anyAttribute namespace="##other" processContents="lax"/>
|
|
</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" default="false"
|
|
use="optional"/>
|
|
</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:anyAttribute namespace="##other" processContents="lax"/>
|
|
</xs:restriction>
|
|
</xs:complexContent>
|
|
</xs:complexType>
|
|
<xs:element name="minExclusive" type="xs:facet" id="minExclusive">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-minExclusive"/>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
<xs:element name="minInclusive" type="xs:facet" id="minInclusive">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-minInclusive"/>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
<xs:element name="maxExclusive" type="xs:facet" id="maxExclusive">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-maxExclusive"/>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
<xs:element name="maxInclusive" type="xs:facet" id="maxInclusive">
|
|
<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:anyAttribute namespace="##other" processContents="lax"/>
|
|
</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:anyAttribute namespace="##other" processContents="lax"/>
|
|
</xs:restriction>
|
|
</xs:complexContent>
|
|
</xs:complexType>
|
|
</xs:element>
|
|
<xs:element name="fractionDigits" type="xs:numFacet" id="fractionDigits">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-fractionDigits"/>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
<xs:element name="length" type="xs:numFacet" id="length">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-length"/>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
<xs:element name="minLength" type="xs:numFacet" id="minLength">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-minLength"/>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
<xs:element name="maxLength" type="xs:numFacet" id="maxLength">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-maxLength"/>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
<xs:element name="enumeration" type="xs:noFixedFacet" id="enumeration">
|
|
<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:anyAttribute namespace="##other" processContents="lax"/>
|
|
</xs:restriction>
|
|
</xs:complexContent>
|
|
</xs:complexType>
|
|
</xs:element>
|
|
<xs:element name="pattern" id="pattern">
|
|
<xs:annotation>
|
|
<xs:documentation
|
|
source="http://www.w3.org/TR/xmlschema-2/#element-pattern"/>
|
|
</xs:annotation>
|
|
<xs:complexType>
|
|
<xs:complexContent>
|
|
<xs:restriction base="xs:noFixedFacet">
|
|
<xs:sequence>
|
|
<xs:element ref="xs:annotation" minOccurs="0"/>
|
|
</xs:sequence>
|
|
<xs:attribute name="value" type="xs:string" use="required"/>
|
|
<xs:anyAttribute namespace="##other" processContents="lax"/>
|
|
</xs:restriction>
|
|
</xs:complexContent>
|
|
</xs:complexType>
|
|
</xs:element>
|
|
</xs:schema>
|
|
</pre></div><div class="div1">
|
|
<h2><a id="dtd-for-datatypeDefs" name="dtd-for-datatypeDefs"/>B DTD for Datatype Definitions (non-normative)</h2><pre><!--
|
|
DTD for XML Schemas: Part 2: Datatypes
|
|
Id: datatypes.dtd,v 1.1 2003/08/28 13:30:52 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 id="d0e11239" name="d0e11239"/>C Datatypes and Facets</h2><div class="div2">
|
|
<h3><span class="nav"> </span><a id="app-fundamental-facets" name="app-fundamental-facets"/>C.1 Fundamental Facets</h3><p>
|
|
The following table shows the values of the fundamental facets
|
|
for each <a class="termref" href="#dt-built-in"><span class="arrow">·</span>built-in<span class="arrow">·</span></a> datatype.
|
|
</p><table bgcolor="#bedce6" border="1"><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>partial</td><td>true</td><td>finite</td><td>true</td></tr><tr><td><a href="#double">double</a></td><td>partial</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"/></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 id="isoformats" name="isoformats"/>D ISO 8601 Date and Time Formats</h2><div class="div2">
|
|
<h3><span class="nav"> <a class="nav" href="#truncatedformats"><img src="next.jpg" alt="next sub-section"/></a></span><a id="formatdetails" name="formatdetails"/>D.1 ISO 8601 Conventions</h3><p>
|
|
The <a class="termref" href="#dt-primitive"><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>.
|
|
Following <a href="#ISO8601">[ISO 8601]</a>, the lexical forms of
|
|
these datatypes can include only the characters #20 through #7F.
|
|
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 decimal digits.
|
|
The allowed decimal digits are (#x30-#x39).
|
|
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
|
|
24.
|
|
|
|
If the value of the hour element is 24 then the values of the minutes
|
|
element and the seconds element must be 00 and 00.
|
|
|
|
</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 class="termref" href="#dt-may"><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/>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 <em>in UTC</em>.
|
|
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 class="nav" href="#formatdetails"><img src="previous.jpg" alt="previous sub-section"/></a> <a class="nav" href="#deviantformats"><img src="next.jpg" alt="next sub-section"/></a></span><a id="truncatedformats" name="truncatedformats"/>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 class="nav" href="#truncatedformats"><img src="previous.jpg" alt="previous sub-section"/></a> </span><a id="deviantformats" name="deviantformats"/>D.3 Deviations from ISO 8601 Formats</h3><div class="localToc">        D.3.1 <a href="#signallowed">Sign Allowed</a><br/>
|
|
        D.3.2 <a href="#noYearZero">No Year Zero</a><br/>
|
|
        D.3.3 <a href="#morethan9999years">More Than 9999 Years</a><br/>
|
|
        D.3.4 <a href="#timeZonePermited">Time zone permitted</a><br/>
|
|
</div><div class="div3">
|
|
<h4><a id="signallowed" name="signallowed"/>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="#gYearMonth">gYearMonth</a>, <a href="#gYear">gYear</a>.
|
|
</p></div><div class="div3">
|
|
<h4><a id="noYearZero" name="noYearZero"/>D.3.2 No Year Zero</h4><p>
|
|
The year "0000" is an illegal year value.
|
|
</p></div><div class="div3">
|
|
<h4><a id="morethan9999years" name="morethan9999years"/>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="#ISO8601-2000">[ISO 8601:2000 Second Edition]</a>.
|
|
</p></div><div class="div3">
|
|
<h4><a id="timeZonePermited" name="timeZonePermited"/>D.3.4 Time zone permitted</h4><p>
|
|
The lexical representations for the datatypes <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> permit an optional
|
|
trailing time zone specificiation.
|
|
</p></div></div></div><div class="div1">
|
|
<h2><a id="adding-durations-to-dateTimes" name="adding-durations-to-dateTimes"/>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>
|
|
<em>This is a logical explanation of the process.
|
|
Actual implementations are free to optimize as long as they produce the same
|
|
results. </em> 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/><table border="1"><tbody><tr><td style="background-color:#FFFF99"><b>31</b></td><td colspan="2">M = January, March, May, July, August, October, or
|
|
December</td></tr><tr><td style="background-color:#FFFF99"><b>30</b></td><td colspan="2">M = April, June, September, or November</td></tr><tr><td style="background-color:#FFFF99"><b>29</b></td><td>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"><b>28</b></td><td>Otherwise</td></tr></tbody></table><p/><div class="div2">
|
|
<h3><span class="nav"> <a class="nav" href="#adding-durations-to-instants-commutativity-associativity"><img src="next.jpg" alt="next sub-section"/></a></span><a id="d0e11648" name="d0e11648"/>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 <em>pinned</em> 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><em>Months (may be modified additionally below)</em>
|
|
<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><em>Years (may be modified additionally below)</em>
|
|
<ul><li>E[year] := S[year] + D[year] + carry</li></ul>
|
|
</li><li><em>Zone</em>
|
|
<ul><li>E[zone] := S[zone]</li></ul>
|
|
</li><li><em>Seconds</em>
|
|
<ul><li>temp := S[second] + D[second]</li><li>E[second] := modulo(temp, 60)</li><li>carry := fQuotient(temp, 60)</li></ul>
|
|
</li><li><em>Minutes</em>
|
|
<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><em>Hours</em>
|
|
<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><em>Days</em>
|
|
<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><em>Examples:</em></p><table cellpadding="4" cellspacing="0" border="1"><tbody><tr><th style="background-color: #FFFF99" align="center">dateTime</th><th style="background-color: #FFFF99" align="center">duration</th><th style="background-color: #FFFF99" align="center">result</th></tr><tr><td align="center">2000-01-12T12:13:14Z</td><td align="center">P1Y3M5DT7H10M3.3S</td><td align="center">2001-04-17T19:23:17.3Z</td></tr><tr><td align="center">2000-01</td><td align="center">-P3M</td><td align="center">1999-10</td></tr><tr><td align="center">2000-01-12</td><td align="center">PT33H</td><td align="center">2000-01-13</td></tr></tbody></table></div><div class="div2">
|
|
<h3><span class="nav"><a class="nav" href="#"><img src="previous.jpg" alt="previous sub-section"/></a> </span><a id="adding-durations-to-instants-commutativity-associativity" name="adding-durations-to-instants-commutativity-associativity"/>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 <em>is</em> significant.
|
|
For example, there are cases where:
|
|
</p><p>((dateTime + duration1) + duration2) != ((dateTime +
|
|
duration2) + duration1)</p><p><em>Example:</em></p><p>(2000-03-30 + P1D) + P1M = 2000-03-31 + P1M = 2000-<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 id="regexs" name="regexs"/>F Regular Expressions</h2><p>
|
|
A <a class="termref" href="#dt-regex"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a> <em>R</em> is a sequence of
|
|
characters that denote a <b>set of strings</b>  <em>L(R)</em>.
|
|
When used to constrain a <a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>, a
|
|
<b>regular expression</b>  <em>R</em> asserts that only strings
|
|
in <em>L(R)</em> are valid literals for values of that type.
|
|
</p><div class="note"><b>Note: </b>
|
|
Unlike some popular regular expression languages (including those
|
|
defined by Perl and standard Unix utilities), the regular
|
|
expression language defined here implicitly anchors all regular
|
|
expressions at the head and tail, as the most common use of
|
|
regular expressions in <a class="termref" href="#dt-pattern"><span class="arrow">·</span>pattern<span class="arrow">·</span></a> is to match entire literals.
|
|
For example, a datatype <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from <a href="#string">string</a> such
|
|
that all values must begin with the character <code>A</code> (#x41) and end with the character
|
|
<code>Z</code> (#x5a) would be defined as follows:
|
|
<pre><simpleType name='myString'>
|
|
<restriction base='string'>
|
|
<pattern value='A.*Z'/>
|
|
</restriction>
|
|
</simpleType></pre>
|
|
In regular expression languages that are not implicitly anchored at the head and tail,
|
|
it is customary to write the equivalent regular expression as:
|
|
<p/>
|
|
   <code>^A.*Z$</code>
|
|
<p/>
|
|
where "^" anchors the pattern at the head and "$" anchors at the tail.
|
|
<p/>In those rare cases where an unanchored match is desired, including
|
|
<code>.*</code> at the beginning and ending of the regular expression will
|
|
achieve the desired results. For example, a datatype <a class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> from string such that all values must contain at least 3 consecutive <code>A</code> (<code>#x41</code>) characters somewhere within the value could be defined as follows:<pre><simpleType name='myString'>
|
|
<restriction base='string'>
|
|
<pattern value='.*AAA.*'/>
|
|
</restriction>
|
|
</simpleType></pre></div><p>
|
|
<span class="termdef"><a id="dt-regex" name="dt-regex">[Definition:]  </a>A
|
|
<b>regular expression</b> is composed from zero or more
|
|
<a class="termref" href="#dt-branch"><span class="arrow">·</span>branch<span class="arrow">·</span></a>es, separated by <code>|</code> characters.
|
|
</span>
|
|
</p><table width="100%" border="1" cellpadding="5" class="scrap"><tbody><tr align="left"><td><strong><font color="red">Regular Expression</font></strong></td></tr><tr><td><table border="0"><tbody><tr valign="baseline"><td><a id="regex" name="regex"/><a id="nt-regExp" name="nt-regExp"/>[1]   </td><td><code>regExp</code></td><td>   ::=   </td><td><code>
|
|
<a href="#nt-branch">branch</a>
|
|
( '|' <a href="#nt-branch">branch</a> )*
|
|
</code></td></tr></tbody></table></td></tr></tbody></table><p/><table border="1"><col span="1" width="50%"/><col span="1" width="50%"/><thead><tr><th>
|
|
For all <a class="termref" href="#dt-branch"><span class="arrow">·</span>branch<span class="arrow">·</span></a>es <em>S</em>, and for all
|
|
<a class="termref" href="#dt-regex"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a>s <em>T</em>, valid
|
|
<a class="termref" href="#dt-regex"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a>s <em>R</em> are:
|
|
</th><th>
|
|
Denoting the set of strings <em>L(R)</em> containing:
|
|
</th></tr></thead><tbody><tr><td align="center">(empty string)</td><td align="center">the set containing just the empty string
|
|
</td></tr><tr><td align="center"><em>S</em></td><td align="center">all strings in <em>L(S)</em></td></tr><tr><td align="center"><em>S</em>|<em>T</em></td><td align="center">all strings in <em>L(S)</em> and
|
|
all strings in <em>L(T)</em></td></tr></tbody></table><p>
|
|
<span class="termdef"><a id="dt-branch" name="dt-branch">[Definition:]  </a>
|
|
A <b>branch</b> consists
|
|
of zero or more <a class="termref" href="#dt-piece"><span class="arrow">·</span>piece<span class="arrow">·</span></a>s, concatenated together.
|
|
</span>
|
|
</p><table width="100%" border="1" cellpadding="5" class="scrap"><tbody><tr align="left"><td><strong><font color="red">Branch</font></strong></td></tr><tr><td><table border="0"><tbody><tr valign="baseline"><td><a id="branch" name="branch"/><a id="nt-branch" name="nt-branch"/>[2]   </td><td><code>branch</code></td><td>   ::=   </td><td><code><a href="#nt-piece">piece</a>*</code></td></tr></tbody></table></td></tr></tbody></table><p/><table border="1"><col span="1" width="50%"/><col span="1" width="50%"/><thead><tr><th>
|
|
For all <a class="termref" href="#dt-piece"><span class="arrow">·</span>piece<span class="arrow">·</span></a>s <em>S</em>, and for all
|
|
<a class="termref" href="#dt-branch"><span class="arrow">·</span>branch<span class="arrow">·</span></a>es <em>T</em>, valid
|
|
<a class="termref" href="#dt-branch"><span class="arrow">·</span>branch<span class="arrow">·</span></a>es <em>R</em> are:
|
|
</th><th>
|
|
Denoting the set of strings <em>L(R)</em> containing:
|
|
</th></tr></thead><tbody><tr><td align="center"><em>S</em></td><td align="center">all strings in <em>L(S)</em></td></tr><tr><td align="center"><em>S</em><em>T</em></td><td align="center">all strings <em>st</em> with <em>s</em> in
|
|
<em>L(S)</em> and <em>t</em> in <em>L(T)</em></td></tr></tbody></table><p>
|
|
<span class="termdef"><a id="dt-piece" name="dt-piece">[Definition:]  </a>
|
|
A <b>piece</b> is an
|
|
<a class="termref" href="#dt-atom"><span class="arrow">·</span>atom<span class="arrow">·</span></a>, possibly followed by a
|
|
<a class="termref" href="#dt-quantifier"><span class="arrow">·</span>quantifier<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p><table width="100%" border="1" cellpadding="5" class="scrap"><tbody><tr align="left"><td><strong><font color="red">Piece</font></strong></td></tr><tr><td><table border="0"><tbody><tr valign="baseline"><td><a id="piece" name="piece"/><a id="nt-piece" name="nt-piece"/>[3]   </td><td><code>piece</code></td><td>   ::=   </td><td><code><a href="#nt-atom">atom</a> <a href="#nt-quantifier">quantifier</a>?</code></td></tr></tbody></table></td></tr></tbody></table><p/><table border="1"><col span="1" width="50%"/><col span="1" width="50%"/><thead><tr><th>
|
|
For all <a class="termref" href="#dt-atom"><span class="arrow">·</span>atom<span class="arrow">·</span></a>s <em>S</em> and non-negative
|
|
integers <em>n</em>, <em>m</em> such that
|
|
<em>n <= m</em>, valid <a class="termref" href="#dt-piece"><span class="arrow">·</span>piece<span class="arrow">·</span></a>s
|
|
<em>R</em> are:
|
|
</th><th>
|
|
Denoting the set of strings <em>L(R)</em> containing:
|
|
</th></tr></thead><tbody><tr><td align="center"><em>S</em></td><td align="center">all strings in <em>L(S)</em></td></tr><tr><td align="center"><em>S</em>?</td><td align="center">the empty string, and all strings in
|
|
<em>L(S)</em>.</td></tr><tr><td align="center"><em>S</em>*</td><td align="center">
|
|
All strings in <em>L(S?)</em> and all strings <em>st</em>
|
|
with <em>s</em> in <em>L(S*)</em>
|
|
and <em>t</em> in <em>L(S)</em>. <em>( all concatenations
|
|
of zero or more strings from L(S) )</em>
|
|
</td></tr><tr><td align="center"><em>S</em>+</td><td align="center">
|
|
All strings <em>st</em> with <em>s</em> in <em>L(S)</em>
|
|
and <em>t</em> in <em>L(S*)</em>. <em>( all concatenations
|
|
of one or more strings from L(S) )</em>
|
|
</td></tr><tr><td align="center"><em>S</em>{n,m}</td><td align="center">
|
|
All strings <em>st</em> with <em>s</em> in <em>L(S)</em>
|
|
and <em>t</em> in <em>L(S{n-1,m-1})</em>. <em>( All
|
|
sequences of at least n, and at most m, strings from L(S) )</em>
|
|
</td></tr><tr><td align="center"><em>S</em>{n}</td><td align="center">
|
|
All strings in <em>L(S{n,n})</em>. <em>( All
|
|
sequences of exactly n strings from L(S) )</em>
|
|
</td></tr><tr><td align="center"><em>S</em>{n,}</td><td align="center">
|
|
All strings in L(S{n}S*) <em>( All
|
|
sequences of at least n, strings from L(S) )</em>
|
|
</td></tr><tr><td align="center"><em>S</em>{0,m}</td><td align="center">
|
|
All strings <em>st</em> with <em>s</em> in <em>L(S?)</em>
|
|
and <em>t</em> in <em>L(S{0,m-1})</em>. <em>( All
|
|
sequences of at most m, strings from L(S) )</em>
|
|
</td></tr><tr><td align="center"><em>S</em>{0,0}</td><td align="center">
|
|
The set containing only the empty string
|
|
</td></tr></tbody></table><div class="note"><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.
|
|
|
|
</div><p>
|
|
<span class="termdef"><a id="dt-quantifier" 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><table width="100%" border="1" cellpadding="5" class="scrap"><tbody><tr align="left"><td><strong><font color="red">Quanitifer</font></strong></td></tr><tr><td><table border="0"><tbody><tr valign="baseline"><td><a id="quant" name="quant"/><a id="nt-quantifier" name="nt-quantifier"/>[4]   </td><td><code>quantifier</code></td><td>   ::=   </td><td><code>[?*+] | ( '{' <a href="#nt-quantity">quantity</a> '}' )</code></td></tr></tbody><tbody><tr valign="baseline"><td><a id="quantity" name="quantity"/><a id="nt-quantity" name="nt-quantity"/>[5]   </td><td><code>quantity</code></td><td>   ::=   </td><td><code><a href="#nt-quantRange">quantRange</a> |
|
|
<a href="#nt-quantMin">quantMin</a> | <a href="#nt-QuantExact">QuantExact</a></code></td></tr></tbody><tbody><tr valign="baseline"><td><a id="quantRange" name="quantRange"/><a id="nt-quantRange" name="nt-quantRange"/>[6]   </td><td><code>quantRange</code></td><td>   ::=   </td><td><code><a href="#nt-QuantExact">QuantExact</a> ',' <a href="#nt-QuantExact">QuantExact</a></code></td></tr></tbody><tbody><tr valign="baseline"><td><a id="quantMin" name="quantMin"/><a id="nt-quantMin" name="nt-quantMin"/>[7]   </td><td><code>quantMin</code></td><td>   ::=   </td><td><code><a href="#nt-QuantExact">QuantExact</a> ','</code></td></tr></tbody><tbody><tr valign="baseline"><td><a id="quantExact" name="quantExact"/><a id="nt-QuantExact" name="nt-QuantExact"/>[8]   </td><td><code>QuantExact</code></td><td>   ::=   </td><td><code>[0-9]+</code></td></tr></tbody></table></td></tr></tbody></table><p>
|
|
<span class="termdef"><a id="dt-atom" name="dt-atom">[Definition:]  </a>
|
|
An <b>atom</b> is either a
|
|
<a class="termref" href="#dt-normalc"><span class="arrow">·</span>normal character<span class="arrow">·</span></a>, a <a class="termref" href="#dt-charclass"><span class="arrow">·</span>character class<span class="arrow">·</span></a>, or
|
|
a parenthesized <a class="termref" href="#dt-regex"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a>.</span>
|
|
</p><table width="100%" border="1" cellpadding="5" class="scrap"><tbody><tr align="left"><td><strong><font color="red">Atom</font></strong></td></tr><tr><td><table border="0"><tbody><tr valign="baseline"><td><a id="atom" name="atom"/><a id="nt-atom" name="nt-atom"/>[9]   </td><td><code>atom</code></td><td>   ::=   </td><td><code><a href="#nt-Char">Char</a> |
|
|
<a href="#nt-charClass">charClass</a> | ( '('
|
|
<a href="#nt-regExp">regExp</a> ')' )</code></td></tr></tbody></table></td></tr></tbody></table><p/><table border="1"><col span="1" width="50%"/><col span="1" width="50%"/><thead><tr><th>
|
|
For all <a class="termref" href="#dt-normalc"><span class="arrow">·</span>normal character<span class="arrow">·</span></a>s <em>c</em>,
|
|
<a class="termref" href="#dt-charclass"><span class="arrow">·</span>character class<span class="arrow">·</span></a>es <em>C</em>, and
|
|
<a class="termref" href="#dt-regex"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a>s <em>S</em>, valid
|
|
<a class="termref" href="#dt-atom"><span class="arrow">·</span>atom<span class="arrow">·</span></a>s <em>R</em> are:
|
|
</th><th>
|
|
Denoting the set of strings <em>L(R)</em> containing:
|
|
</th></tr></thead><tbody><tr><td align="center"><em>c</em></td><td align="center">the single string consisting only of <em>c</em></td></tr><tr><td align="center"><em>C</em></td><td align="center">all strings in <em>L(C)</em></td></tr><tr><td align="center">(<em>S</em>)</td><td align="center">all strings in <em>L(S)</em></td></tr></tbody></table><p>
|
|
<span class="termdef"><a id="dt-metac" 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 class="termref" href="#dt-regex"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a>s,
|
|
but can be escaped to form <a class="termref" href="#dt-atom"><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 class="termref" href="#dt-metac"><span class="arrow">·</span>metacharacter<span class="arrow">·</span></a> behaves like a <a class="termref" href="#dt-normalc"><span class="arrow">·</span>normal character<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p><p>
|
|
<span class="termdef"><a id="dt-normalc" name="dt-normalc">[Definition:]  </a>
|
|
A
|
|
<b>normal character</b> is any XML character that is not a
|
|
metacharacter. In <a class="termref" href="#dt-regex"><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><table width="100%" border="1" cellpadding="5" class="scrap"><tbody><tr align="left"><td><strong><font color="red">Normal Character</font></strong></td></tr><tr><td><table border="0"><tbody><tr valign="baseline"><td><a id="char" name="char"/><a id="nt-Char" name="nt-Char"/>[10]   </td><td><code>Char</code></td><td>   ::=   </td><td><code>[^.\?*+()|#x5B#x5D]</code></td></tr></tbody></table></td></tr></tbody></table><p>
|
|
Note that a <a class="termref" href="#dt-normalc"><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 id="charcter-classes" name="charcter-classes"/>F.1 Character Classes</h3><p>
|
|
<span class="termdef"><a id="dt-charclass" name="dt-charclass">[Definition:]  </a>
|
|
A
|
|
<b>character class</b> is an <a class="termref" href="#dt-atom"><span class="arrow">·</span>atom<span class="arrow">·</span></a>
|
|
 <em>R</em> that identifies a <b>set of characters</b>
|
|
 <em>C(R)</em>. The set of strings <em>L(R)</em> denoted by a
|
|
character class <em>R</em> contains one single-character string
|
|
"<em>c</em>" for each character <em>c</em> in <em>C(R)</em>.
|
|
</span>
|
|
</p><table width="100%" border="1" cellpadding="5" class="scrap"><tbody><tr align="left"><td><strong><font color="red">Character Class</font></strong></td></tr><tr><td><table border="0"><tbody><tr valign="baseline"><td><a id="charClass" name="charClass"/><a id="nt-charClass" name="nt-charClass"/>[11]   </td><td><code>charClass</code></td><td>   ::=   </td><td><code>
|
|
<a href="#nt-charClassEsc">charClassEsc</a> |
|
|
<a href="#nt-charClassExpr">charClassExpr</a> |
|
|
<a href="#nt-WildcardEsc">WildcardEsc</a>
|
|
</code></td></tr></tbody></table></td></tr></tbody></table><p>
|
|
A character class is either a <a class="termref" href="#dt-cces"><span class="arrow">·</span>character class escape<span class="arrow">·</span></a> or a
|
|
<a class="termref" href="#dt-charexpr"><span class="arrow">·</span>character class expression<span class="arrow">·</span></a>.
|
|
</p><p>
|
|
<span class="termdef"><a id="dt-charexpr" name="dt-charexpr">[Definition:]  </a>
|
|
A
|
|
<b>character class expression</b> is a <a class="termref" href="#dt-chargroup"><span class="arrow">·</span>character group<span class="arrow">·</span></a> surrounded
|
|
by <code>[</code> and <code>]</code> characters. For all character
|
|
groups <em>G</em>, [<em>G</em>] is a valid <b>character class
|
|
expression</b>, identifying the set of characters
|
|
<em>C</em>([<em>G</em>]) = <em>C</em>(<em>G</em>).
|
|
</span>
|
|
</p><table width="100%" border="1" cellpadding="5" class="scrap"><tbody><tr align="left"><td><strong><font color="red">Character Class Expression</font></strong></td></tr><tr><td><table border="0"><tbody><tr valign="baseline"><td><a id="charClassExpr" name="charClassExpr"/><a id="nt-charClassExpr" name="nt-charClassExpr"/>[12]   </td><td><code>charClassExpr</code></td><td>   ::=   </td><td><code>'[' <a href="#nt-charGroup">charGroup</a> ']'</code></td></tr></tbody></table></td></tr></tbody></table><p>
|
|
<span class="termdef"><a id="dt-chargroup" name="dt-chargroup">[Definition:]  </a>
|
|
A
|
|
<b>character group</b> is either a <a class="termref" href="#dt-poschargroup"><span class="arrow">·</span>positive character group<span class="arrow">·</span></a>,
|
|
a <a class="termref" href="#dt-negchargroup"><span class="arrow">·</span>negative character group<span class="arrow">·</span></a>, or a <a class="termref" href="#dt-subchargroup"><span class="arrow">·</span>character class subtraction<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p><table width="100%" border="1" cellpadding="5" class="scrap"><tbody><tr align="left"><td><strong><font color="red">Character Group</font></strong></td></tr><tr><td><table border="0"><tbody><tr valign="baseline"><td><a id="chargroup" name="chargroup"/><a id="nt-charGroup" name="nt-charGroup"/>[13]   </td><td><code>charGroup</code></td><td>   ::=   </td><td><code>
|
|
<a href="#nt-posCharGroup">posCharGroup</a> |
|
|
<a href="#nt-negCharGroup">negCharGroup</a> |
|
|
<a href="#nt-charClassSub">charClassSub</a>
|
|
</code></td></tr></tbody></table></td></tr></tbody></table><p>
|
|
<span class="termdef"><a id="dt-poschargroup" name="dt-poschargroup">[Definition:]  </a>
|
|
A <b>positive character group</b> consists of one or more
|
|
<a class="termref" href="#dt-charrange"><span class="arrow">·</span>character range<span class="arrow">·</span></a>s or <a class="termref" href="#dt-cces"><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><table width="100%" border="1" cellpadding="5" class="scrap"><tbody><tr align="left"><td><strong><font color="red">Positive Character Group</font></strong></td></tr><tr><td><table border="0"><tbody><tr valign="baseline"><td><a id="poschargroup" name="poschargroup"/><a id="nt-posCharGroup" name="nt-posCharGroup"/>[14]   </td><td><code>posCharGroup</code></td><td>   ::=   </td><td><code>
|
|
(
|
|
<a href="#nt-charRange">charRange</a> | <a href="#nt-charClassEsc">charClassEsc</a>
|
|
)+
|
|
</code></td></tr></tbody></table></td></tr></tbody></table><p/><table border="1"><col span="1" width="50%"/><col span="1" width="50%"/><thead><tr><th>
|
|
For all <a class="termref" href="#dt-charrange"><span class="arrow">·</span>character range<span class="arrow">·</span></a>s <em>R</em>, all
|
|
<a class="termref" href="#dt-cces"><span class="arrow">·</span>character class escape<span class="arrow">·</span></a>s <em>E</em>, and all
|
|
<a class="termref" href="#dt-poschargroup"><span class="arrow">·</span>positive character group<span class="arrow">·</span></a>s <em>P</em>, valid
|
|
<a class="termref" href="#dt-poschargroup"><span class="arrow">·</span>positive character group<span class="arrow">·</span></a>s <em>G</em> are:
|
|
</th><th>
|
|
Identifying the set of characters <em>C(G)</em> containing:
|
|
</th></tr></thead><tbody><tr><td align="center"><em>R</em></td><td align="center">all characters in <em>C(R)</em>.</td></tr><tr><td align="center"><em>E</em></td><td align="center">all characters in <em>C(E)</em>.</td></tr><tr><td align="center"><em>RP</em></td><td align="center">all characters in <em>C(R)</em> and all
|
|
characters in <em>C(P)</em>.</td></tr><tr><td align="center"><em>EP</em></td><td align="center">all characters in <em>C(E)</em> and all
|
|
characters in <em>C(P)</em>.</td></tr></tbody></table><p>
|
|
<span class="termdef"><a id="dt-negchargroup" name="dt-negchargroup">[Definition:]  </a>
|
|
A <b>negative character group</b> is a
|
|
<a class="termref" href="#dt-poschargroup"><span class="arrow">·</span>positive character group<span class="arrow">·</span></a> preceded by the <code>^</code> character.
|
|
For all <a class="termref" href="#dt-poschargroup"><span class="arrow">·</span>positive character group<span class="arrow">·</span></a>s <em>P</em>, ^<em>P</em>
|
|
is a valid <b>negative character group</b>, and <em>C(^P)</em>
|
|
contains all XML characters that are <em>not</em> in <em>C(P)</em>.
|
|
</span>
|
|
</p><table width="100%" border="1" cellpadding="5" class="scrap"><tbody><tr align="left"><td><strong><font color="red">Negative Character Group</font></strong></td></tr><tr><td><table border="0"><tbody><tr valign="baseline"><td><a id="negchargroup" name="negchargroup"/><a id="nt-negCharGroup" name="nt-negCharGroup"/>[15]   </td><td><code>negCharGroup</code></td><td>   ::=   </td><td><code>'^' <a href="#nt-posCharGroup">posCharGroup</a></code></td></tr></tbody></table></td></tr></tbody></table><p>
|
|
<span class="termdef"><a id="dt-subchargroup" name="dt-subchargroup">[Definition:]  </a>
|
|
A
|
|
<b>character class subtraction</b> is a <a class="termref" href="#dt-charexpr"><span class="arrow">·</span>character class expression<span class="arrow">·</span></a>
|
|
subtracted from a <a class="termref" href="#dt-poschargroup"><span class="arrow">·</span>positive character group<span class="arrow">·</span></a> or
|
|
<a class="termref" href="#dt-negchargroup"><span class="arrow">·</span>negative character group<span class="arrow">·</span></a>, using the <code>-</code> character.
|
|
</span>
|
|
</p><table width="100%" border="1" cellpadding="5" class="scrap"><tbody><tr align="left"><td><strong><font color="red">Character Class Subtraction</font></strong></td></tr><tr><td><table border="0"><tbody><tr valign="baseline"><td><a id="charclasssub" name="charclasssub"/><a id="nt-charClassSub" name="nt-charClassSub"/>[16]   </td><td><code>charClassSub</code></td><td>   ::=   </td><td><code>
|
|
( <a href="#nt-posCharGroup">posCharGroup</a> |
|
|
<a href="#nt-negCharGroup">negCharGroup</a> ) '-'
|
|
<a href="#nt-charClassExpr">charClassExpr</a>
|
|
</code></td></tr></tbody></table></td></tr></tbody></table><p>
|
|
For any <a class="termref" href="#dt-poschargroup"><span class="arrow">·</span>positive character group<span class="arrow">·</span></a> or
|
|
<a class="termref" href="#dt-negchargroup"><span class="arrow">·</span>negative character group<span class="arrow">·</span></a> <em>G</em>, and any
|
|
<a class="termref" href="#dt-charexpr"><span class="arrow">·</span>character class expression<span class="arrow">·</span></a> <em>C</em>, <em>G-C</em> is a valid
|
|
<a class="termref" href="#dt-subchargroup"><span class="arrow">·</span>character class subtraction<span class="arrow">·</span></a>, identifying the set of all characters in
|
|
<em>C(G)</em> that are not also in <em>C(C)</em>.
|
|
</p><p>
|
|
<span class="termdef"><a id="dt-charrange" name="dt-charrange">[Definition:]  </a>
|
|
A
|
|
<b>character range</b> <em>R</em> identifies a set of
|
|
characters <em>C(R)</em> containing all XML characters with UCS
|
|
code points in a specified range.
|
|
</span>
|
|
</p><table width="100%" border="1" cellpadding="5" class="scrap"><tbody><tr align="left"><td><strong><font color="red">Character Range</font></strong></td></tr><tr><td><table border="0"><tbody><tr valign="baseline"><td><a id="charrange" name="charrange"/><a id="nt-charRange" name="nt-charRange"/>[17]   </td><td><code>charRange</code></td><td>   ::=   </td><td><code>
|
|
|
|
<a href="#nt-seRange">seRange</a> |
|
|
|
|
|
|
|
|
|
|
<a href="#nt-XmlCharIncDash">XmlCharIncDash</a>
|
|
</code></td></tr></tbody><tbody><tr valign="baseline"><td><a id="serange" name="serange"/><a id="nt-seRange" name="nt-seRange"/>[18]   </td><td><code>seRange</code></td><td>   ::=   </td><td><code><a href="#nt-charOrEsc">charOrEsc</a> '-' <a href="#nt-charOrEsc">charOrEsc</a></code></td></tr></tbody><tbody><tr valign="baseline"><td><a id="charoresc" name="charoresc"/><a id="nt-charOrEsc" name="nt-charOrEsc"/>[20]   </td><td><code>charOrEsc</code></td><td>   ::=   </td><td><code><a href="#nt-XmlChar">XmlChar</a> | <a href="#nt-SingleCharEsc">SingleCharEsc</a></code></td></tr></tbody><tbody><tr valign="baseline"><td><a id="xmlchar" name="xmlchar"/><a id="nt-XmlChar" name="nt-XmlChar"/>[21]   </td><td><code>XmlChar</code></td><td>   ::=   </td><td><code>[^\#x2D#x5B#x5D]</code></td></tr></tbody><tbody><tr valign="baseline"><td><a id="XmlCharIncDash" name="XmlCharIncDash"/><a id="nt-XmlCharIncDash" name="nt-XmlCharIncDash"/>[22]   </td><td><code>XmlCharIncDash</code></td><td>   ::=   </td><td><code>[^\#x5B#x5D]</code></td></tr></tbody></table></td></tr></tbody></table><p>
|
|
A single XML character is a <a class="termref" href="#dt-charrange"><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>, <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 class="termref" href="#dt-poschargroup"><span class="arrow">·</span>positive character group<span class="arrow">·</span></a> if it is part of a
|
|
<a class="termref" href="#dt-negchargroup"><span class="arrow">·</span>negative character group<span class="arrow">·</span></a>
|
|
</li><li>
|
|
|
|
The <code>-</code> character is a valid character range only at the beginning
|
|
or end of a <a class="termref" href="#dt-poschargroup"><span class="arrow">·</span>positive character group<span class="arrow">·</span></a>.
|
|
|
|
</li></ul><div class="note"><b>Note: </b>The grammar for <a class="termref" href="#dt-charrange"><span class="arrow">·</span>character range<span class="arrow">·</span></a> as
|
|
given above is ambiguous, but the second and third bullets above
|
|
together remove the ambiguity.</div><p>
|
|
A <a class="termref" href="#dt-charrange"><span class="arrow">·</span>character range<span class="arrow">·</span></a> <a class="termref" href="#dt-may"><span class="arrow">·</span>may<span class="arrow">·</span></a> also be written
|
|
in the form <em>s-e</em>, identifying the set that contains all XML characters
|
|
with UCS code points greater than or equal to the code point
|
|
of <em>s</em>, but not greater than the code point of <em>e</em>.
|
|
</p><p>
|
|
<em>s-e</em> is a valid character range iff:
|
|
</p><ul><li>
|
|
<em>s</em> is a <a class="termref" href="#dt-cces1"><span class="arrow">·</span>single character escape<span class="arrow">·</span></a>, or an XML character;
|
|
</li><li>
|
|
<em>s</em> is not <code>\</code>
|
|
</li><li>
|
|
If s is the first character in a <a class="termref" href="#dt-charexpr"><span class="arrow">·</span>character class expression<span class="arrow">·</span></a>, then
|
|
<em>s</em> is not <code>^</code>
|
|
</li><li>
|
|
<em>e</em> is a <a class="termref" href="#dt-cces1"><span class="arrow">·</span>single character escape<span class="arrow">·</span></a>, or an XML character;
|
|
</li><li>
|
|
<em>e</em> is not <code>\</code> or <code>[</code>; and
|
|
</li><li>
|
|
The code point of <em>e</em> is greater than or equal to the code
|
|
point of <em>s</em>;
|
|
</li></ul><div class="note"><b>Note: </b>
|
|
The code point of a <a class="termref" href="#dt-cces1"><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.
|
|
</div><div class="div3">
|
|
<h4><a id="cces" name="cces"/>F.1.1 Character Class Escapes</h4><p>
|
|
<span class="termdef"><a id="dt-cces" 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 class="termref" href="#dt-cces1"><span class="arrow">·</span>single character escape<span class="arrow">·</span></a>s, the
|
|
<a class="termref" href="#dt-ccesN"><span class="arrow">·</span>multi-character escape<span class="arrow">·</span></a>s, and the <a class="termref" href="#dt-ccescat"><span class="arrow">·</span>category escape<span class="arrow">·</span></a>s (including
|
|
the <a class="termref" href="#dt-ccesblock"><span class="arrow">·</span>block escape<span class="arrow">·</span></a>s).
|
|
</span>
|
|
</p><table width="100%" border="1" cellpadding="5" class="scrap"><tbody><tr align="left"><td><strong><font color="red">Character Class Escape</font></strong></td></tr><tr><td><table border="0"><tbody><tr valign="baseline"><td><a id="charclassesc" name="charclassesc"/><a id="nt-charClassEsc" name="nt-charClassEsc"/>[23]   </td><td><code>charClassEsc</code></td><td>   ::=   </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></tr></tbody></table></td></tr></tbody></table><p>
|
|
<span class="termdef"><a id="dt-cces1" 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 class="termref" href="#dt-regex"><span class="arrow">·</span>regular expression<span class="arrow">·</span></a>.
|
|
</span>
|
|
</p><table width="100%" border="1" cellpadding="5" class="scrap"><tbody><tr align="left"><td><strong><font color="red">Single Character Escape</font></strong></td></tr><tr><td><table border="0"><tbody><tr valign="baseline"><td><a id="singlecharesc" name="singlecharesc"/><a id="nt-SingleCharEsc" name="nt-SingleCharEsc"/>[24]   </td><td><code>SingleCharEsc</code></td><td>   ::=   </td><td><code>'\' [nrt\|.?*+(){}#x2D#x5B#x5D#x5E]</code></td></tr></tbody></table></td></tr></tbody></table><p/><table border="1"><col span="1" width="50%"/><col span="1" width="50%"/><thead><tr><th>
|
|
The valid <a class="termref" href="#dt-cces1"><span class="arrow">·</span>single character escape<span class="arrow">·</span></a>s are:
|
|
</th><th>
|
|
Identifying the set of characters <em>C(R)</em> containing:
|
|
</th></tr></thead><tbody><tr><td align="center"><code>\n</code></td><td align="center">the newline character (#xA)</td></tr><tr><td align="center"><code>\r</code></td><td align="center">the return character (#xD)</td></tr><tr><td align="center"><code>\t</code></td><td align="center">the tab character (#x9)</td></tr><tr><td align="center"><code>\\</code></td><td align="center">\</td></tr><tr><td align="center"><code>\|</code></td><td align="center">|</td></tr><tr><td align="center"><code>\.</code></td><td align="center">.</td></tr><tr><td align="center"><code>\-</code></td><td align="center">-</td></tr><tr><td align="center"><code>\^</code></td><td align="center">^</td></tr><tr><td align="center"><code>\?</code></td><td align="center">?</td></tr><tr><td align="center"><code>\*</code></td><td align="center">*</td></tr><tr><td align="center"><code>\+</code></td><td align="center">+</td></tr><tr><td align="center"><code>\{</code></td><td align="center">{</td></tr><tr><td align="center"><code>\}</code></td><td align="center">}</td></tr><tr><td align="center"><code>\(</code></td><td align="center">(</td></tr><tr><td align="center"><code>\)</code></td><td align="center">)</td></tr><tr><td align="center"><code>\[</code></td><td align="center">[</td></tr><tr><td align="center"><code>\]</code></td><td align="center">]</td></tr></tbody></table><p>
|
|
<span class="termdef"><a id="dt-ccescat" 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><table width="100%" border="1" cellpadding="5" class="scrap"><tbody><tr align="left"><td><strong><font color="red">Category Escape</font></strong></td></tr><tr><td><table border="0"><tbody><tr valign="baseline"><td><a id="catesc" name="catesc"/><a id="nt-catEsc" name="nt-catEsc"/>[25]   </td><td><code>catEsc</code></td><td>   ::=   </td><td><code>'\p{' <a href="#nt-charProp">charProp</a> '}'</code></td></tr></tbody><tbody><tr valign="baseline"><td><a id="complesc" name="complesc"/><a id="nt-complEsc" name="nt-complEsc"/>[26]   </td><td><code>complEsc</code></td><td>   ::=   </td><td><code>'\P{' <a href="#nt-charProp">charProp</a> '}'</code></td></tr></tbody><tbody><tr valign="baseline"><td><a id="charprop" name="charprop"/><a id="nt-charProp" name="nt-charProp"/>[27]   </td><td><code>charProp</code></td><td>   ::=   </td><td><code><a href="#nt-IsCategory">IsCategory</a> | <a href="#nt-IsBlock">IsBlock</a></code></td></tr></tbody></table></td></tr></tbody></table><div class="note"><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 class="termref" href="#dt-minimally-conforming"><span class="arrow">·</span>minimally conforming<span class="arrow">·</span></a> processors <a class="termref" href="#dt-must"><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.
|
|
</div><p>
|
|
The following table specifies the recognized values of the
|
|
"General Category" property.
|
|
</p><table align="center" border="1"><tbody><tr><th>Category</th><th>Property</th><th>Meaning</th></tr><tr><td rowspan="6">Letters</td><td align="center">L</td><td>All Letters</td></tr><tr><td align="center">Lu</td><td>uppercase</td></tr><tr><td align="center">Ll</td><td>lowercase</td></tr><tr><td align="center">Lt</td><td>titlecase</td></tr><tr><td align="center">Lm</td><td>modifier</td></tr><tr><td align="center">Lo</td><td>other</td></tr><tr><td colspan="3"> </td></tr><tr><td rowspan="4">Marks</td><td align="center">M</td><td>All Marks</td></tr><tr><td align="center">Mn</td><td>nonspacing</td></tr><tr><td align="center">Mc</td><td>spacing combining</td></tr><tr><td align="center">Me</td><td>enclosing</td></tr><tr><td colspan="3"> </td></tr><tr><td rowspan="4">Numbers</td><td align="center">N</td><td>All Numbers</td></tr><tr><td align="center">Nd</td><td>decimal digit</td></tr><tr><td align="center">Nl</td><td>letter</td></tr><tr><td align="center">No</td><td>other</td></tr><tr><td colspan="3"> </td></tr><tr><td rowspan="8">Punctuation</td><td align="center">P</td><td>All Punctuation</td></tr><tr><td align="center">Pc</td><td>connector</td></tr><tr><td align="center">Pd</td><td>dash</td></tr><tr><td align="center">Ps</td><td>open</td></tr><tr><td align="center">Pe</td><td>close</td></tr><tr><td align="center">Pi</td><td>initial quote
|
|
(may behave like Ps or Pe depending on usage)</td></tr><tr><td align="center">Pf</td><td>final quote
|
|
(may behave like Ps or Pe depending on usage)</td></tr><tr><td align="center">Po</td><td>other</td></tr><tr><td colspan="3"> </td></tr><tr><td rowspan="4">Separators</td><td align="center">Z</td><td>All Separators</td></tr><tr><td align="center">Zs</td><td>space</td></tr><tr><td align="center">Zl</td><td>line</td></tr><tr><td align="center">Zp</td><td>paragraph</td></tr><tr><td colspan="3"> </td></tr><tr><td rowspan="5">Symbols</td><td align="center">S</td><td>All Symbols</td></tr><tr><td align="center">Sm</td><td>math</td></tr><tr><td align="center">Sc</td><td>currency</td></tr><tr><td align="center">Sk</td><td>modifier</td></tr><tr><td align="center">So</td><td>other</td></tr><tr><td colspan="3"> </td></tr><tr><td rowspan="6">Other</td><td align="center">C</td><td>All Others</td></tr><tr><td align="center">Cc</td><td>control</td></tr><tr><td align="center">Cf</td><td>format</td></tr><tr><td align="center">Co</td><td>private use</td></tr><tr><td align="center">Cn</td><td>not assigned</td></tr></tbody></table><table width="100%" border="1" cellpadding="5" class="scrap"><tbody><tr align="left"><td><strong><font color="red">Categories</font></strong></td></tr><tr><td><table border="0"><tbody><tr valign="baseline"><td><a id="cats" name="cats"/><a id="nt-IsCategory" name="nt-IsCategory"/>[28]   </td><td><code>IsCategory</code></td><td>   ::=   </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></tr></tbody><tbody><tr valign="baseline"><td><a id="lets" name="lets"/><a id="nt-Letters" name="nt-Letters"/>[29]   </td><td><code>Letters</code></td><td>   ::=   </td><td><code>'L' [ultmo]?</code></td></tr></tbody><tbody><tr valign="baseline"><td><a id="marks" name="marks"/><a id="nt-Marks" name="nt-Marks"/>[30]   </td><td><code>Marks</code></td><td>   ::=   </td><td><code>'M' [nce]?</code></td></tr></tbody><tbody><tr valign="baseline"><td><a id="nums" name="nums"/><a id="nt-Numbers" name="nt-Numbers"/>[31]   </td><td><code>Numbers</code></td><td>   ::=   </td><td><code>'N' [dlo]?</code></td></tr></tbody><tbody><tr valign="baseline"><td><a id="punc" name="punc"/><a id="nt-Punctuation" name="nt-Punctuation"/>[32]   </td><td><code>Punctuation</code></td><td>   ::=   </td><td><code>'P' [cdseifo]?</code></td></tr></tbody><tbody><tr valign="baseline"><td><a id="seps" name="seps"/><a id="nt-Separators" name="nt-Separators"/>[33]   </td><td><code>Separators</code></td><td>   ::=   </td><td><code>'Z' [slp]?</code></td></tr></tbody><tbody><tr valign="baseline"><td><a id="syms" name="syms"/><a id="nt-Symbols" name="nt-Symbols"/>[34]   </td><td><code>Symbols</code></td><td>   ::=   </td><td><code>'S' [mcko]?</code></td></tr></tbody><tbody><tr valign="baseline"><td><a id="others" name="others"/><a id="nt-Others" name="nt-Others"/>[35]   </td><td><code>Others</code></td><td>   ::=   </td><td><code>'C' [cfon]?</code></td></tr></tbody></table></td></tr></tbody></table><div class="note"><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.
|
|
</div><p>
|
|
<span class="termdef"><a id="dt-ccesblock" 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><table width="100%" border="1" cellpadding="5" class="scrap"><tbody><tr align="left"><td><strong><font color="red">Block Escape</font></strong></td></tr><tr><td><table border="0"><tbody><tr valign="baseline"><td><a id="blockesc" name="blockesc"/><a id="nt-IsBlock" name="nt-IsBlock"/>[36]   </td><td><code>IsBlock</code></td><td>   ::=   </td><td><code>'Is' [a-zA-Z0-9#x2D]+</code></td></tr></tbody></table></td></tr></tbody></table><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 cellpadding="5" align="center" border="1"><tbody><tr><th>Start Code</th><th>End Code</th><th>Block Name</th><th> </th><th>Start Code</th><th>End Code</th><th>Block Name</th></tr><tr><td>#x0000</td><td>#x007F</td><td>BasicLatin</td><td> </td><td>#x0080</td><td>#x00FF</td><td>Latin-1Supplement</td></tr><tr><td>#x0100</td><td>#x017F</td><td>LatinExtended-A</td><td> </td><td>#x0180</td><td>#x024F</td><td>LatinExtended-B</td></tr><tr><td>#x0250</td><td>#x02AF</td><td>IPAExtensions</td><td> </td><td>#x02B0</td><td>#x02FF</td><td>SpacingModifierLetters</td></tr><tr><td>#x0300</td><td>#x036F</td><td>CombiningDiacriticalMarks</td><td> </td><td>#x0370</td><td>#x03FF</td><td>Greek</td></tr><tr><td>#x0400</td><td>#x04FF</td><td>Cyrillic</td><td> </td><td>#x0530</td><td>#x058F</td><td>Armenian</td></tr><tr><td>#x0590</td><td>#x05FF</td><td>Hebrew</td><td> </td><td>#x0600</td><td>#x06FF</td><td>Arabic</td></tr><tr><td>#x0700</td><td>#x074F</td><td>Syriac</td><td> </td><td>#x0780</td><td>#x07BF</td><td>Thaana</td></tr><tr><td>#x0900</td><td>#x097F</td><td>Devanagari</td><td> </td><td>#x0980</td><td>#x09FF</td><td>Bengali</td></tr><tr><td>#x0A00</td><td>#x0A7F</td><td>Gurmukhi</td><td> </td><td>#x0A80</td><td>#x0AFF</td><td>Gujarati</td></tr><tr><td>#x0B00</td><td>#x0B7F</td><td>Oriya</td><td> </td><td>#x0B80</td><td>#x0BFF</td><td>Tamil</td></tr><tr><td>#x0C00</td><td>#x0C7F</td><td>Telugu</td><td> </td><td>#x0C80</td><td>#x0CFF</td><td>Kannada</td></tr><tr><td>#x0D00</td><td>#x0D7F</td><td>Malayalam</td><td> </td><td>#x0D80</td><td>#x0DFF</td><td>Sinhala</td></tr><tr><td>#x0E00</td><td>#x0E7F</td><td>Thai</td><td> </td><td>#x0E80</td><td>#x0EFF</td><td>Lao</td></tr><tr><td>#x0F00</td><td>#x0FFF</td><td>Tibetan</td><td> </td><td>#x1000</td><td>#x109F</td><td>Myanmar</td></tr><tr><td>#x10A0</td><td>#x10FF</td><td>Georgian</td><td> </td><td>#x1100</td><td>#x11FF</td><td>HangulJamo</td></tr><tr><td>#x1200</td><td>#x137F</td><td>Ethiopic</td><td> </td><td>#x13A0</td><td>#x13FF</td><td>Cherokee</td></tr><tr><td>#x1400</td><td>#x167F</td><td>UnifiedCanadianAboriginalSyllabics</td><td> </td><td>#x1680</td><td>#x169F</td><td>Ogham</td></tr><tr><td>#x16A0</td><td>#x16FF</td><td>Runic</td><td> </td><td>#x1780</td><td>#x17FF</td><td>Khmer</td></tr><tr><td>#x1800</td><td>#x18AF</td><td>Mongolian</td><td> </td><td>#x1E00</td><td>#x1EFF</td><td>LatinExtendedAdditional</td></tr><tr><td>#x1F00</td><td>#x1FFF</td><td>GreekExtended</td><td> </td><td>#x2000</td><td>#x206F</td><td>GeneralPunctuation</td></tr><tr><td>#x2070</td><td>#x209F</td><td>SuperscriptsandSubscripts</td><td> </td><td>#x20A0</td><td>#x20CF</td><td>CurrencySymbols</td></tr><tr><td>#x20D0</td><td>#x20FF</td><td>CombiningMarksforSymbols</td><td> </td><td>#x2100</td><td>#x214F</td><td>LetterlikeSymbols</td></tr><tr><td>#x2150</td><td>#x218F</td><td>NumberForms</td><td> </td><td>#x2190</td><td>#x21FF</td><td>Arrows</td></tr><tr><td>#x2200</td><td>#x22FF</td><td>MathematicalOperators</td><td> </td><td>#x2300</td><td>#x23FF</td><td>MiscellaneousTechnical</td></tr><tr><td>#x2400</td><td>#x243F</td><td>ControlPictures</td><td> </td><td>#x2440</td><td>#x245F</td><td>OpticalCharacterRecognition</td></tr><tr><td>#x2460</td><td>#x24FF</td><td>EnclosedAlphanumerics</td><td> </td><td>#x2500</td><td>#x257F</td><td>BoxDrawing</td></tr><tr><td>#x2580</td><td>#x259F</td><td>BlockElements</td><td> </td><td>#x25A0</td><td>#x25FF</td><td>GeometricShapes</td></tr><tr><td>#x2600</td><td>#x26FF</td><td>MiscellaneousSymbols</td><td> </td><td>#x2700</td><td>#x27BF</td><td>Dingbats</td></tr><tr><td>#x2800</td><td>#x28FF</td><td>BraillePatterns</td><td> </td><td>#x2E80</td><td>#x2EFF</td><td>CJKRadicalsSupplement</td></tr><tr><td>#x2F00</td><td>#x2FDF</td><td>KangxiRadicals</td><td> </td><td>#x2FF0</td><td>#x2FFF</td><td>IdeographicDescriptionCharacters</td></tr><tr><td>#x3000</td><td>#x303F</td><td>CJKSymbolsandPunctuation</td><td> </td><td>#x3040</td><td>#x309F</td><td>Hiragana</td></tr><tr><td>#x30A0</td><td>#x30FF</td><td>Katakana</td><td> </td><td>#x3100</td><td>#x312F</td><td>Bopomofo</td></tr><tr><td>#x3130</td><td>#x318F</td><td>HangulCompatibilityJamo</td><td> </td><td>#x3190</td><td>#x319F</td><td>Kanbun</td></tr><tr><td>#x31A0</td><td>#x31BF</td><td>BopomofoExtended</td><td> </td><td>#x3200</td><td>#x32FF</td><td>EnclosedCJKLettersandMonths</td></tr><tr><td>#x3300</td><td>#x33FF</td><td>CJKCompatibility</td><td> </td><td>#x3400</td><td>#x4DB5</td><td>CJKUnifiedIdeographsExtensionA</td></tr><tr><td>#x4E00</td><td>#x9FFF</td><td>CJKUnifiedIdeographs</td><td> </td><td>#xA000</td><td>#xA48F</td><td>YiSyllables</td></tr><tr><td>#xA490</td><td>#xA4CF</td><td>YiRadicals</td><td> </td><td>#xAC00</td><td>#xD7A3</td><td>HangulSyllables</td></tr><tr><td/><td/><td/><td> </td><td/><td/><td/></tr><tr><td/><td/><td/><td> </td><td>#xE000</td><td>#xF8FF</td><td>PrivateUse</td></tr><tr><td>#xF900</td><td>#xFAFF</td><td>CJKCompatibilityIdeographs</td><td> </td><td>#xFB00</td><td>#xFB4F</td><td>AlphabeticPresentationForms</td></tr><tr><td>#xFB50</td><td>#xFDFF</td><td>ArabicPresentationForms-A</td><td> </td><td>#xFE20</td><td>#xFE2F</td><td>CombiningHalfMarks</td></tr><tr><td>#xFE30</td><td>#xFE4F</td><td>CJKCompatibilityForms</td><td> </td><td>#xFE50</td><td>#xFE6F</td><td>SmallFormVariants</td></tr><tr><td>#xFE70</td><td>#xFEFE</td><td>ArabicPresentationForms-B</td><td> </td><td>#xFEFF</td><td>#xFEFF</td><td>Specials</td></tr><tr><td>#xFF00</td><td>#xFFEF</td><td>HalfwidthandFullwidthForms</td><td> </td><td>#xFFF0</td><td>#xFFFD</td><td>Specials</td></tr></tbody></table><div class="note"><b>Note: </b>
|
|
|
|
The blocks mentioned above exclude the <code>HighSurrogates</code>,
|
|
<code>LowSurrogates</code> and <code>HighPrivateUseSurrogates</code> blocks.
|
|
These blocks identify "surrogate" characters, which do not
|
|
occur at the level of the "character abstraction" that XML instance documents
|
|
operate on.
|
|
|
|
</div><div class="note"><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 class="termref" href="#dt-minimally-conforming"><span class="arrow">·</span>minimally conforming<span class="arrow">·</span></a> processors <a class="termref" href="#dt-must"><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.
|
|
</div><p>
|
|
For example, the <a class="termref" href="#dt-ccesblock"><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 id="dt-ccesN" 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><table width="100%" border="1" cellpadding="5" class="scrap"><tbody><tr align="left"><td><strong><font color="red">Multi-Character Escape</font></strong></td></tr><tr><td><table border="0"><tbody><tr valign="baseline"><td><a id="multicharesc" name="multicharesc"/><a id="nt-MultiCharEsc" name="nt-MultiCharEsc"/>[37]   </td><td><code>MultiCharEsc</code></td><td>   ::=   </td><td><code>'\' [sSiIcCdDwW]</code></td></tr></tbody><tbody><tr valign="baseline"><td><a id="wildcardesc" name="wildcardesc"/><a id="nt-WildcardEsc" name="nt-WildcardEsc"/>[37a]   </td><td><code>WildcardEsc</code></td><td>   ::=   </td><td><code>'.'</code></td></tr></tbody></table></td></tr></tbody></table><p/><table cellpadding="5" align="center" border="1"><col span="1" width="33%"/><col span="1" width="33%"/><col span="1" width="33%"/><thead><tr><th>Character sequence</th><th>Equivalent <a class="termref" href="#dt-charclass"><span class="arrow">·</span>character class<span class="arrow">·</span></a></th></tr></thead><tbody><tr><td align="center">.</td><td align="center">[^\n\r]</td></tr><tr><td align="center">\s</td><td align="center">[#x20\t\n\r]</td></tr><tr><td align="center">\S</td><td align="center">[^\s]</td></tr><tr><td align="center">\i</td><td align="center">
|
|
the set of initial name characters, those
|
|
<a class="termref" href="#dt-match"><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">\I</td><td align="center">[^\i]</td></tr><tr><td align="center">\c</td><td align="center">
|
|
|
|
the set of name characters, those
|
|
<a class="termref" href="#dt-match"><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">\C</td><td align="center">[^\c]</td></tr><tr><td align="center">\d</td><td align="center">\p{Nd}</td></tr><tr><td align="center">\D</td><td align="center">[^\d]</td></tr><tr><td align="center">\w</td><td align="center">
|
|
[#x0000-#x10FFFF]-[\p{P}\p{Z}\p{C}]
|
|
(<em>all characters except the set of "punctuation",
|
|
"separator" and "other" characters</em>)
|
|
</td></tr><tr><td align="center">\W</td><td align="center">[^\w]</td></tr></tbody></table><div class="note"><b>Note: </b>
|
|
The <a class="termref" href="#dt-regex"><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.
|
|
</div></div></div></div><div class="div1">
|
|
<h2><a id="normative-glossary" name="normative-glossary"/>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 class="termref" href="#dt-derived"><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 class="termref" href="#dt-primitive"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> or <a class="termref" href="#dt-derived"><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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> has either an
|
|
<a class="termref" href="#dt-inclusive-upper-bound"><span class="arrow">·</span>inclusive upper bound<span class="arrow">·</span></a> or an <a class="termref" href="#dt-exclusive-upper-bound"><span class="arrow">·</span>exclusive upper bound<span class="arrow">·</span></a>
|
|
and either an <a class="termref" href="#dt-inclusive-lower-bound"><span class="arrow">·</span>inclusive lower bound<span class="arrow">·</span></a> or
|
|
an
|
|
<a class="termref" href="#dt-exclusive-lower-bound"><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 class="termref" href="#dt-primitive"><span class="arrow">·</span>primitive<span class="arrow">·</span></a> or
|
|
<a class="termref" href="#dt-derived"><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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>.
|
|
</dd><dt><a href="#dt-cardinality">cardinality</a></dt><dd>Every
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> has associated with it the concept of
|
|
<b>cardinality</b>. Some <a class="termref" href="#dt-value-space"><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 class="termref" href="#dt-value-space"><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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>.
|
|
</dd><dt><a href="#dt-comparable">comparable</a></dt><dd>otherwise they are <b>comparable</b>.</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 class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a>, when processing schema documents, completely and
|
|
correctly implement all
|
|
<a class="termref" href="#dt-src"><span class="arrow">·</span>Schema Representation Constraint<span class="arrow">·</span></a>s
|
|
in this specification, and <a class="termref" href="#dt-must"><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 href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#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 class="termref" href="#dt-value-space"><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 class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>,
|
|
b) a set of lexical representations, called its
|
|
<a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>, and c) a set of <a class="termref" href="#dt-facet"><span class="arrow">·</span>facet<span class="arrow">·</span></a>s
|
|
that characterize properties of the <a class="termref" href="#dt-value-space"><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 <em>l</em> in an <a class="termref" href="#dt-ordered"><span class="arrow">·</span>ordered<span class="arrow">·</span></a>
|
|
 <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <em>L</em>
|
|
is said to be an <b>exclusive lower bound</b> of a
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <em>V</em>
|
|
(where <em>V</em> is a subset of <em>L</em>)
|
|
if for all <em>v</em> in <em>V</em>,
|
|
<em>l</em> < <em>v</em>.
|
|
</dd><dt><a href="#dt-exclusive-upper-bound">exclusive upper bound</a></dt><dd>
|
|
A value <em>u</em> in an <a class="termref" href="#dt-ordered"><span class="arrow">·</span>ordered<span class="arrow">·</span></a>
|
|
 <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <em>U</em>
|
|
is said to be an <b>exclusive upper bound</b> of a
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <em>V</em>
|
|
(where <em>V</em> is a subset of <em>U</em>)
|
|
if for all <em>v</em> in <em>V</em>,
|
|
<em>u</em> > <em>v</em>.
|
|
</dd><dt><a href="#dt-facet">facet</a></dt><dd>A <b>facet</b> is a single
|
|
defining aspect of a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>. Generally
|
|
speaking, each facet characterizes a <a class="termref" href="#dt-value-space"><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 class="termref" href="#dt-value-space"><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 <em>l</em> in an <a class="termref" href="#dt-ordered"><span class="arrow">·</span>ordered<span class="arrow">·</span></a>
|
|
 <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <em>L</em>
|
|
is said to be an <b>inclusive lower bound</b> of a
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <em>V</em>
|
|
(where <em>V</em> is a subset of <em>L</em>)
|
|
if for all <em>v</em> in <em>V</em>,
|
|
<em>l</em> <= <em>v</em>.
|
|
</dd><dt><a href="#dt-inclusive-upper-bound">inclusive upper bound</a></dt><dd>
|
|
A value <em>u</em> in an <a class="termref" href="#dt-ordered"><span class="arrow">·</span>ordered<span class="arrow">·</span></a>
|
|
 <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <em>U</em>
|
|
is said to be an <b>inclusive upper bound</b> of a
|
|
<a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> <em>V</em>
|
|
(where <em>V</em> is a subset of <em>U</em>)
|
|
if for all <em>v</em> in <em>V</em>,
|
|
<em>u</em> >= <em>v</em>.
|
|
</dd><dt><a href="#dt-incomparable">incomparable</a></dt><dd>When <em>a <> b</em>, <em>a</em> and <em>b</em> are <b>incomparable</b>,</dd><dt><a href="#dt-itemType">itemType</a></dt><dd>
|
|
The <a class="termref" href="#dt-atomic"><span class="arrow">·</span>atomic<span class="arrow">·</span></a> or <a class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a>
|
|
datatype that participates in the definition of a <a class="termref" href="#dt-list"><span class="arrow">·</span>list<span class="arrow">·</span></a> datatype
|
|
is known as the <b>itemType</b> of that <a class="termref" href="#dt-list"><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 <em>literals</em>
|
|
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 class="termref" href="#dt-atomic"><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 class="termref" href="#dt-union"><span class="arrow">·</span>union<span class="arrow">·</span></a> datatype are known as the
|
|
<b>memberTypes</b> of that <a class="termref" href="#dt-union"><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 class="termref" href="#dt-must"><span class="arrow">·</span>must<span class="arrow">·</span></a>
|
|
completely and correctly implement the <a class="termref" href="#dt-cos"><span class="arrow">·</span>Constraint on Schemas<span class="arrow">·</span></a> and
|
|
<a class="termref" href="#dt-cvc"><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 class="termref" href="#dt-numeric"><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-order-relation">order-relation</a></dt><dd>An
|
|
<b>order relation</b> on a <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>
|
|
is a mathematical relation that imposes a
|
|
<a class="termref" href="#dt-total-order"><span class="arrow">·</span>total order<span class="arrow">·</span></a> or a <a class="termref" href="#dt-partial-order"><span class="arrow">·</span>partial order<span class="arrow">·</span></a> on the
|
|
members of the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>.
|
|
</dd><dt><a href="#dt-ordered">ordered</a></dt><dd>A
|
|
<a class="termref" href="#dt-value-space"><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 class="termref" href="#dt-order-relation"><span class="arrow">·</span>order-relation<span class="arrow">·</span></a> defined for that
|
|
<a class="termref" href="#dt-value-space"><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 class="termref" href="#dt-order-relation"><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 <em>ab initio</em>.
|
|
</dd><dt><a href="#dt-regex">regular expression</a></dt><dd>A
|
|
<b>regular expression</b> is composed from zero or more
|
|
<a class="termref" href="#dt-branch"><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 class="termref" href="#dt-derived"><span class="arrow">·</span>derived<span class="arrow">·</span></a> by <b>restriction</b> from another datatype
|
|
when values for zero or more <a class="termref" href="#dt-constraining-facet"><span class="arrow">·</span>constraining facet<span class="arrow">·</span></a>s are specified
|
|
that serve to constrain its <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a> and/or its
|
|
<a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a> to a subset of those of its
|
|
<a class="termref" href="#dt-basetype"><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 class="termref" href="#dt-partial-order"><span class="arrow">·</span>partial order<span class="arrow">·</span></a>
|
|
such that for no <em>a</em> and <em>b</em>
|
|
is it the case that <em>a <> b</em>.
|
|
</dd><dt><a href="#dt-union">union</a></dt><dd><b>Union</b>
|
|
datatypes are those whose <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s and
|
|
<a class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>s are the union of
|
|
the <a class="termref" href="#dt-value-space"><span class="arrow">·</span>value space<span class="arrow">·</span></a>s and
|
|
<a class="termref" href="#dt-lexical-space"><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 class="termref" href="#dt-derived"><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 class="termref" href="#dt-lexical-space"><span class="arrow">·</span>lexical space<span class="arrow">·</span></a>.
|
|
</dd></dl></div><div class="div1">
|
|
<h2><a id="biblio" name="biblio"/>H References</h2><div class="div2">
|
|
<h3><span class="nav"> <a class="nav" href="#non-normative-biblio"><img src="next.jpg" alt="next sub-section"/></a></span><a id="normative-biblio" name="normative-biblio"/>H.1 Normative</h3><dl><dt class="label"><a id="clinger1990" name="clinger1990"/>Clinger, WD (1990)</dt><dd>
|
|
William D Clinger. <em>How to Read Floating Point Numbers Accurately.</em>
|
|
In <em>Proceedings of Conference on Programming Language Design and
|
|
Implementation</em>, 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 class="label"><a id="ieee754" name="ieee754"/>IEEE 754-1985</dt><dd>
|
|
IEEE. <em>IEEE Standard for Binary Floating-Point Arithmetic.</em>
|
|
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 class="label"><a id="XMLNS" name="XMLNS"/>Namespaces in XML</dt><dd>
|
|
World Wide Web Consortium. <em>Namespaces in XML</em>. 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 class="label"><a id="RFC1766" name="RFC1766"/>RFC 1766</dt><dd>
|
|
H. Alvestrand, ed. <em>RFC 1766: Tags for the Identification of Languages</em>
|
|
1995. Available at: <a href="http://www.ietf.org/rfc/rfc1766.txt">
|
|
http://www.ietf.org/rfc/rfc1766.txt</a>
|
|
</dd><dt class="label"><a id="RFC2045" name="RFC2045"/>RFC 2045</dt><dd>
|
|
N. Freed and N. Borenstein. <em>RFC 2045: Multipurpose Internet Mail Extensions
|
|
(MIME) Part One: Format of Internet Message Bodies</em>. 1996. Available at:
|
|
<a href="http://www.ietf.org/rfc/rfc2045.txt">
|
|
http://www.ietf.org/rfc/rfc2045.txt</a>
|
|
</dd><dt class="label"><a id="RFC2396" name="RFC2396"/>RFC 2396</dt><dd>
|
|
Tim Berners-Lee, et. al. <em>RFC 2396: Uniform Resource Identifiers (URI):
|
|
Generic Syntax.</em>. 1998. Available at:
|
|
<a href="http://www.ietf.org/rfc/rfc2396.txt">
|
|
http://www.ietf.org/rfc/rfc2396.txt</a>
|
|
</dd><dt class="label"><a id="RFC2732" name="RFC2732"/>RFC 2732</dt><dd>
|
|
<em>RFC
|
|
2732: Format for Literal IPv6 Addresses in URL's</em>. 1999.
|
|
Available at:
|
|
<a href="http://www.ietf.org/rfc/rfc2732.txt">
|
|
http://www.ietf.org/rfc/rfc2732.txt</a>
|
|
</dd><dt class="label"><a id="RFC3066" name="RFC3066"/>RFC 3066</dt><dd>
|
|
H. Alvestrand, ed. <em>RFC 3066: Tags for the Identification of Languages</em>
|
|
1995. Available at: <a href="http://www.ietf.org/rfc/rfc3066.txt">
|
|
http://www.ietf.org/rfc/rfc3066.txt</a>
|
|
</dd><dt class="label"><a id="UnicodeDB" name="UnicodeDB"/>Unicode Database</dt><dd>
|
|
The Unicode Consortium. <em>The Unicode Character Database</em>.
|
|
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 class="label"><a id="XML" name="XML"/>XML 1.0 (Second Edition)</dt><dd>
|
|
World Wide Web Consortium. <em>Extensible Markup Language (XML) 1.0, Second
|
|
Edition.</em>
|
|
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 class="label"><a id="XBase" name="XBase"/>XML Base</dt><dd>
|
|
|
|
|
|
World Wide Web Consortium. XML Base.
|
|
Available at: <a href="http://www.w3.org/TR/2001/REC-xmlbase-20010627/">
|
|
http://www.w3.org/TR/2001/REC-xmlbase-20010627/</a>
|
|
</dd><dt class="label"><a id="XLink" name="XLink"/>XML Linking Language</dt><dd>
|
|
World Wide Web Consortium. XML Linking Language (XLink).
|
|
Available at: <a href="http://www.w3.org/TR/2001/REC-xlink-20010627/">http://www.w3.org/TR/2001/REC-xlink-20010627/.</a>
|
|
Note: only the URI reference escaping procedure defined in
|
|
Section 5.4 is normatively referenced.
|
|
|
|
</dd><dt class="label"><a id="structural-schemas" name="structural-schemas"/>XML Schema Part 1: Structures</dt><dd>
|
|
XML Schema Part 1: Structures. Available at: <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html">
|
|
http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html</a>
|
|
</dd><dt class="label"><a id="schema-requirements" name="schema-requirements"/>XML Schema Requirements</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 class="nav" href="#normative-biblio"><img src="previous.jpg" alt="previous sub-section"/></a> </span><a id="non-normative-biblio" name="non-normative-biblio"/>H.2 Non-normative</h3><dl><dt class="label"><a id="CharMod" name="CharMod"/>Character Model</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 class="label"><a id="gay1990" name="gay1990"/>Gay, DM (1990)</dt><dd>
|
|
David M. Gay. <em>Correctly Rounded Binary-Decimal and
|
|
Decimal-Binary Conversions.</em> 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 class="label"><a id="html4" name="html4"/>HTML 4.01</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 class="label"><a id="draft-masinter-url-i18n-07" name="draft-masinter-url-i18n-07"/>IETF INTERNET-DRAFT: IRIs</dt><dd>
|
|
M. Dürst and M. Suignard
|
|
.
|
|
<em>Internationalized Resource Identifiers</em>
|
|
2002. Available at:
|
|
|
|
<a href="http://www.w3.org/International/iri-edit/draft-duerst-iri-04.txt">
|
|
http://www.w3.org/International/iri-edit/draft-duerst-iri-04.txt</a>
|
|
|
|
|
|
</dd><dt class="label"><a id="IERS" name="IERS"/>International Earth Rotation Service (IERS)</dt><dd>
|
|
International Earth Rotation Service (IERS).
|
|
See <a href="http://maia.usno.navy.mil">http://maia.usno.navy.mil</a>
|
|
</dd><dt class="label"><a id="ISO11404" name="ISO11404"/>ISO 11404</dt><dd>
|
|
ISO (International Organization for Standardization).
|
|
<em>Language-independent Datatypes.</em> See
|
|
<a href="http://www.iso.ch/cate/d19346.html">
|
|
http://www.iso.ch/cate/d19346.html</a>
|
|
</dd><dt class="label"><a id="ISO8601" name="ISO8601"/>ISO 8601</dt><dd>
|
|
ISO (International Organization for Standardization).
|
|
<em>Representations of dates and times, 1988-06-15.</em>
|
|
|
|
</dd><dt class="label"><a id="ISO8601-1998" name="ISO8601-1998"/>ISO 8601:1998 Draft Revision</dt><dd>
|
|
ISO (International Organization for Standardization).
|
|
<em>Representations of dates and times, draft revision, 1998.</em>
|
|
</dd><dt class="label"><a id="ISO8601-2000" name="ISO8601-2000"/>ISO 8601:2000 Second Edition</dt><dd>
|
|
ISO (International Organization for Standardization).
|
|
<em>Representations of dates and times, second edition, 2000-12-15.</em>
|
|
</dd><dt class="label"><a id="Perl" name="Perl"/>Perl</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 class="label"><a id="RDFSchema" name="RDFSchema"/>RDF Schema</dt><dd>
|
|
World Wide Web Consortium. <em>RDF Schema Specification.</em>
|
|
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 class="label"><a id="ruby" name="ruby"/>Ruby</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 class="label"><a id="SQL" name="SQL"/>SQL</dt><dd>
|
|
ISO (International Organization for Standardization). <em>ISO/IEC
|
|
9075-2:1999, Information technology --- Database languages ---
|
|
SQL --- Part 2: Foundation (SQL/Foundation)</em>.
|
|
[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 class="label"><a id="USNavy" name="USNavy"/>U.S. Naval Observatory Time Service Department</dt><dd>
|
|
<em>Information about Leap Seconds</em>
|
|
Available at:
|
|
<a href="http://tycho.usno.navy.mil/leapsec.990505.html">http://tycho.usno.navy.mil/leapsec.990505.html</a>
|
|
</dd><dt class="label"><a id="unicodeRegEx" name="unicodeRegEx"/>Unicode Regular Expression Guidelines</dt><dd>
|
|
Mark Davis. <em>Unicode Regular Expression Guidelines</em>, 1988.
|
|
Available at: <a href="http://www.unicode.org/unicode/reports/tr18/">
|
|
http://www.unicode.org/unicode/reports/tr18/</a>
|
|
</dd><dt class="label"><a id="schema-primer" name="schema-primer"/>XML Schema Language: Part 0 Primer</dt><dd>
|
|
World Wide Web Consortium. XML Schema Language: Part 0 Primer. Available at:
|
|
<a href="http://www.w3.org/TR/2004/REC-xmlschema-0-20041028/primer.html">
|
|
http://www.w3.org/TR/2004/REC-xmlschema-0-20041028/primer.html</a>
|
|
</dd><dt class="label"><a id="XSL" name="XSL"/>XSL</dt><dd>
|
|
World Wide Web Consortium.
|
|
<em>Extensible Stylesheet Language (XSL).</em>
|
|
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 id="acknowledgments" name="acknowledgments"/>I Acknowledgements (non-normative)</h2><p>The following have contributed material to the first edition of this specification:</p><blockquote><p>Asir S. Vedamuthu, webMethods, Inc<br/>Mark Davis, IBM</p></blockquote><p>
|
|
Co-editor Ashok Malhotra's work on this specification from March 1999 until
|
|
February 2001 was supported by IBM. From February 2001 until May 2004 it
|
|
was supported by Microsoft.
|
|
</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>
|
|
At the time the first edition of this
|
|
specification was published, the members of the XML Schema Working Group
|
|
|
|
were:</p><ul><li>Jim Barnette, Defense Information Systems Agency (DISA)</li><li>Paul V. Biron, Health Level Seven</li><li>Don Box, DevelopMentor</li><li>Allen Brown, Microsoft</li><li>Lee Buck, TIBCO Extensibility</li><li>Charles E. Campbell, Informix</li><li>Wayne Carr, Intel</li><li>Peter Chen, Bootstrap Alliance and LSU</li><li>David Cleary, Progress Software</li><li>Dan Connolly, W3C (<i>staff contact</i>) </li><li>Ugo Corda, Xerox</li><li>Roger L. Costello, MITRE</li><li>Haavard Danielson, Progress Software</li><li>Josef Dietl, Mozquito Technologies</li><li>David Ezell, Hewlett-Packard Company
|
|
</li><li>Alexander Falk, Altova GmbH</li><li>David Fallside, IBM</li><li>Dan Fox, Defense Logistics Information Service (DLIS)</li><li>Matthew Fuchs, Commerce One</li><li>Andrew Goodchild, Distributed Systems Technology Centre (DSTC Pty Ltd)</li><li>Paul Grosso, Arbortext, Inc</li><li>Martin Gudgin, DevelopMentor</li><li>Dave Hollander, Contivo, Inc (<i>co-chair</i>) </li><li>Mary Holstege, Invited Expert</li><li>Jane Hunter, Distributed Systems Technology Centre (DSTC Pty Ltd)</li><li>Rick Jelliffe, Academia Sinica</li><li>Simon Johnston, Rational Software</li><li>Bob Lojek, Mozquito Technologies</li><li>Ashok Malhotra, Microsoft</li><li>Lisa Martin, IBM</li><li>Noah Mendelsohn, Lotus Development Corporation</li><li>Adrian Michel, Commerce One</li><li>Alex Milowski, Invited Expert</li><li>Don Mullen, TIBCO Extensibility</li><li>Dave Peterson, Graphic Communications Association</li><li>Jonathan Robie, Software AG</li><li>Eric Sedlar, Oracle Corp.</li><li>C. M. Sperberg-McQueen, W3C (<i>co-chair</i>) </li><li>Bob Streich, Calico Commerce</li><li>William K. Stumbo, Xerox</li><li>Henry S. Thompson, University of Edinburgh</li><li>Mark Tucker, Health Level Seven</li><li>Asir S. Vedamuthu, webMethods, Inc</li><li>Priscilla Walmsley, XMLSolutions</li><li>Norm Walsh, Sun Microsystems</li><li>Aki Yoshida, SAP AG</li><li>Kongyi Zhou, Oracle Corp.</li></ul><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><ul><li>Paula Angerstein, Vignette Corporation</li><li>David Beech, Oracle Corp.</li><li>Gabe Beged-Dov, Rogue Wave Software</li><li>Greg Bumgardner, Rogue Wave Software</li><li>Dean Burson, Lotus Development Corporation</li><li>Mike Cokus, MITRE</li><li>Andrew Eisenberg, Progress Software</li><li>Rob Ellman, Calico Commerce</li><li>George Feinberg, Object Design</li><li>Charles Frankston, Microsoft</li><li>Ernesto Guerrieri, Inso</li><li>Michael Hyman, Microsoft</li><li>Renato Iannella, Distributed Systems Technology Centre (DSTC Pty Ltd)</li><li>Dianne Kennedy, Graphic Communications Association</li><li>Janet Koenig, Sun Microsystems</li><li>Setrag Khoshafian, Technology Deployment International (TDI)</li><li>Ara Kullukian, Technology Deployment International (TDI)</li><li>Andrew Layman, Microsoft</li><li>Dmitry Lenkov, Hewlett-Packard Company</li><li>John McCarthy, Lawrence Berkeley National Laboratory</li><li>Murata Makoto, Xerox</li><li>Eve Maler, Sun Microsystems</li><li>Murray Maloney, Muzmo Communication, acting for Commerce One</li><li>Chris Olds, Wall Data</li><li>Frank Olken, Lawrence Berkeley National Laboratory</li><li>Shriram Revankar, Xerox</li><li>Mark Reinhold, Sun Microsystems</li><li>John C. Schneider, MITRE</li><li>Lew Shannon, NCR</li><li>William Shea, Merrill Lynch</li><li>Ralph Swick, W3C</li><li>Tony Stewart, Rivcom</li><li>Matt Timmermans, Microstar</li><li>Jim Trezzo, Oracle Corp.</li><li>Steph Tryphonas, Microstar</li></ul><p>The lists given above pertain to the first edition.
|
|
At the time work on this second edition was completed,
|
|
the membership of the Working Group was:</p><ul><li>Leonid Arbouzov, Sun Microsystems</li><li>Jim Barnette, Defense Information Systems Agency (DISA)</li><li>Paul V. Biron, Health Level Seven</li><li>Allen Brown, Microsoft</li><li>Charles E. Campbell, Invited expert</li><li>Peter Chen, Invited expert</li><li>Tony Cincotta, NIST</li><li>David Ezell, National Association of Convenience Stores</li><li>Matthew Fuchs, Invited expert</li><li>Sandy Gao, IBM</li><li>Andrew Goodchild, Distributed Systems Technology Centre (DSTC Pty Ltd)</li><li>Xan Gregg, Invited expert</li><li>Mary Holstege, Mark Logic</li><li>Mario Jeckle, DaimlerChrysler</li><li>Marcel Jemio, Data Interchange Standards Association</li><li>Kohsuke Kawaguchi, Sun Microsystems</li><li>Ashok Malhotra, Invited expert</li><li>Lisa Martin, IBM</li><li>Jim Melton, Oracle Corp</li><li>Noah Mendelsohn, IBM</li><li>Dave Peterson, Invited expert</li><li>Anli Shundi, TIBCO Extensibility</li><li>C. M. Sperberg-McQueen, W3C (<i>co-chair</i>) </li><li>Hoylen Sue, Distributed Systems Technology Centre (DSTC Pty Ltd)</li><li>Henry S. Thompson, University of Edinburgh</li><li>Asir S. Vedamuthu, webMethods, Inc</li><li>Priscilla Walmsley, Invited expert</li><li>Kongyi Zhou, Oracle Corp.</li></ul><p>
|
|
We note with sadness the accidental death of Mario Jeckle
|
|
shortly after the completion of work on this document.
|
|
In addition to those named above, several
|
|
people served on the Working Group during the development
|
|
of this second edition:
|
|
</p><ul><li>Oriol Carbo, University of Edinburgh</li><li>Tyng-Ruey Chuang, Academia Sinica</li><li>Joey Coyle, Health Level 7</li><li>Tim Ewald, DevelopMentor</li><li>Nelson Hung, Corel</li><li>Melanie Kudela, Uniform Code Council</li><li>Matthew MacKenzie, XML Global</li><li>Cliff Schmidt, Microsoft</li><li>John Stanton, Defense Information Systems Agency</li><li>John Tebbutt, NIST</li><li>Ross Thompson, Contivo</li><li>Scott Vorthmann, TIBCO Extensibility</li></ul></div></div></body></html>
|