From c83f40b9d3c2dfb1ae13104e3522f28a90a77b08 Mon Sep 17 00:00:00 2001
From: Michael Kay The datatype The datatype The datatype No type may be derived from The type The type The type The following schema defines the additional types in the
- You can retrieve the normative schema document for this namespace from
- The scope over which the names of anonymous types must be
-meaningful and distinct is depends on the processing context.
+meaningful and distinct depends on the processing context.
It is the responsibility of the host language to define the
size and scope of the processing context.xs:untyped
-are the same as the properties of xs:anyType
except for
-the base type and name. The base type of xs:untyped
is
-xs:anyType
.
-No predefined types are derived from xs:untyped
-xs:untypedAtomic
. No
-predefined types are derived from xs:untypedAtomic
-xs:anySimpleType
, from which all simple
-types, including atomic, list, and union types are derived. All
-primitive atomic types, such as xs:decimal
and
-xs:string
, have xs:anyAtomicType
-as their base type.xs:anyAtomicType
-by restriction, union, or list.xs:dayTimeDuration
is derived from
-xs:duration
by restricting its lexical representation to
-contain only the days, hours, minutes and seconds components. The
-value space of xs:dayTimeDuration
is the set of
-fractional second values. The components of
-xs:dayTimeDuration
correspond to the day, hour, minute
-and second components defined in Section 5.5.3.2 of &xdt-isoref;.
-An xs:dayTimeDuration
is
-derived from xs:duration
as follows:xs:yearMonthDuration
is derived from
-xs:duration
by restricting its lexical representation to
-contain only the year and month components. The value space of
-xs:yearMonthDuration
is the set of
-xs:integer
month values. The year and month components of
-xs:yearMonthDuration
correspond to the Gregorian year
-and month components defined in section 5.5.3.2 of &xdt-isoref;,
-respectively.xs:yearMonthDuration
is derived from
-xs:duration
as follows:xs:
namespace identified by this document.
-
The three atomic types xs:anyAtomicType
,
+ xs:dayTimeDuration
, and
+ xs:yearMonthDuration
were first introduced in the 2.0 version of this specification,
+ and were subsequently adopted by XSD 1.1. These types are always present in the XDM data model,
+ with the definitions as given in XSD 1.1, whether or not the processor actually supports XSD 1.1.
The types xs:dayTimeDuration
, and
+ xs:yearMonthDuration
have a special status in these specifications because many
+ arithmetic operations (such as comparing two durations) are available in XPath only on these
+ subtypes of xs:duration
, not on the primitive type xs:duration
itself.
The datatype xs:anyAtomicType
is an atomic type that
+ includes all atomic values (and no values that are not atomic). Its
+ base type is xs:anySimpleType
, from which all simple
+ types, including atomic, list, and union types are derived. All
+ primitive atomic types, such as xs:decimal
and
+ xs:string
, have xs:anyAtomicType
+ as their base type.
No type may be derived from xs:anyAtomicType
+ by restriction, union, or list.
The types xs:untyped
and xs:untypedAtomic
, although
+ they have names in the XSD namespace, are defined in this XDM specification, and not
+ in XSD.
The type xs:untypedAtomic
. No
+ predefined types are derived from xs:untypedAtomic
+
The datatype xs:untyped
+ are the same as the properties of xs:anyType
except for
+ the base type and name. The base type of xs:untyped
is
+ xs:anyType
.
+ No predefined types are derived from xs:untyped
+
In addition to the 19 xs:anyAtomicType
,
-xs:untyped
, xs:untypedAtomic
,
-xs:dayTimeDuration
, and
-xs:yearMonthDuration
.
-These types are defined in the XML Schema namespace with permission
-of the XML Schema Working Group; in implementations that support
-xs:anyAtomicType
, xs:dayTimeDuration
,
-and xs:yearMonthDuration
supersede the definitions in this
-specification.
-
A schema for xs:dayTimeDuration
and
-xs:yearMonthDuration
is provided in
The lexical space of type xs:duration
is defined in XSD 1.1 part 2 (ยง3.3.6.2)
+ in two different ways:
+ with a BNF grammar starting with the production durationLexicalRep
, and with a regular
+ expression. The two definitions are inconsistent: the BNF allows a decimal point at the start or end
+ of the seconds component, while the regular expression requires any decimal point to be preceded and followed
+ by a digit. For the purposes of this specification, the regular expression is considered to be
+ correct, and the BNF incorrect; this makes the representation identical to that in XSD 1.0,
+ and is compatible with ISO 8601.