XML technologies / XML Schema / Data type reference / xs:gYear
(Excerpt from “XML Schema” by Eric van der Vlist)
A one-year period
Derived from: xs:anySimpleType
Primitive type: xs:gYear
Known subtypes: none
Facets: xs:enumeration, xs:maxExclusive, xs:maxInclusive, xs:minExclusive, xs:minInclusive, xs:pattern, xs:whiteSpace
Definition
<xs:simpleType name="gYear" id="gYear">
<xs:restriction base="xs:anySimpleType">
<xs:whiteSpace value="collapse" fixed="true"/>
</xs:restriction>
</xs:simpleType>Description
The value space of xs:gYear consists of calendar-year periods, such as the year 2003. The lexical space follows ISO 8601 notation for these periods, YYYY, with an optional time zone.
Restrictions
The duration, one year, is fixed, and no calendars other than Gregorian are supported.
Example
Valid values include "2001", "2001+02:00", "2001Z", "2001+00:00", "-2001" or "-20000".
The following values would be invalid: "01" (the century part is missing) or "2001-12" (month parts are forbidden).
Copyright © 2003 O'Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from “XML Schema” is subject to the same conditions as the bound edition. The work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de