Copyright © 2007 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.
This document addresses errors in the XQuery 1.0 and XPath 2.0 Data Model (XDM) Recommendation published on 23 January 2007. It records all errors that, at the time of this document's publication, have solutions that have been approved by the XSL Working Group and/or the XML Query Working Group. For updates see the latest version of that document.
The errata are numbered, classified as Substantive, Editorial, or Markup, and are listed in reverse chronological order of their date of origin. Each entry contains the following information:
A description of the error.
A reference to the Bugzilla entry recording the original problem report, subsequent discussion, and resolution by the Working Group.
Key dates in the process of resolving the error.
Where appropriate, one or more textual changes to be applied to the published Recommendation.
Colored boxes and shading are used to help distinguish new text from old, however these visual clues are not essential to an understanding of the change. The styling of old and new text is an approximation to its appearance in the published Recommendation, but is not normative. Hyperlinks are shown underlined in the erratum text, but the links are not live.
A number of indexes appear at the end of the document.
Substantive corrections are proposed by the XSL Working Group and/or the XQuery Working Group (both part of the XML Activity), which have consensus that they are appropriate; they are not to be considered normative until approved by a Call for Review of Proposed Corrections or a Call for Review of an Edited Recommendation.
Please report errors in this document using W3C's public Bugzilla system (instructions can be found at http://www.w3.org/XML/2005/04/qt-bugzilla). If access to that system is not feasible, you may send your comments to the W3C XSLT/XPath/XQuery public comments mailing list, public-qt-comments@w3.org. It will be very helpful if you include the string [DMerrata] in the subject line of your report, whether made in Bugzilla or in email. Each Bugzilla entry and email message should contain only one error report. Archives of the comments and responses are available at http://lists.w3.org/Archives/Public/public-qt-comments/.
Errata
DM.E009 xs:dayTimeDuration and xs:yearMonthDuration listed as a primitive simple type.
DM.E008 Obsolete xdt: rather than xs: prefixes used.
DM.E007 Terminology: root node concept.
DM.E005 The rules for is-id property for an element node constructed from a PSVI appear arbitrarily different from the rule for attribute nodes.
DM.E004 Nowhere does XDM state the constraint that if a namespace URI is present in the node-name of an attribute node then a prefix must also be present.
DM.E003 The Data Model does not state any constraints on the use of the namespace 'http://www.w3.org/2000/xmlns/'.
DM.E002 The data model spec doesn't adequately cover the determination of the typed value for an element whose schema type is a complex type with simple content.
DM.E001 The schema in the examples appendix isn't valid.
Indexes
See Bug 5267
xs:dayTimeDuration and xs:yearMonthDuration listed as a primitive simple type.
13 Nov 2007: Proposed
13 Nov 2007: Accepted
In 2.1 Terminology (twelfth paragraph):
Replace the text:
[Definition] There
are 23
primitive simple types: the 19 defined in
Section
3.2 Primitive datatypesXS2
of
[Schema Part 2]
and
xs:untyped,
xs:untypedAtomic,
xs:anyAtomicType,
xs:dayTimeDuration,
and xs:yearMonthDuration,
defined in 2.6 Types.
By:
[Definition] There
are 21
primitive simple types: the 19 defined in
Section
3.2 Primitive datatypesXS2
of
[Schema Part 2]
and
xs:untypedAtomic and
xs:anyAtomicType,
defined in 2.6 Types.
See Bug 5212
Obsolete xdt: rather than xs: prefixes used.
19 Oct 2007: Proposed
13 Nov 2007: Accepted
In E Example (Non-Normative) (first table, first table body, fifth row, third column):
Replace the text:
By:
In E Example (Non-Normative) (first table, first table body, one hundred and seventy-second row, third column):
Replace the text:
By:
In E Example (Non-Normative) (first table, first table body, one hundred and seventy-third row, third column):
Replace the text:
By:
In E Example (Non-Normative) (first table, first table body, one hundred and eighty-first row, third column):
Replace the text:
By:
In E Example (Non-Normative) (first table, first table body, one hundred and ninety-sixth row, third column):
Replace the text:
By:
In E Example (Non-Normative) (first table, first table body, two hundred and tenth row, third column):
Replace the text:
By:
In E Example (Non-Normative) (first table, first table body, two hundred and eleventh row, third column):
Replace the text:
By:
In E Example (Non-Normative) (first table, first table body, two hundred and thirty-fourth row, third column):
Replace the text:
By:
In E Example (Non-Normative) (first table, first table body, two hundred and thirty-fifth row, third column):
Replace the text:
By:
In E Example (Non-Normative) (first table, first table body, three hundred and second row, third column):
Replace the text:
By:
In E Example (Non-Normative) (first table, first table body, three hundred and third row, third column):
Replace the text:
By:
In E Example (Non-Normative) (first table, first table body, three hundred and sixty-first row, third column):
Replace the text:
By:
In E Example (Non-Normative) (first table, first table body, three hundred and sixty-second row, third column):
Replace the text:
By:
In E Example (Non-Normative) (first table, first table body, three hundred and eighty-fourth row, third column):
Replace the text:
By:
In E Example (Non-Normative) (first table, first table body, three hundred and eighty-fifth row, third column):
Replace the text:
By:
See Bug 5002
Terminology: root node concept.
25 Sep 2007: Proposed
25 Sep 2007: Accepted
In 2.1 Terminology (sixth paragraph):
Insert after the text:
The following:
[Definition] The topmost node of a tree is called the root node.
Note:
Thus the root node is merely a designator, based on position, for one of the nodes in the tree without implying what kind of a node it is. In the XPath 1.0 datamodel the root node was a kind of node.
See Bug 4519
The rules for is-id property for an element node constructed from a PSVI appear arbitrarily different from the rule for attribute nodes.
31 Jul 2007: Proposed
18 Sep 2007: Accepted
In 6.2.4 Construction from a PSVI (first glist, eighth gitem):
Replace the text:
If the element has a complex type with element-only content, the
is-id
property is false. Otherwise, if the typed-value of the element
consists of exactly one atomic value that value is of type xs:ID, or
a type derived from xs:ID, the
is-id property is true,
otherwise it is false.
By:
If the element has a complex type with element-only content,
the is-id
property is false.
Otherwise, if the typed-value of the element consists of exactly
one atomic value and that value is of type xs:ID,
or a type derived from xs:ID,
the is-id
property is true, otherwise it is false.
Note:
This means that in the case of a type constructed by list
from xs:ID, the ID is recognized provided that the list
is of length one. A type constructed as a union
involving xs:ID is recognized provided the actual value
is of type xs:ID.
Note:
The element that is marked with the
is-id property, and which will
therefore be retrieved by the fn:id function, is the node whose typed
value contains the xs:ID value.
This node is a child of the element node that, according to XML Schema,
is uniquely identified by this ID.
In 6.3.4 Construction from a PSVI (first glist, fourth gitem):
Replace the text:
If the attribute is named xml:id and its
attribute type property does not
have the value xs:ID, then
[xml:id]
processing
is performed. This will assure that the value does have the type xs:ID
and that it is properly normalized. If an error is encountered during
xml:id processing, an implementation may raise a dynamic error.
The
is-id property is always true for
attributes named xml:id.
If the type-name is xs:ID or a type derived from
xs:ID, true, otherwise false.
By:
If the attribute is named xml:id and
its attribute type property
does not have the value xs:ID or a type derived from xs:ID,
then
[xml:id]
processing is performed.
This will assure that the value does have the type xs:ID
and that it is properly normalized.
If an error is encountered during xml:id processing,
an implementation may raise a dynamic error.
The is-id
property is always true for attributes named xml:id.
Otherwise, if the typed-value of the attribute consists of
exactly one atomic value and that value is of type xs:ID,
or a type derived from xs:ID,
the is-id
property is true, otherwise it is false.
Note:
This means that in the case of a type constructed by list
from xs:ID, the ID is recognized provided that the list
is of length one. A type constructed as a union
involving xs:ID is recognized provided the actual value
is of type xs:ID.
In 6.3.4 Construction from a PSVI (first glist, fifth gitem, first def):
Insert after the text:
If any of the atomic values in the typed-value of the
attribute is of type xs:IDREF or xs:IDREFS, or
a type derived from one of those types, the
is-idrefs
property is true, otherwise it is false.
The following:
Note:
This rule means that a type constructed by list with an
item type of xs:IDREF (or a type derived from xs:IDREF)
has the is-idrefs
property, whether or not the list type is named xs:IDREFS
or is derived from xs:IDREFS.
Because union types are allowed, it also means that an element or
attribute with the is-idrefs
property can contain atomic values of type xs:IDREF
alongside values of other types.
See Bug 4487
Nowhere does XDM state the constraint that if a namespace URI is present in the node-name of an attribute node then a prefix must also be present. This is necessary to ensure that an XDM document can be serialized as namespace-well-formed XML.
23 Apr 2007: Proposed
8 May 2007: Accepted
In 6.3.1 Overview (first numbered list, second item):
Insert after the text:
| 2 |
If a Attribute Node A has a parent element E, then A must be among the attributes of E. The data model permits Attribute Nodes without parents (to represent partial results during expression processing, for example). Such attributes must not appear among the attributes of any Element Node. |
The following:
| 3 |
In the node-name of an attribute node, if a namespace URI is present then a prefix must also be present. |
See Bug 4486
The Data Model does not state any constraints on the use of the namespace 'http://www.w3.org/2000/xmlns/'. Such constraints are needed to ensure that an XDM document can be serialized as a namespace-well-formed XML document.
23 Apr 2007: Proposed
8 May 2007: Accepted
In 6.4.1 Overview (first numbered list, second item):
Insert after the text:
| 2 |
If a Namespace Node N has a parent element E, then N must be among the namespaces of E. |
The following:
| 3 |
A Namespace Node must not have the
name |
See Bug 4413
The data model spec doesn't adequately cover the determination of the typed value for an element whose schema type is a complex type with simple content.
8 May 2007: Proposed
8 May 2007: Accepted
In 3.3.1.2 Typed Value Determination (third paragraph):
Replace the text:
The types of the items in the typed value of a node are determined
as follows. The process begins with T, the schema type of
the node itself, as represented in the PSVI. For each primitive or
ordinary simple type T, the W3C XML Schema specification
defines a function M mapping the lexical representation
of a value onto the value itself.
By:
The types of the items in the typed value of a node are determined as follows.
The process begins with a type, T. If the schema type of the node itself, as
represented in the PSVI, is a complex type with simple content, then T is the
{content type} of the schema type of the node; otherwise, T is the schema type
of the node itself. For each primitive or ordinary simple type T, the W3C XML
Schema specification defines a function M mapping the lexical representation of
a value onto the value itself.
See Bug 4352
The schema in the examples appendix isn't valid.
27 Feb 2007: Proposed
27 Mar 2007: Accepted
In E Example (Non-Normative) (second code section):
Replace the text:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:cat="http://www.example.com/catalog"
xmlns:xlink="http://www.w3.org/1999/xlink"
targetNamespace="http://www.example.com/catalog"
elementFormDefault="qualified">
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd" />
<xs:import namespace="http://www.w3.org/1999/xlink"
schemaLocation="http://www.cs.rpi.edu/~puninj/XGMML/xlinks-2001.xsd" />
<xs:element name="catalog">
<xs:complexType>
<xs:sequence>
<xs:element ref="cat:_item" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="version" type="xs:string" fixed="0.1" use="required" />
<xs:attribute ref="xml:base" />
<xs:attribute ref="xml:lang" />
</xs:complexType>
</xs:element>
<xs:element name="_item" type="cat:itemType" abstract="true" />
<xs:complexType name="itemType">
<xs:sequence>
<xs:element name="title" type="xs:token" />
<xs:element name="description" type="cat:description" nillable="true" />
<xs:element name="price" type="cat:price" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="label" type="xs:token" />
<xs:attribute name="code" type="xs:ID" use="required" />
<xs:attributeGroup ref="xlink:simpleLink" />
</xs:complexType>
<xs:element name="tshirt" type="cat:tshirtType" substitutionGroup="cat:_item" />
<xs:complexType name="tshirtType">
<xs:complexContent>
<xs:extension base="cat:itemType">
<xs:attribute name="sizes" type="cat:clothesSizes" use="required" />
<xs:attribute ref="xml:lang" use="optional"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="clothesSizes">
<xs:union memberTypes="cat:sizeList">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="oneSize" />
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
<xs:simpleType name="sizeList">
<xs:restriction>
<xs:simpleType>
<xs:list itemType="cat:clothesSize" />
</xs:simpleType>
<xs:minLength value="1" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="clothesSize">
<xs:union memberTypes="cat:numberedSize cat:categorySize" />
</xs:simpleType>
<xs:simpleType name="numberedSize">
<xs:restriction base="xs:integer">
<xs:enumeration value="4" />
<xs:enumeration value="6" />
<xs:enumeration value="8" />
<xs:enumeration value="10" />
<xs:enumeration value="12" />
<xs:enumeration value="14" />
<xs:enumeration value="16" />
<xs:enumeration value="18" />
<xs:enumeration value="20" />
<xs:enumeration value="22" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="categorySize">
<xs:restriction base="xs:token">
<xs:enumeration value="XS" />
<xs:enumeration value="S" />
<xs:enumeration value="M" />
<xs:enumeration value="L" />
<xs:enumeration value="XL" />
<xs:enumeration value="XXL" />
</xs:restriction>
</xs:simpleType>
<xs:element name="album" type="cat:albumType" substitutionGroup="cat:_item" />
<xs:complexType name="albumType">
<xs:complexContent>
<xs:extension base="cat:itemType">
<xs:sequence>
<xs:element name="artist" type="xs:string" />
</xs:sequence>
<xs:attribute name="formats" type="cat:formatsType" use="required" />
<xs:attribute ref="xml:lang" use="optional"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="formatsType">
<xs:list itemType="cat:formatType" />
</xs:simpleType>
<xs:simpleType name="formatType">
<xs:restriction base="xs:token">
<xs:enumeration value="CD" />
<xs:enumeration value="MiniDisc" />
<xs:enumeration value="tape" />
<xs:enumeration value="vinyl" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="description" mixed="true">
<xs:sequence>
<xs:any namespace="http://www.w3.org/1999/xhtml" processContents="lax"
minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute ref="xml:lang" use="optional"/>
</xs:complexType>
<xs:complexType name="price">
<xs:simpleContent>
<xs:extension base="cat:monetaryAmount">
<xs:attribute name="currency" type="cat:currencyType" default="USD" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="currencyType">
<xs:restriction base="xs:token">
<xs:pattern value="[A-Z]{3}" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="monetaryAmount">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="3" />
<xs:pattern value="\d+(\.\d{2,3})?" />
</xs:restriction>
</xs:simpleType>
</xs:schema>
By:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:cat="http://www.example.com/catalog"
xmlns:xlink="http://www.w3.org/1999/xlink"
targetNamespace="http://www.example.com/catalog"
elementFormDefault="qualified">
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd" />
<xs:import namespace="http://www.w3.org/1999/xlink"
schemaLocation="http://www.cs.rpi.edu/~puninj/XGMML/xlinks-2001.xsd" />
<xs:element name="catalog">
<xs:complexType>
<xs:sequence>
<xs:element ref="cat:_item" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="version" type="xs:string" fixed="0.1" use="required" />
<xs:attribute ref="xml:base" />
<xs:attribute ref="xml:lang" />
</xs:complexType>
</xs:element>
<xs:element name="_item" type="cat:itemType" abstract="true" />
<xs:complexType name="itemType">
<xs:sequence>
<xs:element name="title" type="xs:token" />
<xs:element name="description" type="cat:description" nillable="true" />
<xs:element name="price" type="cat:price" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="label" type="xs:token" />
<xs:attribute name="code" type="xs:ID" use="required" />
<xs:attributeGroup ref="xlink:simpleLink" />
</xs:complexType>
<xs:element name="tshirt" type="cat:tshirtType" substitutionGroup="cat:_item" />
<xs:complexType name="tshirtType">
<xs:complexContent>
<xs:extension base="cat:itemType">
<xs:attribute name="sizes" type="cat:clothesSizes" use="required" />
<xs:attribute ref="xml:lang" use="optional"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="clothesSizes">
<xs:union memberTypes="cat:sizeList">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="oneSize" />
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
<xs:simpleType name="sizeList">
<xs:restriction>
<xs:simpleType>
<xs:list itemType="cat:clothesSize" />
</xs:simpleType>
<xs:minLength value="1" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="clothesSize">
<xs:union memberTypes="cat:numberedSize cat:categorySize" />
</xs:simpleType>
<xs:simpleType name="numberedSize">
<xs:restriction base="xs:integer">
<xs:enumeration value="4" />
<xs:enumeration value="6" />
<xs:enumeration value="8" />
<xs:enumeration value="10" />
<xs:enumeration value="12" />
<xs:enumeration value="14" />
<xs:enumeration value="16" />
<xs:enumeration value="18" />
<xs:enumeration value="20" />
<xs:enumeration value="22" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="categorySize">
<xs:restriction base="xs:token">
<xs:enumeration value="XS" />
<xs:enumeration value="S" />
<xs:enumeration value="M" />
<xs:enumeration value="L" />
<xs:enumeration value="XL" />
<xs:enumeration value="XXL" />
</xs:restriction>
</xs:simpleType>
<xs:element name="album" type="cat:albumType" substitutionGroup="cat:_item" />
<xs:complexType name="albumType">
<xs:complexContent>
<xs:extension base="cat:itemType">
<xs:sequence>
<xs:element name="artist" type="xs:string" />
</xs:sequence>
<xs:attribute name="formats" type="cat:formatsType" use="required" />
<xs:attribute ref="xml:lang" use="optional"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="formatsType">
<xs:list itemType="cat:formatType" />
</xs:simpleType>
<xs:simpleType name="formatType">
<xs:restriction base="xs:token">
<xs:enumeration value="CD" />
<xs:enumeration value="MiniDisc" />
<xs:enumeration value="tape" />
<xs:enumeration value="vinyl" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="description" mixed="true">
<xs:sequence>
<xs:any namespace="http://www.w3.org/1999/xhtml" processContents="lax"
minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute ref="xml:lang" use="optional"/>
</xs:complexType>
<xs:complexType name="price">
<xs:simpleContent>
<xs:extension base="cat:monetaryAmount">
<xs:attribute name="currency" type="cat:currencyType" default="USD" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="currencyType">
<xs:restriction base="xs:token">
<xs:pattern value="[A-Z]{3}" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="monetaryAmount">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="3" />
<xs:pattern value="\d+(\.\d{2,3})?" />
</xs:restriction>
</xs:simpleType>
</xs:schema>
2.1 Terminology
DM.E007 DM.E009
3.3.1.2 Typed Value Determination
DM.E002
6.2.4 Construction from a PSVI
DM.E005
6.3.1 Overview
DM.E004
6.3.4 Construction from a PSVI
DM.E005
6.4.1 Overview
DM.E003
E Example (Non-Normative)
DM.E001 DM.E008
Bug #4352: DM.E001
Bug #4413: DM.E002
Bug #4486: DM.E003
Bug #4487: DM.E004
Bug #4519: DM.E005
Bug #5002: DM.E007
Bug #5212: DM.E008
Bug #5267: DM.E009