Merge lp:~zorba-coders/zorba/fix_test_xquery_1_1 into lp:zorba

Proposed by Sorin Marian Nasoi
Status: Merged
Approved by: Sorin Marian Nasoi
Approved revision: 10640
Merged at revision: 10647
Proposed branch: lp:~zorba-coders/zorba/fix_test_xquery_1_1
Merge into: lp:zorba
Diff against target: 65763 lines (+28854/-31036)
9 files modified
test/rbkt/ExpQueryResults/zorba/spec/xquery_1_1.xml.res (+0/-4)
test/rbkt/ExpQueryResults/zorba/spec/xquery_3_0.xml.res (+4/-0)
test/rbkt/Queries/CMakeLists.txt (+1/-1)
test/rbkt/Queries/zorba/spec/XQuery_3.0.html (+28771/-30944)
test/rbkt/Queries/zorba/spec/xquery_1_1.spec (+0/-5)
test/rbkt/Queries/zorba/spec/xquery_1_1.xq (+0/-69)
test/rbkt/Queries/zorba/spec/xquery_3_0.spec (+5/-0)
test/rbkt/Queries/zorba/spec/xquery_3_0.xq (+69/-0)
test/rbkt/Queries/zorba/spec/xquery_spec.xqi (+4/-13)
To merge this branch: bzr merge lp:~zorba-coders/zorba/fix_test_xquery_1_1
Reviewer Review Type Date Requested Status
Juan Zacarias Approve
Sorin Marian Nasoi Approve
Chris Hillery Pending
Review via email: mp+91594@code.launchpad.net

Commit message

Downloaded the latest version of the W3C Working Draft 13 December 2011for XQuery 3.0 F&O to be used in test "xquery_3_0".

Description of the change

Downloaded the latest version of the W3C Working Draft 13 December 2011for XQuery 3.0 F&O to be used in test "xquery_3_0".

To post a comment you must log in.
Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) wrote :

Resubmitted the proposal after merging the trunk; previous merge had 3 failing tests not related in any way to the proposed change:

http://zorbatest.lambda.nu:8080/remotequeue/fix_test_xquery_1_1-2012-02-04T02-45-06.133Z/log.html

These were the 3 failing tests:
http://zorbatest.lambda.nu:8080/cdash/viewTest.php?onlyfailed&buildid=29871

