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 Formal Semantics 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 [FSerrata] 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
FS.E020 Correct errors in examples in section 2.4.4.
FS.E019 Correct a normalization error in section 4.3.2 Filter Expressions.
FS.E018 Correct various errors in section 8.2.3.1.1.
FS.E017 Update the "Processing Model" diagram.
FS.E016 For internal function fs:idiv, correct the operand types and supporting op: function given in the Binary Operators table.
FS.E015 Fix some small errors in section 8.4.
FS.E014 Fix small errors in section 7.2.3.
FS.E013 Fix small errors in sections 7.2.1 and 7.2.2.
FS.E012 Static Type Analysis must allow for empty text nodes introduced during normalization of direct element constructors.
FS.E011 Correct/simplify/complete the Normalization rules defining []ElementContent and []AttributeContent, and simplify the corresponding Dynamic Evaluation rules.
FS.E010 Clean up due to the removal of op:anyURI-equal from the F+O spec.
FS.E009 Fix some errors in the productions for FunctionSig and TypeList.
FS.E008 Fix a bug in the normalization of function calls.
FS.E007 Fix miscellaneous small errors in section 5.
FS.E006 Fix problems involving the domains of statEnv.funcType and dynEnv.funcDefn: Although section 3.1.1 declares the domain of statEnv.funcType to be (expanded-QName, arity), some inference rules neglect the arity.
FS.E005 Put 'Expr' in parentheses when it occurs as a function argument.
FS.E004 Fix typo in function signature.
FS.E003 Complete the changes entailed by adding a local-namespaces component to the Core CompElemConstructor.
FS.E002 Both Core and Formal grammars had symbols 'NamespaceBinding' and 'NamespaceBindings'.
FS.E001 Make normalization of DirAttributeValue more explicit.
Indexes
See Bug 4766
Correct errors in examples in section 2.4.4.
26 Jun 2007: Proposed
26 Jun 2007: Accepted
4 Oct 2007: Issued
In 2.4.4 Top level definitions / Example 1, replace:
define type UKAddress extends ipo:Address {
attribute exportCode of type ipo:UKPostcode
element postcode of type positiveInteger
};
with:
define type UKAddress extends ipo:Address {
attribute exportCode of type positiveInteger,
element postcode of type ipo:UKPostcode
};
In 2.4.4 Top level definitions / Example 6, replace:
A type declaration with one element name of type
xs:string follows by one or more elements street of
type xs:string.
define type Address {
element name of type xs:string,
element street of type xs:string*
}
with:
A type declaration with one element name of type
xs:string followed by one or more elements
street of type xs:string.
define type Address {
element name of type xs:string,
element street of type xs:string+
}
In 2.4.4 Top level definitions / Example 7, replace:
define type USAddress extends Address {
element zip name of type xs:integer
}
with:
define type USAddress extends Address {
element zip of type xs:integer
}
See Bug 4578
Correct a normalization error in section 4.3.2 Filter Expressions.
24 May 2007: Proposed
30 May 2007: Accepted
4 Oct 2007: Issued
In 4.3.2 Filter Expressions / Normalization / rule 2, replace:
with:
let $fs:sequence :=
[PrimaryExpr
PredicateList]Expr
return
|
let $fs:last
:= fn:count($fs:sequence)
return
|
fn:subsequence($fs:sequence,
$fs:last,1)
|
See Bug 4242
See Bug 4261
See Bug 4512
See Bug 4581
See Bug 5129
See Bug 3269
Correct various errors in section 8.2.3.1.1.
28 Apr 2007: Proposed
3 May 2007: Accepted
3 Oct 2007: Issued
The following 6 changes resolve bugs 4242, 4261(a), and 4581 (by adding a "?" at the end of the result types), and some of 3269 (by fixing the input types in four of the rules).
In rule 2 / conclusion, replace:
statEnv |- test QName2 with element of element * OptTypeSpecifier : element
QName2 OptTypeSpecifier
|
with:
statEnv |- test QName2 with element of element * OptTypeSpecifier : element
QName2 OptTypeSpecifier
?
|
In rule 5 / conclusion, replace:
statEnv |- test
*:LocalPart2
with element
of element *
OptTypeSpecifier
: element
*:LocalPart2
OptTypeSpecifier
|
with:
statEnv |- test
*:LocalPart2
with element
of element *
OptTypeSpecifier
: element
*
OptTypeSpecifier
?
|
In rule 7 / conclusion, replace:
statEnv |- test Prefix2:* with element of element * OptTypeSpecifier : element
Prefix2:*
OptTypeSpecifier
|
with:
statEnv |- test Prefix2:* with element of element * OptTypeSpecifier : element
*
OptTypeSpecifier
?
|
In rule 10 / conclusion, replace:
statEnv |- test QName2 with attribute of attribute * OptTypeReference : attribute
QName2 OptTypeReference
|
with:
statEnv |- test QName2 with attribute of attribute * OptTypeReference : attribute
QName2 OptTypeReference
?
|
In rule 13 / conclusion, replace:
statEnv |- test
*:LocalPart2
with attribute
of attribute *
OptTypeReference
: attribute
*:LocalPart2
OptTypeReference
|
with:
statEnv |- test
*:LocalPart2
with attribute
of attribute *
OptTypeReference
: attribute
*
OptTypeReference
?
|
In rule 15 / conclusion, replace:
statEnv |- test Prefix2:* with attribute of attribute * OptTypeReference : attribute
Prefix2:*
OptTypeReference
|
with:
statEnv |- test Prefix2:* with attribute of attribute * OptTypeReference : attribute
*
OptTypeReference
?
|
The following 3 changes resolve bugs 4261(b), 4261(c), and 5129, respectively.
In rule 4, delete premises 2 and 3:
| statEnv.namespace(Prefix1) = (NamespaceKind,AnyURI) |
fn:namespace-uri-from-QName(expanded-QName1) = AnyURI |
In rule 6 / premise 2, replace:
| statEnv.namespace(Prefix 1 ) = (NamespaceKind,AnyURI) |
with:
| statEnv.namespace(Prefix 2 ) = (NamespaceKind,AnyURI) |
In rule 14 / premise 2, replace:
| statEnv |- QName1 of elem/type expands to expanded-QName1 |
with:
| statEnv |- QName1 of attr expands to expanded-QName1 |
The following 7 changes resolve bug 4261(d).
Between rules 1 and 2, insert this rule:
|
||||
|
|
||||
|
Between rules 4 and 5, insert this rule:
|
||||
|
|
||||
|
Between rules 6 and 7, insert this rule:
|
|||||
|
|
|||||
|
Between rules 9 and 10, insert this rule:
|
||||
|
|
||||
|
Between rules 12 and 13, insert this rule:
|
||||
|
|
||||
|
Between rules 14 and 15, insert this rule:
|
|||||
|
|
|||||
|
Delete rule 17:
Lastly, if none of the above rules holds, then the type of the input expression is empty.
|
|||||||||
|
|
|||||||||
| statEnv |- test NameTest with element of element ElementNameOrWildcard 2 TypeSpecifier2 : empty |
The following 2 changes resolve bug 4512(a).
In rule 8 / conclusion, replace:
statEnv |- test * with element of
element QName OptTypeSpecifier
:
element QName OptTypeSpecifier
|
with:
statEnv |- test * with element of
ElementType
:
ElementType
|
In rule 16 / conclusion, replace:
statEnv |- test * with attribute of
attribute QName OptTypeReference
:
attribute QName OptTypeReference
|
with:
statEnv |- test * with attribute of
AttributeType
:
AttributeType
|
The following 2 changes resolve bug 4512(b).
Between rules 8 and 9, insert this rule:
Between rule 16 and 17, insert this rule:
The next 2 changes resolve some more of bug 3269.
Delete rule 3:
|
|
| statEnv |- test QName2 with element of element OptTypeSpecifier : element QName2 OptTypeSpecifier |
Delete rule 11:
|
|
| statEnv |- test QName2 with attribute of attribute OptTypeReference : attribute QName2 OptTypeReference |
See Bug 4371
Update the "Processing Model" diagram.
6 Mar 2007: Proposed
6 Mar 2007: Accepted
2 Oct 2007: Issued
In 3.2.1 Processing model, in the diagram, add a box labelled "Modules", and an arrow labelled "(SQ3)" pointing from the "Modules" box to the "Static context" box.
See Bug 3847
For internal function fs:idiv, correct the operand types and supporting op: function given in the Binary Operators table.
18 Oct 2006: Proposed
14 Feb 2007: Accepted
2 Oct 2007: Issued
In C.2 Mapping of Overloaded Internal Functions / Binary Operators table, replace:
fs:idiv(A, B) |
xs:integer |
xs:integer |
op:integer-div(A, B) | xs:integer |
with:
fs:idiv(A, B) |
xs:integer |
xs:integer |
op:numeric-integer-divide(A, B) | xs:integer |
fs:idiv(A, B) |
xs:decimal |
xs:decimal |
op:numeric-integer-divide(A, B) | xs:integer |
fs:idiv(A, B) |
xs:float |
xs:float |
op:numeric-integer-divide(A, B) | xs:integer |
fs:idiv(A, B) |
xs:double |
xs:double |
op:numeric-integer-divide(A, B) | xs:integer |
See Bug 1783
Fix some small errors in section 8.4.
6 Oct 2006: Proposed
16 Jan 2007: Accepted
2 Oct 2007: Issued
In 8.4 Judgments for FLWOR and other expressions on sequences, replace:
[Definition: A Prime types is a choice of item types].
with:
[Definition: A prime type is a choice of item types.]
See Bug 1756
Fix small errors in section 7.2.3.
8 Sep 2006: Proposed
16 Jan 2007: Accepted
9 Aug 2007: Proposed
9 Aug 2007: Accepted
2 Oct 2007: Issued
In 7.2.3 The fn:abs, fn:ceiling, fn:floor, fn:round, and fn:round-half-to-even functions / Static Type Analysis / para 1, replace:
Note that the fact that the type should be the least is cannot expressed by the inference rule notation used here.
with:
Note that the fact that the type should be the least is not expressed by the inference rule notation used here.
and delete:
Instead of writing a separate
judgment for each function, we write one rule for the functions
whose name is either (FN-URI,"abs"),
(FN-URI,"ceiling"),
(FN-URI,"floor"),
(FN-URI,"round"), or
(FN-URI,"round-half-to-even")
functions.
In 7.2.3 The fn:abs, fn:ceiling, fn:floor, fn:round, and fn:round-half-to-even functions / Static Type Analysis / rule 1 / premise 5, replace:
FN-URI,"ceiling"),
(FN-URI,"floor"),
(FN-URI,"round"),
(FN-URI,"round-half-to-even") }
with:
FN-URI,"abs"),
(FN-URI,"ceiling"),
(FN-URI,"floor"),
(FN-URI,"round"),
(FN-URI,"round-half-to-even") }
See Bug 1754
Fix small errors in sections 7.2.1 and 7.2.2.
5 Oct 2006: Proposed
16 Jan 2007: Accepted
2 Oct 2007: Issued
In 7.2.1 The fn:last context function / Dynamic Evaluation / rule 1 / conclusion, replace:
with:
In 7.2.2 The fn:position context function / Dynamic Evaluation / rule 1 / conclusion, replace:
with:
See Bug 3771
Static Type Analysis must allow for empty text nodes introduced during normalization of direct element constructors.
10 Oct 2006: Proposed
19 Oct 2006: Accepted
2 Oct 2007: Issued
In 4.7.3.1 Computed Element Constructors / Static Type Analysis, replace:
The content expression must return a sequence of nodes with all the attribute nodes before any element, processing-instructions or comment nodes. Note that the type allows text nodes interleaved with attribute nodes in the beginning. Although this results in a looser type checking, this accounts for the possible presence of empty text nodes resulting from normalization of direct element constructors (See [4.7.1 Direct Element Constructors]).
with:
The content expression must return a sequence of nodes with attribute nodes at the beginning.
and in each of the four rules, in the last premise, replace:
(attribute*, (element | comment | processing-instruction)*) & text*
with:
attribute *, (element | text | comment | processing-instruction) *
In 7.1.5 The fs:item-sequence-to-node-sequence function / Static Type Analysis, insert:
If the input sequence contains any attribute nodes, they must precede any other items, with the exception that text nodes are allowed throughout. This exception results in looser type checking, but it is necessitated by the possible presence of empty text nodes introduced by normalization of direct element constructors (see [4.7.1 Direct Element Constructors]).
and in the subsequent rule, replace:
attribute*,
(element|document|text|processing-instruction|comment|xs:string|
xs:float| ...|xs:NOTATION)*
with:
( attribute*,
(element|document|processing-instruction|comment|xs:string|
xs:float|...|xs:NOTATION)* ) & text*
See Bug 3758
See Bug 3760
Correct/simplify/complete the Normalization rules defining []ElementContent and []AttributeContent, and simplify the corresponding Dynamic Evaluation rules.
10 Oct 2006: Proposed
19 Oct 2006: Accepted
1 Oct 2007: Issued
In 4.7.1 Direct Element Constructors / Normalization, delete:
We distinguish between direct element constructors that contain only one element-content unit and those that contain more than one element-content unit.
and delete rule 3:
and after the former rule 4 / now rule 3, insert:
(Note that this rule should be understood to cover the degenerate cases of n=0 and n=1, where the element constructor's content consists of zero or one element-content units.)
In 4.7.1.1 Attributes / Normalization, replace:
As with literal XML elements, we need to distinguish between direct attribute constructors that contain one attribute-content unit and those that contain multiple attribute-content units, because the rule for converting sequences of atomic values into strings is applied to sequences within distinct enclosed expressions. If the direct attribute constructor contains exactly one attribute-content unit, we simply normalize that unit by applying the normalization rule for attribute content units:
| [ AttributeContentUnit1 ]AttributeContent |
| == |
| [AttributeContentUnit1]AttributeContentUnit |
If the direct attribute constructor contains more than one attribute-content unit, we normalize each unit individually and ...
with:
To apply []AttributeContent to zero or more attribute-content units, we normalize each unit individually and ...
and after the former rule 5 / now rule 4, insert:
(Note that this rule should be understood to cover the degenerate cases of n=0 and n=1, where the attribute constructor's content consists of zero or one attribute-content units.)
In 4.7.3.2 Computed Attribute Constructors / Dynamic Evaluation, replace:
Second, the function
fs:item-sequence-to-untypedAtomic
is applied to the content expression and this function call is
evaluated in the dynamic environment. Recall from [4.7.3.2 Computed Attribute
Constructors] that during normalization, we do not convert
the content of direct attribute constructors that contain one
attribute-content unit. This guarantees that useful type
information is preserved for static analysis. Since the conversion
function fs:item-sequence-to-untypedAtomic
was not applied to all attribute constructors during normalization,
we have to apply it at evaluation time. (As before, it is possible
to elide the application of fs:item-sequence-to-untypedAtomic
injected during normalization and the application injected during
evaluation.)
with:
Second, the content expression is evaluated in the dynamic environment.
and in rule 1 / premise 1, replace:
dynEnv |- fs:item-sequence-to-untypedAtomic((
Expr)) =>
AtomicValue |
with:
| dynEnv |- Expr => AtomicValue |
and in rule 2 / premise 4, replace:
dynEnv |- fs:item-sequence-to-untypedAtomic((
Expr2)) => AtomicValue2 |
with:
| dynEnv |- Expr2 => AtomicValue2 |
See Bug 3670
Clean up due to the removal of op:anyURI-equal from the F+O spec.
26 Sep 2006: Proposed
26 Sep 2006: Accepted
30 Sep 2007: Issued
In C.2 Mapping of Overloaded Internal Functions / Notation 2, replace:
fs:eq(A, B) |
xs:anyURI |
xs:anyURI |
op:anyURI-equal(A, B) | xs:boolean |
| ... | ||||
fs:ne(A, B) |
xs:anyURI |
xs:anyURI |
fn:not(op:anyURI-equal(A, B)) |
xs:boolean |
with:
fs:eq(A, B) |
xs:anyURI |
xs:anyURI |
op:numeric-equal(fn:compare(A, B), 0) | xs:boolean |
| ... | ||||
fs:ne(A, B) |
xs:anyURI |
xs:anyURI |
fn:not(op:numeric-equal(fn:compare(A, B),
0)) |
xs:boolean |
In 8.5.1 Type Promotion / Semantics, insert:
xs:anyURI can be promoted to
xs:string:
|
|
||
|
See Bug 3142
Fix some errors in the productions for FunctionSig and TypeList.
21 Apr 2006: Proposed
24 Apr 2006: Accepted
29 Sep 2007: Issued
In 3.1.1 Static Context / Notation and A.2 Formal BNF / Non-Terminals, replace:
| [85 (Formal)] | FunctionSig |
::= | "declare" "function" expanded-QName "(" TypeList? ")" "as" SequenceType |
| [86 (Formal)] | TypeList |
::= | SequenceType (","
Type)* |
with:
| [85 (Formal)] | FunctionSig |
::= | "declare" "function" expanded-QName "(" TypeList? ")" "as" Type |
| [86 (Formal)] | TypeList |
::= | Type ("," Type)* |
See Bug 1680
Fix a bug in the normalization of function calls.
17 Jul 2005: Proposed
24 Apr 2006: Accepted
29 Sep 2007: Issued
In 4.1.5 Function Calls / Normalization / rule 1 / premise 2, replace:
| statEnv.typeDefn(expanded-QName) = define type QName2 AtomicTypeDerivation |
with:
In 4.12.5 Constructor Functions, add the subsection:
Notation
Calls to constructor functions are normalized differently from other function calls, so we introduce an auxiliary judgment to detect whether the function being called is a constructor function.
This judgment holds when the expanded function name maps to an atomic type in the in-scope schema types.
|
||
|
|
||
| statEnv |- expanded-QName denotes a |