Draft Errata for XQuery 3.1: An XML Query Language

13 October 2017

Latest version:
https://www.w3.org/XML/2017/qt-errata/xquery-31-errata.html
Editor:
Michael Kay, Saxonica http://www.saxonica.com/

Abstract

This document addresses errors in the XQuery 3.1: An XML Query Language Recommendation published on 21 March 2017. It records all errors that, at the time of this document's publication, have solutions that have been approved by the XML Query Working Group. For updates see the latest version of that document.

The errata are numbered, and are listed in reverse chronological order of their date of origin. Each erratum is classified as Substantive, Editorial, or Markup. These categories are defined as follows:

Each entry contains the following information:

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.

Status of this Document

This is a public draft. It is maintained in accordance with the W3C process on Errata Management. None of the errata reported in this document must be considered normative.

Table of Contents

  Errata

     XQ31.E4   Some examples in the section concerned with the unary lookup operator are actually examples of postfix lookup.

     XQ31.E3   The definition of "pure union types" is unnecessarily complex.

     XQ31.E2   The term "Query Environment" (used in the definition of external functions) is not explained; furthermore it is used in XPath as well as XQuery.

     XQ31.E1   The introductory section on Atomizations mentions that FOTY0012 can be raised, but other errors (for example, FOTY0013) are also possible.

  Indexes

    Index by affected section

    Index by Bugzilla entry

    Index by error


XQ31.E4 - editorial

See Bug 30175

Description

Some examples in the section concerned with the unary lookup operator are actually examples of postfix lookup.

History

13 Oct 2017: Proposed

Changes

  1. In 3.11.3.1 Unary Lookup (first bulleted list, ninth item):

    Delete the text:

    • If $m is bound to the weekdays map described in 3.11.1 Maps, then $m?* returns the values ("Sunday","Monday","Tuesday","Wednesday", "Thursday", "Friday","Saturday"), in implementation-dependent order.

  2. In 3.11.3.1 Unary Lookup (first bulleted list, tenth item):

    Delete the text:

    • [1, 2, 5, 7]?* evaluates to (1, 2, 5, 7).

  3. In 3.11.3.1 Unary Lookup (first bulleted list, eleventh item):

    Delete the text:

    • [[1, 2, 3], [4, 5, 6]]?* evaluates to ([1, 2, 3], [4, 5, 6])

  4. In 3.11.3.2 Postfix Lookup (first bulleted list):

    Insert after the text:

    • map { "first" : "Jenna", "last" : "Scott" }?first evaluates to "Jenna"

    • [4, 5, 6]?2 evaluates to 5.

    • (map {"first": "Tom"}, map {"first": "Dick"}, map {"first": "Harry"})?first evaluates to the sequence ("Tom", "Dick", "Harry") , in implementation-defined order.

    • ([1,2,3], [4,5,6])?2 evaluates to the sequence (2, 5).

    • ["a","b"]?3 raises a dynamic error [err:FO31AY0001]FO31

    The following:

    • If $m is bound to the weekdays map described in 3.11.1 Maps, then $m?* returns the values ("Sunday","Monday","Tuesday","Wednesday", "Thursday", "Friday","Saturday"), in implementation-dependent order.

    • [1, 2, 5, 7]?* evaluates to (1, 2, 5, 7).

    • [[1, 2, 3], [4, 5, 6]]?* evaluates to ([1, 2, 3], [4, 5, 6])

XQ31.E3 - editorial

See Bug 30169

Description

The definition of "pure union types" is unnecessarily complex.

History

13 Oct 2017: Proposed

Change

In 2.5 Types (fifth paragraph):

Replace the text:

[Definition] A pure union type is an XML Schema union type that satisfies the following constraints: (1) {variety} is union, (2) the {facets} property is empty, (3) no type in the transitive membership of the union type has {variety} list, and (4) no type in the transitive membership of the union type is a type with {variety} union having a non-empty {facets} property.

With:

[Definition] A pure union type is a simple type that satisfies the following constraints: (1) {variety} is union, (2) {facets} is empty, (3) each type in its transitive membership is a generalized atomic type.

Note:

The term transitive membership is defined in [XML Schema 1.1 Part 2]; the definition is equally applicable to XSD 1.0.

XQ31.E2 - editorial

See Bug 30155

Description

The term "Query Environment" (used in the definition of external functions) is not explained; furthermore it is used in XPath as well as XQuery. This erratum fixes the problem by defining external functions without reference to the concept.

History

13 Oct 2017: Proposed

Change

In 2.1.2 Dynamic Context (first bulleted list, fifth item):

Replace the text:

[Definition] Named functions. This is a mapping from (expanded QName, arity) to functionDM31. It supplies a function for each signature in statically known function signatures and may supply other functions (see 2.2.5 Consistency Constraints). Named functions can include functions with implementation-dependent implementations; these functions do not have a static context or a dynamic context of their own. external functions. [Definition] External functions are functions that are implemented outside the query environment. For example, an implementation might provide a set of implementation-defined external functions in addition to the core function library described in [XQuery and XPath Functions and Operators 3.1] . [Definition] An implementation-defined function is an external function that is implementation-defined .

With:

[Definition] Named functions. This is a mapping from (expanded QName, arity) to functionDM31. It supplies a function for each signature in statically known function signatures and may supply other functions (see 2.2.5 Consistency Constraints). Named functions can include external functions. [Definition] An external function is any function that is neither specified as part of the language specifications (typically, in [XQuery and XPath Functions and Operators 3.1] ), nor defined using the features of the XQuery language. For example, an implementation might provide a set of implementation-defined external functions in addition to the core function library described in [XQuery and XPath Functions and Operators 3.1] . [Definition] An implementation-defined function is an external function that is implementation-defined .

XQ31.E1 - editorial

See Bug 30153

Description

The introductory section on Atomizations mentions that FOTY0012 can be raised, but other errors (for example, FOTY0013) are also possible.

History

13 Oct 2017: Proposed

Change

In 2.4.2 Atomization (first paragraph):

Replace the text:

The semantics of some XQuery 3.1 operators depend on a process called atomization. Atomization is applied to a value when the value is used in a context in which a sequence of atomic values is required. The result of atomization is either a sequence of atomic values or a type error [err:FO31TY0012]FO31. [Definition] Atomization of a sequence is defined as the result of invoking the fn:data function, as defined in Section 2.4 fn:data FO31. fn:data function on the sequence, as defined in [XQuery and XPath Functions and Operators 3.1] .

With:

The semantics of some XQuery 3.1 operators depend on a process called atomization. Atomization is applied to a value when the value is used in a context in which a sequence of atomic values is required. The result of atomization is either a sequence of atomic values or a type error. [Definition] Atomization of a sequence is defined as the result of invoking the fn:data function, as defined in Section 2.4 fn:data FO31.


Index by affected section

2.1.2 Dynamic Context

XQ31.E2

2.4.2 Atomization

XQ31.E1

2.5 Types

XQ31.E3

3.11.3.1 Unary Lookup

XQ31.E4

3.11.3.2 Postfix Lookup

XQ31.E4

Index by Bugzilla entry

Bug #30153: XQ31.E1

Bug #30155: XQ31.E2

Bug #30169: XQ31.E3

Bug #30175: XQ31.E4

Index by error

FOTY0012: XQ31.E1 XQ31.E2

FOTY0013: XQ31.E1 XQ31.E2