review: Approve
Revision history for this message
Juan Zacarias (juan457) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job fix_test_xquery_1_1-2012-02-06T19-30-06.841Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'test/rbkt/ExpQueryResults/zorba/spec/xquery_1_1.xml.res'
2--- test/rbkt/ExpQueryResults/zorba/spec/xquery_1_1.xml.res 2011-01-07 12:13:08 +0000
3+++ test/rbkt/ExpQueryResults/zorba/spec/xquery_1_1.xml.res 1970-01-01 00:00:00 +0000
4@@ -1,4 +0,0 @@
5-<result>
6- <notImplemented></notImplemented>
7- <notInSpec></notInSpec>
8-</result>
9\ No newline at end of file
10
11=== added file 'test/rbkt/ExpQueryResults/zorba/spec/xquery_3_0.xml.res'
12--- test/rbkt/ExpQueryResults/zorba/spec/xquery_3_0.xml.res 1970-01-01 00:00:00 +0000
13+++ test/rbkt/ExpQueryResults/zorba/spec/xquery_3_0.xml.res 2012-02-05 21:36:20 +0000
14@@ -0,0 +1,4 @@
15+<result>
16+ <notImplemented></notImplemented>
17+ <notInSpec></notInSpec>
18+</result>
19\ No newline at end of file
20
21=== modified file 'test/rbkt/Queries/CMakeLists.txt'
22--- test/rbkt/Queries/CMakeLists.txt 2012-02-02 09:56:52 +0000
23+++ test/rbkt/Queries/CMakeLists.txt 2012-02-05 21:36:20 +0000
24@@ -514,7 +514,7 @@
25
26 EXPECTED_FAILURE(test/rbkt/zorba/xqddf/ic-uniqueKey-err2 2935047)
27
28-EXPECTED_FAILURE(test/rbkt/zorba/spec/xquery_1_1 3299356)
29+EXPECTED_FAILURE(test/rbkt/zorba/spec/xquery_3_0 867035)
30
31 EXPECTED_FAILURE(test/rbkt/zorba/aleXis/q11 3103700)
32
33
34=== modified file 'test/rbkt/Queries/zorba/spec/XQuery_3.0.html'
35--- test/rbkt/Queries/zorba/spec/XQuery_3.0.html 2011-06-24 19:58:33 +0000
36+++ test/rbkt/Queries/zorba/spec/XQuery_3.0.html 2012-02-05 21:36:20 +0000
37@@ -1,1406 +1,1662 @@
38-<?xml version="1.0" encoding="UTF-8"?>
39-<!--XSLT Processor: SAXON 9.1.0.5 from Saxonica SAXON 9.1.0.5--><html xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/1999/xhtml" lang="EN" xml:lang="EN">
40- <head>
41- <meta name="generator" content="HTML Tidy for Windows (vers 14 February 2006), see www.w3.org"/>
42- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
43- <title>XPath and XQuery Functions and Operators 3.0</title>
44- <style type="text/css">
45- /**/ code { font-family: monospace; } div.constraint, div.issue, div.note, div.notice { margin-left: 2em; } div.issue p.title { margin-left: -2em; } ol.enumar { list-style-type: decimal; } ol.enumla { list-style-type: lower-alpha; } ol.enumlr { list-style-type: lower-roman; } ol.enumua { list-style-type: upper-alpha; } ol.enumur { list-style-type: upper-roman; } li p { margin-top: 0.3em; margin-bottom: 0.3em; } sup small { font-style: italic; color: #8F8F8F; } div.exampleInner pre { margin-left: 1em; margin-top: 0em; margin-bottom: 0em} div.exampleOuter {border: 4px double gray; margin: 0em; padding: 0em} div.exampleInner { background-color: #d5dee3; border-top-width: 4px; border-top-style: double; border-top-color: #d3d3d3; border-bottom-width: 4px; border-bottom-style: double; border-bottom-color: #d3d3d3; padding: 4px; margin: 0em } div.exampleWrapper { margin: 4px } div.exampleHeader { font-weight: bold; margin: 4px} div.issue { border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 1pt; margin-bottom: 20pt; } th.issue-toc-head { border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 1pt; } div.schemaComp { border: 4px double gray; margin: 0em 1em; padding: 0em; } div.compHeader { margin: 4px; font-weight: bold; } span.schemaComp { background-color: white; color: #A52A2A; } div.compBody { border-top-width: 4px; border-top-style: double; border-top-color: #d3d3d3; padding: 4px; margin: 0em; } div.exampleInner { background-color: #d5dee3; color: black; border-top-width: 4px; border-top-style: double; border-top-color: #d3d3d3; border-bottom-width: 4px; border-bottom-style: double; border-bottom-color: #d3d3d3; padding: 4px; margin-bottom: 4px; } div.issueBody { margin-left: 0.25in; } code.function { font-weight: bold; } code.return-type { font-style: italic; } code.return-varies { font-weight: bold; font-style: italic; } code.type { font-style: italic; } code.as { font-style: normal; } code.arg { } code.strikeout { text-decoration: line-through; } p.table.footnote { font-size: 8pt; } table.casting { font-size: x-small; } table.hierarchy { font-size: x-small; } td.castY { background-color: #7FFF7F; color: black; } td.castN { background-color: #FF7F7F; color: black; } td.castM { background-color: white; color: black; } td.castOther { background-color: yellow; color: black; } span.cancast:hover { background-color: #ffa; color: black; } div.protoref { margin-left: 0.5in; text-indent: -0.5in; } dd.indent { margin-left: 2em; } p.element-syntax { border: solid thin; background-color: #ffccff } p.element-syntax-chg { border: solid thick yellow; background-color: #ffccff } div.proto { border: solid thin; background-color: #ffccff } div.example { border: solid thin; background-color: #40e0d0; padding: 1em } div.example-chg { border: solid thick yellow; background-color: #40e0d0; padding: 1em } span.verb { font: small-caps 100% sans-serif } span.error { font-size: small } span.definition { font: small-caps 100% sans-serif } span.grayed { color: gray } table.small { font-size: x-small; } a.judgment:visited, a.judgment:link { font-family: sans-serif; color: black; text-decoration: none } a.processing:visited, a.processing:link { color: black; text-decoration: none } a.env:visited, a.env:link { color: black; text-decoration: none } /**/
46+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
47+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
48+<!--XSLT Processor: SAXON 9.1.0.5 from Saxonica SAXON 9.1.0.5-->
49+<html xmlns:xs="http://www.w3.org/2001/XMLSchema" lang="EN" xmlns=
50+"http://www.w3.org/1999/xhtml" xml:lang="EN">
51+<head>
52+<meta name="generator" content=
53+"HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 15.6), see www.w3.org" />
54+<meta http-equiv="Content-Type" content=
55+"text/html; charset=utf-8" />
56+<title>XPath and XQuery Functions and Operators 3.0</title>
57+
58+<style type="text/css">
59+/*<![CDATA[*/
60+code { font-family: monospace; }
61+
62+div.constraint,
63+div.issue,
64+div.note,
65+div.notice { margin-left: 2em; }
66+
67+div.issue
68+p.title { margin-left: -2em; }
69+
70+ol.enumar { list-style-type: decimal; }
71+ol.enumla { list-style-type: lower-alpha; }
72+ol.enumlr { list-style-type: lower-roman; }
73+ol.enumua { list-style-type: upper-alpha; }
74+ol.enumur { list-style-type: upper-roman; }
75+
76+li p { margin-top: 0.3em;
77+ margin-bottom: 0.3em; }
78+
79+sup small { font-style: italic;
80+ color: #8F8F8F;
81+ }
82+
83+div.exampleInner pre { margin-left: 1em;
84+ margin-top: 0em; margin-bottom: 0em}
85+div.exampleOuter {border: 4px double gray;
86+ margin: 0em; padding: 0em}
87+div.exampleInner { background-color: #d5dee3;
88+ border-top-width: 4px;
89+ border-top-style: double;
90+ border-top-color: #d3d3d3;
91+ border-bottom-width: 4px;
92+ border-bottom-style: double;
93+ border-bottom-color: #d3d3d3;
94+ padding: 4px; margin: 0em }
95+div.exampleWrapper { margin: 4px }
96+div.exampleHeader { font-weight: bold;
97+ margin: 4px}
98+
99+div.issue { border-bottom-color: black;
100+ border-bottom-style: solid;
101+ border-bottom-width: 1pt;
102+ margin-bottom: 20pt;
103+}
104+
105+th.issue-toc-head { border-bottom-color: black;
106+ border-bottom-style: solid;
107+ border-bottom-width: 1pt;
108+}
109+
110+
111+div.schemaComp { border: 4px double gray;
112+ margin: 0em 1em;
113+ padding: 0em;
114+ }
115+div.compHeader { margin: 4px;
116+ font-weight: bold;
117+ }
118+span.schemaComp { background-color: white;
119+ color: #A52A2A;
120+ }
121+div.compBody { border-top-width: 4px;
122+ border-top-style: double;
123+ border-top-color: #d3d3d3;
124+ padding: 4px;
125+ margin: 0em;
126+ }
127+
128+div.exampleInner { background-color: #d5dee3;
129+ color: black;
130+ border-top-width: 4px;
131+ border-top-style: double;
132+ border-top-color: #d3d3d3;
133+ border-bottom-width: 4px;
134+ border-bottom-style: double;
135+ border-bottom-color: #d3d3d3;
136+ padding: 4px;
137+ margin-bottom: 4px;
138+ }
139+
140+div.issueBody { margin-left: 0.25in;
141+ }
142+
143+code.function { font-weight: bold;
144+ }
145+code.return-type { font-style: italic;
146+ }
147+code.return-varies { font-weight: bold;
148+ font-style: italic;
149+ }
150+code.type { font-style: italic;
151+ }
152+code.as { font-style: normal;
153+ }
154+code.arg {
155+ }
156+code.strikeout { text-decoration: line-through;
157+ }
158+p.table.footnote { font-size: 8pt;
159+ }
160+
161+table.casting { font-size: x-small;
162+ }
163+table.hierarchy { font-size: x-small;
164+ }
165+
166+td.castY { background-color: #7FFF7F;
167+ color: black;
168+ }
169+
170+td.castN { background-color: #FF7F7F;
171+ color: black;
172+ }
173+
174+td.castM { background-color: white;
175+ color: black;
176+ }
177+
178+td.castOther { background-color: yellow;
179+ color: black;
180+ }
181+
182+span.cancast:hover { background-color: #ffa;
183+ color: black;
184+ }
185+
186+div.protoref { margin-left: 0.5in;
187+ text-indent: -0.5in;
188+ }
189+
190+dd.indent { margin-left: 2em;
191+ }
192+
193+p.element-syntax { border: solid thin; background-color: #ffccff
194+ }
195+
196+p.element-syntax-chg { border: solid thick yellow; background-color: #ffccff
197+ }
198+
199+div.proto { border: solid thin; background-color: #ffccff
200+ }
201+
202+div.example { border: solid thin; background-color: #40e0d0; padding: 1em
203+ }
204+
205+div.example-chg { border: solid thick yellow; background-color: #40e0d0; padding: 1em
206+ }
207+
208+span.verb { font: small-caps 100% sans-serif
209+ }
210+
211+span.error { font-size: small
212+ }
213+
214+span.definition { font: small-caps 100% sans-serif
215+ }
216+
217+span.grayed { color: gray
218+ }
219+
220+
221+table.small { font-size: x-small; }
222+a.judgment:visited, a.judgment:link { font-family: sans-serif;
223+ color: black;
224+ text-decoration: none }
225+a.processing:visited, a.processing:link { color: black;
226+ text-decoration: none }
227+a.env:visited, a.env:link { color: black;
228+ text-decoration: none }
229+/*]]>*/
230 </style>
231- <link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-WD.css"/>
232- </head>
233- <body>
234- <div class="head">
235- <p>
236- <a href="http://www.w3.org/">
237- <img src="http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width="72"/>
238- </a>
239- </p>
240- <h1>
241- <a name="title" id="title"/>XPath and XQuery Functions and
242+<link rel="stylesheet" type="text/css" href=
243+"http://www.w3.org/StyleSheets/TR/W3C-WD.css" />
244+</head>
245+<body>
246+<div class="head">
247+<p><a href="http://www.w3.org/"><img src=
248+"http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width=
249+"72" /></a></p>
250+<h1><a name="title" id="title"></a>XPath and XQuery Functions and
251 Operators 3.0</h1>
252- <h2>
253- <a name="w3c-doctype" id="w3c-doctype"/>W3C Working Draft 14
254-December 2010</h2>
255- <dl>
256- <dt>This version:</dt>
257- <dd>
258- <a href="http://www.w3.org/TR/2010/WD-xpath-functions-30-20101214/">http://www.w3.org/TR/2010/WD-xpath-functions-30-20101214/</a>
259- </dd>
260- <dt>Latest version:</dt>
261- <dd>
262- <a href="http://www.w3.org/TR/xpath-functions-30/">http://www.w3.org/TR/xpath-functions-30/</a>
263- </dd>
264- <dt>Previous version:</dt>
265- <dd>
266- <a href="http://www.w3.org/TR/2009/WD-xpath-functions-11-20091215/">http://www.w3.org/TR/2009/WD-xpath-functions-11-20091215/</a>
267- </dd>
268- <dt>Editor:</dt>
269- <!--xmlspec, match="author"-->
270- <dd>Michael Kay (XSL WG), Saxonica <a href="http://www.saxonica.com/">&lt;http://www.saxonica.com/&gt;</a>
271- </dd>
272- </dl>
273- <p>See also <a href="http://www.w3.org/2003/03/Translations/byTechnology?technology=xpath-functions">
274- <strong>translations</strong>
275- </a>.</p>
276- <p>This document is also available in these non-normative formats:
277-<a href="http://www.w3.org/TR/2010/WD-xpath-functions-30-20101214/xpath-functions-30.xml">
278-XML</a> and <a href="http://www.w3.org/TR/2010/WD-xpath-functions-30-20101214/xpath-functions-30-diff.html">Change
279+<h2><a name="w3c-doctype" id="w3c-doctype"></a>W3C Working Draft 13
280+December 2011</h2>
281+<dl>
282+<dt>This version:</dt>
283+<dd><a href=
284+"http://www.w3.org/TR/2011/WD-xpath-functions-30-20111213/">http://www.w3.org/TR/2011/WD-xpath-functions-30-20111213/</a></dd>
285+<dt>Latest version:</dt>
286+<dd><a href=
287+"http://www.w3.org/TR/xpath-functions-30/">http://www.w3.org/TR/xpath-functions-30/</a></dd>
288+<dt>Previous versions:</dt>
289+<dd><a href=
290+"http://www.w3.org/TR/2011/WD-xpath-functions-30-20110614/">http://www.w3.org/TR/2011/WD-xpath-functions-30-20110614/</a>
291+<a href=
292+"http://www.w3.org/TR/2010/WD-xpath-functions-30-20101214/">http://www.w3.org/TR/2010/WD-xpath-functions-30-20101214/</a>
293+<a href=
294+"http://www.w3.org/TR/2009/WD-xpath-functions-11-20091215/">http://www.w3.org/TR/2009/WD-xpath-functions-11-20091215/</a></dd>
295+<dt>Editor:</dt>
296+<dd>Michael Kay (XSL WG), Saxonica <a href=
297+"http://www.saxonica.com/">&amp;lt;http://www.saxonica.com/&amp;gt;</a></dd>
298+</dl>
299+<p>See also <a href=
300+"http://www.w3.org/2003/03/Translations/byTechnology?technology=xpath-functions">
301+<strong>translations</strong></a>.</p>
302+<p>This document is also available in these non-normative formats:
303+<a href=
304+"http://www.w3.org/TR/2011/WD-xpath-functions-30-20111213/xpath-functions-30.xml">
305+XML</a> and&amp;#160;<a href=
306+"http://www.w3.org/TR/2011/WD-xpath-functions-30-20111213/xpath-functions-30-diff.html">Change
307 markings relative to previous Working Draft</a>.</p>
308- <p class="copyright">
309- <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> Â© 2010 <a href="http://www.w3.org/">
310- <acronym title="World Wide Web Consortium">W3C</acronym>
311- </a>
312- <sup>®</sup>
313-(<a href="http://www.csail.mit.edu/">
314- <acronym title="Massachusetts Institute of Technology">MIT</acronym>
315- </a>, <a href="http://www.ercim.eu/">
316- <acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym>
317- </a>,
318+<p class="copyright"><a href=
319+"http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>&amp;#160;©&amp;#160;2011&amp;#160;<a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup>
320+(<a href="http://www.csail.mit.edu/"><acronym title=
321+"Massachusetts Institute of Technology">MIT</acronym></a>, <a href=
322+"http://www.ercim.eu/"><acronym title=
323+"European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>,
324 <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved.
325-W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
326-<a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>
327-and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document
328+W3C <a href=
329+"http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
330+<a href=
331+"http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>
332+and <a href=
333+"http://www.w3.org/Consortium/Legal/copyright-documents">document
334 use</a> rules apply.</p>
335- </div>
336- <hr/>
337- <div>
338- <h2>
339- <a name="abstract" id="abstract"/>Abstract</h2>
340- <p>This is a draft for internal review. Change markings are
341-relative to the Recommendation of 23 January 2007.</p>
342- <p>This document defines constructor functions, operators, and
343+</div>
344+<hr />
345+<div>
346+<h2><a name="abstract" id="abstract"></a>Abstract</h2>
347+<p>Change markings are relative to the Recommendation of 23 January
348+2007.</p>
349+<p>This document defines constructor functions, operators, and
350 functions on the datatypes defined in <a href="#xmlschema-2">[XML
351 Schema Part 2: Datatypes Second Edition]</a> and the datatypes
352 defined in <a href="#xpath-datamodel-30">[XQuery and XPath Data
353 Model (XDM) 3.0]</a>. It also defines functions and operators on
354-nodes and node sequences as defined in the <a href="#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>.
355-These functions and operators are defined for use in <a href="#xpath-30">[XML Path Language (XPath) 3.0]</a>, <a href="#xquery-30">[XQuery 3.0: An XML Query Language]</a> and <a href="#xslt-30">[XSL Transformations (XSLT) Version 3.0]</a> and other
356+nodes and node sequences as defined in the <a href=
357+"#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>.
358+These functions and operators are defined for use in <a href=
359+"#xpath-30">[XML Path Language (XPath) 3.0]</a>, <a href=
360+"#xquery-30">[XQuery 3.0: An XML Query Language]</a> and <a href=
361+"#xslt-30">[XSL Transformations (XSLT) Version 3.0]</a> and other
362 related XML standards. The signatures and summaries of functions
363-defined in this document are available at: <a href="http://www.w3.org/2005/xpath-functions/">http://www.w3.org/2005/xpath-functions/</a>.</p>
364- <p>This is the third version of the specification of this function
365+defined in this document are available at: <a href=
366+"http://www.w3.org/2005/xpath-functions/">http://www.w3.org/2005/xpath-functions/</a>.</p>
367+<p>This is the third version of the specification of this function
368 library. The first version was included as an intrinsic part of the
369 <a href="#xpath">[XML Path Language (XPath) Version 1.0]</a>
370 specification published on 16 November 1999. The second version was
371 published under the title <em>XQuery 1.0 and XPath 2.0 Functions
372-and Operators</em> on 23 January 2007. This third version is the
373-first to carry its own version number, which has been set at 3.0 to
374-align with version numbering for XPath, XQuery, and XSLT. A
375-previous draft of this version of the specification carried the
376-version number 1.1.</p>
377- </div>
378- <div>
379- <h2>
380- <a name="status" id="status"/>Status of this Document</h2>
381- <p>
382- <em>This section describes the status of this document at the
383+and Operators</em> on 23 January 2007, subsequently revised in a
384+second edition published on 14 December 2010. This third version is
385+the first to carry its own version number, which has been set at
386+3.0 to align with the version numbering for XPath, XQuery, and
387+XSLT.</p>
388+</div>
389+<div>
390+<h2><a name="status" id="status"></a>Status of this Document</h2>
391+<p><em>This section describes the status of this document at the
392 time of its publication. Other documents may supersede this
393 document. A list of current W3C publications and the latest
394-revision of this technical report can be found in the <a href="http://www.w3.org/TR/">W3C technical reports index</a> at
395-http://www.w3.org/TR/.</em>
396- </p>
397- <p>This is one document in a set of seven documents that are being
398+revision of this technical report can be found in the <a href=
399+"http://www.w3.org/TR/">W3C technical reports index</a> at
400+http://www.w3.org/TR/.</em></p>
401+<p>This is one document in a set of seven documents that are being
402 progressed to Recommendation together (XQuery 3.0, XQueryX 3.0,
403 XSLT 3.0, Data Model 3.0, Functions and Operators 3.0,
404 Serialization 3.0, XPath 3.0).</p>
405- <p>This is a <a href="http://www.w3.org/2005/10/Process-20051014/tr.html#maturity-levels">
406-Working Draft</a> as described in the <a href="http://www.w3.org/2005/10/Process-20051014/tr.html">Process
407-Document</a>. It has been jointly developed by the W3C <a href="http://www.w3.org/XML/Query/">XML Query Working Group</a> and the
408+<p>This is a <a href=
409+"http://www.w3.org/2005/10/Process-20051014/tr.html#last-call">Last
410+Call Working Draft</a> as described in the <a href=
411+"http://www.w3.org/2005/10/Process-20051014/tr.html">Process
412+Document</a>. It was jointly developed by the W3C <a href=
413+"http://www.w3.org/XML/Query/">XML Query Working Group</a> and the
414 W3C <a href="http://www.w3.org/Style/XSL/">XSL Working Group</a>,
415-each of which is part of the <a href="http://www.w3.org/XML/Activity">XML Activity</a>. The Working
416-Groups expect to advance this specification to <a href="http://www.w3.org/2005/10/Process-20051014/tr.html#RecsW3C">Recommendation</a>
417+each of which is part of the <a href=
418+"http://www.w3.org/XML/Activity">XML Activity</a>. Comments on this
419+document will be formally accepted at least through 10 February
420+2012. The Working Groups expect to advance this specification to
421+<a href=
422+"http://www.w3.org/2005/10/Process-20051014/tr.html#RecsW3C">Recommendation</a>
423 Status.</p>
424- <p>This public Working Draft differs from the previous Working
425-Draft in two important ways. First, the version number of the
426-document has changed from "1.1" to "3.0"; this was done in order to
427-align the version numbers of the entire suite of documents of which
428-this WD is a part. Second, a number of substantive technical
429-changes (as well as many editorial changes) have been made in this
430-WD. Please note that this Working Draft of XPath and XQuery
431+<p>This Last Call Working Draft makes a number of substantive
432+technical changes (as well as many editorial changes), including
433+new features, adopted since the previous Working Draft was
434+published. Please note that this Working Draft of XPath and XQuery
435 Functions and Operators 3.0 represents the second version of
436-<a href="http://www.w3.org/TR/2007/REC-xpath-datamodel-20070123/">a
437+<a href="http://www.w3.org/TR/2010/REC-xpath-functions-20101214/">a
438 previous W3C Recommendation</a>.</p>
439- <p>We particularly solicit feedback on the changes made in this
440-document in response to <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=10868">Bugzilla Bug
441-#10868</a> (prohibiting the xml namespace in module import, schema
442-import, and default namespace declarations).</p>
443- <p>A Test Suite has been created for this document. Implementors
444-are encouraged to run this test suite and report their results. The
445-Test Suite can be found at <a href="http://dev.w3.org/cvsweb/2006/xquery-test-suite/">http://dev.w3.org/cvsweb/2006/xquery-test-suite/</a>.
446-An implementation report is available at <a href="http://www.w3.org/XML/Query/test-suite/XQTSReport.html">http://www.w3.org/XML/Query/test-suite/XQTSReport.html</a>.</p>
447- <p>This document incorporates changes made against the previous
448-publication of the Working Draft of 14 December 2010. Changes to
449-this document since the previous publication of the Working Draft
450-are detailed in <a href="#changelog">
451- <b>F Changes since previous
452-Recommendation</b>
453- </a>.</p>
454- <p>Please report errors in this document using W3C's <a href="http://www.w3.org/Bugs/Public/">public Bugzilla system</a>
455-(instructions can be found at <a href="http://www.w3.org/XML/2005/04/qt-bugzilla">http://www.w3.org/XML/2005/04/qt-bugzilla</a>).
456+<p>This specification is designed to be referenced normatively from
457+other specifications defining a host language for it; it is not
458+intended to be implemented outside a host language. The
459+implementability of this specification has been tested in the
460+context of its normative inclusion in host languages defined by the
461+<a href="http://www.w3.org/TR/xquery-30/">XQuery 3.0</a> and XSLT
462+3.0 (expected in 2012) specifications; see the <a href=
463+"http://dev.w3.org/2011/xquery-30-test-suite/results/XQTSReport.html">
464+XQuery 3.0 implementation report</a> (and, in the future, the WGs
465+expect that there will also be a member-only XSLT 3.0
466+implementation report) for details.</p>
467+<p>This document incorporates changes made against the previous
468+publication of the Working Draft. Changes to this document since
469+the previous publication of the Working Draft are detailed in
470+<a href="#changelog"><b>F Changes since previous
471+Recommendation</b></a>.</p>
472+<p>Please report errors in this document using W3C's <a href=
473+"http://www.w3.org/Bugs/Public/">public Bugzilla system</a>
474+(instructions can be found at <a href=
475+"http://www.w3.org/XML/2005/04/qt-bugzilla">http://www.w3.org/XML/2005/04/qt-bugzilla</a>).
476 If access to that system is not feasible, you may send your
477 comments to the W3C XSLT/XPath/XQuery public comments mailing list,
478-<a href="mailto:public-qt-comments@w3.org">public-qt-comments@w3.org</a>.
479-It will be very helpful if you include the string “[FO30]†in
480-the subject line of your report, whether made in Bugzilla or in
481-email. Please use multiple Bugzilla entries (or, if necessary,
482-multiple email messages) if you have more than one comment to make.
483-Archives of the comments and responses are available at <a href="http://lists.w3.org/Archives/Public/public-qt-comments/">http://lists.w3.org/Archives/Public/public-qt-comments/</a>.</p>
484- <p>Publication as a Working Draft does not imply endorsement by the
485+<a href=
486+"mailto:public-qt-comments@w3.org">public-qt-comments@w3.org</a>.
487+It will be very helpful if you include the string “[FO30]” in the
488+subject line of your report, whether made in Bugzilla or in email.
489+Please use multiple Bugzilla entries (or, if necessary, multiple
490+email messages) if you have more than one comment to make. Archives
491+of the comments and responses are available at <a href=
492+"http://lists.w3.org/Archives/Public/public-qt-comments/">http://lists.w3.org/Archives/Public/public-qt-comments/</a>.</p>
493+<p>Publication as a Working Draft does not imply endorsement by the
494 W3C Membership. This is a draft document and may be updated,
495 replaced or obsoleted by other documents at any time. It is
496 inappropriate to cite this document as other than work in
497 progress.</p>
498- <p>This document was produced by groups operating under the
499+<p>This document was produced by groups operating under the
500 <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5
501-February 2004 W3C Patent Policy</a>. W3C maintains a <a href="http://www.w3.org/2004/01/pp-impl/18797/status#disclosures">public
502+February 2004 W3C Patent Policy</a>. W3C maintains a <a href=
503+"http://www.w3.org/2004/01/pp-impl/18797/status#disclosures">public
504 list of any patent disclosures</a> made in connection with the
505 deliverables of the XML Query Working Group and also maintains a
506-<a href="http://www.w3.org/2004/01/pp-impl/19552/status#disclosures">public
507+<a href=
508+"http://www.w3.org/2004/01/pp-impl/19552/status#disclosures">public
509 list of any patent disclosures</a> made in connection with the
510 deliverables of the XSL Working Group; those pages also include
511 instructions for disclosing a patent. An individual who has actual
512 knowledge of a patent which the individual believes contains
513-<a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">
514+<a href=
515+"http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">
516 Essential Claim(s)</a> must disclose the information in accordance
517-with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">
518+with <a href=
519+"http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">
520 section 6 of the W3C Patent Policy</a>.</p>
521- </div>
522- <div class="toc">
523- <h2>
524- <a name="quickcontents" id="quickcontents"/>Quick
525+</div>
526+<div class="toc">
527+<h2><a name="quickcontents" id="quickcontents"></a>Quick
528 Contents</h2>
529- <ul>
530- <li>
531- <p>
532- <a href="#func-abs">abs</a>  <a href="#func-acos">acos</a> 
533-<a href="#func-add-dayTimeDurations">add-dayTimeDurations</a> 
534-<a href="#func-add-dayTimeDuration-to-date">add-dayTimeDuration-to-date</a> 
535-<a href="#func-add-dayTimeDuration-to-dateTime">add-dayTimeDuration-to-dateTime</a> 
536-<a href="#func-add-dayTimeDuration-to-time">add-dayTimeDuration-to-time</a> 
537-<a href="#func-add-yearMonthDurations">add-yearMonthDurations</a> 
538-<a href="#func-add-yearMonthDuration-to-date">add-yearMonthDuration-to-date</a> 
539-<a href="#func-add-yearMonthDuration-to-dateTime">add-yearMonthDuration-to-dateTime</a> 
540-<a href="#func-adjust-dateTime-to-timezone">adjust-dateTime-to-timezone</a> 
541-<a href="#func-adjust-date-to-timezone">adjust-date-to-timezone</a> 
542-<a href="#func-adjust-time-to-timezone">adjust-time-to-timezone</a> 
543-<a href="#func-analyze-string">analyze-string</a>  <a href="#func-asin">asin</a>  <a href="#func-atan">atan</a>  <a href="#func-atan2">atan2</a>  <a href="#func-available-environment-variables">available-environment-variables</a> 
544-<a href="#func-avg">avg</a> </p>
545- </li>
546- <li>
547- <p>
548- <a href="#func-base64Binary-equal">base64Binary-equal</a> 
549-<a href="#func-base-uri">base-uri</a>  <a href="#func-boolean">boolean</a>  <a href="#func-boolean-equal">boolean-equal</a>  <a href="#func-boolean-greater-than">boolean-greater-than</a>  <a href="#func-boolean-less-than">boolean-less-than</a> </p>
550- </li>
551- <li>
552- <p>
553- <a href="#func-ceiling">ceiling</a>  <a href="#func-codepoint-equal">codepoint-equal</a>  <a href="#func-codepoints-to-string">codepoints-to-string</a>  <a href="#func-collection">collection</a>  <a href="#func-compare">compare</a>  <a href="#func-concat">concat</a> 
554-<a href="#func-concatenate">concatenate</a>  <a href="#func-contains">contains</a>  <a href="#func-cos">cos</a> 
555-<a href="#func-count">count</a>  <a href="#func-current-date">current-date</a>  <a href="#func-current-dateTime">current-dateTime</a>  <a href="#func-current-time">current-time</a> </p>
556- </li>
557- <li>
558- <p>
559- <a href="#func-data">data</a>  <a href="#func-date-equal">date-equal</a>  <a href="#func-date-greater-than">date-greater-than</a>  <a href="#func-date-less-than">date-less-than</a>  <a href="#func-dateTime">dateTime</a>  <a href="#func-dateTime-equal">dateTime-equal</a>  <a href="#func-dateTime-greater-than">dateTime-greater-than</a>  <a href="#func-dateTime-less-than">dateTime-less-than</a>  <a href="#func-day-from-date">day-from-date</a>  <a href="#func-day-from-dateTime">day-from-dateTime</a>  <a href="#func-days-from-duration">days-from-duration</a>  <a href="#func-dayTimeDuration-greater-than">dayTimeDuration-greater-than</a> 
560-<a href="#func-dayTimeDuration-less-than">dayTimeDuration-less-than</a> 
561-<a href="#func-deep-equal">deep-equal</a>  <a href="#func-default-collation">default-collation</a>  <a href="#func-distinct-values">distinct-values</a>  <a href="#func-divide-dayTimeDuration">divide-dayTimeDuration</a>  <a href="#func-divide-dayTimeDuration-by-dayTimeDuration">divide-dayTimeDuration-by-dayTimeDuration</a> 
562-<a href="#func-divide-yearMonthDuration">divide-yearMonthDuration</a> 
563-<a href="#func-divide-yearMonthDuration-by-yearMonthDuration">divide-yearMonthDuration-by-yearMonthDuration</a> 
564-<a href="#func-doc">doc</a>  <a href="#func-doc-available">doc-available</a>  <a href="#func-document-uri">document-uri</a>  <a href="#func-duration-equal">duration-equal</a> </p>
565- </li>
566- <li>
567- <p>
568- <a href="#func-element-with-id">element-with-id</a>  <a href="#func-empty">empty</a>  <a href="#func-encode-for-uri">encode-for-uri</a>  <a href="#func-ends-with">ends-with</a>  <a href="#func-environment-variable">environment-variable</a>  <a href="#func-error">error</a>  <a href="#func-escape-html-uri">escape-html-uri</a>  <a href="#func-exactly-one">exactly-one</a>  <a href="#func-except">except</a>  <a href="#func-exists">exists</a> 
569-<a href="#func-exp">exp</a>  <a href="#func-exp10">exp10</a> </p>
570- </li>
571- <li>
572- <p>
573- <a href="#func-false">false</a>  <a href="#func-filter">filter</a>  <a href="#func-float">float</a> 
574-<a href="#func-floor">floor</a>  <a href="#func-fold-left">fold-left</a>  <a href="#func-fold-right">fold-right</a>  <a href="#func-format-date">format-date</a>  <a href="#func-format-dateTime">format-dateTime</a>  <a href="#func-format-integer">format-integer</a>  <a href="#func-format-number">format-number</a>  <a href="#func-format-time">format-time</a>  <a href="#func-function-arity">function-arity</a>  <a href="#func-function-name">function-name</a> </p>
575- </li>
576- <li>
577- <p>
578- <a href="#func-gDay-equal">gDay-equal</a>  <a href="#func-generate-id">generate-id</a>  <a href="#func-gMonthDay-equal">gMonthDay-equal</a>  <a href="#func-gMonth-equal">gMonth-equal</a>  <a href="#func-gYear-equal">gYear-equal</a>  <a href="#func-gYearMonth-equal">gYearMonth-equal</a> </p>
579- </li>
580- <li>
581- <p>
582- <a href="#func-has-children">has-children</a>  <a href="#func-head">head</a>  <a href="#func-hexBinary-equal">hexBinary-equal</a>  <a href="#func-hours-from-dateTime">hours-from-dateTime</a>  <a href="#func-hours-from-duration">hours-from-duration</a>  <a href="#func-hours-from-time">hours-from-time</a> </p>
583- </li>
584- <li>
585- <p>
586- <a href="#func-id">id</a>  <a href="#func-idref">idref</a> 
587-<a href="#func-implicit-timezone">implicit-timezone</a>  <a href="#func-index-of">index-of</a>  <a href="#func-innermost">innermost</a>  <a href="#func-in-scope-prefixes">in-scope-prefixes</a>  <a href="#func-insert-before">insert-before</a>  <a href="#func-intersect">intersect</a>  <a href="#func-iri-to-uri">iri-to-uri</a>  <a href="#func-is-same-node">is-same-node</a> </p>
588- </li>
589- <li>
590- <p>
591- <a href="#func-lang">lang</a>  <a href="#func-last">last</a> 
592-<a href="#func-local-name">local-name</a>  <a href="#func-local-name-from-QName">local-name-from-QName</a>  <a href="#func-log">log</a>  <a href="#func-log10">log10</a>  <a href="#func-lower-case">lower-case</a> </p>
593- </li>
594- <li>
595- <p>
596- <a href="#func-map">map</a>  <a href="#func-map-pairs">map-pairs</a>  <a href="#func-matches">matches</a>  <a href="#func-max">max</a>  <a href="#func-min">min</a>  <a href="#func-minutes-from-dateTime">minutes-from-dateTime</a>  <a href="#func-minutes-from-duration">minutes-from-duration</a>  <a href="#func-minutes-from-time">minutes-from-time</a>  <a href="#func-month-from-date">month-from-date</a>  <a href="#func-month-from-dateTime">month-from-dateTime</a>  <a href="#func-months-from-duration">months-from-duration</a>  <a href="#func-multiply-dayTimeDuration">multiply-dayTimeDuration</a> 
597-<a href="#func-multiply-yearMonthDuration">multiply-yearMonthDuration</a> </p>
598- </li>
599- <li>
600- <p>
601- <a href="#func-name">name</a>  <a href="#func-namespace-uri">namespace-uri</a>  <a href="#func-namespace-uri-for-prefix">namespace-uri-for-prefix</a> 
602-<a href="#func-namespace-uri-from-QName">namespace-uri-from-QName</a> 
603-<a href="#func-nilled">nilled</a>  <a href="#func-node-after">node-after</a>  <a href="#func-node-before">node-before</a>  <a href="#func-node-name">node-name</a>  <a href="#func-normalize-space">normalize-space</a>  <a href="#func-normalize-unicode">normalize-unicode</a>  <a href="#func-not">not</a>  <a href="#func-NOTATION-equal">NOTATION-equal</a>  <a href="#func-number">number</a>  <a href="#func-numeric-add">numeric-add</a>  <a href="#func-numeric-divide">numeric-divide</a>  <a href="#func-numeric-equal">numeric-equal</a>  <a href="#func-numeric-greater-than">numeric-greater-than</a>  <a href="#func-numeric-integer-divide">numeric-integer-divide</a>  <a href="#func-numeric-less-than">numeric-less-than</a>  <a href="#func-numeric-mod">numeric-mod</a>  <a href="#func-numeric-multiply">numeric-multiply</a>  <a href="#func-numeric-subtract">numeric-subtract</a>  <a href="#func-numeric-unary-minus">numeric-unary-minus</a>  <a href="#func-numeric-unary-plus">numeric-unary-plus</a> </p>
604- </li>
605- <li>
606- <p>
607- <a href="#func-one-or-more">one-or-more</a>  <a href="#func-outermost">outermost</a> </p>
608- </li>
609- <li>
610- <p>
611- <a href="#func-parse-xml">parse-xml</a>  <a href="#func-pi">pi</a>  <a href="#func-position">position</a>  <a href="#func-pow">pow</a>  <a href="#func-prefix-from-QName">prefix-from-QName</a> </p>
612- </li>
613- <li>
614- <p>
615- <a href="#func-QName">QName</a>  <a href="#func-QName-equal">QName-equal</a> </p>
616- </li>
617- <li>
618- <p>
619- <a href="#func-remove">remove</a>  <a href="#func-replace">replace</a>  <a href="#func-resolve-QName">resolve-QName</a>  <a href="#func-resolve-uri">resolve-uri</a>  <a href="#func-reverse">reverse</a>  <a href="#func-root">root</a> 
620-<a href="#func-round">round</a>  <a href="#func-round-half-to-even">round-half-to-even</a> </p>
621- </li>
622- <li>
623- <p>
624- <a href="#func-seconds-from-dateTime">seconds-from-dateTime</a> 
625-<a href="#func-seconds-from-duration">seconds-from-duration</a> 
626-<a href="#func-seconds-from-time">seconds-from-time</a>  <a href="#func-serialize">serialize</a>  <a href="#func-sin">sin</a> 
627-<a href="#func-sqrt">sqrt</a>  <a href="#func-starts-with">starts-with</a>  <a href="#func-static-base-uri">static-base-uri</a>  <a href="#func-string">string</a>  <a href="#func-string-join">string-join</a>  <a href="#func-string-length">string-length</a>  <a href="#func-string-to-codepoints">string-to-codepoints</a>  <a href="#func-subsequence">subsequence</a>  <a href="#func-substring">substring</a>  <a href="#func-substring-after">substring-after</a>  <a href="#func-substring-before">substring-before</a>  <a href="#func-subtract-dates">subtract-dates</a>  <a href="#func-subtract-dateTimes">subtract-dateTimes</a>  <a href="#func-subtract-dayTimeDuration-from-date">subtract-dayTimeDuration-from-date</a> 
628-<a href="#func-subtract-dayTimeDuration-from-dateTime">subtract-dayTimeDuration-from-dateTime</a> 
629-<a href="#func-subtract-dayTimeDuration-from-time">subtract-dayTimeDuration-from-time</a> 
630-<a href="#func-subtract-dayTimeDurations">subtract-dayTimeDurations</a> 
631-<a href="#func-subtract-times">subtract-times</a>  <a href="#func-subtract-yearMonthDuration-from-date">subtract-yearMonthDuration-from-date</a> 
632-<a href="#func-subtract-yearMonthDuration-from-dateTime">subtract-yearMonthDuration-from-dateTime</a> 
633-<a href="#func-subtract-yearMonthDurations">subtract-yearMonthDurations</a> 
634-<a href="#func-sum">sum</a> </p>
635- </li>
636- <li>
637- <p>
638- <a href="#func-tail">tail</a>  <a href="#func-tan">tan</a> 
639-<a href="#func-time-equal">time-equal</a>  <a href="#func-time-greater-than">time-greater-than</a>  <a href="#func-time-less-than">time-less-than</a>  <a href="#func-timezone-from-date">timezone-from-date</a>  <a href="#func-timezone-from-dateTime">timezone-from-dateTime</a>  <a href="#func-timezone-from-time">timezone-from-time</a>  <a href="#func-to">to</a>  <a href="#func-tokenize">tokenize</a>  <a href="#func-trace">trace</a>  <a href="#func-translate">translate</a> 
640-<a href="#func-true">true</a> </p>
641- </li>
642- <li>
643- <p>
644- <a href="#func-union">union</a>  <a href="#func-unordered">unordered</a>  <a href="#func-unparsed-text">unparsed-text</a>  <a href="#func-unparsed-text-available">unparsed-text-available</a> 
645-<a href="#func-unparsed-text-lines">unparsed-text-lines</a> 
646-<a href="#func-upper-case">upper-case</a>  <a href="#func-uri-collection">uri-collection</a> </p>
647- </li>
648- <li>
649- <p>
650- <a href="#func-year-from-date">year-from-date</a>  <a href="#func-year-from-dateTime">year-from-dateTime</a>  <a href="#func-yearMonthDuration-greater-than">yearMonthDuration-greater-than</a> 
651-<a href="#func-yearMonthDuration-less-than">yearMonthDuration-less-than</a> 
652-<a href="#func-years-from-duration">years-from-duration</a> </p>
653- </li>
654- <li>
655- <p>
656- <a href="#func-zero-or-one">zero-or-one</a> </p>
657- </li>
658- </ul>
659- </div>
660- <div class="toc">
661- <h2>
662- <a name="contents" id="contents"/>Table of Contents</h2>
663- <p class="toc">1 <a href="#intro">Introduction</a>
664- <br/>
665-    1.1 <a href="#conformance">Conformance</a>
666- <br/>
667-    1.2 <a href="#namespace-prefixes">Namespaces and
668-prefixes</a>
669- <br/>
670-    1.3 <a href="#func-overloading">Function overloading</a>
671- <br/>
672-    1.4 <a href="#func-signatures">Function signatures and
673-descriptions</a>
674- <br/>
675-    1.5 <a href="#datatypes">Type system</a>
676- <br/>
677-    1.6 <a href="#terminology">Terminology</a>
678- <br/>
679-        1.6.1 <a href="#character-terminology">Strings, characters,
680-and codepoints</a>
681- <br/>
682-        1.6.2 <a href="#namespace-terminology">Namespaces and
683-URIs</a>
684- <br/>
685-        1.6.3 <a href="#conformance-terminology">Conformance
686-terminology</a>
687- <br/>
688-        1.6.4 <a href="#properties-of-functions">Properties of
689-functions</a>
690- <br/>
691-2 <a href="#accessors">Accessors</a>
692- <br/>
693-    2.1 <a href="#func-node-name">fn:node-name</a>
694- <br/>
695-    2.2 <a href="#func-nilled">fn:nilled</a>
696- <br/>
697-    2.3 <a href="#func-string">fn:string</a>
698- <br/>
699-    2.4 <a href="#func-data">fn:data</a>
700- <br/>
701-    2.5 <a href="#func-base-uri">fn:base-uri</a>
702- <br/>
703-    2.6 <a href="#func-document-uri">fn:document-uri</a>
704- <br/>
705+<ul>
706+<li>
707+<p><a href="#func-abs">abs</a>&amp;#160; <a href=
708+"#func-math-acos">acos</a>&amp;#160; <a href=
709+"#func-add-dayTimeDurations">add-dayTimeDurations</a>&amp;#160;
710+<a href="#func-add-dayTimeDuration-to-date">add-dayTimeDuration-to-date</a>&amp;#160;
711+<a href=
712+"#func-add-dayTimeDuration-to-dateTime">add-dayTimeDuration-to-dateTime</a>&amp;#160;
713+<a href=
714+"#func-add-dayTimeDuration-to-time">add-dayTimeDuration-to-time</a>&amp;#160;
715+<a href=
716+"#func-add-yearMonthDurations">add-yearMonthDurations</a>&amp;#160;
717+<a href=
718+"#func-add-yearMonthDuration-to-date">add-yearMonthDuration-to-date</a>&amp;#160;
719+<a href=
720+"#func-add-yearMonthDuration-to-dateTime">add-yearMonthDuration-to-dateTime</a>&amp;#160;
721+<a href=
722+"#func-adjust-dateTime-to-timezone">adjust-dateTime-to-timezone</a>&amp;#160;
723+<a href=
724+"#func-adjust-date-to-timezone">adjust-date-to-timezone</a>&amp;#160;
725+<a href=
726+"#func-adjust-time-to-timezone">adjust-time-to-timezone</a>&amp;#160;
727+<a href="#func-analyze-string">analyze-string</a>&amp;#160; <a href=
728+"#func-math-asin">asin</a>&amp;#160; <a href=
729+"#func-math-atan">atan</a>&amp;#160; <a href=
730+"#func-math-atan2">atan2</a>&amp;#160; <a href=
731+"#func-available-environment-variables">available-environment-variables</a>&amp;#160;
732+<a href="#func-avg">avg</a>&amp;#160;</p>
733+</li>
734+<li>
735+<p><a href="#func-base64Binary-equal">base64Binary-equal</a>&amp;#160;
736+<a href="#func-base-uri">base-uri</a>&amp;#160; <a href=
737+"#func-boolean">boolean</a>&amp;#160; <a href=
738+"#func-boolean-equal">boolean-equal</a>&amp;#160; <a href=
739+"#func-boolean-greater-than">boolean-greater-than</a>&amp;#160;
740+<a href="#func-boolean-less-than">boolean-less-than</a>&amp;#160;</p>
741+</li>
742+<li>
743+<p><a href="#func-ceiling">ceiling</a>&amp;#160; <a href=
744+"#func-codepoint-equal">codepoint-equal</a>&amp;#160; <a href=
745+"#func-codepoints-to-string">codepoints-to-string</a>&amp;#160;
746+<a href="#func-collection">collection</a>&amp;#160; <a href=
747+"#func-compare">compare</a>&amp;#160; <a href=
748+"#func-concat">concat</a>&amp;#160; <a href=
749+"#func-concatenate">concatenate</a>&amp;#160; <a href=
750+"#func-contains">contains</a>&amp;#160; <a href=
751+"#func-math-cos">cos</a>&amp;#160; <a href=
752+"#func-count">count</a>&amp;#160; <a href=
753+"#func-current-date">current-date</a>&amp;#160; <a href=
754+"#func-current-dateTime">current-dateTime</a>&amp;#160; <a href=
755+"#func-current-time">current-time</a>&amp;#160;</p>
756+</li>
757+<li>
758+<p><a href="#func-data">data</a>&amp;#160; <a href=
759+"#func-date-equal">date-equal</a>&amp;#160; <a href=
760+"#func-date-greater-than">date-greater-than</a>&amp;#160; <a href=
761+"#func-date-less-than">date-less-than</a>&amp;#160; <a href=
762+"#func-dateTime">dateTime</a>&amp;#160; <a href=
763+"#func-dateTime-equal">dateTime-equal</a>&amp;#160; <a href=
764+"#func-dateTime-greater-than">dateTime-greater-than</a>&amp;#160;
765+<a href="#func-dateTime-less-than">dateTime-less-than</a>&amp;#160;
766+<a href="#func-day-from-date">day-from-date</a>&amp;#160; <a href=
767+"#func-day-from-dateTime">day-from-dateTime</a>&amp;#160; <a href=
768+"#func-days-from-duration">days-from-duration</a>&amp;#160; <a href=
769+"#func-dayTimeDuration-greater-than">dayTimeDuration-greater-than</a>&amp;#160;
770+<a href=
771+"#func-dayTimeDuration-less-than">dayTimeDuration-less-than</a>&amp;#160;
772+<a href="#func-deep-equal">deep-equal</a>&amp;#160; <a href=
773+"#func-default-collation">default-collation</a>&amp;#160; <a href=
774+"#func-distinct-values">distinct-values</a>&amp;#160; <a href=
775+"#func-divide-dayTimeDuration">divide-dayTimeDuration</a>&amp;#160;
776+<a href=
777+"#func-divide-dayTimeDuration-by-dayTimeDuration">divide-dayTimeDuration-by-dayTimeDuration</a>&amp;#160;
778+<a href=
779+"#func-divide-yearMonthDuration">divide-yearMonthDuration</a>&amp;#160;
780+<a href=
781+"#func-divide-yearMonthDuration-by-yearMonthDuration">divide-yearMonthDuration-by-yearMonthDuration</a>&amp;#160;
782+<a href="#func-doc">doc</a>&amp;#160; <a href=
783+"#func-doc-available">doc-available</a>&amp;#160; <a href=
784+"#func-document-uri">document-uri</a>&amp;#160; <a href=
785+"#func-duration-equal">duration-equal</a>&amp;#160;</p>
786+</li>
787+<li>
788+<p><a href="#func-element-with-id">element-with-id</a>&amp;#160;
789+<a href="#func-empty">empty</a>&amp;#160; <a href=
790+"#func-encode-for-uri">encode-for-uri</a>&amp;#160; <a href=
791+"#func-ends-with">ends-with</a>&amp;#160; <a href=
792+"#func-environment-variable">environment-variable</a>&amp;#160;
793+<a href="#func-error">error</a>&amp;#160; <a href=
794+"#func-escape-html-uri">escape-html-uri</a>&amp;#160; <a href=
795+"#func-exactly-one">exactly-one</a>&amp;#160; <a href=
796+"#func-except">except</a>&amp;#160; <a href=
797+"#func-exists">exists</a>&amp;#160; <a href=
798+"#func-math-exp">exp</a>&amp;#160; <a href=
799+"#func-math-exp10">exp10</a>&amp;#160;</p>
800+</li>
801+<li>
802+<p><a href="#func-false">false</a>&amp;#160; <a href=
803+"#func-filter">filter</a>&amp;#160; <a href=
804+"#func-floor">floor</a>&amp;#160; <a href=
805+"#func-fold-left">fold-left</a>&amp;#160; <a href=
806+"#func-fold-right">fold-right</a>&amp;#160; <a href=
807+"#func-format-date">format-date</a>&amp;#160; <a href=
808+"#func-format-dateTime">format-dateTime</a>&amp;#160; <a href=
809+"#func-format-integer">format-integer</a>&amp;#160; <a href=
810+"#func-format-number">format-number</a>&amp;#160; <a href=
811+"#func-format-time">format-time</a>&amp;#160; <a href=
812+"#func-function-arity">function-arity</a>&amp;#160; <a href=
813+"#func-function-lookup">function-lookup</a>&amp;#160; <a href=
814+"#func-function-name">function-name</a>&amp;#160;</p>
815+</li>
816+<li>
817+<p><a href="#func-gDay-equal">gDay-equal</a>&amp;#160; <a href=
818+"#func-generate-id">generate-id</a>&amp;#160; <a href=
819+"#func-gMonthDay-equal">gMonthDay-equal</a>&amp;#160; <a href=
820+"#func-gMonth-equal">gMonth-equal</a>&amp;#160; <a href=
821+"#func-gYear-equal">gYear-equal</a>&amp;#160; <a href=
822+"#func-gYearMonth-equal">gYearMonth-equal</a>&amp;#160;</p>
823+</li>
824+<li>
825+<p><a href="#func-has-children">has-children</a>&amp;#160; <a href=
826+"#func-head">head</a>&amp;#160; <a href=
827+"#func-hexBinary-equal">hexBinary-equal</a>&amp;#160; <a href=
828+"#func-hours-from-dateTime">hours-from-dateTime</a>&amp;#160; <a href=
829+"#func-hours-from-duration">hours-from-duration</a>&amp;#160; <a href=
830+"#func-hours-from-time">hours-from-time</a>&amp;#160;</p>
831+</li>
832+<li>
833+<p><a href="#func-id">id</a>&amp;#160; <a href=
834+"#func-idref">idref</a>&amp;#160; <a href=
835+"#func-implicit-timezone">implicit-timezone</a>&amp;#160; <a href=
836+"#func-index-of">index-of</a>&amp;#160; <a href=
837+"#func-innermost">innermost</a>&amp;#160; <a href=
838+"#func-in-scope-prefixes">in-scope-prefixes</a>&amp;#160; <a href=
839+"#func-insert-before">insert-before</a>&amp;#160; <a href=
840+"#func-intersect">intersect</a>&amp;#160; <a href=
841+"#func-iri-to-uri">iri-to-uri</a>&amp;#160; <a href=
842+"#func-is-same-node">is-same-node</a>&amp;#160;</p>
843+</li>
844+<li>
845+<p><a href="#func-lang">lang</a>&amp;#160; <a href=
846+"#func-last">last</a>&amp;#160; <a href=
847+"#func-local-name">local-name</a>&amp;#160; <a href=
848+"#func-local-name-from-QName">local-name-from-QName</a>&amp;#160;
849+<a href="#func-math-log">log</a>&amp;#160; <a href=
850+"#func-math-log10">log10</a>&amp;#160; <a href=
851+"#func-lower-case">lower-case</a>&amp;#160;</p>
852+</li>
853+<li>
854+<p><a href="#func-map">map</a>&amp;#160; <a href=
855+"#func-map-pairs">map-pairs</a>&amp;#160; <a href=
856+"#func-matches">matches</a>&amp;#160; <a href="#func-max">max</a>&amp;#160;
857+<a href="#func-min">min</a>&amp;#160; <a href=
858+"#func-minutes-from-dateTime">minutes-from-dateTime</a>&amp;#160;
859+<a href=
860+"#func-minutes-from-duration">minutes-from-duration</a>&amp;#160;
861+<a href="#func-minutes-from-time">minutes-from-time</a>&amp;#160;
862+<a href="#func-month-from-date">month-from-date</a>&amp;#160; <a href=
863+"#func-month-from-dateTime">month-from-dateTime</a>&amp;#160; <a href=
864+"#func-months-from-duration">months-from-duration</a>&amp;#160;
865+<a href="#func-multiply-dayTimeDuration">multiply-dayTimeDuration</a>&amp;#160;
866+<a href=
867+"#func-multiply-yearMonthDuration">multiply-yearMonthDuration</a>&amp;#160;</p>
868+</li>
869+<li>
870+<p><a href="#func-name">name</a>&amp;#160; <a href=
871+"#func-namespace-uri">namespace-uri</a>&amp;#160; <a href=
872+"#func-namespace-uri-for-prefix">namespace-uri-for-prefix</a>&amp;#160;
873+<a href=
874+"#func-namespace-uri-from-QName">namespace-uri-from-QName</a>&amp;#160;
875+<a href="#func-nilled">nilled</a>&amp;#160; <a href=
876+"#func-node-after">node-after</a>&amp;#160; <a href=
877+"#func-node-before">node-before</a>&amp;#160; <a href=
878+"#func-node-name">node-name</a>&amp;#160; <a href=
879+"#func-normalize-space">normalize-space</a>&amp;#160; <a href=
880+"#func-normalize-unicode">normalize-unicode</a>&amp;#160; <a href=
881+"#func-not">not</a>&amp;#160; <a href=
882+"#func-NOTATION-equal">NOTATION-equal</a>&amp;#160; <a href=
883+"#func-number">number</a>&amp;#160; <a href=
884+"#func-numeric-add">numeric-add</a>&amp;#160; <a href=
885+"#func-numeric-divide">numeric-divide</a>&amp;#160; <a href=
886+"#func-numeric-equal">numeric-equal</a>&amp;#160; <a href=
887+"#func-numeric-greater-than">numeric-greater-than</a>&amp;#160;
888+<a href="#func-numeric-integer-divide">numeric-integer-divide</a>&amp;#160;
889+<a href="#func-numeric-less-than">numeric-less-than</a>&amp;#160;
890+<a href="#func-numeric-mod">numeric-mod</a>&amp;#160; <a href=
891+"#func-numeric-multiply">numeric-multiply</a>&amp;#160; <a href=
892+"#func-numeric-subtract">numeric-subtract</a>&amp;#160; <a href=
893+"#func-numeric-unary-minus">numeric-unary-minus</a>&amp;#160; <a href=
894+"#func-numeric-unary-plus">numeric-unary-plus</a>&amp;#160;</p>
895+</li>
896+<li>
897+<p><a href="#func-one-or-more">one-or-more</a>&amp;#160; <a href=
898+"#func-outermost">outermost</a>&amp;#160;</p>
899+</li>
900+<li>
901+<p><a href="#func-parse-xml">parse-xml</a>&amp;#160; <a href=
902+"#func-parse-xml-fragment">parse-xml-fragment</a>&amp;#160; <a href=
903+"#func-path">path</a>&amp;#160; <a href="#func-math-pi">pi</a>&amp;#160;
904+<a href="#func-position">position</a>&amp;#160; <a href=
905+"#func-math-pow">pow</a>&amp;#160; <a href=
906+"#func-prefix-from-QName">prefix-from-QName</a>&amp;#160;</p>
907+</li>
908+<li>
909+<p><a href="#func-QName">QName</a>&amp;#160; <a href=
910+"#func-QName-equal">QName-equal</a>&amp;#160;</p>
911+</li>
912+<li>
913+<p><a href="#func-remove">remove</a>&amp;#160; <a href=
914+"#func-replace">replace</a>&amp;#160; <a href=
915+"#func-resolve-QName">resolve-QName</a>&amp;#160; <a href=
916+"#func-resolve-uri">resolve-uri</a>&amp;#160; <a href=
917+"#func-reverse">reverse</a>&amp;#160; <a href=
918+"#func-root">root</a>&amp;#160; <a href="#func-round">round</a>&amp;#160;
919+<a href="#func-round-half-to-even">round-half-to-even</a>&amp;#160;</p>
920+</li>
921+<li>
922+<p><a href=
923+"#func-seconds-from-dateTime">seconds-from-dateTime</a>&amp;#160;
924+<a href=
925+"#func-seconds-from-duration">seconds-from-duration</a>&amp;#160;
926+<a href="#func-seconds-from-time">seconds-from-time</a>&amp;#160;
927+<a href="#func-serialize">serialize</a>&amp;#160; <a href=
928+"#func-math-sin">sin</a>&amp;#160; <a href=
929+"#func-math-sqrt">sqrt</a>&amp;#160; <a href=
930+"#func-starts-with">starts-with</a>&amp;#160; <a href=
931+"#func-static-base-uri">static-base-uri</a>&amp;#160; <a href=
932+"#func-string">string</a>&amp;#160; <a href=
933+"#func-string-join">string-join</a>&amp;#160; <a href=
934+"#func-string-length">string-length</a>&amp;#160; <a href=
935+"#func-string-to-codepoints">string-to-codepoints</a>&amp;#160;
936+<a href="#func-subsequence">subsequence</a>&amp;#160; <a href=
937+"#func-substring">substring</a>&amp;#160; <a href=
938+"#func-substring-after">substring-after</a>&amp;#160; <a href=
939+"#func-substring-before">substring-before</a>&amp;#160; <a href=
940+"#func-subtract-dates">subtract-dates</a>&amp;#160; <a href=
941+"#func-subtract-dateTimes">subtract-dateTimes</a>&amp;#160; <a href=
942+"#func-subtract-dayTimeDuration-from-date">subtract-dayTimeDuration-from-date</a>&amp;#160;
943+<a href=
944+"#func-subtract-dayTimeDuration-from-dateTime">subtract-dayTimeDuration-from-dateTime</a>&amp;#160;
945+<a href=
946+"#func-subtract-dayTimeDuration-from-time">subtract-dayTimeDuration-from-time</a>&amp;#160;
947+<a href=
948+"#func-subtract-dayTimeDurations">subtract-dayTimeDurations</a>&amp;#160;
949+<a href="#func-subtract-times">subtract-times</a>&amp;#160; <a href=
950+"#func-subtract-yearMonthDuration-from-date">subtract-yearMonthDuration-from-date</a>&amp;#160;
951+<a href=
952+"#func-subtract-yearMonthDuration-from-dateTime">subtract-yearMonthDuration-from-dateTime</a>&amp;#160;
953+<a href=
954+"#func-subtract-yearMonthDurations">subtract-yearMonthDurations</a>&amp;#160;
955+<a href="#func-sum">sum</a>&amp;#160;</p>
956+</li>
957+<li>
958+<p><a href="#func-tail">tail</a>&amp;#160; <a href=
959+"#func-math-tan">tan</a>&amp;#160; <a href=
960+"#func-time-equal">time-equal</a>&amp;#160; <a href=
961+"#func-time-greater-than">time-greater-than</a>&amp;#160; <a href=
962+"#func-time-less-than">time-less-than</a>&amp;#160; <a href=
963+"#func-timezone-from-date">timezone-from-date</a>&amp;#160; <a href=
964+"#func-timezone-from-dateTime">timezone-from-dateTime</a>&amp;#160;
965+<a href="#func-timezone-from-time">timezone-from-time</a>&amp;#160;
966+<a href="#func-to">to</a>&amp;#160; <a href=
967+"#func-tokenize">tokenize</a>&amp;#160; <a href=
968+"#func-trace">trace</a>&amp;#160; <a href=
969+"#func-translate">translate</a>&amp;#160; <a href=
970+"#func-true">true</a>&amp;#160;</p>
971+</li>
972+<li>
973+<p><a href="#func-union">union</a>&amp;#160; <a href=
974+"#func-unordered">unordered</a>&amp;#160; <a href=
975+"#func-unparsed-text">unparsed-text</a>&amp;#160; <a href=
976+"#func-unparsed-text-available">unparsed-text-available</a>&amp;#160;
977+<a href="#func-unparsed-text-lines">unparsed-text-lines</a>&amp;#160;
978+<a href="#func-upper-case">upper-case</a>&amp;#160; <a href=
979+"#func-uri-collection">uri-collection</a>&amp;#160;</p>
980+</li>
981+<li>
982+<p><a href="#func-year-from-date">year-from-date</a>&amp;#160; <a href=
983+"#func-year-from-dateTime">year-from-dateTime</a>&amp;#160; <a href=
984+"#func-yearMonthDuration-greater-than">yearMonthDuration-greater-than</a>&amp;#160;
985+<a href=
986+"#func-yearMonthDuration-less-than">yearMonthDuration-less-than</a>&amp;#160;
987+<a href=
988+"#func-years-from-duration">years-from-duration</a>&amp;#160;</p>
989+</li>
990+<li>
991+<p><a href="#func-zero-or-one">zero-or-one</a>&amp;#160;</p>
992+</li>
993+</ul>
994+</div>
995+<div class="toc">
996+<h2><a name="contents" id="contents"></a>Table of Contents</h2>
997+<p class="toc">1 <a href="#intro">Introduction</a><br />
998+&amp;#160;&amp;#160;&amp;#160;&amp;#160;1.1 <a href=
999+"#conformance">Conformance</a><br />
1000+&amp;#160;&amp;#160;&amp;#160;&amp;#160;1.2 <a href=
1001+"#namespace-prefixes">Namespaces and prefixes</a><br />
1002+&amp;#160;&amp;#160;&amp;#160;&amp;#160;1.3 <a href="#func-overloading">Function
1003+overloading</a><br />
1004+&amp;#160;&amp;#160;&amp;#160;&amp;#160;1.4 <a href="#func-signatures">Function
1005+signatures and descriptions</a><br />
1006+&amp;#160;&amp;#160;&amp;#160;&amp;#160;1.5 <a href="#datatypes">Type
1007+system</a><br />
1008+&amp;#160;&amp;#160;&amp;#160;&amp;#160;1.6 <a href=
1009+"#terminology">Terminology</a><br />
1010+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;1.6.1 <a href=
1011+"#character-terminology">Strings, characters, and
1012+codepoints</a><br />
1013+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;1.6.2 <a href=
1014+"#namespace-terminology">Namespaces and URIs</a><br />
1015+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;1.6.3 <a href=
1016+"#conformance-terminology">Conformance terminology</a><br />
1017+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;1.6.4 <a href=
1018+"#properties-of-functions">Properties of functions</a><br />
1019+2 <a href="#accessors">Accessors</a><br />
1020+&amp;#160;&amp;#160;&amp;#160;&amp;#160;2.1 <a href=
1021+"#func-node-name">fn:node-name</a><br />
1022+&amp;#160;&amp;#160;&amp;#160;&amp;#160;2.2 <a href=
1023+"#func-nilled">fn:nilled</a><br />
1024+&amp;#160;&amp;#160;&amp;#160;&amp;#160;2.3 <a href=
1025+"#func-string">fn:string</a><br />
1026+&amp;#160;&amp;#160;&amp;#160;&amp;#160;2.4 <a href="#func-data">fn:data</a><br />
1027+&amp;#160;&amp;#160;&amp;#160;&amp;#160;2.5 <a href=
1028+"#func-base-uri">fn:base-uri</a><br />
1029+&amp;#160;&amp;#160;&amp;#160;&amp;#160;2.6 <a href=
1030+"#func-document-uri">fn:document-uri</a><br />
1031 3 <a href="#errors-and-diagnostics">Errors and
1032-diagnostics</a>
1033- <br/>
1034-    3.1 <a href="#errors">Raising errors</a>
1035- <br/>
1036-        3.1.1 <a href="#func-error">fn:error</a>
1037- <br/>
1038-    3.2 <a href="#diagnostics">Diagnostic tracing</a>
1039- <br/>
1040-        3.2.1 <a href="#func-trace">fn:trace</a>
1041- <br/>
1042+diagnostics</a><br />
1043+&amp;#160;&amp;#160;&amp;#160;&amp;#160;3.1 <a href="#errors">Raising
1044+errors</a><br />
1045+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;3.1.1 <a href=
1046+"#func-error">fn:error</a><br />
1047+&amp;#160;&amp;#160;&amp;#160;&amp;#160;3.2 <a href="#diagnostics">Diagnostic
1048+tracing</a><br />
1049+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;3.2.1 <a href=
1050+"#func-trace">fn:trace</a><br />
1051 4 <a href="#numeric-functions">Functions and operators on
1052-numerics</a>
1053- <br/>
1054-    4.1 <a href="#numeric-types">Numeric types</a>
1055- <br/>
1056-    4.2 <a href="#op.numeric">Arithmetic operators on numeric
1057-values</a>
1058- <br/>
1059-        4.2.1 <a href="#func-numeric-add">op:numeric-add</a>
1060- <br/>
1061-        4.2.2 <a href="#func-numeric-subtract">op:numeric-subtract</a>
1062- <br/>
1063-        4.2.3 <a href="#func-numeric-multiply">op:numeric-multiply</a>
1064- <br/>
1065-        4.2.4 <a href="#func-numeric-divide">op:numeric-divide</a>
1066- <br/>
1067-        4.2.5 <a href="#func-numeric-integer-divide">op:numeric-integer-divide</a>
1068- <br/>
1069-        4.2.6 <a href="#func-numeric-mod">op:numeric-mod</a>
1070- <br/>
1071-        4.2.7 <a href="#func-numeric-unary-plus">op:numeric-unary-plus</a>
1072- <br/>
1073-        4.2.8 <a href="#func-numeric-unary-minus">op:numeric-unary-minus</a>
1074- <br/>
1075-    4.3 <a href="#comp.numeric">Comparison operators on numeric
1076-values</a>
1077- <br/>
1078-        4.3.1 <a href="#func-numeric-equal">op:numeric-equal</a>
1079- <br/>
1080-        4.3.2 <a href="#func-numeric-less-than">op:numeric-less-than</a>
1081- <br/>
1082-        4.3.3 <a href="#func-numeric-greater-than">op:numeric-greater-than</a>
1083- <br/>
1084-    4.4 <a href="#numeric-value-functions">Functions on numeric
1085-values</a>
1086- <br/>
1087-        4.4.1 <a href="#func-abs">fn:abs</a>
1088- <br/>
1089-        4.4.2 <a href="#func-ceiling">fn:ceiling</a>
1090- <br/>
1091-        4.4.3 <a href="#func-floor">fn:floor</a>
1092- <br/>
1093-        4.4.4 <a href="#func-round">fn:round</a>
1094- <br/>
1095-        4.4.5 <a href="#func-round-half-to-even">fn:round-half-to-even</a>
1096- <br/>
1097-    4.5 <a href="#formatting-integers">Formatting
1098-integers</a>
1099- <br/>
1100-        4.5.1 <a href="#func-format-integer">fn:format-integer</a>
1101- <br/>
1102-    4.6 <a href="#formatting-numbers">Formatting numbers</a>
1103- <br/>
1104-        4.6.1 <a href="#defining-decimal-format">Defining a decimal
1105-format</a>
1106- <br/>
1107-        4.6.2 <a href="#func-format-number">fn:format-number</a>
1108- <br/>
1109-        4.6.3 <a href="#syntax-of-picture-string">Syntax of the
1110-picture string</a>
1111- <br/>
1112-        4.6.4 <a href="#analysing-picture-string">Analysing the
1113-picture string</a>
1114- <br/>
1115-        4.6.5 <a href="#formatting-the-number">Formatting the
1116-number</a>
1117- <br/>
1118-    4.7 <a href="#trigonometry">Trigonometric and exponential
1119-functions</a>
1120- <br/>
1121-        4.7.1 <a href="#func-pi">math:pi</a>
1122- <br/>
1123-        4.7.2 <a href="#func-exp">math:exp</a>
1124- <br/>
1125-        4.7.3 <a href="#func-exp10">math:exp10</a>
1126- <br/>
1127-        4.7.4 <a href="#func-log">math:log</a>
1128- <br/>
1129-        4.7.5 <a href="#func-log10">math:log10</a>
1130- <br/>
1131-        4.7.6 <a href="#func-pow">math:pow</a>
1132- <br/>
1133-        4.7.7 <a href="#func-sqrt">math:sqrt</a>
1134- <br/>
1135-        4.7.8 <a href="#func-sin">math:sin</a>
1136- <br/>
1137-        4.7.9 <a href="#func-cos">math:cos</a>
1138- <br/>
1139-        4.7.10 <a href="#func-tan">math:tan</a>
1140- <br/>
1141-        4.7.11 <a href="#func-asin">math:asin</a>
1142- <br/>
1143-        4.7.12 <a href="#func-acos">math:acos</a>
1144- <br/>
1145-        4.7.13 <a href="#func-atan">math:atan</a>
1146- <br/>
1147-        4.7.14 <a href="#func-atan2">math:atan2</a>
1148- <br/>
1149-5 <a href="#string-functions">Functions on strings</a>
1150- <br/>
1151-    5.1 <a href="#string-types">String types</a>
1152- <br/>
1153-    5.2 <a href="#func-assemble-disassemble-string">Functions to
1154-assemble and disassemble strings</a>
1155- <br/>
1156-        5.2.1 <a href="#func-codepoints-to-string">fn:codepoints-to-string</a>
1157- <br/>
1158-        5.2.2 <a href="#func-string-to-codepoints">fn:string-to-codepoints</a>
1159- <br/>
1160-    5.3 <a href="#string-compare">Comparison of strings</a>
1161- <br/>
1162-        5.3.1 <a href="#collations">Collations</a>
1163- <br/>
1164-        5.3.2 <a href="#codepoint-collation">The Unicode Codepoint
1165-Collation</a>
1166- <br/>
1167-        5.3.3 <a href="#choosing-a-collation">Choosing a
1168-collation</a>
1169- <br/>
1170-        5.3.4 <a href="#func-compare">fn:compare</a>
1171- <br/>
1172-        5.3.5 <a href="#func-codepoint-equal">fn:codepoint-equal</a>
1173- <br/>
1174-    5.4 <a href="#string-value-functions">Functions on string
1175-values</a>
1176- <br/>
1177-        5.4.1 <a href="#func-concat">fn:concat</a>
1178- <br/>
1179-        5.4.2 <a href="#func-string-join">fn:string-join</a>
1180- <br/>
1181-        5.4.3 <a href="#func-substring">fn:substring</a>
1182- <br/>
1183-        5.4.4 <a href="#func-string-length">fn:string-length</a>
1184- <br/>
1185-        5.4.5 <a href="#func-normalize-space">fn:normalize-space</a>
1186- <br/>
1187-        5.4.6 <a href="#func-normalize-unicode">fn:normalize-unicode</a>
1188- <br/>
1189-        5.4.7 <a href="#func-upper-case">fn:upper-case</a>
1190- <br/>
1191-        5.4.8 <a href="#func-lower-case">fn:lower-case</a>
1192- <br/>
1193-        5.4.9 <a href="#func-translate">fn:translate</a>
1194- <br/>
1195-    5.5 <a href="#substring.functions">Functions based on substring
1196-matching</a>
1197- <br/>
1198-        5.5.1 <a href="#func-contains">fn:contains</a>
1199- <br/>
1200-        5.5.2 <a href="#func-starts-with">fn:starts-with</a>
1201- <br/>
1202-        5.5.3 <a href="#func-ends-with">fn:ends-with</a>
1203- <br/>
1204-        5.5.4 <a href="#func-substring-before">fn:substring-before</a>
1205- <br/>
1206-        5.5.5 <a href="#func-substring-after">fn:substring-after</a>
1207- <br/>
1208-    5.6 <a href="#string.match">String functions that use regular
1209-expressions</a>
1210- <br/>
1211-        5.6.1 <a href="#regex-syntax">Regular expression
1212-syntax</a>
1213- <br/>
1214-        5.6.2 <a href="#func-matches">fn:matches</a>
1215- <br/>
1216-        5.6.3 <a href="#func-replace">fn:replace</a>
1217- <br/>
1218-        5.6.4 <a href="#func-tokenize">fn:tokenize</a>
1219- <br/>
1220-        5.6.5 <a href="#func-analyze-string">fn:analyze-string</a>
1221- <br/>
1222+numerics</a><br />
1223+&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.1 <a href="#numeric-types">Numeric
1224+types</a><br />
1225+&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.2 <a href="#op.numeric">Arithmetic
1226+operators on numeric values</a><br />
1227+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.2.1 <a href=
1228+"#func-numeric-add">op:numeric-add</a><br />
1229+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.2.2 <a href=
1230+"#func-numeric-subtract">op:numeric-subtract</a><br />
1231+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.2.3 <a href=
1232+"#func-numeric-multiply">op:numeric-multiply</a><br />
1233+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.2.4 <a href=
1234+"#func-numeric-divide">op:numeric-divide</a><br />
1235+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.2.5 <a href=
1236+"#func-numeric-integer-divide">op:numeric-integer-divide</a><br />
1237+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.2.6 <a href=
1238+"#func-numeric-mod">op:numeric-mod</a><br />
1239+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.2.7 <a href=
1240+"#func-numeric-unary-plus">op:numeric-unary-plus</a><br />
1241+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.2.8 <a href=
1242+"#func-numeric-unary-minus">op:numeric-unary-minus</a><br />
1243+&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.3 <a href="#comp.numeric">Comparison
1244+operators on numeric values</a><br />
1245+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.3.1 <a href=
1246+"#func-numeric-equal">op:numeric-equal</a><br />
1247+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.3.2 <a href=
1248+"#func-numeric-less-than">op:numeric-less-than</a><br />
1249+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.3.3 <a href=
1250+"#func-numeric-greater-than">op:numeric-greater-than</a><br />
1251+&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.4 <a href=
1252+"#numeric-value-functions">Functions on numeric values</a><br />
1253+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.4.1 <a href=
1254+"#func-abs">fn:abs</a><br />
1255+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.4.2 <a href=
1256+"#func-ceiling">fn:ceiling</a><br />
1257+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.4.3 <a href=
1258+"#func-floor">fn:floor</a><br />
1259+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.4.4 <a href=
1260+"#func-round">fn:round</a><br />
1261+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.4.5 <a href=
1262+"#func-round-half-to-even">fn:round-half-to-even</a><br />
1263+&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.5 <a href="#parsing-numbers">Parsing
1264+numbers</a><br />
1265+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.5.1 <a href=
1266+"#func-number">fn:number</a><br />
1267+&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.6 <a href=
1268+"#formatting-integers">Formatting integers</a><br />
1269+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.6.1 <a href=
1270+"#func-format-integer">fn:format-integer</a><br />
1271+&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.7 <a href=
1272+"#formatting-numbers">Formatting numbers</a><br />
1273+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.7.1 <a href=
1274+"#defining-decimal-format">Defining a decimal format</a><br />
1275+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.7.2 <a href=
1276+"#func-format-number">fn:format-number</a><br />
1277+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.7.3 <a href=
1278+"#syntax-of-picture-string">Syntax of the picture string</a><br />
1279+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.7.4 <a href=
1280+"#analysing-picture-string">Analysing the picture string</a><br />
1281+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.7.5 <a href=
1282+"#formatting-the-number">Formatting the number</a><br />
1283+&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.8 <a href="#trigonometry">Trigonometric
1284+and exponential functions</a><br />
1285+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.8.1 <a href=
1286+"#func-math-pi">math:pi</a><br />
1287+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.8.2 <a href=
1288+"#func-math-exp">math:exp</a><br />
1289+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.8.3 <a href=
1290+"#func-math-exp10">math:exp10</a><br />
1291+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.8.4 <a href=
1292+"#func-math-log">math:log</a><br />
1293+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.8.5 <a href=
1294+"#func-math-log10">math:log10</a><br />
1295+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.8.6 <a href=
1296+"#func-math-pow">math:pow</a><br />
1297+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.8.7 <a href=
1298+"#func-math-sqrt">math:sqrt</a><br />
1299+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.8.8 <a href=
1300+"#func-math-sin">math:sin</a><br />
1301+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.8.9 <a href=
1302+"#func-math-cos">math:cos</a><br />
1303+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.8.10 <a href=
1304+"#func-math-tan">math:tan</a><br />
1305+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.8.11 <a href=
1306+"#func-math-asin">math:asin</a><br />
1307+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.8.12 <a href=
1308+"#func-math-acos">math:acos</a><br />
1309+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.8.13 <a href=
1310+"#func-math-atan">math:atan</a><br />
1311+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;4.8.14 <a href=
1312+"#func-math-atan2">math:atan2</a><br />
1313+5 <a href="#string-functions">Functions on strings</a><br />
1314+&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.1 <a href="#string-types">String
1315+types</a><br />
1316+&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.2 <a href=
1317+"#func-assemble-disassemble-string">Functions to assemble and
1318+disassemble strings</a><br />
1319+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.2.1 <a href=
1320+"#func-codepoints-to-string">fn:codepoints-to-string</a><br />
1321+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.2.2 <a href=
1322+"#func-string-to-codepoints">fn:string-to-codepoints</a><br />
1323+&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.3 <a href="#string-compare">Comparison of
1324+strings</a><br />
1325+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.3.1 <a href=
1326+"#collations">Collations</a><br />
1327+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.3.2 <a href=
1328+"#codepoint-collation">The Unicode Codepoint Collation</a><br />
1329+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.3.3 <a href=
1330+"#choosing-a-collation">Choosing a collation</a><br />
1331+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.3.4 <a href=
1332+"#func-compare">fn:compare</a><br />
1333+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.3.5 <a href=
1334+"#func-codepoint-equal">fn:codepoint-equal</a><br />
1335+&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.4 <a href=
1336+"#string-value-functions">Functions on string values</a><br />
1337+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.4.1 <a href=
1338+"#func-concat">fn:concat</a><br />
1339+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.4.2 <a href=
1340+"#func-string-join">fn:string-join</a><br />
1341+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.4.3 <a href=
1342+"#func-substring">fn:substring</a><br />
1343+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.4.4 <a href=
1344+"#func-string-length">fn:string-length</a><br />
1345+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.4.5 <a href=
1346+"#func-normalize-space">fn:normalize-space</a><br />
1347+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.4.6 <a href=
1348+"#func-normalize-unicode">fn:normalize-unicode</a><br />
1349+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.4.7 <a href=
1350+"#func-upper-case">fn:upper-case</a><br />
1351+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.4.8 <a href=
1352+"#func-lower-case">fn:lower-case</a><br />
1353+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.4.9 <a href=
1354+"#func-translate">fn:translate</a><br />
1355+&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.5 <a href=
1356+"#substring.functions">Functions based on substring
1357+matching</a><br />
1358+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.5.1 <a href=
1359+"#func-contains">fn:contains</a><br />
1360+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.5.2 <a href=
1361+"#func-starts-with">fn:starts-with</a><br />
1362+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.5.3 <a href=
1363+"#func-ends-with">fn:ends-with</a><br />
1364+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.5.4 <a href=
1365+"#func-substring-before">fn:substring-before</a><br />
1366+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.5.5 <a href=
1367+"#func-substring-after">fn:substring-after</a><br />
1368+&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.6 <a href="#string.match">String
1369+functions that use regular expressions</a><br />
1370+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.6.1 <a href=
1371+"#regex-syntax">Regular expression syntax</a><br />
1372+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.6.2 <a href=
1373+"#func-matches">fn:matches</a><br />
1374+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.6.3 <a href=
1375+"#func-replace">fn:replace</a><br />
1376+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.6.4 <a href=
1377+"#func-tokenize">fn:tokenize</a><br />
1378+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;5.6.5 <a href=
1379+"#func-analyze-string">fn:analyze-string</a><br />
1380 6 <a href="#anyURI-functions">Functions that manipulate
1381-URIs</a>
1382- <br/>
1383-    6.1 <a href="#func-resolve-uri">fn:resolve-uri</a>
1384- <br/>
1385-    6.2 <a href="#func-encode-for-uri">fn:encode-for-uri</a>
1386- <br/>
1387-    6.3 <a href="#func-iri-to-uri">fn:iri-to-uri</a>
1388- <br/>
1389-    6.4 <a href="#func-escape-html-uri">fn:escape-html-uri</a>
1390- <br/>
1391+URIs</a><br />
1392+&amp;#160;&amp;#160;&amp;#160;&amp;#160;6.1 <a href=
1393+"#func-resolve-uri">fn:resolve-uri</a><br />
1394+&amp;#160;&amp;#160;&amp;#160;&amp;#160;6.2 <a href=
1395+"#func-encode-for-uri">fn:encode-for-uri</a><br />
1396+&amp;#160;&amp;#160;&amp;#160;&amp;#160;6.3 <a href=
1397+"#func-iri-to-uri">fn:iri-to-uri</a><br />
1398+&amp;#160;&amp;#160;&amp;#160;&amp;#160;6.4 <a href=
1399+"#func-escape-html-uri">fn:escape-html-uri</a><br />
1400 7 <a href="#boolean-functions">Functions and operators on Boolean
1401-values</a>
1402- <br/>
1403-    7.1 <a href="#boolean-constructors">Boolean constant
1404-functions</a>
1405- <br/>
1406-        7.1.1 <a href="#func-true">fn:true</a>
1407- <br/>
1408-        7.1.2 <a href="#func-false">fn:false</a>
1409- <br/>
1410-    7.2 <a href="#op.boolean">Operators on Boolean values</a>
1411- <br/>
1412-        7.2.1 <a href="#func-boolean-equal">op:boolean-equal</a>
1413- <br/>
1414-        7.2.2 <a href="#func-boolean-less-than">op:boolean-less-than</a>
1415- <br/>
1416-        7.2.3 <a href="#func-boolean-greater-than">op:boolean-greater-than</a>
1417- <br/>
1418-    7.3 <a href="#boolean-value-functions">Functions on Boolean
1419-values</a>
1420- <br/>
1421-        7.3.1 <a href="#func-boolean">fn:boolean</a>
1422- <br/>
1423-        7.3.2 <a href="#func-not">fn:not</a>
1424- <br/>
1425+values</a><br />
1426+&amp;#160;&amp;#160;&amp;#160;&amp;#160;7.1 <a href="#boolean-constructors">Boolean
1427+constant functions</a><br />
1428+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;7.1.1 <a href=
1429+"#func-true">fn:true</a><br />
1430+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;7.1.2 <a href=
1431+"#func-false">fn:false</a><br />
1432+&amp;#160;&amp;#160;&amp;#160;&amp;#160;7.2 <a href="#op.boolean">Operators on
1433+Boolean values</a><br />
1434+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;7.2.1 <a href=
1435+"#func-boolean-equal">op:boolean-equal</a><br />
1436+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;7.2.2 <a href=
1437+"#func-boolean-less-than">op:boolean-less-than</a><br />
1438+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;7.2.3 <a href=
1439+"#func-boolean-greater-than">op:boolean-greater-than</a><br />
1440+&amp;#160;&amp;#160;&amp;#160;&amp;#160;7.3 <a href=
1441+"#boolean-value-functions">Functions on Boolean values</a><br />
1442+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;7.3.1 <a href=
1443+"#func-boolean">fn:boolean</a><br />
1444+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;7.3.2 <a href=
1445+"#func-not">fn:not</a><br />
1446 8 <a href="#durations">Functions and operators on
1447-durations</a>
1448- <br/>
1449-    8.1 <a href="#duration-subtypes">Two totally ordered subtypes
1450-of duration</a>
1451- <br/>
1452-        8.1.1 <a href="#dt-yearMonthDuration">xs:yearMonthDuration</a>
1453- <br/>
1454-        8.1.2 <a href="#dt-dayTimeDuration">xs:dayTimeDuration</a>
1455- <br/>
1456-    8.2 <a href="#comp.duration">Comparison operators on
1457-durations</a>
1458- <br/>
1459-        8.2.1 <a href="#func-yearMonthDuration-less-than">op:yearMonthDuration-less-than</a>
1460- <br/>
1461-
1462-        8.2.2 <a href="#func-yearMonthDuration-greater-than">op:yearMonthDuration-greater-than</a>
1463- <br/>
1464-
1465-        8.2.3 <a href="#func-dayTimeDuration-less-than">op:dayTimeDuration-less-than</a>
1466- <br/>
1467-
1468-        8.2.4 <a href="#func-dayTimeDuration-greater-than">op:dayTimeDuration-greater-than</a>
1469- <br/>
1470-
1471-        8.2.5 <a href="#func-duration-equal">op:duration-equal</a>
1472- <br/>
1473-    8.3 <a href="#component-extraction-durations">Component
1474-extraction functions on durations</a>
1475- <br/>
1476-        8.3.1 <a href="#func-years-from-duration">fn:years-from-duration</a>
1477- <br/>
1478-        8.3.2 <a href="#func-months-from-duration">fn:months-from-duration</a>
1479- <br/>
1480-        8.3.3 <a href="#func-days-from-duration">fn:days-from-duration</a>
1481- <br/>
1482-        8.3.4 <a href="#func-hours-from-duration">fn:hours-from-duration</a>
1483- <br/>
1484-        8.3.5 <a href="#func-minutes-from-duration">fn:minutes-from-duration</a>
1485- <br/>
1486-        8.3.6 <a href="#func-seconds-from-duration">fn:seconds-from-duration</a>
1487- <br/>
1488-    8.4 <a href="#duration-arithmetic">Arithmetic operators on
1489-durations</a>
1490- <br/>
1491-        8.4.1 <a href="#func-add-yearMonthDurations">op:add-yearMonthDurations</a>
1492- <br/>
1493-        8.4.2 <a href="#func-subtract-yearMonthDurations">op:subtract-yearMonthDurations</a>
1494- <br/>
1495-
1496-        8.4.3 <a href="#func-multiply-yearMonthDuration">op:multiply-yearMonthDuration</a>
1497- <br/>
1498-
1499-        8.4.4 <a href="#func-divide-yearMonthDuration">op:divide-yearMonthDuration</a>
1500- <br/>
1501-
1502-        8.4.5 <a href="#func-divide-yearMonthDuration-by-yearMonthDuration">op:divide-yearMonthDuration-by-yearMonthDuration</a>
1503- <br/>
1504-
1505-        8.4.6 <a href="#func-add-dayTimeDurations">op:add-dayTimeDurations</a>
1506- <br/>
1507-        8.4.7 <a href="#func-subtract-dayTimeDurations">op:subtract-dayTimeDurations</a>
1508- <br/>
1509-
1510-        8.4.8 <a href="#func-multiply-dayTimeDuration">op:multiply-dayTimeDuration</a>
1511- <br/>
1512-
1513-        8.4.9 <a href="#func-divide-dayTimeDuration">op:divide-dayTimeDuration</a>
1514- <br/>
1515-        8.4.10 <a href="#func-divide-dayTimeDuration-by-dayTimeDuration">op:divide-dayTimeDuration-by-dayTimeDuration</a>
1516- <br/>
1517+durations</a><br />
1518+&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.1 <a href="#duration-subtypes">Two
1519+totally ordered subtypes of duration</a><br />
1520+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.1.1 <a href=
1521+"#dt-yearMonthDuration">xs:yearMonthDuration</a><br />
1522+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.1.2 <a href=
1523+"#dt-dayTimeDuration">xs:dayTimeDuration</a><br />
1524+&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.2 <a href="#comp.duration">Comparison
1525+operators on durations</a><br />
1526+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.2.1 <a href=
1527+"#func-yearMonthDuration-less-than">op:yearMonthDuration-less-than</a><br />
1528+
1529+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.2.2 <a href=
1530+"#func-yearMonthDuration-greater-than">op:yearMonthDuration-greater-than</a><br />
1531+
1532+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.2.3 <a href=
1533+"#func-dayTimeDuration-less-than">op:dayTimeDuration-less-than</a><br />
1534+
1535+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.2.4 <a href=
1536+"#func-dayTimeDuration-greater-than">op:dayTimeDuration-greater-than</a><br />
1537+
1538+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.2.5 <a href=
1539+"#func-duration-equal">op:duration-equal</a><br />
1540+&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.3 <a href=
1541+"#component-extraction-durations">Component extraction functions on
1542+durations</a><br />
1543+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.3.1 <a href=
1544+"#func-years-from-duration">fn:years-from-duration</a><br />
1545+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.3.2 <a href=
1546+"#func-months-from-duration">fn:months-from-duration</a><br />
1547+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.3.3 <a href=
1548+"#func-days-from-duration">fn:days-from-duration</a><br />
1549+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.3.4 <a href=
1550+"#func-hours-from-duration">fn:hours-from-duration</a><br />
1551+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.3.5 <a href=
1552+"#func-minutes-from-duration">fn:minutes-from-duration</a><br />
1553+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.3.6 <a href=
1554+"#func-seconds-from-duration">fn:seconds-from-duration</a><br />
1555+&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.4 <a href=
1556+"#duration-arithmetic">Arithmetic operators on durations</a><br />
1557+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.4.1 <a href=
1558+"#func-add-yearMonthDurations">op:add-yearMonthDurations</a><br />
1559+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.4.2 <a href=
1560+"#func-subtract-yearMonthDurations">op:subtract-yearMonthDurations</a><br />
1561+
1562+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.4.3 <a href=
1563+"#func-multiply-yearMonthDuration">op:multiply-yearMonthDuration</a><br />
1564+
1565+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.4.4 <a href=
1566+"#func-divide-yearMonthDuration">op:divide-yearMonthDuration</a><br />
1567+
1568+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.4.5 <a href=
1569+"#func-divide-yearMonthDuration-by-yearMonthDuration">op:divide-yearMonthDuration-by-yearMonthDuration</a><br />
1570+
1571+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.4.6 <a href=
1572+"#func-add-dayTimeDurations">op:add-dayTimeDurations</a><br />
1573+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.4.7 <a href=
1574+"#func-subtract-dayTimeDurations">op:subtract-dayTimeDurations</a><br />
1575+
1576+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.4.8 <a href=
1577+"#func-multiply-dayTimeDuration">op:multiply-dayTimeDuration</a><br />
1578+
1579+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.4.9 <a href=
1580+"#func-divide-dayTimeDuration">op:divide-dayTimeDuration</a><br />
1581+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;8.4.10 <a href=
1582+"#func-divide-dayTimeDuration-by-dayTimeDuration">op:divide-dayTimeDuration-by-dayTimeDuration</a><br />
1583
1584 9 <a href="#dates-times">Functions and operators on dates and
1585-times</a>
1586- <br/>
1587-    9.1 <a href="#date-time-types">Date and time types</a>
1588- <br/>
1589-        9.1.1 <a href="#date-time-duration-conformance">Limits and
1590-precision</a>
1591- <br/>
1592-    9.2 <a href="#date-time-values">Date/time datatype
1593-values</a>
1594- <br/>
1595-        9.2.1 <a href="#date-time-lexical-mapping">Examples</a>
1596- <br/>
1597-    9.3 <a href="#constructing-dateTime">Constructing a
1598-dateTime</a>
1599- <br/>
1600-        9.3.1 <a href="#func-dateTime">fn:dateTime</a>
1601- <br/>
1602-    9.4 <a href="#comp.datetime">Comparison operators on duration,
1603-date and time values</a>
1604- <br/>
1605-        9.4.1 <a href="#func-dateTime-equal">op:dateTime-equal</a>
1606- <br/>
1607-        9.4.2 <a href="#func-dateTime-less-than">op:dateTime-less-than</a>
1608- <br/>
1609-        9.4.3 <a href="#func-dateTime-greater-than">op:dateTime-greater-than</a>
1610- <br/>
1611-        9.4.4 <a href="#func-date-equal">op:date-equal</a>
1612- <br/>
1613-        9.4.5 <a href="#func-date-less-than">op:date-less-than</a>
1614- <br/>
1615-        9.4.6 <a href="#func-date-greater-than">op:date-greater-than</a>
1616- <br/>
1617-        9.4.7 <a href="#func-time-equal">op:time-equal</a>
1618- <br/>
1619-        9.4.8 <a href="#func-time-less-than">op:time-less-than</a>
1620- <br/>
1621-        9.4.9 <a href="#func-time-greater-than">op:time-greater-than</a>
1622- <br/>
1623-        9.4.10 <a href="#func-gYearMonth-equal">op:gYearMonth-equal</a>
1624- <br/>
1625-        9.4.11 <a href="#func-gYear-equal">op:gYear-equal</a>
1626- <br/>
1627-        9.4.12 <a href="#func-gMonthDay-equal">op:gMonthDay-equal</a>
1628- <br/>
1629-        9.4.13 <a href="#func-gMonth-equal">op:gMonth-equal</a>
1630- <br/>
1631-        9.4.14 <a href="#func-gDay-equal">op:gDay-equal</a>
1632- <br/>
1633-    9.5 <a href="#component-extraction-dateTime">Component
1634-extraction functions on dates and times</a>
1635- <br/>
1636-        9.5.1 <a href="#func-year-from-dateTime">fn:year-from-dateTime</a>
1637- <br/>
1638-        9.5.2 <a href="#func-month-from-dateTime">fn:month-from-dateTime</a>
1639- <br/>
1640-        9.5.3 <a href="#func-day-from-dateTime">fn:day-from-dateTime</a>
1641- <br/>
1642-        9.5.4 <a href="#func-hours-from-dateTime">fn:hours-from-dateTime</a>
1643- <br/>
1644-        9.5.5 <a href="#func-minutes-from-dateTime">fn:minutes-from-dateTime</a>
1645- <br/>
1646-        9.5.6 <a href="#func-seconds-from-dateTime">fn:seconds-from-dateTime</a>
1647- <br/>
1648-        9.5.7 <a href="#func-timezone-from-dateTime">fn:timezone-from-dateTime</a>
1649- <br/>
1650-        9.5.8 <a href="#func-year-from-date">fn:year-from-date</a>
1651- <br/>
1652-        9.5.9 <a href="#func-month-from-date">fn:month-from-date</a>
1653- <br/>
1654-        9.5.10 <a href="#func-day-from-date">fn:day-from-date</a>
1655- <br/>
1656-        9.5.11 <a href="#func-timezone-from-date">fn:timezone-from-date</a>
1657- <br/>
1658-        9.5.12 <a href="#func-hours-from-time">fn:hours-from-time</a>
1659- <br/>
1660-        9.5.13 <a href="#func-minutes-from-time">fn:minutes-from-time</a>
1661- <br/>
1662-        9.5.14 <a href="#func-seconds-from-time">fn:seconds-from-time</a>
1663- <br/>
1664-        9.5.15 <a href="#func-timezone-from-time">fn:timezone-from-time</a>
1665- <br/>
1666-    9.6 <a href="#timezone.functions">Timezone adjustment functions
1667-on dates and time values</a>
1668- <br/>
1669-        9.6.1 <a href="#func-adjust-dateTime-to-timezone">fn:adjust-dateTime-to-timezone</a>
1670- <br/>
1671-
1672-        9.6.2 <a href="#func-adjust-date-to-timezone">fn:adjust-date-to-timezone</a>
1673- <br/>
1674-
1675-        9.6.3 <a href="#func-adjust-time-to-timezone">fn:adjust-time-to-timezone</a>
1676- <br/>
1677-
1678-    9.7 <a href="#dateTime-arithmetic">Arithmetic operators on
1679-durations, dates and times</a>
1680- <br/>
1681-        9.7.1 <a href="#duration-limits">Limits and
1682-precision</a>
1683- <br/>
1684-        9.7.2 <a href="#func-subtract-dateTimes">op:subtract-dateTimes</a>
1685- <br/>
1686-        9.7.3 <a href="#func-subtract-dates">op:subtract-dates</a>
1687- <br/>
1688-        9.7.4 <a href="#func-subtract-times">op:subtract-times</a>
1689- <br/>
1690-        9.7.5 <a href="#func-add-yearMonthDuration-to-dateTime">op:add-yearMonthDuration-to-dateTime</a>
1691- <br/>
1692-
1693-        9.7.6 <a href="#func-add-dayTimeDuration-to-dateTime">op:add-dayTimeDuration-to-dateTime</a>
1694- <br/>
1695-
1696-        9.7.7 <a href="#func-subtract-yearMonthDuration-from-dateTime">op:subtract-yearMonthDuration-from-dateTime</a>
1697- <br/>
1698-
1699-        9.7.8 <a href="#func-subtract-dayTimeDuration-from-dateTime">op:subtract-dayTimeDuration-from-dateTime</a>
1700- <br/>
1701-
1702-        9.7.9 <a href="#func-add-yearMonthDuration-to-date">op:add-yearMonthDuration-to-date</a>
1703- <br/>
1704-
1705-        9.7.10 <a href="#func-add-dayTimeDuration-to-date">op:add-dayTimeDuration-to-date</a>
1706- <br/>
1707-
1708-        9.7.11 <a href="#func-subtract-yearMonthDuration-from-date">op:subtract-yearMonthDuration-from-date</a>
1709- <br/>
1710-
1711-        9.7.12 <a href="#func-subtract-dayTimeDuration-from-date">op:subtract-dayTimeDuration-from-date</a>
1712- <br/>
1713-
1714-        9.7.13 <a href="#func-add-dayTimeDuration-to-time">op:add-dayTimeDuration-to-time</a>
1715- <br/>
1716-
1717-        9.7.14 <a href="#func-subtract-dayTimeDuration-from-time">op:subtract-dayTimeDuration-from-time</a>
1718- <br/>
1719-
1720-    9.8 <a href="#formatting-dates-and-times">Formatting dates and
1721-times</a>
1722- <br/>
1723-        9.8.1 <a href="#func-format-dateTime">fn:format-dateTime</a>
1724- <br/>
1725-        9.8.2 <a href="#func-format-date">fn:format-date</a>
1726- <br/>
1727-        9.8.3 <a href="#func-format-time">fn:format-time</a>
1728- <br/>
1729-        9.8.4 <a href="#rules-for-datetime-formatting">The
1730-date/time formatting functions</a>
1731- <br/>
1732-        9.8.5 <a href="#date-time-examples">Examples of date and
1733-time formatting</a>
1734- <br/>
1735-10 <a href="#QName-funcs">Functions related to QNames</a>
1736- <br/>
1737-    10.1 <a href="#QName-constructors">Functions to create a
1738-QName</a>
1739- <br/>
1740-        10.1.1 <a href="#func-resolve-QName">fn:resolve-QName</a>
1741- <br/>
1742-        10.1.2 <a href="#func-QName">fn:QName</a>
1743- <br/>
1744-    10.2 <a href="#QName-functions">Functions and operators related
1745-to QNames</a>
1746- <br/>
1747-        10.2.1 <a href="#func-QName-equal">op:QName-equal</a>
1748- <br/>
1749-        10.2.2 <a href="#func-prefix-from-QName">fn:prefix-from-QName</a>
1750- <br/>
1751-        10.2.3 <a href="#func-local-name-from-QName">fn:local-name-from-QName</a>
1752- <br/>
1753-        10.2.4 <a href="#func-namespace-uri-from-QName">fn:namespace-uri-from-QName</a>
1754- <br/>
1755-
1756-        10.2.5 <a href="#func-namespace-uri-for-prefix">fn:namespace-uri-for-prefix</a>
1757- <br/>
1758-
1759-        10.2.6 <a href="#func-in-scope-prefixes">fn:in-scope-prefixes</a>
1760- <br/>
1761+times</a><br />
1762+&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.1 <a href="#date-time-types">Date and
1763+time types</a><br />
1764+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.1.1 <a href=
1765+"#date-time-duration-conformance">Limits and precision</a><br />
1766+&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.2 <a href="#date-time-values">Date/time
1767+datatype values</a><br />
1768+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.2.1 <a href=
1769+"#date-time-lexical-mapping">Examples</a><br />
1770+&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.3 <a href=
1771+"#constructing-dateTime">Constructing a dateTime</a><br />
1772+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.3.1 <a href=
1773+"#func-dateTime">fn:dateTime</a><br />
1774+&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.4 <a href="#comp.datetime">Comparison
1775+operators on duration, date and time values</a><br />
1776+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.4.1 <a href=
1777+"#func-dateTime-equal">op:dateTime-equal</a><br />
1778+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.4.2 <a href=
1779+"#func-dateTime-less-than">op:dateTime-less-than</a><br />
1780+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.4.3 <a href=
1781+"#func-dateTime-greater-than">op:dateTime-greater-than</a><br />
1782+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.4.4 <a href=
1783+"#func-date-equal">op:date-equal</a><br />
1784+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.4.5 <a href=
1785+"#func-date-less-than">op:date-less-than</a><br />
1786+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.4.6 <a href=
1787+"#func-date-greater-than">op:date-greater-than</a><br />
1788+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.4.7 <a href=
1789+"#func-time-equal">op:time-equal</a><br />
1790+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.4.8 <a href=
1791+"#func-time-less-than">op:time-less-than</a><br />
1792+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.4.9 <a href=
1793+"#func-time-greater-than">op:time-greater-than</a><br />
1794+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.4.10 <a href=
1795+"#func-gYearMonth-equal">op:gYearMonth-equal</a><br />
1796+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.4.11 <a href=
1797+"#func-gYear-equal">op:gYear-equal</a><br />
1798+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.4.12 <a href=
1799+"#func-gMonthDay-equal">op:gMonthDay-equal</a><br />
1800+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.4.13 <a href=
1801+"#func-gMonth-equal">op:gMonth-equal</a><br />
1802+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.4.14 <a href=
1803+"#func-gDay-equal">op:gDay-equal</a><br />
1804+&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.5 <a href=
1805+"#component-extraction-dateTime">Component extraction functions on
1806+dates and times</a><br />
1807+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.5.1 <a href=
1808+"#func-year-from-dateTime">fn:year-from-dateTime</a><br />
1809+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.5.2 <a href=
1810+"#func-month-from-dateTime">fn:month-from-dateTime</a><br />
1811+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.5.3 <a href=
1812+"#func-day-from-dateTime">fn:day-from-dateTime</a><br />
1813+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.5.4 <a href=
1814+"#func-hours-from-dateTime">fn:hours-from-dateTime</a><br />
1815+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.5.5 <a href=
1816+"#func-minutes-from-dateTime">fn:minutes-from-dateTime</a><br />
1817+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.5.6 <a href=
1818+"#func-seconds-from-dateTime">fn:seconds-from-dateTime</a><br />
1819+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.5.7 <a href=
1820+"#func-timezone-from-dateTime">fn:timezone-from-dateTime</a><br />
1821+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.5.8 <a href=
1822+"#func-year-from-date">fn:year-from-date</a><br />
1823+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.5.9 <a href=
1824+"#func-month-from-date">fn:month-from-date</a><br />
1825+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.5.10 <a href=
1826+"#func-day-from-date">fn:day-from-date</a><br />
1827+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.5.11 <a href=
1828+"#func-timezone-from-date">fn:timezone-from-date</a><br />
1829+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.5.12 <a href=
1830+"#func-hours-from-time">fn:hours-from-time</a><br />
1831+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.5.13 <a href=
1832+"#func-minutes-from-time">fn:minutes-from-time</a><br />
1833+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.5.14 <a href=
1834+"#func-seconds-from-time">fn:seconds-from-time</a><br />
1835+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.5.15 <a href=
1836+"#func-timezone-from-time">fn:timezone-from-time</a><br />
1837+&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.6 <a href="#timezone.functions">Timezone
1838+adjustment functions on dates and time values</a><br />
1839+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.6.1 <a href=
1840+"#func-adjust-dateTime-to-timezone">fn:adjust-dateTime-to-timezone</a><br />
1841+
1842+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.6.2 <a href=
1843+"#func-adjust-date-to-timezone">fn:adjust-date-to-timezone</a><br />
1844+
1845+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.6.3 <a href=
1846+"#func-adjust-time-to-timezone">fn:adjust-time-to-timezone</a><br />
1847+
1848+&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.7 <a href=
1849+"#dateTime-arithmetic">Arithmetic operators on durations, dates and
1850+times</a><br />
1851+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.7.1 <a href=
1852+"#duration-limits">Limits and precision</a><br />
1853+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.7.2 <a href=
1854+"#func-subtract-dateTimes">op:subtract-dateTimes</a><br />
1855+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.7.3 <a href=
1856+"#func-subtract-dates">op:subtract-dates</a><br />
1857+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.7.4 <a href=
1858+"#func-subtract-times">op:subtract-times</a><br />
1859+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.7.5 <a href=
1860+"#func-add-yearMonthDuration-to-dateTime">op:add-yearMonthDuration-to-dateTime</a><br />
1861+
1862+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.7.6 <a href=
1863+"#func-add-dayTimeDuration-to-dateTime">op:add-dayTimeDuration-to-dateTime</a><br />
1864+
1865+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.7.7 <a href=
1866+"#func-subtract-yearMonthDuration-from-dateTime">op:subtract-yearMonthDuration-from-dateTime</a><br />
1867+
1868+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.7.8 <a href=
1869+"#func-subtract-dayTimeDuration-from-dateTime">op:subtract-dayTimeDuration-from-dateTime</a><br />
1870+
1871+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.7.9 <a href=
1872+"#func-add-yearMonthDuration-to-date">op:add-yearMonthDuration-to-date</a><br />
1873+
1874+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.7.10 <a href=
1875+"#func-add-dayTimeDuration-to-date">op:add-dayTimeDuration-to-date</a><br />
1876+
1877+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.7.11 <a href=
1878+"#func-subtract-yearMonthDuration-from-date">op:subtract-yearMonthDuration-from-date</a><br />
1879+
1880+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.7.12 <a href=
1881+"#func-subtract-dayTimeDuration-from-date">op:subtract-dayTimeDuration-from-date</a><br />
1882+
1883+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.7.13 <a href=
1884+"#func-add-dayTimeDuration-to-time">op:add-dayTimeDuration-to-time</a><br />
1885+
1886+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.7.14 <a href=
1887+"#func-subtract-dayTimeDuration-from-time">op:subtract-dayTimeDuration-from-time</a><br />
1888+
1889+&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.8 <a href=
1890+"#formatting-dates-and-times">Formatting dates and times</a><br />
1891+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.8.1 <a href=
1892+"#func-format-dateTime">fn:format-dateTime</a><br />
1893+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.8.2 <a href=
1894+"#func-format-date">fn:format-date</a><br />
1895+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.8.3 <a href=
1896+"#func-format-time">fn:format-time</a><br />
1897+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.8.4 <a href=
1898+"#rules-for-datetime-formatting">The date/time formatting
1899+functions</a><br />
1900+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;9.8.5 <a href=
1901+"#date-time-examples">Examples of date and time
1902+formatting</a><br />
1903+10 <a href="#QName-funcs">Functions related to QNames</a><br />
1904+&amp;#160;&amp;#160;&amp;#160;&amp;#160;10.1 <a href=
1905+"#QName-constructors">Functions to create a QName</a><br />
1906+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;10.1.1 <a href=
1907+"#func-resolve-QName">fn:resolve-QName</a><br />
1908+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;10.1.2 <a href=
1909+"#func-QName">fn:QName</a><br />
1910+&amp;#160;&amp;#160;&amp;#160;&amp;#160;10.2 <a href="#QName-functions">Functions
1911+and operators related to QNames</a><br />
1912+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;10.2.1 <a href=
1913+"#func-QName-equal">op:QName-equal</a><br />
1914+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;10.2.2 <a href=
1915+"#func-prefix-from-QName">fn:prefix-from-QName</a><br />
1916+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;10.2.3 <a href=
1917+"#func-local-name-from-QName">fn:local-name-from-QName</a><br />
1918+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;10.2.4 <a href=
1919+"#func-namespace-uri-from-QName">fn:namespace-uri-from-QName</a><br />
1920+
1921+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;10.2.5 <a href=
1922+"#func-namespace-uri-for-prefix">fn:namespace-uri-for-prefix</a><br />
1923+
1924+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;10.2.6 <a href=
1925+"#func-in-scope-prefixes">fn:in-scope-prefixes</a><br />
1926 11 <a href="#binary-functions">Operators on base64Binary and
1927-hexBinary</a>
1928- <br/>
1929-    11.1 <a href="#binary-value-comparisons">Comparisons of
1930-base64Binary and hexBinary values</a>
1931- <br/>
1932-        11.1.1 <a href="#func-hexBinary-equal">op:hexBinary-equal</a>
1933- <br/>
1934-        11.1.2 <a href="#func-base64Binary-equal">op:base64Binary-equal</a>
1935- <br/>
1936-12 <a href="#NOTATION-functions">Operators on NOTATION</a>
1937- <br/>
1938-    12.1 <a href="#func-NOTATION-equal">op:NOTATION-equal</a>
1939- <br/>
1940+hexBinary</a><br />
1941+&amp;#160;&amp;#160;&amp;#160;&amp;#160;11.1 <a href=
1942+"#binary-value-comparisons">Comparisons of base64Binary and
1943+hexBinary values</a><br />
1944+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;11.1.1 <a href=
1945+"#func-hexBinary-equal">op:hexBinary-equal</a><br />
1946+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;11.1.2 <a href=
1947+"#func-base64Binary-equal">op:base64Binary-equal</a><br />
1948+12 <a href="#NOTATION-functions">Operators on NOTATION</a><br />
1949+&amp;#160;&amp;#160;&amp;#160;&amp;#160;12.1 <a href=
1950+"#func-NOTATION-equal">op:NOTATION-equal</a><br />
1951 13 <a href="#node-functions">Functions and operators on
1952-nodes</a>
1953- <br/>
1954-    13.1 <a href="#func-name">fn:name</a>
1955- <br/>
1956-    13.2 <a href="#func-local-name">fn:local-name</a>
1957- <br/>
1958-    13.3 <a href="#func-namespace-uri">fn:namespace-uri</a>
1959- <br/>
1960-    13.4 <a href="#func-number">fn:number</a>
1961- <br/>
1962-    13.5 <a href="#func-lang">fn:lang</a>
1963- <br/>
1964-    13.6 <a href="#func-is-same-node">op:is-same-node</a>
1965- <br/>
1966-    13.7 <a href="#func-node-before">op:node-before</a>
1967- <br/>
1968-    13.8 <a href="#func-node-after">op:node-after</a>
1969- <br/>
1970-    13.9 <a href="#func-root">fn:root</a>
1971- <br/>
1972-    13.10 <a href="#func-has-children">fn:has-children</a>
1973- <br/>
1974-    13.11 <a href="#func-innermost">fn:innermost</a>
1975- <br/>
1976-    13.12 <a href="#func-outermost">fn:outermost</a>
1977- <br/>
1978+nodes</a><br />
1979+&amp;#160;&amp;#160;&amp;#160;&amp;#160;13.1 <a href="#func-name">fn:name</a><br />
1980+&amp;#160;&amp;#160;&amp;#160;&amp;#160;13.2 <a href=
1981+"#func-local-name">fn:local-name</a><br />
1982+&amp;#160;&amp;#160;&amp;#160;&amp;#160;13.3 <a href=
1983+"#func-namespace-uri">fn:namespace-uri</a><br />
1984+&amp;#160;&amp;#160;&amp;#160;&amp;#160;13.4 <a href="#func-lang">fn:lang</a><br />
1985+&amp;#160;&amp;#160;&amp;#160;&amp;#160;13.5 <a href=
1986+"#func-is-same-node">op:is-same-node</a><br />
1987+&amp;#160;&amp;#160;&amp;#160;&amp;#160;13.6 <a href=
1988+"#func-node-before">op:node-before</a><br />
1989+&amp;#160;&amp;#160;&amp;#160;&amp;#160;13.7 <a href=
1990+"#func-node-after">op:node-after</a><br />
1991+&amp;#160;&amp;#160;&amp;#160;&amp;#160;13.8 <a href="#func-root">fn:root</a><br />
1992+&amp;#160;&amp;#160;&amp;#160;&amp;#160;13.9 <a href="#func-path">fn:path</a><br />
1993+&amp;#160;&amp;#160;&amp;#160;&amp;#160;13.10 <a href=
1994+"#func-has-children">fn:has-children</a><br />
1995+&amp;#160;&amp;#160;&amp;#160;&amp;#160;13.11 <a href=
1996+"#func-innermost">fn:innermost</a><br />
1997+&amp;#160;&amp;#160;&amp;#160;&amp;#160;13.12 <a href=
1998+"#func-outermost">fn:outermost</a><br />
1999 14 <a href="#sequence-functions">Functions and operators on
2000-sequences</a>
2001- <br/>
2002-    14.1 <a href="#general-seq-funcs">General functions and
2003-operators on sequences</a>
2004- <br/>
2005-        14.1.1 <a href="#func-concatenate">op:concatenate</a>
2006- <br/>
2007-        14.1.2 <a href="#func-empty">fn:empty</a>
2008- <br/>
2009-        14.1.3 <a href="#func-exists">fn:exists</a>
2010- <br/>
2011-        14.1.4 <a href="#func-head">fn:head</a>
2012- <br/>
2013-        14.1.5 <a href="#func-tail">fn:tail</a>
2014- <br/>
2015-        14.1.6 <a href="#func-insert-before">fn:insert-before</a>
2016- <br/>
2017-        14.1.7 <a href="#func-remove">fn:remove</a>
2018- <br/>
2019-        14.1.8 <a href="#func-reverse">fn:reverse</a>
2020- <br/>
2021-        14.1.9 <a href="#func-subsequence">fn:subsequence</a>
2022- <br/>
2023-        14.1.10 <a href="#func-unordered">fn:unordered</a>
2024- <br/>
2025-    14.2 <a href="#comparing-sequences">Functions that compare
2026-values in sequences</a>
2027- <br/>
2028-        14.2.1 <a href="#func-distinct-values">fn:distinct-values</a>
2029- <br/>
2030-        14.2.2 <a href="#func-index-of">fn:index-of</a>
2031- <br/>
2032-        14.2.3 <a href="#func-deep-equal">fn:deep-equal</a>
2033- <br/>
2034-    14.3 <a href="#cardinality-functions">Functions that test the
2035-cardinality of sequences</a>
2036- <br/>
2037-        14.3.1 <a href="#func-zero-or-one">fn:zero-or-one</a>
2038- <br/>
2039-        14.3.2 <a href="#func-one-or-more">fn:one-or-more</a>
2040- <br/>
2041-        14.3.3 <a href="#func-exactly-one">fn:exactly-one</a>
2042- <br/>
2043-    14.4 <a href="#union-intersection-except">Union, intersection
2044-and difference</a>
2045- <br/>
2046-        14.4.1 <a href="#func-union">op:union</a>
2047- <br/>
2048-        14.4.2 <a href="#func-intersect">op:intersect</a>
2049- <br/>
2050-        14.4.3 <a href="#func-except">op:except</a>
2051- <br/>
2052-    14.5 <a href="#aggregate-functions">Aggregate
2053-functions</a>
2054- <br/>
2055-        14.5.1 <a href="#func-count">fn:count</a>
2056- <br/>
2057-        14.5.2 <a href="#func-avg">fn:avg</a>
2058- <br/>
2059-        14.5.3 <a href="#func-max">fn:max</a>
2060- <br/>
2061-        14.5.4 <a href="#func-min">fn:min</a>
2062- <br/>
2063-        14.5.5 <a href="#func-sum">fn:sum</a>
2064- <br/>
2065-    14.6 <a href="#fns-that-generate-sequences">Functions and
2066-operators that generate sequences</a>
2067- <br/>
2068-        14.6.1 <a href="#func-to">op:to</a>
2069- <br/>
2070-    14.7 <a href="#fns-on-identifiers">Functions on node
2071-identifiers</a>
2072- <br/>
2073-        14.7.1 <a href="#func-id">fn:id</a>
2074- <br/>
2075-        14.7.2 <a href="#func-element-with-id">fn:element-with-id</a>
2076- <br/>
2077-        14.7.3 <a href="#func-idref">fn:idref</a>
2078- <br/>
2079-        14.7.4 <a href="#func-generate-id">fn:generate-id</a>
2080- <br/>
2081-    14.8 <a href="#fns-on-docs">Functions giving access to external
2082-information</a>
2083- <br/>
2084-        14.8.1 <a href="#func-doc">fn:doc</a>
2085- <br/>
2086-        14.8.2 <a href="#func-doc-available">fn:doc-available</a>
2087- <br/>
2088-        14.8.3 <a href="#func-collection">fn:collection</a>
2089- <br/>
2090-        14.8.4 <a href="#func-uri-collection">fn:uri-collection</a>
2091- <br/>
2092-        14.8.5 <a href="#func-unparsed-text">fn:unparsed-text</a>
2093- <br/>
2094-        14.8.6 <a href="#func-unparsed-text-lines">fn:unparsed-text-lines</a>
2095- <br/>
2096-        14.8.7 <a href="#func-unparsed-text-available">fn:unparsed-text-available</a>
2097- <br/>
2098-
2099-        14.8.8 <a href="#func-environment-variable">fn:environment-variable</a>
2100- <br/>
2101-        14.8.9 <a href="#func-available-environment-variables">fn:available-environment-variables</a>
2102- <br/>
2103-
2104-    14.9 <a href="#parsing-and-serializing">Parsing and
2105-serializing</a>
2106- <br/>
2107-        14.9.1 <a href="#func-parse-xml">fn:parse-xml</a>
2108- <br/>
2109-        14.9.2 <a href="#func-serialize">fn:serialize</a>
2110- <br/>
2111-15 <a href="#context">Context functions</a>
2112- <br/>
2113-    15.1 <a href="#func-position">fn:position</a>
2114- <br/>
2115-    15.2 <a href="#func-last">fn:last</a>
2116- <br/>
2117-    15.3 <a href="#func-current-dateTime">fn:current-dateTime</a>
2118- <br/>
2119-    15.4 <a href="#func-current-date">fn:current-date</a>
2120- <br/>
2121-    15.5 <a href="#func-current-time">fn:current-time</a>
2122- <br/>
2123-    15.6 <a href="#func-implicit-timezone">fn:implicit-timezone</a>
2124- <br/>
2125-    15.7 <a href="#func-default-collation">fn:default-collation</a>
2126- <br/>
2127-    15.8 <a href="#func-static-base-uri">fn:static-base-uri</a>
2128- <br/>
2129+sequences</a><br />
2130+&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.1 <a href="#general-seq-funcs">General
2131+functions and operators on sequences</a><br />
2132+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.1.1 <a href=
2133+"#func-concatenate">op:concatenate</a><br />
2134+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.1.2 <a href=
2135+"#func-empty">fn:empty</a><br />
2136+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.1.3 <a href=
2137+"#func-exists">fn:exists</a><br />
2138+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.1.4 <a href=
2139+"#func-head">fn:head</a><br />
2140+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.1.5 <a href=
2141+"#func-tail">fn:tail</a><br />
2142+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.1.6 <a href=
2143+"#func-insert-before">fn:insert-before</a><br />
2144+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.1.7 <a href=
2145+"#func-remove">fn:remove</a><br />
2146+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.1.8 <a href=
2147+"#func-reverse">fn:reverse</a><br />
2148+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.1.9 <a href=
2149+"#func-subsequence">fn:subsequence</a><br />
2150+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.1.10 <a href=
2151+"#func-unordered">fn:unordered</a><br />
2152+&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.2 <a href=
2153+"#comparing-sequences">Functions that compare values in
2154+sequences</a><br />
2155+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.2.1 <a href=
2156+"#func-distinct-values">fn:distinct-values</a><br />
2157+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.2.2 <a href=
2158+"#func-index-of">fn:index-of</a><br />
2159+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.2.3 <a href=
2160+"#func-deep-equal">fn:deep-equal</a><br />
2161+&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.3 <a href=
2162+"#cardinality-functions">Functions that test the cardinality of
2163+sequences</a><br />
2164+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.3.1 <a href=
2165+"#func-zero-or-one">fn:zero-or-one</a><br />
2166+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.3.2 <a href=
2167+"#func-one-or-more">fn:one-or-more</a><br />
2168+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.3.3 <a href=
2169+"#func-exactly-one">fn:exactly-one</a><br />
2170+&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.4 <a href=
2171+"#union-intersection-except">Union, intersection and
2172+difference</a><br />
2173+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.4.1 <a href=
2174+"#func-union">op:union</a><br />
2175+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.4.2 <a href=
2176+"#func-intersect">op:intersect</a><br />
2177+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.4.3 <a href=
2178+"#func-except">op:except</a><br />
2179+&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.5 <a href=
2180+"#aggregate-functions">Aggregate functions</a><br />
2181+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.5.1 <a href=
2182+"#func-count">fn:count</a><br />
2183+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.5.2 <a href=
2184+"#func-avg">fn:avg</a><br />
2185+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.5.3 <a href=
2186+"#func-max">fn:max</a><br />
2187+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.5.4 <a href=
2188+"#func-min">fn:min</a><br />
2189+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.5.5 <a href=
2190+"#func-sum">fn:sum</a><br />
2191+&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.6 <a href=
2192+"#fns-that-generate-sequences">Functions and operators that
2193+generate sequences</a><br />
2194+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.6.1 <a href=
2195+"#func-to">op:to</a><br />
2196+&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.7 <a href=
2197+"#fns-on-identifiers">Functions on node identifiers</a><br />
2198+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.7.1 <a href=
2199+"#func-id">fn:id</a><br />
2200+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.7.2 <a href=
2201+"#func-element-with-id">fn:element-with-id</a><br />
2202+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.7.3 <a href=
2203+"#func-idref">fn:idref</a><br />
2204+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.7.4 <a href=
2205+"#func-generate-id">fn:generate-id</a><br />
2206+&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.8 <a href="#fns-on-docs">Functions
2207+giving access to external information</a><br />
2208+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.8.1 <a href=
2209+"#func-doc">fn:doc</a><br />
2210+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.8.2 <a href=
2211+"#func-doc-available">fn:doc-available</a><br />
2212+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.8.3 <a href=
2213+"#func-collection">fn:collection</a><br />
2214+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.8.4 <a href=
2215+"#func-uri-collection">fn:uri-collection</a><br />
2216+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.8.5 <a href=
2217+"#func-unparsed-text">fn:unparsed-text</a><br />
2218+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.8.6 <a href=
2219+"#func-unparsed-text-lines">fn:unparsed-text-lines</a><br />
2220+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.8.7 <a href=
2221+"#func-unparsed-text-available">fn:unparsed-text-available</a><br />
2222+
2223+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.8.8 <a href=
2224+"#func-environment-variable">fn:environment-variable</a><br />
2225+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.8.9 <a href=
2226+"#func-available-environment-variables">fn:available-environment-variables</a><br />
2227+
2228+&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.9 <a href=
2229+"#parsing-and-serializing">Parsing and serializing</a><br />
2230+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.9.1 <a href=
2231+"#func-parse-xml">fn:parse-xml</a><br />
2232+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.9.2 <a href=
2233+"#func-parse-xml-fragment">fn:parse-xml-fragment</a><br />
2234+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;14.9.3 <a href=
2235+"#func-serialize">fn:serialize</a><br />
2236+15 <a href="#context">Context functions</a><br />
2237+&amp;#160;&amp;#160;&amp;#160;&amp;#160;15.1 <a href=
2238+"#func-position">fn:position</a><br />
2239+&amp;#160;&amp;#160;&amp;#160;&amp;#160;15.2 <a href="#func-last">fn:last</a><br />
2240+&amp;#160;&amp;#160;&amp;#160;&amp;#160;15.3 <a href=
2241+"#func-current-dateTime">fn:current-dateTime</a><br />
2242+&amp;#160;&amp;#160;&amp;#160;&amp;#160;15.4 <a href=
2243+"#func-current-date">fn:current-date</a><br />
2244+&amp;#160;&amp;#160;&amp;#160;&amp;#160;15.5 <a href=
2245+"#func-current-time">fn:current-time</a><br />
2246+&amp;#160;&amp;#160;&amp;#160;&amp;#160;15.6 <a href=
2247+"#func-implicit-timezone">fn:implicit-timezone</a><br />
2248+&amp;#160;&amp;#160;&amp;#160;&amp;#160;15.7 <a href=
2249+"#func-default-collation">fn:default-collation</a><br />
2250+&amp;#160;&amp;#160;&amp;#160;&amp;#160;15.8 <a href=
2251+"#func-static-base-uri">fn:static-base-uri</a><br />
2252 16 <a href="#higher-order-functions">Higher-order
2253-functions</a>
2254- <br/>
2255-    16.1 <a href="#functions-on-functions">Functions on
2256-functions</a>
2257- <br/>
2258-        16.1.1 <a href="#func-function-name">fn:function-name</a>
2259- <br/>
2260-        16.1.2 <a href="#func-function-arity">fn:function-arity</a>
2261- <br/>
2262-    16.2 <a href="#basic-hofs">Basic higher-order
2263-functions</a>
2264- <br/>
2265-        16.2.1 <a href="#func-map">fn:map</a>
2266- <br/>
2267-        16.2.2 <a href="#func-filter">fn:filter</a>
2268- <br/>
2269-        16.2.3 <a href="#func-fold-left">fn:fold-left</a>
2270- <br/>
2271-        16.2.4 <a href="#func-fold-right">fn:fold-right</a>
2272- <br/>
2273-        16.2.5 <a href="#func-map-pairs">fn:map-pairs</a>
2274- <br/>
2275-17 <a href="#constructor-functions">Constructor functions</a>
2276- <br/>
2277-    17.1 <a href="#constructor-functions-for-xsd-types">Constructor
2278-functions for XML Schema built-in types</a>
2279- <br/>
2280-    17.2 <a href="#constructor-qname-notation">Constructor
2281-functions for xs:QName and xs:NOTATION</a>
2282- <br/>
2283-    17.3 <a href="#constructor-functions-for-user-defined-types">Constructor
2284-functions for user-defined types</a>
2285- <br/>
2286-18 <a href="#casting">Casting</a>
2287- <br/>
2288-    18.1 <a href="#casting-from-primitive-to-primitive">Casting
2289-from primitive types to primitive types</a>
2290- <br/>
2291-        18.1.1 <a href="#casting-from-strings">Casting from
2292-xs:string and xs:untypedAtomic</a>
2293- <br/>
2294-        18.1.2 <a href="#casting-to-string">Casting to xs:string
2295-and xs:untypedAtomic</a>
2296- <br/>
2297-        18.1.3 <a href="#casting-to-numerics">Casting to numeric
2298-types</a>
2299- <br/>
2300-        18.1.4 <a href="#casting-to-durations">Casting to duration
2301-types</a>
2302- <br/>
2303-        18.1.5 <a href="#casting-to-datetimes">Casting to date and
2304-time types</a>
2305- <br/>
2306-        18.1.6 <a href="#casting-boolean">Casting to
2307-xs:boolean</a>
2308- <br/>
2309-        18.1.7 <a href="#casting-to-binary">Casting to
2310-xs:base64Binary and xs:hexBinary</a>
2311- <br/>
2312-        18.1.8 <a href="#casting-to-anyuri">Casting to
2313-xs:anyURI</a>
2314- <br/>
2315-        18.1.9 <a href="#casting-to-qname-and-notation">Casting to
2316-xs:QName and xs:NOTATION</a>
2317- <br/>
2318-    18.2 <a href="#casting-to-derived-types">Casting to derived
2319-types</a>
2320- <br/>
2321-    18.3 <a href="#casting-from-derived-to-parent">Casting from
2322-derived types to parent types</a>
2323- <br/>
2324-    18.4 <a href="#casting-within-branch">Casting within a branch
2325-of the type hierarchy</a>
2326- <br/>
2327-        18.4.1 <a href="#casting-to-ENTITY">Casting to
2328-xs:ENTITY</a>
2329- <br/>
2330-    18.5 <a href="#casting-across-hierarchy">Casting across the
2331-type hierarchy</a>
2332- <br/>
2333-    18.6 <a href="#casting-to-union">Casting to union
2334-types</a>
2335- <br/>
2336- </p>
2337- <h3>
2338- <a name="appendices" id="appendices"/>Appendices</h3>
2339- <p class="toc">A <a href="#biblio">References</a>
2340- <br/>
2341-    A.1 <a href="#normative-biblio">Normative references</a>
2342- <br/>
2343-    A.2 <a href="#non-normative-biblio">Non-normative
2344-references</a>
2345- <br/>
2346-B <a href="#error-summary">Error summary</a>
2347- <br/>
2348+functions</a><br />
2349+&amp;#160;&amp;#160;&amp;#160;&amp;#160;16.1 <a href=
2350+"#functions-on-functions">Functions on functions</a><br />
2351+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;16.1.1 <a href=
2352+"#func-function-lookup">fn:function-lookup</a><br />
2353+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;16.1.2 <a href=
2354+"#func-function-name">fn:function-name</a><br />
2355+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;16.1.3 <a href=
2356+"#func-function-arity">fn:function-arity</a><br />
2357+&amp;#160;&amp;#160;&amp;#160;&amp;#160;16.2 <a href="#basic-hofs">Basic
2358+higher-order functions</a><br />
2359+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;16.2.1 <a href=
2360+"#func-map">fn:map</a><br />
2361+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;16.2.2 <a href=
2362+"#func-filter">fn:filter</a><br />
2363+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;16.2.3 <a href=
2364+"#func-fold-left">fn:fold-left</a><br />
2365+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;16.2.4 <a href=
2366+"#func-fold-right">fn:fold-right</a><br />
2367+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;16.2.5 <a href=
2368+"#func-map-pairs">fn:map-pairs</a><br />
2369+17 <a href="#constructor-functions">Constructor functions</a><br />
2370+&amp;#160;&amp;#160;&amp;#160;&amp;#160;17.1 <a href=
2371+"#constructor-functions-for-xsd-types">Constructor functions for
2372+XML Schema built-in types</a><br />
2373+&amp;#160;&amp;#160;&amp;#160;&amp;#160;17.2 <a href=
2374+"#constructor-qname-notation">Constructor functions for xs:QName
2375+and xs:NOTATION</a><br />
2376+&amp;#160;&amp;#160;&amp;#160;&amp;#160;17.3 <a href=
2377+"#constructor-functions-for-user-defined-types">Constructor
2378+functions for user-defined types</a><br />
2379+18 <a href="#casting">Casting</a><br />
2380+&amp;#160;&amp;#160;&amp;#160;&amp;#160;18.1 <a href=
2381+"#casting-from-primitive-to-primitive">Casting from primitive types
2382+to primitive types</a><br />
2383+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;18.1.1 <a href=
2384+"#casting-to-string">Casting to xs:string and
2385+xs:untypedAtomic</a><br />
2386+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;18.1.2 <a href=
2387+"#casting-to-numerics">Casting to numeric types</a><br />
2388+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;18.1.3 <a href=
2389+"#casting-to-durations">Casting to duration types</a><br />
2390+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;18.1.4 <a href=
2391+"#casting-to-datetimes">Casting to date and time types</a><br />
2392+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;18.1.5 <a href=
2393+"#casting-boolean">Casting to xs:boolean</a><br />
2394+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;18.1.6 <a href=
2395+"#casting-to-binary">Casting to xs:base64Binary and
2396+xs:hexBinary</a><br />
2397+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;18.1.7 <a href=
2398+"#casting-to-anyuri">Casting to xs:anyURI</a><br />
2399+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;18.1.8 <a href=
2400+"#casting-to-qname-and-notation">Casting to xs:QName and
2401+xs:NOTATION</a><br />
2402+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;18.1.9 <a href=
2403+"#casting-to-ENTITY">Casting to xs:ENTITY</a><br />
2404+&amp;#160;&amp;#160;&amp;#160;&amp;#160;18.2 <a href=
2405+"#casting-from-strings">Casting from xs:string and
2406+xs:untypedAtomic</a><br />
2407+&amp;#160;&amp;#160;&amp;#160;&amp;#160;18.3 <a href=
2408+"#casting-non-primitive-types">Casting involving non-primitive
2409+types</a><br />
2410+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;18.3.1 <a href=
2411+"#casting-to-derived-types">Casting to derived types</a><br />
2412+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;18.3.2 <a href=
2413+"#casting-from-derived-to-parent">Casting from derived types to
2414+parent types</a><br />
2415+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;18.3.3 <a href=
2416+"#casting-within-branch">Casting within a branch of the type
2417+hierarchy</a><br />
2418+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;18.3.4 <a href=
2419+"#casting-across-hierarchy">Casting across the type
2420+hierarchy</a><br />
2421+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;18.3.5 <a href=
2422+"#casting-to-union">Casting to union types</a><br />
2423+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;18.3.6 <a href=
2424+"#casting-to-list">Casting to list types</a><br /></p>
2425+<h3><a name="appendices" id="appendices"></a>Appendices</h3>
2426+<p class="toc">A <a href="#biblio">References</a><br />
2427+&amp;#160;&amp;#160;&amp;#160;&amp;#160;A.1 <a href="#normative-biblio">Normative
2428+references</a><br />
2429+&amp;#160;&amp;#160;&amp;#160;&amp;#160;A.2 <a href=
2430+"#non-normative-biblio">Non-normative references</a><br />
2431+B <a href="#error-summary">Error summary</a><br />
2432 C <a href="#xpath1-compatibility">Compatibility with XPath 1.0</a>
2433-(Non-Normative)<br/>
2434+(Non-Normative)<br />
2435 D <a href="#examples">Illustrative user-written functions</a>
2436-(Non-Normative)<br/>
2437-    D.1 <a href="#if-empty-if-absent">eg:if-empty and
2438-eg:if-absent</a>
2439- <br/>
2440-        D.1.1 <a href="#if-empty">eg:if-empty</a>
2441- <br/>
2442-        D.1.2 <a href="#if-absent">eg:if-absent</a>
2443- <br/>
2444-    D.2 <a href="#union-intersect-except-on-values">Union,
2445-intersection and difference on sequences of values</a>
2446- <br/>
2447-        D.2.1 <a href="#value-union">eg:value-union</a>
2448- <br/>
2449-        D.2.2 <a href="#value-intersect">eg:value-intersect</a>
2450- <br/>
2451-        D.2.3 <a href="#value-except">eg:value-except</a>
2452- <br/>
2453-    D.3 <a href="#index-of-node">eg:index-of-node</a>
2454- <br/>
2455-    D.4 <a href="#string-pad">eg:string-pad</a>
2456- <br/>
2457-    D.5 <a href="#func-distinct-nodes-stable">eg:distinct-nodes-stable</a>
2458- <br/>
2459-    D.6 <a href="#highest-lowest">Finding minima and
2460-maxima</a>
2461- <br/>
2462-        D.6.1 <a href="#highest">eg:highest</a>
2463- <br/>
2464-        D.6.2 <a href="#lowest">eg:lowest</a>
2465- <br/>
2466-    D.7 <a href="#sorting">Sorting</a>
2467- <br/>
2468+(Non-Normative)<br />
2469+&amp;#160;&amp;#160;&amp;#160;&amp;#160;D.1 <a href=
2470+"#if-empty-if-absent">eg:if-empty and eg:if-absent</a><br />
2471+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;D.1.1 <a href=
2472+"#if-empty">eg:if-empty</a><br />
2473+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;D.1.2 <a href=
2474+"#if-absent">eg:if-absent</a><br />
2475+&amp;#160;&amp;#160;&amp;#160;&amp;#160;D.2 <a href=
2476+"#union-intersect-except-on-values">Union, intersection and
2477+difference on sequences of values</a><br />
2478+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;D.2.1 <a href=
2479+"#value-union">eg:value-union</a><br />
2480+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;D.2.2 <a href=
2481+"#value-intersect">eg:value-intersect</a><br />
2482+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;D.2.3 <a href=
2483+"#value-except">eg:value-except</a><br />
2484+&amp;#160;&amp;#160;&amp;#160;&amp;#160;D.3 <a href=
2485+"#index-of-node">eg:index-of-node</a><br />
2486+&amp;#160;&amp;#160;&amp;#160;&amp;#160;D.4 <a href=
2487+"#string-pad">eg:string-pad</a><br />
2488+&amp;#160;&amp;#160;&amp;#160;&amp;#160;D.5 <a href=
2489+"#func-distinct-nodes-stable">eg:distinct-nodes-stable</a><br />
2490+&amp;#160;&amp;#160;&amp;#160;&amp;#160;D.6 <a href="#highest-lowest">Finding
2491+minima and maxima</a><br />
2492+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;D.6.1 <a href=
2493+"#highest">eg:highest</a><br />
2494+&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;D.6.2 <a href=
2495+"#lowest">eg:lowest</a><br />
2496+&amp;#160;&amp;#160;&amp;#160;&amp;#160;D.7 <a href="#sorting">Sorting</a><br />
2497 E <a href="#impl-def">Checklist of implementation-defined
2498-features</a> (Non-Normative)<br/>
2499+features</a> (Non-Normative)<br />
2500 F <a href="#changelog">Changes since previous Recommendation</a>
2501-(Non-Normative)<br/>
2502-    F.1 <a href="#substantive-changes-2009-12-15">Substantive
2503-changes (15 December 2009)</a>
2504- <br/>
2505-    F.2 <a href="#substantive-changes-current-draft">Substantive
2506-changes (current draft)</a>
2507- <br/>
2508-    F.3 <a href="#incompatibilities">Incompatibilities</a>
2509- <br/>
2510-    F.4 <a href="#editorial-changes">Editorial changes</a>
2511- <br/>
2512+(Non-Normative)<br />
2513+&amp;#160;&amp;#160;&amp;#160;&amp;#160;F.1 <a href=
2514+"#substantive-changes-2009-12-15">Substantive changes (15 December
2515+2009)</a><br />
2516+&amp;#160;&amp;#160;&amp;#160;&amp;#160;F.2 <a href=
2517+"#substantive-changes-current-draft">Substantive changes (current
2518+draft)</a><br />
2519+&amp;#160;&amp;#160;&amp;#160;&amp;#160;F.3 <a href=
2520+"#incompatibilities">Incompatibilities</a><br />
2521+&amp;#160;&amp;#160;&amp;#160;&amp;#160;F.4 <a href="#editorial-changes">Editorial
2522+changes</a><br />
2523 G <a href="#quickref">Function and Operator Quick Reference</a>
2524-(Non-Normative)<br/>
2525-    G.1 <a href="#quickref-section">Functions and Operators by
2526-Section</a>
2527- <br/>
2528-    G.2 <a href="#quickref-alpha">Functions and Operators
2529-Alphabetically</a>
2530- <br/>
2531- </p>
2532- </div>
2533- <hr/>
2534- <div class="body">
2535- <div class="div1">
2536- <h2>
2537- <a name="intro" id="intro"/>1 Introduction</h2>
2538- <p>The purpose of this document is to catalog the functions and
2539+(Non-Normative)<br />
2540+&amp;#160;&amp;#160;&amp;#160;&amp;#160;G.1 <a href="#quickref-section">Functions
2541+and Operators by Section</a><br />
2542+&amp;#160;&amp;#160;&amp;#160;&amp;#160;G.2 <a href="#quickref-alpha">Functions and
2543+Operators Alphabetically</a><br /></p>
2544+</div>
2545+<hr />
2546+<div class="body">
2547+<div class="div1">
2548+<h2><a name="intro" id="intro"></a>1 Introduction</h2>
2549+<p>The purpose of this document is to catalog the functions and
2550 operators required for XPath 3.0, XQuery 3.0 and XSLT 3.0. The
2551 exact syntax used to call these functions and operators is
2552 specified in <a href="#xpath-30">[XML Path Language (XPath)
2553 3.0]</a>, <a href="#xquery-30">[XQuery 3.0: An XML Query
2554 Language]</a> and <a href="#xslt-30">[XSL Transformations (XSLT)
2555 Version 3.0]</a>.</p>
2556- <p>This document defines constructor functions and functions that
2557-take typed values as arguments. Some of the functions define the
2558-semantics of operators discussed in <a href="#xpath-30">[XML Path
2559+<p>This document defines constructor functions and functions that
2560+take typed values as arguments. Some of the functions specify the
2561+semantics of operators defined in <a href="#xpath-30">[XML Path
2562 Language (XPath) 3.0]</a> and <a href="#xquery-30">[XQuery 3.0: An
2563 XML Query Language]</a>.</p>
2564- <p>
2565- <a href="#xmlschema-2">[XML Schema Part 2: Datatypes Second
2566+<p><a href="#xmlschema-2">[XML Schema Part 2: Datatypes Second
2567 Edition]</a> defines a number of primitive and derived datatypes,
2568 collectively known as built-in datatypes. This document defines
2569 functions and operations on these datatypes as well as the
2570-datatypes defined in <a href="http://www.w3.org/TR/xpath-datamodel-30/#types">Section
2571-Types</a>
2572- <sup>
2573- <small>DM30</small>
2574- </sup> of the <a href="#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>.
2575-These functions and operations are defined for use in <a href="#xpath-30">[XML Path Language (XPath) 3.0]</a>, <a href="#xquery-30">[XQuery 3.0: An XML Query Language]</a> and <a href="#xslt-30">[XSL Transformations (XSLT) Version 3.0]</a> and related
2576+datatypes defined in <a href=
2577+"http://www.w3.org/TR/xpath-datamodel-30/#types">Section 2.7 Schema
2578+Information</a> <sup><small>DM30</small></sup> of the <a href=
2579+"#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>.
2580+These functions and operations are defined for use in <a href=
2581+"#xpath-30">[XML Path Language (XPath) 3.0]</a>, <a href=
2582+"#xquery-30">[XQuery 3.0: An XML Query Language]</a> and <a href=
2583+"#xslt-30">[XSL Transformations (XSLT) Version 3.0]</a> and related
2584 XML standards. This document also defines functions and operators
2585-on nodes and node sequences as defined in the <a href="#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>
2586+on nodes and node sequences as defined in the <a href=
2587+"#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>
2588 for use in <a href="#xpath-30">[XML Path Language (XPath) 3.0]</a>,
2589 <a href="#xquery-30">[XQuery 3.0: An XML Query Language]</a> and
2590 <a href="#xslt-30">[XSL Transformations (XSLT) Version 3.0]</a> and
2591 other related XML standards.</p>
2592- <p>
2593- <a href="#xmlschema11-2">[XML Schema 1.1 Part 2: Datatypes]</a>
2594+<p><a href="#xmlschema11-2">[XML Schema 1.1 Part 2: Datatypes]</a>
2595 adds to the data types defined in <a href="#xmlschema-2">[XML
2596 Schema Part 2: Datatypes Second Edition]</a>. It introduces a new
2597-primitive type <code>xs:precisionDecimal</code> which at the time
2598-of writing is not supported by any functions or operators in this
2599-specification. It also introduces a new derived type
2600-<code>xs:dateTimeStamp</code> which is supported, and it
2601-incorporates as built-in types the two types
2602-<code>xs:yearMonthDuration</code> and
2603+derived type <code>xs:dateTimeStamp</code>, and it incorporates as
2604+built-in types the two types <code>xs:yearMonthDuration</code> and
2605 <code>xs:dayTimeDuration</code> which were previously XDM additions
2606 to the type system. In addition, XSD 1.1 clarifies and updates many
2607 aspects of the definitions of the existing data types: for example,
2608 it extends the value space of <code>xs:double</code> to allow both
2609-positive and negative zero; it modifies the value space of
2610+positive and negative zero, and extends the lexical space to allow
2611+<code>+INF</code>; it modifies the value space of
2612 <code>xs:Name</code> to permit additional Unicode characters; it
2613 allows year zero and disallows leap seconds in
2614 <code>xs:dateTime</code> values; and it allows any character string
2615 to appear as the value of an <code>xs:anyURI</code> item.
2616 Implementations of this specification <strong>may</strong> support
2617 either XSD 1.0 or XSD 1.1 or both.</p>
2618- <p>References to specific sections of some of the above documents
2619+<p>References to specific sections of some of the above documents
2620 are indicated by cross-document links in this document. Each such
2621 link consists of a pointer to a specific section followed a
2622 superscript specifying the linked document. The superscripts have
2623 the following meanings: 'XQ' <a href="#xquery-30">[XQuery 3.0: An
2624 XML Query Language]</a>, 'XT' <a href="#xslt-30">[XSL
2625-Transformations (XSLT) Version 3.0]</a>, 'XP' <a href="#xpath-30">[XML Path Language (XPath) 3.0]</a>, and 'DM' <a href="#xpath-datamodel-30">[XQuery and XPath Data Model (XDM)
2626+Transformations (XSLT) Version 3.0]</a>, 'XP' <a href=
2627+"#xpath-30">[XML Path Language (XPath) 3.0]</a>, and 'DM' <a href=
2628+"#xpath-datamodel-30">[XQuery and XPath Data Model (XDM)
2629 3.0]</a>.</p>
2630- <div class="div2">
2631- <h3>
2632- <a name="conformance" id="conformance"/>1.1 Conformance</h3>
2633- <p>The Functions and Operators specification is intended primarily
2634+<div class="div2">
2635+<h3><a name="conformance" id="conformance"></a>1.1 Conformance</h3>
2636+<p>The Functions and Operators specification is intended primarily
2637 as a component that can be used by other specifications. Therefore,
2638 Functions and Operators relies on specifications that use it (such
2639 as <a href="#xpath-30">[XML Path Language (XPath) 3.0]</a>,
2640 <a href="#xslt-30">[XSL Transformations (XSLT) Version 3.0]</a> and
2641 <a href="#xquery-30">[XQuery 3.0: An XML Query Language]</a>) to
2642 specify conformance criteria for their respective environments.</p>
2643- <p>Authors of conformance criteria for the use of the Functions and
2644+<p>Authors of conformance criteria for the use of the Functions and
2645 Operators should pay particular attention to the following
2646 features:</p>
2647- <ul>
2648- <li>
2649- <p>It is <a title="implementation-defined" class="termref" href="#implementation-defined">
2650- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
2651- </a> which version of Unicode is supported, but it
2652+<ul>
2653+<li>
2654+<p>It is <a title="implementation-defined" class="termref" href=
2655+"#implementation-defined"><span class=
2656+"arrow">·</span>implementation-defined<span class=
2657+"arrow">·</span></a> which version of Unicode is supported, but it
2658 is recommended that the most recent version of Unicode be used.</p>
2659- </li>
2660- <li>
2661- <p>It is <a title="implementation-defined" class="termref" href="#implementation-defined">
2662- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
2663- </a> whether the type system is based on XML
2664-Schema 1.0 or XML Schema 1.1.</p>
2665- </li>
2666- <li>
2667- <p>Support for XML 1.0 and XML 1.1 by the datatypes used in
2668+</li>
2669+<li>
2670+<p>It is <a title="implementation-defined" class="termref" href=
2671+"#implementation-defined"><span class=
2672+"arrow">·</span>implementation-defined<span class=
2673+"arrow">·</span></a> whether the type system is based on XML Schema
2674+1.0 or XML Schema 1.1.</p>
2675+</li>
2676+<li>
2677+<p>Support for XML 1.0 and XML 1.1 by the datatypes used in
2678 Functions and Operators.</p>
2679- </li>
2680- </ul>
2681- <div class="note">
2682- <p class="prefix">
2683- <b>Note:</b>
2684- </p>
2685- <p>At the time of writing there is a Candidate Recommendation of
2686+</li>
2687+</ul>
2688+<div class="note">
2689+<p class="prefix"><b>Note:</b></p>
2690+<p>At the time of writing there is a Candidate Recommendation of
2691 XML Schema 1.1 that introduces some new data types including
2692-<code>xs:precisionDecimal</code> and <code>xs:dateTimeStamp</code>.
2693-This specification provides some limited support for the latter,
2694-but does not yet include support for
2695-<code>xs:precisionDecimal</code>. This is likely to come in a later
2696-draft of this specification. Furthermore, XSD 1.1 includes the
2697+<code>xs:dateTimeStamp</code>. Furthermore, XSD 1.1 includes the
2698 option of supporting revised definitions of types such as
2699 <code>xs:NCName</code> based on the rules in XML 1.1 rather than
2700 1.0. The rules affecting support for XSD 1.0 versus XSD 1.1 and XML
2701 1.0 versus XML 1.1 are likely to be refined in later drafts of this
2702 specification.</p>
2703- </div>
2704- <p>In this document, text labeled as an example or as a Note is
2705+</div>
2706+<p>In this document, text labeled as an example or as a Note is
2707 provided for explanatory purposes and is not normative.</p>
2708- </div>
2709- <div class="div2">
2710- <h3>
2711- <a name="namespace-prefixes" id="namespace-prefixes"/>1.2
2712+</div>
2713+<div class="div2">
2714+<h3><a name="namespace-prefixes" id="namespace-prefixes"></a>1.2
2715 Namespaces and prefixes</h3>
2716- <p>The functions and operators discussed in this document are
2717-contained in one of several namespaces (see <a href="#REC-xml-names">[Namespaces in XML]</a>) and referenced using an
2718+<p>The functions and operators defined in this document are
2719+contained in one of several namespaces (see <a href=
2720+"#REC-xml-names">[Namespaces in XML]</a>) and referenced using an
2721 <code>xs:QName</code>.</p>
2722- <p>This document uses conventional prefixes to refer to these
2723+<p>This document uses conventional prefixes to refer to these
2724 namespaces. User-written applications can choose a different prefix
2725 to refer to the namespace, so long as it is bound to the correct
2726 URI. The host language may also define a default namespace for
2727 function calls, in which case function names in that namespace need
2728 not be prefixed at all. In many cases the default namespace will be
2729 <code>http://www.w3.org/2005/xpath-functions</code>, allowing a
2730-call on the <a href="#func-name">
2731- <code>fn:name</code>
2732- </a> function
2733+call on the <a href="#func-name"><code>fn:name</code></a> function
2734 (for example) to be written as <code>name()</code> rather than
2735-<a href="#func-name">
2736- <code>fn:name()</code>
2737- </a>; in this document,
2738+<a href="#func-name"><code>fn:name()</code></a>; in this document,
2739 however, all example function calls are explicitly prefixed.</p>
2740- <p>The URIs of the namespaces and the conventional prefixes
2741+<p>The URIs of the namespaces and the conventional prefixes
2742 associated with them are:</p>
2743- <ul>
2744- <li>
2745- <p>
2746- <code>http://www.w3.org/2001/XMLSchema</code> for constructors
2747+<ul>
2748+<li>
2749+<p><code>http://www.w3.org/2001/XMLSchema</code> for constructors
2750 -- associated with <code>xs</code>.</p>
2751- <p>The datatypes and constructor functions for the built-in
2752+<p>The section <a href="#constructor-functions"><b>17 Constructor
2753+functions</b></a> defines constructor functions for the built-in
2754 datatypes defined in <a href="#xmlschema-2">[XML Schema Part 2:
2755-Datatypes Second Edition]</a> and in <a href="http://www.w3.org/TR/xpath-datamodel-30/#types">Section
2756-Types</a>
2757- <sup>
2758- <small>DM30</small>
2759- </sup> of <a href="#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>
2760-and discussed in <a href="#constructor-functions">
2761- <b>17 Constructor
2762-functions</b>
2763- </a> are in the XML Schema namespace,
2764-<code>http://www.w3.org/2001/XMLSchema</code>, and named in this
2765-document using the <code>xs</code> prefix.</p>
2766- </li>
2767- <li>
2768- <p>
2769- <code>http://www.w3.org/2005/xpath-functions</code> for
2770-functions — associated with <code>fn</code>.</p>
2771- <p>The namespace prefix used in this document for most functions
2772+Datatypes Second Edition]</a> and in <a href=
2773+"http://www.w3.org/TR/xpath-datamodel-30/#types">Section 2.7 Schema
2774+Information</a> <sup><small>DM30</small></sup> of <a href=
2775+"#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>.
2776+These datatypes and the corresponding constructor functions are in
2777+the XML Schema namespace,
2778+<code>http://www.w3.org/2001/XMLSchema</code>, and are named in
2779+this document using the <code>xs</code> prefix.</p>
2780+</li>
2781+<li>
2782+<p><code>http://www.w3.org/2005/xpath-functions</code> for
2783+functions — associated with <code>fn</code>.</p>
2784+<p>The namespace prefix used in this document for most functions
2785 that are available to users is <code>fn</code>.</p>
2786- </li>
2787- <li>
2788- <p>
2789- <code>http://www.w3.org/2005/xpath-functions/math</code> for
2790-functions — associated with <code>math</code>.</p>
2791- <p>This namespace is used for some mathematical functions. The
2792+</li>
2793+<li>
2794+<p><code>http://www.w3.org/2005/xpath-functions/math</code> for
2795+functions — associated with <code>math</code>.</p>
2796+<p>This namespace is used for some mathematical functions. The
2797 namespace prefix used in this document for these functions is
2798 <code>math</code>. These functions are available to users in
2799 exactly the same way as those in the <code>fn</code> namespace.</p>
2800- </li>
2801- <li>
2802- <p>
2803- <code>http://www.w3.org/2005/xqt-errors</code> — associated
2804-with <code>err</code>.</p>
2805- <p>There are no functions in this namespace; it is used for error
2806+</li>
2807+<li>
2808+<p><code>http://www.w3.org/2005/xqt-errors</code> — associated with
2809+<code>err</code>.</p>
2810+<p>There are no functions in this namespace; it is used for error
2811 codes.</p>
2812- <p>This document uses the prefix <code>err</code> to represent the
2813+<p>This document uses the prefix <code>err</code> to represent the
2814 namespace URI <code>http://www.w3.org/2005/xqt-errors</code>, which
2815 is the namespace for all XPath and XQuery error codes and messages.
2816 This namespace prefix is not predeclared and its use in this
2817 document is not normative.</p>
2818- <div class="note">
2819- <p class="prefix">
2820- <b>Note:</b>
2821- </p>
2822- <p>The namespace URI associated with the <code>err</code> prefix is
2823+<div class="note">
2824+<p class="prefix"><b>Note:</b></p>
2825+<p>The namespace URI associated with the <code>err</code> prefix is
2826 not expected to change from one version of this document to
2827 another. The contents of this namespace may be extended to allow
2828 additional errors to be returned.</p>
2829- </div>
2830- </li>
2831- <li>
2832- <p>Functions defined with the <code>op</code> prefix are described
2833-here to underpin the definitions of the operators in <a href="#xpath-30">[XML Path Language (XPath) 3.0]</a>, <a href="#xquery-30">[XQuery 3.0: An XML Query Language]</a> and <a href="#xslt-30">[XSL Transformations (XSLT) Version 3.0]</a>. These
2834+</div>
2835+</li>
2836+<li>
2837+<p>Functions defined with the <code>op</code> prefix are described
2838+here to underpin the definitions of the operators in <a href=
2839+"#xpath-30">[XML Path Language (XPath) 3.0]</a>, <a href=
2840+"#xquery-30">[XQuery 3.0: An XML Query Language]</a> and <a href=
2841+"#xslt-30">[XSL Transformations (XSLT) Version 3.0]</a>. These
2842 functions are not available directly to users, and there is no
2843 requirement that implementations should actually provide these
2844 functions. For this reason, no namespace is associated with the
2845 <code>op</code> prefix. For example, multiplication is generally
2846 associated with the <code>*</code> operator, but it is described as
2847 a function in this document:</p>
2848- <div class="exampleInner">
2849- <div class="proto">
2850- <code class="function">op:numeric-multiply</code>(<code class="arg">$arg1</code>
2851- <code class="as"> as </code>
2852- <code class="type">numeric</code>, <code class="arg">$arg2</code>
2853- <code class="as"> as </code>
2854- <code class="type">numeric</code>)<code class="as"> as </code>
2855- <code class="return-type">numeric</code>
2856- </div>
2857- </div>
2858- </li>
2859- </ul>
2860- </div>
2861- <div class="div2">
2862- <h3>
2863- <a name="func-overloading" id="func-overloading"/>1.3
2864+<div class="exampleInner">
2865+<div class="proto"><code class=
2866+"function">fn:numeric-multiply</code>(<code class=
2867+"arg">$arg1</code><code class=
2868+"as">&amp;#160;as&amp;#160;</code><code class="type">numeric</code>,
2869+<code class="arg">$arg2</code><code class=
2870+"as">&amp;#160;as&amp;#160;</code><code class=
2871+"type">numeric</code>)<code class=
2872+"as">&amp;#160;as&amp;#160;</code><code class=
2873+"return-type">numeric</code></div>
2874+</div>
2875+</li>
2876+</ul>
2877+</div>
2878+<div class="div2">
2879+<h3><a name="func-overloading" id="func-overloading"></a>1.3
2880 Function overloading</h3>
2881- <p>In general, the specifications named above do not support
2882+<p>In general, the specifications named above do not support
2883 function overloading in the sense that functions that have multiple
2884 signatures with the same name and the same number of parameters are
2885 not supported. Consequently, there are no such overloaded functions
2886 in this document except for legacy <a href="#xpath">[XML Path
2887-Language (XPath) Version 1.0]</a> functions such as <a href="#func-string">
2888- <code>fn:string</code>
2889- </a>, which accepts a single
2890+Language (XPath) Version 1.0]</a> functions such as <a href=
2891+"#func-string"><code>fn:string</code></a>, which accepts a single
2892 parameter of a variety of types. In addition, it should be noted
2893-that the functions defined in <a href="#numeric-functions">
2894- <b>4
2895-Functions and operators on numerics</b>
2896- </a> that accept
2897+that the functions defined in <a href="#numeric-functions"><b>4
2898+Functions and operators on numerics</b></a> that accept
2899 <code>numeric</code> parameters accept arguments of type
2900 <code>xs:integer</code>, <code>xs:decimal</code>,
2901-<code>xs:float</code> or <code>xs:double</code>. See <a href="#func-signatures">
2902- <b>1.4 Function signatures and
2903-descriptions</b>
2904- </a>. Operators such as "+" may be overloaded. This
2905+<code>xs:float</code> or <code>xs:double</code>. See <a href=
2906+"#func-signatures"><b>1.4 Function signatures and
2907+descriptions</b></a>. Operators such as "+" may be overloaded. This
2908 document does define some functions with more than one signature
2909 with the same name and different number of parameters. User-defined
2910 functions with more than one signature with the same name and
2911 different number of parameters are also supported.</p>
2912- </div>
2913- <div class="div2">
2914- <h3>
2915- <a name="func-signatures" id="func-signatures"/>1.4 Function
2916+</div>
2917+<div class="div2">
2918+<h3><a name="func-signatures" id="func-signatures"></a>1.4 Function
2919 signatures and descriptions</h3>
2920- <p>Each function is defined by specifying its signature, a
2921+<p>Each function is defined by specifying its signature, a
2922 description of the return type and each of the parameters and its
2923 semantics. For many functions, examples are included to illustrate
2924 their use.</p>
2925- <p>Each function's signature is presented in a form like this:</p>
2926- <div class="exampleInner">
2927- <div class="proto">
2928- <code class="function">fn:function-name</code>(<code class="arg">$parameter-name</code>
2929- <code class="as"> as </code>
2930- <code class="type">parameter-type</code>,
2931-<span class="varargs">...</span>)<code class="as"> as </code>
2932- <code class="return-type">return-type</code>
2933- </div>
2934- </div>
2935- <p>In this notation, <b>function-name</b>, in bold-face, is the
2936+<p>Each function's signature is presented in a form like this:</p>
2937+<div class="exampleInner">
2938+<div class="proto"><code class=
2939+"function">fn:function-name</code>(<code class=
2940+"arg">$parameter-name</code><code class=
2941+"as">&amp;#160;as&amp;#160;</code><code class="type">parameter-type</code>,
2942+<span class="varargs">...</span>)<code class=
2943+"as">&amp;#160;as&amp;#160;</code><code class=
2944+"return-type">return-type</code></div>
2945+</div>
2946+<p>In this notation, <b>function-name</b>, in bold-face, is the
2947 name of the function whose signature is being specified. If the
2948 function takes no parameters, then the name is followed by an empty
2949 parameter list: "<code>()</code>"; otherwise, the name is followed
2950@@ -1408,175 +1664,159 @@
2951 specifies the static type of the parameter, in italics, and a
2952 descriptive, but non-normative, name. If there are two or more
2953 parameter declarations, they are separated by a comma. The
2954-<em>
2955- <code>return-type</code>
2956- </em> , also in italics, specifies the
2957+<em><code>return-type</code></em> , also in italics, specifies the
2958 static type of the value returned by the function. The dynamic type
2959 of the value returned by the function is the same as its static
2960 type or derived from the static type. All parameter types and
2961 return types are specified using the SequenceType notation defined
2962-in <a href="http://www.w3.org/TR/xpath-30/#id-sequencetype-syntax">Section
2963-SequenceType Syntax</a>
2964- <sup>
2965- <small>XP30</small>
2966- </sup>.</p>
2967- <p>One function, <a href="#func-concat">
2968- <code>fn:concat</code>
2969- </a>,
2970+in <a href=
2971+"http://www.w3.org/TR/xpath-30/#id-sequencetype-syntax">Section
2972+2.5.4 SequenceType Syntax</a> <sup><small>XP30</small></sup>.</p>
2973+<p>One function, <a href="#func-concat"><code>fn:concat</code></a>,
2974 has a variable number of arguments (two or more). More strictly,
2975-there is an infinite set of functions having the name <a href="#func-concat">
2976- <code>fn:concat</code>
2977- </a>, with arity ranging from
2978+there is an infinite set of functions having the name <a href=
2979+"#func-concat"><code>fn:concat</code></a>, with arity ranging from
2980 2 to infinity. For this special case, a single function signature
2981 is given, with an ellipsis indicating an indefinite number of
2982 arguments.</p>
2983- <p>In some cases the word " <code>numeric</code> " is used in
2984+<p>In some cases the word " <code>numeric</code> " is used in
2985 function signatures as a shorthand to indicate the four numeric
2986 types: <code>xs:integer</code>, <code>xs:decimal</code>,
2987 <code>xs:float</code> and <code>xs:double</code>. For example, a
2988 function with the signature:</p>
2989- <div class="exampleInner">
2990- <div class="proto">
2991- <code class="function">fn:numeric-function</code>(<code class="arg">$arg</code>
2992- <code class="as"> as </code>
2993- <code class="type">numeric</code>)<code class="as"> as </code>
2994- <code class="return-type">...</code>
2995- </div>
2996- </div>
2997- <p>represents the following four function signatures:</p>
2998- <div class="exampleInner">
2999- <div class="proto">
3000- <code class="function">fn:numeric-function</code>(<code class="arg">$arg</code>
3001- <code class="as"> as </code>
3002- <code class="type">xs:integer</code>)<code class="as"> as </code>
3003- <code class="return-type">...</code>
3004- </div>
3005- </div>
3006- <div class="exampleInner">
3007- <div class="proto">
3008- <code class="function">fn:numeric-function</code>(<code class="arg">$arg</code>
3009- <code class="as"> as </code>
3010- <code class="type">xs:decimal</code>)<code class="as"> as </code>
3011- <code class="return-type">...</code>
3012- </div>
3013- </div>
3014- <div class="exampleInner">
3015- <div class="proto">
3016- <code class="function">fn:numeric-function</code>(<code class="arg">$arg</code>
3017- <code class="as"> as </code>
3018- <code class="type">xs:float</code>)<code class="as"> as </code>
3019- <code class="return-type">...</code>
3020- </div>
3021- </div>
3022- <div class="exampleInner">
3023- <div class="proto">
3024- <code class="function">fn:numeric-function</code>(<code class="arg">$arg</code>
3025- <code class="as"> as </code>
3026- <code class="type">xs:double</code>)<code class="as"> as </code>
3027- <code class="return-type">...</code>
3028- </div>
3029- </div>
3030- <p>For most functions there is an initial paragraph describing what
3031+<div class="exampleInner">
3032+<div class="proto"><code class=
3033+"function">fn:numeric-function</code>(<code class=
3034+"arg">$arg</code><code class="as">&amp;#160;as&amp;#160;</code><code class=
3035+"type">numeric</code>)<code class=
3036+"as">&amp;#160;as&amp;#160;</code><code class=
3037+"return-type">...</code></div>
3038+</div>
3039+<p>represents the following four function signatures:</p>
3040+<div class="exampleInner">
3041+<div class="proto"><code class=
3042+"function">fn:numeric-function</code>(<code class=
3043+"arg">$arg</code><code class="as">&amp;#160;as&amp;#160;</code><code class=
3044+"type">xs:integer</code>)<code class=
3045+"as">&amp;#160;as&amp;#160;</code><code class=
3046+"return-type">...</code></div>
3047+</div>
3048+<div class="exampleInner">
3049+<div class="proto"><code class=
3050+"function">fn:numeric-function</code>(<code class=
3051+"arg">$arg</code><code class="as">&amp;#160;as&amp;#160;</code><code class=
3052+"type">xs:decimal</code>)<code class=
3053+"as">&amp;#160;as&amp;#160;</code><code class=
3054+"return-type">...</code></div>
3055+</div>
3056+<div class="exampleInner">
3057+<div class="proto"><code class=
3058+"function">fn:numeric-function</code>(<code class=
3059+"arg">$arg</code><code class="as">&amp;#160;as&amp;#160;</code><code class=
3060+"type">xs:float</code>)<code class=
3061+"as">&amp;#160;as&amp;#160;</code><code class=
3062+"return-type">...</code></div>
3063+</div>
3064+<div class="exampleInner">
3065+<div class="proto"><code class=
3066+"function">fn:numeric-function</code>(<code class=
3067+"arg">$arg</code><code class="as">&amp;#160;as&amp;#160;</code><code class=
3068+"type">xs:double</code>)<code class=
3069+"as">&amp;#160;as&amp;#160;</code><code class=
3070+"return-type">...</code></div>
3071+</div>
3072+<p>For most functions there is an initial paragraph describing what
3073 the function does followed by semantic rules. These rules are meant
3074 to be followed in the order that they appear in this document.</p>
3075- <p>The function name is a <code>QName</code> as defined in <a href="#xmlschema-2">[XML Schema Part 2: Datatypes Second Edition]</a>
3076-and must adhere to its syntactic conventions. Following <a href="#xpath">[XML Path Language (XPath) Version 1.0]</a>, function
3077-names are composed of English words separated by hyphens,"-". If a
3078-function name contains a <a href="#xmlschema-2">[XML Schema Part 2:
3079-Datatypes Second Edition]</a> datatype name, it may have
3080-intercapitalized spelling and is used in the function name as such.
3081-For example, <a href="#func-timezone-from-dateTime">
3082- <code>fn:timezone-from-dateTime</code>
3083- </a>.</p>
3084- <p>Rules for passing parameters to operators are described in the
3085+<p>The function name is a <code>QName</code> as defined in <a href=
3086+"#xmlschema-2">[XML Schema Part 2: Datatypes Second Edition]</a>
3087+and must adhere to its syntactic conventions. Following the
3088+precedent set by <a href="#xpath">[XML Path Language (XPath)
3089+Version 1.0]</a>, function names are generally composed of English
3090+words separated by hyphens ("-"). If a function name contains a
3091+<a href="#xmlschema-2">[XML Schema Part 2: Datatypes Second
3092+Edition]</a> datatype name, it may have intercapitalized spelling
3093+and is used in the function name as such. For example, <a href=
3094+"#func-timezone-from-dateTime"><code>fn:timezone-from-dateTime</code></a>.</p>
3095+<p>Rules for passing parameters to operators are described in the
3096 relevant sections of <a href="#xquery-30">[XQuery 3.0: An XML Query
3097 Language]</a> and <a href="#xpath-30">[XML Path Language (XPath)
3098 3.0]</a>. For example, the rules for passing parameters to
3099-arithmetic operators are described in <a href="http://www.w3.org/TR/xpath-30/#id-arithmetic">Section Arithmetic
3100-Expressions</a>
3101- <sup>
3102- <small>XP30</small>
3103- </sup>. Specifically, rules
3104-for parameters of type <code>xs:untypedAtomic</code> and the empty
3105-sequence are specified in this section.</p>
3106- <p>As is customary, the parameter type name indicates that the
3107+arithmetic operators are described in <a href=
3108+"http://www.w3.org/TR/xpath-30/#id-arithmetic">Section 3.5
3109+Arithmetic Expressions</a> <sup><small>XP30</small></sup>.
3110+Specifically, rules for parameters of type
3111+<code>xs:untypedAtomic</code> and the empty sequence are specified
3112+in this section.</p>
3113+<p>As is customary, the parameter type name indicates that the
3114 function or operator accepts arguments of that type, or types
3115 derived from it, in that position. This is called <em>subtype
3116-substitution</em> (See <a href="http://www.w3.org/TR/xpath-30/#id-sequencetype-matching">Section
3117-SequenceType Matching</a>
3118- <sup>
3119- <small>XP30</small>
3120- </sup>). In
3121+substitution</em> (See <a href=
3122+"http://www.w3.org/TR/xpath-30/#id-sequencetype-matching">Section
3123+2.5.5 SequenceType Matching</a> <sup><small>XP30</small></sup>). In
3124 addition, numeric type instances and instances of type
3125 <code>xs:anyURI</code> can be promoted to produce an argument of
3126-the required type. (See <a href="http://www.w3.org/TR/xpath-30/#promotion">Section Type
3127-Promotion</a>
3128- <sup>
3129- <small>XP30</small>
3130- </sup>).</p>
3131- <ol class="enumar">
3132- <li>
3133- <p>
3134- <em>Subtype Substitution</em>: A derived type may substitute for
3135+the required type. (See <a href=
3136+"http://www.w3.org/TR/xpath-30/#promotion">Section B.1 Type
3137+Promotion</a> <sup><small>XP30</small></sup>).</p>
3138+<ol class="enumar">
3139+<li>
3140+<p><em>Subtype Substitution</em>: A derived type may substitute for
3141 its base type. In particular, <code>xs:integer</code> may be used
3142 where <code>xs:decimal</code> is expected.</p>
3143- </li>
3144- <li>
3145- <p>
3146- <em>Numeric Type Promotion</em>: <code>xs:decimal</code> may be
3147+</li>
3148+<li>
3149+<p><em>Numeric Type Promotion</em>: <code>xs:decimal</code> may be
3150 promoted to <code>xs:float</code> or <code>xs:double</code>.
3151 Promotion to <code>xs:double</code> should be done directly, not
3152 via <code>xs:float</code>, to avoid loss of precision.</p>
3153- </li>
3154- <li>
3155- <p>
3156- <em>anyURI Type Promotion</em>: A value of type
3157+</li>
3158+<li>
3159+<p><em>anyURI Type Promotion</em>: A value of type
3160 <code>xs:anyURI</code> can be promoted to the type
3161 <code>xs:string</code>.</p>
3162- </li>
3163- </ol>
3164- <p>Some functions accept a single value or the empty sequence as an
3165+</li>
3166+</ol>
3167+<p>Some functions accept a single value or the empty sequence as an
3168 argument and some may return a single value or the empty sequence.
3169 This is indicated in the function signature by following the
3170 parameter or return type name with a question mark:
3171 "<code>?</code>", indicating that either a single value or the
3172 empty sequence must appear. See below.</p>
3173- <div class="exampleInner">
3174- <div class="proto">
3175- <code class="function">fn:function-name</code>(<code class="arg">$parameter-name</code>
3176- <code class="as"> as </code>
3177- <code class="type">parameter-type?</code>)<code class="as"> as </code>
3178- <code class="return-type">return-type?</code>
3179- </div>
3180- </div>
3181- <p>Note that this function signature is different from a signature
3182+<div class="exampleInner">
3183+<div class="proto"><code class=
3184+"function">fn:function-name</code>(<code class=
3185+"arg">$parameter-name</code><code class=
3186+"as">&amp;#160;as&amp;#160;</code><code class=
3187+"type">parameter-type?</code>)<code class=
3188+"as">&amp;#160;as&amp;#160;</code><code class=
3189+"return-type">return-type?</code></div>
3190+</div>
3191+<p>Note that this function signature is different from a signature
3192 in which the parameter is omitted. See, for example, the two
3193-signatures for <a href="#func-string">
3194- <code>fn:string</code>
3195- </a>.
3196+signatures for <a href="#func-string"><code>fn:string</code></a>.
3197 In the first signature, the parameter is omitted and the argument
3198 defaults to the context item, referred to as ".". In the second
3199 signature, the argument must be present but may be the empty
3200 sequence, written as <code>()</code>.</p>
3201- <p>Some functions accept a sequence of zero or more values as an
3202+<p>Some functions accept a sequence of zero or more values as an
3203 argument. This is indicated by following the name of the type of
3204 the items in the sequence with <code>*</code>. The sequence may
3205 contain zero or more items of the named type. For example, the
3206 function below accepts a sequence of <code>xs:double</code> and
3207 returns a <code>xs:double</code> or the empty sequence.</p>
3208- <div class="exampleInner">
3209- <div class="proto">
3210- <code class="function">fn:median</code>(<code class="arg">$arg</code>
3211- <code class="as"> as </code>
3212- <code class="type">xs:double*</code>)<code class="as"> as </code>
3213- <code class="return-type">xs:double?</code>
3214- </div>
3215- </div>
3216- </div>
3217- <div class="div2">
3218- <h3>
3219- <a name="datatypes" id="datatypes"/>1.5 Type system</h3>
3220- <p>The diagrams below show how nodes, function items, primitive
3221+<div class="exampleInner">
3222+<div class="proto"><code class=
3223+"function">fn:median</code>(<code class=
3224+"arg">$arg</code><code class="as">&amp;#160;as&amp;#160;</code><code class=
3225+"type">xs:double*</code>)<code class=
3226+"as">&amp;#160;as&amp;#160;</code><code class=
3227+"return-type">xs:double?</code></div>
3228+</div>
3229+</div>
3230+<div class="div2">
3231+<h3><a name="datatypes" id="datatypes"></a>1.5 Type system</h3>
3232+<p>The diagrams below show how nodes, function items, primitive
3233 simple types, and user defined types fit together into a type
3234 system. This type system comprises two distinct hierarchies that
3235 both include the primitive simple types. In the diagrams,
3236@@ -1587,527 +1827,548 @@
3237 of the other diagrams. Dotted lines represent additional
3238 relationships that follow an evident pattern. The information that
3239 appears in each diagram is recapitulated in tabular form.</p>
3240- <p>The <code>xs:IDREFS</code>, <code>xs:NMTOKENS</code>, and
3241+<p>The <code>xs:IDREFS</code>, <code>xs:NMTOKENS</code>, and
3242 <code>xs:ENTITIES</code> types and the <code>user-defined list and
3243 union types</code> are special types in that these types are lists
3244 or unions rather than types derived by extension or
3245 restriction.</p>
3246- <p>The first diagram and its corresponding table illustrate the
3247+<p>The first diagram and its corresponding table illustrate the
3248 "item" type hierarchy. In XDM, items include node types, function
3249 types, and built-in atomic types.</p>
3250- <img src="XPathTypeHierarchy-1-items.png" alt="Type hierarchy graphic, item hierarchy"/>
3251- <p>In the table, each type whose name is indented is derived from
3252+<div class="note">
3253+<p class="prefix"><b>Note:</b></p>
3254+<p>This diagram fails to reveal that the graph of the subtype
3255+relationship between types is actually a lattice rather than a
3256+hierarchy. This is particularly evident with function types, and
3257+with union types: in both cases, a type may be an immediate subtype
3258+of several other types.</p>
3259+</div>
3260+<img src="XPathTypeHierarchy-1-items.png" alt=
3261+"Type hierarchy graphic, item hierarchy" />
3262+<p>In the table, each type whose name is indented is derived from
3263 the type whose name appears nearest above it with one less level of
3264 indentation.</p>
3265- <table class="hierarchy" summary="Type summary" border="0">
3266- <tbody>
3267- <tr>
3268- <td class="castOther" align="left" valign="middle">item</td>
3269- </tr>
3270- <tr>
3271- <td class="castOther" align="left" valign="middle"/>
3272- <td class="castOther" align="left" valign="middle">
3273+<table class="hierarchy" summary="Type summary" border="0">
3274+<tbody>
3275+<tr>
3276+<td class="castOther" align="left" valign="middle">item</td>
3277+</tr>
3278+<tr>
3279+<td class="castOther" align="left" valign="middle"></td>
3280+<td class="castOther" align="left" valign="middle">
3281 xs:anyAtomicType</td>
3282- </tr>
3283- <tr>
3284- <td class="castOther" align="left" valign="middle"/>
3285- <td class="castOther" align="left" valign="middle">node</td>
3286- </tr>
3287- <tr>
3288- <td class="castOther" align="left" valign="middle"/>
3289- <td class="castOther" align="left" valign="middle"/>
3290- <td class="castOther" align="left" valign="middle">attribute</td>
3291- </tr>
3292- <tr>
3293- <td class="castOther" align="left" valign="middle"/>
3294- <td class="castOther" align="left" valign="middle"/>
3295- <td class="castOther" align="left" valign="middle"/>
3296- <td class="castOther" align="left" valign="middle">user-defined
3297+</tr>
3298+<tr>
3299+<td class="castOther" align="left" valign="middle"></td>
3300+<td class="castOther" align="left" valign="middle">function(*)</td>
3301+</tr>
3302+<tr>
3303+<td class="castOther" align="left" valign="middle"></td>
3304+<td class="castOther" align="left" valign="middle"></td>
3305+<td class="castOther" align="left" valign="middle">
3306+function(item()*) as item()*</td>
3307+</tr>
3308+<tr>
3309+<td class="castOther" align="left" valign="middle"></td>
3310+<td class="castOther" align="left" valign="middle"></td>
3311+<td class="castOther" align="left" valign="middle"></td>
3312+<td class="castOther" align="left" valign="middle">
3313+function(item()*) as item()</td>
3314+</tr>
3315+<tr>
3316+<td class="castOther" align="left" valign="middle"></td>
3317+<td class="castOther" align="left" valign="middle"></td>
3318+<td class="castOther" align="left" valign="middle"></td>
3319+<td class="castOther" align="left" valign="middle">
3320+function(item()*) as item()?</td>
3321+</tr>
3322+<tr>
3323+<td class="castOther" align="left" valign="middle"></td>
3324+<td class="castOther" align="left" valign="middle"></td>
3325+<td class="castOther" align="left" valign="middle">
3326+function(item()*, item()*) as item()*</td>
3327+</tr>
3328+<tr>
3329+<td class="castOther" align="left" valign="middle"></td>
3330+<td class="castOther" align="left" valign="middle">node</td>
3331+</tr>
3332+<tr>
3333+<td class="castOther" align="left" valign="middle"></td>
3334+<td class="castOther" align="left" valign="middle"></td>
3335+<td class="castOther" align="left" valign="middle">attribute</td>
3336+</tr>
3337+<tr>
3338+<td class="castOther" align="left" valign="middle"></td>
3339+<td class="castOther" align="left" valign="middle"></td>
3340+<td class="castOther" align="left" valign="middle"></td>
3341+<td class="castOther" align="left" valign="middle">user-defined
3342 attribute types</td>
3343- </tr>
3344- <tr>
3345- <td class="castOther" align="left" valign="middle"/>
3346- <td class="castOther" align="left" valign="middle"/>
3347- <td class="castOther" align="left" valign="middle">comment</td>
3348- </tr>
3349- <tr>
3350- <td class="castOther" align="left" valign="middle"/>
3351- <td class="castOther" align="left" valign="middle"/>
3352- <td class="castOther" align="left" valign="middle">document</td>
3353- </tr>
3354- <tr>
3355- <td class="castOther" align="left" valign="middle"/>
3356- <td class="castOther" align="left" valign="middle"/>
3357- <td class="castOther" align="left" valign="middle"/>
3358- <td class="castOther" align="left" valign="middle">user-defined
3359+</tr>
3360+<tr>
3361+<td class="castOther" align="left" valign="middle"></td>
3362+<td class="castOther" align="left" valign="middle"></td>
3363+<td class="castOther" align="left" valign="middle">comment</td>
3364+</tr>
3365+<tr>
3366+<td class="castOther" align="left" valign="middle"></td>
3367+<td class="castOther" align="left" valign="middle"></td>
3368+<td class="castOther" align="left" valign="middle">document</td>
3369+</tr>
3370+<tr>
3371+<td class="castOther" align="left" valign="middle"></td>
3372+<td class="castOther" align="left" valign="middle"></td>
3373+<td class="castOther" align="left" valign="middle"></td>
3374+<td class="castOther" align="left" valign="middle">user-defined
3375 document types</td>
3376- </tr>
3377- <tr>
3378- <td class="castOther" align="left" valign="middle"/>
3379- <td class="castOther" align="left" valign="middle"/>
3380- <td class="castOther" align="left" valign="middle">element</td>
3381- </tr>
3382- <tr>
3383- <td class="castOther" align="left" valign="middle"/>
3384- <td class="castOther" align="left" valign="middle"/>
3385- <td class="castOther" align="left" valign="middle"/>
3386- <td class="castOther" align="left" valign="middle">user-defined
3387+</tr>
3388+<tr>
3389+<td class="castOther" align="left" valign="middle"></td>
3390+<td class="castOther" align="left" valign="middle"></td>
3391+<td class="castOther" align="left" valign="middle">element</td>
3392+</tr>
3393+<tr>
3394+<td class="castOther" align="left" valign="middle"></td>
3395+<td class="castOther" align="left" valign="middle"></td>
3396+<td class="castOther" align="left" valign="middle"></td>
3397+<td class="castOther" align="left" valign="middle">user-defined
3398 element types</td>
3399- </tr>
3400- <tr>
3401- <td class="castOther" align="left" valign="middle"/>
3402- <td class="castOther" align="left" valign="middle"/>
3403- <td class="castOther" align="left" valign="middle">
3404+</tr>
3405+<tr>
3406+<td class="castOther" align="left" valign="middle"></td>
3407+<td class="castOther" align="left" valign="middle"></td>
3408+<td class="castOther" align="left" valign="middle">namespace</td>
3409+</tr>
3410+<tr>
3411+<td class="castOther" align="left" valign="middle"></td>
3412+<td class="castOther" align="left" valign="middle"></td>
3413+<td class="castOther" align="left" valign="middle">
3414 processing-instruction</td>
3415- </tr>
3416- <tr>
3417- <td class="castOther" align="left" valign="middle"/>
3418- <td class="castOther" align="left" valign="middle"/>
3419- <td class="castOther" align="left" valign="middle">text</td>
3420- </tr>
3421- </tbody>
3422- </table>
3423- <p>The next diagram and table illustrate the "any type" type
3424+</tr>
3425+<tr>
3426+<td class="castOther" align="left" valign="middle"></td>
3427+<td class="castOther" align="left" valign="middle"></td>
3428+<td class="castOther" align="left" valign="middle">text</td>
3429+</tr>
3430+</tbody>
3431+</table>
3432+<p>The next diagram and table illustrate the "any type" type
3433 hierarchy, in which all types are derived from distinguished type
3434 <code>xs:anyType</code>.</p>
3435- <img src="XPathTypeHierarchy-2-anyTypes.png" alt="Type hierarchy graphic, anyType hierarchy"/>
3436- <p>In the table, each type whose name is indented is derived from
3437+<img src="XPathTypeHierarchy-2-anyTypes.png" alt=
3438+"Type hierarchy graphic, anyType hierarchy" />
3439+<p>In the table, each type whose name is indented is derived from
3440 the type whose name appears nearest above it with one less level of
3441 indentation.</p>
3442- <table class="hierarchy" summary="Type summary" border="0">
3443- <tbody>
3444- <tr>
3445- <td class="castOther" align="left" valign="middle">xs:anyType</td>
3446- </tr>
3447- <tr>
3448- <td class="castOther" align="left" valign="middle"/>
3449- <td class="castOther" align="left" valign="middle">user-defined
3450+<table class="hierarchy" summary="Type summary" border="0">
3451+<tbody>
3452+<tr>
3453+<td class="castOther" align="left" valign="middle">xs:anyType</td>
3454+</tr>
3455+<tr>
3456+<td class="castOther" align="left" valign="middle"></td>
3457+<td class="castOther" align="left" valign="middle">user-defined
3458 complex types</td>
3459- </tr>
3460- <tr>
3461- <td class="castOther" align="left" valign="middle"/>
3462- <td class="castOther" align="left" valign="middle">xs:untyped</td>
3463- </tr>
3464- <tr>
3465- <td class="castOther" align="left" valign="middle"/>
3466- <td class="castOther" align="left" valign="middle">
3467+</tr>
3468+<tr>
3469+<td class="castOther" align="left" valign="middle"></td>
3470+<td class="castOther" align="left" valign="middle">xs:untyped</td>
3471+</tr>
3472+<tr>
3473+<td class="castOther" align="left" valign="middle"></td>
3474+<td class="castOther" align="left" valign="middle">
3475 xs:anySimpleType</td>
3476- </tr>
3477- <tr>
3478- <td class="castOther" align="left" valign="middle"/>
3479- <td class="castOther" align="left" valign="middle"/>
3480- <td class="castOther" align="left" valign="middle">user-defined
3481+</tr>
3482+<tr>
3483+<td class="castOther" align="left" valign="middle"></td>
3484+<td class="castOther" align="left" valign="middle"></td>
3485+<td class="castOther" align="left" valign="middle">user-defined
3486 list and union types</td>
3487- </tr>
3488- <tr>
3489- <td class="castOther" align="left" valign="middle"/>
3490- <td class="castOther" align="left" valign="middle"/>
3491- <td class="castOther" align="left" valign="middle">xs:IDREFS</td>
3492- </tr>
3493- <tr>
3494- <td class="castOther" align="left" valign="middle"/>
3495- <td class="castOther" align="left" valign="middle"/>
3496- <td class="castOther" align="left" valign="middle">xs:NMTOKENS</td>
3497- </tr>
3498- <tr>
3499- <td class="castOther" align="left" valign="middle"/>
3500- <td class="castOther" align="left" valign="middle"/>
3501- <td class="castOther" align="left" valign="middle">xs:ENTITIES</td>
3502- </tr>
3503- <tr>
3504- <td class="castOther" align="left" valign="middle"/>
3505- <td class="castOther" align="left" valign="middle"/>
3506- <td class="castOther" align="left" valign="middle">
3507+</tr>
3508+<tr>
3509+<td class="castOther" align="left" valign="middle"></td>
3510+<td class="castOther" align="left" valign="middle"></td>
3511+<td class="castOther" align="left" valign="middle">xs:IDREFS</td>
3512+</tr>
3513+<tr>
3514+<td class="castOther" align="left" valign="middle"></td>
3515+<td class="castOther" align="left" valign="middle"></td>
3516+<td class="castOther" align="left" valign="middle">xs:NMTOKENS</td>
3517+</tr>
3518+<tr>
3519+<td class="castOther" align="left" valign="middle"></td>
3520+<td class="castOther" align="left" valign="middle"></td>
3521+<td class="castOther" align="left" valign="middle">xs:ENTITIES</td>
3522+</tr>
3523+<tr>
3524+<td class="castOther" align="left" valign="middle"></td>
3525+<td class="castOther" align="left" valign="middle"></td>
3526+<td class="castOther" align="left" valign="middle">
3527 xs:anyAtomicType</td>
3528- </tr>
3529- </tbody>
3530- </table>
3531- <p>The final diagram and table show all of the atomic types,
3532+</tr>
3533+</tbody>
3534+</table>
3535+<p>The final diagram and table show all of the atomic types,
3536 including the primitive simple types and the built-in types derived
3537 from the primitive simple types. This includes all the built-in
3538 datatypes defined in <a href="#xmlschema-2">[XML Schema Part 2:
3539 Datatypes Second Edition]</a> as well as the two totally ordered
3540-subtypes of duration defined in <a href="#duration-subtypes">
3541- <b>8.1
3542-Two totally ordered subtypes of duration</b>
3543- </a>.</p>
3544- <img src="XPathTypeHierarchy-3-anyAtomicTypes.png" alt="Type hierarchy graphic, anyAtomicType hierarchy"/>
3545- <p>In the table, each type whose name is indented is derived from
3546+subtypes of duration defined in <a href="#duration-subtypes"><b>8.1
3547+Two totally ordered subtypes of duration</b></a>.</p>
3548+<img src="XPathTypeHierarchy-3-anyAtomicTypes.png" alt=
3549+"Type hierarchy graphic, anyAtomicType hierarchy" />
3550+<p>In the table, each type whose name is indented is derived from
3551 the type whose name appears nearest above it with one less level of
3552 indentation.</p>
3553- <table class="hierarchy" summary="Type summary" border="0">
3554- <tbody>
3555- <tr>
3556- <td class="castOther" align="left" valign="middle">
3557+<table class="hierarchy" summary="Type summary" border="0">
3558+<tbody>
3559+<tr>
3560+<td class="castOther" align="left" valign="middle">
3561 xs:untypedAtomic</td>
3562- </tr>
3563- <tr>
3564- <td class="castOther" align="left" valign="middle">xs:dateTime</td>
3565- </tr>
3566- <tr>
3567- <td class="castOther" align="left" valign="middle"/>
3568- <td class="castOther" align="left" valign="middle">
3569+</tr>
3570+<tr>
3571+<td class="castOther" align="left" valign="middle">xs:dateTime</td>
3572+</tr>
3573+<tr>
3574+<td class="castOther" align="left" valign="middle"></td>
3575+<td class="castOther" align="left" valign="middle">
3576 xs:dateTimeStamp</td>
3577- </tr>
3578- <tr>
3579- <td class="castOther" align="left" valign="middle">xs:date</td>
3580- </tr>
3581- <tr>
3582- <td class="castOther" align="left" valign="middle">xs:time</td>
3583- </tr>
3584- <tr>
3585- <td class="castOther" align="left" valign="middle">xs:duration</td>
3586- </tr>
3587- <tr>
3588- <td class="castOther" align="left" valign="middle"/>
3589- <td class="castOther" align="left" valign="middle">
3590+</tr>
3591+<tr>
3592+<td class="castOther" align="left" valign="middle">xs:date</td>
3593+</tr>
3594+<tr>
3595+<td class="castOther" align="left" valign="middle">xs:time</td>
3596+</tr>
3597+<tr>
3598+<td class="castOther" align="left" valign="middle">xs:duration</td>
3599+</tr>
3600+<tr>
3601+<td class="castOther" align="left" valign="middle"></td>
3602+<td class="castOther" align="left" valign="middle">
3603 xs:yearMonthDuration</td>
3604- </tr>
3605- <tr>
3606- <td class="castOther" align="left" valign="middle"/>
3607- <td class="castOther" align="left" valign="middle">
3608+</tr>
3609+<tr>
3610+<td class="castOther" align="left" valign="middle"></td>
3611+<td class="castOther" align="left" valign="middle">
3612 xs:dayTimeDuration</td>
3613- </tr>
3614- <tr>
3615- <td class="castOther" align="left" valign="middle">xs:float</td>
3616- </tr>
3617- <tr>
3618- <td class="castOther" align="left" valign="middle">xs:double</td>
3619- </tr>
3620- <tr>
3621- <td class="castOther" align="left" valign="middle">
3622-xs:precisionDecimal</td>
3623- </tr>
3624- <tr>
3625- <td class="castOther" align="left" valign="middle">xs:decimal</td>
3626- </tr>
3627- <tr>
3628- <td class="castOther" align="left" valign="middle"/>
3629- <td class="castOther" align="left" valign="middle">xs:integer</td>
3630- </tr>
3631- <tr>
3632- <td class="castOther" align="left" valign="middle"/>
3633- <td class="castOther" align="left" valign="middle"/>
3634- <td class="castOther" align="left" valign="middle">
3635+</tr>
3636+<tr>
3637+<td class="castOther" align="left" valign="middle">xs:float</td>
3638+</tr>
3639+<tr>
3640+<td class="castOther" align="left" valign="middle">xs:double</td>
3641+</tr>
3642+<tr>
3643+<td class="castOther" align="left" valign="middle">xs:decimal</td>
3644+</tr>
3645+<tr>
3646+<td class="castOther" align="left" valign="middle"></td>
3647+<td class="castOther" align="left" valign="middle">xs:integer</td>
3648+</tr>
3649+<tr>
3650+<td class="castOther" align="left" valign="middle"></td>
3651+<td class="castOther" align="left" valign="middle"></td>
3652+<td class="castOther" align="left" valign="middle">
3653 xs:nonPositiveInteger</td>
3654- </tr>
3655- <tr>
3656- <td class="castOther" align="left" valign="middle"/>
3657- <td class="castOther" align="left" valign="middle"/>
3658- <td class="castOther" align="left" valign="middle"/>
3659- <td class="castOther" align="left" valign="middle">
3660+</tr>
3661+<tr>
3662+<td class="castOther" align="left" valign="middle"></td>
3663+<td class="castOther" align="left" valign="middle"></td>
3664+<td class="castOther" align="left" valign="middle"></td>
3665+<td class="castOther" align="left" valign="middle">
3666 xs:negativeInteger</td>
3667- </tr>
3668- <tr>
3669- <td class="castOther" align="left" valign="middle"/>
3670- <td class="castOther" align="left" valign="middle"/>
3671- <td class="castOther" align="left" valign="middle">xs:long</td>
3672- </tr>
3673- <tr>
3674- <td class="castOther" align="left" valign="middle"/>
3675- <td class="castOther" align="left" valign="middle"/>
3676- <td class="castOther" align="left" valign="middle"/>
3677- <td class="castOther" align="left" valign="middle">xs:int</td>
3678- </tr>
3679- <tr>
3680- <td class="castOther" align="left" valign="middle"/>
3681- <td class="castOther" align="left" valign="middle"/>
3682- <td class="castOther" align="left" valign="middle"/>
3683- <td class="castOther" align="left" valign="middle"/>
3684- <td class="castOther" align="left" valign="middle">xs:short</td>
3685- </tr>
3686- <tr>
3687- <td class="castOther" align="left" valign="middle"/>
3688- <td class="castOther" align="left" valign="middle"/>
3689- <td class="castOther" align="left" valign="middle"/>
3690- <td class="castOther" align="left" valign="middle"/>
3691- <td class="castOther" align="left" valign="middle"/>
3692- <td class="castOther" align="left" valign="middle">xs:byte</td>
3693- </tr>
3694- <tr>
3695- <td class="castOther" align="left" valign="middle"/>
3696- <td class="castOther" align="left" valign="middle"/>
3697- <td class="castOther" align="left" valign="middle">
3698+</tr>
3699+<tr>
3700+<td class="castOther" align="left" valign="middle"></td>
3701+<td class="castOther" align="left" valign="middle"></td>
3702+<td class="castOther" align="left" valign="middle">xs:long</td>
3703+</tr>
3704+<tr>
3705+<td class="castOther" align="left" valign="middle"></td>
3706+<td class="castOther" align="left" valign="middle"></td>
3707+<td class="castOther" align="left" valign="middle"></td>
3708+<td class="castOther" align="left" valign="middle">xs:int</td>
3709+</tr>
3710+<tr>
3711+<td class="castOther" align="left" valign="middle"></td>
3712+<td class="castOther" align="left" valign="middle"></td>
3713+<td class="castOther" align="left" valign="middle"></td>
3714+<td class="castOther" align="left" valign="middle"></td>
3715+<td class="castOther" align="left" valign="middle">xs:short</td>
3716+</tr>
3717+<tr>
3718+<td class="castOther" align="left" valign="middle"></td>
3719+<td class="castOther" align="left" valign="middle"></td>
3720+<td class="castOther" align="left" valign="middle"></td>
3721+<td class="castOther" align="left" valign="middle"></td>
3722+<td class="castOther" align="left" valign="middle"></td>
3723+<td class="castOther" align="left" valign="middle">xs:byte</td>
3724+</tr>
3725+<tr>
3726+<td class="castOther" align="left" valign="middle"></td>
3727+<td class="castOther" align="left" valign="middle"></td>
3728+<td class="castOther" align="left" valign="middle">
3729 xs:nonNegativeInteger</td>
3730- </tr>
3731- <tr>
3732- <td class="castOther" align="left" valign="middle"/>
3733- <td class="castOther" align="left" valign="middle"/>
3734- <td class="castOther" align="left" valign="middle"/>
3735- <td class="castOther" align="left" valign="middle">
3736+</tr>
3737+<tr>
3738+<td class="castOther" align="left" valign="middle"></td>
3739+<td class="castOther" align="left" valign="middle"></td>
3740+<td class="castOther" align="left" valign="middle"></td>
3741+<td class="castOther" align="left" valign="middle">
3742 xs:unsignedLong</td>
3743- </tr>
3744- <tr>
3745- <td class="castOther" align="left" valign="middle"/>
3746- <td class="castOther" align="left" valign="middle"/>
3747- <td class="castOther" align="left" valign="middle"/>
3748- <td class="castOther" align="left" valign="middle"/>
3749- <td class="castOther" align="left" valign="middle">
3750+</tr>
3751+<tr>
3752+<td class="castOther" align="left" valign="middle"></td>
3753+<td class="castOther" align="left" valign="middle"></td>
3754+<td class="castOther" align="left" valign="middle"></td>
3755+<td class="castOther" align="left" valign="middle"></td>
3756+<td class="castOther" align="left" valign="middle">
3757 xs:unsignedInt</td>
3758- </tr>
3759- <tr>
3760- <td class="castOther" align="left" valign="middle"/>
3761- <td class="castOther" align="left" valign="middle"/>
3762- <td class="castOther" align="left" valign="middle"/>
3763- <td class="castOther" align="left" valign="middle"/>
3764- <td class="castOther" align="left" valign="middle"/>
3765- <td class="castOther" align="left" valign="middle">
3766+</tr>
3767+<tr>
3768+<td class="castOther" align="left" valign="middle"></td>
3769+<td class="castOther" align="left" valign="middle"></td>
3770+<td class="castOther" align="left" valign="middle"></td>
3771+<td class="castOther" align="left" valign="middle"></td>
3772+<td class="castOther" align="left" valign="middle"></td>
3773+<td class="castOther" align="left" valign="middle">
3774 xs:unsignedShort</td>
3775- </tr>
3776- <tr>
3777- <td class="castOther" align="left" valign="middle"/>
3778- <td class="castOther" align="left" valign="middle"/>
3779- <td class="castOther" align="left" valign="middle"/>
3780- <td class="castOther" align="left" valign="middle"/>
3781- <td class="castOther" align="left" valign="middle"/>
3782- <td class="castOther" align="left" valign="middle"/>
3783- <td class="castOther" align="left" valign="middle">
3784+</tr>
3785+<tr>
3786+<td class="castOther" align="left" valign="middle"></td>
3787+<td class="castOther" align="left" valign="middle"></td>
3788+<td class="castOther" align="left" valign="middle"></td>
3789+<td class="castOther" align="left" valign="middle"></td>
3790+<td class="castOther" align="left" valign="middle"></td>
3791+<td class="castOther" align="left" valign="middle"></td>
3792+<td class="castOther" align="left" valign="middle">
3793 xs:unsignedByte</td>
3794- </tr>
3795- <tr>
3796- <td class="castOther" align="left" valign="middle"/>
3797- <td class="castOther" align="left" valign="middle"/>
3798- <td class="castOther" align="left" valign="middle"/>
3799- <td class="castOther" align="left" valign="middle">
3800+</tr>
3801+<tr>
3802+<td class="castOther" align="left" valign="middle"></td>
3803+<td class="castOther" align="left" valign="middle"></td>
3804+<td class="castOther" align="left" valign="middle"></td>
3805+<td class="castOther" align="left" valign="middle">
3806 xs:positiveInteger</td>
3807- </tr>
3808- <tr>
3809- <td class="castOther" align="left" valign="middle">
3810+</tr>
3811+<tr>
3812+<td class="castOther" align="left" valign="middle">
3813 xs:gYearMonth</td>
3814- </tr>
3815- <tr>
3816- <td class="castOther" align="left" valign="middle">xs:gYear</td>
3817- </tr>
3818- <tr>
3819- <td class="castOther" align="left" valign="middle">
3820+</tr>
3821+<tr>
3822+<td class="castOther" align="left" valign="middle">xs:gYear</td>
3823+</tr>
3824+<tr>
3825+<td class="castOther" align="left" valign="middle">
3826 xs:gMonthDay</td>
3827- </tr>
3828- <tr>
3829- <td class="castOther" align="left" valign="middle">xs:gDay</td>
3830- </tr>
3831- <tr>
3832- <td class="castOther" align="left" valign="middle">xs:gMonth</td>
3833- </tr>
3834- <tr>
3835- <td class="castOther" align="left" valign="middle">xs:string</td>
3836- </tr>
3837- <tr>
3838- <td class="castOther" align="left" valign="middle"/>
3839- <td class="castOther" align="left" valign="middle">
3840+</tr>
3841+<tr>
3842+<td class="castOther" align="left" valign="middle">xs:gDay</td>
3843+</tr>
3844+<tr>
3845+<td class="castOther" align="left" valign="middle">xs:gMonth</td>
3846+</tr>
3847+<tr>
3848+<td class="castOther" align="left" valign="middle">xs:string</td>
3849+</tr>
3850+<tr>
3851+<td class="castOther" align="left" valign="middle"></td>
3852+<td class="castOther" align="left" valign="middle">
3853 xs:normalizedString</td>
3854- </tr>
3855- <tr>
3856- <td class="castOther" align="left" valign="middle"/>
3857- <td class="castOther" align="left" valign="middle"/>
3858- <td class="castOther" align="left" valign="middle">xs:token</td>
3859- </tr>
3860- <tr>
3861- <td class="castOther" align="left" valign="middle"/>
3862- <td class="castOther" align="left" valign="middle"/>
3863- <td class="castOther" align="left" valign="middle"/>
3864- <td class="castOther" align="left" valign="middle">xs:language</td>
3865- </tr>
3866- <tr>
3867- <td class="castOther" align="left" valign="middle"/>
3868- <td class="castOther" align="left" valign="middle"/>
3869- <td class="castOther" align="left" valign="middle"/>
3870- <td class="castOther" align="left" valign="middle">xs:NMTOKEN</td>
3871- </tr>
3872- <tr>
3873- <td class="castOther" align="left" valign="middle"/>
3874- <td class="castOther" align="left" valign="middle"/>
3875- <td class="castOther" align="left" valign="middle"/>
3876- <td class="castOther" align="left" valign="middle">xs:Name</td>
3877- </tr>
3878- <tr>
3879- <td class="castOther" align="left" valign="middle"/>
3880- <td class="castOther" align="left" valign="middle"/>
3881- <td class="castOther" align="left" valign="middle"/>
3882- <td class="castOther" align="left" valign="middle"/>
3883- <td class="castOther" align="left" valign="middle">xs:NCName</td>
3884- </tr>
3885- <tr>
3886- <td class="castOther" align="left" valign="middle"/>
3887- <td class="castOther" align="left" valign="middle"/>
3888- <td class="castOther" align="left" valign="middle"/>
3889- <td class="castOther" align="left" valign="middle"/>
3890- <td class="castOther" align="left" valign="middle"/>
3891- <td class="castOther" align="left" valign="middle">xs:ID</td>
3892- </tr>
3893- <tr>
3894- <td class="castOther" align="left" valign="middle"/>
3895- <td class="castOther" align="left" valign="middle"/>
3896- <td class="castOther" align="left" valign="middle"/>
3897- <td class="castOther" align="left" valign="middle"/>
3898- <td class="castOther" align="left" valign="middle"/>
3899- <td class="castOther" align="left" valign="middle">xs:IDREF</td>
3900- </tr>
3901- <tr>
3902- <td class="castOther" align="left" valign="middle"/>
3903- <td class="castOther" align="left" valign="middle"/>
3904- <td class="castOther" align="left" valign="middle"/>
3905- <td class="castOther" align="left" valign="middle"/>
3906- <td class="castOther" align="left" valign="middle"/>
3907- <td class="castOther" align="left" valign="middle">xs:ENTITY</td>
3908- </tr>
3909- <tr>
3910- <td class="castOther" align="left" valign="middle">xs:boolean</td>
3911- </tr>
3912- <tr>
3913- <td class="castOther" align="left" valign="middle">
3914+</tr>
3915+<tr>
3916+<td class="castOther" align="left" valign="middle"></td>
3917+<td class="castOther" align="left" valign="middle"></td>
3918+<td class="castOther" align="left" valign="middle">xs:token</td>
3919+</tr>
3920+<tr>
3921+<td class="castOther" align="left" valign="middle"></td>
3922+<td class="castOther" align="left" valign="middle"></td>
3923+<td class="castOther" align="left" valign="middle"></td>
3924+<td class="castOther" align="left" valign="middle">xs:language</td>
3925+</tr>
3926+<tr>
3927+<td class="castOther" align="left" valign="middle"></td>
3928+<td class="castOther" align="left" valign="middle"></td>
3929+<td class="castOther" align="left" valign="middle"></td>
3930+<td class="castOther" align="left" valign="middle">xs:NMTOKEN</td>
3931+</tr>
3932+<tr>
3933+<td class="castOther" align="left" valign="middle"></td>
3934+<td class="castOther" align="left" valign="middle"></td>
3935+<td class="castOther" align="left" valign="middle"></td>
3936+<td class="castOther" align="left" valign="middle">xs:Name</td>
3937+</tr>
3938+<tr>
3939+<td class="castOther" align="left" valign="middle"></td>
3940+<td class="castOther" align="left" valign="middle"></td>
3941+<td class="castOther" align="left" valign="middle"></td>
3942+<td class="castOther" align="left" valign="middle"></td>
3943+<td class="castOther" align="left" valign="middle">xs:NCName</td>
3944+</tr>
3945+<tr>
3946+<td class="castOther" align="left" valign="middle"></td>
3947+<td class="castOther" align="left" valign="middle"></td>
3948+<td class="castOther" align="left" valign="middle"></td>
3949+<td class="castOther" align="left" valign="middle"></td>
3950+<td class="castOther" align="left" valign="middle"></td>
3951+<td class="castOther" align="left" valign="middle">xs:ID</td>
3952+</tr>
3953+<tr>
3954+<td class="castOther" align="left" valign="middle"></td>
3955+<td class="castOther" align="left" valign="middle"></td>
3956+<td class="castOther" align="left" valign="middle"></td>
3957+<td class="castOther" align="left" valign="middle"></td>
3958+<td class="castOther" align="left" valign="middle"></td>
3959+<td class="castOther" align="left" valign="middle">xs:IDREF</td>
3960+</tr>
3961+<tr>
3962+<td class="castOther" align="left" valign="middle"></td>
3963+<td class="castOther" align="left" valign="middle"></td>
3964+<td class="castOther" align="left" valign="middle"></td>
3965+<td class="castOther" align="left" valign="middle"></td>
3966+<td class="castOther" align="left" valign="middle"></td>
3967+<td class="castOther" align="left" valign="middle">xs:ENTITY</td>
3968+</tr>
3969+<tr>
3970+<td class="castOther" align="left" valign="middle">xs:boolean</td>
3971+</tr>
3972+<tr>
3973+<td class="castOther" align="left" valign="middle">
3974 xs:base64Binary</td>
3975- </tr>
3976- <tr>
3977- <td class="castOther" align="left" valign="middle">
3978+</tr>
3979+<tr>
3980+<td class="castOther" align="left" valign="middle">
3981 xs:hexBinary</td>
3982- </tr>
3983- <tr>
3984- <td class="castOther" align="left" valign="middle">xs:anyURI</td>
3985- </tr>
3986- <tr>
3987- <td class="castOther" align="left" valign="middle">xs:QName</td>
3988- </tr>
3989- <tr>
3990- <td class="castOther" align="left" valign="middle">xs:NOTATION</td>
3991- </tr>
3992- </tbody>
3993- </table>
3994- </div>
3995- <div class="div2">
3996- <h3>
3997- <a name="terminology" id="terminology"/>1.6 Terminology</h3>
3998- <p>The terminology used to describe the functions and operators on
3999+</tr>
4000+<tr>
4001+<td class="castOther" align="left" valign="middle">xs:anyURI</td>
4002+</tr>
4003+<tr>
4004+<td class="castOther" align="left" valign="middle">xs:QName</td>
4005+</tr>
4006+<tr>
4007+<td class="castOther" align="left" valign="middle">xs:NOTATION</td>
4008+</tr>
4009+</tbody>
4010+</table>
4011+<p>When XSD 1.1 is supported, one additional type needs to be added
4012+to these diagrams: the type <code>xs:dateTimeStamp</code>, which is
4013+derived from <code>xs:dateTime</code>.</p>
4014+</div>
4015+<div class="div2">
4016+<h3><a name="terminology" id="terminology"></a>1.6 Terminology</h3>
4017+<p>The terminology used to describe the functions and operators on
4018 <a href="#xmlschema-2">[XML Schema Part 2: Datatypes Second
4019 Edition]</a> is defined in the body of this specification. The
4020 terms defined in this section are used in building those
4021 definitions</p>
4022- <div class="div3">
4023- <h4>
4024- <a name="character-terminology" id="character-terminology"/>1.6.1 Strings, characters, and
4025+<div class="div3">
4026+<h4><a name="character-terminology" id=
4027+"character-terminology"></a>1.6.1 Strings, characters, and
4028 codepoints</h4>
4029- <p>This document uses the terms <code>string</code>,
4030+<p>This document uses the terms <code>string</code>,
4031 <code>character</code>, and <code>codepoint</code> with the
4032 following meanings:</p>
4033- <p>
4034- <span class="termdef">
4035- <a name="character" id="character"/>[Definition] A <b>character</b> is an instance of
4036-the <a href="http://www.w3.org/TR/REC-xml/#NT-Char">Char</a>
4037- <sup>
4038- <small>XML</small>
4039- </sup>
4040-production of <a href="#REC-xml">[REC-xml]</a>.</span>
4041- </p>
4042- <div class="note">
4043- <p class="prefix">
4044- <b>Note:</b>
4045- </p>
4046- <p>This definition excludes Unicode characters in the surrogate
4047+<p><span class="termdef"><a name="character" id=
4048+"character"></a>[Definition] A <b>character</b> is an instance of
4049+the <a href=
4050+"http://www.w3.org/TR/REC-xml/#NT-Char">Char</a><sup><small>XML</small></sup>
4051+production of <a href="#REC-xml">[REC-xml]</a>.</span></p>
4052+<div class="note">
4053+<p class="prefix"><b>Note:</b></p>
4054+<p>This definition excludes Unicode characters in the surrogate
4055 blocks as well as xFFFE and xFFFF, while including characters with
4056 codepoints greater than xFFFF which some programming languages
4057 treat as two characters. The valid characters are defined by their
4058 codepoints, and include some whose codepoints have not been
4059 assigned by the Unicode consortium to any character.</p>
4060- </div>
4061- <p>
4062- <span class="termdef">
4063- <a name="string" id="string"/>[Definition] A <b>string</b> is a sequence of zero or
4064-more <a title="character" class="termref" href="#character">
4065- <span class="arrow">·</span>characters<span class="arrow">·</span>
4066- </a>, or equivalently, a value in the value space
4067-of the <code>xs:string</code> data type.</span>
4068- </p>
4069- <p>
4070- <span class="termdef">
4071- <a name="codepoint" id="codepoint"/>[Definition] A <b>codepoint</b> is a non-negative
4072-integer assigned to a <a title="character" class="termref" href="#character">
4073- <span class="arrow">·</span>character<span class="arrow">·</span>
4074- </a> by the Unicode consortium, or reserved for
4075-future assignment to a character.</span>
4076- </p>
4077- <div class="note">
4078- <p class="prefix">
4079- <b>Note:</b>
4080- </p>
4081- <p>The set of codepoints is thus wider than the set of
4082+</div>
4083+<p><span class="termdef"><a name="string" id=
4084+"string"></a>[Definition] A <b>string</b> is a sequence of zero or
4085+more <a title="character" class="termref" href=
4086+"#character"><span class="arrow">·</span>characters<span class=
4087+"arrow">·</span></a>, or equivalently, a value in the value space
4088+of the <code>xs:string</code> data type.</span></p>
4089+<p><span class="termdef"><a name="codepoint" id=
4090+"codepoint"></a>[Definition] A <b>codepoint</b> is a non-negative
4091+integer assigned to a <a title="character" class="termref" href=
4092+"#character"><span class="arrow">·</span>character<span class=
4093+"arrow">·</span></a> by the Unicode consortium, or reserved for
4094+future assignment to a character.</span></p>
4095+<div class="note">
4096+<p class="prefix"><b>Note:</b></p>
4097+<p>The set of codepoints is thus wider than the set of
4098 characters.</p>
4099- <p>This specification spells "codepoint" as one word; the Unicode
4100+<p>This specification spells "codepoint" as one word; the Unicode
4101 specification spells it as "code point". Equivalent terms found in
4102 other specifications are "character number" or "code position". See
4103 <a href="#charmod">[Character Model for the World Wide Web 1.0:
4104-Fundamentals]</a>
4105- </p>
4106- </div>
4107- <p>Because these terms appear so frequently, they are hyperlinked
4108+Fundamentals]</a></p>
4109+</div>
4110+<p>Because these terms appear so frequently, they are hyperlinked
4111 to the definition only when there is a particular desire to draw
4112 the reader's attention to the definition; the absence of a
4113 hyperlink does not mean that the term is being used in some other
4114 sense.</p>
4115- <p>It is <a title="implementation-defined" class="termref" href="#implementation-defined">
4116- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
4117- </a> which version of <a href="#Unicode4">[The
4118+<p>It is <a title="implementation-defined" class="termref" href=
4119+"#implementation-defined"><span class=
4120+"arrow">·</span>implementation-defined<span class=
4121+"arrow">·</span></a> which version of <a href="#Unicode">[The
4122 Unicode Standard]</a> is supported, but it is recommended that the
4123 most recent version of Unicode be used.</p>
4124- <p>Unless explicitly stated, the <code>xs:string</code> values
4125+<p>Unless explicitly stated, the <code>xs:string</code> values
4126 returned by the functions in this document are not normalized in
4127 the sense of <a href="#charmod">[Character Model for the World Wide
4128 Web 1.0: Fundamentals]</a>.</p>
4129- <div class="note">
4130- <p class="prefix">
4131- <b>Notes:</b>
4132- </p>
4133- <p>In functions that involve character counting such as <a href="#func-substring">
4134- <code>fn:substring</code>
4135- </a>, <a href="#func-string-length">
4136- <code>fn:string-length</code>
4137- </a> and
4138-<a href="#func-translate">
4139- <code>fn:translate</code>
4140- </a>, what is
4141-counted is the number of XML <a title="character" class="termref" href="#character">
4142- <span class="arrow">·</span>characters<span class="arrow">·</span>
4143- </a> in the
4144+<div class="note">
4145+<p class="prefix"><b>Notes:</b></p>
4146+<p>In functions that involve character counting such as <a href=
4147+"#func-substring"><code>fn:substring</code></a>, <a href=
4148+"#func-string-length"><code>fn:string-length</code></a> and
4149+<a href="#func-translate"><code>fn:translate</code></a>, what is
4150+counted is the number of XML <a title="character" class="termref"
4151+href="#character"><span class=
4152+"arrow">·</span>characters<span class="arrow">·</span></a> in the
4153 string (or equivalently, the number of Unicode codepoints). Some
4154 implementations may represent a codepoint above xFFFF using two
4155 16-bit values known as a surrogate pair. A surrogate pair counts as
4156 one character, not two.</p>
4157- </div>
4158- </div>
4159- <div class="div3">
4160- <h4>
4161- <a name="namespace-terminology" id="namespace-terminology"/>1.6.2 Namespaces and URIs</h4>
4162- <p>This document uses the phrase "namespace URI" to identify the
4163+</div>
4164+</div>
4165+<div class="div3">
4166+<h4><a name="namespace-terminology" id=
4167+"namespace-terminology"></a>1.6.2 Namespaces and URIs</h4>
4168+<p>This document uses the phrase "namespace URI" to identify the
4169 concept identified in <a href="#REC-xml-names">[Namespaces in
4170 XML]</a> as "namespace name", and the phrase "local name" to
4171-identify the concept identified in <a href="#REC-xml-names">[Namespaces in XML]</a> as "local part".</p>
4172- <p>It also uses the term "expanded-QName" defined below.</p>
4173- <p>
4174- <span class="termdef">
4175- <a name="expanded-name" id="expanded-name"/>[Definition] An <b>expanded-QName</b> is a pair
4176+identify the concept identified in <a href=
4177+"#REC-xml-names">[Namespaces in XML]</a> as "local part".</p>
4178+<p>It also uses the term "expanded-QName" defined below.</p>
4179+<p><span class="termdef"><a name="expanded-name" id=
4180+"expanded-name"></a>[Definition] An <b>expanded-QName</b> is a pair
4181 of values consisting of a namespace URI and a local name. They
4182 belong to the value space of the <a href="#xmlschema-2">[XML Schema
4183 Part 2: Datatypes Second Edition]</a> datatype
4184 <code>xs:QName</code>. When this document refers to
4185 <code>xs:QName</code> we always mean the value space, i.e. a
4186 namespace URI, local name pair (and not the lexical space referring
4187-to constructs of the form prefix:local-name).</span>
4188- </p>
4189- <p>The term URI is used as follows:</p>
4190- <p>
4191- <span class="termdef">
4192- <a name="dt-uri" id="dt-uri"/>[Definition] Within this specification, the term
4193+to constructs of the form prefix:local-name).</span></p>
4194+<p>The term URI is used as follows:</p>
4195+<p><span class="termdef"><a name="dt-uri" id=
4196+"dt-uri"></a>[Definition] Within this specification, the term
4197 <b>URI</b> refers to Universal Resource Identifiers as defined in
4198-<a href="#rfc3986">[RFC 3986]</a> and extended in <a href="#rfc3987">[RFC 3987]</a> with a new name <b>IRI</b>. The term
4199+<a href="#rfc3986">[RFC 3986]</a> and extended in <a href=
4200+"#rfc3987">[RFC 3987]</a> with a new name <b>IRI</b>. The term
4201 <b>URI Reference</b>, unless otherwise stated, refers to a string
4202 in the lexical space of the <code>xs:anyURI</code> datatype as
4203 defined in <a href="#xmlschema-2">[XML Schema Part 2: Datatypes
4204-Second Edition]</a>.</span>
4205- </p>
4206- <div class="note">
4207- <p class="prefix">
4208- <b>Note:</b>
4209- </p>
4210- <p>Note that this means, in practice, that where this specification
4211-requires a "URI Reference", an IRI as defined in <a href="#rfc3987">[RFC 3987]</a> will be accepted, provided that other
4212+Second Edition]</a>.</span></p>
4213+<div class="note">
4214+<p class="prefix"><b>Note:</b></p>
4215+<p>Note that this means, in practice, that where this specification
4216+requires a "URI Reference", an IRI as defined in <a href=
4217+"#rfc3987">[RFC 3987]</a> will be accepted, provided that other
4218 relevant specifications also permit an IRI. The term URI has been
4219 retained in preference to IRI to avoid introducing new names for
4220 concepts such as "Base URI" that are defined or referenced across
4221@@ -2115,204 +2376,183 @@
4222 definition of <code>xs:anyURI</code> is a wider definition than the
4223 definition in <a href="#rfc3987">[RFC 3987]</a>; for example it
4224 does not require non-ASCII characters to be escaped.</p>
4225- </div>
4226- </div>
4227- <div class="div3">
4228- <h4>
4229- <a name="conformance-terminology" id="conformance-terminology"/>1.6.3 Conformance terminology</h4>
4230- <dl>
4231- <dt class="label">
4232- <span class="termdef">
4233- <a name="compatibility" id="compatibility"/>[Definition] <b>for
4234-compatibility</b>
4235- </span>
4236- </dt>
4237- <dd>
4238- <p>A feature of this specification included to ensure that
4239+</div>
4240+</div>
4241+<div class="div3">
4242+<h4><a name="conformance-terminology" id=
4243+"conformance-terminology"></a>1.6.3 Conformance terminology</h4>
4244+<dl>
4245+<dt class="label"><span class="termdef"><a name="compatibility" id=
4246+"compatibility"></a>[Definition] <b>for
4247+compatibility</b></span></dt>
4248+<dd>
4249+<p>A feature of this specification included to ensure that
4250 implementations that use this feature remain compatible with
4251-<a href="#xpath">[XML Path Language (XPath) Version 1.0]</a>
4252- </p>
4253- </dd>
4254- <dt class="label">
4255- <span class="termdef">
4256- <a name="may" id="may"/>[Definition] <b>may</b>
4257- </span>
4258- </dt>
4259- <dd>
4260- <p>Conforming documents and processors are permitted to, but need
4261+<a href="#xpath">[XML Path Language (XPath) Version 1.0]</a></p>
4262+</dd>
4263+<dt class="label"><span class="termdef"><a name="may" id=
4264+"may"></a>[Definition] <b>may</b></span></dt>
4265+<dd>
4266+<p>Conforming documents and processors are permitted to, but need
4267 not, behave as described.</p>
4268- </dd>
4269- <dt class="label">
4270- <span class="termdef">
4271- <a name="must" id="must"/>[Definition] <b>must</b>
4272- </span>
4273- </dt>
4274- <dd>
4275- <p>Conforming documents and processors are required to behave as
4276+</dd>
4277+<dt class="label"><span class="termdef"><a name="must" id=
4278+"must"></a>[Definition] <b>must</b></span></dt>
4279+<dd>
4280+<p>Conforming documents and processors are required to behave as
4281 described; otherwise, they are either non-conformant or else in
4282 error.</p>
4283- </dd>
4284- <dt class="label">
4285- <span class="termdef">
4286- <a name="implementation-defined" id="implementation-defined"/>[Definition]
4287-<b>implementation-defined</b>
4288- </span>
4289- </dt>
4290- <dd>
4291- <p>Possibly differing between implementations, but specified and
4292+</dd>
4293+<dt class="label"><span class="termdef"><a name=
4294+"implementation-defined" id=
4295+"implementation-defined"></a>[Definition]
4296+<b>implementation-defined</b></span></dt>
4297+<dd>
4298+<p>Possibly differing between implementations, but specified and
4299 documented by the implementor for each particular
4300 implementation.</p>
4301- </dd>
4302- <dt class="label">
4303- <span class="termdef">
4304- <a name="implementation-dependent" id="implementation-dependent"/>[Definition]
4305-<b>implementation-dependent</b>
4306- </span>
4307- </dt>
4308- <dd>
4309- <p>Possibly differing between implementations, but not specified by
4310+</dd>
4311+<dt class="label"><span class="termdef"><a name=
4312+"implementation-dependent" id=
4313+"implementation-dependent"></a>[Definition]
4314+<b>implementation-dependent</b></span></dt>
4315+<dd>
4316+<p>Possibly differing between implementations, but not specified by
4317 this or other W3C specification, and not required to be specified
4318 by the implementor for any particular implementation.</p>
4319- </dd>
4320- </dl>
4321- </div>
4322- <div class="div3">
4323- <h4>
4324- <a name="properties-of-functions" id="properties-of-functions"/>1.6.4 Properties of functions</h4>
4325- <p>This section is concerned with the question of whether two calls
4326+</dd>
4327+</dl>
4328+</div>
4329+<div class="div3">
4330+<h4><a name="properties-of-functions" id=
4331+"properties-of-functions"></a>1.6.4 Properties of functions</h4>
4332+<p>This section is concerned with the question of whether two calls
4333 on a function, with the same arguments, may produce different
4334 results.</p>
4335- <p>
4336- <span class="termdef">
4337- <a name="execution-scope" id="execution-scope"/>[Definition] Two function calls are said to
4338+<p><span class="termdef"><a name="execution-scope" id=
4339+"execution-scope"></a>[Definition] Two function calls are said to
4340 be within the same <b>execution scope</b> if the host environment
4341 defines them as such. In XSLT, any two calls executed during the
4342 same transformation are in the same execution scope. In XQuery, any
4343 two calls executed during the evaluation of a top-level expression
4344 are in the same execution scope. In other contexts, the execution
4345 scope is specified by the host environment that invokes the
4346-function library.</span>
4347- </p>
4348- <p>The following definition explains more precisely what it means
4349+function library.</span></p>
4350+<p>The following definition explains more precisely what it means
4351 for two function calls to return the same result:</p>
4352- <p>
4353- <span class="termdef">
4354- <a name="dt-identical" id="dt-identical"/>[Definition]</span> Two values are defined to be
4355+<p><span class="termdef"><a name="dt-identical" id=
4356+"dt-identical"></a>[Definition]</span> Two values are defined to be
4357 <b>identical</b> if they contain the same number of items and the
4358 items are pairwise identical. Two items are identical if and only
4359 if one of the following conditions applies:</p>
4360- <ul>
4361- <li>
4362- <p>Both items are atomic values, of precisely the same type, and
4363+<ul>
4364+<li>
4365+<p>Both items are atomic values, of precisely the same type, and
4366 the values are equal as defined using the <code>eq</code> operator,
4367 using the Unicode codepoint collation when comparing strings</p>
4368- </li>
4369- <li>
4370- <p>Both items are nodes, and represent the same node</p>
4371- </li>
4372- <li>
4373- <p>Both items are function items, and have the same name (or
4374-absence of a name), arity, function signature, and closure</p>
4375- </li>
4376- </ul>
4377- <p>Some functions produce results that depend not only on their
4378+</li>
4379+<li>
4380+<p>Both items are nodes, and represent the same node</p>
4381+</li>
4382+<li>
4383+<p>Both items are function items, and have the same name (or
4384+absence of a name), arity, function signature, and closure. (Note
4385+that there is no function or operator defined in the specification
4386+that tests whether two function items are identical.)</p>
4387+</li>
4388+</ul>
4389+<p>Some functions produce results that depend not only on their
4390 explicit arguments, but also on the static and dynamic context.</p>
4391- <p>
4392- <span class="termdef">
4393- <a name="dt-context-dependent" id="dt-context-dependent"/>[Definition] A function may have the
4394+<p><span class="termdef"><a name="dt-context-dependent" id=
4395+"dt-context-dependent"></a>[Definition] A function may have the
4396 property of being <b>context-dependent</b>: the result of such a
4397 function depends on the values of properties in the static and
4398 dynamic evaluation context as well as on the actual supplied
4399-arguments (if any).</span>
4400- </p>
4401- <p>Context-dependent functions fall into a number of
4402+arguments (if any).</span></p>
4403+<p><span class="termdef"><a name="dt-context-independent" id=
4404+"dt-context-independent"></a>[Definition] A function that is not
4405+<a title="context-dependent" class="termref" href=
4406+"#dt-context-dependent"><span class=
4407+"arrow">·</span>context-dependent<span class="arrow">·</span></a>
4408+is called <b>context-independent</b>.</span></p>
4409+<p>Functions that are context-dependent cannot be used as literal
4410+function items, nor can they be partially applied. For example,
4411+<code>position#0</code> is not valid as a literal function item,
4412+and <a href="#func-starts-with"><code>fn:starts-with(?, ?,
4413+"http://example.com/collation")</code></a> is not a valid partial
4414+function application. In the latter case this is because, in
4415+theory, the same URI might refer to different collations depending
4416+on the static context in which the collation URI appears. It is
4417+possible to circumvent this problem by writing a user-defined
4418+function as a simple wrapper for a call on <a href=
4419+"#func-starts-with"><code>fn:starts-with</code></a>, and writing a
4420+partial application of this user-defined function. In this way the
4421+static context for the call on <a href=
4422+"#func-starts-with"><code>fn:starts-with</code></a> is made
4423+unambiguous.</p>
4424+<p>Context-dependent functions fall into a number of
4425 categories:</p>
4426- <ol class="enumar">
4427- <li>
4428- <p>The functions <a href="#func-current-date">
4429- <code>fn:current-date</code>
4430- </a>, <a href="#func-current-dateTime">
4431- <code>fn:current-dateTime</code>
4432- </a>,
4433-<a href="#func-current-time">
4434- <code>fn:current-time</code>
4435- </a>,
4436-<a href="#func-implicit-timezone">
4437- <code>fn:implicit-timezone</code>
4438- </a>,
4439-<a href="#func-adjust-date-to-timezone">
4440- <code>fn:adjust-date-to-timezone</code>
4441- </a>,
4442-<a href="#func-adjust-dateTime-to-timezone">
4443- <code>fn:adjust-dateTime-to-timezone</code>
4444- </a>,
4445-and <a href="#func-adjust-time-to-timezone">
4446- <code>fn:adjust-time-to-timezone</code>
4447- </a>
4448+<ol class="enumar">
4449+<li>
4450+<p>The functions <a href=
4451+"#func-current-date"><code>fn:current-date</code></a>, <a href=
4452+"#func-current-dateTime"><code>fn:current-dateTime</code></a>,
4453+<a href="#func-current-time"><code>fn:current-time</code></a>,
4454+<a href=
4455+"#func-implicit-timezone"><code>fn:implicit-timezone</code></a>,
4456+<a href=
4457+"#func-adjust-date-to-timezone"><code>fn:adjust-date-to-timezone</code></a>,
4458+<a href=
4459+"#func-adjust-dateTime-to-timezone"><code>fn:adjust-dateTime-to-timezone</code></a>,
4460+and <a href=
4461+"#func-adjust-time-to-timezone"><code>fn:adjust-time-to-timezone</code></a>
4462 depend on properties of the dynamic context that are fixed within
4463-the <a title="execution scope" class="termref" href="#execution-scope">
4464- <span class="arrow">·</span>execution
4465-scope<span class="arrow">·</span>
4466- </a>. The same applies to a
4467-number of functions in the <code>op:</code> namespace that
4468-manipulate dates and times and that make use of the implicit
4469-timezone. These functions will return the same result if called
4470-repeatedly during a single <a title="execution scope" class="termref" href="#execution-scope">
4471- <span class="arrow">·</span>execution scope<span class="arrow">·</span>
4472- </a>.</p>
4473- </li>
4474- <li>
4475- <p>The functions <a href="#func-position">
4476- <code>fn:position</code>
4477- </a>, <a href="#func-last">
4478- <code>fn:last</code>
4479- </a>, <a href="#func-id">
4480- <code>fn:id</code>
4481- </a>, <a href="#func-idref">
4482- <code>fn:idref</code>
4483- </a>, <a href="#func-element-with-id">
4484- <code>fn:element-with-id</code>
4485- </a>,
4486-<a href="#func-lang">
4487- <code>fn:lang</code>
4488- </a>, <a href="#func-local-name">
4489- <code>fn:local-name</code>
4490- </a>, <a href="#func-name">
4491- <code>fn:name</code>
4492- </a>, <a href="#func-namespace-uri">
4493- <code>fn:namespace-uri</code>
4494- </a>, <a href="#func-normalize-space">
4495- <code>fn:normalize-space</code>
4496- </a>,
4497-<a href="#func-number">
4498- <code>fn:number</code>
4499- </a>, <a href="#func-root">
4500- <code>fn:root</code>
4501- </a>, <a href="#func-string">
4502- <code>fn:string</code>
4503- </a>, and <a href="#func-string-length">
4504- <code>fn:string-length</code>
4505- </a> depend on
4506-the focus. These functions will in general return different results
4507-on different calls if the focus is different.</p>
4508- <p>
4509- <span class="termdef">
4510- <a name="focus-dependent" id="focus-dependent"/>[Definition] A function is
4511+the <a title="execution scope" class="termref" href=
4512+"#execution-scope"><span class="arrow">·</span>execution
4513+scope<span class="arrow">·</span></a>. The same applies to a number
4514+of functions in the <code>op:</code> namespace that manipulate
4515+dates and times and that make use of the implicit timezone. These
4516+functions will return the same result if called repeatedly during a
4517+single <a title="execution scope" class="termref" href=
4518+"#execution-scope"><span class="arrow">·</span>execution
4519+scope<span class="arrow">·</span></a>.</p>
4520+</li>
4521+<li>
4522+<p>A number of functions including <a href=
4523+"#func-base-uri"><code>fn:base-uri#0</code></a>, <a href=
4524+"#func-data"><code>fn:data#0</code></a>, <a href=
4525+"#func-document-uri"><code>fn:document-uri#0</code></a>, <a href=
4526+"#func-position"><code>fn:position</code></a>, <a href=
4527+"#func-last"><code>fn:last</code></a>, <a href=
4528+"#func-id"><code>fn:id#1</code></a>, <a href=
4529+"#func-idref"><code>fn:idref#1</code></a>, <a href=
4530+"#func-element-with-id"><code>fn:element-with-id#1</code></a>,
4531+<a href="#func-lang"><code>fn:lang#1</code></a>, <a href=
4532+"#func-local-name"><code>fn:local-name#0</code></a>, <a href=
4533+"#func-name"><code>fn:name#0</code></a>, <a href=
4534+"#func-namespace-uri"><code>fn:namespace-uri#0</code></a>, <a href=
4535+"#func-normalize-space"><code>fn:normalize-space#0</code></a>,
4536+<a href="#func-number"><code>fn:number#0</code></a>, <a href=
4537+"#func-root"><code>fn:root#0</code></a>, <a href=
4538+"#func-string"><code>fn:string#0</code></a>, <a href=
4539+"#func-string-length"><code>fn:string-length#0</code></a>, and
4540+<a href="#func-path"><code>fn:path#0</code></a> depend on the
4541+focus. These functions will in general return different results on
4542+different calls if the focus is different.</p>
4543+<p><span class="termdef"><a name="dt-focus-dependent" id=
4544+"dt-focus-dependent"></a>[Definition] A function is
4545 <b>focus-dependent</b> if its result depends on the focus (that is,
4546-the context item, position, or size).</span>
4547- </p>
4548- <p>Functions that are <b>focus-dependent</b> cannot be used as
4549-function items. For example the expression <a href="#func-map">
4550- <code>fn:map($sequence, fn:id#1)</code>
4551- </a> is not
4552-allowed, because the function <a href="#func-id">
4553- <code>fn:id</code>
4554- </a> is focus-dependent.</p>
4555- </li>
4556- <li>
4557- <p>The function <a href="#func-default-collation">
4558- <code>fn:default-collation</code>
4559- </a> and
4560+the context item, position, or size).</span></p>
4561+<p><span class="termdef"><a name="dt-focus-independent" id=
4562+"dt-focus-independent"></a>[Definition] A function that is not
4563+<a title="focus-dependent" class="termref" href=
4564+"#dt-focus-dependent"><span class=
4565+"arrow">·</span>focus-dependent<span class="arrow">·</span></a> is
4566+called <b>focus-independent</b></span></p>
4567+</li>
4568+<li>
4569+<p>The function <a href=
4570+"#func-default-collation"><code>fn:default-collation</code></a> and
4571 many string-handling operators and functions depend on the default
4572 collation and the in-scope collations, which are both properties of
4573 the static context. If a particular call of one of these functions
4574@@ -2322,509 +2562,642 @@
4575 two calls on the function appearing in different places in the
4576 source code) may produce different results even if the explicit
4577 arguments are the same.</p>
4578- </li>
4579- <li>
4580- <p>Functions such as <a href="#func-static-base-uri">
4581- <code>fn:static-base-uri</code>
4582- </a>,
4583-<a href="#func-doc">
4584- <code>fn:doc</code>
4585- </a>, and <a href="#func-collection">
4586- <code>fn:collection</code>
4587- </a> depend on other
4588+</li>
4589+<li>
4590+<p>Functions such as <a href=
4591+"#func-static-base-uri"><code>fn:static-base-uri</code></a>,
4592+<a href="#func-doc"><code>fn:doc</code></a>, and <a href=
4593+"#func-collection"><code>fn:collection</code></a> depend on other
4594 aspects of the static context. As with functions that depend on
4595 collations, a single call will produce the same results on each
4596 call if the explicit arguments are the same, but two calls
4597 appearing in different places in the source code may produce
4598 different results.</p>
4599- </li>
4600- </ol>
4601- <p>
4602- <span class="termdef">
4603- <a name="dt-implicit-arguments" id="dt-implicit-arguments"/>[Definition] For a <a title="context-dependent" class="termref" href="#dt-context-dependent">
4604- <span class="arrow">·</span>context-dependent<span class="arrow">·</span>
4605- </a>
4606+</li>
4607+</ol>
4608+<p><span class="termdef"><a name="dt-implicit-arguments" id=
4609+"dt-implicit-arguments"></a>[Definition] For a <a title=
4610+"context-dependent" class="termref" href=
4611+"#dt-context-dependent"><span class=
4612+"arrow">·</span>context-dependent<span class="arrow">·</span></a>
4613 function, the parts of the context on which it depends are referred
4614-to as <b>implicit arguments</b>.</span>
4615- </p>
4616- <p>
4617- <span class="termdef">
4618- <a name="deterministic" id="deterministic"/>[Definition] A function that is guaranteed to
4619-produce <a title="identical" class="termref" href="#dt-identical">
4620- <span class="arrow">·</span>identical<span class="arrow">·</span>
4621- </a> results from repeated calls if the explicit
4622+to as <b>implicit arguments</b>.</span></p>
4623+<p><span class="termdef"><a name="dt-deterministic" id=
4624+"dt-deterministic"></a>[Definition] A function that is guaranteed
4625+to produce <a title="identical" class="termref" href=
4626+"#dt-identical"><span class="arrow">·</span>identical<span class=
4627+"arrow">·</span></a> results from repeated calls if the explicit
4628 and implicit arguments are identical is referred to as
4629-<b>deterministic</b>.</span>
4630- </p>
4631- <p>All functions defined in this specification are <a title="deterministic" class="termref" href="#deterministic">
4632- <span class="arrow">·</span>deterministic<span class="arrow">·</span>
4633- </a>
4634+<b>deterministic</b>.</span></p>
4635+<p><span class="termdef"><a name="dt-nondeterministic" id=
4636+"dt-nondeterministic"></a>[Definition] A function that is not
4637+<a title="deterministic" class="termref" href=
4638+"#dt-deterministic"><span class=
4639+"arrow">·</span>deterministic<span class="arrow">·</span></a> is
4640+referred to as <b>nondeterministic</b>.</span></p>
4641+<p>All functions defined in this specification are <a title=
4642+"deterministic" class="termref" href=
4643+"#dt-deterministic"><span class=
4644+"arrow">·</span>deterministic<span class="arrow">·</span></a>
4645 unless otherwise stated. Exceptions include the following:</p>
4646- <ul>
4647- <li>
4648- <p>Some functions (such as <a href="#func-distinct-values">
4649- <code>fn:distinct-values</code>
4650- </a> and
4651-<a href="#func-unordered">
4652- <code>fn:unordered</code>
4653- </a>) produce
4654-results in an <a title="implementation-defined" class="termref" href="#implementation-defined">
4655- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
4656- </a> or <a title="implementation dependent" class="termref" href="#implementation-dependent">
4657- <span class="arrow">·</span>implementation-dependent<span class="arrow">·</span>
4658- </a>order. In such cases there is no guarantee
4659+<ul>
4660+<li>
4661+<p>Some functions (such as <a href=
4662+"#func-distinct-values"><code>fn:distinct-values</code></a> and
4663+<a href="#func-unordered"><code>fn:unordered</code></a>) produce
4664+results in an <a title="implementation-defined" class="termref"
4665+href="#implementation-defined"><span class=
4666+"arrow">·</span>implementation-defined<span class=
4667+"arrow">·</span></a> or <a title="implementation dependent" class=
4668+"termref" href="#implementation-dependent"><span class=
4669+"arrow">·</span>implementation-dependent<span class=
4670+"arrow">·</span></a> order. In such cases there is no guarantee
4671 that the order of results from different calls will be the same.
4672 These functions are said to be <b>non-deterministic with respect to
4673 ordering</b>.</p>
4674- </li>
4675- <li>
4676- <p>The function <a href="#func-analyze-string">
4677- <code>fn:analyze-string</code>
4678- </a>
4679+</li>
4680+<li>
4681+<p>The function <a href=
4682+"#func-analyze-string"><code>fn:analyze-string</code></a>
4683 constructs an element node to represent its results. There is no
4684 guarantee that repeated calls with the same arguments will return
4685 the same identical node (in the sense of the <code>is</code>
4686 operator). However, if non-identical nodes are returned, their
4687-content will be the same in the sense of the <a href="#func-deep-equal">
4688- <code>fn:deep-equal</code>
4689- </a> function. Such a
4690+content will be the same in the sense of the <a href=
4691+"#func-deep-equal"><code>fn:deep-equal</code></a> function. Such a
4692 function is said to be <b>non-deterministic with respect to node
4693 identity</b>.</p>
4694- </li>
4695- <li>
4696- <p>Some functions (such as <a href="#func-doc">
4697- <code>fn:doc</code>
4698- </a> and <a href="#func-collection">
4699- <code>fn:collection</code>
4700- </a>) create new nodes
4701+</li>
4702+<li>
4703+<p>Some functions (such as <a href=
4704+"#func-doc"><code>fn:doc</code></a> and <a href=
4705+"#func-collection"><code>fn:collection</code></a>) create new nodes
4706 by reading external documents. Such functions are guaranteed to be
4707-<a title="deterministic" class="termref" href="#deterministic">
4708- <span class="arrow">·</span>deterministic<span class="arrow">·</span>
4709- </a>
4710-with the exception that an implementation is allowed to make them
4711+<a title="deterministic" class="termref" href=
4712+"#dt-deterministic"><span class=
4713+"arrow">·</span>deterministic<span class="arrow">·</span></a> with
4714+the exception that an implementation is allowed to make them
4715 non-deterministic as a user option.</p>
4716- </li>
4717- </ul>
4718- <p>Where the results of a function are described as being (to a
4719-greater or lesser extent) <a title="implementation-defined" class="termref" href="#implementation-defined">
4720- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
4721- </a> or <a title="implementation dependent" class="termref" href="#implementation-dependent">
4722- <span class="arrow">·</span>implementation-dependent<span class="arrow">·</span>
4723- </a>, this does not by itself remove the
4724+</li>
4725+</ul>
4726+<p>Where the results of a function are described as being (to a
4727+greater or lesser extent) <a title="implementation-defined" class=
4728+"termref" href="#implementation-defined"><span class=
4729+"arrow">·</span>implementation-defined<span class=
4730+"arrow">·</span></a> or <a title="implementation dependent" class=
4731+"termref" href="#implementation-dependent"><span class=
4732+"arrow">·</span>implementation-dependent<span class=
4733+"arrow">·</span></a>, this does not by itself remove the
4734 requirement that the results should be deterministic: that is, that
4735 repeated calls with the same explicit and implicit arguments
4736 <strong>must</strong> return identical results.</p>
4737- </div>
4738- </div>
4739- </div>
4740- <div class="div1">
4741- <h2>
4742- <a name="accessors" id="accessors"/>2 Accessors</h2>
4743- <p>Accessors and their semantics are described in <a href="#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>.
4744+</div>
4745+</div>
4746+</div>
4747+<div class="div1">
4748+<h2><a name="accessors" id="accessors"></a>2 Accessors</h2>
4749+<p>Accessors and their semantics are described in <a href=
4750+"#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>.
4751 Some of these accessors are exposed to the user through the
4752 functions described below.</p>
4753- <table summary="Function summary" border="1" width="80%">
4754- <col width="25%" span="1"/>
4755- <col width="25%" span="1"/>
4756- <col width="25%" span="1"/>
4757- <col width="25%" span="1"/>
4758- <thead>
4759- <tr>
4760- <th colspan="1">Function</th>
4761- <th colspan="1">Accessor</th>
4762- <th colspan="1">Accepts</th>
4763- <th colspan="1">Returns</th>
4764- </tr>
4765- </thead>
4766- <tbody>
4767- <tr>
4768- <td>
4769- <a href="#func-node-name">
4770- <code>fn:node-name</code>
4771- </a>
4772- </td>
4773- <td>
4774- <code>node-name</code>
4775- </td>
4776- <td>an optional node</td>
4777- <td>zero or one <code>xs:QName</code>
4778- </td>
4779- </tr>
4780- <tr>
4781- <td>
4782- <a href="#func-nilled">
4783- <code>fn:nilled</code>
4784- </a>
4785- </td>
4786- <td>
4787- <code>nilled</code>
4788- </td>
4789- <td>a node</td>
4790- <td>an optional <code>xs:boolean</code>
4791- </td>
4792- </tr>
4793- <tr>
4794- <td>
4795- <a href="#func-string">
4796- <code>fn:string</code>
4797- </a>
4798- </td>
4799- <td>
4800- <code>string-value</code>
4801- </td>
4802- <td>an optional item or no argument</td>
4803- <td>
4804- <code>xs:string</code>
4805- </td>
4806- </tr>
4807- <tr>
4808- <td>
4809- <a href="#func-data">
4810- <code>fn:data</code>
4811- </a>
4812- </td>
4813- <td>
4814- <code>typed-value</code>
4815- </td>
4816- <td>zero or more items</td>
4817- <td>a sequence of atomic values</td>
4818- </tr>
4819- <tr>
4820- <td>
4821- <a href="#func-base-uri">
4822- <code>fn:base-uri</code>
4823- </a>
4824- </td>
4825- <td>
4826- <code>base-uri</code>
4827- </td>
4828- <td>an optional node or no argument</td>
4829- <td>zero or one <code>xs:anyURI</code>
4830- </td>
4831- </tr>
4832- <tr>
4833- <td>
4834- <a href="#func-document-uri">
4835- <code>fn:document-uri</code>
4836- </a>
4837- </td>
4838- <td>
4839- <code>document-uri</code>
4840- </td>
4841- <td>an optional node</td>
4842- <td>zero or one <code>xs:anyURI</code>
4843- </td>
4844- </tr>
4845- </tbody>
4846- </table>
4847- <div class="div2">
4848- <h3>
4849- <a name="func-node-name" id="func-node-name"/>2.1
4850+<table summary="Function summary" border="1" width="80%">
4851+<col width="25%" span="1" />
4852+<col width="25%" span="1" />
4853+<col width="25%" span="1" />
4854+<col width="25%" span="1" />
4855+<thead>
4856+<tr>
4857+<th colspan="1">Function</th>
4858+<th colspan="1">Accessor</th>
4859+<th colspan="1">Accepts</th>
4860+<th colspan="1">Returns</th>
4861+</tr>
4862+</thead>
4863+<tbody>
4864+<tr>
4865+<td><a href="#func-node-name"><code>fn:node-name</code></a></td>
4866+<td><code>node-name</code></td>
4867+<td>an optional node</td>
4868+<td>zero or one <code>xs:QName</code></td>
4869+</tr>
4870+<tr>
4871+<td><a href="#func-nilled"><code>fn:nilled</code></a></td>
4872+<td><code>nilled</code></td>
4873+<td>a node</td>
4874+<td>an optional <code>xs:boolean</code></td>
4875+</tr>
4876+<tr>
4877+<td><a href="#func-string"><code>fn:string</code></a></td>
4878+<td><code>string-value</code></td>
4879+<td>an optional item or no argument</td>
4880+<td><code>xs:string</code></td>
4881+</tr>
4882+<tr>
4883+<td><a href="#func-data"><code>fn:data</code></a></td>
4884+<td><code>typed-value</code></td>
4885+<td>zero or more items</td>
4886+<td>a sequence of atomic values</td>
4887+</tr>
4888+<tr>
4889+<td><a href="#func-base-uri"><code>fn:base-uri</code></a></td>
4890+<td><code>base-uri</code></td>
4891+<td>an optional node or no argument</td>
4892+<td>zero or one <code>xs:anyURI</code></td>
4893+</tr>
4894+<tr>
4895+<td><a href=
4896+"#func-document-uri"><code>fn:document-uri</code></a></td>
4897+<td><code>document-uri</code></td>
4898+<td>an optional node</td>
4899+<td>zero or one <code>xs:anyURI</code></td>
4900+</tr>
4901+</tbody>
4902+</table>
4903+<div class="div2">
4904+<h3><a name="func-node-name" id="func-node-name"></a>2.1
4905 fn:node-name</h3>
4906- <dl>
4907- <dt class="label">Summary</dt>
4908- <dd>
4909- <p>Returns the name of a node, as an <code>xs:QName</code>.</p>
4910- </dd>
4911- <dt class="label">Signatures</dt>
4912- <dd>
4913- <div class="exampleInner">
4914- <div class="proto">
4915- <code class="function">fn:node-name</code>()<code class="as"> as </code>
4916- <code class="return-type">xs:QName?</code>
4917- </div>
4918- </div>
4919- <div class="exampleInner">
4920- <div class="proto">
4921- <code class="function">fn:node-name</code>(<code class="arg">$arg</code>
4922- <code class="as"> as </code>
4923- <code class="type">node()?</code>)<code class="as"> as </code>
4924- <code class="return-type">xs:QName?</code>
4925- </div>
4926- </div>
4927- </dd>
4928- <dt class="label">Rules</dt>
4929- <dd>
4930- <p>If the argument is omitted, it defaults to the context item
4931+<dl>
4932+<dt class="label">Summary</dt>
4933+<dd>
4934+<p>Returns the name of a node, as an <code>xs:QName</code>.</p>
4935+</dd>
4936+<dt class="label">Signatures</dt>
4937+<dd>
4938+<div class="exampleInner">
4939+<div class="proto"><code class=
4940+"function">fn:node-name</code>()<code class=
4941+"as">&amp;#160;as&amp;#160;</code><code class=
4942+"return-type">xs:QName?</code></div>
4943+</div>
4944+<div class="exampleInner">
4945+<div class="proto"><code class=
4946+"function">fn:node-name</code>(<code class=
4947+"arg">$arg</code><code class="as">&amp;#160;as&amp;#160;</code><code class=
4948+"type">node()?</code>)<code class=
4949+"as">&amp;#160;as&amp;#160;</code><code class=
4950+"return-type">xs:QName?</code></div>
4951+</div>
4952+</dd>
4953+<dt class="label">Properties</dt>
4954+<dd>
4955+<p>The zero-argument form of this function is <a title=
4956+"deterministic" class="termref" href=
4957+"#dt-deterministic"><span class=
4958+"arrow">·</span>deterministic<span class="arrow">·</span></a>,
4959+<a title="context-dependent" class="termref" href=
4960+"#dt-context-dependent"><span class=
4961+"arrow">·</span>context-dependent<span class="arrow">·</span></a>,
4962+and <a title="focus-dependent" class="termref" href=
4963+"#dt-focus-dependent"><span class=
4964+"arrow">·</span>focus-dependent<span class=
4965+"arrow">·</span></a>.</p>
4966+<p>The one-argument form of this function is <a title=
4967+"deterministic" class="termref" href=
4968+"#dt-deterministic"><span class=
4969+"arrow">·</span>deterministic<span class="arrow">·</span></a>,
4970+<a title="context-independent" class="termref" href=
4971+"#dt-context-independent"><span class=
4972+"arrow">·</span>context-independent<span class=
4973+"arrow">·</span></a>, and <a title="focus-dependent" class=
4974+"termref" href="#dt-focus-independent"><span class=
4975+"arrow">·</span>focus-independent<span class=
4976+"arrow">·</span></a>.</p>
4977+</dd>
4978+<dt class="label">Rules</dt>
4979+<dd>
4980+<p>If the argument is omitted, it defaults to the context item
4981 (<code>.</code>). The behavior of the function if the argument is
4982 omitted is exactly the same as if the context item had been passed
4983 as the argument.</p>
4984- <p>If <code>$arg</code> is the empty sequence, the empty sequence
4985+<p>If <code>$arg</code> is the empty sequence, the empty sequence
4986 is returned.</p>
4987- <p>Otherwise, the function returns the result of the
4988-<code>dm:node-name</code> accessor as defined in <a href="#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>
4989-(see <a href="http://www.w3.org/TR/xpath-datamodel-30/#dm-node-name">Section
4990-node-name Accessor</a>
4991- <sup>
4992- <small>DM30</small>
4993- </sup>).</p>
4994- </dd>
4995- <dt class="label">Notes</dt>
4996- <dd>
4997- <p>For element and attribute nodes, the name of the node is
4998+<p>Otherwise, the function returns the result of the
4999+<code>dm:node-name</code> accessor as defined in <a href=
5000+"#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches