Errata for XQuery 1.0 and XPath 2.0 Functions and Operators

10 April 2009

Latest version:
http://www.w3.org/XML/2007/qt-errata/xpath-functions-errata.html
Editor:
Michael Kay, Saxonica http://www.saxonica.com/

Abstract

This document addresses errors in the XQuery 1.0 and XPath 2.0 Functions and Operators 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 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.

Substantive corrections are proposed by the XSL Working Group and the XML Query Working Group (part of the XML Activity), where there is 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 [FOerrata] 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/.

Status of this Document

This is a public draft. None of the errata reported in this document have been approved by a Call for Review of Proposed Corrections or a Call for Review of an Edited Recommendation. As a consequence, they must not be considered to be normative.

The Working Group does not intend to progress these errata to normative status; instead, it intends to publish a second edition of the Recommendation incorporating these errata, and to progress the second edition to normative status.

Table of Contents

  Errata

     FO.E48   The reference to xs:IDREFS in the description of fn:id() is misleading, since xs:IDREFS has a minLength of 1.

     FO.E47   The rules for fn:min() and fn:max() appear contradictory about whether the input sequence is allowed to contain a mixture of xs:string and xs:anyURI values.

     FO.E46   The word "Summary" is repeated in the specification of op:gMonthDayEqual()

     FO.E45   Typographical error in the explanation of an example of op:gYearEqual()

     FO.E44   The distinct-values() function has problems caused by non-transitivity of the eq operator

     FO.E43   It is not explicitly stated that notes and examples are non-normative

     FO.E42   The rules for comparing namespace nodes in fn:deep-equal() are inappropriate, for example they can lead to a node not being equal to itself.

     FO.E41   Unclear scenario for example of fn:index-of

     FO.E40   Incorrect example for op:gMonth-equal (missing closing parenthesis)

     FO.E39   Incorrect example for op:divide-dayTimeDuration (uses wrong type name)

     FO.E38   Incorrect duration syntax in example code

     FO.E37   Missing closing parenthesis in description of fn:local-name

     FO.E36   Misleading example of fn:number

     FO.E35   Missing closing quote in example of op:divide-dayTimeDuration-by-dayTimeDuration

     FO.E34   In fn:string-length, a sentence with multiple conditions is ambiguously worded.

     FO.E33   The behaviour of the idiv operator is unclear in situations involving rounding or overflow, and it is not stated clearly what the result of idiv is when the second operand is infinity.

     FO.E32   Code in illustrative functions for casting to dates and times uses fn:length in place of fn:string-length.

     FO.E31   The fn:id() function does not have the correct semantics when dealing with ID-valued elements.

     FO.E30   The behavior of the idiv operator is unclear in situations involving rounding or overflow.

     FO.E29   In the description of fn:idref, fn:normalize-space needs to be applied to the string value of the node, not to its typed value.

     FO.E28   It is unclear what happens when implementation limits are exceeded in casting to xs:gYear or xs:gYearMonth.

     FO.E27   The rules for fn:min() and fn:max() are not entirely clear about the type of the returned result.

     FO.E26   The doc() and doc-available() functions are unclear on the rules for validating the first argument.

     FO.E25   Misplaced full stop in (non-normative) error text for error FORX0001

     FO.E24   The regex specification allows a back-reference within square brackets, which is meaningless.

     FO.E23   Summary of op:unary-plus and op:unary-minus ignores the possibility of type promotion.

     FO.E22   Narrative for fn:namespace-uri-from-QName refers to xs:string rather than xs:anyURI.

     FO.E21   Errors in examples for the function fn:string-join.

     FO.E20   Errors in examples for the function op:duration-equal.

     FO.E19   Typo in the description of the fn:concat function.

     FO.E18   In the (non-normative) appendix summarizing error conditions, the description of code FORG0008 is misleading.

     FO.E17   In fn:starts-with and fn:ends-with, the requirement that there should be a minimal match at the start of the string gives unacceptable results.

     FO.E16   In fn:lang, the list item numbers (1) and (2) are duplicated.

     FO.E15   In fn:namespace-uri, the terminology "the namespace URI of the xs:QName of $arg" is incorrect.

     FO.E14   In fn:normalize-space, a sentence with multiple conditions is ambiguously worded.

     FO.E13   The conditions under which a node has the is-id or is-idref property need to be clarified.

     FO.E12   When multiplying or dividing a yearMonthDuration by a number, rounding behavior is underspecified.

     FO.E11   Although the specification states that a string literal can be cast to an xs:QName or xs:NOTATION, the semantics of the operation are not described in the obvious place.

     FO.E10   In 17.1.2, the procedure for casting xs:NOTATION to xs:string does not work because it uses functions that are defined only on xs:QName.

     FO.E9   In Appendix D, the function signature of the fn:translate function is quoted incorrectly.

     FO.E8   A character code confuses decimal and hexadecimal notation

     FO.E7   The meaning of the regex flag "m" is unclear when the last character in the string is a newline

     FO.E6   Casting from date and time type to string represents the UTC timezone as "+00:00" rather than as "Z".

     FO.E5   The function signatures for the internal functions op:subtract-dates and op:subtract-dateTimes incorrectly allow an empty sequence as the return value.

     FO.E4   The regex specification allows a back-reference within square brackets, which is meaningless.

     FO.E3   An example under fn:idref is incorrectly formatted

     FO.E2   The description of fn:subsequence contains a spurious variable $p

     FO.E1   In fn:resolve-uri it is unclear what happens when the supplied base URI is a relative reference

  Indexes

    Index by affected section

    Index by Bugzilla entry

    Index by function

    Index by error-code

    Index by type


FO.E48 - editorial

See Bug 6591

Description

The reference to xs:IDREFS in the description of fn:id() is misleading, since xs:IDREFS has a minLength of 1.

History

17 Mar 2009: Proposed

17 Mar 2009: Accepted

Change

In 15.5.2 fn:id (first numbered list, second item, first bulleted list, second item, first paragraph):

Replace the text:

Each xs:string in $arg is parsed as if it were of type IDREFS, that is, each xs:string in $arg is treated as a whitespace-separated sequence of tokens, each acting as an IDREF. These tokens are then included in the list of candidate IDREFs. If any of the tokens is not a lexically valid IDREF (that is, if it is not lexically an xs:NCName), it is ignored. Formally, the candidate IDREF values are the strings in the sequence given by the expression:

With:

Each xs:string in $arg is treated as a whitespace-separated sequence of tokens, each token acting as an IDREF. These tokens are then included in the list of candidate IDREF values. If any of the tokens is not a lexically valid IDREF (that is, if it is not lexically an xs:NCName), it is ignored. Formally, the candidate IDREF values are the strings in the sequence given by the expression:

FO.E47 - editorial

See Bug 5671

Description

