XQuery
Priscilla Walmsley (pwalmsley@datypic.com)
ISBN: 1491915103
2nd edition, , O'Reilly Media, Inc.
Errata
Please report any errors or comments to the author. All feedback is welcome. You may also wish to check the errata for this book on the O'Reilly site.
Below are errata and updates for the first release of the second edition. If you have the first edition, check the errata from the first edition.
Changes marked "(final 3.1 specification)" were made to bring the book in line with the final XQuery 3.1 recommendation.
Preface
- Removed the comment that as of the date of publication of this book, XQuery 3.1 is a Candidate Recommendation. The second release of the second edition now describes the final XQuery 3.1 recommendation (final 3.1 specification).
Chapter 2
- Updated the date of the final XQuery 3.1 recommendation to 2017 (final 3.1 specification).
Chapter 7
- The second
sort
example on page 103 was missing the quotation marks arounddocument.xml
.
Chapter 12
- The return type of the example function
strings:get-norm-length
should bexs:integer
instead ofxs:string?
.
Chapter 13
- Added a section on specifying serialization parameters using a map (moved from Appendix A's description of the
serialize
function). Added new examples. - Clarified that implementation-defined serialization parameters, values for serialization parameters and output methods can also be specified, by using implementation-defined namespaces.
- Added that
yes
andno
values for serialization parameters can also be specified astrue
,false
,1
or0
(final 3.1 specification).
Chapter 16
- In Example 16-3, corrected the variable names from
$err:line
and$err:column
to$err:line-number
and$err:column-number
.
Chapter 18
- Added new section on string constructors (final 3.1 specification).
Chapter 23
- Fixed the trim function example on page 363 to add a reluctant quantifier so it removes all trailing whitespace:
let $trim := function($arg) { replace($arg,'^\s*(.+?)\s*$','$1') } return " abc "=>$trim()=> upper-case()
Chapter 25
- In Table 25-1, removed entry for the
fn:put()
optional feature (final 3.1 specification).
Appendix A: Built-in Function Reference
collation-key
: Modified to return a binary value (final 3.1 specification).map:find
: New function (final 3.1 specification).format-number
: Fixed an error in the second-to-last example. It should say12.346e2
instead of12.569e2
.load-xquery-module
: Modified to no longer raise errorFOQM0004
; it will now raiseFOQM0005
in those cases (final 3.1 specification).map:merge
: Modified to add a 2nd argument to control duplicates, and to change default handling of duplicates. The default is nowuse-first
instead ofuse-last
(final 3.1 specification).array:put
: New function added (final 3.1 specification).array:remove
: Modified to allow the 2nd argument to accept more than one position (final 3.1 specification).map:remove
: Modified to allow the 2nd argument to accept more than one key (final 3.1 specification).sort
: Modified to add optional$collation
argument (final 3.1 specification).array:sort
: Modified to add optional$collation
argument (final 3.1 specification)transform
: Completely overhauled the values for the$options
argument (final 3.1 specification).
Appendix C: Built-in Function Reference
XQDY0102
: Replaced the examples with this one, which accurately shows the error condition:element root { namespace prod {"http://datypic.com/prod1"}, namespace prod {"http://datypic.com/prod2"} }
FOQM0004
: Removed error code (final 3.1 specification).FOXT0006
: Added new error code (final 3.1 specification).XPST0008
: Added that this error is also raised if the body of a user-defined function relies on the context item, which is absent inside a function (final 3.1 specification).
Last updated September 3, 2019.