ConceptioArchiveW3C TR
W3C TRopen access

xmlschema11 2

W3C · w3c_tr
W3C TR · Standards · License: Open Access
Open Source ↗
w3c, standard

W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes 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}

div.odiff-nsq-add { background-color: #DFDFDF; } div.odiff-nsq-del { display: none; background-color: #FFDFDF } div.idiff-nsq-del { display: none; text-decoration: line-through } div.odiff-nsq-chg { background-color: #DFDFDF } div.diff-nsq-off { }

span.odiff-nsq-add { background-color: #DFDFDF; } span.diff-nsq-add { background-color: #DFDFDF; } span.odiff-nsq-del { display: none; background-color: #FFDFDF } span.idiff-nsq-del { display: none; text-decoration: line-through } span.diff-nsq-del { display: none; background-color: #FFDFDF ; text-decoration: line-through } span.odiff-nsq-chg { background-color: #DFDFDF } span.diff-nsq-chg { background-color: #DFFFDF } span.diff-nsq-off { }

td.odiff-nsq-add { background-color: #DFDFDF; } td.odiff-nsq-del { display: none; background-color: #FFDFDF } td.odiff-nsq-chg { background-color: #DFDFDF } td.diff-nsq-off { }

table { width: 100%; } img { color: white; border: none } span.rfc2119 { font-variant: small-caps } span.nav { float: right} span.arrow { font-style: normal; font-weight: bold } span.enumval { font-style: italic; font-weight: bold }

code { font-family: monospace; font-size: 100%} span.propdef { font-weight: bold; font-family: monospace } span.termdef {color: #850021} div.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 } div.component {border: 2px solid black; margin-top: 1ex} span.propdef { font-weight: bold; font-family: monospace } div.ownDesc {margin-top: -2ex; margin-bottom: -2ex} a.compref {font-family: sans-serif; font-style: normal; color: black; text-decoration: none} 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.scHead { border: 4px double gray; border-bottom: 0px; text-align: center; margin-left: 1em; padding: .5em } 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.reprcompmulti, div.reprdep { border-top-width: 4px; border-top-style: double; border-top-color: #d3d3d3; padding: 4px ; margin: 0em} div.reprcomp {padding: 4px ; margin: 0em} div.reprHead { text-align: center; } div.mapSep { font-size: 50% ; clear: both} div.mapProp {clear: left; float: left; width: 5em; max-width: 12em; min-width: 5em } div.mapRepr { margin-left: 6.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.element-syntax-1 { font-family: monospace; margin: 0em; margin-top: 0em; margin-bottom: .5em } div.element-syntax { font-family: monospace; margin: 1em 0em; 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; margin-bottom: 0.6em; padding: 0em} div.exampleInner { background-color: #d5dee3; border-top-width: 4px; border-top-style: double; border-top-color: #d3d3d3; border-bottom-width: 4px; border-bottom-style: double; border-bottom-color: #d3d3d3; padding: 4px; margin: 0em } div.exampleWrapper { margin: 4px } div.exampleHeader { font-weight: bold; margin: 4px} table.restricts { margin-top: 1em; margin-bottom: 1em; margin-left: -2em} table.restricts th { margin-left: 0em } table.ubc td, table.ubc th { font-size: smaller } table.dtdemo th { text-align: center; background-color: #d5dee3} table.dtdemo pre { margin-left: 0em; margin-bottom: 0em} table.dtdemo td {background-color: #bedce6} table.scrap {margin: .5em; background-color: #f5dcb3} table.defset {background-color: #ffeedd } table.defset thead, table.diffed-defset thead { color: red; font-weight: bold } img { color: white; border: none } span.nav { float: right} span.arrow { font-style: normal; font-weight: bold } .shrink {font-size: 80% ; } .defset ul { margin-top: 0 ; margin-bottom: 0 ; } div.defset { margin: 4px ; border-width: 4px ; border-style: double ; border-color: gray ; } div.aux { background-color: #eeeeee ; color: #333333 ; } div.defset-head { font-weight: bold ; padding: 0.6em ; border-bottom-width: 4px ; border-bottom-style: double ; border-color: #cfcfcf ; } div.deftop {background-color: #d5dee3 ; margin-top: 1.5em; padding-bottom: 0.3em } div.defindent { margin-left: 1em ; margin-top: 0em ; margin-bottom: 0em ; } div.defargs { margin-left: 3em ; } div.prod { margin: 1em ; margin-left: 5em ; } .lhs { margin-left: -4em ; } table table, .defset table { margin: 0 ; border: 0 ; padding: 0 ; } .note { margin-left: 2em ; margin-top: 1em ; margin-bottom: 1em ; } div.issue { background-color: #d5bbbb} .giLabel, .pdName { margin-bottom: 0 ; font-weight: bold } .giDef, .pdDef { margin-left: 2.5em ; margin-top: 0}

dd > .giDef { margin-left: 0em; } dd > div.giDef > div.p { margin-left: 0em; margin-top: 0em; margin-bottom: 0em;}

div.pvlist { border: 4px double gray; margin-bottom: .5em; margin-left: 1em; padding: .5em; padding-right: 1em; padding-bottom: 1em } div.pvVal div.pvlist { border: 4px double gray; margin-top: 1.2em; margin-bottom: .5em; /* margin-left: -5em; */ margin-left: -1.3em; padding: .5em; padding-right: 1em; padding-bottom: 1em; } div.clnumber div.pvlist { border: 4px double gray; margin-bottom: .5em; margin-left: 1em; padding-top: .5em; text-indent: 0; padding-right: 1em; padding-bottom: 1em } div.mapRepr div.pvlist { border: 4px double gray; margin-top: .5em; margin-bottom: .5em; padding: .5em; padding-right: 1em; padding-bottom: 1em }

div.pvSep { font-size: 50% ; clear: both} div.pvProp {clear: left; float: left; width: 7em; max-width: 12em; min-width: 7em } div.pvVal { margin-left: 8em } div.pvpair { clear: both; padding: 0.3em; padding-right: 0; }

div.sfsScrap { border: 4px double gray; margin: 1em; padding: 0em; } div.sfsHead { margin: 4px; font-weight: bold } div.sfsBody { border-top-width: 4px; border-top-style: double; border-top-color: #d3d3d3; padding: 4px ; margin: 0em} div.ednote { display: block; margin: 1.33em 0; } a.scrapref { font-family: serif, sans-serif; }

/* Added 2008-01-30. Value may be tweaked, but whatever it is, * make it the same for these three different ways of saying * 'paragraph'. */ p, div.p, div.block { margin: 1em 0; } p.image-caption { margin-left: 2em; margin-right: 2em; margin-bottom: 3em; font-style: italic; }

var { /* color: green; */ color: navy; /* or perhaps try MediumBlue */ font-style: italic; font-weight: bold; }

table.blocknames, table.blocknames td, table.blocknames th { border-style: solid; border-width: thin; empty-cells: show; }

table.blocknames td, table.blocknames th { padding: 0.2em; } This version: http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/ Latest version: http://www.w3.org/TR/xmlschema11-2/ Previous version: http://www.w3.org/TR/2012/PR-xmlschema11-2-20120119/ Editors (Version 1.1): David Peterson, invited expert (SGML Works! <[email protected]> Shudi (Sandy) Gao 高殊镝, IBM <[email protected]> Ashok Malhotra, Oracle Corporation <[email protected]> C. M. Sperberg-McQueen, Black Mesa Technologies LLC <[email protected]> Henry S. Thompson, University of Edinburgh <[email protected]> Editors (Version 1.0): Paul V. Biron, Kaiser Permanente, for Health Level Seven <[email protected]> Ashok Malhotra, Oracle Corporation <[email protected]> Please refer to the errata See also translations This document is also available in these non-normative formats: XML XHTML with changes since version 1.0 marked XHTML with changes since previous Working Draft marked Independent copy of the schema for schema documents Independent copy of the DTD for schema documents List of translations Copyright W3C ® MIT ERCIM Keio liability trademark document use XML Schema: Datatypes 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 W3C technical reports index This W3C Recommendation specifies the W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes. It is here made available for review by W3C members and the public. Changes since the previous public Working Draft include the following: Some minor errors, typographic and otherwise, have been corrected. For those primarily interested in the changes since version 1.0, the appendix Changes since version 1.0 (§I) Comments on this document should be made in W3C's public installation of Bugzilla, specifying "XML Schema" as the product. Instructions can be found at http://www.w3.org/XML/2006/01/public-bugzilla [email protected] archive This document has been reviewed by W3C Members, by software developers, and by other W3C groups and interested parties, and is endorsed by the Director as a W3C Recommendation. It is a stable document and may be used as reference material or cited from another document. W3C's role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web. An implementation report The W3C XML Schema Working Group intends to process comments made about this recommendation, with any approved changes being handled as errata to be published separately. This document has been produced by the W3C XML Schema Working Group XML Activity Requirements for XML Schema 1.1 This document was produced by a group operating under the 5 February 2004 W3C Patent Policy public list of any patent disclosures Essential Claim(s) section 6 of the W3C Patent Policy The English version of this specification is the only normative version. Information about translations of this document is available at http://www.w3.org/2003/03/Translations/byTechnology?technology=xmlschema 1 Introduction Introduction to Version 1.1 Purpose Dependencies on Other Specifications Requirements Scope Terminology Constraints and Contributions Datatype System Datatype Value space Identity Equality Order The Lexical Space and Lexical Mapping Canonical Mapping Datatype Distinctions Atomic vs. List vs. Union Datatypes Special vs. Primitive vs. Ordinary Datatypes Definition, Derivation, Restriction, and Construction Built-in vs. User-Defined Datatypes Built-in Datatypes and Their Definitions Namespace considerations Special Built-in Datatypes anySimpleType anyAtomicType Primitive Datatypes string boolean decimal float double duration dateTime time date gYearMonth gYear gMonthDay gDay gMonth hexBinary base64Binary anyURI QName NOTATION Other Built-in Datatypes normalizedString token language NMTOKEN NMTOKENS Name NCName ID IDREF IDREFS ENTITY ENTITIES integer nonPositiveInteger negativeInteger long int short byte nonNegativeInteger unsignedLong unsignedInt unsignedShort unsignedByte positiveInteger yearMonthDuration dayTimeDuration dateTimeStamp Datatype components Simple Type Definition The Simple Type Definition Schema Component XML Representation of Simple Type Definition Schema Components Constraints on XML Representation of Simple Type Definition Simple Type Definition Validation Rules Constraints on Simple Type Definition Schema Components Built-in Simple Type Definitions Fundamental Facets ordered bounded cardinality numeric Constraining Facets length minLength maxLength pattern enumeration whiteSpace maxInclusive maxExclusive minExclusive minInclusive totalDigits fractionDigits Assertions explicitTimezone Conformance Host Languages Independent implementations Conformance of data Partial Implementation of Infinite Datatypes A Schema for Schema Documents (Datatypes) (normative) DTD for Datatype Definitions (non-normative) Illustrative XML representations for the built-in simple type definitions Illustrative XML representations for the built-in primitive type definitions Illustrative XML representations for the built-in ordinary type definitions Built-up Value Spaces Numerical Values Exact Lexical Mappings Date/time Values The Seven-property Model Lexical Mappings Function Definitions Generic Number-related Functions Duration-related Definitions Date/time-related Definitions Normalization of property values Auxiliary Functions Adding durations to dateTimes Time on timeline Lexical mappings Canonical Mappings Lexical and Canonical Mappings for Other Datatypes Lexical and canonical mappings for Datatypes and Facets Fundamental Facets Regular Expressions Regular expressions and branches Pieces, atoms, quantifiers Characters and metacharacters Character Classes Character class expressions Character Class Escapes Implementation-defined and implementation-dependent features (normative) Implementation-defined features Implementation-dependent features Changes since version 1.0 Datatypes and Facets Numerical Datatypes Date/time Datatypes Other changes Glossary (non-normative) References Normative Non-normative Acknowledgements (non-normative) The Working Group has two main goals for this version of W3C XML Schema: Significant improvements in simplicity of design and clarity of exposition without or Provision of support for versioning of XML languages defined using the XML Schema specification, including the XML transfer syntax for schemas itself. These goals are slightly in tension with one another -- the following summarizes the Working Group's strategic guidelines for changes between versions 1.0 and 1.1: Add support for versioning (acknowledging that this may Allow bug fixes (unless in specific cases we decide that the fix is too disruptive for a point release) Allow editorial changes Allow design cleanup to change behavior in edge cases Allow relatively non-disruptive changes to type hierarchy (to better support current and forthcoming international standards and W3C recommendations) Allow design cleanup to change component structure (changes to functionality restricted to edge cases) Do not allow any significant changes in functionality Do not allow any changes to XML transfer syntax except those required by version control hooks and bug fixes The overall aim as regards compatibility is that All schema documents conformant to version 1.0 of this specification should also conform to version 1.1, and should have the same validation behavior across 1.0 and 1.1 implementations (except possibly in edge cases and in the details of the resulting PSVI); The vast majority of schema documents conformant to version 1.1 of this specification should also conform to version 1.0, leaving aside any incompatibilities arising from support for versioning, and when they are conformant to version 1.0 (or are made conformant by the removal of versioning information), should have the same validation behavior across 1.0 and 1.1 implementations (again except possibly in edge cases and in the details of the resulting PSVI); The [XML] documents data 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. Data oriented Document oriented <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> <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:[email protected]</email> or call <phone>555-9876</phone> </body> </memo> 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. 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. Other specifications on which this one depends are listed in References (§K) This specification defines some datatypes which depend on definitions in [XML] [Namespaces in XML] [XML 1.0] [Namespaces in XML 1.0] [XML] [Namespaces in XML] · · Conforming implementations of this specification may provide either the 1.1-based datatypes or the 1.0-based datatypes, or both. If both are supported, the choice of which datatypes to use in a particular assessment episode should Note: may should This specification makes use of the EBNF notation used in the [XML] Regular Expressions (§G) Section 6. Notation [XML] The [XML Schema Requirements] provide for primitive data typing, including byte, date, integer, sequence, SQL and Java primitive datatypes, etc.; define a type system that is adequate for import/export from database systems (e.g., relational, object, OLAP); distinguish requirements relating to lexical data representation vs. those governing an underlying information set; 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). This specification defines datatypes that can be used in an XML Schema.  These datatypes can be specified for element content that would be specified as #PCDATA various types [XSL] [RDF Schema] 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: [Definition:] A feature of this specification included solely to ensure that schemas which use this feature remain compatible with [XML] [Definition:] match (Of strings or names:) (Of strings and rules in the grammar:) [Definition:] may Schemas, schema documents, and processors are permitted to but need not behave as described. [Definition:] should It is recommended that schemas, schema documents, and processors behave as described, but there can be valid reasons for them not to; it is important that the full implications be understood and carefully weighed before adopting behavior at variance with the recommendation. [Definition:] must (Of schemas and schema documents:) · · (Of processors:) [Definition:] must not Schemas, schema documents and processors are forbidden to behave as described; schemas and documents which nevertheless do so are in · · [Definition:] error A failure of a schema or schema document to conform to the rules of this specification. Except as otherwise specified, processors must must · · · · Note: [Definition:] user option A choice left under the control of the user of a processor, rather than being fixed for all users or uses of the processor. Statements in this specification that "Processors may may must not must Note: Note: 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: [Definition:] Constraint on Schemas Constraints on the schema components themselves, i.e. conditions components must Datatype components (§4) [Definition:] Schema Representation Constraint Constraints on the representation of schema components in XML.  Some but not all of these are expressed in Schema for Schema Documents (Datatypes) (normative) (§A) DTD for Datatype Definitions (non-normative) (§B) [Definition:] Validation Rule Constraints expressed by schema components which information items must Datatype components (§4) This section describes the conceptual framework behind the datatype system defined in this specification.  The framework has been influenced by the [ISO 11404] [SQL] The datatypes discussed in this specification are for the most part well known abstract concepts such as integer date Note: float [IEEE 754-2008] language anyURI [Definition:] datatype A · · A · · · · A small collection of functions, relations, and procedures · · · · · · · · Note: Along with the · · · · · · QName NOTATION · · Note: · · · · · · · · · · · · · · · · · · The · · · · · · · · · · · · · · Note: The distinction between "datatype" and "simple type definition", by contrast, carries more information: the datatype is characterized by its · · · · · · · · · · 2.2.1 Identity Equality Order [Definition:] value space of a datatype · · · · · · · · · · The value spaces of datatypes are abstractions, and are defined in Built-in Datatypes and Their Definitions (§3) Note: The value spaces and the values therein are abstractions. In addition, other applications are expected to define additional appropriate operations and/or relations on these value spaces (e.g., addition and multiplication on the various numerical datatypes' value spaces), and are permitted where appropriate to even redefine the operations and relations defined within this specification, provided that for schema processing the relations and operations used are those defined herein The · · defined elsewhere axiomatically from fundamental notions (intensional definition) [see · · enumerated outright from values of an already defined datatype (extensional definition) [see · · defined by restricting the · · · · defined as a combination of values from one or more already defined · · · · · · The relations of identity equality The identity relation is always defined. Every value space inherently has an identity relation. Two things are identical Note: internal In the identity relation defined herein, values from different · · · · two decimal two float · · · · WARNING: · · 0.1 0.10000000009 float decimal Note: · · · · · · · · · · +2 decimal +2 integer +2 byte Given a list A B A B A B A B Note: · · decimal · · string Each · · On the other hand, equality need not cover the entire value space of the datatype (though it usually does). In particular, NaN is not equal to itself in the float double This equality relation is used in conjunction with identity when making · · enumeration [XSD 1.1 Part 1: Structures] · · processing XPath expressions assessment · · · · [XPath 2.0] Note: For example, the float were For another example, the dateTime · · · · equal identical In the equality relation defined herein, values from different primitive data spaces are made artificially unequal even if they might otherwise be considered equal.  For example, there is a number two decimal two float Two lists A B V1 V2 V1 V2 For the purposes of this specification, there is one equality relation for all values of all datatypes (the union of the various datatype's individual equalities, if one consider relations to be sets of ordered pairs).  The equality x y x y identity For some datatypes, an order relation is prescribed for use in checking upper and lower bounds of the · · partial · · incomparable · · [Definition:] incomparable · · comparable The order relation is used in conjunction with equality when making · · processing XPath expressions assessment · · · · [XPath 2.0] In this specification, this less-than order relation is denoted by '<' (and its inverse by '>'), the weak order by '≤' (and its inverse by '≥'), and the resulting · · x y x y x y x y x y Note: and one can tell which duration not · · duration duration (§3.3.6) For purposes of this specification, the value spaces of primitive datatypes are disjoint, even in cases where the abstractions they represent might be thought of as having values in common.  In the order relations defined in this specification, values from different value spaces are · · Note: · · When made for purposes of checking an enumeration constraint, such a comparison is not in itself an error, but since no two values from different · · · · · · Specifying an upper or lower bound which is of the wrong primitive datatype (and therefore · · · · must · · · · Comparison of · · [XQuery 1.0 and XPath 2.0 Functions and Operators] [Definition:] lexical mapping · · · · [Definition:] lexical space · · [Definition:] · · lexical representations Note: · · · · · · · · · · · · · · For the · · · · · · · · onto into · · · · · · · · For · · · · · · · · · · · · · · [Definition:] · · · · · · literal · · If a derivation introduces a · · whiteSpace · · · · · · · · · · · · Note: assessment · · whiteSpace · · · · assessment · · · · Should a derivation be made using a derivation mechanism that removes · · · · · · · · Note: pattern · · · · Conversely, should a derivation remove values then their · · · · · · Note: For example, '100' and '1.0E2' are two different · · float · · · · While the datatypes defined in this specification often have a single · · · · · · · · · · float [Definition:] canonical mapping · · · · · · · · · · · · [Definition:] canonical representation · · · · · · · · · · · · · · Note: · · A conforming schema processor implementation is not required to implement · · 2.4.1 Atomic vs. List vs. Union Datatypes Atomic Datatypes List Datatypes Union datatypes Special vs. Primitive vs. Ordinary Datatypes Facet-based Restriction Construction by List Construction by Union Definition, Derivation, Restriction, and Construction Built-in vs. User-Defined Datatypes It is useful to categorize the datatypes defined in this specification along various dimensions, defining terms which can be used to characterize datatypes and the Simple Type Definition First, we distinguish · · · · · · [Definition:] atomic value [Definition:] Atomic · · · · Atomic anyAtomicType · · [Definition:] List · · · · · · · · · · list Note: The Simple Type Definition Schema Component (§4.1.1) · · may · · · · · · · · · · · · · · · · · · · · · · must not [Definition:] Union · · · · · · · · · · · · · · · · Note: The Simple Type Definition Schema Component (§4.1.1) · · · · may · · · · · · · · · · · · · · For example, a single token which · · Nmtoken [XML] · · NMTOKEN · · NMTOKENS An · · · · Note: The · · · · · · There is one · · · · anyAtomicType · · · · anyAtomicType · · · · · · · · · · · · · · · · may anyAtomicType · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · [Definition:] · · · · · · item type · · · · · · · · must · · Example <simpleType name='sizes'> <list itemType='decimal'/> </simpleType> <cerealSizes xsi:type='sizes'> 8 10.5 12 </cerealSizes> A · · · · · · · · · · string anyURI · · {member type definitions} · · · · · · · · · · · · · · · · · · Example <simpleType name='listOfString'> <list itemType='string'/> </simpleType> <someElement xsi:type='listOfString'> this is not list item 1 this is not list item 2 this is not list item 3 </someElement> In the above example, the value of the someElement · · · · · · · · When a datatype is · · · · · · · · · · · · · · · · · · · · · · For each of · · · · · · length · · collapse For · · · · · · · · · · · · · · · · · · · · · · · · assertions · · V1 V2 V1 V2 Example <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> The · · · · · · · · · · Union types may be defined in either of two ways. When a union type is · · · · · · · · · · · · · · · · · · It will be observed that the · · · · · · [XSD 1.1 Part 1: Structures] xsi:type xsi:type · · When a union type is defined by · · · · · · · · · · · · · · · · · · · · · · · · · · · · Example A prototypical example of a · · maxOccurs attribute element element <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> Any number (zero or more)

of ordinary or · · · · · · [Definition:] · · member types · · Note: Datatype components (§4) {member type definitions} [Definition:] transitive membership · · · · · · U · · · · U T1 T2 T1 U T2 · · T1 T2 U The · · · · must not · · · · · · · · [Definition:] · · · · U · · basic members U [Definition:] M · · · · U U · · · · · · U · · M · · · · intervene M U U M intervening unions M · · U intervening unions [Definition:] · · active member type [Definition:] · · · · its its · · · · · · active basic member The order in which the · · QName memberTypes · · xsi:type Example For example, given the definition below, the first instance of the <size> element validates correctly as an integer (§3.4.13) string (§3.3.1) <xs:element name='size'> <xs:simpleType> <xs:union> <xs:simpleType> <xs:restriction base='integer'/> </xs:simpleType> <xs:simpleType> <xs:restriction base='string'/> </xs:simpleType> </xs:union> </xs:simpleType> </xs:element> <size>1</size> <size>large</size> <size xsi:type='xs:string'>1</size> The · · · · · · · · · · When a datatype is · · · · · · · · · · · · · · Next, we distinguish · · · · · · · · [Definition:] special anySimpleType anyAtomicType [Definition:] Primitive · · ab initio · · anyAtomicType · · · · · · · · anyAtomicType · · Note: must · · Processors may [Precision Decimal] [Definition:] Ordinary · · · · · · Simple Type Definition · · For example, in this specification, float · · integer · · decimal [Definition:] facet-based restriction · · · · · · · · · · · · · · must · · · · A · · · · · · · · · · · · anySimpleType · · · · · · · · · · · · anySimpleType · · · · · · One datatype can be · · · · · · · · · · anySimpleType · · · · · · · · · · · · anySimpleType · · · · · · Definition, derivation, restriction, and construction are conceptually distinct, although in practice they are frequently performed by the same mechanisms. By 'definition' is meant the explicit identification of the relevant properties of a datatype, in particular its · · · · · · The properties of the · · · · Simple Type Definition define Note: · · · · [Precision Decimal] For all other datatypes, a Simple Type Definition · · Simple Type Definition · · · · · · · · By 'derivation' is meant the relation of a datatype to its · · · · · · anySimpleType base type Base types · · · · · · [Definition:] T immediately derived X X · · T Note: Simple Type Definition anySimpleType {base type definition} anyType More generally, R derived B B · · R There is some datatype X X · · R X B A datatype must not · · It is a consequence of the above that every datatype other than anySimpleType · · anySimpleType Since each datatype has exactly one · · anySimpleType · · anySimpleType · · derivation hierarchy By 'restriction' is meant the definition of a datatype whose · · · · · · Formally, R restriction B the · · R · · B the · · R · · B Note that all three forms of datatype · · · · · · · · · · · · · · · · · · anySimpleType · · · · anySimpleType · · · · · · By 'construction' is meant the creation of a datatype by defining it in terms of another. [Definition:] · · constructed · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · Simple Type Definition · · · · · · · · · · · · · · · · · · [Definition:] Built-in · · · · · · [Definition:] User-defined The · · [XSD 1.1 Part 1: Structures] · · should may Note: · · · · · · every The mechanism for making · · · · must [Definition:] unknown Note: · · 1 An error has been made in giving the name of the datatype. 2 The datatype is a · · 3 The datatype is an · · · · 4 The datatype is an · · · · 5 The datatype is a · · · · · · Note: [XSD 1.1 Part 1: Structures] · · absent Conceptually there is no difference between the · · · · · · · · · · · · Diagram showing the derivation relations in the built-in type hierarchy. (A long description of the diagram Each built-in datatype defined in this specification can be uniquely addressed via a URI Reference constructed as follows: the base URI is the URI of the XML Schema namespace the fragment identifier is the name of the datatype For example, to address the int http://www.w3.org/2001/XMLSchema#int Additionally, each facet definition element can be uniquely addressed via a URI constructed as follows: the base URI is the URI of the XML Schema namespace 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 Simple Type Definition the base URI is the URI of the XML Schema namespace the fragment identifier is the name of the Simple Type Definition . 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 The · · · · http://www.w3.org/2001/XMLSchema 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 · · http://www.w3.org/2001/XMLSchema-datatypes Each · · XML Representation of Schemas [XSD 1.1 Part 1: Structures] 3.2.1 anySimpleType Value space Lexical mapping Facets anyAtomicType Value space Lexical mapping Facets The two datatypes at the root of the hierarchy of simple types are anySimpleType anyAtomicType anySimpleType · · anyType · · anySimpleType · · · · · · For further details of anySimpleType Simple Type Definition Built-in Simple Type Definitions (§4.1.6) The · · anySimpleType · · · · Note: · · · · · · · · · · · · · · · · · · The · · anySimpleType character [XML] · · Char [XML] · · · · · · It is · · Char [XML] [XML 1.0] Dependencies on Other Specifications (§1.3) The · · anySimpleType · · · · · · · · [XSD 1.1 Part 1: Structures] xsi:type xsi:type · · When a new datatype is defined by · · anySimpleType must not · · · · anySimpleType [Definition:] anyAtomicType · · anySimpleType · · · · anyAtomicType · · · · · · anyAtomicType · · For further details of anyAtomicType Simple Type Definition Built-in Simple Type Definitions (§4.1.6) The · · anyAtomicType · · · · · · · · The · · anyAtomicType character [XML] · · Char [XML] · · · · It is · · Char [XML] [XML 1.0] Dependencies on Other Specifications (§1.3) The · · anyAtomicType · · · · · · · · [XSD 1.1 Part 1: Structures] xsi:type xsi:type · · When a new datatype is defined by · · anyAtomicType must not · · · · anyAtomicType 3.3.1 string Value Space Lexical Mapping Facets Derived datatypes boolean Value Space Lexical Mapping Facets decimal Lexical Mapping Facets Datatypes based on decimal float Value Space Lexical Mapping Facets double Value Space Lexical Mapping Facets duration Value Space Lexical Mapping Facets Related Datatypes dateTime Value Space Lexical Mapping Facets Related Datatypes time Value Space Lexical Mappings Facets date Value Space Lexical Mapping Facets gYearMonth Value Space Lexical Mapping Facets gYear Value Space Lexical Mapping Facets gMonthDay Value Space Lexical Mapping Facets gDay Value Space Lexical Mapping Facets gMonth Value Space Lexical Mapping Facets hexBinary Value Space Lexical Mapping Facets base64Binary Value Space Lexical Mapping Facets anyURI Value Space Lexical Mapping Facets QName Facets NOTATION Facets The · · · · · · Regular Expressions (§G) · · · · Conforming processors must · · · · · · Note: may [Precision Decimal] [Definition:] string Note: [Ruby] Overriding the bidirectional algorithm: the BDO element [HTML 4.01] string Any Element, Any Attribute [XML Schema Language: Part 0 Primer] The · · string character [XML] · · Char [XML] character character It is · · Char [XML] [XML 1.0] Dependencies on Other Specifications (§1.3) Equality for string Note: ordered · · The · · string character [XML] · · Char [XML] Lexical Space [1] stringRep Char /* (as defined in [XML] It is · · Char [XML] [XML 1.0] Dependencies on Other Specifications (§1.3) The · · string · · · · · · The string · · may whiteSpace = preserve Datatypes derived by restriction from string may · · length minLength maxLength pattern enumeration assertions The string · · ordered false bounded false cardinality countably infinite numeric false The following · · · · string normalizedString [Definition:] boolean boolean · · true false boolean · · Lexical Space [2] booleanRep true false 1 0 The · · boolean · · · · · · The boolean · · fixed must not whiteSpace = collapse Datatypes derived by restriction from boolean may · · pattern assertions The boolean · · ordered false bounded false cardinality finite numeric false [Definition:] decimal · · decimal i n i n n decimal Note: [Precision Decimal] decimal -1.23 12678967.543233 +100000.00 210 The decimal [3] decimalLexicalRep decimalPtNumeral noDecimalPtNumeral The lexical space of decimal is the set of lexical representations which match the grammar given above, or (equivalently) the regular expression (\+|-)?([0-9]+(\.[0-9]*)?|\.[0-9]+) The mapping from lexical representations to values is the usual one for decimal numerals; it is given formally in · · The definition of the · · Lexical Mapping (§3.3.3.1) must The mapping from values to · · · · The decimal · · fixed must not whiteSpace = collapse Datatypes derived by restriction from decimal may · · totalDigits fractionDigits pattern enumeration maxInclusive maxExclusive minInclusive minExclusive assertions The decimal · · ordered total bounded false cardinality countably infinite numeric true The following · · · · decimal integer [Definition:] float [IEEE 754-2008] The · · float m e m 24 e · · float · · positiveZero negativeZero positiveInfinity negativeInfinity notANumber Note: · · float notANumber NaN positiveInfinity negativeInfinity positiveZero negativeZero Equality and order for float Equality is identity, except that  0 = −0  (although they are not identical) and  NaN ≠ NaN  (although NaN is of course identical to itself). 0 and −0 are thus equivalent for purposes of enumerations and identity constraints, as well as for minimum and maximum values. For the basic values, the order relation on float is the order relation for rational numbers.  INF is greater than all other non-NaN values; −INF is less than all other non-NaN values.  NaN is · · · · Note: · · · · · · · · · · · · float · · · · · · NaN Note: [IEEE 754-2008] The · · float · · INF +INF -INF NaN Lexical Space [4] floatRep noDecimalPtNumeral decimalPtNumeral scientificNotationNumeral numericalSpecialRep floatRep (\+|-)?([0-9]+(\.[0-9]*)?|\.[0-9]+)([Ee](\+|-)?[0-9]+)? The float [IEEE 754-2008] · · · · · · · · · · [IEEE 754-2008] INF NaN · · Since IEEE allows some variation in rounding of values, processors conforming to this specification may exhibit some variation in their · · The · · · · · · [Clinger, WD (1990)] Note: [Clinger, WD (1990)] The · · · · · · [IEEE 754-2008] The float · · fixed must not whiteSpace = collapse Datatypes derived by restriction from float may · · pattern enumeration maxInclusive maxExclusive minInclusive minExclusive assertions The float · · ordered partial bounded true cardinality finite numeric true [Definition:] double [IEEE 754-2008] Note: The · · double m e m 53 e · · double · · positiveZero negativeZero positiveInfinity negativeInfinity notANumber Note: · · double notANumber NaN positiveInfinity negativeInfinity positiveZero negativeZero Equality and order for double Equality is identity, except that  0 = −0  (although they are not identical) and  NaN ≠ NaN  (although NaN is of course identical to itself). 0 and −0 are thus equivalent for purposes of enumerations, identity constraints, and minimum and maximum values. For the basic values, the order relation on double is the order relation for rational numbers.  INF is greater than all other non-NaN values; −INF is less than all other non-NaN values.  NaN is · · · · Note: · · · · · · · · · · · · double · · · · · · NaN Note: [IEEE 754-2008] The · · double · · INF +INF -INF NaN Lexical Space [5] doubleRep noDecimalPtNumeral decimalPtNumeral scientificNotationNumeral numericalSpecialRep doubleRep (\+|-)?([0-9]+(\.[0-9]*)?|\.[0-9]+)([Ee](\+|-)?[0-9]+)? |(\+|-)?INF|NaN The double [IEEE 754-2008] · · · · · · · · · · [IEEE 754-2008] INF NaN · · Since IEEE allows some variation in rounding of values, processors conforming to this specification may exhibit some variation in their · · The · · · · · · [Clinger, WD (1990)] Note: [Clinger, WD (1990)] The · · · · · · [IEEE 754-2008] The double · · fixed must not whiteSpace = collapse Datatypes derived by restriction from double may · · pattern enumeration maxInclusive maxExclusive minInclusive minExclusive assertions The double · · ordered partial bounded true cardinality finite numeric true [Definition:] duration [ISO 8601] durations without fixed endpoints duration P15D duration duration duration duration duration dateTime dateTime dateTime · · Duration values can be modelled as two-property tuples. Each value consists of an integer number of months and a decimal number of seconds. The · · must not · · must not · · Properties of duration · · integer · · a decimal must not · · must not · · duration duration dateTime duration dateTime duration duration dateTime 1696-09-01T00:00:00Z 1697-02-01T00:00:00Z 1903-03-01T00:00:00Z 1903-07-01T00:00:00Z dateTime duration · · Note: duration dateTime any dateTime duration ever any dateTime Under the definition just given, two duration Note: yearMonthDuration dayTimeDuration duration Other Built-in Datatypes (§3.4) Note: duration Note: Partial Implementation of Infinite Datatypes (§5.4) The · · duration P n n n n n n More precisely, the · · duration durationLexicalRep Lexical Representation Fragments [6] duYearFrag unsignedNoDecimalPtNumeral Y [7] duMonthFrag unsignedNoDecimalPtNumeral M [8] duDayFrag unsignedNoDecimalPtNumeral D [9] duHourFrag unsignedNoDecimalPtNumeral H [10] duMinuteFrag unsignedNoDecimalPtNumeral M [11] duSecondFrag unsignedNoDecimalPtNumeral unsignedDecimalPtNumeral S [12] duYearMonthFrag duYearFrag duMonthFrag duMonthFrag [13] duTimeFrag T duHourFrag duMinuteFrag duSecondFrag duMinuteFrag duSecondFrag duSecondFrag [14] duDayTimeFrag duDayFrag duTimeFrag duTimeFrag Lexical Representation [15] durationLexicalRep - P duYearMonthFrag duDayTimeFrag duDayTimeFrag Thus, a durationLexicalRep duYearFrag duMonthFrag duDayFrag duHourFrag duMinuteFrag duSecondFrag P T - The language accepted by the durationLexicalRep The expression -?P[0-9]+Y?([0-9]+M)?([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+(\.[0-9]+)?S)?)? The expression ' .*[YMDHS].* The expression ' .*[^T] T T T -?P( ( ( [0-9]+Y([0-9]+M)?([0-9]+D)? | ([0-9]+M)([0-9]+D)? | ([0-9]+D) ) (T ( ([0-9]+H)([0-9]+M)?([0-9]+(\.[0-9]+)?S)? | ([0-9]+M)([0-9]+(\.[0-9]+)?S)? | ([0-9]+(\.[0-9]+)?S) ) )? ) | (T ( ([0-9]+H)([0-9]+M)?([0-9]+(\.[0-9]+)?S)? | ([0-9]+M)([0-9]+(\.[0-9]+)?S)? | ([0-9]+(\.[0-9]+)?S) ) ) ) The · · duration · · · · duration · · The duration · · fixed must not whiteSpace = collapse Datatypes derived by restriction from duration may · · pattern enumeration maxInclusive maxExclusive minInclusive minExclusive assertions The duration · · ordered partial bounded false cardinality countably infinite numeric false The following · · · · duration yearMonthDuration dayTimeDuration dateTime dateTime date/timeSevenPropertyModel · · absent · · · · Note: · · · · In this version of this specification, two changes are made in order to agree with existing usage. First, · · · · · · [ISO 8601] Note that 1 BCE, 5 BCE, and so on (years 0000, -0004, etc. in the lexical representation defined here) are leap years in the proleptic Gregorian calendar used for the date/time datatypes defined here. Version 1.0 of this specification was unclear about the treatment of leap years before the common era. If existing schemas or data specify dates of 29 February for any years before the common era, then some values giving a date of 29 February which were valid under a plausible interpretation of XSD 1.0 will be invalid under this specification, and some which were invalid will be valid. With that possible exception, schemas and data valid under the old interpretation remain valid under the new. Constraint: Day-of-month Values The · · must · · · · · · · · · · Note: Partial Implementation of Infinite Datatypes (§5.4) · · · · Equality and order are as prescribed in The Seven-property Model (§D.2.1) dateTime · · Note: dateTime · · · · absent · · Although dateTime dateTime pattern Simple Type Definition ordered Note: dateTime · · identical · · · · The lexical representations for dateTime Lexical Space [16] dateTimeLexicalRep yearFrag - monthFrag - dayFrag T hourFrag : minuteFrag : secondFrag endOfDayFrag timezoneFrag Constraint: Constraint: Day-of-month Representations Within a dateTimeLexicalRep dayFrag must not 3 29 · · yearFrag 0 · · Subsequent ' - T : monthFrag dayFrag hourFrag minuteFrag · · · · · · · · secondFrag · · Alternatively, endOfDayFrag hourFrag minuteFrag minuteFrag timezoneFrag timezoneFrag Z 00:00 For example, 2002-10-10T12:00:00−05:00 (noon on 10 October 2002, Central Daylight Savings Time as well as Eastern Standard Time in the U.S.) is equal to 2002-10-10T17:00:00Z, five hours later than 2002-10-10T12:00:00Z. Note: [Timezones] timezoneFrag explicitTimezone [XQuery 1.0 and XPath 2.0 Functions and Operators] The dateTimeLexicalRep -?([1-9][0-9]{3,}|0[0-9]{3}) -(0[1-9]|1[0-2]) -(0[1-9]|[12][0-9]|3[01]) T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?|(24:00:00(\.0+)?)) (Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))? dateTimeLexicalRep dateTimeLexicalRep The · · dateTime · · · · · · The dateTime · · fixed must not whiteSpace = collapse The dateTime · · may explicitTimezone = optional Datatypes derived by restriction from dateTime may · · pattern enumeration maxInclusive maxExclusive minInclusive minExclusive assertions The dateTime · · ordered partial bounded false cardinality countably infinite numeric false The following · · · · dateTime dateTimeStamp time time date/timeSevenPropertyModel · · · · · · absent · · · · Note: Partial Implementation of Infinite Datatypes (§5.4) · · Equality and order are as prescribed in The Seven-property Model (§D.2.1) time · · A calendar (or "local time") day with a larger positive time zone offset begins earlier than the same calendar day with a smaller (or negative) time zone offset. Since the time zone offsets allowed spread over 28 hours, it is possible for the period denoted by a given calendar day with one time zone offset to be completely disjoint from the period denoted by the same calendar day with a different offset — the earlier day ends before the later one starts.  The moments in time represented by a single calendar day are spread over a 52-hour interval, from the beginning of the day in the +14:00 time zone offset to the end of that day in the −14:00 time zone offset. Note: time · · absent · · · · · · Some pairs of time 05:00:00-03:00 10:00:00+02:00 23:00:00-03:00 02:00:00Z the next day The lexical representations for time dateTime Lexical Space [17] timeLexicalRep hourFrag : minuteFrag : secondFrag endOfDayFrag timezoneFrag timeLexicalRep (([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?|(24:00:00(\.0+)?))(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))? timeLexicalRep timeLexicalRep The · · time · · · · · · Note: · · 00:00:00 24:00:00 · · · · · · The time · · fixed must not whiteSpace = collapse The time · · may explicitTimezone = optional Datatypes derived by restriction from time may · · pattern enumeration maxInclusive maxExclusive minInclusive minExclusive assertions The time · · ordered partial bounded false cardinality countably infinite numeric false [Definition:] date dateTime date date/timeSevenPropertyModel · · · · · · absent · · · · Constraint: Day-of-month Values The · · must · · · · · · · · · · Note: Partial Implementation of Infinite Datatypes (§5.4) · · Equality and order are as prescribed in The Seven-property Model (§D.2.1) Note: date date/timeSevenPropertyModel Some date date/timeSevenPropertyModel The lexical representations for date dateTime Lexical Space [18] dateLexicalRep yearFrag - monthFrag - dayFrag timezoneFrag Constraint: Constraint: Day-of-month Representations Within a dateLexicalRep dayFrag must not 3 29 · · dateLexicalRep -?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))? dateLexicalRep dateLexicalRep The · · date · · · · · · The date · · fixed must not whiteSpace = collapse The date · · may explicitTimezone = optional Datatypes derived by restriction from date may · · pattern enumeration maxInclusive maxExclusive minInclusive minExclusive assertions The date · · ordered partial bounded false cardinality countably infinite numeric false gYearMonth Note: gYearMonth date/timeSevenPropertyModel · · · · · · · · absent · · · · Note: Partial Implementation of Infinite Datatypes (§5.4) · · Equality and order are as prescribed in The Seven-property Model (§D.2.1) The lexical representations for gYearMonth dateTime Lexical Space [19] gYearMonthLexicalRep yearFrag - monthFrag timezoneFrag gYearMonthLexicalRep -?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))? The · · gYearMonth · · · · · · The gYearMonth · · fixed must not whiteSpace = collapse The gYearMonth · · may explicitTimezone = optional Datatypes derived by restriction from gYearMonth may · · pattern enumeration maxInclusive maxExclusive minInclusive minExclusive assertions The gYearMonth · · ordered partial bounded false cardinality countably infinite numeric false gYear Note: gYear date/timeSevenPropertyModel · · · · · · · · · · absent · · · · Note: Partial Implementation of Infinite Datatypes (§5.4) · · Equality and order are as prescribed in The Seven-property Model (§D.2.1) The lexical representations for gYear dateTime Lexical Space [20] gYearLexicalRep yearFrag timezoneFrag gYearLexicalRep -?([1-9][0-9]{3,}|0[0-9]{3})(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))? The · · gYear · · · · · · The gYear · · fixed must not whiteSpace = collapse The gYear · · may explicitTimezone = optional Datatypes derived by restriction from gYear may · · pattern enumeration maxInclusive maxExclusive minInclusive minExclusive assertions The gYear · · ordered partial bounded false cardinality countably infinite numeric false gMonthDay This datatype can be used, for example, to record birthdays; an instance of the datatype could be used to say that someone's birthday occurs on the 14th of September every year. Note: gMonthDay date/timeSevenPropertyModel · · · · · · · · absent · · · · Constraint: Day-of-month Values The · · must · · · · Equality and order are as prescribed in The Seven-property Model (§D.2.1) Note: gMonthDay · · date/timeSevenPropertyModel An example that shows the difference from version 1.0 (see Lexical Mapping (§3.3.12.2) A day is a calendar (or "local time") day offset from · · · · --12-12+13:00 < --12-12+11:00  (just as --12-12+12:00 has always been less than --12-12+11:00, but in version 1.0  --12-12+13:00 > --12-12+11:00 , since --12-12+13:00's "recoverable time zone offset" was −11:00) The lexical representations for gMonthDay dateTime Lexical Space [21] gMonthDayLexicalRep -- monthFrag - dayFrag timezoneFrag Constraint: Constraint: Day-of-month Representations Within a gMonthDayLexicalRep dayFrag must not 3 29 · · gMonthDayLexicalRep --(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))? gMonthDayLexicalRep gMonthDayLexicalRep The · · gMonthDay · · · · · · The gMonthDay · · fixed must not whiteSpace = collapse The gMonthDay · · may explicitTimezone = optional Datatypes derived by restriction from gMonthDay may · · pattern enumeration maxInclusive maxExclusive minInclusive minExclusive assertions The gMonthDay · · ordered partial bounded false cardinality countably infinite numeric false [Definition:] gDay all Note: gDay gDay gDay date/timeSevenPropertyModel · · · · · · · · · · absent · · · · · · must Equality and order are as prescribed in The Seven-property Model (§D.2.1) gDay · · · · Examples that may appear anomalous (see Lexical Mapping (§3.3.13.2) ---15 < ---16 , but  ---15−13:00 > ---16+13:00 ---15−11:00 = ---16+13:00 ---15−13:00 <> ---16 , because  ---15−13:00 > ---16+14:00  and ---15−13:00 < 16−14:00 Note: next The lexical representations for gDay dateTime Lexical Space [22] gDayLexicalRep --- dayFrag timezoneFrag gDayLexicalRep ---(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))? The · · gDay · · · · · · The gDay · · fixed must not whiteSpace = collapse The gDay · · may explicitTimezone = optional Datatypes derived by restriction from gDay may · · pattern enumeration maxInclusive maxExclusive minInclusive minExclusive assertions The gDay · · ordered partial bounded false cardinality countably infinite numeric false gMonth Note: gMonth date/timeSevenPropertyModel · · · · · · · · · · absent · · · · Equality and order are as prescribed in The Seven-property Model (§D.2.1) The lexical representations for gMonth dateTime Lexical Space [23] gMonthLexicalRep -- monthFrag timezoneFrag gMonthLexicalRep --(0[1-9]|1[0-2])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))? The · · gMonth · · · · · · The gMonth · · fixed must not whiteSpace = collapse The gMonth · · may explicitTimezone = optional Datatypes derived by restriction from gMonth may · · pattern enumeration maxInclusive maxExclusive minInclusive minExclusive assertions The gMonth · · ordered partial bounded false cardinality countably infinite numeric false [Definition:] hexBinary The · · hexBinary hexBinary · · 0FB7 · · More formally, the · · hexBinary hexBinary Lexical space of hexBinary [24] hexDigit 0-9a-fA-F [25] hexOctet hexDigit hexDigit [26] hexBinary hexOctet The set recognized by hexBinary ([0-9a-fA-F]{2})* The · · hexBinary · · The · · hexBinary · · The hexBinary · · fixed must not whiteSpace = collapse Datatypes derived by restriction from hexBinary may · · length minLength maxLength pattern enumeration assertions The hexBinary · · ordered false bounded false cardinality countably infinite numeric false [Definition:] base64Binary base64Binary [RFC 3548] [RFC 2045] The · · base64Binary The · · base64Binary [RFC 3548] a-z A-Z 0-9 For compatibility with older mail gateways, [RFC 2045] [RFC 3548] · · base64Binary must not The · · base64Binary · · base64Binary Lexical space of base64Binary [27] Base64Binary B64quad B64final [28] B64quad B64 B64 B64 B64 /* B64quad [29] B64final B64finalquad Padded16 Padded8 [30] B64finalquad B64 B64 B64 B64char /* B64finalquad [31] Padded16 B64 B64 B16 = /* Padded16 [32] Padded8 B64 B04 = = /* Padded8 [33] B64 B64char [34] B64char [35] B16 B16char [36] B16char /* Base64 characters whose bit-string value ends in '00' [37] B04 B04char [38] B04char /* Base64 characters whose bit-string value ends in '0000' The Base64Binary ((([A-Za-z0-9+/] ?){4})*(([A-Za-z0-9+/] ?){3}[A-Za-z0-9+/]|([A-Za-z0-9+/] ?){2}[AEIMQUYcgkosw048] ?=|[A-Za-z0-9+/] ?[AQgw] ?= ?=))? ? Note that this grammar requires the number of non-whitespace characters in the · · · · · · base64Binary The · · base64Binary [RFC 2045] [RFC 3548] Note: · · [RFC 2045] [RFC 3548] · · collapse before [RFC 3548] The canonical · · base64Binary Canonical representation of base64Binary [39] Canonical-base64Binary CanonicalQuad CanonicalPadded [40] CanonicalQuad B64char B64char B64char B64char [41] CanonicalPadded B64char B64char B16char = B64char B04char == That is, the · · base64Binary · · · · base64Binary [RFC 2045] [RFC 3548] Note: · · [RFC 2045] [RFC 3548] The length of a base64Binary · · lex2   := killwhitespace(lexform)    -- remove whitespace characters Note on encoding: [RFC 2045] [RFC 3548] base64Binary [XML] The base64Binary · · fixed must not whiteSpace = collapse Datatypes derived by restriction from base64Binary may · · length minLength maxLength pattern enumeration assertions The base64Binary · · ordered false bounded false cardinality countably infinite numeric false [Definition:] anyURI anyURI [RFC 3987] Note: anyURI [LEIRI] Mapping of IRIs to URIs [RFC 3987] anyURI [RFC 3986] The value space of anyURI character [XML] · · Char [XML] The · · anyURI character [XML] · · Char [XML] Note: anyURI [RFC 3987] [RFC 3986] [RFC 3987] [RFC 3986] Each URI scheme imposes specialized syntax rules for URIs in that scheme, including restrictions on the syntax of allowed fragment identifiers. Because it is impractical for processors to check that a value is a context-appropriate URI reference, neither the syntactic constraints defined by the definitions of individual schemes nor the generic syntactic constraints defined by [RFC 3987] [RFC 3986] anyURI Note: · · anyURI %20 The · · anyURI Note: The anyURI · · fixed must not whiteSpace = collapse Datatypes derived by restriction from anyURI may · · length minLength maxLength pattern enumeration assertions The anyURI · · ordered false bounded false cardinality countably infinite numeric false [Definition:] QName XML qualified names · · QName namespace name local part namespace name anyURI local part NCName · · QName · · QName [Namespaces in XML] It is · · QName [Namespaces in XML] [Namespaces in XML 1.0] Dependencies on Other Specifications (§1.3) The mapping from lexical space to value space for a particular QName · · When QName · · [in-scope namespaces] must The host language, whether XML-based or otherwise, may Note: [Namespaces in XML] Note: · · · · · · QName QName Because the lexical representations available for any value of type QName · · QName The QName · · fixed must not whiteSpace = collapse Datatypes derived by restriction from QName may · · length minLength maxLength pattern enumeration assertions The QName · · ordered false bounded false cardinality countably infinite numeric false [Definition:] NOTATION NOTATION [XML] · · NOTATION QName · · NOTATION notations QName Note: · · [XSD 1.1 Part 1: Structures] NOTATION The lexical mapping rules for NOTATION QName QName (§3.3.18) Schema Component Constraint: enumeration facet value required for NOTATION It is (with one exception) an · · NOTATION Datatype Valid (§4.1.4) · · NOTATION · · The exception is that in the · · · · may NOTATION QName QName NOTATION For compatibility (see Terminology (§1.6) NOTATION Note: NOTATION · · NOTATION The NOTATION · · fixed must not whiteSpace = collapse Datatypes derived by restriction from NOTATION may · · length minLength maxLength pattern enumeration assertions The NOTATION · · ordered false bounded false cardinality countably infinite numeric false The use of · · · · · · NOTATION · · NOTATION 3.4.1 normalizedString Facets Derived datatypes token Facets Derived datatypes language Facets NMTOKEN Facets Related datatypes NMTOKENS Facets Name Facets Derived datatypes NCName Facets Derived datatypes ID Facets IDREF Facets Related datatypes IDREFS Facets ENTITY Facets Related datatypes ENTITIES Facets integer Lexical representation Canonical representation Facets Derived datatypes nonPositiveInteger Lexical representation Canonical representation Facets Derived datatypes negativeInteger Lexical representation Canonical representation Facets long Lexical Representation Canonical Representation Facets Derived datatypes int Lexical Representation Canonical representation Facets Derived datatypes short Lexical representation Canonical representation Facets Derived datatypes byte Lexical representation Canonical representation Facets nonNegativeInteger Lexical representation Canonical representation Facets Derived datatypes unsignedLong Lexical representation Canonical representation Facets Derived datatypes unsignedInt Lexical representation Canonical representation Facets Derived datatypes unsignedShort Lexical representation Canonical representation Facets Derived datatypes unsignedByte Lexical representation Canonical representation Facets positiveInteger Lexical representation Canonical representation Facets yearMonthDuration The Lexical Mapping Facets dayTimeDuration The Lexical Space Facets dateTimeStamp The Lexical Space Facets This section gives conceptual definitions for all · · · · · · · · · · XML Representation of Simple Type Definition Schema Components (§4.1.2) · · · · Schema for Schema Documents (Datatypes) (normative) (§A) [Definition:] normalizedString · · normalizedString · · normalizedString · · normalizedString string The normalizedString · · may whiteSpace = replace Datatypes derived by restriction from normalizedString may · · length minLength maxLength pattern enumeration assertions The normalizedString · · ordered false bounded false cardinality countably infinite numeric false The following · · · · normalizedString token [Definition:] token · · token · · token · · token normalizedString The token · · may whiteSpace = collapse Datatypes derived by restriction from token may · · length minLength maxLength pattern enumeration assertions The token · · ordered false bounded false cardinality countably infinite numeric false The following · · · · token language NMTOKEN Name [Definition:] language [BCP 47] [RFC 4646] [RFC 4647] · · · · language [a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})* [RFC 3066] · · language token Note: [BCP 47] Note: [BCP 47] language string string MN mn [BCP 47] Note: · · language xml:lang [XML] One way to define the desired set of possible values is illustrated by the schema document for the XML namespace at http://www.w3.org/2001/xml.xsd xml:lang language <xs:attribute name="lang"> <xs:annotation> <xs:documentation> See RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the IANA registry at http://www.iana.org/assignments/lang-tag-apps.htm for further information.

The union allows for the 'un-declaration' of xml:lang with the empty string. </xs:documentation> </xs:annotation> <xs:simpleType> <xs:union memberTypes="xs:language"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value=""/> </xs:restriction> </xs:simpleType> </xs:union> </xs:simpleType> </xs:attribute> The language · · may pattern = [a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})* whiteSpace = collapse Datatypes derived by restriction from language may · · length minLength maxLength enumeration assertions The language · · ordered false bounded false cardinality countably infinite numeric false [Definition:] NMTOKEN NMTOKEN attribute type [XML] · · NMTOKEN · · Nmtoken [XML] · · NMTOKEN · · Nmtoken [XML] · · NMTOKEN token It is · · NMTOKEN [XML] [XML 1.0] Dependencies on Other Specifications (§1.3) For compatibility (see Terminology (§1.6) NMTOKEN The NMTOKEN · · may pattern = \c+ whiteSpace = collapse Datatypes derived by restriction from NMTOKEN may · · length minLength maxLength enumeration assertions The NMTOKEN · · ordered false bounded false cardinality countably infinite numeric false The following · · · · NMTOKEN NMTOKENS [Definition:] NMTOKENS NMTOKENS attribute type [XML] · · NMTOKENS · · · · NMTOKENS · · NMTOKEN · · NMTOKENS NMTOKEN NMTOKENS · anySimpleType · · · NMTOKEN · · NMTOKENS For compatibility (see Terminology (§1.6) NMTOKENS The NMTOKENS · · may minLength = 1 whiteSpace = collapse Datatypes derived by restriction from NMTOKENS may · · length maxLength enumeration pattern assertions The NMTOKENS · · ordered false bounded false cardinality countably infinite numeric false [Definition:] Name XML Names · · Name · · Name [XML] · · Name · · Name [XML] · · Name token It is · · Name [XML] [XML 1.0] Dependencies on Other Specifications (§1.3) The Name · · may pattern = \i\c* whiteSpace = collapse Datatypes derived by restriction from Name may · · length minLength maxLength enumeration assertions The Name · · ordered false bounded false cardinality countably infinite numeric false The following · · · · Name NCName [Definition:] NCName · · NCName · · NCName [Namespaces in XML] · · NCName · · NCName [Namespaces in XML] · · NCName Name It is · · NCName [Namespaces in XML] [Namespaces in XML 1.0] Dependencies on Other Specifications (§1.3) The NCName · · may pattern = \i\c* ∩ [\i-[:]][\c-[:]]* whiteSpace = collapse Datatypes derived by restriction from NCName may · · length minLength maxLength enumeration assertions The NCName · · ordered false bounded false cardinality countably infinite numeric false The following · · · · NCName ID IDREF ENTITY [Definition:] ID ID attribute type [XML] · · ID · · NCName [Namespaces in XML] · · ID · · NCName [Namespaces in XML] · · ID NCName Note: · · NCName [Namespaces in XML] [Namespaces in XML 1.0] Dependencies on Other Specifications (§1.3) For compatibility (see Terminology (§1.6) ID Note: ID [XSD 1.1 Part 1: Structures] Validation Rule: Validation Root Valid (ID/IDREF) [XSD 1.1 Part 1: Structures] The ID · · may pattern = \i\c* ∩ [\i-[:]][\c-[:]]* whiteSpace = collapse Datatypes derived by restriction from ID may · · length minLength maxLength enumeration assertions The ID · · ordered false bounded false cardinality countably infinite numeric false [Definition:] IDREF IDREF attribute type [XML] · · IDREF · · NCName [Namespaces in XML] · · IDREF · · NCName [Namespaces in XML] · · IDREF NCName Note: · · NCName [Namespaces in XML] [Namespaces in XML 1.0] Dependencies on Other Specifications (§1.3) For compatibility (see Terminology (§1.6) Note: IDREF [XSD 1.1 Part 1: Structures] Validation Rule: Validation Root Valid (ID/IDREF) [XSD 1.1 Part 1: Structures] The IDREF · · may pattern = \i\c* ∩ [\i-[:]][\c-[:]]* whiteSpace = collapse Datatypes derived by restriction from IDREF may · · length minLength maxLength enumeration assertions The IDREF · · ordered false bounded false cardinality countably infinite numeric false The following · · · · IDREF IDREFS [Definition:] IDREFS IDREFS attribute type [XML] · · IDREFS IDREF · · IDREFS · · IDREF · · IDREFS IDREF IDREFS · anySimpleType · · · IDREF · · IDREFS For compatibility (see Terminology (§1.6) IDREFS Note: IDREFS [XSD 1.1 Part 1: Structures] Validation Rule: Validation Root Valid (ID/IDREF) [XSD 1.1 Part 1: Structures] The IDREFS · · may minLength = 1 whiteSpace = collapse Datatypes derived by restriction from IDREFS may · · length maxLength enumeration pattern assertions The IDREFS · · ordered false bounded false cardinality countably infinite numeric false [Definition:] ENTITY ENTITY [XML] · · ENTITY · · NCName [Namespaces in XML] unparsed entity document type definition · · ENTITY · · NCName [Namespaces in XML] · · ENTITY NCName Note: · · NCName [Namespaces in XML] [Namespaces in XML 1.0] Dependencies on Other Specifications (§1.3) Note: · · ENTITY For compatibility (see Terminology (§1.6) ENTITY The ENTITY · · may pattern = \i\c* ∩ [\i-[:]][\c-[:]]* whiteSpace = collapse Datatypes derived by restriction from ENTITY may · · length minLength maxLength enumeration assertions The ENTITY · · ordered false bounded false cardinality countably infinite numeric false The following · · · · ENTITY ENTITIES [Definition:] ENTITIES ENTITIES attribute type [XML] · · ENTITIES · · unparsed entities document type definition · · ENTITIES · · ENTITY · · ENTITIES ENTITY ENTITIES · anySimpleType · · · ENTITY · · ENTITIES Note: · · ENTITIES For compatibility (see Terminology (§1.6) ENTITIES The ENTITIES · · may minLength = 1 whiteSpace = collapse Datatypes derived by restriction from ENTITIES may · · length maxLength enumeration pattern assertions The ENTITIES · · ordered false bounded false cardinality countably infinite numeric false [Definition:] integer · · decimal · · · · integer · · integer decimal integer The · · integer Lexical representation (§3.4.13.1) The integer · · fixed must not fractionDigits = 0 whiteSpace = collapse The integer · · may pattern = [\-+]?[0-9]+ Datatypes derived by restriction from integer may · · totalDigits enumeration maxInclusive maxExclusive minInclusive minExclusive assertions The integer · · ordered total bounded false cardinality countably infinite numeric true The following · · · · integer nonPositiveInteger long nonNegativeInteger [Definition:] nonPositiveInteger · · integer · · · · nonPositiveInteger · · nonPositiveInteger integer nonPositiveInteger - must The · · nonPositiveInteger Lexical representation (§3.4.14.1) must The nonPositiveInteger · · fixed must not fractionDigits = 0 whiteSpace = collapse The nonPositiveInteger · · may pattern = [\-+]?[0-9]+ maxInclusive = 0 Datatypes derived by restriction from nonPositiveInteger may · · totalDigits enumeration maxExclusive minInclusive minExclusive assertions The nonPositiveInteger · · ordered total bounded false cardinality countably infinite numeric true The following · · · · nonPositiveInteger negativeInteger [Definition:] negativeInteger · · nonPositiveInteger · · · · negativeInteger · · negativeInteger nonPositiveInteger negativeInteger - must 0 The · · negativeInteger Lexical representation (§3.4.15.1) The negativeInteger · · fixed must not fractionDigits = 0 whiteSpace = collapse The negativeInteger · · may pattern = [\-+]?[0-9]+ maxInclusive = -1 Datatypes derived by restriction from negativeInteger may · · totalDigits enumeration maxExclusive minInclusive minExclusive assertions The negativeInteger · · ordered total bounded false cardinality countably infinite numeric true [Definition:] long · · integer · · · · · · long integer long The · · long Lexical Representation (§3.4.16.1) The long · · fixed must not fractionDigits = 0 whiteSpace = collapse The long · · may pattern = [\-+]?[0-9]+ maxInclusive = 9223372036854775807 minInclusive = -9223372036854775808 Datatypes derived by restriction from long may · · totalDigits enumeration maxExclusive minExclusive assertions The long · · ordered total bounded true cardinality finite numeric true The following · · · · long int [Definition:] int · · long · · · · · · int long int The · · int Lexical Representation (§3.4.17.1) The int · · fixed must not fractionDigits = 0 whiteSpace = collapse The int · · may pattern = [\-+]?[0-9]+ maxInclusive = 2147483647 minInclusive = -2147483648 Datatypes derived by restriction from int may · · totalDigits enumeration maxExclusive minExclusive assertions The int · · ordered total bounded true cardinality finite numeric true The following · · · · int short [Definition:] short · · int · · · · · · short int short The · · short Lexical representation (§3.4.18.1) The short · · fixed must not fractionDigits = 0 whiteSpace = collapse The short · · may pattern = [\-+]?[0-9]+ maxInclusive = 32767 minInclusive = -32768 Datatypes derived by restriction from short may · · totalDigits enumeration maxExclusive minExclusive assertions The short · · ordered total bounded true cardinality finite numeric true The following · · · · short byte [Definition:] byte · · short · · · · · · byte short byte The · · byte Lexical representation (§3.4.19.1) The byte · · fixed must not fractionDigits = 0 whiteSpace = collapse The byte · · may pattern = [\-+]?[0-9]+ maxInclusive = 127 minInclusive = -128 Datatypes derived by restriction from byte may · · totalDigits enumeration maxExclusive minExclusive assertions The byte · · ordered total bounded true cardinality finite numeric true [Definition:] nonNegativeInteger · · integer · · · · nonNegativeInteger · · nonNegativeInteger integer nonNegativeInteger + must + - The · · nonNegativeInteger Lexical representation (§3.4.20.1) The nonNegativeInteger · · fixed must not fractionDigits = 0 whiteSpace = collapse The nonNegativeInteger · · may pattern = [\-+]?[0-9]+ minInclusive = 0 Datatypes derived by restriction from nonNegativeInteger may · · totalDigits enumeration maxInclusive maxExclusive minExclusive assertions The nonNegativeInteger · · ordered total bounded false cardinality countably infinite numeric true The following · · · · nonNegativeInteger unsignedLong positiveInteger [Definition:] unsignedLong · · nonNegativeInteger · · · · unsignedLong nonNegativeInteger unsignedLong + must + + - The · · unsignedLong Lexical representation (§3.4.21.1) The unsignedLong · · fixed must not fractionDigits = 0 whiteSpace = collapse The unsignedLong · · may pattern = [\-+]?[0-9]+ maxInclusive = 18446744073709551615 minInclusive = 0 Datatypes derived by restriction from unsignedLong may · · totalDigits enumeration maxExclusive minExclusive assertions The unsignedLong · · ordered total bounded true cardinality finite numeric true The following · · · · unsignedLong unsignedInt [Definition:] unsignedInt · · unsignedLong · · · · unsignedInt unsignedLong unsignedInt + must + + - The · · unsignedInt Lexical representation (§3.4.22.1) The unsignedInt · · fixed must not fractionDigits = 0 whiteSpace = collapse The unsignedInt · · may pattern = [\-+]?[0-9]+ maxInclusive = 4294967295 minInclusive = 0 Datatypes derived by restriction from unsignedInt may · · totalDigits enumeration maxExclusive minExclusive assertions The unsignedInt · · ordered total bounded true cardinality finite numeric true The following · · · · unsignedInt unsignedShort [Definition:] unsignedShort · · unsignedInt · · · · unsignedShort unsignedInt unsignedShort + must + + - The · · unsignedShort Lexical representation (§3.4.23.1) The unsignedShort · · fixed must not fractionDigits = 0 whiteSpace = collapse The unsignedShort · · may pattern = [\-+]?[0-9]+ maxInclusive = 65535 minInclusive = 0 Datatypes derived by restriction from unsignedShort may · · totalDigits enumeration maxExclusive minExclusive assertions The unsignedShort · · ordered total bounded true cardinality finite numeric true The following · · · · unsignedShort unsignedByte [Definition:] unsignedByte · · unsignedShort · · · · unsignedByte unsignedShort unsignedByte + must + + - The · · unsignedByte Lexical representation (§3.4.24.1) The unsignedByte · · fixed must not fractionDigits = 0 whiteSpace = collapse The unsignedByte · · may pattern = [\-+]?[0-9]+ maxInclusive = 255 minInclusive = 0 Datatypes derived by restriction from unsignedByte may · · totalDigits enumeration maxExclusive minExclusive assertions The unsignedByte · · ordered total bounded true cardinality finite numeric true [Definition:] positiveInteger · · nonNegativeInteger · · · · positiveInteger · · positiveInteger nonNegativeInteger positiveInteger + must 0 The · · positiveInteger Lexical representation (§3.4.25.1) The positiveInteger · · fixed must not fractionDigits = 0 whiteSpace = collapse The positiveInteger · · may pattern = [\-+]?[0-9]+ minInclusive = 1 Datatypes derived by restriction from positiveInteger may · · totalDigits enumeration maxInclusive maxExclusive minExclusive assertions The positiveInteger · · ordered total bounded false cardinality countably infinite numeric true [Definition:] yearMonthDuration · · duration · · yearMonthDurationLexicalRep · · yearMonthDuration duration · · Note: · · yearMonthDuration duration yearMonthDuration integer yearMonthDuration The lexical space is reduced from that of duration duDayFrag duTimeFrag · · The yearMonthDuration [42] yearMonthDurationLexicalRep - P duYearMonthFrag The lexical space of yearMonthDuration -?P((([0-9]+Y)([0-9]+M)?)|([0-9]+M)) -?P[0-9]+(Y([0-9]+M)?|M) yearMonthDuration · · [^DT]* · · duration The · · duration · · yearMonthDuration Note: yearMonthDuration · · · · · · · · duration PT0S · · yearMonthDuration The yearMonthDuration · · fixed must not whiteSpace = collapse The yearMonthDuration · · may pattern = [^DT]* Datatypes derived by restriction from yearMonthDuration may · · enumeration maxInclusive maxExclusive minInclusive minExclusive assertions The yearMonthDuration · · ordered partial bounded false cardinality countably infinite numeric false Note: ordered partial ordered (§4.2.1) [Definition:] dayTimeDuration · · duration · · dayTimeDurationLexicalRep · · dayTimeDuration duration · · dayTimeDuration The lexical space is reduced from that of duration duYearFrag duMonthFrag · · The dayTimeDuration [43] dayTimeDurationLexicalRep - P duDayTimeFrag The lexical space of dayTimeDuration · · duration [^YM]*[DT].* The · · duration · · dayTimeDuration The dayTimeDuration · · fixed must not whiteSpace = collapse The dayTimeDuration · · may pattern = [^YM]*(T.*)? Datatypes derived by restriction from dayTimeDuration may · · enumeration maxInclusive maxExclusive minInclusive minExclusive assertions The dayTimeDuration · · ordered partial bounded false cardinality countably infinite numeric false Note: ordered partial ordered (§4.2.1) [Definition:] dateTimeStamp · · dateTime required explicitTimezone dateTimeStamp dateTimeStamp As a consequence of requiring an explicit time zone offset, the lexical space of dateTimeStamp dateTime timezoneFrag · · The dateTimeStamp [44] dateTimeStampLexicalRep yearFrag - monthFrag - dayFrag T hourFrag : minuteFrag : secondFrag endOfDayFrag timezoneFrag Constraint: Note: Day-of-month Representations (§3.3.7.2) dateTime In other words, the lexical space of dateTimeStamp · · dateTime .*(Z|(\+|-)[0-9][0-9]:[0-9][0-9]) The · · dateTime dateTimeStamp The · · dateTime dateTimeStamp The dateTimeStamp · · fixed must not whiteSpace = collapse explicitTimezone = required Datatypes derived by restriction from dateTimeStamp may · · pattern enumeration maxInclusive maxExclusive minInclusive minExclusive assertions The dateTimeStamp · · ordered partial bounded false cardinality countably infinite numeric false Note: ordered partial ordered (§4.2.1) The preceding sections of this specification have described datatypes in a way largely independent of their use in the particular context of schema-aware processing [XSD 1.1 Part 1: Structures] This section presents the mechanisms necessary to integrate datatypes into the context of [XSD 1.1 Part 1: Structures] schema component {target namespace} {final} [XSD 1.1 Part 1: Structures] 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 absent · · absent For more information on the notion of schema components, see Schema Component Details [XSD 1.1 Part 1: Structures] [Definition:] owner 4.1.1 The Simple Type Definition Schema Component XML Representation of Simple Type Definition Schema Components Constraints on XML Representation of Simple Type Definition Simple Type Definition Validation Rules Constraints on Simple Type Definition Schema Components Built-in Simple Type Definitions Simple Type Definitions provide for: In the case of · · In the case of · · Attaching a QName The Simple Type Definition schema component has the following properties: Schema Component: Simple Type Definition {annotations} A sequence of Annotation {name} An xs:NCName value. Optional. {target namespace} An xs:anyURI value. Optional. {final} A subset of { restriction extension list union } {context} Required if {name} absent must absent Either an Attribute Declaration Element Declaration Complex Type Definition Simple Type Definition {base type definition} A Type Definition With one exception, the {base type definition} Simple Type Definition Simple Type Definition · · anyType Complex Type Definition {base type definition} {facets} A set of Constraining Facet {fundamental facets} A set of Fundamental Facet {variety} One of { atomic list union Simple Type Definition · · absent {primitive type definition} A Simple Type Definition {variety} atomic must absent · · {primitive type definition} absent If not absent must · · {item type definition} A Simple Type Definition {variety} list must absent The value of this property must {variety} atomic {variety} union must not {variety} list {member type definitions} A sequence of primitive or ordinary Simple Type Definition Must may {variety} union must absent The sequence may contain any primitive or ordinary simple type definition, but must not Simple type definitions are identified by their {name} {target namespace} Simple Type Definition {name} Simple Type Definition must Simple Type Definition · · · · · · Simple Type Definition · · · · Simple Type Definition If {variety} · · · · · · {base type definition} · · {primitive type definition} {variety} · · · · · · {item type definition} {variety} · · · · · · Simple Type Definition {member type definitions} If {variety} · · {variety} {base type definition} must · · {base type definition} anySimpleType {variety} · · {variety} {item type definition} must · · · · {item type definition} · · · · must · · {variety} · · {member type definitions} must Simple Type Definition The {facets} · · · · · · The {fundamental facets} If {final} restriction list union Simple Type Definition · · · · · · extension Complex Type Definitions The {context} {item type definition} {base type definition} The XML representation for a Simple Type Definition <simpleType> XML Representation Summary simpleType <simpleType #all list union restriction extension ID NCName {any attributes with non-schema namespace . . .} Content: annotation restriction list union <restriction QName ID {any attributes with non-schema namespace . . .} Content: annotation simpleType minExclusive minInclusive maxExclusive maxInclusive totalDigits fractionDigits length minLength maxLength enumeration whiteSpace pattern assertion explicitTimezone {any with namespace: ##other} <list ID QName {any attributes with non-schema namespace . . .} Content: annotation simpleType <union ID QName {any attributes with non-schema namespace . . .} Content: annotation simpleType Simple Type Definition Schema Component Property Representation {name} The actual value name [attribute] <simpleType> absent {target namespace} The actual value targetNamespace [attribute] schema absent {base type definition} The appropriate case 1 If <restriction> then resolved actual value base [attribute] <restriction> <simpleType> [children] <restriction> 2 If <list> <union> then · · {final} A subset of { restriction extension list union } [Definition:] FS actual value final [attribute] actual value finalDefault [attribute] schema case 1 If · · then 2 If · · #all then { restriction extension list union } 3 otherwise · · restriction restriction extension list union {context} The appropriate case 1 If name [attribute] then absent 2 otherwise case 2.1 If <attribute> then Attribute Declaration 2.2 If <element> then Element Declaration 2.3 If <list> <union> then Simple Type Definition <simpleType> 2.4 otherwise <restriction> case 2.4.1 If <simpleType> then Simple Type Definition 2.4.2 otherwise <simpleContent> Simple Type Definition {content type} Complex Type Definition <complexType> {variety} If the <list> list <union> union <restriction> {variety} {base type definition} {facets} The appropriate case 1 If <restriction> then Constraining Facet overlaying {facets} {base type definition} Constraining Facet [children] <restriction> Schema Component Constraint: Simple Type Restriction (Facets) 2 If <list> then whiteSpace {value} collapse {fixed} true 3 otherwise {fundamental facets} Based on {variety} {facets} {base type definition} {member type definitions} Fundamental Facet The ordered Schema Component (§4.2.1.1) The bounded Schema Component (§4.2.2.1) The cardinality Schema Component (§4.2.3.1) The numeric Schema Component (§4.2.4.1) {annotations} The annotation mapping <simpleType> <restriction> <list> <union> [child] XML Representation of Annotation Schema Components [XSD 1.1 Part 1: Structures] [Definition:] ancestors type definition {base type definition} · · {base type definition} Simple Type Definition T type definitions <simpleType> T If the {variety} atomic Atomic Simple Type Definition Schema Component Property Representation {primitive type definition} From among the · · Simple Type Definition Simple Type Definition · · Example An electronic commerce schema might define a datatype called ' SKU · · string · · <simpleType name='SKU'> <restriction base='string'> <pattern value='\d{3}-[A-Z]{2}'/> </restriction> </simpleType> In this case, ' SKU · · string · · · · If the {variety} list List Simple Type Definition Schema Component Property Representation {item type definition} The appropriate case 1 If {base type definition} · · then Simple Type Definition resolved actual value itemType [attribute] <list> <simpleType> [children] <list> Note: <list> itemType [attribute] <simpleType> [child] 2 otherwise {base type definition} · · {item type definition} {base type definition} Note: <restriction> Example A system might want to store lists of floating point values. <simpleType name='listOfFloat'> <list itemType='float'/> </simpleType> In this case, listOfFloat · · float · · · · If the {variety} union Union Simple Type Definition Schema Component Property Representation {member type definitions} The appropriate case 1 If {base type definition} · · then Simple Type Definition resolved actual value memberTypes [attribute] <union> <simpleType> [children] <union> Note: <union> memberTypes [attribute] <simpleType> [children] 2 otherwise {base type definition} · · {member type definitions} {base type definition} Note: <restriction> Example 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 · · Simple Type Definition <xs:attribute name="size"> <xs:simpleType> <xs:union> <xs:simpleType> <xs:restriction base="xs:positiveInteger"> <xs:minInclusive value="8"/> <xs:maxInclusive value="72"/> </xs:restriction> </xs:simpleType> <xs:simpleType> <xs:restriction base="xs:NMTOKEN"> <xs:enumeration value="small"/> <xs:enumeration value="medium"/> <xs:enumeration value="large"/> </xs:restriction> </xs:simpleType> </xs:union> </xs:simpleType> </xs:attribute> <p> <font size='large'>A header</font> </p> <p> <font size='12'>this is a test</font> </p> A datatype can be · · · · · · · · · · · · Schema Representation Constraint: itemType attribute or simpleType child Either the itemType [attribute] <simpleType> [child] <list> must Schema Representation Constraint: base attribute or simpleType child Either the base [attribute] simpleType [child] <restriction> must Schema Representation Constraint: memberTypes attribute or simpleType children Either the memberTypes [attribute] <union> must must simpleType [child] Validation Rule: Facet Valid A value in a · · · · 1 the value is facet-valid with respect to the particular · · Validation Rule: Datatype Valid A · · Simple Type Definition · · Note: · · · · · · · · · · · · {facets} · · · · · · · · · · That is, the constraints on Simple Type Definition · · · · L Simple Type Definition T T · · all 1 If there is a pattern {facets} L pattern valid (§4.3.4.4) pattern · · {facets} L 2 2.1 If the {variety} T · · L · · {primitive type definition} T V · · {primitive type definition} T L Note: · · · · · · · · · · 2.2 If the {variety} T · · L {item type definition} T V 2.3 If the {variety} T · · L {member type definitions} T B · · T L V L B 3 V 2 Facet Valid (§4.1.4) {facets} T · · · · · · Note that whiteSpace · · before · · B 2.3 · · whiteSpace · · · · Schema Component Constraint: Applicable Facets The · · {facets} {variety} {primitive type definition} If {variety} absent anySimpleType If {variety} list assertions length minLength maxLength pattern enumeration whiteSpace If {variety} union pattern enumeration assertions If {variety} atomic {primitive type definition} absent anyAtomicType In all other cases ( {variety} atomic {primitive type definition} absent {primitive type definition} applicable {facets} string length minLength maxLength pattern enumeration whiteSpace assertions boolean pattern whiteSpace assertions float pattern enumeration whiteSpace maxInclusive maxExclusive minInclusive minExclusive assertions double pattern enumeration whiteSpace maxInclusive maxExclusive minInclusive minExclusive assertions decimal totalDigits fractionDigits pattern whiteSpace enumeration maxInclusive maxExclusive minInclusive minExclusive assertions duration pattern enumeration whiteSpace maxInclusive maxExclusive minInclusive minExclusive assertions dateTime pattern enumeration whiteSpace maxInclusive maxExclusive minInclusive minExclusive assertions explicitTimezone time pattern enumeration whiteSpace maxInclusive maxExclusive minInclusive minExclusive assertions explicitTimezone date pattern enumeration whiteSpace maxInclusive maxExclusive minInclusive minExclusive assertions explicitTimezone gYearMonth pattern enumeration whiteSpace maxInclusive maxExclusive minInclusive minExclusive assertions explicitTimezone gYear pattern enumeration whiteSpace maxInclusive maxExclusive minInclusive minExclusive assertions explicitTimezone gMonthDay pattern enumeration whiteSpace maxInclusive maxExclusive minInclusive minExclusive assertions explicitTimezone gDay pattern enumeration whiteSpace maxInclusive maxExclusive minInclusive minExclusive assertions explicitTimezone gMonth pattern enumeration whiteSpace maxInclusive maxExclusive minInclusive minExclusive assertions explicitTimezone hexBinary length minLength maxLength pattern enumeration whiteSpace assertions base64Binary length minLength maxLength pattern enumeration whiteSpace assertions anyURI length minLength maxLength pattern enumeration whiteSpace assertions QName length minLength maxLength pattern enumeration whiteSpace assertions NOTATION length minLength maxLength pattern enumeration whiteSpace assertions Note: · · · · Similarly, for any · · · · · · The Simple Type Definition anySimpleType Simple type definition of anySimpleType Property Value {name} ' anySimpleType {target namespace} ' http://www.w3.org/2001/XMLSchema {final} The empty set {context} absent {base type definition} anyType {facets} The empty set {fundamental facets} The empty set {variety} absent {primitive type definition} absent {item type definition} absent {member type definitions} absent {annotations} The empty sequence The definition of anySimpleType {base type definition} anyType its {base type definition} The Simple Type Definition anyAtomicType Simple type definition of anyAtomicType Property Value {name} ' anyAtomicType {target namespace} ' http://www.w3.org/2001/XMLSchema {final} The empty set {context} absent {base type definition} anySimpleType {facets} The empty set {fundamental facets} The empty set {variety} atomic {primitive type definition} absent {item type definition} absent {member type definitions} absent {annotations} The empty sequence Simple type definitions for all the built-in primitive datatypes, namely string boolean float double decimal dateTime duration time date gMonth gMonthDay gDay gYear gYearMonth hexBinary base64Binary anyURI {name} {primitive type definition} {fundamental facets} {facets} Simple Type Definition corresponding to the built-in primitive datatypes Property Value {name} [as appropriate] {target namespace} ' http://www.w3.org/2001/XMLSchema {base type definition} anyAtomicType Definition {final} The empty set {variety} atomic {primitive type definition} [this Simple Type Definition {facets} {a whiteSpace {value} collapse {fixed} true string {value} preserve {fixed} false {fundamental facets} [as appropriate] {context} absent {item type definition} absent {member type definitions} absent {annotations} The empty sequence · · · · must Simple Type Definition The {facets} must whiteSpace · · may · · The value of {fundamental facets} · · The value of {annotations} may Note: · · · · expanded name Note: · · http://www.w3.org/2001/XMLSchema {target namespace} Similarly, Simple Type Definition · · Other Built-in Datatypes (§3.4) Illustrative XML representations for the built-in ordinary type definitions (§C.2) Simple Type Definition corresponding to the built-in ordinary datatypes Property Value {name} [as appropriate] {target namespace} ' http://www.w3.org/2001/XMLSchema {base type definition} [as specified in the appropriate sub-section of Other Built-in Datatypes (§3.4) {final} The empty set {variety} [ atomic list Other Built-in Datatypes (§3.4) {primitive type definition} [if {variety} atomic {primitive type definition} {base type definition} absent {facets} [as specified in the appropriate sub-section of Other Built-in Datatypes (§3.4) {fundamental facets} [as specified in the appropriate sub-section of Other Built-in Datatypes (§3.4) {context} absent {item type definition} if {variety} atomic absent Other Built-in Datatypes (§3.4) {member type definitions} absent {annotations} As shown in the XML representations of the ordinary built-in datatypes in Illustrative XML representations for the built-in ordinary type definitions (§C.2) 4.2.1 ordered The ordered Schema Component bounded The bounded Schema Component cardinality The cardinality Schema Component numeric The numeric Schema Component [Definition:] fundamental facet · · cardinality · · · · · · · · cardinality bounded · · Note: · · A · · {fundamental facets} Simple Type Definition · · · · Simple Type Definition {fundamental facets} Note: · · · · For some datatypes, this document specifies an order relation for their value spaces (see Order (§2.2.3) ordered total partial false · · ordered Fundamental Facets (§F.1) · · · · · · false · · A false total partial Note: false ordered exists Note: ordered partial [Definition:] · · ordered · · · · Fundamental Facets (§F.1) total partial ordered Note: boolean string · · · · · · not Schema Component: ordered Fundamental Facet {value} One of { false partial total {value} · · {variety} {facets} {member type definitions} case must 1 If · · {variety} atomic then case must 1.1 If · · · · then {value} Fundamental Facets (§F.1) 1.2 otherwise {value} · · {base type definition} ordered {value} 2 If · · {variety} list then {value} false 3 otherwise · · {variety} union case must 3.1 If · · · · {variety} {primitive type definition} then {value} ordered {value} {fundamental facets} 3.2 If · · {member type definitions} ordered {fundamental facets} {value} false then {value} false 3.3 otherwise {value} partial Some ordered datatypes have the property that there is one value greater than or equal to every other value, and another that is less than or equal to every other value.  (In the case of · · bounded boolean true bounded false pattern Schema Component: bounded Fundamental Facet {value} An xs:boolean value. Required. {value} · · {variety} {facets} {member type definitions} When the · · · · {value} Fundamental Facets (§F.1) · · {variety} atomic minInclusive minExclusive maxInclusive maxExclusive · · {facets} {value} true {value} false When the · · {variety} list {value} false When the · · {variety} union {value} true · · {member type definitions} · · · · {primitive type definition} {value} true {value} false Every value space has a specific number of members.  This number can be characterized as finite infinite countable cardinality finite countably infinite finite countably infinite pattern Schema Component: cardinality Fundamental Facet {value} One of { finite countably infinite {value} · · {variety} {facets} {member type definitions} When the · · · · {value} Fundamental Facets (§F.1) · · {variety} atomic {value} countably infinite any {value} finite the · · {base type definition} cardinality {value} finite at least one of length maxLength totalDigits · · {facets} all one of minInclusive minExclusive · · {facets} one of maxInclusive maxExclusive · · {facets} either fractionDigits · · {facets} {primitive type definition} date gYearMonth gYear gMonthDay gDay gMonth When the · · {variety} list length minLength maxLength · · {facets} · · {item type definition} cardinality {value} finite {value} finite {value} countably infinite When the · · {variety} union cardinality {value} finite · · {member type definitions} {value} finite {value} countably infinite Some value spaces are made up of things that are conceptually numeric numeric Schema Component: numeric Fundamental Facet {value} An xs:boolean value. Required. {value} · · {variety} {facets} {base type definition} {member type definitions} When the · · · · {value} Fundamental Facets (§F.1) · · {variety} atomic {value} · · {base type definition} numeric {value} When the · · {variety} list {value} false When the · · {variety} union numeric {value} true · · {member type definitions} {value} true {value} false 4.3.1 length The length Schema Component XML Representation of length Schema Components length Validation Rules Constraints on length Schema Components minLength The minLength Schema Component XML Representation of minLength Schema Component minLength Validation Rules Constraints on minLength Schema Components maxLength The maxLength Schema Component XML Representation of maxLength Schema Components maxLength Validation Rules Constraints on maxLength Schema Components pattern The pattern Schema Component XML Representation of pattern Schema Components Constraints on XML Representation of pattern pattern Validation Rules Constraints on pattern Schema Components enumeration The enumeration Schema Component XML Representation of enumeration Schema Components Constraints on XML Representation of enumeration enumeration Validation Rules Constraints on enumeration Schema Components whiteSpace The whiteSpace Schema Component XML Representation of whiteSpace Schema Components whiteSpace Validation Rules Constraints on whiteSpace Schema Components maxInclusive The maxInclusive Schema Component XML Representation of maxInclusive Schema Components maxInclusive Validation Rules Constraints on maxInclusive Schema Components maxExclusive The maxExclusive Schema Component XML Representation of maxExclusive Schema Components maxExclusive Validation Rules Constraints on maxExclusive Schema Components minExclusive The minExclusive Schema Component XML Representation of minExclusive Schema Components minExclusive Validation Rules Constraints on minExclusive Schema Components minInclusive The minInclusive Schema Component XML Representation of minInclusive Schema Components minInclusive Validation Rules Constraints on minInclusive Schema Components totalDigits The totalDigits Schema Component XML Representation of totalDigits Schema Components totalDigits Validation Rules Constraints on totalDigits Schema Components fractionDigits The fractionDigits Schema Component XML Representation of fractionDigits Schema Components fractionDigits Validation Rules Constraints on fractionDigits Schema Components Assertions The assertions Schema Component XML Representation of assertions Schema Components Assertions Validation Rules Constraints on assertions Schema Components explicitTimezone The explicitTimezone Schema Component XML Representation of explicitTimezone Schema Components explicitTimezone Validation Rules Constraints on explicitTimezone Schema Components [Definition:] Constraining facets · · · · whiteSpace · · · · · · · · · · · · · · · · · · Note: · · This specification distinguishes three kinds of constraining facets: [Definition:] · · · · pre-lexical This specification defines just one · · whiteSpace [Definition:] · · lexical This specification defines just one · · pattern Note: · · · · · · · · [Definition:] · · value-based Most of the constraining facets defined by this specification are · · Note: · · · · · · · · Conforming processors must · · [Definition:] · · unknown Note: · · · · The descriptions of individual facets given below include both constraints on Simple Type Definition Simple Type Definition Simple Type Definition · · · · · · Simple Type Definition · · · · · · · · · · Note: · · [Definition:] length units of length units of length · · length must nonNegativeInteger For string · · string length character [XML] anyURI length string hexBinary base64Binary · · length · · · · length Note: string · · string length length length · · Constraining a · · units of length units of length {base type definition} Example The following is the definition of a · · length pattern <simpleType name='productCode'> <restriction base='string'> <length value='8' fixed='true'/> </restriction> </simpleType> Schema Component: length Constraining Facet {annotations} A sequence of Annotation {value} An xs:nonNegativeInteger value. Required. {fixed} An xs:boolean value. Required. If {fixed} true {base type definition} length {value} Note: {fixed} length valid restriction (§4.3.1.4) length {fixed} true false The XML representation for a length <length> XML Representation Summary length <length boolean ID value nonNegativeInteger {any attributes with non-schema namespace . . .} Content: annotation length Schema Component Property Representation {value} The actual value value [attribute] {fixed} The actual value fixed [attribute] false {annotations} The annotation mapping <length> XML Representation of Annotation Schema Components [XSD 1.1 Part 1: Structures] Validation Rule: Length Valid A value in a · · · · 1 if the {variety} · · 1.1 if {primitive type definition} string anyURI character must {value} 1.2 if {primitive type definition} hexBinary base64Binary must {value} 1.3 if {primitive type definition} QName NOTATION {value} 2 if the {variety} · · must {value} The use of · · QName NOTATION · · Schema Component Constraint: length and minLength or maxLength If length {facets} 1 It is an error for minLength {facets} 1.1 the {value} minLength {value} length 1.2 there is some type definition from which this one is derived by one or more · · minLength {value} length 2 It is an error for maxLength {facets} 2.1 the {value} length {value} maxLength 2.2 there is some type definition from which this one is derived by one or more restriction steps in which maxLength {value} length Schema Component Constraint: length valid restriction It is an · · length {facets} {base type definition} {value} {value} length [Definition:] minLength units of length units of length · · minLength must nonNegativeInteger For string · · string minLength character [XML] hexBinary base64Binary · · minLength · · · · minLength Note: string · · string minLength minLength minLength · · Constraining a · · units of length units of length {base type definition} Example The following is the definition of a · · · · <simpleType name='non-empty-string'> <restriction base='string'> <minLength value='1'/> </restriction> </simpleType> Schema Component: minLength Constraining Facet {annotations} A sequence of Annotation {value} An xs:nonNegativeInteger value. Required. {fixed} An xs:boolean value. Required. If {fixed} true {base type definition} minLength {value} The XML representation for a minLength <minLength> XML Representation Summary minLength <minLength boolean ID value nonNegativeInteger {any attributes with non-schema namespace . . .} Content: annotation minLength Schema Component Property Representation {value} The actual value value [attribute] {fixed} The actual value fixed [attribute] false {annotations} The annotation mapping <minLength> XML Representation of Annotation Schema Components [XSD 1.1 Part 1: Structures] Validation Rule: minLength Valid A value in a · · · · 1 if the {variety} · · 1.1 if {primitive type definition} string anyURI character must {value} 1.2 if {primitive type definition} hexBinary base64Binary must {value} 1.3 if {primitive type definition} QName NOTATION {value} 2 if the {variety} · · must {value} The use of · · QName NOTATION · · Schema Component Constraint: minLength <= maxLength If both minLength maxLength {facets} {value} minLength must {value} maxLength Schema Component Constraint: minLength valid restriction It is an · · minLength {facets} {base type definition} {value} {value} minLength [Definition:] maxLength units of length units of length · · maxLength must nonNegativeInteger For string · · string maxLength character [XML] hexBinary base64Binary · · maxLength · · · · maxLength Note: string · · string maxLength maxLength maxLength · · Constraining a · · units of length units of length {base type definition} Example The following is the definition of a · · <simpleType name='form-input'> <restriction base='string'> <maxLength value='50'/> </restriction> </simpleType> Schema Component: maxLength Constraining Facet {annotations} A sequence of Annotation {value} An xs:nonNegativeInteger value. Required. {fixed} An xs:boolean value. Required. If {fixed} true {base type definition} maxLength {value} The XML representation for a maxLength <maxLength> XML Representation Summary maxLength <maxLength boolean ID value nonNegativeInteger {any attributes with non-schema namespace . . .} Content: annotation maxLength Schema Component Property Representation {value} The actual value value [attribute] {fixed} The actual value fixed [attribute] false {annotations} The annotation mapping <maxLength> XML Representation of Annotation Schema Components [XSD 1.1 Part 1: Structures] Validation Rule: maxLength Valid A value in a · · · · 1 if the {variety} · · 1.1 if {primitive type definition} string anyURI character must {value} 1.2 if {primitive type definition} hexBinary base64Binary must {value} 1.3 if {primitive type definition} QName NOTATION {value} 2 if the {variety} · · must {value} The use of · · QName NOTATION · · Schema Component Constraint: maxLength valid restriction It is an · · maxLength {facets} {base type definition} {value} {value} maxLength [Definition:] pattern · · · · · · · · pattern must · · Note: <restriction> <pattern> · · · · · · <pattern> · · Constraining a · · · · · · Example The following is the definition of a · · · · <simpleType name='better-us-zipcode'> <restriction base='string'> <pattern value='[0-9]{5}(-[0-9]{4})?'/> </restriction> </simpleType> Schema Component: pattern Constraining Facet {annotations} A sequence of Annotation {value} A non-empty set of · · The XML representation for a pattern <pattern> XML Representation Summary pattern <pattern ID value string {any attributes with non-schema namespace . . .} Content: annotation pattern Schema Component Property Representation {value} [Definition:] R case 1 If <pattern> [children] <restriction> then actual value value [attribute] 2 otherwise actual values <pattern> [children] value [attributes] | · · case 1 If {base type definition} · · pattern {facets} then pattern {value} · · 2 otherwise · · {annotations} The annotation mapping <pattern> [children] <restriction> XML Representation of Annotation Schema Components [XSD 1.1 Part 1: Structures] Note: {value} · · pattern {value} In summary, · · same OR · · different AND Thus, to impose two · · · · · · · · Schema Representation Constraint: Pattern value The actual value value [attribute] · · Regular Expressions (§G) Validation Rule: pattern valid A · · · · · · · · {value} · · · · Note: Datatype (§2.1) · · Schema Component Constraint: Valid restriction of pattern It is an · · {value} pattern {base type definition} {value} Note: S S · · pattern · · [Definition:] enumeration · · enumeration · · · · · · · · · · Constraining a · · Example The following example is a Simple Type Definition · · Simple Type Definition · · · · · · <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> Schema Component: enumeration Constraining Facet {annotations} A sequence of Annotation {value} A set of values from the · · {base type definition} The XML representation for an enumeration <enumeration> XML Representation Summary enumeration <enumeration ID value anySimpleType {any attributes with non-schema namespace . . .} Content: annotation enumeration Schema Component Property Representation {value} The appropriate case 1 If <enumeration> [children] <restriction> then actual value value [attribute] {base type definition} 2 otherwise actual values <enumeration> [children] value [attributes] {base type definition} Note: value [attribute] · anySimpleType · {value} enumeration must {base type definition} enumeration actual value · · {base type definition} {annotations} A (possibly empty) sequence of Annotation <annotation> [children] <enumeration> [children] <restriction> Schema Representation Constraint: Enumeration value The normalized value value [attribute] Datatype Valid (§4.1.4) {base type definition} Simple Type Definition <simpleType> Validation Rule: enumeration valid A value in a · · · · {value} Note: V V In this question, the behavior of this specification is thus the same as the behavior specified by [XQuery 1.0 and XPath 2.0 Functions and Operators] Schema Component Constraint: enumeration valid restriction It is an · · {value} · · {base type definition} [Definition:] whiteSpace · · · · string Attribute Value Normalization [XML] whiteSpace preserve No normalization is done, the value is not changed (this is the behavior required by [XML] replace All occurrences of #x9 (tab), #xA (line feed) and #xD (carriage return) are replaced with #x20 (space) collapse After the processing implied by replace Note: hexadecimal A &#xA; character reference whiteSpace · · · · · · string · · · · whiteSpace collapse string whiteSpace preserve · · · · string whiteSpace · · Constraints on whiteSpace Schema Components (§4.3.6.4) · · · · whiteSpace collapse · · · · whiteSpace · · whiteSpace · · · · Note: whiteSpace Schema Component Details [XSD 1.1 Part 1: Structures] · · Constraining a · · Example The following example is the Simple Type Definition · · token <simpleType name='token'> <restriction base='normalizedString'> <whiteSpace value='collapse'/> </restriction> </simpleType> Note: replace collapse Schema Component: whiteSpace Constraining Facet {annotations} A sequence of Annotation {value} One of { preserve replace collapse {fixed} An xs:boolean value. Required. If {fixed} true {base type definition} whiteSpace {value} The XML representation for a whiteSpace <whiteSpace> XML Representation Summary whiteSpace <whiteSpace boolean ID value collapse preserve replace {any attributes with non-schema namespace . . .} Content: annotation whiteSpace Schema Component Property Representation {value} The actual value value [attribute] {fixed} The actual value fixed [attribute] false {annotations} The annotation mapping <whiteSpace> XML Representation of Annotation Schema Components [XSD 1.1 Part 1: Structures] Note: · · · · Schema Component Details [XSD 1.1 Part 1: Structures] 3.1.4 White Space Normalization during Validation Schema Component Constraint: whiteSpace valid restriction It is an · · whiteSpace {facets} {base type definition} 1 {value} replace preserve {value} whiteSpace collapse 2 {value} preserve {value} whiteSpace replace Note: whiteSpace preserve collapse replace [Definition:] · · · · maxInclusive must · · · · · · Constraining a · · Example The following is the definition of a · · · · <simpleType name='one-hundred-or-less'> <restriction base='integer'> <maxInclusive value='100'/> </restriction> </simpleType> Schema Component: maxInclusive Constraining Facet {annotations} A sequence of Annotation {value} Required. A value from the · · {base type definition} {fixed} An xs:boolean value. Required. If {fixed} true {base type definition} maxInclusive {value} The XML representation for a maxInclusive <maxInclusive> XML Representation Summary maxInclusive <maxInclusive boolean ID value anySimpleType {any attributes with non-schema namespace . . .} Content: annotation {value} must · · {base type definition} maxInclusive Schema Component Property Representation {value} The actual value value [attribute] {fixed} The actual value fixed [attribute] false {annotations} The annotation mapping <maxInclusive> XML Representation of Annotation Schema Components [XSD 1.1 Part 1: Structures] Validation Rule: maxInclusive Valid A value in an · · · · · · {value} Schema Component Constraint: minInclusive <= maxInclusive It is an · · · · · · Schema Component Constraint: maxInclusive valid restriction It is an · · 1 maxInclusive {facets} {base type definition} {value} {value} maxInclusive 2 maxExclusive {facets} {base type definition} {value} {value} maxExclusive 3 minInclusive {facets} {base type definition} {value} {value} minInclusive 4 minExclusive {facets} {base type definition} {value} {value} minExclusive [Definition:] maxExclusive · · · · maxExclusive must · · · · {value} {base type definition} · · Constraining a · · Example The following is the definition of a · · · · <simpleType name='less-than-one-hundred-and-one'> <restriction base='integer'> <maxExclusive value='101'/> </restriction> </simpleType> Note that the · · Schema Component: maxExclusive Constraining Facet {annotations} A sequence of Annotation {value} Required. A value from the · · {base type definition} {fixed} An xs:boolean value. Required. If {fixed} true {base type definition} maxExclusive {value} The XML representation for a maxExclusive <maxExclusive> XML Representation Summary maxExclusive <maxExclusive boolean ID value anySimpleType {any attributes with non-schema namespace . . .} Content: annotation {value} must · · {base type definition} maxExclusive Schema Component Property Representation {value} The actual value value [attribute] {fixed} The actual value fixed [attribute] false {annotations} The annotation mapping <maxExclusive> XML Representation of Annotation Schema Components [XSD 1.1 Part 1: Structures] Validation Rule: maxExclusive Valid A value in an · · · · · · {value} Schema Component Constraint: maxInclusive and maxExclusive It is an · · · · · · Simple Type Definition Schema Component Constraint: minExclusive <= maxExclusive It is an · · · · · · Schema Component Constraint: maxExclusive valid restriction It is an · · 1 maxExclusive {facets} {base type definition} {value} {value} maxExclusive 2 maxInclusive {facets} {base type definition} {value} {value} maxInclusive 3 minInclusive {facets} {base type definition} {value} {value} minInclusive 4 minExclusive {facets} {base type definition} {value} {value} minExclusive [Definition:] minExclusive · · · · minExclusive must · · · · {value} {base type definition} · · Constraining a · · Example The following is the definition of a · · · · <simpleType name='more-than-ninety-nine'> <restriction base='integer'> <minExclusive value='99'/> </restriction> </simpleType> Note that the · · Schema Component: minExclusive Constraining Facet {annotations} A sequence of Annotation {value} Required. A value from the · · {base type definition} {fixed} An xs:boolean value. Required. If {fixed} true {base type definition} minExclusive {value} The XML representation for a minExclusive <minExclusive> XML Representation Summary minExclusive <minExclusive boolean ID value anySimpleType {any attributes with non-schema namespace . . .} Content: annotation {value} must · · {base type definition} minExclusive Schema Component Property Representation {value} The actual value value [attribute] {fixed} The actual value fixed [attribute] false {annotations} The annotation mapping <minExclusive> XML Representation of Annotation Schema Components [XSD 1.1 Part 1: Structures] Validation Rule: minExclusive Valid A value in an · · · · · · {value} Schema Component Constraint: minInclusive and minExclusive It is an · · · · · · Simple Type Definition Schema Component Constraint: minExclusive < maxInclusive It is an · · · · · · Schema Component Constraint: minExclusive valid restriction It is an · · 1 minExclusive {facets} {base type definition} {value} {value} minExclusive 2 minInclusive {facets} {base type definition} {value} {value} minInclusive 3 maxInclusive {facets} {base type definition} {value} {value} maxInclusive 4 maxExclusive {facets} {base type definition} {value} {value} maxExclusive [Definition:] minInclusive · · · · minInclusive must · · · · · · Constraining a · · Example The following is the definition of a · · · · <simpleType name='one-hundred-or-more'> <restriction base='integer'> <minInclusive value='100'/> </restriction> </simpleType> Schema Component: minInclusive Constraining Facet {annotations} A sequence of Annotation {value} Required. A value from the · · {base type definition} {fixed} An xs:boolean value. Required. If {fixed} true {base type definition} minInclusive {value} The XML representation for a minInclusive <minInclusive> XML Representation Summary minInclusive <minInclusive boolean ID value anySimpleType {any attributes with non-schema namespace . . .} Content: annotation {value} must · · {base type definition} minInclusive Schema Component Property Representation {value} The actual value value [attribute] {fixed} The actual value fixed [attribute] false {annotations} The annotation mapping <minInclusive> XML Representation of Annotation Schema Components [XSD 1.1 Part 1: Structures] Validation Rule: minInclusive Valid A value in an · · · · · · {value} Schema Component Constraint: minInclusive < maxExclusive It is an · · · · · · Schema Component Constraint: minInclusive valid restriction It is an · · 1 minInclusive {facets} {base type definition} {value} {value} minInclusive 2 maxInclusive {facets} {base type definition} {value} {value} maxInclusive 3 minExclusive {facets} {base type definition} {value} {value} minExclusive 4 maxExclusive {facets} {base type definition} {value} {value} maxExclusive [Definition:] totalDigits · · decimal For decimal {value} totalDigits t i n i n i t n t t The {value} totalDigits must positiveInteger The term 'totalDigits' is chosen to reflect the fact that it restricts the · · totalDigits totalDigits · · Schema Component: totalDigits Constraining Facet {annotations} A sequence of Annotation {value} An xs:positiveInteger value. Required. {fixed} An xs:boolean value. Required. If {fixed} true {base type definition} must totalDigits {value} The XML representation for a totalDigits <totalDigits> XML Representation Summary totalDigits <totalDigits boolean ID value positiveInteger {any attributes with non-schema namespace . . .} Content: annotation totalDigits Schema Component Property Representation {value} The actual value value [attribute] {fixed} The actual value fixed [attribute] false {annotations} The annotation mapping <totalDigits> XML Representation of Annotation Schema Components [XSD 1.1 Part 1: Structures] Validation Rule: totalDigits Valid A value v totalDigits {value} t v decimal i n i n i t n t Schema Component Constraint: totalDigits valid restriction It is an · · · · {base type definition} totalDigits {facets} {value} {value} totalDigits [Definition:] fractionDigits decimal {value} fractionDigits f i n i n n f fractionDigits must nonNegativeInteger The term fractionDigits · · fractionDigits · · Example The following is the definition of a · · · · <simpleType name='celsiusBodyTemp'> <restriction base='decimal'> <fractionDigits value='1'/> <minInclusive value='32'/> <maxInclusive value='41.7'/> </restriction> </simpleType> Schema Component: fractionDigits Constraining Facet {annotations} A sequence of Annotation {value} An xs:nonNegativeInteger value. Required. {fixed} An xs:boolean value. Required. If {fixed} true {base type definition} must fractionDigits {value} The XML representation for a fractionDigits <fractionDigits> XML Representation Summary fractionDigits <fractionDigits boolean ID value nonNegativeInteger {any attributes with non-schema namespace . . .} Content: annotation fractionDigits Schema Component Property Representation {value} The actual value value [attribute] {fixed} The actual value fixed [attribute] false {annotations} The annotation mapping <fractionDigits> XML Representation of Annotation Schema Components [XSD 1.1 Part 1: Structures] Validation Rule: fractionDigits Valid A value is facet-valid with respect to · · i n i n n {value} Schema Component Constraint: fractionDigits less than or equal to totalDigits It is an · · {value} fractionDigits totalDigits Schema Component Constraint: fractionDigits valid restriction It is an · · · · {facets} {base type definition} {value} {value} · · [Definition:] Assertions · · [XPath 2.0] assertions Assertion [XSD 1.1 Part 1: Structures] Example The following is the definition of a · · <simpleType name='nonZeroInteger'> <restriction base='integer'> <assertion test='$value ne 0'/> </restriction> </simpleType> Example The following example defines the datatype "triple", whose · · <simpleType name='triple'> <restriction base='integer'> <assertion test='$value mod 3 eq 0'/> </restriction> </simpleType> The same datatype can be defined without the use of assertions, but the pattern necessary to represent the set of triples is long and error-prone: <simpleType name='triple'> <restriction base='integer'> <pattern value= "([0369]|[147][0369]*[258]|(([258]|[147][0369]*[147])([0369]|[258][0369]*[147])*([147]|[258][0369]*[258]))*"/> </restriction> </simpleType> The assertion used in the first version of "triple" is likely to be clearer for many readers of the schema document. Schema Component: assertions Constraining Facet {annotations} A sequence of Annotation {value} A sequence of Assertion The XML representation for an assertions <assertion> XML Representation Summary assertion <assertion ID test an XPath expression anyURI ##defaultNamespace ##targetNamespace ##local {any attributes with non-schema namespace . . .} Content: annotation assertions Schema Component Property Representation {value} A sequence whose members are Assertion 1 If the {base type definition} · · assertions {facets} Assertion {value} assertions 2 Assertion <assertion> [children] <restriction> Assertion section 3.13.2 [XSD 1.1 Part 1: Structures] {annotations} The empty sequence. Note: <assertion> Assertion The following rule refers to "the nearest built-in" datatype and to the "XDM representation" of a value under a datatype. [Definition:] T nearest built-in datatype T · · · · T · · T T T · · [Definition:] V T XDM representation of V T X 1 If T · xs:anySimpleType · · xs:anyAtomicType · X V dynamic type X xs:untypedAtomic 2 If T {variety} atomic T2 · · T V · · T2 X V dynamic type X T2 V · · T2 X · · V T2 {base type definition} 3 If T {variety} list X · · V T {item type definition} 4 If T {variety} union X · · V · · V T · · V · · T Note: {item type definition} · · · · · · · · · · dynamic type X Because the {item type definition} · · · · · · · · · · V · · · · · · Validation Rule: Assertions Valid A value V assertions T Assertion {value} true dynamic error type error Evaluation of {test} is performed as defined in [XPath 2.0] 1 The XPath expression {test} is evaluated, following the rules given in XPath Evaluation [XSD 1.1 Part 1: Structures] 1.1 The in-scope variables static context expanded QName value type anyAtomicType* Note: anyAtomicType* $value 1.2 There is no context item Note: [XPath 2.0] context item Note: . XPath Valid The variable " $value 1.3 There is likewise no value for the context size context position dynamic context 1.4 The variable values dynamic context expanded QName value value · · V T 1.5 If V · · T V assertions T 2 The evaluation result is converted to either true false fn:boolean Schema Component Constraint: Valid restriction of assertions The {value} assertions {base type definition} must {value} Note: S S · · assertions · · [Definition:] explicitTimezone Example The following · · date explicitTimezone <simpleType name='bare-date'> <restriction base='date'> <explicitTimezone value='prohibited'/> </restriction> </simpleType> The same effect could also be achieved using the pattern explicitTimezone <simpleType name='bare-date'> <restriction base='date'> <pattern value='[^:Z]*'/> </restriction> </simpleType> Schema Component: explicitTimezone Constraining Facet {annotations} A sequence of Annotation {value} One of { required prohibited optional {fixed} An xs:boolean value. Required. If {fixed} true {base type definition} explicitTimezone {value} Note: timezone valid restriction (§4.3.14.4) explicitTimezone optional {fixed} true false {fixed} {value} optional The XML representation for an explicitTimezone <explicitTimezone> XML Representation Summary explicitTimezone <explicitTimezone boolean ID value NCName {any attributes with non-schema namespace . . .} Content: annotation explicitTimezone Schema Component Property Representation {value} The actual value value [attribute] {fixed} The actual value fixed [attribute] false {annotations} The annotation mapping <explicitTimezone> XML Representation of Annotation Schema Components [XSD 1.1 Part 1: Structures] Validation Rule: explicitOffset Valid A dateTime V · · one 1 The {value} required V absent · · 2 The {value} prohibited · · V absent 3 The {value} optional Schema Component Constraint: timezone valid restriction If the explicitTimezone {base type definition} {value} optional {value} · · must {value} {base type definition} · · Note: explicitTimezone optional required prohibited XSD 1.1: Datatypes In the usual case, it will embedded in a host language [XSD 1.1 Part 1: Structures] XSD 1.1: Datatypes Certain aspects of the behavior of conforming processors are described in this specification as · · · · [Definition:] may must implementation-defined [Definition:] may implementation-dependent · · · · may Implementation-defined and implementation-dependent features (normative) (§H) When XSD 1.1: Datatypes This specification imposes certain constraints on the embedding of XSD 1.1: Datatypes must Note: Host languages should Host languages may If user-defined datatypes are to be supported in the host language, then the host language must In addition, host languages must [Definition:] minimal conformance must all 1 Support all the · · 2 Completely and correctly implement all of the · · 3 Completely and correctly implement all of the · · Implementations claiming schema-document-aware conformance must all 1 Accept simple type definitions in the form specified in Datatype components (§4) 2 Completely and correctly implement all of rules governing the XML representation of simple type definitions specified in Datatype components (§4) 3 Map the XML representations of simple type definitions to simple type definition components as specified in the mapping rules given in Datatype components (§4) Note: schema-document aware [XSD 1.1 Part 1: Structures] not Abstract representations of simple type definitions conform to this specification if and only if they obey all of the · · XML representations of simple type definitions conform to this specification if they obey all of the applicable rules defined in this specification. Note: · · Some · · · · string hexBinary base64Binary When this specification is used in the context of other languages (as it is, for example, by [XSD 1.1 Part 1: Structures] When presented with a literal or value exceeding the capacity of its partial implementation of a datatype, a minimally conforming implementation of this specification will sometimes be unable to determine with certainty whether the value is datatype-valid or not. Sometimes it will be unable to represent the value correctly through its interface to any downstream application. When either of these is so, a conforming processor must must not must not This specification does not constrain the method used to indicate that a literal or value in the input data has exceeded the capacity of the implementation, or the form such indications take. · · · · must These are the partial-implementation · · All · · must decimal i k i k i 16 k All · · must · · The Seven-property Model (§D.2.1) · · · · dateTime dateTimeStamp date gYearMonth gYear All · · must · · The Seven-property Model (§D.2.1) · · · · dateTime dateTimeStamp time All · · must duration All · · must duration · · · · The XML representation of the datatypes-relevant part of the schema for schema documents is presented here as a normative part of the specification. Independent copies of this material are available in an undated (mutable) version at http://www.w3.org/2009/XMLSchema/datatypes.xsd http://www.w3.org/2012/04/datatypes.xsd Like any other XML document, schema documents may carry XML and document type declarations. An XML declaration and a document type declaration are provided here for convenience. Since this schema document describes the XML Schema language, the targetNamespace schema Schema documents conforming to this specification may be in XML 1.0 or XML 1.1. Conforming implementations may accept input in XML 1.0 or XML 1.1 or both. See Dependencies on Other Specifications (§1.3) Schema for Schema Documents (Datatypes) <?xml version='1.0'?> <!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XSD 1.1//EN" "XMLSchema.dtd" [

<!-- 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:assertion id ID #IMPLIED> <!ATTLIST xs:explicitTimezone id ID #IMPLIED> <!ATTLIST xs:appinfo id ID #IMPLIED> <!ATTLIST xs:documentation id ID #IMPLIED> <!ATTLIST xs:list id ID #IMPLIED> <!ATTLIST xs:union id ID #IMPLIED> ]>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xml:lang="en" targetNamespace="http://www.w3.org/2001/XMLSchema" version="datatypes.xsd (rec-20120405)"> <xs:annotation> <xs:documentation source="../datatypes/datatypes.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 'documentation' elements) below, is not normative, but rather highlights important aspects of the W3C Recommendation of which this is a part.

See below (at the bottom of this document) for information about the revision and namespace-versioning policy governing this schema document. </xs:documentation> </xs:annotation>

<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, extension, 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:enumeration value="extension"/> </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/xmlschema11-2/#element-simpleType"/> </xs:annotation> </xs:element> <xs:element name="facet" abstract="true"> <xs:annotation> <xs:documentation> An abstract element, representing facets in general. The facets defined by this spec are substitutable for this element, and implementation-defined facets should also name this as a substitution-group head. </xs:documentation> </xs:annotation> </xs:element> <xs:group name="simpleRestrictionModel"> <xs:sequence> <xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element ref="xs:facet"/> <xs:any processContents="lax" namespace="##other"/> </xs:choice> </xs:sequence> </xs:group> <xs:element name="restriction" id="restriction"> <xs:complexType> <xs:annotation> <xs:documentation source="http://www.w3.org/TR/xmlschema11-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/xmlschema11-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/xmlschema11-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" substitutionGroup="xs:facet"> <xs:annotation> <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#element-minExclusive"/> </xs:annotation> </xs:element> <xs:element name="minInclusive" type="xs:facet" id="minInclusive" substitutionGroup="xs:facet"> <xs:annotation> <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#element-minInclusive"/> </xs:annotation> </xs:element> <xs:element name="maxExclusive" type="xs:facet" id="maxExclusive" substitutionGroup="xs:facet"> <xs:annotation> <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#element-maxExclusive"/> </xs:annotation> </xs:element> <xs:element name="maxInclusive" type="xs:facet" id="maxInclusive" substitutionGroup="xs:facet"> <xs:annotation> <xs:documentation source="http://www.w3.org/TR/xmlschema11-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:complexType name="intFacet"> <xs:complexContent> <xs:restriction base="xs:facet"> <xs:sequence> <xs:element ref="xs:annotation" minOccurs="0"/> </xs:sequence> <xs:attribute name="value" type="xs:integer" use="required"/> <xs:anyAttribute namespace="##other" processContents="lax"/> </xs:restriction> </xs:complexContent> </xs:complexType>

<xs:element name="totalDigits" id="totalDigits" substitutionGroup="xs:facet"> <xs:annotation> <xs:documentation source="http://www.w3.org/TR/xmlschema11-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" substitutionGroup="xs:facet"> <xs:annotation> <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#element-fractionDigits"/> </xs:annotation> </xs:element>

<xs:element name="length" type="xs:numFacet" id="length" substitutionGroup="xs:facet"> <xs:annotation> <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#element-length"/> </xs:annotation> </xs:element> <xs:element name="minLength" type="xs:numFacet" id="minLength" substitutionGroup="xs:facet"> <xs:annotation> <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#element-minLength"/> </xs:annotation> </xs:element> <xs:element name="maxLength" type="xs:numFacet" id="maxLength" substitutionGroup="xs:facet"> <xs:annotation> <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#element-maxLength"/> </xs:annotation> </xs:element> <xs:element name="enumeration" type="xs:noFixedFacet" id="enumeration" substitutionGroup="xs:facet"> <xs:annotation> <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#element-enumeration"/> </xs:annotation> </xs:element> <xs:element name="whiteSpace" id="whiteSpace" substitutionGroup="xs:facet"> <xs:annotation> <xs:documentation source="http://www.w3.org/TR/xmlschema11-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" substitutionGroup="xs:facet"> <xs:annotation> <xs:documentation source="http://www.w3.org/TR/xmlschema11-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:element name="assertion" type="xs:assertion" id="assertion" substitutionGroup="xs:facet"> <xs:annotation> <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#element-assertion"/> </xs:annotation> </xs:element> <xs:element name="explicitTimezone" id="explicitTimezone" substitutionGroup="xs:facet"> <xs:annotation> <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#element-explicitTimezone"/> </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="optional"/> <xs:enumeration value="required"/> <xs:enumeration value="prohibited"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:anyAttribute namespace="##other" processContents="lax"/> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:element>

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

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

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

Previous dated (and unchanging) versions of this schema document include:

http://www.w3.org/2012/01/datatypes.xsd (XSD 1.1 Proposed Recommendation)

http://www.w3.org/2011/07/datatypes.xsd (XSD 1.1 Candidate Recommendation)

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

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

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

</xs:documentation> </xs:annotation>

</xs:schema> The DTD for the datatypes-specific aspects of schema documents is given below. Note there is no schema must DTD for datatype definitions <!-- DTD for XML Schemas: Part 2: Datatypes Id: datatypes.dtd,v 1.1.2.4 2005/01/31 18:40:42 cmsmcq 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">

<!ENTITY % assertion "%p;assertion">

<!ENTITY % explicitTimezone "%p;explicitTimezone">

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

<!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 ""> <!ENTITY % assertionAttrs ""> <!ENTITY % explicitTimezoneAttrs "">

<!-- 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 and assertion 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; | %assertion; | %explicitTimezone;"> <!ENTITY % implementation-defined-facets ""> <!ENTITY % facet "%ordered; | %unordered; %implementation-defined-facets;"> <!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;>

<!ELEMENT %assertion; %facetModel;> <!ATTLIST %assertion; %facetAttr; %assertionAttrs;>

<!ELEMENT %explicitTimezone; %facetModel;> <!ATTLIST %explicitTimezone; %facetAttr; %explicitTimezoneAttrs;> The following, although in the form of a schema document, does not conform to the rules for schema documents defined in this specification. It contains explicit XML representations of the primitive datatypes which need not be declared in a schema document, since they are automatically included in every schema, and indeed must not be declared in a schema document, since it is forbidden to try to derive types with anyAtomicType The (not a) schema document for primitive built-in type definitions <?xml version='1.0'?> <!DOCTYPE xs:schema SYSTEM "../namespace/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> ]> <xs:schema xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xml:lang="en" targetNamespace="http://www.w3.org/2001/XMLSchema">

<xs:annotation> <xs:documentation> This document contains XML elements which look like definitions for the 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:hasFacet name="assertions"/> <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/xmlschema11-2/#string"/> </xs:annotation> <xs:restriction base="xs:anyAtomicType"> <xs:whiteSpace value="preserve" id="string.whiteSpace"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="boolean" id="boolean"> <xs:annotation> <xs:appinfo> <hfp:hasFacet name="pattern"/> <hfp:hasFacet name="whiteSpace"/> <hfp:hasFacet name="assertions"/> <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/xmlschema11-2/#boolean"/> </xs:annotation> <xs:restriction base="xs:anyAtomicType"> <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:hasFacet name="assertions"/> <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/xmlschema11-2/#float"/> </xs:annotation> <xs:restriction base="xs:anyAtomicType"> <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:hasFacet name="assertions"/> <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/xmlschema11-2/#double"/> </xs:annotation> <xs:restriction base="xs:anyAtomicType"> <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:hasFacet name="assertions"/> <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/xmlschema11-2/#decimal"/> </xs:annotation> <xs:restriction base="xs:anyAtomicType"> <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:hasFacet name="assertions"/> <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/xmlschema11-2/#duration"/> </xs:annotation> <xs:restriction base="xs:anyAtomicType"> <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:hasFacet name="assertions"/> <hfp:hasFacet name="explicitTimezone"/> <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/xmlschema11-2/#dateTime"/> </xs:annotation> <xs:restriction base="xs:anyAtomicType"> <xs:whiteSpace fixed="true" value="collapse" id="dateTime.whiteSpace"/> <xs:explicitTimezone value="optional" id="dateTime.explicitTimezone"/> </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:hasFacet name="assertions"/> <hfp:hasFacet name="explicitTimezone"/> <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/xmlschema11-2/#time"/> </xs:annotation> <xs:restriction base="xs:anyAtomicType"> <xs:whiteSpace fixed="true" value="collapse" id="time.whiteSpace"/> <xs:explicitTimezone value="optional" id="time.explicitTimezone"/> </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:hasFacet name="assertions"/> <hfp:hasFacet name="explicitTimezone"/> <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/xmlschema11-2/#date"/> </xs:annotation> <xs:restriction base="xs:anyAtomicType"> <xs:whiteSpace fixed="true" value="collapse" id="date.whiteSpace"/> <xs:explicitTimezone value="optional" id="date.explicitTimezone"/> </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:hasFacet name="assertions"/> <hfp:hasFacet name="explicitTimezone"/> <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/xmlschema11-2/#gYearMonth"/> </xs:annotation> <xs:restriction base="xs:anyAtomicType"> <xs:whiteSpace fixed="true" value="collapse" id="gYearMonth.whiteSpace"/> <xs:explicitTimezone value="optional" id="gYearMonth.explicitTimezone"/> </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:hasFacet name="assertions"/> <hfp:hasFacet name="explicitTimezone"/> <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/xmlschema11-2/#gYear"/> </xs:annotation> <xs:restriction base="xs:anyAtomicType"> <xs:whiteSpace fixed="true" value="collapse" id="gYear.whiteSpace"/> <xs:explicitTimezone value="optional" id="gYear.explicitTimezone"/> </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:hasFacet name="assertions"/> <hfp:hasFacet name="explicitTimezone"/> <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/xmlschema11-2/#gMonthDay"/> </xs:annotation> <xs:restriction base="xs:anyAtomicType"> <xs:whiteSpace fixed="true" value="collapse" id="gMonthDay.whiteSpace"/> <xs:explicitTimezone value="optional" id="gMonthDay.explicitTimezone"/> </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:hasFacet name="assertions"/> <hfp:hasFacet name="explicitTimezone"/> <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/xmlschema11-2/#gDay"/> </xs:annotation> <xs:restriction base="xs:anyAtomicType"> <xs:whiteSpace fixed="true" value="collapse" id="gDay.whiteSpace"/> <xs:explicitTimezone value="optional" id="gDay.explicitTimezone"/> </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:hasFacet name="assertions"/> <hfp:hasFacet name="explicitTimezone"/> <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/xmlschema11-2/#gMonth"/> </xs:annotation> <xs:restriction base="xs:anyAtomicType"> <xs:whiteSpace fixed="true" value="collapse" id="gMonth.whiteSpace"/> <xs:explicitTimezone value="optional" id="gMonth.explicitTimezone"/> </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:hasFacet name="assertions"/> <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/xmlschema11-2/#hexBinary"/> </xs:annotation> <xs:restriction base="xs:anyAtomicType"> <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:hasFacet name="assertions"/> <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/xmlschema11-2/#base64Binary"/> </xs:annotation> <xs:restriction base="xs:anyAtomicType"> <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:hasFacet name="assertions"/> <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/xmlschema11-2/#anyURI"/> </xs:annotation> <xs:restriction base="xs:anyAtomicType"> <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:hasFacet name="assertions"/> <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/xmlschema11-2/#QName"/> </xs:annotation> <xs:restriction base="xs:anyAtomicType"> <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:hasFacet name="assertions"/> <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/xmlschema11-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:anyAtomicType"> <xs:whiteSpace fixed="true" value="collapse" id="NOTATION.whiteSpace"/> </xs:restriction> </xs:simpleType> </xs:schema> The following, although in the form of a schema document, contains XML representations of components already present in all schemas by definition. It is included here as a form of documentation. Note: Issue (B-1933): It is an open question whether this and similar XML documents should be accepted or rejected by software conforming to this specification. The XML Schema Working Group expects to resolve this question in connection with its work on issues relating to schema composition. In the meantime, some existing schema processors will accept declarations for them; other existing processors will reject such declarations as duplicates. Illustrative schema document for derived built-in type definitions <?xml version='1.0'?> <!DOCTYPE xs:schema SYSTEM "../namespace/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>

]> <xs:schema xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xml:lang="en" targetNamespace="http://www.w3.org/2001/XMLSchema"> <xs:annotation> <xs:documentation> This document contains XML representations for the ordinary non-primitive built-in datatypes </xs:documentation> </xs:annotation> <xs:simpleType name="normalizedString" id="normalizedString"> <xs:annotation> <xs:documentation source="http://www.w3.org/TR/xmlschema11-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/xmlschema11-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/xmlschema11-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/bcp/bcp47.txt"> pattern specifies the content of section 2.12 of XML 1.0e2 and RFC 3066 (Revised version of RFC 1766). N.B. RFC 3066 is now obsolete; the grammar of RFC4646 is more restrictive. So strict conformance to the rules for language codes requires extra checking beyond validation against this type. </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:hasFacet name="assertions"/> <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/xmlschema11-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:hasFacet name="assertions"/> <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/xmlschema11-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/xmlschema11-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:hasFacet name="assertions"/> <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/xmlschema11-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/xmlschema11-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/xmlschema11-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/xmlschema11-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/xmlschema11-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/xmlschema11-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/xmlschema11-2/#integer"/> </xs:annotation> <xs:restriction base="xs:decimal"> <xs:fractionDigits fixed="true" value="0" id="integer.fractionDigits"/> <xs:pattern value="[\-+]?[0-9]+" id="integer.pattern"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="nonPositiveInteger" id="nonPositiveInteger"> <xs:annotation> <xs:documentation source="http://www.w3.org/TR/xmlschema11-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/xmlschema11-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/xmlschema11-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/xmlschema11-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/xmlschema11-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/xmlschema11-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/xmlschema11-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/xmlschema11-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/xmlschema11-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/xmlschema11-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/xmlschema11-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/xmlschema11-2/#positiveInteger"/> </xs:annotation> <xs:restriction base="xs:nonNegativeInteger"> <xs:minInclusive value="1" id="positiveInteger.minInclusive"/> </xs:restriction> </xs:simpleType>

<xs:simpleType name="yearMonthDuration"> <xs:annotation> <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#yearMonthDuration"> This type includes just those durations expressed in years and months. Since the pattern given excludes days, hours, minutes, and seconds, the values of this type have a seconds property of zero. They are totally ordered. </xs:documentation> </xs:annotation> <xs:restriction base="xs:duration"> <xs:pattern id="yearMonthDuration.pattern" value="[^DT]*"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="dayTimeDuration"> <xs:annotation> <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#dayTimeDuration"> This type includes just those durations expressed in days, hours, minutes, and seconds. The pattern given excludes years and months, so the values of this type have a months property of zero. They are totally ordered. </xs:documentation> </xs:annotation> <xs:restriction base="xs:duration"> <xs:pattern id="dayTimeDuration.pattern" value="[^YM]*(T.*)?"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="dateTimeStamp" id="dateTimeStamp"> <xs:annotation> <xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#dateTimeStamp"> This datatype includes just those dateTime values Whose explicitTimezone is present. They are totally ordered. </xs:documentation> </xs:annotation> <xs:restriction base="xs:dateTime"> <xs:explicitTimezone fixed="true" id="dateTimeStamp.explicitTimezone" value="required"/> </xs:restriction> </xs:simpleType>

</xs:schema> Some datatypes, such as integer properties In this document, the arguments to functions are assumed to be "call by value" unless explicitly noted to the contrary, meaning that if the argument is modified during the processing of the algorithm, that modification is not are Properties always have values. [Definition:] optional permitted required absent [Definition:] absent null Those values that are more primitive, and are used (among other things) herein to construct object value spaces but which we do not explicitly define are described here: A number (without precision) Function Definitions (§E) [Definition:] special value positiveInfinity negativeInfinity notANumber float double Note: float double · · · · The following standard operators are defined here in case the reader is unsure of their definition: [Definition:] m n m div n m n [Definition:] m n m mod n m n m · · n Note: n · · n Numerals and Fragments Thereof [45] digit 0-9 [46] unsignedNoDecimalPtNumeral digit [47] noDecimalPtNumeral + - unsignedNoDecimalPtNumeral [48] fracFrag digit [49] unsignedDecimalPtNumeral unsignedNoDecimalPtNumeral . fracFrag . fracFrag [50] unsignedFullDecimalPtNumeral unsignedNoDecimalPtNumeral . fracFrag [51] decimalPtNumeral + - unsignedDecimalPtNumeral [52] unsignedScientificNotationNumeral unsignedNoDecimalPtNumeral unsignedDecimalPtNumeral e E noDecimalPtNumeral [53] scientificNotationNumeral + - unsignedScientificNotationNumeral Generic Numeral-to-Number Lexical Mappings · · N Maps an unsignedNoDecimalPtNumeral · · N Maps an noDecimalPtNumeral · · D Maps an unsignedDecimalPtNumeral · · N Maps a decimalPtNumeral · · N Maps a scientificNotationNumeral Generic Number to Numeral Canonical Mappings · · i unsignedNoDecimalPtNumeral Maps a nonnegative integer to a unsignedNoDecimalPtNumeral · · · · i noDecimalPtNumeral Maps an integer to a noDecimalPtNumeral · · · · n unsignedDecimalPtNumeral Maps a nonnegative decimal number to a unsignedDecimalPtNumeral · · · · n decimalPtNumeral Maps a decimal number to a decimalPtNumeral · · · · n unsignedScientificNotationNumeral Maps a nonnegative decimal number to a unsignedScientificNotationNumeral · · · · n scientificNotationNumeral Maps a decimal number to a scientificNotationNumeral · · · · positiveInfinity negativeInfinity notANumber Special Non-numerical Lexical Representations Used With Numerical Datatypes [54] minimalNumericalSpecialRep INF -INF NaN [55] numericalSpecialRep +INF minimalNumericalSpecialRep Lexical Mapping for Non-numerical · · · · S · · Maps the · · · · · · Canonical Mapping for Non-numerical · · · · c numericalSpecialRep Maps the · · · · D.2.1 The Seven-property Model Lexical Mappings There are several different primitive but related datatypes defined in the specification which pertain to various combinations of dates and times, and parts thereof.  They all use related value-space models, which are described in detail in this section.  It is not difficult for a casual reader of the descriptions of the individual datatypes elsewhere in this specification to misunderstand some of the details of just what the datatypes are intended to represent, so more detail is presented here in this section. All of the value spaces for dates and times described here represent moments or periods of time in Universal Coordinated Time (UTC). [Definition:] Universal Coordinated Time UTC · · · · [Definition:] leap-second · · [International Earth Rotation Service (IERS)] [ITU-R TF.460-6] not Because the dateTime · · There are two distinct ways to model moments in time:  either by tracking their year, month, day, hour, minute and second (with fractional seconds as needed), or by tracking their time (measured generally in seconds or days) from some starting moment.  Each has its advantages.  The two are isomorphic.  For definiteness, we choose to model the first using five integer and one decimal number properties.  We superimpose the second by providing one decimal number-valued function which gives the corresponding count of seconds from zero (the "time on the time line"). There is also a seventh integer · · Properties of Date/time Seven-property Models · · an integer · · an integer between 1 and 12 inclusive · · an integer between 1 and 31 inclusive, possibly restricted further depending on · · · · · · an integer between 0 and 23 inclusive · · an integer between 0 and 59 inclusive · · a decimal number greater than or equal to 0 and less than 60. · · an · · Non-negative values of the properties map to the years, months, days of month, etc. of the Gregorian calendar in the obvious way. Values less than 1582 in the · · · · Note: · · · · In this version of this specification, two changes are made in order to agree with existing usage. First, · · · · · · [ISO 8601] Note that 1 BCE, 5 BCE, and so on (years 0000, −0004, etc. in the lexical representation defined here) are leap years in the proleptic Gregorian calendar used for the date/time datatypes defined here. Version 1.0 of this specification was unclear about the treatment of leap years before the common era. If existing schemas or data specify dates of 29 February for any years before the common era, then some values giving a date of 29 February which were valid under a plausible interpretation of XSD 1.0 will be invalid under this specification, and some which were invalid will be valid. With that possible exception, schemas and data valid under the old interpretation remain valid under the new. The model just described is called herein the "seven-property" model for date/time datatypes.  It is used "as is" for dateTime duration required absent · · · · permitted absent · · Note: Readers interested in when leap-seconds have been introduced should consult [USNO Historical List] · · · · While calculating, property values from the dateTime absent · · absent · · Time on Timeline for Date/time Seven-property Model Datatypes · · dt Maps a date/timeSevenPropertyModel duration · · · · absent · · · · absent [Definition:] date/time fragments Date/time Lexical Representation Fragments [56] yearFrag - 1-9 digit digit digit 0 digit digit digit [57] monthFrag 0 1-9 1 0-2 [58] dayFrag 0 1-9 12 digit 3 01 [59] hourFrag 01 digit 2 0-3 [60] minuteFrag 0-5 digit [61] secondFrag 0-5 digit . digit [62] endOfDayFrag 24:00:00 . 0 [63] timezoneFrag Z + - 0 digit 1 0-3 : minuteFrag 14:00 Each fragment other than timezoneFrag · · decimal · · decimal · · · · duration · · · · · · · · · · absent Partial Date/time Lexical Mappings · · YR Maps a yearFrag date/timeSevenPropertyModel · · · · date/timeSevenPropertyModel · · MO Maps a monthFrag date/timeSevenPropertyModel · · · · date/timeSevenPropertyModel · · DA Maps a dayFrag date/timeSevenPropertyModel · · · · date/timeSevenPropertyModel · · HR Maps a hourFrag date/timeSevenPropertyModel · · · · date/timeSevenPropertyModel · · MI Maps a minuteFrag date/timeSevenPropertyModel · · · · date/timeSevenPropertyModel · · SE Maps a secondFrag date/timeSevenPropertyModel · · · · date/timeSevenPropertyModel · · TZ Maps a timezoneFrag date/timeSevenPropertyModel · · · · date/timeSevenPropertyModel Note: Z +00:00 -00:00 0 secondFrag · · endOfDayFrag · · · · The following fragment · · · · duration Partial Date/time Canonical Mappings · · y yearFrag Maps an integer, presumably the · · date/timeSevenPropertyModel yearFrag date/timeSevenPropertyModel · · · · m monthFrag Maps an integer, presumably the · · date/timeSevenPropertyModel monthFrag date/timeSevenPropertyModel · · · · d dayFrag Maps an integer, presumably the · · date/timeSevenPropertyModel dayFrag date/timeSevenPropertyModel · · · · h hourFrag Maps an integer, presumably the · · date/timeSevenPropertyModel hourFrag date/timeSevenPropertyModel · · · · m minuteFrag Maps an integer, presumably the · · date/timeSevenPropertyModel minuteFrag date/timeSevenPropertyModel · · · · s secondFrag Maps a decimal number, presumably the · · date/timeSevenPropertyModel secondFrag date/timeSevenPropertyModel · · · · t timezoneFrag Maps an integer, presumably the · · date/timeSevenPropertyModel timezoneFrag date/timeSevenPropertyModel · · The more important functions and procedures defined here are summarized in the text  When there is a text summary, the name of the function in each is a "hot-link" to the same name in the other.  All other links to these functions link to the complete definition in this section. The following functions are used with various numeric and date/time datatypes. Auxiliary Functions for Operating on Numeral Fragments · · d Maps each digit to its numerical value. Arguments: d : matches digit Result: a nonnegative integer less than ten Algorithm: Return 0   when d 0 1   when d 1 2   when d 2 etc. · · S Maps a sequence of digits to the position-weighted sum of the terms numerical values. Arguments: S : a finite sequence of · · digit Result: a nonnegative integer Algorithm: Return the sum of · · S i length( S i i S · · S Maps a sequence of digits to the position-weighted sum of the terms numerical values, weighted appropriately for fractional digits. Arguments: S : a finite sequence of · · digit Result: a nonnegative integer Algorithm: Return the sum of · · S i − i i S · · N Maps a fracFrag Arguments: N : matches fracFrag Result: a nonnegative decimal number Algorithm: N S · · digit Return · · S Generic Numeral-to-Number Lexical Mappings · · N Maps an unsignedNoDecimalPtNumeral Arguments: N : matches unsignedNoDecimalPtNumeral Result: a nonnegative integer Algorithm: N S · · digit Return · · S · · N Maps an noDecimalPtNumeral Arguments: N : matches noDecimalPtNumeral Result: an integer Algorithm: N + - · · U unsignedNoDecimalPtNumeral Return −1 × · · U - · · U · · D Maps an unsignedDecimalPtNumeral Arguments: D : matches unsignedDecimalPtNumeral Result: a nonnegative decimal number Algorithm: D · · N unsignedNoDecimalPtNumeral · · F fracFrag Return · · N F · · F N · · N · · F · · N Maps a decimalPtNumeral Arguments: N : matches decimalPtNumeral Result: a decimal number Algorithm: N + - U unsignedDecimalPtNumeral Return − · · U - · · U · · N Maps a scientificNotationNumeral Arguments: N : matches scientificNotationNumeral Result: a decimal number Algorithm: N C noDecimalPtNumeral decimalPtNumeral e E E noDecimalPtNumeral Return · · C · · E . N · · C · · E Auxiliary Functions for Producing Numeral Fragments · · i digit Maps each integer between 0 and 9 to the corresponding digit Arguments: i : between 0 and 9 inclusive Result: matches digit Algorithm: Return ' 0 i ' 1 i ' 2 i etc. · · i Maps each nonnegative integer to a sequence of integers used by · · unsignedNoDecimalPtNumeral Arguments: i : a nonnegative integer Result: sequence of nonnegative integers Algorithm: Return that sequence s s 0 i s j s j · · · · i Maps each nonnegative integer to a sequence of integers used by · · unsignedNoDecimalPtNumeral Arguments: i : a nonnegative integer Result: sequence of integers where each term is between 0 and 9 inclusive Algorithm: Return that sequence s s j · · i j · · · · s Maps a sequence of nonnegative integers to the index of the first zero term. Arguments: s : a sequence of nonnegative integers Result: a nonnegative integer Algorithm: Return the smallest nonnegative integer j s i j · · f Maps each nonnegative decimal number less than 1 to a sequence of decimal numbers used by · · unsignedNoDecimalPtNumeral Arguments: f : nonnegative and less than 1 Result: a sequence of nonnegative decimal numbers Algorithm: Return that sequence s s 0 f s j s j · · · · f Maps each nonnegative decimal number less than 1 to a sequence of integers used by · · unsignedNoDecimalPtNumeral Arguments: f : nonnegative and less than 1 Result: a sequence of integer;s where each term is between 0 and 9 inclusive Algorithm: Return that sequence s s j · · f j · · · · f fracFrag Maps each nonnegative decimal number less than 1 to a · · · · unsignedDecimalPtNumeral Arguments: f : nonnegative and less than 1 Result: matches fracFrag Algorithm: Return · · · · f 0 · · · · f · · · · f Generic Number to Numeral Canonical Mappings · · i unsignedNoDecimalPtNumeral Maps a nonnegative integer to a unsignedNoDecimalPtNumeral · · Arguments: i : a nonnegative integer Result: matches unsignedNoDecimalPtNumeral Algorithm: Return · · · · i · · · · i · · · · i 0 · · i noDecimalPtNumeral Maps an integer to a noDecimalPtNumeral · · Arguments: i : an integer Result: matches noDecimalPtNumeral Algorithm: Return ' - · · i i · · i · · n unsignedDecimalPtNumeral Maps a nonnegative decimal number to a unsignedDecimalPtNumeral · · Arguments: n : a nonnegative decimal number Result: matches unsignedDecimalPtNumeral Algorithm: Return · · n · · . · · n · · · · n decimalPtNumeral Maps a decimal number to a decimalPtNumeral · · Arguments: n : a decimal number Result: matches decimalPtNumeral Algorithm: Return ' - · · i i · · i · · n unsignedScientificNotationNumeral Maps a nonnegative decimal number to a unsignedScientificNotationNumeral · · Arguments: n : a nonnegative decimal number Result: matches unsignedScientificNotationNumeral Algorithm: Return · · n log( n · · E · · n · · · · n scientificNotationNumeral Maps a decimal number to a scientificNotationNumeral · · Arguments: n : a decimal number Result: matches scientificNotationNumeral Algorithm: Return ' - · · n n · · i For example: 123.4567 · · · · · · · · · · · · · · 123 · · · · · · · · · · 4567 · · 123.4567 Lexical Mapping for Non-numerical · · · · S · · Maps the · · · · · · Arguments: S : matches numericalSpecialRep Result: one of positiveInfinity negativeInfinity notANumber Algorithm: Return positiveInfinity S INF +INF negativeInfinity S -INF notANumber S NaN Canonical Mapping for Non-numerical · · · · c numericalSpecialRep Maps the · · · · Arguments: c : one of positiveInfinity negativeInfinity notANumber Result: matches numericalSpecialRep Algorithm: Return ' INF c positiveInfinity ' -INF c negativeInfinity ' NaN c notANumber Lexical Mapping · · LEX decimal Maps a decimalLexicalRep decimal Arguments: LEX : matches decimalLexicalRep Result: a decimal Algorithm: Let d decimal Set d · · LEX LEX noDecimalPtNumeral · · LEX LEX decimalPtNumeral Return d Canonical Mapping · · d decimalLexicalRep Maps a decimal · · decimalLexicalRep Arguments: d : a decimal Result: a · · decimalLexicalRep Algorithm: If d · · d Otherwise, return · · d Auxiliary Functions for Binary Floating-point Lexical/Canonical Mappings · · nV cWidth eMin eMax · · Rounds a non-zero decimal number to the nearest floating-point value. Arguments: nV : an initially non-zero decimal number (may be set to zero during calculations) cWidth : a positive integer eMin : an integer eMax : an integer greater than eMin Result: a decimal number or · · ( INF INF Algorithm: Let s c e Set s nV So select e cWidth ( e nV cWidth e So select c c e nV c e when eMax e (overflow) positiveInfinity s negativeInfinity otherwise: When e eMin (underflow): Set e eMin So select c c e nV c e Set nV c e nV c e ( e ( c e nV c e ( e c e c e c c nV c e ( e Return s nV nV cWidth eMax positiveInfinity s negativeInfinity Note: [Clinger, WD (1990)] · · n k Maps a decimal number to that value rounded by some power of 10. Arguments: n : a decimal number k : a nonnegative integer Result: a decimal number Algorithm: Return  (( n k · · k · · c e j Maps a decimal number ( c e Arguments: c : a nonnegative integer e : an integer j : a nonnegative integer Result: a decimal number Algorithm: Return · · c j e Lexical Mapping · · LEX float Maps a floatRep float Arguments: LEX : matches floatRep Result: a float Algorithm: Let nV · · Return · · LEX LEX numericalSpecialRep otherwise ( LEX Set nV · · LEX LEX noDecimalPtNumeral · · LEX LEX decimalPtNumeral · · LEX LEX scientificNotationNumeral Set nV · · nV nV ( · · Return: When nV negativeZero LEX - positiveZero nV Note: [IEEE 754-2008] Lexical Mapping · · LEX double Maps a doubleRep double Arguments: LEX : matches doubleRep Result: a double Algorithm: Let nV · · Return · · LEX LEX numericalSpecialRep otherwise ( LEX Set nV · · LEX LEX noDecimalPtNumeral · · LEX LEX decimalPtNumeral · · LEX LEX scientificNotationNumeral Set nV · · nV nV ( · · Return: When nV negativeZero LEX - positiveZero nV Note: [IEEE 754-2008] Canonical Mapping · · f floatRep Maps a float · · floatRep Arguments: f : a float Result: a · · floatRep Algorithm: Let l s c e Return · · f f positiveInfinity negativeInfinity notANumber return ' 0.0E0 f positiveZero return ' -0.0E0 f negativeZero otherwise ( f Set s f Let c e f c e Let e 10 f c f c e Let l c e · · · · c e l Return · · s · · c e l Canonical Mapping · · f doubleRep Maps a double · · doubleRep Arguments: f : a double Result: a · · doubleRep Algorithm: Let l s c e Return · · f f positiveInfinity negativeInfinity notANumber return ' 0.0E0 f positiveZero return ' -0.0E0 f negativeZero otherwise ( f Set s f Let c e f c e Let e 10 f c f c e Let l c e · · · · c e l Return · · s · · c e l The following functions are primarily used with the duration Auxiliary duration · · Y Maps a duYearFrag · · duration Arguments: Y : matches duYearFrag Result: a nonnegative integer Algorithm: Y Y N Return · · N · · M Maps a duMonthFrag · · duration Arguments: M : matches duYearFrag Result: a nonnegative integer Algorithm: M M N Return · · N · · D Maps a duDayFrag · · duration Arguments: D : matches duDayFrag Result: a nonnegative integer Algorithm: D D N Return · · N · · H Maps a duHourFrag · · duration Arguments: H : matches duHourFrag Result: a nonnegative integer Algorithm: D D N Return · · N · · M Maps a duMinuteFrag · · duration Arguments: M : matches duMinuteFrag Result: a nonnegative integer Algorithm: M M N Return · · N · · S Maps a duSecondFrag · · duration Arguments: S : matches duSecondFrag Result: a nonnegative decimal number Algorithm: S S N Return · · N . N · · N · · YM Maps a duYearMonthFrag · · duration Arguments: YM : matches duYearMonthFrag Result: a nonnegative integer Algorithm: YM Y duYearFrag M duMonthFrag Let y · · Y Y m · · M M Return  12 × y m · · T Maps a duTimeFrag · · duration Arguments: T : matches duTimeFrag Result: a nonnegative decimal number Algorithm: T H duHourFrag M duMinuteFrag S duSecondFrag Let h · · H H m · · M M s · · S S Return  3600 × h m · · DT Maps a duDayTimeFrag · · duration Arguments: DT : matches duDayTimeFrag Result: a nonnegative decimal number Algorithm: DT D duDayFrag T duTimeFrag Let d · · D D t · · T T Return  86400 × d t The duration · · DUR duration Separates the durationLexicalRep · · · · duration Arguments: DUR : matches durationLexicalRep Result: a complete duration Algorithm: DUR - P Y duYearMonthFrag D duDayTimeFrag Return a duration · · 0   if Y − · · Y - Y · · Y · · 0   if D − · · D - D · · D The yearMonthDuration · · YM yearMonthDuration Maps the lexical representation into the · · yearMonthDuration yearMonthDuration · · · · · · Arguments: YM : matches yearMonthDurationLexicalRep Result: a complete yearMonthDuration Algorithm: YM - P Y duYearMonthFrag Return a yearMonthDuration · · − · · Y - YM · · Y · · The dayTimeDuration · · DT dayTimeDuration Maps the lexical representation into the · · dayTimeDuration dayTimeDuration · · · · · · Arguments: DT : a dayTimeDuration Result: a complete dayTimeDuration Algorithm: DT - P D duDayTimeFrag Return a dayTimeDuration · · · · − · · D - DT · · D Auxiliary duration · · ym duYearMonthFrag Maps a nonnegative integer, presumably the absolute value of the · · duration duYearMonthFrag duration · · Arguments: ym : a nonnegative integer Result: a · · duYearMonthFrag Algorithm: Let y ym · · m ym · · Return · · y Y · · m M y m · · y Y y m · · m M y · · d duDayFrag Maps a nonnegative integer, presumably the day normalized value from the · · duration duDayFrag duration · · Arguments: d : a nonnegative integer Result: a · · duDayFrag Algorithm: Return · · d D d the empty string ('')   when d · · h duHourFrag Maps a nonnegative integer, presumably the hour normalized value from the · · duration duHourFrag duration · · Arguments: h : a nonnegative integer Result: a · · duHourFrag Algorithm: Return · · h H h the empty string ('')   when h · · m duMinuteFrag Maps a nonnegative integer, presumably the minute normalized value from the · · duration duMinuteFrag duration · · Arguments: m : a nonnegative integer Result: a · · duMinuteFrag Algorithm: Return · · m M m the empty string ('')   when m · · s duSecondFrag Maps a nonnegative decimal number, presumably the second normalized value from the · · duration duSecondFrag duration · · Arguments: s : a nonnegative decimal number Result: matches duSecondFrag Algorithm: Return · · s S s · · s S s the empty string ('') when s · · h m s duTimeFrag Maps three nonnegative numbers, presumably the hour, minute, and second normalized values from a duration · · duTimeFrag duration · · Arguments: h : a nonnegative integer m : a nonnegative integer s : a nonnegative decimal number Result: a · · duTimeFrag Algorithm: Return ' T · · h · · m · · s h m s the empty string ('') when all arguments are zero. · · ss duDayTimeFrag Maps a nonnegative decimal number, presumably the absolute value of the · · duration duDayTimeFrag duration · · Arguments: ss : a nonnegative decimal number Result: matches duDayTimeFrag Algorithm: Let d ss · · h ss · · · · m ss · · · · s ss · · Return · · d · · h m s ss ' T0S ss The duration · · v durationLexicalRep Maps a duration durationLexicalRep durationLexicalRep Arguments: v : a complete duration Result: matches durationLexicalRep Algorithm: Let m v · · s v · · sgn - m s Return sgn P · · m · · s m s sgn P · · m m s sgn P · · s m The yearMonthDuration · · ym yearMonthDurationLexicalRep Maps a yearMonthDuration · · yearMonthDurationLexicalRep · · · · · · Arguments: ym : a complete yearMonthDuration Result: matches yearMonthDurationLexicalRep Algorithm: Let m ym · · sgn - m Return sgn P · · m The dayTimeDuration · · dt dayTimeDurationLexicalRep Maps a dayTimeDuration · · dayTimeDurationLexicalRep · · · · · · Arguments: dt : a complete dayTimeDuration Result: matches dayTimeDurationLexicalRep Algorithm: Let s dt · · sgn - s Return sgn P · · s E.3.1 Normalization of property values Auxiliary Functions Adding durations to dateTimes Time on timeline Lexical mappings Canonical Mappings When adding and subtracting numbers from date/time properties, the immediate results may not conform to the limits specified.  Accordingly, the following procedures are used to "normalize" potential property values to corresponding values that do conform to the appropriate limits.  Normalization is required when dealing with time zone offset changes (as when converting to · · duration dateTime Date/time Datatype Normalizing Procedures · · yr mo If month ( mo yr Arguments: yr : an integer mo : an integer Algorithm: Add  ( mo · · yr Set mo mo · · · · yr mo da If month ( mo da Arguments: yr : an integer mo : an integer da : an integer Algorithm: · · yr mo Repeat until da · · yr mo If da · · yr mo Subtract that limit from da Add 1 to mo · · yr mo If da Subtract 1 from mo · · yr mo Add the new upper limit from the table to da · · yr mo da hr mi Normalizes minute, hour, month, and year values to values that obey the appropriate constraints. Arguments: yr : an integer mo : an integer da : an integer hr : an integer mi : an integer Algorithm: Add mi · · hr Set mi mi · · Add hr · · da Set hr hr · · · · yr mo da · · yr mo da hr mi se Normalizes second, minute, hour, month, and year values to values that obey the appropriate constraints.  (This algorithm ignores leap seconds.) Arguments: yr : an integer mo : an integer da : an integer hr : an integer mi : an integer se : a decimal number Algorithm: Add se · · mi Set se se · · · · yr mo da hr mi Date/time Auxiliary Functions · · y m Returns the number of the last day of the month for any combination of year and month. Arguments: y : an · · m : an integer between 1 and 12 Result: between 28 and 31 inclusive Algorithm: Return: 28   when m y absent 29   when m y 30   when m 31   otherwise ( m · · Yr Mo Da Hr Mi Se Tz date/timeSevenPropertyModel Returns an instance of the date/timeSevenPropertyModel absent Arguments: Yr : an · · Mo : an · · Da : an · · Hr : an · · Mi : an · · Se : an · · Tz : an · · Result: Algorithm: Let dt date/timeSevenPropertyModel yr Yr Yr absent mo Mo Mo absent da Da Da absent hr Hr Hr absent mi Mi Mi absent se Se Se absent · · yr mo da hr mi se Set the · · dt absent Yr absent yr Set the · · dt absent Mo absent mo Set the · · dt absent Da absent da Set the · · dt absent Hr absent hr Set the · · dt absent Mi absent mi Set the · · dt absent Se absent se Set the · · dt Tz Return dt Given a dateTime S duration D · · dateTime E E S D E S D dateTime duration date gYearMonth gYear gDay gMonth dateTime dateTime dateTime Essentially, this calculation adds the · · · · duration dateTime · · dateTime pinned · · Leap seconds are ignored by the computation. All calculations use 60 seconds per minute. 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. 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 · · [International Earth Rotation Service (IERS)] [U.S. Naval Observatory Time Service Department] Adding duration dateTime · · du dt dateTime Adds a duration dateTime dateTime Arguments: du : a duration dt : a dateTime Result: a dateTime Algorithm: Let yr dt · · mo dt · · da dt · · hr dt · · mi dt · · se dt · · tz dt · · Add du · · mo · · yr mo Set da da · · yr mo pin Add du · · se · · yr mo da hr mi se Return · · yr mo da hr mi se tz This algorithm may be applied to date/time types other than dateTime For each absent Call the function. For each property absent absent Examples: dateTime duration result 2000-01-12T12:13:14Z P1Y3M5DT7H10M3.3S 2001-04-17T19:23:17.3Z 2000-01 -P3M 1999-10 2000-01-12 PT33H 2000-01-13 Note that the addition defined by · · is ((dateTime + duration1) + duration2) != ((dateTime + duration2) + duration1) Example: (2000-03-30 + P1D) + P1M = 2000-03-31 + P1M = 2000- 04-30 (2000-03-30 + P1M) + P1D = 2000-04-30 + P1D = 2000- 05-01 Time on Timeline for Date/time Seven-property Model Datatypes · · dt Maps a date/timeSevenPropertyModel Arguments: dt : a date/timeSevenPropertyModel Result: a decimal number Algorithm: Let yr dt · · absent dt · · mo dt · · da · · yr mo dt · · hr dt · · mi dt · · se dt · · Subtract · · mi · · absent ( · · Set ToTl yr (Leap-year Days, · · · · Add  86400 × ( yr · · yr · · yr · · ToTl Add   86400 × Sum m mo · · yr m ToTl Add   86400 × da ToTl ( · · · · · · Add  3600 × hr mi se ToTl Return ToTl Partial Date/time Lexical Mappings · · YR Maps a yearFrag date/timeSevenPropertyModel · · · · date/timeSevenPropertyModel Arguments: YR : matches yearFrag Result: an integer Algorithm: Return · · YR · · MO Maps a monthFrag date/timeSevenPropertyModel · · · · date/timeSevenPropertyModel Arguments: MO : matches monthFrag Result: an integer Algorithm: Return · · MO · · DA Maps a dayFrag date/timeSevenPropertyModel · · · · date/timeSevenPropertyModel Arguments: DA : matches dayFrag Result: an integer Algorithm: Return · · DA · · HR Maps a hourFrag date/timeSevenPropertyModel · · · · date/timeSevenPropertyModel Arguments: HR : matches hourFrag Result: an integer Algorithm: Return · · HR · · MI Maps a minuteFrag date/timeSevenPropertyModel · · · · date/timeSevenPropertyModel Arguments: MI : matches minuteFrag Result: an integer Algorithm: Return · · MI · · SE Maps a secondFrag date/timeSevenPropertyModel · · · · date/timeSevenPropertyModel Arguments: SE : matches secondFrag Result: a decimal number Algorithm: Return · · SE SE · · SE · · TZ Maps a timezoneFrag date/timeSevenPropertyModel · · · · date/timeSevenPropertyModel Arguments: TZ : matches timezoneFrag Result: an integer Algorithm: TZ Z + - H hourFrag M minuteFrag Return 0   when TZ Z −( · · H · · M - · · H · · M Note: · · endOfDayFrag · · · · Lexical Mapping · · LEX dateTime Maps a dateTimeLexicalRep dateTime Arguments: LEX : matches dateTimeLexicalRep Result: a complete dateTime Algorithm: LEX yearFrag monthFrag dayFrag Y MO D hourFrag minuteFrag secondFrag Y MI S endOfDayFrag timezoneFrag T Let tz · · T T absent Return · · · · Y · · MO · · D tz endOfDayFrag · · · · Y · · MO · · D · · H · · MI · · S tz Lexical Mapping · · LEX time Maps a timeLexicalRep time Arguments: LEX : matches timeLexicalRep Result: a complete time Algorithm: LEX hourFrag minuteFrag secondFrag H M S endOfDayFrag timezoneFrag T Let tz · · T T absent Return · · absent absent absent tz endOfDayFrag · · absent absent absent · · H · · MI · · S tz Lexical Mapping · · LEX date Maps a dateLexicalRep date Arguments: LEX : matches dateLexicalRep Result: a complete date Algorithm: LEX Y yearFrag M monthFrag D dayFrag T timezoneFrag Let tz · · T T absent Return · · · · Y · · M · · D absent absent absent tz Lexical Mapping · · LEX gYearMonth Maps a gYearMonthLexicalRep gYearMonth Arguments: LEX : matches gYearMonthLexicalRep Result: a complete gYearMonth Algorithm: LEX Y yearFrag M monthFrag T timezoneFrag Let tz · · T T absent Return · · · · Y · · M absent absent absent absent tz Lexical Mapping · · LEX gYear Maps a gYearLexicalRep gYear Arguments: LEX : matches gYearLexicalRep Result: a complete gYear Algorithm: LEX Y yearFrag T timezoneFrag Let tz · · T T absent Return · · · · Y absent absent absent absent absent tz Lexical Mapping · · LEX gMonthDay Maps a gMonthDayLexicalRep gMonthDay Arguments: LEX : matches gMonthDayLexicalRep Result: a complete gMonthDay Algorithm: LEX M monthFrag D dayFrag T timezoneFrag Let tz · · T T absent Return · · absent · · M · · D absent absent absent tz Lexical Mapping · · LEX gDay Maps a gDayLexicalRep gDay Arguments: LEX : matches gDayLexicalRep Result: a complete gDay Algorithm: LEX D dayFrag T timezoneFrag Let tz · · T T absent Return · · gD absent absent · · D absent absent absent tz · · absent absent · · D absent absent absent tz Lexical Mapping · · LEX gMonth Maps a gMonthLexicalRep gMonth Arguments: LEX : matches gMonthLexicalRep Result: a complete gMonth Algorithm: LEX M monthFrag T timezoneFrag Let tz · · T T absent Return · · absent · · M absent absent absent absent tz Auxiliary Functions for Date/time Canonical Mappings · · i unsignedNoDecimalPtNumeral Maps a nonnegative integer less than 100 onto an unsigned always-two-digit numeral. Arguments: i : a nonnegative integer less than 100 Result: matches unsignedNoDecimalPtNumeral Algorithm: Return · · i · · · · i · · · · i noDecimalPtNumeral Maps an integer between -10000 and 10000 onto an always-four-digit numeral. Arguments: i : an integer whose absolute value is less than 10000 Result: matches noDecimalPtNumeral Algorithm: Return ' - · · i · · · · i · · i · · i · · · · i · · Partial Date/time Canonical Mappings · · y yearFrag Maps an integer, presumably the · · date/timeSevenPropertyModel yearFrag date/timeSevenPropertyModel · · Arguments: y : an integer Result: matches yearFrag Algorithm: Return · · y y · · y · · m monthFrag Maps an integer, presumably the · · date/timeSevenPropertyModel monthFrag date/timeSevenPropertyModel · · Arguments: m : an integer between 1 and 12 inclusive Result: matches monthFrag Algorithm: Return · · m · · d dayFrag Maps an integer, presumably the · · date/timeSevenPropertyModel dayFrag date/timeSevenPropertyModel · · Arguments: d : an integer between 1 and 31 inclusive  (may be limited further depending on associated · · · · Result: matches dayFrag Algorithm: Return · · d · · h hourFrag Maps an integer, presumably the · · date/timeSevenPropertyModel hourFrag date/timeSevenPropertyModel · · Arguments: h : an integer between 0 and 23 inclusive. Result: matches hourFrag Algorithm: Return · · h · · m minuteFrag Maps an integer, presumably the · · date/timeSevenPropertyModel minuteFrag date/timeSevenPropertyModel · · Arguments: m : an integer between 0 and 59 inclusive. Result: matches minuteFrag Algorithm: Return · · m · · s secondFrag Maps a decimal number, presumably the · · date/timeSevenPropertyModel secondFrag date/timeSevenPropertyModel · · Arguments: s : a nonnegative decimal number less than 70 Result: matches secondFrag Algorithm: Return · · s s · · s · · . · · s · · · · t timezoneFrag Maps an integer, presumably the · · date/timeSevenPropertyModel timezoneFrag date/timeSevenPropertyModel · · Arguments: t : an integer between −840 and 840 inclusive Result: matches timezoneFrag Algorithm: Return ' Z t ' - · · t · · : · · t · · t ' + · · t · · : · · t · · Canonical Mapping · · dt dateLexicalRep Maps a dateTime dateTimeLexicalRep Arguments: dt : a complete dateTime Result: matches dateLexicalRep Algorithm: Let DT · · dt · · - · · dt · · - · · dt · · T · · dt · · : · · dt · · : · · dt · · Return DT dt · · absent DT · · dt · · Canonical Mapping · · ti timeLexicalRep Maps a time timeLexicalRep Arguments: ti : a complete time Result: matches timeLexicalRep Algorithm: Let T · · ti · · : · · ti · · : · · ti · · Return T ti · · absent T · · ti · · Canonical Mapping · · da dateLexicalRep Maps a date dateLexicalRep Arguments: da : a complete date Result: matches dateLexicalRep Algorithm: Let D · · da · · - · · da · · - · · da · · Return D da · · absent D · · da · · Canonical Mapping · · ym gYearMonthLexicalRep Maps a gYearMonth gYearMonthLexicalRep Arguments: ym : a complete gYearMonth Result: matches gYearMonthLexicalRep Algorithm: Let YM · · ym · · - · · ym · · Return YM ym · · absent YM · · ym · · Canonical Mapping · · gY gYearLexicalRep Maps a gYear gYearLexicalRep Arguments: gY : a complete gYear Result: matches gYearLexicalRep Algorithm: Return · · gY · · gY · · absent · · gY · · · · gY · · Canonical Mapping · · md gMonthDayLexicalRep Maps a gMonthDay gMonthDayLexicalRep Arguments: md : a complete gMonthDay Result: matches gMonthDayLexicalRep Algorithm: Let MD -- · · md · · - · · md · · Return MD md · · absent MD · · md · · Canonical Mapping · · gD gDayLexicalRep Maps a gDay gDayLexicalRep Arguments: gD : a complete gDay Result: matches gDayLexicalRep Algorithm: Return ' --- · · gD · · gD · · absent ' --- · · gD · · · · gD · · Canonical Mapping · · gM gMonthLexicalRep Maps a gMonth gMonthLexicalRep Arguments: gM : a complete gMonth Result: matches gMonthLexicalRep Algorithm: Return ' -- · · gM · · gM · · absent ' -- · · gM · · · · gM · · The following functions are used with various datatypes neither numeric nor date/time related. Lexical Mapping · · LEX string Maps a · · stringRep string Arguments: LEX : a · · stringRep Result: A string Algorithm: Return LEX Lexical Mapping · · LEX boolean Maps a · · booleanRep boolean Arguments: LEX : a · · booleanRep Result: A boolean Algorithm: Return true LEX true 1 false LEX false 0 Canonical Mapping · · s stringRep Maps a string stringRep Arguments: s : a string Result: matches stringRep Algorithm: Return s Canonical Mapping · · b booleanRep Maps a boolean booleanRep Arguments: b : a boolean Result: matches booleanRep Algorithm: Return ' true b true ' false b false hexBinary The · · hexBinary Lexical Mapping for hexBinary · · LEX hexBinary Maps a · · hexBinary hexBinary Arguments: LEX : a · · hexBinary Result: A sequence of binary octets in the form of a hexBinary Algorithm: LEX hexOctet Let o · · hexOctet LEX Return o The auxiliary functions · · · · · · Mappings for hexadecimal digits · · LEX Maps a · · hexOctet Arguments: LEX : a · · hexOctet Result: A single binary octet Algorithm: LEX Let d0 LEX d1 LEX Return the octet whose four high-order bits are · · d0 · · d1 · · d Maps a hexadecimal digit (a character matching the hexDigit Arguments: d : a hexadecimal digit Result: a sequence of four binary digits Algorithm: Return 0000 when d 0 0001 when d 1 0010 when d 2 0011 when d 3 ... 1110 when d E e 1111 when d F f The · · hexBinary Canonical Mapping for hexBinary · · o hexBinary Maps a hexBinary hexBinary Arguments: o : a hexBinary Result: matches hexBinary Algorithm: Let h · · o Return h Auxiliary procedures for canonical mapping of hexBinary · · o hexOctet Maps a binary octet to a literal matching the hexOctet Arguments: o : a binary octet Result: matches hexOctet Algorithm: Let lo o hi Return · · hi · · lo · · d hexDigit Maps a four-bit sequence to a hexadecimal digit (a literal matching the hexDigit Arguments: d : a sequence of four binary digits Result: matches hexDigit Algorithm: Return ' 0 d ' 1 d ' 2 d ' 3 d ... ' E d ' F d The following table shows the values of the fundamental facets for each · · Datatype ordered bounded cardinality numeric primitive string false false countably infinite false boolean false false finite false float partial true finite true double partial true finite true decimal total false countably infinite true duration partial false countably infinite false dateTime partial false countably infinite false time partial false countably infinite false date partial false countably infinite false gYearMonth partial false countably infinite false gYear partial false countably infinite false gMonthDay partial false countably infinite false gDay partial false countably infinite false gMonth partial false countably infinite false hexBinary false false countably infinite false base64Binary false false countably infinite false anyURI false false countably infinite false QName false false countably infinite false NOTATION false false countably infinite false non-primitive normalizedString false false countably infinite false token false false countably infinite false language false false countably infinite false IDREFS false false countably infinite false ENTITIES false false countably infinite false NMTOKEN false false countably infinite false NMTOKENS false false countably infinite false Name false false countably infinite false NCName false false countably infinite false ID false false countably infinite false IDREF false false countably infinite false ENTITY false false countably infinite false integer total false countably infinite true nonPositiveInteger total false countably infinite true negativeInteger total false countably infinite true long total true finite true int total true finite true short total true finite true byte total true finite true nonNegativeInteger total false countably infinite true unsignedLong total true finite true unsignedInt total true finite true unsignedShort total true finite true unsignedByte total true finite true positiveInteger total false countably infinite true yearMonthDuration partial false countably infinite false dayTimeDuration partial false countably infinite false dateTimeStamp partial false countably infinite false A · · R L R · · R L R · · Note: · · · · · · string A Z <simpleType name='myString'> <restriction base='string'> <pattern value='A.*Z'/> </restriction> </simpleType> In regular expression languages that are not implicitly anchored at the head and tail, it is customary to write the equivalent regular expression as: ^A.*Z$ ^ $ In those rare cases where an unanchored match is desired, including ' .* · · A <simpleType name='myString'> <restriction base='string'> <pattern value='.*AAA.*'/> </restriction> </simpleType> [Definition:] regular expression · · | Regular Expression regExp ::= branch branch For all · · S · · T · · R Denoting the set of strings L R (empty string) just the empty string S all strings in L S S | T all strings in L S L T [Definition:] branch · · Branch branch ::= piece For all · · S · · T · · R Denoting the set of strings L R S all strings in L S S T all strings s t s L S t L T [Definition:] piece · · · · Piece piece ::= atom quantifier For all · · S n m n m · · R Denoting the set of strings L R S all strings in L S S ? the empty string, and all strings in L S S * all strings in L S ? s t s L S * t L S (all concatenations of zero or more strings from L S S + all strings s t s L S t L S * (all concatenations of one or more strings from L S S { n , m } all strings s t s L S t L S { n , m } (all concatenations of at least n m L S S { n } all strings in L S { n , n } (all concatenations of exactly n L S S { n ,} all strings in L S { n } S * (all concatenations of at least n L S S {0, m } all strings s t s L S ? t L S { , m } (all concatenations of at most m L S S {0,0} only the empty string Note: [Perl] S {, m } S {0, m } [Definition:] quantifier ? * + { n , m } { n ,} Quantifier quantifier ::= [?*+] | ( '{' quantity quantity ::= quantRange quantMin QuantExact quantRange ::= QuantExact QuantExact quantMin ::= QuantExact QuantExact ::= [0-9]+ [Definition:] atom · · · · · · Atom atom ::= NormalChar charClass regExp For all · · c · · C · · S · · R Denoting the set of strings L R c the single string consisting only of c C all strings in L C ( S ) L S [Definition:] metacharacter . \ ? * + { } ( ) | [ ] · · · · metacharacter · · [Definition:] normal character · · · · normal character · · Normal Character NormalChar ::= [^.\?*+{}()|#x5B#x5D] /*  N.B.:  #x5B = ' [ ] G.4.1 Character class expressions Character Class Escapes Single-character escapes Category escapes Block escapes Unrecognized category escapes Multi-character escapes [Definition:] character class · · R C R L R R c c C R Character Class charClass ::= SingleCharEsc charClassEsc charClassExpr WildcardEsc A character class is either a · · · · · · · · Note: · · · · · · [Definition:] character class expression charClassExpr · · [ ] G [ G ] character class expression C [ G ] C G Character Class Expression charClassExpr ::= '[' charGroup [Definition:] character group charGroup · · · · - · · [Definition:] · · character class subtraction Character Group charGroup ::= ( posCharGroup negCharGroup charClassExpr If the first character in a charGroup ^ charGroup negCharGroup posCharGroup ^ negCharGroup ^ ^ Note: [^X] X X ^ The string ' [^] ^ [^] must not A ' - posCharGroup negCharGroup [ For any · · · · G · · C G - C · · C G C C [Definition:] positive character group · · positive character group · · Positive Character Group posCharGroup ::= ( charGroupPart For all · · R · · E · · P · · G Identifying the set of characters C G R all characters in C R E all characters in C E R P all characters in C R C P E P all characters in C E C P [Definition:] negative character group negCharGroup ^ · · C ^ P not C P Negative Character Group negCharGroup ::= '^' posCharGroup [Definition:] character group part charGroupPart SingleCharNoEsc SingleCharEsc charClassEsc charRange Character Group Part charGroupPart ::= singleChar charRange charClassEsc singleChar ::= SingleCharEsc SingleCharNoEsc If a charGroupPart singleChar If the hyphen is immediately followed by ' [ charGroupPart If the hyphen is immediately followed by ' ] singleChar charGroupPart If the hyphen is immediately followed by ' -[ singleChar charGroupPart Otherwise, the hyphen must singleChar charGroupPart singleChar charRange If the hyphen is followed by any other character sequence, then the string in which it occurs is not recognized as a regular expression. singleChar charRange SingleCharNoEsc Note: [a-k-z] [--z] [Definition:] character range R C R Character Range charRange ::= singleChar singleChar A · · s - e s e Single Unescaped Character SingleCharNoEsc ::= [^\#x5B#x5D] /*  N.B.:  #x5B = ' [ ] A single unescaped character ( SingleCharNoEsc [ ] - ^ A single unescaped character identifies the singleton set of characters containing that character alone. A single escaped character ( SingleCharEsc Character Class Escapes (§G.4.2) [Definition:] character class escape · · · · · · Character Class Escape charClassEsc ::= ( MultiCharEsc catEsc complEsc Closely related to the character-class escapes are the single-character escapes. [Definition:] single-character escape · · Single Character Escape SingleCharEsc ::= '\' [nrt\|.?*+(){}#x2D#x5B#x5D#x5E] /* N.B.:  #x2D = ' - [ ] ^ The valid · · R Identifying the set of characters

containing: \n the newline character (#xA) \r the return character (#xD) \t the tab character (#x9) \\ \ \| | \. . \- - \^ ^ \? ? \* * \+ + \{ { \} } \( ( \) ) \[ [ \] ] [Definition:] [Unicode Database] X category escape \p{ X } category escape \P{ X } X X [\P{ X [^\p{ X Category Escape catEsc ::= '\p{' charProp complEsc ::= '\P{' charProp charProp ::= IsCategory IsBlock [Unicode Database] · · must [Unicode Database] Normative (§K.1) · · Note: · · PropertyAliases.txt PropertyValueAliases.txt For convenience, the following table lists the values of the "General Category" property in the version of [Unicode Database] Normative (§K.1) [Unicode Database] N Nd Nl No Note: not Cn C Category Property Meaning Letters L All Letters Lu uppercase Ll lowercase Lt titlecase Lm modifier Lo other Marks M All Marks Mn nonspacing Mc spacing combining Me enclosing Numbers N All Numbers Nd decimal digit Nl letter No other Punctuation P All Punctuation Pc connector Pd dash Ps open Pe close Pi initial quote (may behave like Ps or Pe depending on usage) Pf final quote (may behave like Ps or Pe depending on usage) Po other Separators Z All Separators Zs space Zl line Zp paragraph Symbols S All Symbols Sm math Sc currency Sk modifier So other Other C All Others Cc control Cf format Co private use Cn not assigned Categories IsCategory ::= Letters Marks Numbers Punctuation Separators Symbols Others Letters ::= 'L' [ultmo]? Marks ::= 'M' [nce]? Numbers ::= 'N' [dlo]? Punctuation ::= 'P' [cdseifo]? Separators ::= 'Z' [slp]? Symbols ::= 'S' [mcko]? Others ::= 'C' [cfon]? Note: [Unicode Database] · · [Definition:] normalized block name [Unicode Database] [Definition:] block escape B · · X B block escape \p{Is X block escape \P{Is X X X [\P{Is X }] [^\p{Is X }] Block Escape IsBlock ::= 'Is' [a-zA-Z0-9#x2D]+ /*  N.B.:  #x2D = ' - · · \p{IsBasicLatin} Note: BasicLatin -- basic LATIN -- The handling of block names in block escapes differs from this behavior in two ways. First, the normalized block names defined in this specification do not suppress hyphens in the Unicode block names and do not level case distinctions. The normalized form of the block name ' Latin-1 Supplement Latin-1Supplement latin1supplement LATIN1SUPPLEMENT · · \p{Latin-1Supplement} \p{Is Latin-1 supplement} [Unicode Database] · · must [Unicode Database] Normative (§K.1) · · In particular, the version of [Unicode Database] · · #x0370 - #x03FF: Greek #x20D0 - #x20FF: CombiningMarksforSymbols #xE000 - #xF8FF: PrivateUse #xF0000 - #xFFFFD: PrivateUse #x100000 - #x10FFFD: PrivateUse A tabulation of normalized block names for Unicode 2.0.0 and later is given in [Unicode block names] For the treatment of regular expressions containing unrecognized Unicode block names, see Unrecognized category escapes (§G.4.2.4) A string of the form " \p{ S catEsc \P{ S complEsc S IsCategory IsBlock Note: IsBlock regExp regExp · · Any string of hyphens, digits, and Basic Latin characters beginning with ' Is IsBlock should may · · · · Note: [Unicode Database] If a string " Is X IsBlock X \p{Is X \P{Is X may · · \p{Is X \P{Is X Note: .|[\n\r] If (at · · Which behavior is preferable in concrete circumstances depends on the relative cost of failure to accept valid input (false negatives) and failure to reject invalid input (false positives). It is for this reason that processors are allowed to provide · · [Definition:] multi-character escape [Definition:] wildcard character Multi-Character Escape MultiCharEsc ::= '\' [sSiIcCdDwW] WildcardEsc ::= '.' Character sequence Equivalent · · . [^\n\r] \s [#x20\t\n\r] \S [^\s] \i the set of initial name characters, those · · NameStartChar [XML] \I [^\i] \c the set of name characters, those · · NameChar \C [^\c] \d \p{Nd} \D [^\d] \w [#x0000-#x10FFFF]-[\p{P}\p{Z}\p{C}] ( all characters except the set of "punctuation", "separator" and "other" characters \W [^\w] Note: · · [Unicode Regular Expression Guidelines] The following features in this specification are · · XSD 1.1: Datatypes must For the datatypes which depend on [XML] [Namespaces in XML] · · [XML] [Namespaces in XML] [XML 1.0] [Namespaces in XML 1.0] may For the datatypes with infinite · · · · must must Partial Implementation of Infinite Datatypes (§5.4) It is · · · · For each · · Simple Type Definition must Built-in Simple Type Definitions (§4.1.6) In addition, the following information must The nature of the datatype's · · · · · · The nature of the equality relation; in particular, how to determine whether two values which are not identical are equal. Note: may The values of the · · Which of the · · may · · If · · · · · · What URI reference (more precisely, what anyURI Built-in Datatypes and Their Definitions (§3) Note: expanded name · · Built-in Datatypes and Their Definitions (§3) For each · · · · anyURI · · Built-in Datatypes and Their Definitions (§3) Note: whiteSpace The · · · · must · · The · · · · must · · · · · · · · must must · · may For consistency with the · · · · should · · · · The implementor should · · It is · · · · For each · · must What properties the facet has, viewed as a schema component. Note: · · · · may Whether the facet is a · · · · · · Whether restriction of the facet takes the form of replacing a less restrictive facet value with a more restrictive value (as in the · · · · · · must When an · · · · must Note: · · · · · · What · · · · For a · · · · For a · · · · · · For a · · · · For a · · · · Note: may · · · · · · · · · · What URI reference (more precisely, what anyURI Built-in Datatypes and Their Definitions (§3) What element is to be used in XSD schema documents to apply the facet in the course of · · must · · should xs:facet Note: expanded names [XSD 1.1 Part 1: Structures] · · · · must not · · whiteSpace · · It is · · [Unicode Database] Normative (§K.1) · · It is · · · · It is · · · · Note: · · · · · · expanded name expanded names [XSD 1.1 Part 1: Structures] The following features in this specification are · · XSD 1.1: Datatypes may When multiple errors are encountered in type definitions or elsewhere, it is · · In order to align this specification with those being prepared by the XSL and XML Query Working Groups, a new datatype named anyAtomicType · · · · The treatment of datatypes has been made more precise and explicit; most of these changes affect the section on Datatype System (§2) The (numeric) equality of values is now distinguished from the identity of the values themselves; this allows float double The {value} bounded list false · · Units of length have been specified for all datatypes that are permitted the length constraining facet. The use of the namespace http://www.w3.org/2001/XMLSchema-datatypes An assertions [XSD 1.1 Part 1: Structures] The discussion of whitespace handling in whiteSpace (§4.3.6) collapse · · Conforming implementations may · · As noted above, positive and negative zero, float double The description of the lexical spaces of unsignedLong unsignedInt unsignedShort unsignedByte The float double The character sequence ' +INF float double The treatment of dateTime [XQuery 1.0 and XPath 2.0 Functions and Operators] At the suggestion of the W3C OWL Working Group explicitTimezone dateTimeStamp The treatment of the date/time datatype includes a carefully revised definition of order that ensures that for repeating datatypes ( time gDay The lexical representation ' 0000 -0001 [ISO 8601] Algorithms for arithmetic involving dateTime duration · · The treatment of leap seconds is no longer · · At the suggestion of the W3C Internationalization Core Working Group 4642 Terminology: zone offset versus time zone A number of syntactic and semantic errors in some of the regular expressions given to describe the lexical spaces of the · · The lexical mapping for times of the form ' 24:00:00 Support has been added for [XML] [Namespaces in XML] [XML] [Namespaces in XML] · · [XML] [Namespaces in XML] To reduce confusion and avert a widespread misunderstanding, the normative references to various W3C specifications now state explicitly that while the reference describes the particular edition of a specification current at the time this specification is published, conforming implementations of this specification are not required to ignore later editions of the other specification but instead may The reference

to the Unicode Database [Unicode Database] W3C Internationalization Core Working Group References to various other specifications have also been updated. The account of the value space of duration Two new totally ordered restrictions of duration yearMonthDuration yearMonthDuration (§3.4.26) dayTimeDuration dayTimeDuration (§3.4.27) [XQuery 1.0 and XPath 2.0 Functions and Operators] The XML representations of the · · · · Schema for Schema Documents (Datatypes) (normative) (§A) Illustrative XML representations for the built-in simple type definitions (§C) Numerous minor corrections have been made in response to comments on earlier working drafts. The treatment of topics handled both in this specification and in [XSD 1.1 Part 1: Structures] Several references to other specifications have been updated to refer to current versions of those specifications, including [XML] [Namespaces in XML] [RFC 3986] [RFC 3987] [RFC 3548] Requirements for the datatype-validity of values of type language Explicit definitions have been provided for the lexical and · · Schema Component Constraint enumeration facet value required for NOTATION (§3.3.19) NOTATION · · Some errors in the definition of regular-expression metacharacters have been corrected. The descriptions of the pattern enumeration A warning against using the whitespace facet for tokenizing natural-language data has been added on the request of the W3C Internationalization Working Group. In order to correct an error in version 1 of this specification and of [XSD 1.1 Part 1: Structures] · · · · · · · · · · · · · · · · The requirements of conformance have been clarified in various ways. A distinction is now made between · · · · Implementation-defined and implementation-dependent features (normative) (§H) The definitions of must must not · · must The lexical mapping of the QName · · The characterization of · · · · · · · · The nature of equality and identity of lists has been clarified. Enumerations, identity constraints, and value constraints now

treat both identical values and equal values as being the same for purposes of validation. This affects primitive datatypes in which identity and equality are not the same. Positive and negative zero, for example, are not treated as different for purposes of keys, keyrefs, or uniqueness constraints, and an enumeration which includes either zero will accept either zero. The mutual relations of lists and unions have been clarified, in particular the restrictions on what kinds of datatypes may · · · · Unions with no member types (and thus with empty · · · · Cycles in the definitions of · · A number of minor errors and obscurities have been fixed. 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. Constraint on Schemas Constraints on the schema components themselves, i.e. conditions components must Datatype components (§4) Schema Representation Constraint Constraints on the representation of schema components in XML.  Some but not all of these are expressed in Schema for Schema Documents (Datatypes) (normative) (§A) DTD for Datatype Definitions (non-normative) (§B) UTC Universal Coordinated Time UTC · · · · Validation Rule Constraints expressed by schema components which information items must Datatype components (§4) XDM representation For any value V T XDM representation of V T X 1 If T · xs:anySimpleType · · xs:anyAtomicType · X V dynamic type X xs:untypedAtomic 2 If T {variety} atomic T2 · · T V · · T2 X V dynamic type X T2 V · · T2 X · · V T2 {base type definition} 3 If T {variety} list X · · V T {item type definition} 4 If T {variety} union X · · V · · V T · · V · · T absent Throughout this specification, the value absent active basic member If the · · · · its its · · · · · · active basic member active member type In a valid instance of any · · active member type ancestor The ancestors type definition {base type definition} · · {base type definition} anyAtomicType anyAtomicType · · anySimpleType · · · · anyAtomicType · · · · · · anyAtomicType · · anySimpleType The definition of anySimpleType · · anyType · · anySimpleType · · · · · · atomic Atomic · · · · Atomic anyAtomicType · · atomic value An atomic value base type Every datatype other than anySimpleType base type Base types · · · · · · basic member Those members of the · · · · U · · basic members U built-in Built-in · · · · · · canonical mapping The canonical mapping · · · · · · canonical representation The canonical representation · · · · · · character class subtraction A · · character class subtraction character group part A character group part charGroupPart SingleCharNoEsc SingleCharEsc charClassEsc charRange constraining facet Constraining facets · · constructed All · · constructed · · · · · · · · · · · · · · · · · · datatype In this specification, a datatype A · · A · · · · A small collection of functions, relations, and procedures · · · · · · · · derived A datatype T immediately derived X X · · T derived A datatype R derived B B · · R There is some datatype X X · · R X B div If m n m div n m n error A failure of a schema or schema document to conform to the rules of this specification. Except as otherwise specified, processors must must · · · · Note: facet-based restriction A datatype is defined by facet-based restriction · · · · · · · · · · for compatibility A feature of this specification included solely to ensure that schemas which use this feature remain compatible with [XML] fundamental facet Each fundamental facet implementation-defined Something which may must implementation-defined implementation-dependent Something which may implementation-dependent incomparable Two values that are neither equal, less-than, nor greater-than are incomparable · · comparable intervening union If a datatype M · · · · U U · · · · · · U · · M · · · · intervene M U U M intervening unions M · · U intervening unions item type The · · · · · · item type · · leap-second A leap-second · · [International Earth Rotation Service (IERS)] [ITU-R TF.460-6] not lexical A constraining facet which directly restricts the · · lexical lexical mapping The lexical mapping · · · · lexical representation The members of the · · lexical representations lexical space The lexical space · · list List · · · · · · · · · · list literal A sequence of zero or more characters in the Universal Character Set (UCS) which may or may not prove upon inspection to be a member of the · · · · · · literal match (Of strings or names:) (Of strings and rules in the grammar:) may Schemas, schema documents, and processors are permitted to but need not behave as described. member types The datatypes that participate in the definition of a · · member types · · minimally conforming Implementations claiming minimal conformance must all 1 Support all the · · 2 Completely and correctly implement all of the · · 3 Completely and correctly implement all of the · · mod If m n m mod n m n m · · n must (Of schemas and schema documents:) · · (Of processors:) must not Schemas, schema documents and processors are forbidden to behave as described; schemas and documents which nevertheless do so are in · · nearest built-in datatype For any datatype T nearest built-in datatype T · · · · T · · T T T · · normalized block name For any Unicode block, the normalized block name [Unicode Database] optional An optional permitted required absent ordered A · · ordered · · · · Fundamental Facets (§F.1) total partial ordered ordinary Ordinary · · · · owner A component may be referred to as the owner pre-lexical A constraining facet which is used to normalize an initial · · · · pre-lexical primitive Primitive · · ab initio regular expression A regular expression · · | restriction A datatype R restriction B should It is recommended that schemas, schema documents, and processors behave as described, but there can be valid reasons for them not to; it is important that the full implications be understood and carefully weighed before adopting behavior at variance with the recommendation. special The special anySimpleType anyAtomicType special value A special value transitive membership The transitive membership · · · · · · U · · · · U T1 T2 T1 U T2 · · T1 T2 U union Union · · · · · · · · · · · · · · · · unknown A datatype which is not available for use is said to be unknown unknown An · · unknown user option A choice left under the control of the user of a processor, rather than being fixed for all users or uses of the processor. Statements in this specification that "Processors may may must not must Note: Note: user-defined User-defined value space The value space of a datatype value-based A constraining facet which directly restricts the · · value-based wildcard character The wildcard character IEEE. IEEE Standard for Floating-Point Arithmetic http://ieeexplore.ieee.org/servlet/opac?punumber=4610933 World Wide Web Consortium. Namespaces in XML 1.1 (Second Edition) http://www.w3.org/TR/xml-names11/ The edition cited is the one current at the date of publication of this specification. Implementations may Dependencies on Other Specifications (§1.3) World Wide Web Consortium. Namespaces in XML 1.0 (Third Edition) http://www.w3.org/TR/xml-names/ The edition cited is the one current at the date of publication of this specification. Implementations may Dependencies on Other Specifications (§1.3) S. Josefsson, ed. RFC 3548: The Base16, Base32, and Base64 Data Encodings http://www.ietf.org/rfc/rfc3548.txt The Unicode Consortium. Unicode Character Database http://www.unicode.org/Public/3.1-Update/UnicodeCharacterDatabase-3.1.0.html http://www.unicode.org/versions/ may World Wide Web Consortium. XQuery 1.0 and XPath 2.0 Data Model (XDM) (Second Edition) http://www.w3.org/TR/xpath-datamodel/ World Wide Web Consortium. Extensible Markup Language (XML) 1.1 (Second Edition) http://www.w3.org/TR/xml11/ The edition cited is the one current at the date of publication of this specification. Implementations may Dependencies on Other Specifications (§1.3) World Wide Web Consortium. Extensible Markup Language (XML) 1.0 (Fifth Edition) http://www.w3.org/TR/xml/ The edition cited is the one current at the date of publication of this specification. Implementations may Dependencies on Other Specifications (§1.3) World Wide Web Consortium. XML Path Language (XPath) 2.0 (Second Edition) (Link errors corrected 3 January 2011) http://www.w3.org/TR/xpath20/ World Wide Web Consortium. XQuery 1.0 and XPath 2.0 Functions and Operators (Second Edition) http://www.w3.org/TR/xpath-functions/ World Wide Web Consortium. W3C XML Schema Definition Language (XSD) 1.1 Part 1: Structures http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html The edition cited is the one current at the date of publication of this specification. Implementations may Internet Engineering Task Force (IETF). Best Current Practices 47. 2006. Available at: http://tools.ietf.org/rfc/bcp/bcp47 RFC 4646: Tags for Identifying Languages http://www.ietf.org/rfc/bcp/bcp47.txt RFC 4647: Matching of Language Tags http://www.rfc-editor.org/rfc/bcp/bcp47.txt William D Clinger. How to Read Floating Point Numbers Accurately. Proceedings of Conference on Programming Language Design and Implementation ftp://ftp.ccs.neu.edu/pub/people/will/howtoread.ps World Wide Web Consortium. HTML 4.01 Specification http://www.w3.org/TR/html401/ ISO (International Organization for Standardization). Language-independent Datatypes. http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=39479 ISO (International Organization for Standardization). Representations of dates and times, 1988-06-15. ISO (International Organization for Standardization). Representations of dates and times, second edition, 2000-12-15. International Telecommunication Union (ITU). Recommendation ITU-R TF.460-6: Standard-frequency and time-signal emissions International Earth Rotation Service (IERS). See http://maia.usno.navy.mil Legacy extended IRIs for XML resource identification http://www.w3.org/TR/leiri/ The Perl Programming Language.  See http://www.perl.org/get.html World Wide Web Consortium. An XSD datatype for IEEE floating-point decimal http://www.w3.org/TR/xsd-precisionDecimal/ World Wide Web Consortium. RDF Vocabulary Description Language 1.0: RDF Schema http://www.w3.org/TR/rdf-schema/ N. Freed and N. Borenstein. RFC 2045: Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies http://www.ietf.org/rfc/rfc2045.txt H. Alvestrand, ed. RFC 3066: Tags for the Identification of Languages http://www.ietf.org/rfc/rfc3066.txt T. Berners-Lee, R. Fielding, and L. Masinter, RFC 3986: Uniform Resource Identifier (URI): Generic Syntax http://www.ietf.org/rfc/rfc3986.txt M. Duerst and M. Suignard. RFC 3987: Internationalized Resource Identifiers (IRIs) http://www.ietf.org/rfc/rfc3987.txt A. Phillips and M. Davis, ed. RFC 4646: Tags for Identifying Languages http://www.ietf.org/rfc/rfc4646.txt A. Phillips and M. Davis, ed. RFC 4647: Matching of Language Tags http://www.ietf.org/rfc/rfc4647.txt World Wide Web Consortium. Ruby Annotation http://www.w3.org/TR/ruby/ ISO (International Organization for Standardization). ISO/IEC 9075-2:1999, Information technology --- Database languages --- SQL --- Part 2: Foundation (SQL/Foundation) http://www.iso.org/iso/home.htm World Wide Web Consortium. Working with Time Zones http://www.w3.org/TR/timezone/ Information about Leap Seconds http://tycho.usno.navy.mil/leapsec.html U.S. Naval Observatory Time Service Department, Historical list of leap seconds ftp://maia.usno.navy.mil/ser7/tai-utc.dat Mark Davis. Unicode Regular Expression Guidelines http://www.unicode.org/unicode/reports/tr18/ World Wide Web Consortium. Unicode block names for use in XSD regular expressions http://www.w3.org/TR/xsd-unicode-blocknames/ World Wide Web Consortium. XML Schema Language: Part 0 Primer Second Edition, ed. David C. Fallside and Priscilla Walmsley. W3C Recommendation 28 October 2004. Available at: http://www.w3.org/TR/xmlschema-0/ XML Schema Requirements http://www.w3.org/TR/NOTE-xml-schema-req World Wide Web Consortium. Extensible Stylesheet Language (XSL) http://www.w3.org/TR/xsl11/ Along with the editors thereof, the following contributed material to the first version of this specification: Asir S. Vedamuthu, webMethods, Inc Co-editor Ashok Malhotra's work on this specification from March 1999 until February 2001 was supported by IBM, and from then until May 2004 by Microsoft.  Since July 2004 his work on this specification has been supported by Oracle Corporation. The work of Dave Peterson as a co-editor of this specification was supported by IDEAlliance (formerly GCA) through March 2004, and beginning in April 2004 by SGML Works! The work of C. M. Sperberg-McQueen as a co-editor of this specification was supported by the World Wide Web Consortium through January 2009 and again from June 2010 through May 2011, and beginning in February 2009 by Black Mesa Technologies LLC. The XML Schema Working Group acknowledges with thanks the members of other W3C Working Groups and industry experts in other forums who have contributed directly or indirectly to the creation of this document and its predecessor. At the time this document is published, the members in good standing of the XML Schema Working Group are: David Ezell, National Association of Convenience Stores (NACS) ( chair Shudi (Sandy) Gao 高殊镝, IBM Mary Holstege, Mark Logic Sam Idicula, Oracle Corporation Michael Kay, Invited expert Jim Melton, Oracle Corporation Dave Peterson, Invited expert Liam Quin, W3C ( staff contact C. M. Sperberg-McQueen, invited expert Henry S. Thompson, University of Edinburgh Kongyi Zhou, Oracle Corporation The XML Schema Working Group has benefited in its work from the participation and contributions of a number of people who are no longer members of the Working Group in good standing at the time of publication of this Working Draft. Their names are given below. In particular we note with sadness the accidental death of Mario Jeckle shortly before publication of the first Working Draft of XML Schema 1.1. Affiliations given are (among) those current at the time of the individuals' work with the WG. Paula Angerstein, Vignette Corporation Leonid Arbouzov, Sun Microsystems Jim Barnette, Defense Information Systems Agency (DISA) David Beech, Oracle Corp. Gabe Beged-Dov, Rogue Wave Software Laila Benhlima, Ecole Mohammadia d'Ingenieurs Rabat (EMI) Doris Bernardini, Defense Information Systems Agency (DISA) Paul V. Biron, HL7; later Invited expert Don Box, DevelopMentor Allen Brown, Microsoft Lee Buck, TIBCO Extensibility Greg Bumgardner, Rogue Wave Software Dean Burson, Lotus Development Corporation Charles E. Campbell, Invited expert Oriol Carbo, University of Edinburgh Wayne Carr, Intel Peter Chen, Bootstrap Alliance and LSU Tyng-Ruey Chuang, Academia Sinica Tony Cincotta, NIST David Cleary, Progress Software Mike Cokus, MITRE Dan Connolly, W3C ( staff contact Ugo Corda, Xerox Roger L. Costello, MITRE Joey Coyle, Health Level Seven Haavard Danielson, Progress Software Josef Dietl, Mozquito Technologies Kenneth Dolson, Defense Information Systems Agency (DISA) Andrew Eisenberg, Progress Software Rob Ellman, Calico Commerce Tim Ewald, Developmentor Alexander Falk, Altova GmbH David Fallside, IBM George Feinberg, Object Design Dan Fox, Defense Logistics Information Service (DLIS) Charles Frankston, Microsoft Matthew Fuchs, Commerce One Andrew Goodchild, Distributed Systems Technology Centre (DSTC Pty Ltd) Xan Gregg, TIBCO Extensibility Paul Grosso, Arbortext, Inc Martin Gudgin, DevelopMentor Ernesto Guerrieri, Inso Dave Hollander, Hewlett-Packard Company ( co-chair Nelson Hung, Corel Jane Hunter, Distributed Systems Technology Centre (DSTC Pty Ltd) Michael Hyman, Microsoft Renato Iannella, Distributed Systems Technology Centre (DSTC Pty Ltd) Mario Jeckle, DaimlerChrysler Rick Jelliffe, Academia Sinica Marcel Jemio, Data Interchange Standards Association Simon Johnston, Rational Software Kohsuke Kawaguchi, Sun Microsystems Dianne Kennedy, Graphic Communications Association Janet Koenig, Sun Microsystems Setrag Khoshafian, Technology Deployment International (TDI) Melanie Kudela, Uniform Code Council Ara Kullukian, Technology Deployment International (TDI) Andrew Layman, Microsoft Dmitry Lenkov, Hewlett-Packard Company Bob Lojek, Mozquito Technologies John McCarthy, Lawrence Berkeley National Laboratory Matthew MacKenzie, XML Global Nan Ma, China Electronics Standardization Institute Eve Maler, Sun Microsystems Ashok Malhotra, IBM, Microsoft, Oracle Murray Maloney, Muzmo Communication, acting for Commerce One Paolo Marinelli, University of Bologna Lisa Martin, IBM Noah Mendelsohn, Lotus; IBM; invited expert Adrian Michel, Commerce One Alex Milowski, Invited expert Don Mullen, TIBCO Extensibility Murata Makoto, Xerox Ravi Murthy, Oracle Chris Olds, Wall Data Frank Olken, Lawrence Berkeley National Laboratory David Orchard, BEA Systems, Inc. Paul Pedersen, Mark Logic Corporation Shriram Revankar, Xerox Mark Reinhold, Sun Microsystems Jonathan Robie, Software AG Cliff Schmidt, Microsoft John C. Schneider, MITRE Eric Sedlar, Oracle Corp. Lew Shannon, NCR Anli Shundi, TIBCO Extensibility William Shea, Merrill Lynch Jerry L. Smith, Defense Information Systems Agency (DISA) John Stanton, Defense Information Systems Agency (DISA) Tony Stewart, Rivcom Bob Streich, Calico Commerce William K. Stumbo, Xerox Hoylen Sue, Distributed Systems Technology Centre (DSTC Pty Ltd) Ralph Swick, W3C John Tebbutt, NIST Ross Thompson, Contivo Matt Timmermans, Microstar Jim Trezzo, Oracle Corp. Steph Tryphonas, Microstar Scott Tsao, The Boeing Company Mark Tucker, Health Level Seven Asir S. Vedamuthu, webMethods, Inc Fabio Vitali, University of Bologna Scott Vorthmann, TIBCO Extensibility Priscilla Walmsley, XMLSolutions Norm Walsh, Sun Microsystems Cherry Washington, Defense Information Systems Agency (DISA) Aki Yoshida, SAP AG Stefano Zacchiroli, University of Bologna Mohamed Zergaoui, Innovimax

Related documents

Record · ID 153238 · SHA-256 cc2ae20cdeab0260
Conceptio Open Knowledge Archive — every document is proof-bundled with source, license, and retrieval metadata.