The rules for fn:min() and fn:max() appear contradictory about whether the input sequence is allowed to contain a mixture of xs:string and xs:anyURI values. (This erratum relates to the problem identified in comment #9 of the Bugzilla entry.)

History

14 Feb 2009: Proposed

16 Feb 2009: Amended

17 Mar 2009: Amended

17 Mar 2009: Accepted

Changes

  1. In 15.4.4 fn:min (first bulleted list, second item):

    Replace the text:

    With:

    • Values of type xs:anyURI are cast to xs:string

  2. In 15.4.4 fn:min (fifth paragraph):

    Replace the text:

    All items in $arg must be numeric or derived from a single base type for which the le operator is defined. In addition, the values in the sequence must have a total order. If date/time values do not have a timezone, they are considered to have the implicit timezone provided by the dynamic context for the purpose of comparison. Duration values must either all be xs:yearMonthDuration values or must all be xs:dayTimeDuration values.

    With:

    All items in the converted sequence must be derived from a single base type for which the le operator is defined. In addition, the values in the sequence must have a total order. If date/time values do not have a timezone, they are considered to have the implicit timezone provided by the dynamic context for the purpose of comparison. Duration values must either all be xs:yearMonthDuration values or must all be xs:dayTimeDuration values.

  3. In 15.4.4 fn:min (eighth paragraph):

    Replace the text:

    If the items in the value of $arg are of type xs:string or types derived by restriction from xs:string, then the determination of the item with the smallest value is made according to the collation that is used. If the type of the items in $arg is not xs:string and $collation is specified, the collation is ignored.

    With:

    If the items in the converted sequence are of type xs:string or types derived by restriction from xs:string, then the determination of the item with the smallest value is made according to the collation that is used. If the type of the items in the converted sequence is not xs:string and $collation is specified, the collation is ignored.

  4. In 15.4.3 fn:max (first bulleted list, second item):

    Replace the text:

    With:

    • Values of type xs:anyURI are cast to xs:string

  5. In 15.4.3 fn:max (fifth paragraph):

    Replace the text:

    All items in $arg must be numeric or derived from a single base type for which the ge operator is defined. In addition, the values in the sequence must have a total order. If date/time values do not have a timezone, they are considered to have the implicit timezone provided by the dynamic context for purposes of comparison. Duration values must either all be xs:yearMonthDuration values or must all be xs:dayTimeDuration values.

    With:

    All items in the converted sequence must be derived from a single base type for which the le operator is defined. In addition, the values in the sequence must have a total order. If date/time values do not have a timezone, they are considered to have the implicit timezone provided by the dynamic context for the purpose of comparison. Duration values must either all be xs:yearMonthDuration values or must all be xs:dayTimeDuration values.

  6. In 15.4.3 fn:max (eighth paragraph):

    Replace the text:

    If the items in the value of $arg are of type xs:string or types derived by restriction from xs:string, then the determination of the item with the largest value is made according to the collation that is used. If the type of the items in $arg is not xs:string and $collation is specified, the collation is ignored.

    With:

    If the items in the converted sequence are of type xs:string or types derived by restriction from xs:string, then the determination of the item with the smallest value is made according to the collation that is used. If the type of the items in the converted sequence is not xs:string and $collation is specified, the collation is ignored.

FO.E46 - editorial

See Bug 6345

Description

The word "Summary" is repeated in the specification of op:gMonthDayEqual()

History

14 Feb 2009: Proposed

13 Mar 2009: Accepted

Change

In 10.4.17 op:gMonthDay-equal (first paragraph):

Replace the text:

Summary: Summary: Returns true if and only if the xs:dateTimes representing the starting instants of equivalent occurrences of $arg1 and $arg2 compare equal. The starting instants of equivalent occurrences of $arg1 and $arg2 are calculated by adding the missing components of $arg1 and $arg2 from an xs:dateTime template such as 1972-xx-xxT00:00:00. Returns false otherwise.

With:

Summary: Returns true if and only if the xs:dateTimes representing the starting instants of equivalent occurrences of $arg1 and $arg2 compare equal. The starting instants of equivalent occurrences of $arg1 and $arg2 are calculated by adding the missing components of $arg1 and $arg2 from an xs:dateTime template such as 1972-xx-xxT00:00:00. Returns false otherwise.

FO.E45 - editorial

See Bug 6344

Description

Typographical error in the explanation of an example of op:gYearEqual()

History

14 Feb 2009: Proposed

13 Mar 2009: Accepted

Change

In 10.4.16.1 Examples (first bulleted list, first item):

Replace the text:

op:gYear-equal(xs:gYear("2005-12:00"), xs:gYear("2005+12:00")) returns false. The starting instants are 2005-01-01T00:00:00-12:00 and 2005-01-01T00:00:00+12:00, respectively, and normalize to 2005-01-015T12:00:00Z and 2004-12-31T12:00:00Z.

With:

op:gYear-equal(xs:gYear("2005-12:00"), xs:gYear("2005+12:00")) returns false. The starting instants are 2005-01-01T00:00:00-12:00 and 2005-01-01T00:00:00+12:00, respectively, and normalize to 2005-01-01T12:00:00Z and 2004-12-31T12:00:00Z.

FO.E44 - substantive

See Bug 5183

Description

The distinct-values() function has problems caused by non-transitivity of the eq operator

History

14 Feb 2009: Proposed

13 Mar 2009: Accepted

Change

In 15.1.6 fn:distinct-values (seventh paragraph):

Insert after the text:

Which value of a set of values that compare equal is returned is implementation-dependent.

The following:

If the input sequence contains values of different numeric types that differ from each other by small amounts, then the eq operator is not transitive, because of rounding effects occurring during type promotion. In the situation where the input contains three values A, B, and C such that A eq B, B eq C, but A ne C, then the number of items in the result of the function (as well as the choice of which items are returned) is implementation-dependent, subject only to the constraints that (a) no two items in the result sequence compare equal to each other, and (b) every input item that does not appear in the result sequence compares equal to some item that does appear in the result sequence.

For example, this arises when computing:

      distinct-values(
         (xs:float('1.0'),
          xs:decimal('1.0000000000100000000001',
          xs:double( '1.00000000001'))

because the values of type xs:float and xs:double both compare equal to the value of type xs:decimal but not equal to each other.

FO.E43 - editorial

See Bug 6375

Description

It is not explicitly stated that notes and examples are non-normative

History

28 Jan 2009: Proposed

13 Mar 2009: Accepted

Change

Insert at the end of section 1.1 Conformance

The following:

In this document, text labeled as an example or as a Note is provided for explanatory purposes and is not normative.

FO.E42 - substantive

See Bug 6372

Description

The rules for comparing namespace nodes in fn:deep-equal() are inappropriate, for example they can lead to a node not being equal to itself.

History

28 Jan 2009: Proposed

13 Mar 2009: Accepted

Change

In 15.3.1 fn:deep-equal (starting at thirteenth paragraph):

Replace the text:

If the two nodes are both processing instruction nodes or namespace bindings, then they are deep-equal if and only if both the following conditions are satisfied:

  1. the two nodes have the same name, that is (node-name($i1) eq node-name($i2)).

  2. the string value of $i1 is equal to the string value of $i2.

With:

If the two nodes are both processing instruction nodes, then they are deep-equal if and only if both the following conditions are satisfied:

  1. the two nodes have the same name, that is (fn:node-name($i1) eq fn:node-name($i2)).

  2. the string value of $i1 is equal to the string value of $i2.

If the two nodes are both namespace nodes, then they are deep-equal if and only if both the following conditions are satisfied:

  1. the two nodes either have the same name or are both nameless, that is fn:deep-equal(fn:node-name($i1), fn:node-name($i2)).

  2. the string value of $i1 is equal to the string value of $i2 when compared using the Unicode codepoint collation.

FO.E41 - editorial

See Bug 6371

Description

Unclear scenario for example of fn:index-of

History

28 Jan 2009: Proposed

13 Mar 2009: Accepted

Change

In 15.1.3.1 Examples (first bulleted list, fourth item, first paragraph):

Replace the text:

If @a is an attribute of type xs:NMTOKENS whose typed value is " red green blue ", then: fn:index-of (@a, "blue") returns 3.

With:

If @a is an attribute of type xs:NMTOKENS whose string value is "red green blue", and whose typed value is therefore the sequence of three xs:NMTOKEN values ("red", "green", "blue"), then fn:index-of(@a, "blue") returns 3.

FO.E40 - editorial

See Bug 6359

Description

Incorrect example for op:gMonth-equal (missing closing parenthesis)

History

28 Jan 2009: Proposed

13 Mar 2009: Accepted

Change

In 10.4.18.1 Examples (first bulleted list, first item):

Replace the text:

With:

FO.E39 - editorial

See Bug 6355

Description

Incorrect example for op:divide-dayTimeDuration (uses wrong type name)

History

28 Jan 2009: Proposed

13 Mar 2009: Accepted

Change

In 10.6.9.1 Examples (first bulleted list):

Replace the text:

With:

FO.E38 - editorial

See Bug 6348

Description

Incorrect duration syntax in example code

History

28 Jan 2009: Proposed

13 Mar 2009: Accepted

Change

In 10.5.6.1 Examples (first bulleted list, second item):

Replace the text:

With:

FO.E37 - editorial

See Bug 6347

Description

Missing closing parenthesis in description of fn:local-name

History

28 Jan 2009: Proposed

13 Mar 2009: Accepted

Change

In 14.2 fn:local-name (sixth paragraph):

Replace the text:

Otherwise, the value returned will be the local part of the expanded-QName of the target node (as determined by the dm:node-name accessor in Section 5.11 node-name AccessorDM. This will be an xs:string whose lexical form is an xs:NCName.

With:

Otherwise, the value returned will be the local part of the expanded-QName of the target node (as determined by the dm:node-name accessor in Section 5.11 node-name AccessorDM). This will be an xs:string whose lexical form is an xs:NCName.

FO.E36 - editorial

See Bug 6346

Description

Misleading example of fn:number

History

28 Jan 2009: Proposed

13 Mar 2009: Accepted

Change

In 14.4.1 Examples (first bulleted list, second item):

Replace the text:

With:

FO.E35 - editorial

See Bug 6342

Description

Missing closing quote in example of op:divide-dayTimeDuration-by-dayTimeDuration

History

28 Jan 2009: Proposed

13 Mar 2009: Accepted

Change

In 10.6.10.1 Examples (first bulleted list):

Replace the text:

op:divide-dayTimeDuration-by-dayTimeDuration(xs:dayTimeDuration("P2DT53M11S"), xs:dayTimeDuration("P1DT10H)) returns 1.4378349...

With:

op:divide-dayTimeDuration-by-dayTimeDuration(xs:dayTimeDuration("P2DT53M11S"), xs:dayTimeDuration("P1DT10H")) returns 1.4378349...

FO.E34 - editorial

See Bug 6338

Description

In fn:string-length, a sentence with multiple conditions is ambiguously worded. To solve the problem, the relevant sentence can be simplified, because it doesn't need to say what happens when the argument is "." and there is no context item; that's covered in the rules for evaluating ".". (See also erratum E14)

History

28 Jan 2009: Proposed

13 Mar 2009: Accepted

Change

In 7.4.4 fn:string-length (third paragraph):

Replace the text:

If no argument is supplied, $arg defaults to the string value (calculated using fn:string()) of the context item (.). If no argument is supplied or if the argument is the context item and the context item is undefined an error is raised: [err:XPDY0002]XP.

With:

If no argument is supplied, $arg defaults to the string value (calculated using fn:string()) of the context item (.). If no argument is supplied and the context item is undefined an error is raised: [err:XPDY0002]XP.

FO.E33 - editorial

See Bug 6316

See Bug 6212

Description

The behaviour of the idiv operator is unclear in situations involving rounding or overflow, and it is not stated clearly what the result of idiv is when the second operand is infinity.

History

28 Jan 2009: Proposed

13 Mar 2009: Accepted

Change

In 6.2.5 op:numeric-integer-divide (starting at first paragraph):

Replace the text:

Summary: This function backs up the "idiv" operator and performs an integer division: that is, it divides the first argument by the second, and returns the integer obtained by truncating the fractional part of the result. The division is performed so that the sign of the fractional part is the same as the sign of the dividend.

If the dividend, $arg1, is not evenly divided by the divisor, $arg2, then the quotient is the xs:integer value obtained, ignoring (truncating) any remainder that results from the division (that is, no rounding is performed). Thus, the semantics " $a idiv $b " are equivalent to " ($a div $b) cast as xs:integer " except for error situations.

If the divisor is (positive or negative) zero, then an error is raised [err:FOAR0001]. If either operand is NaN or if $arg1 is INF or -INF then an error is raised [err:FOAR0002].

With:

Summary: This function backs up the "idiv" operator by performing an integer division.

If $arg2 is (positive or negative) zero, then an error is raised [err:FOAR0001]. If either operand is NaN or if $arg1 is INF or -INF then an error is raised [err:FOAR0002]. If $arg2 is INF or -INF (and $arg1 is not) then the result is zero.

Otherwise, subject to limits of precision and overflow/underflow conditions, the result is the largest (furthest from zero) xs:integer value $N such that fn:abs($N * $arg2) le fn:abs($arg1) and fn:compare($N * $arg2, 0) eq fn:compare($arg1, 0).

Note:

The second term in this condition ensures that the result has the correct sign.

The implementation may adopt a different algorithm provided that it is equivalent to this formulation in all cases where implementation-dependent or implementation-defined behavior does not affect the outcome, for example, the implementation-defined precision of the result of xs:decimal division.

Note:

Except in situations involving errors, loss of precision, or overflow/underflow, the result of $a idiv $b is the same as ($a div $b) cast as xs:integer.

FO.E32 - editorial

See Bug 6124

Description

Code in illustrative functions for casting to dates and times uses fn:length in place of fn:string-length.

History

28 Jan 2009: Proposed

13 Mar 2009: Accepted

Change

In 17.1.5 Casting to date and time types (starting at first code section):

Replace the text:

declare function eg:convertYearToString($year as xs:integer) as xs:string
{
   let $plusMinus := if ($year >= 0) then "" else "-"
   let $yearString := fn:abs($year) cast as xs:string
   let $length := fn:length($yearString)
   return
     if ($length = 1)  then fn:concat($plusMinus, "000", $yearString)
     else
     if ($length = 2)  then fn:concat($plusMinus, "00", $yearString)
       else
       if ($length = 3)  then fn:concat($plusMinus, "0", $yearString)
       else fn:concat($plusMinus, $yearString)
}
                    
declare function eg:convertTo2CharString($value as xs:integer) as xs:string
{
   let $string := $value cast as xs:string
   return 
     if (fn:length($string) = 1) then fn:concat("0", $string)
     else $string
}
                    
declare function eg:convertSecondsToString($seconds as xs:decimal) as xs:string
{
   let $string := $seconds cast as xs:string
   let $intLength := fn:length(($seconds cast as xs:integer) cast as xs:string)
   return 
     if ($intLength = 1) then fn:concat("0", $string)
     else $string
}
                    

With:

declare function eg:convertYearToString($year as xs:integer) as xs:string
{
   let $plusMinus := if ($year >= 0) then "" else "-"
   let $yearString := fn:abs($year) cast as xs:string
   let $length := fn:string-length($yearString)
   return
     if ($length = 1)  then fn:concat($plusMinus, "000", $yearString)
     else
     if ($length = 2)  then fn:concat($plusMinus, "00", $yearString)
       else
       if ($length = 3)  then fn:concat($plusMinus, "0", $yearString)
       else fn:concat($plusMinus, $yearString)
}
                    
declare function eg:convertTo2CharString($value as xs:integer) as xs:string
{
   let $string := $value cast as xs:string
   return 
     if (fn:string-length($string) = 1) then fn:concat("0", $string)
     else $string
}
                    
declare function eg:convertSecondsToString($seconds as xs:decimal) as xs:string
{
   let $string := $seconds cast as xs:string
   let $intLength := fn:string-length(($seconds cast as xs:integer) cast as xs:string)
   return 
     if ($intLength = 1) then fn:concat("0", $string)
     else $string
}
                    

FO.E31 - substantive

See Bug 6028

See Bug 6591

Description

The fn:id() function does not have the correct semantics when dealing with ID-valued elements. The resolution of this problem is to retain the behavior of fn:id() as specified, while introducing a new function fn:element-with-id() whose behavior reflects the intended meaning of ID-valued elements. To avoid making existing implementations non-conformant, the new function is optional.

History

28 Jan 2009: Proposed

17 Mar 2009: Amended

17 Mar 2009: Accepted

Changes

  1. In 15.5.2 fn:id (first paragraph):

    Insert after the text:

    Summary: Returns the sequence of element nodes that have an ID value matching the value of one or more of the IDREF values supplied in $arg .

    The following:

    Note:

    This function does not have the desired effect when searching a document in which elements of type xs:ID are used as identifiers. To preserve backwards compatibility, a new function fn:element-with-id is therefore being introduced; it behaves the same way as fn:id in the case of ID-valued attributes.

  2. Insert at the end of section 15.5 Functions and Operators that Generate Sequences

    The following:

    15.5.7 fn:element-with-id

    fn:element-with-id($arg as xs:string*) as element()*
    fn:element-with-id($arg as xs:string*, $node as node()) as element()*

    Summary: Returns the sequence of element nodes that have an ID value matching the value of one or more of the IDREF values supplied in $arg.

    Note:

    The fn:id function does not have the desired effect when searching a document in which elements of type xs:ID are used as identifiers. To preserve backwards compatibility, this function fn:element-with-id is therefore being introduced; it behaves the same way as fn:id in the case of ID-valued attributes.

    Unless otherwise specified in the conformance rules for a host language, implementation of this function is optional. Introduction of the function by means of an erratum therefore does not make existing implementations non-conformant.

    The function returns a sequence, in document order with duplicates eliminated, containing every element node E that satisfies all the following conditions:

    1. E is in the target document. The target document is the document containing $node, or the document containing the context item (.) if the second argument is omitted. The behavior of the function if $node is omitted is exactly the same as if the context item had been passed as $node. If $node, or the context item if the second argument is omitted, is a node in a tree whose root is not a document node [err:FODC0001] is raised. If the second argument is the context item, or is omitted, the following errors may be raised: if there is no context item, [err:XPDY0002]XP; if the context item is not a node [err:XPTY0004]XP.

    2. E has an ID value equal to one of the candidate IDREF values, where:

      • An element has an ID value equal to V if either or both of the following conditions are true:

        • The element has a child element node whose is-id property (See Section 5.5 is-id AccessorDM.) is true, and whose typed value is equal to V under the rules of the eq operator using the Unicode code point collation.

        • The element has an attribute node whose is-id property (See Section 5.5 is-id AccessorDM.) is true, and whose typed value is equal to V under the rules of the eq operator using the Unicode code point collation.

      • Each xs:string in $arg is treated as a whitespace-separated sequence of tokens, each acting as an IDREF. These tokens are then included in the list of candidate IDREF values. If any of the tokens is not a lexically valid IDREF (that is, if it is not lexically an xs:NCName), it is ignored. Formally, the candidate IDREF values are the strings in the sequence given by the expression:

        for $s in $arg return fn:tokenize(fn:normalize-space($s), ' ')[. castable as xs:IDREF]
    3. If several elements have the same ID value, then E is the one that is first in document order.

    Notes:

    See the Notes for the fn:id function, all of which apply equally to this function.

FO.E30 - substantive

Superseded by Erratum FO.E33

See Bug 6212

Description

The behavior of the idiv operator is unclear in situations involving rounding or overflow.

History

10 Nov 2008: Proposed

16 Dec 2008: Accepted

28 Jan 2009: Superseded

Change

In 6.2.5 op:numeric-integer-divide (starting at first paragraph):

Replace the text:

Summary: This function backs up the "idiv" operator and performs an integer division: that is, it divides the first argument by the second, and returns the integer obtained by truncating the fractional part of the result. The division is performed so that the sign of the fractional part is the same as the sign of the dividend.

If the dividend, $arg1, is not evenly divided by the divisor, $arg2, then the quotient is the xs:integer value obtained, ignoring (truncating) any remainder that results from the division (that is, no rounding is performed). Thus, the semantics " $a idiv $b " are equivalent to " ($a div $b) cast as xs:integer " except for error situations.

If the divisor is (positive or negative) zero, then an error is raised [err:FOAR0001]. If either operand is NaN or if $arg1 is INF or -INF then an error is raised [err:FOAR0002].

With:

Summary: This function backs up the "idiv" operator by performing an integer division:

If the divisor is (positive or negative) zero, then an error is raised [err:FOAR0001]. If either operand is NaN or if $arg1 is INF or -INF then an error is raised [err:FOAR0002].

Otherwise, subject to limits of precision and overflow/underflow conditions, the result is the largest (furthest from zero) xs:integer value $N such that fn:abs($N * $arg2) le fn:abs($arg1) and fn:compare($N * $arg2, 0) eq fn:compare($arg1, 0).

Note:

The second term in this condition ensures that the result has the correct sign.

The implementation may adopt a different algorithm provided that it is equivalent to this formulation in all cases where implementation-dependent or implementation-defined behavior does not affect the outcome, for example, the implementation-defined precision of the result of xs:decimal division.

Note:

Except in situations involving errors, loss of precision, or overflow/underflow, the result of $a idiv $b is the same as ($a div $b) cast as xs:integer.

FO.E29 - substantive

See Bug 6306

Description

In the description of fn:idref, fn:normalize-space needs to be applied to the string value of the node, not to its typed value.

History

12 Dec 2008: Proposed

16 Dec 2008: Accepted

13 Mar 2009: Accepted

Change

In 15.5.3 fn:idref (first numbered list, second item, first bulleted list, first item, first bulleted list, second item, first code):

Replace the text:

fn:tokenize(fn:normalize-space($N), ' ')

With:

fn:tokenize(fn:normalize-space(fn:string($N)), ' ')

FO.E28 - editorial

See Bug 5706

Description

It is unclear what happens when implementation limits are exceeded in casting to xs:gYear or xs:gYearMonth.

History

7 Jul 2008: Proposed

7 Oct 2008: Accepted

Change

In 17.1.1 Casting from xs:string and xs:untypedAtomic (eighth paragraph):

Replace the text:

In casting to a date or time value, if the value is too large or too small to be represented by the implementation, error [err:FODT0001] is raised.

With:

In casting to xs:date, xs:dateTime, xs:gYear, or xs:gYearMonth (or types derived from these), if the value is too large or too small to be represented by the implementation, error [err:FODT0001] is raised.

FO.E27 - editorial

Superseded by Erratum FO.E47

See Bug 5671

Description

The rules for fn:min() and fn:max() are not entirely clear about the type of the returned result.

History

7 Jul 2008: Proposed

7 Oct 2008: Accepted

17 Mar 2009: Superseded

Changes

  1. In 15.4.3 fn:max (first bulleted list, second item):

    Replace the text:

    Numeric and xs:anyURI values are converted to the least common type that supports the ge operator by a combination of type promotion and subtype substitution. See Section B.1 Type PromotionXP and Section B.2 Operator MappingXP.

    With:

    Numeric and xs:anyURI values are converted to the least common type reachable by a combination of type promotion and subtype substitution. See Section B.1 Type PromotionXP and Section B.2 Operator MappingXP.

  2. In 15.4.4 fn:min (first bulleted list, second item):

    Replace the text:

    Numeric and xs:anyURI values are converted to the least common type that supports the le operator by a combination of type promotion and subtype substitution. See Section B.1 Type PromotionXP and Section B.2 Operator MappingXP.

    With:

    Numeric and xs:anyURI values are converted to the least common type reachable by a combination of type promotion and subtype substitution. See Section B.1 Type PromotionXP and Section B.2 Operator MappingXP.

FO.E26 - substantive

See Bug 5688

Description

The doc() and doc-available() functions are unclear on the rules for validating the first argument. They also mandate that invalid URIs should always be rejected: this runs against the practice of many implementations, which often allow strings that are not valid URIs to be dereferenced, for example by the use of a catalog.

Note: this change indirectly affects the rules for the document() function in XSLT, which refers normatively to the doc() function

History

4 Jun 2008: Proposed

7 Oct 2008: Accepted

Changes

  1. In 15.5.5 fn:doc-available (first paragraph):

    Replace the text:

    Summary: If fn:doc($uri) returns a document node, this function returns true. If $uri is not a valid xs:anyURI, an error is raised [err:FODC0005]. Otherwise, this function returns false.

    With:

    Summary: The function returns true if and only if the function call fn:doc($uri) would return a document node.

    If $uri is an empty sequence, this function returns false.

    If a call on fn:doc($uri) would return a document node, this function returns true.

    If $uri is not a valid URI according to the rules applied by the implementation of fn:doc, an error is raised [err:FODC0005].

    Otherwise, this function returns false.

  2. In 15.5.4 fn:doc (first paragraph):

    Replace the text:

    Summary: Retrieves a document using an xs:anyURI, which may include a fragment identifier, supplied as an xs:string. If $uri is not a valid xs:anyURI, an error is raised [err:FODC0005]. If it is a relative URI Reference, it is resolved relative to the value of the base URI property from the static context. The resulting absolute URI Reference is promoted to an xs:string. If the Available documents discussed in Section 2.1.2 Dynamic ContextXP provides a mapping from this string to a document node, the function returns that document node. If the Available documents provides no mapping for the string, an error is raised [err:FODC0005].

    With:

    Summary: Retrieves a document using a URI supplied as an xs:string, and returns the corresponding document node.

  3. In 15.5.4 fn:doc (second paragraph):

    Insert after the text:

    If $uri is the empty sequence, the result is an empty sequence.

    The following:

    If $uri is not a valid URI, an error may be raised [err:FODC0005].

    If $uri is a relative URI reference, it is resolved relative to the value of the base URI property from the static context. The resulting absolute URI is promoted to an xs:string.

    If the Available documents described in Section 2.1.2 Dynamic ContextXP provides a mapping from this string to a document node, the function returns that document node.

    If the Available documents provides no mapping for the string, an error is raised [err:FODC0005].

    The URI may include a fragment identifier.

FO.E25 - editorial

See Bug 5719

Description

Misplaced full stop in (non-normative) error text for error FORX0001

History

4 Jun 2008: Proposed

7 Oct 2008: Accepted

Change

In C Error Summary (first error-list, thirty-first error):

Replace the text:

err:FORX0001 Invalid regular expression. flags

With:

err:FORX0001 Invalid regular expression flags.

FO.E24 - substantive

See Bug 4106

See Bug 4634

See Bug 5348

Description

The regex specification allows a back-reference within square brackets, which is meaningless. Furthermore, the specification doesn't say what happens when a regular expression contains a back-reference to a non-existent subexpression.

History

27 Feb 2007: Proposed

27 Jun 2007: Amended

22 Apr 2008: Amended

7 Oct 2008: Accepted

Change

In 7.6.1 Regular Expression Syntax (starting at first bulleted list, fourth item, first paragraph):

Replace the text:

Back-references are allowed. The construct \n where n is a single digit is always recognized as a back-reference; if this is followed by further digits, these digits are taken to be part of the back-reference if and only if the back-reference is preceded by sufficiently many capturing subexpressions. A back-reference matches the string that was matched by the nth capturing subexpression within the regular expression, that is, the parenthesized subexpression whose opening left parenthesis is the nth unescaped left parenthesis within the regular expression. The closing right parenthesis of this subexpression must occur before the back-reference. For example, the regular expression ('|").*\1 matches a sequence of characters delimited either by an apostrophe at the start and end, or by a quotation mark at the start and end.

If no string is matched by the nth capturing subexpression, the back-reference is interpreted as matching a zero-length string.

Back-references change the following production:

[23] charClassEsc ::= ( SingleCharEsc | MultiCharEsc | catEsc | complEsc )

to

[23] charClassEsc ::= ( SingleCharEsc | MultiCharEsc | catEsc | complEsc | backReference )

[23a] backReference ::= "\" [1-9][0-9]*

With:

Back-references are allowed outside a character class expression. A back-reference is an additional kind of atom. The construct \N where N is a single digit is always recognized as a back-reference; if this is followed by further digits, these digits are taken to be part of the back-reference if and only if the resulting number NN is such that the back-reference is preceded by NN or more unescaped opening parentheses. The regular expression is invalid if a back-reference refers to a subexpression that does not exist or whose closing right parenthesis occurs after the back-reference.

A back-reference matches the string that was matched by the Nth capturing subexpression within the regular expression, that is, the parenthesized subexpression whose opening left parenthesis is the Nth unescaped left parenthesis within the regular expression. For example, the regular expression ('|").*\1 matches a sequence of characters delimited either by an apostrophe at the start and end, or by a quotation mark at the start and end.

If no string is matched by the Nth capturing subexpression, the back-reference is interpreted as matching a zero-length string.

Back-references change the following production:

[9] atom ::= Char | charClass | ( '(' regExp ')' )

to

[9] atom ::= Char | charClass | ( '(' regExp ')' ) | backReference

[9a] backReference ::= "\" [1-9][0-9]*

Note:

Within a character class expression, \ followed by a digit is invalid. Some other regular expression languages interpret this as an octal character reference.

FO.E23 - editorial

See Bug 5617

Description

Summary of op:unary-plus and op:unary-minus ignores the possibility of type promotion.

History

22 Apr 2008: Proposed

7 Oct 2008: Accepted

Changes

  1. In 6.2.7 op:numeric-unary-plus (first paragraph):

    Replace the text:

    Summary: Backs up the unary "+" operator and returns its operand with the sign unchanged: (+ $arg). Semantically, this operation performs no operation.

    With:

    Summary: Backs up the unary "+" operator and returns its operand with the sign unchanged: (+ $arg).

    The returned value is equal to $arg, and is an instance of xs:integer, xs:decimal, xs:double, or xs:float depending on the type of $arg.

  2. In 6.2.8 op:numeric-unary-minus (first paragraph):

    Replace the text:

    Summary: Backs up the unary "-" operator and returns its operand with the sign reversed: (- $arg). If $arg is positive, its negative is returned; if it is negative, its positive is returned.

    With:

    Summary: Backs up the unary "-" operator and returns its operand with the sign reversed: (- $arg).

    The returned value is an instance of xs:integer, xs:decimal, xs:double, or xs:float depending on the type of $arg.

FO.E22 - editorial

See Bug 5618

Description

Narrative for fn:namespace-uri-from-QName refers to xs:string rather than xs:anyURI.

History

22 Apr 2008: Proposed

7 Oct 2008: Accepted

Change

In 11.2.4 fn:namespace-uri-from-QName (first paragraph):

Replace the text:

Summary: Returns the namespace URI for $arg as an xs:string. If $arg is the empty sequence, the empty sequence is returned. If $arg is in no namespace, the zero-length string is returned.

With:

Summary: Returns the namespace URI for $arg as an xs:anyURI. If $arg is the empty sequence, the empty sequence is returned. If $arg is in no namespace, the zero-length xs:anyURI is returned.

FO.E21 - markup

See Bug 5597

Description

Errors in examples for the function fn:string-join.

History

22 Apr 2008: Proposed

7 Oct 2008: Accepted

Changes

  1. In 7.4.2.1 Examples (first bulleted list):

    Replace the text:

    • fn:string-join(('Now', 'is', 'the', 'time', '...'), ' ') returns " Now is the time ... ".

    • fn:string-join(('Blow, ', 'blow, ', 'thou ', 'winter ', 'wind!'), '') returns " Blow, blow, thou winter wind! ".

    • fn:string-join((), 'separator') returns "".

    • Assume a document:

      <doc>
        <chap>
          <section>
          </section>
        </chap>
      </doc>

      with the <section> as the context node, the [XML Path Language (XPath) 2.0] expression:

      fn:string-join(for $n in ancestor-or-self::* return name($n), '/')

      returns " doc/chap/section "

    With:

    • fn:string-join(('Now', 'is', 'the', 'time', '...'), ' ') returns "Now is the time ...".

    • fn:string-join(('Blow, ', 'blow, ', 'thou ', 'winter ', 'wind!'), '') returns "Blow, blow, thou winter wind!".

    • fn:string-join((), 'separator') returns "".

    • Assume a document:

      <doc>
        <chap>
          <section>
          </section>
        </chap>
      </doc>

      with the <section> as the context node, the [XML Path Language (XPath) 2.0] expression:

      fn:string-join(for $n in ancestor-or-self::* return name($n), '/')

      returns "doc/chap/section"

  2. In 7.4.5.1 Examples (first bulleted list, first item):

    Replace the text:

    fn:normalize-space(" The  wealthy curled darlings of   our  nation. ") returns " The wealthy curled darlings of our nation. ".

    With:

    fn:normalize-space(" The  wealthy curled darlings of   our  nation. ") returns "The wealthy curled darlings of our nation.".

  3. In 7.4.1.1 Examples (first bulleted list):

    Replace the text:

    • fn:concat('un', 'grateful') returns " ungrateful ".

    • fn:concat('Thy ', (), 'old ', "groans", "", ' ring', ' yet', ' in', ' my', ' ancient',' ears.') returns " Thy old groans ring yet in my ancient ears. ".

    • fn:concat('Ciao!',()) returns " Ciao! ".

    • fn:concat('Ingratitude, ', 'thou ', 'marble-hearted', ' fiend!') returns " Ingratitude, thou marble-hearted fiend! ".

    With:

    • fn:concat('un', 'grateful') returns "ungrateful".

    • fn:concat('Thy ', (), 'old ', "groans", "", ' ring', ' yet', ' in', ' my', ' ancient',' ears.') returns "Thy old groans ring yet in my ancient ears.".

    • fn:concat('Ciao!',()) returns "Ciao!".

    • fn:concat('Ingratitude, ', 'thou ', 'marble-hearted', ' fiend!') returns "Ingratitude, thou marble-hearted fiend!".

  4. In 7.6.3.1 Examples (first bulleted list):

    Replace the text:

    • replace("abracadabra", "bra", "*") returns "a*cada*"

    • replace("abracadabra", "a.*a", "*") returns "*"

    • replace("abracadabra", "a.*?a", "*") returns "*c*bra"

    • replace("abracadabra", "a", "") returns "brcdbr"

    • replace("abracadabra", "a(.)", "a$1$1") returns "abbraccaddabbra"

    • replace("abracadabra", ".*?", "$1") raises an error, because the pattern matches the zero-length string

    • replace("AAAA", "A+", "b") returns " b "

    • replace("AAAA", "A+?", "b") returns " bbbb "

    • replace("darted", "^(.*?)d(.*)$", "$1c$2") returns " carted ". The first " d " is replaced.

    With:

    • replace("abracadabra", "bra", "*") returns "a*cada*"

    • replace("abracadabra", "a.*a", "*") returns "*"

    • replace("abracadabra", "a.*?a", "*") returns "*c*bra"

    • replace("abracadabra", "a", "") returns "brcdbr"

    • replace("abracadabra", "a(.)", "a$1$1") returns "abbraccaddabbra"

    • replace("abracadabra", ".*?", "$1") raises an error, because the pattern matches the zero-length string

    • replace("AAAA", "A+", "b") returns "b"

    • replace("AAAA", "A+?", "b") returns "bbbb"

    • replace("darted", "^(.*?)d(.*)$", "$1c$2") returns "carted". The first d is replaced.

FO.E20 - editorial

See Bug 5287

Description

Errors in examples for the function op:duration-equal.

History

14 Mar 2008: Proposed

7 Oct 2008: Accepted

Changes

  1. In 10.4.5.1 Examples (first bulleted list, fourth item, first code):

    Replace the text:

    op:duration-equal(xs:yearMonthDuration("P0Y"), xs:dayTimeDuration("PT0D"))

    With:

    op:duration-equal(xs:yearMonthDuration("P0Y"), xs:dayTimeDuration("P0D"))
  2. In 10.4.5.1 Examples (first bulleted list, fifth item, first code):

    Replace the text:

    op:duration-equal(xs:yearMonthDuration("P1Y"), xs:dayTimeDuration("PT365D"))

    With:

    op:duration-equal(xs:yearMonthDuration("P1Y"), xs:dayTimeDuration("P365D"))
  3. In 10.4.5.1 Examples (first bulleted list, seventh item, first code):

    Replace the text:

    op:duration-equal(xs:dayTimeDuration("PT10D"), xs:dayTimeDuration("PT240H"))

    With:

    op:duration-equal(xs:dayTimeDuration("P10D"), xs:dayTimeDuration("PT240H"))

FO.E19 - editorial

See Bug 5284

Description

Typo in the description of the fn:concat function.

History

14 Mar 2008: Proposed

7 Oct 2008: Accepted

Change

In 7.4.1 fn:concat (second paragraph):

Replace the text:

The fn:concat function is specified to allow an two or more arguments that are concatenated together. This is the only function specified in this document that allows a variable number of arguments. This capability is retained for compatibility with [XML Path Language (XPath) Version 1.0] .

With:

The fn:concat function is specified to allow two or more arguments, which are concatenated together. This is the only function specified in this document that allows a variable number of arguments. This capability is retained for compatibility with [XML Path Language (XPath) Version 1.0] .

FO.E18 - editorial

See Bug 5271

Description

In the (non-normative) appendix summarizing error conditions, the description of code FORG0008 is misleading.

History

4 Mar 2008: Proposed

7 Oct 2008: Accepted

Change

In C Error Summary (first error-list, twenty-ninth error):

Replace the text:

err:FORG0008 Both arguments to fn:dateTime have a specified timezone.

With:

err:FORG0008 The two arguments to fn:dateTime have inconsistent timezones.

FO.E17 - substantive

See Bug 5251

Description

In fn:starts-with and fn:ends-with, the requirement that there should be a minimal match at the start of the string gives unacceptable results. Any match suffices.

History

11 Mar 2008: Proposed

7 Oct 2008: Accepted

Changes

  1. In 7.5 Functions Based on Substring Matching (sixth paragraph):

    Replace the text:

    In the definitions below, we say that $arg1 contains $arg2 at positions m through n if the collation units corresponding to characters in positions m to n of $arg1 are the same as the collation units corresponding to all the characters of $arg2 modulo ignorable collation units. In the simple case of the Unicode code point collation, the collation units are the same as the characters of the string. See [Unicode Collation Algorithm] for a detailed discussion of substring matching.

    With:

    In the definitions below, we refer to the terms match and minimal match as defined in definitions DS2 and DS4 of [Unicode Collation Algorithm] . In applying these definitions:

    • C is the collation; that is, the value of the $collation argument if specified, otherwise the default collation.

    • P is the (candidate) substring $arg2

    • Q is the (candidate) containing string $arg1

    • The boundary condition B is satisfied at the start and end of a string, and between any two characters that belong to different collation units (collation elements in the language of [Unicode Collation Algorithm] ). It is not satisfied between two characters that belong to the same collation unit.

  2. In 7.5.2 fn:starts-with (first paragraph):

    Replace the text:

    Summary: Returns an xs:boolean indicating whether or not the value of $arg1 starts with a sequence of collation units that provides a minimal match to the collation units of $arg2 according to the collation that is used.

    With:

    Summary: Returns an xs:boolean indicating whether or not the value of $arg1 starts with a sequence of collation units that provides a match to the collation units of $arg2 according to the collation that is used.

  3. In 7.5.2 fn:starts-with (first note):

    Replace the text:

    Note:

    "Minimal match" is defined in [Unicode Collation Algorithm] .

    With:

    Note:

    "Match" is defined in [Unicode Collation Algorithm] .

  4. In 7.5.2.1 Examples (first bulleted list):

    Insert after the text:

    • fn:starts-with("tattoo", "tat") returns true.

    • fn:starts-with ( "tattoo", "att") returns false.

    • fn:starts-with ((), ()) returns true.

    • fn:starts-with ( "abcdefghi", "-a-b-c-", "CollationA") returns true.

    • fn:starts-with ( "a*b*c*d*e*f*g*h*i*", "a-bc-", "CollationA") returns true.

    • fn:starts-with ( "abcd***e---f*--*ghi", "abcdef", "CollationA") returns true.

    • fn:starts-with ( (), "--***-*---", "CollationA") returns true. The second argument contains only ignorable collation units and is equivalent to the zero-length string.

    The following:

    • fn:starts-with ( "-abcdefghi", "-abc", "CollationA") returns true.

  5. In 7.5.3 fn:ends-with (first paragraph):

    Replace the text:

    Summary: Returns an xs:boolean indicating whether or not the value of $arg1 ends with a sequence of collation units that provides a minimal match to the collation units of $arg2 according to the collation that is used.

    With:

    Summary: Returns an xs:boolean indicating whether or not the value of $arg1 starts with a sequence of collation units that provides a match to the collation units of $arg2 according to the collation that is used.

  6. In 7.5.3 fn:ends-with (first note):

    Replace the text:

    Note:

    "Minimal match" is defined in [Unicode Collation Algorithm] .

    With:

    Note:

    "Match" is defined in [Unicode Collation Algorithm] .

  7. In 7.5.3.1 Examples (first bulleted list):

    Insert after the text:

    • fn:ends-with ( "tattoo", "tattoo") returns true.

    • fn:ends-with ( "tattoo", "atto") returns false.

    • fn:ends-with ((), ()) returns true.

    • fn:ends-with ( "abcdefghi", "-g-h-i-", "CollationA") returns true.

    • fn:ends-with ( "abcd***e---f*--*ghi", "defghi", "CollationA") returns true.

    • fn:ends-with ( "abcd***e---f*--*ghi", "defghi", "CollationA") returns true.

    • fn:ends-with ( (), "--***-*---", "CollationA") returns true. The second argument contains only ignorable collation units and is equivalent to the zero-length string.

    The following:

    • fn:ends-with ( "abcdefghi", "ghi-", "CollationA") returns true.

FO.E16 - markup

See Bug 5246

Description

In fn:lang, the list item numbers (1) and (2) are duplicated.

History

15 Nov 2007: Proposed

23 Nov 2007: Accepted

Change

In 14.5 fn:lang (first numbered list):

Replace the text:

  1. (1) $testlang is equal to the string-value of the relevant xml:lang attribute, or

  2. (2) $testlang is equal to some substring of the string-value of the relevant xml:lang attribute that starts at the start of the string-value and ends immediately before a hyphen, "-" (The character "-" is HYPHEN-MINUS, #x002D).

With:

  1. $testlang is equal to the string-value of the relevant xml:lang attribute, or

  2. $testlang is equal to some substring of the string-value of the relevant xml:lang attribute that starts at the start of the string-value and ends immediately before a hyphen, "-" (The character "-" is HYPHEN-MINUS, #x002D).

FO.E15 - editorial

See Bug 5235

Description

In fn:namespace-uri, the terminology "the namespace URI of the xs:QName of $arg" is incorrect. It's not clear that it's referring to the name of the node, rather than (say) its type annotation.

History

15 Nov 2007: Proposed

23 Nov 2007: Accepted

Change

In 14.3 fn:namespace-uri (first paragraph):

Replace the text:

Summary: Returns the namespace URI of the xs:QName of $arg.

With:

Summary: Returns the namespace URI part of the name of $arg, as an xs:anyURI value.

FO.E14 - editorial

See Bug 4974

Description

In fn:normalize-space, a sentence with multiple conditions is ambiguously worded. To solve the problem, the relevant sentence can be simplified, because it doesn't need to say what happens when the argument is "." and there is no context item; that's covered in the rules for evaluating ".".

History

25 Sep 2007: Accepted

Change

In 7.4.5 fn:normalize-space (fourth paragraph):

Replace the text:

If no argument is supplied, $arg defaults to the string value (calculated using fn:string()) of the context item (.). If no argument is supplied or if the argument is the context item and the context item is undefined an error is raised: [err:XPDY0002]XP.

With:

If no argument is supplied, then $arg defaults to the string value (calculated using fn:string()) of the context item (.). If no argument is supplied and the context item is undefined an error is raised: [err:XPDY0002]XP.

FO.E13 - editorial

See Bug 4519

Description

The conditions under which a node has the is-id or is-idref property need to be clarified. (See also corresponding erratum DM.E005 to XDM)

History

16 Oct 2007: Proposed

23 Nov 2007: Accepted

Changes

  1. In 15.5.2 fn:id (first notes, second paragraph):

    Replace the text:

    If the data model is constructed from a PSVI, an element or attribute will have the is-id property if its schema-defined type is xs:ID or a type derived by restriction from xs:ID.

    With:

    If the data model is constructed from a PSVI, an element or attribute will have the is-id property if its typed value is a single atomic value of type xs:ID or a type derived by restriction from xs:ID.

  2. In 15.5.3 fn:idref (first notes):

    Insert after the text:

    Notes:

    An element or attribute typically acquires the is-idrefs property by being validated against the schema type xs:IDREF or xs:IDREFS, or (for attributes only) by being described as of type IDREF or IDREFS in a DTD.

    No error is raised in respect of a candidate ID value that does not match the IDREF value of any element or attribute in the document. If no candidate ID value matches the IDREF value of any element or attribute, the function returns the empty sequence.

    It is possible for two or more nodes to have an IDREF value that matches a given candidate ID value. In this situation, the function will return all such nodes. However, each matching node will be returned at most once, regardless how many candidate ID values it matches.

    It is possible in a well-formed but invalid document to have a node whose is-idrefs property is true but that does not conform to the lexical rules for the xs:IDREF type. The effect of the above rules is that ill-formed candidate ID values and ill-formed IDREF values are ignored.

    The following:

    If the data model is constructed from a PSVI, the typed value of a node that has the is-idrefs property will contain at least one atomic value of type xs:IDREF (or a type derived by restriction from xs:IDREF). It may also contain atomic values of other types. These atomic values are treated as candidate ID values if their lexical form is valid as an xs:NCName, and they are ignored otherwise.

FO.E12 - substantive

See Bug 4621

Description

When multiplying or dividing a yearMonthDuration by a number, rounding behavior is underspecified.

History

27 Jun 2007: Proposed

23 Nov 2007: Accepted

Changes

  1. In 10.6.3 op:multiply-yearMonthDuration (first paragraph):

    Replace the text:

    Summary: Returns the result of multiplying the value of $arg1 by $arg2. The result is rounded to the nearest month. For a value v, 0 <= v < 0.5 rounds to 0; 0.5 <= v < 1.0 rounds to 1.

    With:

    Summary: Returns the result of multiplying the value of $arg1 by $arg2. The result is rounded to the nearest month.

    The result is the xs:yearMonthDuration whose length in months is equal to the result of applying the fn:round function to the value obtained by multiplying the length in months of $arg1 by the value of $arg2.

  2. In 10.6.4 op:divide-yearMonthDuration (first paragraph):

    Replace the text:

    Summary: Returns the result of dividing the value of $arg1 by $arg2. The result is rounded to the nearest month. For a value v, 0 <= v < 0.5 rounds to 0; 0.5 <= v < 1.0 rounds to 1.

    With:

    Summary: Returns the result of dividing the value of $arg1 by $arg2. The result is rounded to the nearest month.

    The result is the xs:yearMonthDuration whose length in months is equal to the result of applying the fn:round function to the value obtained by dividing the length in months of $arg1 by the value of $arg2.

FO.E11 - editorial

See Bug 4874

Description

Although the specification states that a string literal can be cast to an xs:QName or xs:NOTATION, the semantics of the operation are not described in the obvious place. This erratum adds a cross-reference.

History

29 Jul 2007: Proposed

23 Nov 2007: Accepted

Change

In 17.1.1 Casting from xs:string and xs:untypedAtomic (fifth paragraph):

Replace the text:

Casting is permitted from xs:string literals to xs:QName and types derived from xs:NOTATION. If the argument to such a cast is computed dynamically, [err:XPTY0004]XP is raised if the value is of any type other than xs:QName or xs:NOTATION respectively (including the case where it is an xs:string).

With:

Casting is permitted from xs:string literals to xs:QName and types derived from xs:NOTATION. If the argument to such a cast is computed dynamically, [err:XPTY0004]XP is raised if the value is of any type other than xs:QName or xs:NOTATION respectively (including the case where it is an xs:string). The process is described in more detail in 5.3 Constructor Functions for xs:QName and xs:NOTATION.

FO.E10 - editorial

See Bug 4874

Description

In 17.1.2, the procedure for casting xs:NOTATION to xs:string does not work because it uses functions that are defined only on xs:QName.

History

29 Jul 2007: Proposed

23 Nov 2007: Accepted

Change

In 17.1.2 Casting to xs:string and xs:untypedAtomic (first bulleted list, third item, first bulleted list, first item):

Replace the text:

if the qualified name has a prefix TV is (fn:concat(fn:prefix-from-QName(SV), ":", fn:local-name-from-QName(SV)).

With:

if the qualified name has a prefix, then TV is the concatenation of the prefix of SV, a single colon (:), and the local name of SV.

FO.E9 - editorial

See Bug 4549

Description

In Appendix D, the function signature of the fn:translate function is quoted incorrectly.

History

9 May 2007: Proposed

23 Nov 2007: Accepted

Change

In D Compatibility with XPath 1.0 (Non-Normative) (first table, first table body, twenty-eighth row, first column):

Replace the text:

fn:translate($arg as xs:string?,
$mapString as xs:string?,
$transString as xs:string?) as xs:string

With:

fn:translate($arg as xs:string?,
$mapString as xs:string,
$transString as xs:string) as xs:string

FO.E8 - editorial

See Bug 4545

Description

A character code confuses decimal and hexadecimal notation

History

8 May 2007: Proposed

25 Sep 2007: Corrected

23 Nov 2007: Accepted

Change

In 7.4.11 fn:iri-to-uri (first notes, second paragraph):

Replace the text:

The following printable ASCII characters are invalid in an IRI: "<", ">", " " " (double quote), space, "{", "}", "|", "\", "^", and "`". Since these characters should not appear in an IRI, if they do appear in $iri they will be percent-encoded. In addition, characters outside the range x20-x126 will be percent-encoded because they are invalid in a URI.

With:

The following printable ASCII characters are invalid in an IRI: "<", ">", " " " (double quote), space, "{", "}", "|", "\", "^", and "`". Since these characters should not appear in an IRI, if they do appear in $iri they will be percent-encoded. In addition, characters outside the range x20-x7E will be percent-encoded because they are invalid in a URI.

FO.E7 - substantive

See Bug 4543

Description

The meaning of the regex flag "m" is unclear when the last character in the string is a newline

History

6 May 2007: Proposed

15 May 2007: Accepted

Change

In 7.6.1.1 Flags (first bulleted list, second item):

Replace the text:

m: If present, the match operates in multi-line mode. By default, the meta-character ^ matches the start of the entire string, while $ matches the end of the entire string. In multi-line mode, ^ matches the start of any line (that is, the start of the entire string, and the position immediately after a newline character), while $ matches the end of any line (that is, the end of the entire string, and the position immediately before a newline character). Newline here means the character #x0A only.

With:

m: If present, the match operates in multi-line mode. By default, the meta-character ^ matches the start of the entire string, while $ matches the end of the entire string. In multi-line mode, ^ matches the start of any line (that is, the start of the entire string, and the position immediately after a newline character other than a newline that appears as the last character in the string), while $ matches the end of any line (that is, the position immediately before a newline character, and the end of the entire string if there is no newline character at the end of the string). Newline here means the character #x0A only.

FO.E6 - substantive

See Bug 4471

Description

Casting from date and time type to string represents the UTC timezone as "+00:00" rather than as "Z". This erratum changes the representation to "Z".

History

1 May 2007: Proposed

8 May 2007: Amended

8 May 2007: Accepted

27 Jun 2007: Corrected

23 Nov 2007: Accepted

Change

In 17.1.5 Casting to date and time types (fourth code section):

Replace the text:

declare function eg:convertTZtoString($tz as xs:dayTimeDuration?) as xs:string
{
   if (empty($tz)) then ""
   else 
     let $tzh := fn:hours-from-dayTimeDuration($tz)
     let $tzm := fn:minutes-from-dayTimeDuration($tz)
     let $plusMinus := if ($tzh >= 0) then "+" else "-"
     let $tzhString := eg:convertTo2CharString(fn:abs($tzh))
     let $tzmString := eg:convertTo2CharString(fn:abs($tzm))
     return fn:concat($plusMinus, $tzhString, ":", $tzmString)
}

                    

With:

declare function eg:convertTZtoString($tz as xs:dayTimeDuration?) as xs:string
{
   if (empty($tz)) 
     then ""
   else if ($tz eq xs:dayTimeDuration('PT0S'))
     then "Z"
   else 
     let $tzh := fn:hours-from-duration($tz)
     let $tzm := fn:minutes-from-duration($tz)
     let $plusMinus := if ($tzh >= 0) then "+" else "-"
     let $tzhString := eg:convertTo2CharString(fn:abs($tzh))
     let $tzmString := eg:convertTo2CharString(fn:abs($tzm))
     return fn:concat($plusMinus, $tzhString, ":", $tzmString)
}

                    

FO.E5 - editorial

See Bug 4448

Description

The function signatures for the internal functions op:subtract-dates and op:subtract-dateTimes incorrectly allow an empty sequence as the return value.

History

17 Apr 2007: Proposed

1 May 2007: Corrected

Changes

  1. In 10.8.1 op:subtract-dateTimes (first function signature):

    Replace the text:

    op:subtract-dateTimes($arg1 as xs:dateTime,
    $arg2 as xs:dateTime) as xs:dayTimeDuration?

    With:

    op:subtract-dateTimes($arg1 as xs:dateTime,
    $arg2 as xs:dateTime) as xs:dayTimeDuration
  2. In 10.8.2 op:subtract-dates (first function signature):

    Replace the text:

    op:subtract-dates($arg1 as xs:date, $arg2 as xs:date) as xs:dayTimeDuration?

    With:

    op:subtract-dates($arg1 as xs:date, $arg2 as xs:date) as xs:dayTimeDuration

FO.E4 - substantive

Superseded by Erratum FO.E24

See Bug 4106

See Bug 4634

Description

The regex specification allows a back-reference within square brackets, which is meaningless. Furthermore, the specification doesn't say what happens when a regular expression contains a back-reference to a non-existent subexpression.

History

27 Feb 2007: Proposed

27 Jun 2007: Amended

22 Apr 2008: Superseded

Change

In 7.6.1 Regular Expression Syntax (starting at first bulleted list, fourth item, first paragraph):

Replace the text:

Back-references are allowed. The construct \n where n is a single digit is always recognized as a back-reference; if this is followed by further digits, these digits are taken to be part of the back-reference if and only if the back-reference is preceded by sufficiently many capturing subexpressions. A back-reference matches the string that was matched by the nth capturing subexpression within the regular expression, that is, the parenthesized subexpression whose opening left parenthesis is the nth unescaped left parenthesis within the regular expression. The closing right parenthesis of this subexpression must occur before the back-reference. For example, the regular expression ('|").*\1 matches a sequence of characters delimited either by an apostrophe at the start and end, or by a quotation mark at the start and end.

If no string is matched by the nth capturing subexpression, the back-reference is interpreted as matching a zero-length string.

Back-references change the following production:

[23] charClassEsc ::= ( SingleCharEsc | MultiCharEsc | catEsc | complEsc )

to

[23] charClassEsc ::= ( SingleCharEsc | MultiCharEsc | catEsc | complEsc | backReference )

[23a] backReference ::= "\" [1-9][0-9]*

With:

Back-references are allowed outside a character class expression. A back-reference is an additional kind of atom. The construct \n where n is a single digit is always recognized as a back-reference; if this is followed by further digits, these digits are taken to be part of the back-reference if and only if the back-reference is preceded by sufficiently many capturing subexpressions. A back-reference matches the string that was matched by the nth capturing subexpression within the regular expression, that is, the parenthesized subexpression whose opening left parenthesis is the nth unescaped left parenthesis within the regular expression. The regular expression is invalid if this subexpression does not exist or if its closing right parenthesis occurs after the back-reference. For example, the regular expression ('|").*\1 matches a sequence of characters delimited either by an apostrophe at the start and end, or by a quotation mark at the start and end.

If no string is matched by the nth capturing subexpression, the back-reference is interpreted as matching a zero-length string.

Back-references change the following production:

[9] atom ::= Char | charClass | ( '(' regExp ')' )

to

[9] atom ::= Char | charClass | ( '(' regExp ')' ) | backReference

[9a] backReference ::= "\" [1-9][0-9]*

Note:

Within a character class expression, \ followed by a digit is invalid. Some other regular expression languages interpret this as an octal character reference.

FO.E3 - markup

Superseded by Erratum FO.E29

See Bug 4385

Description

An example under fn:idref is incorrectly formatted

History

5 Apr 2007: Proposed

Change

In 15.5.3 fn:idref (first numbered list, second item, first bulleted list, first item, first bulleted list, second item, first code):

Replace the text:

fn:tokenize(fn:normalize-space($N), ' ')

With:

fn:tokenize(fn:normalize-space($N), ' ')

FO.E2 - editorial

See Bug 4384

Description

The description of fn:subsequence contains a spurious variable $p

History

3 Apr 2007: Proposed

23 Nov 2007: Accepted

Changes

  1. In 15.1.10 fn:subsequence (first code section):

    Replace the text:

    $sourceSeq[fn:round($startingLoc) le $p]

    With:

    $sourceSeq[fn:round($startingLoc) le position()]
  2. In 15.1.10 fn:subsequence (second code section):

    Replace the text:

    $sourceSeq[fn:round($startingLoc) le $p 
         and $p lt fn:round($startingLoc) + fn:round($length)]

    With:

    $sourceSeq[fn:round($startingLoc) le position() 
        and position() lt fn:round($startingLoc) + fn:round($length)]

FO.E1 - substantive

See Bug 4373

Description

In fn:resolve-uri it is unclear what happens when the supplied base URI is a relative reference

History

3 Apr 2007: Proposed

23 Nov 2007: Accepted

Change

In 8.1 fn:resolve-uri (starting at first paragraph):

Replace the text:

Summary: The purpose of this function is to enable a relative URI to be resolved against an absolute URI.

The first form of this function resolves $relative against the value of the base-uri property from the static context. If the base-uri property is not initialized in the static context an error is raised [err:FONS0005].

If $relative is a relative URI reference, it is resolved against $base, or the base-uri property from the static context, using an algorithm such as the ones described in [RFC 2396] or [RFC 3986] , and the resulting absolute URI reference is returned. An error may be raised [err:FORG0009] in the resolution process.

If $relative is an absolute URI reference, it is returned unchanged.

If $relative or $base is not a valid xs:anyURI an error is raised [err:FORG0002].

If $relative is the empty sequence, the empty sequence is returned.

Note:

Resolving a URI does not dereference it. This is merely a syntactic operation on two character strings.

With:

Summary: This function enables a relative URI reference to be resolved against an absolute URI.

The first form of this function resolves $relative against the value of the base-uri property from the static context. If the base-uri property is not initialized in the static context an error is raised [err:FONS0005].

If $relative is a relative URI reference, it is resolved against $base, or against the base-uri property from the static context, using an algorithm such as those described in [RFC 2396] or [RFC 3986] , and the resulting absolute URI reference is returned.

If $relative is an absolute URI reference, it is returned unchanged.

If $relative is the empty sequence, the empty sequence is returned.

If $relative is not a valid URI according to the rules of the xs:anyURI data type, or if it is not a suitable relative reference to use as input to the chosen resolution algorithm, then an error is raised [err:FORG0002].

If $base is not a valid URI according to the rules of the xs:anyURI data type, if it is not a suitable URI to use as input to the chosen resolution algorithm (for example, if it is a relative URI reference, if it is a non-hierarchic URI, or if it contains a fragment identifier), then an error is raised [err:FORG0002].

If the chosen resolution algorithm fails for any other reason then an error is raised [err:FORG0009].

Note:

Resolving a URI does not dereference it. This is merely a syntactic operation on two character strings.

Note:

The algorithms in the cited RFCs include some variations that are optional or recommended rather than mandatory; they also describe some common practices that are not recommended, but which are permitted for backwards compatibility. Where the cited RFCs permit variations in behavior, so does this specification.


Index by affected section

1.1 Conformance

FO.E43

6.2.5 op:numeric-integer-divide

FO.E30 FO.E33

6.2.7 op:numeric-unary-plus

FO.E23

6.2.8 op:numeric-unary-minus

FO.E23

7.4.1 fn:concat

FO.E19

7.4.1.1 Examples

FO.E21

7.4.2.1 Examples

FO.E21

7.4.4 fn:string-length

FO.E34

7.4.5 fn:normalize-space

FO.E14

7.4.5.1 Examples

FO.E21

7.4.11 fn:iri-to-uri

FO.E8

7.5 Functions Based on Substring Matching

FO.E17

7.5.2 fn:starts-with

FO.E17

7.5.2.1 Examples

FO.E17

7.5.3 fn:ends-with

FO.E17

7.5.3.1 Examples

FO.E17

7.6.1 Regular Expression Syntax

FO.E4 FO.E24

7.6.1.1 Flags

FO.E7

7.6.3.1 Examples

FO.E21

8.1 fn:resolve-uri

FO.E1

10.4.5.1 Examples

FO.E20

10.4.16.1 Examples

FO.E45

10.4.17 op:gMonthDay-equal

FO.E46

10.4.18.1 Examples

FO.E40

10.5.6.1 Examples

FO.E38

10.6.3 op:multiply-yearMonthDuration

FO.E12

10.6.4 op:divide-yearMonthDuration

FO.E12

10.6.9.1 Examples

FO.E39

10.6.10.1 Examples

FO.E35

10.8.1 op:subtract-dateTimes

FO.E5

10.8.2 op:subtract-dates

FO.E5

11.2.4 fn:namespace-uri-from-QName

FO.E22

14.2 fn:local-name

FO.E37

14.3 fn:namespace-uri

FO.E15

14.4.1 Examples

FO.E36

14.5 fn:lang

FO.E16

15.1.3.1 Examples

FO.E41

15.1.6 fn:distinct-values

FO.E44

15.1.10 fn:subsequence

FO.E2

15.3.1 fn:deep-equal

FO.E42

15.4.3 fn:max

FO.E27 FO.E47

15.4.4 fn:min

FO.E27 FO.E47

15.5 Functions and Operators that Generate Sequences

FO.E31

15.5.2 fn:id

FO.E13 FO.E31 FO.E48

15.5.3 fn:idref

FO.E3 FO.E13 FO.E29

15.5.4 fn:doc

FO.E26

15.5.5 fn:doc-available

FO.E26

17.1.1 Casting from xs:string and xs:untypedAtomic

FO.E11 FO.E28

17.1.2 Casting to xs:string and xs:untypedAtomic

FO.E10

17.1.5 Casting to date and time types

FO.E6 FO.E32

C Error Summary

FO.E18 FO.E25

D Compatibility with XPath 1.0 (Non-Normative)

FO.E9

Index by Bugzilla entry

Bug #4106: FO.E4 FO.E24

Bug #4373: FO.E1

Bug #4384: FO.E2

Bug #4385: FO.E3

Bug #4448: FO.E5

Bug #4471: FO.E6

Bug #4519: FO.E13

Bug #4543: FO.E7

Bug #4545: FO.E8

Bug #4549: FO.E9

Bug #4621: FO.E12

Bug #4634: FO.E4 FO.E24

Bug #4874: FO.E10 FO.E11

Bug #4974: FO.E14

Bug #5183: FO.E44

Bug #5235: FO.E15

Bug #5246: FO.E16

Bug #5251: FO.E17

Bug #5271: FO.E18

Bug #5284: FO.E19

Bug #5287: FO.E20

Bug #5348: FO.E24

Bug #5597: FO.E21

Bug #5617: FO.E23

Bug #5618: FO.E22

Bug #5671: FO.E27 FO.E47

Bug #5688: FO.E26

Bug #5706: FO.E28

Bug #5719: FO.E25

Bug #6028: FO.E31

Bug #6124: FO.E32

Bug #6212: FO.E30 FO.E33

Bug #6306: FO.E29

Bug #6316: FO.E33

Bug #6338: FO.E34

Bug #6342: FO.E35

Bug #6344: FO.E45

Bug #6345: FO.E46

Bug #6346: FO.E36

Bug #6347: FO.E37

Bug #6348: FO.E38

Bug #6355: FO.E39

Bug #6359: FO.E40

Bug #6371: FO.E41

Bug #6372: FO.E42

Bug #6375: FO.E43

Bug #6591: FO.E31 FO.E48

Index by function

fn:concat: FO.E19 FO.E21

fn:deep-equal: FO.E42

fn:distinct-values: FO.E44

fn:doc: FO.E26

fn:doc-available: FO.E26

fn:element-with-id: FO.E31

fn:ends-with: FO.E17

fn:id: FO.E13 FO.E31 FO.E48

fn:idref: FO.E3 FO.E13 FO.E29

fn:index-of: FO.E41

fn:iri-to-uri: FO.E8

fn:lang: FO.E16

fn:local-name: FO.E37

fn:matches: FO.E4 FO.E7 FO.E24

fn:max: FO.E27 FO.E47

fn:min: FO.E27 FO.E47

fn:namespace-uri: FO.E15

fn:namespace-uri-from-QName: FO.E22

fn:normalize-space: FO.E14 FO.E21

fn:number: FO.E36

fn:replace: FO.E4 FO.E7 FO.E21 FO.E24

fn:resolve-uri: FO.E1

fn:seconds-from-duration: FO.E38

fn:starts-with: FO.E17

fn:string: FO.E6

fn:string-join: FO.E21

fn:string-length: FO.E32 FO.E34

fn:subsequence: FO.E2

fn:tokenize: FO.E4 FO.E7 FO.E24

fn:translate: FO.E9

op:divide-dayTimeDuration: FO.E39

op:divide-dayTimeDuration-by-dayTimeDuration: FO.E35

op:divide-yearMonthDuration: FO.E12

op:duration-equal: FO.E20

op:gMonthDayEqual: FO.E46

op:gMonth-equal: FO.E40

op:gYearEqual: FO.E45

op:multiply-yearMonthDuration: FO.E12

op:numeric-integer-divide: FO.E30 FO.E33

op:subtract-dates: FO.E5

op:subtract-dateTimes: FO.E5

op:subtract-times: FO.E5

op:unary-minus: FO.E23

op:unary-plus: FO.E23

Index by error-code

FODT0001: FO.E28

FONS0005: FO.E1

FORG0002: FO.E1

FORG0008: FO.E18

FORG0009: FO.E1

FORX0001: FO.E25

XPDY0002: FO.E14 FO.E34

XPTY0004: FO.E11

Index by type

xs:anyURI: FO.E1 FO.E22

xs:date: FO.E6 FO.E32

xs:dateTime: FO.E6 FO.E32

xs:dayTimeDuration: FO.E35

xs:decimal: FO.E44

xs:double: FO.E44

xs:float: FO.E44

xs:gDay: FO.E6

xs:gMonth: FO.E6

xs:gMonthDay: FO.E6 FO.E46

xs:gYear: FO.E6 FO.E28 FO.E45

xs:gYearMonth: FO.E6 FO.E28

xs:ID: FO.E13 FO.E31

xs:IDREF: FO.E13

xs:IDREFS: FO.E13 FO.E48

xs:integer: FO.E30 FO.E33

xs:NMTOKENS: FO.E41

xs:NOTATION: FO.E10 FO.E11

xs:QName: FO.E11

xs:string: FO.E6 FO.E22

xs:time: FO.E6 FO.E32

xs:yearMonthDuration: FO.E12