zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #10409
[Merge] lp:~zorba-coders/zorba/fix_spec_tests into lp:zorba
Sorin Marian Nasoi has proposed merging lp:~zorba-coders/zorba/fix_spec_tests into lp:zorba.
Requested reviews:
Zorba Coders (zorba-coders)
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/fix_spec_tests/+merge/108960
Updated the F&O 1.1 and 3.0 documents used in the comparison of the functions and corrected the util:download-and-write-spec function.
--
The attached diff has been truncated due to its size.
https://code.launchpad.net/~zorba-coders/zorba/fix_spec_tests/+merge/108960
Your team Zorba Coders is requested to review the proposed merge of lp:~zorba-coders/zorba/fix_spec_tests into lp:zorba.
=== modified file 'test/rbkt/Queries/zorba/spec/XQuery_1.0.html'
--- test/rbkt/Queries/zorba/spec/XQuery_1.0.html 2012-05-03 12:31:51 +0000
+++ test/rbkt/Queries/zorba/spec/XQuery_1.0.html 2012-06-06 14:48:22 +0000
@@ -1,4 +1,3 @@
-<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="EN" xml:lang="EN">
<head>
<meta name="generator" content="HTML Tidy for Windows (vers 14 February 2006), see www.w3.org"/>
@@ -6,7 +5,138 @@
<title>XQuery 1.0 and XPath 2.0 Functions and Operators (Second
Edition)</title>
<style type="text/css">
- /**/ 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; } /**/
+/**/
+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;
+ }
+
+/**/
</style>
<link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-REC.css"/>
</head>
@@ -59,10 +189,10 @@
XML</a> and <a href="http://www.w3.org/TR/2010/REC-xpath-functions-20101214/xpath-functions-diff-from-REC20070123.html">Change
markings relative to first edition</a>.</p>
<p class="copyright">
- <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2010 <a href="http://www.w3.org/">
+ <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2010 <a href="http://www.w3.org/">
<acronym title="World Wide Web Consortium">W3C</acronym>
</a>
- <sup>®</sup>
+ <sup>®</sup>
(<a href="http://www.csail.mit.edu/">
<acronym title="Massachusetts Institute of Technology">MIT</acronym>
</a>, <a href="http://www.ercim.eu/">
@@ -895,7 +1025,7 @@
<ul>
<li>
<p>It is <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a> which version of Unicode is supported, but it
is recommended that the most recent version of Unicode be used.</p>
</li>
@@ -1720,8 +1850,8 @@
<dd>
<p>Most of the functions in the core library have the property that
calling the same function twice within an <a title="execution scope" class="termref" href="#execution-scope">
- <span class="arrow">·</span>execution
-scope<span class="arrow">·</span>
+ <span class="arrow">·</span>execution
+scope<span class="arrow">·</span>
</a> with the same arguments
returns the same result: these functions are said to be
<b>stable</b>. This category includes a number of functions such as
@@ -2191,13 +2321,13 @@
be returned as the <code>xs:anyURI</code> NS#LP. The method by
which the <code>xs:anyURI</code> or <code>xs:QName</code> is
returned to the external processing environment is <a title="implementation dependent" class="termref" href="#implementation-dependent">
- <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
</a>.</p>
<p>If an invocation provides <code>$description</code> and
<code>$error-object</code>, then these values may also be returned
to the external processing environment. The method by which these
values are provided to the external environment is <a title="implementation dependent" class="termref" href="#implementation-dependent">
- <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
</a>.</p>
<div class="note">
<p class="prefix">
@@ -2222,7 +2352,7 @@
constructed by:</p>
<div class="exampleInner">
<pre>
- fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')
+ fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')
</pre>
</div>
<div class="div2">
@@ -2272,12 +2402,12 @@
<code>$value</code>, converted to an <code>xs:string</code>, and
<code>$label</code> may be directed to a trace data set. The
destination of the trace output is <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a>. The format of the trace output is <a title="implementation dependent" class="termref" href="#implementation-dependent">
- <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
</a>. The ordering of output from invocations of
the <code>fn:trace()</code> function is <a title="implementation dependent" class="termref" href="#implementation-dependent">
- <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
</a>.</p>
<div class="div2">
<h3>
@@ -2423,7 +2553,7 @@
<code class="return-type">xs:float?</code>
</div>
<p>Implementations <a title="may" class="termref" href="#may">
- <span class="arrow">·</span>may<span class="arrow">·</span>
+ <span class="arrow">·</span>may<span class="arrow">·</span>
</a> return negative zero for
<code>xs:float("-0.0E0")</code>. <a href="#xmlschema-2">[XML Schema
Part 2: Datatypes Second Edition]</a> does not distinguish between
@@ -2437,7 +2567,7 @@
<code class="return-type">xs:double?</code>
</div>
<p>Implementations <a title="may" class="termref" href="#may">
- <span class="arrow">·</span>may<span class="arrow">·</span>
+ <span class="arrow">·</span>may<span class="arrow">·</span>
</a> return negative zero for
<code>xs:double("-0.0E0").</code>
<a href="#xmlschema-2">[XML
@@ -2931,13 +3061,13 @@
element/type namespace is no namespace):</p>
<div class="exampleInner">
<pre>
- 17 cast as apple
+17 cast as apple
</pre>
</div>
<p>The following shows the use of the constructor function:</p>
<div class="exampleInner">
<pre>
- declare default function namespace ""; apple(17)
+declare default function namespace ""; apple(17)
</pre>
</div>
</div>
@@ -3190,7 +3320,7 @@
types. Consider the following example:</p>
<div class="exampleInner">
<pre>
- op:operation(xs:int, xs:double) => op:operation(xs:double, xs:double)
+op:operation(xs:int, xs:double) => op:operation(xs:double, xs:double)
</pre>
</div>
<p>For this operation, <code>xs:int</code> must be converted to
@@ -3210,7 +3340,7 @@
permitted set of values to, say, 36, 48 and 60.</p>
<div class="exampleInner">
<pre>
- op:operation(fenceHeight, xs:integer) => op:operation(xs:integer, xs:integer)
+op:operation(fenceHeight, xs:integer) => op:operation(xs:integer, xs:integer)
</pre>
</div>
<p>
@@ -3219,14 +3349,13 @@
its base type <code>xs:integer</code>.</p>
<p>On overflow and underflow situations during arithmetic
operations conforming implementations <a title="must" class="termref" href="#must">
- <span class="arrow">·</span>must<span class="arrow">·</span>
- </a> behave as
-follows:</p>
+ <span class="arrow">·</span>must<span class="arrow">·</span>
+ </a> behave as follows:</p>
<ul>
<li>
<p>For <code>xs:float</code> and <code>xs:double</code> operations,
overflow behavior <a title="must" class="termref" href="#must">
- <span class="arrow">·</span>must<span class="arrow">·</span>
+ <span class="arrow">·</span>must<span class="arrow">·</span>
</a> be conformant with <a href="#ieee754">[IEEE
754-1985]</a>. This specification allows the following options:</p>
<ul>
@@ -3245,7 +3374,7 @@
<li>
<p>For <code>xs:float</code> and <code>xs:double</code> operations,
underflow behavior <a title="must" class="termref" href="#must">
- <span class="arrow">·</span>must<span class="arrow">·</span>
+ <span class="arrow">·</span>must<span class="arrow">·</span>
</a> be conformant with <a href="#ieee754">[IEEE
754-1985]</a>. This specification allows the following options:</p>
<ul>
@@ -3263,30 +3392,29 @@
<li>
<p>For <code>xs:decimal</code> operations, overflow behavior
<a title="must" class="termref" href="#must">
- <span class="arrow">·</span>must<span class="arrow">·</span>
- </a> raise an
-error [<a href="#ERRFOAR0002" title="err:FOAR0002">err:FOAR0002</a>]. On underflow, <code>0.0</code>
-must be returned.</p>
+ <span class="arrow">·</span>must<span class="arrow">·</span>
+ </a> raise an error
+[<a href="#ERRFOAR0002" title="err:FOAR0002">err:FOAR0002</a>]. On
+underflow, <code>0.0</code> must be returned.</p>
</li>
<li>
<p>For <code>xs:integer</code> operations, implementations that
support limited-precision integer operations <a title="must" class="termref" href="#must">
- <span class="arrow">·</span>must<span class="arrow">·</span>
- </a> select from
-the following options:</p>
+ <span class="arrow">·</span>must<span class="arrow">·</span>
+ </a> select from the following options:</p>
<ul>
<li>
<p>They <a title="may" class="termref" href="#may">
- <span class="arrow">·</span>may<span class="arrow">·</span>
+ <span class="arrow">·</span>may<span class="arrow">·</span>
</a> choose to
always raise an error [<a href="#ERRFOAR0002" title="err:FOAR0002">err:FOAR0002</a>].</p>
</li>
<li>
<p>They <a title="may" class="termref" href="#may">
- <span class="arrow">·</span>may<span class="arrow">·</span>
+ <span class="arrow">·</span>may<span class="arrow">·</span>
</a> provide an
<a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a> mechanism that allows users to choose between
raising an error and returning a result that is modulo the largest
representable integer value. See <a href="#ISO10967">[ISO
@@ -3328,11 +3456,11 @@
<code>NaN</code>.</p>
<p>For <code>xs:decimal</code> values the number of digits of
precision returned by the numeric operators is <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
- </a>. If the number of digits in the result
-exceeds the number of digits that the implementation supports, the
-result is truncated or rounded in an <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ </a>. If the number of digits in the result exceeds
+the number of digits that the implementation supports, the result
+is truncated or rounded in an <a title="implementation-defined" class="termref" href="#implementation-defined">
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a> manner.</p>
<div class="div3">
<h4>
@@ -3494,9 +3622,9 @@
</div>
<p>The implementation may adopt a different algorithm provided that
it is equivalent to this formulation in all cases where <a title="implementation dependent" class="termref" href="#implementation-dependent">
- <span class="arrow">·</span>implementation-dependent<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-dependent<span class="arrow">·</span>
</a> or <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a> behavior does not affect the outcome, for
example, the implementation-defined precision of the result of
<code>xs:decimal</code> division.</p>
@@ -4300,7 +4428,7 @@
<p>They also apply to user-defined types derived by restriction
from the above types.</p>
<p>It is <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a> which version of <a href="#Unicode4">[The
Unicode Standard]</a> is supported, but it is recommended that the
most recent version of Unicode be used.</p>
@@ -4392,7 +4520,7 @@
<li>
<p>
<code>fn:codepoints-to-string((2309, 2358, 2378, 2325))</code>
-returns "अशॊक"</p>
+returns "अशॊक"</p>
</li>
</ul>
</div>
@@ -4418,7 +4546,7 @@
<ul>
<li>
<p>
- <code>fn:string-to-codepoints("Thérèse")</code> returns the
+ <code>fn:string-to-codepoints("Thérèse")</code> returns the
sequence (84, 104, 233, 114, 232, 115, 101)</p>
</li>
</ul>
@@ -4676,26 +4804,25 @@
</li>
<li>
<p>
- <code>fn:compare('Strasse', 'Straße')</code> returns 0 if and
+ <code>fn:compare('Strasse', 'Straße')</code> returns 0 if and
only if the default collation includes provisions that equate "ss"
-and the (German) character "ß" ("sharp-s"). (Otherwise, the
+and the (German) character "ß" ("sharp-s"). (Otherwise, the
returned value depends on the semantics of the default
collation.)</p>
</li>
<li>
<p>
- <code>fn:compare('Strasse', 'Straße', 'deutsch')</code> returns
+ <code>fn:compare('Strasse', 'Straße', 'deutsch')</code> returns
0 if the collation identified by the relative URI constructed from
the <code>string</code> value "deutsch" includes provisions that
-equate "ss" and the (German) character "ß" ("sharp-s").
-(Otherwise, the returned value depends on the semantics of that
-collation.)</p>
+equate "ss" and the (German) character "ß" ("sharp-s"). (Otherwise,
+the returned value depends on the semantics of that collation.)</p>
</li>
<li>
<p>
- <code>fn:compare('Strassen', 'Straße')</code> returns 1 if the
+ <code>fn:compare('Strassen', 'Straße')</code> returns 1 if the
default collation includes provisions that treat differences
-between "ss" and the (German) character "ß" ("sharp-s") with less
+between "ss" and the (German) character "ß" ("sharp-s") with less
strength than the differences between the base characters, such as
the final "n".</p>
</li>
@@ -4952,7 +5079,9 @@
<code>fn:concat</code>. The following XQuery:</p>
<div class="exampleInner">
<pre>
- let $v1 := "I plan to go to Mu" let $v2 := "?nchen in September" return concat($v1, $v2)
+let $v1 := "I plan to go to Mu"
+let $v2 := "?nchen in September"
+return concat($v1, $v2)
</pre>
</div>
<p>where the "?" represents either the actual Unicode character
@@ -4966,13 +5095,15 @@
<p>However, the following XQuery:</p>
<div class="exampleInner">
<pre>
- let $v1 := "I plan to go to Mu" let $v2 := "?nchen in September" return normalize-unicode(concat($v1, $v2))
+let $v1 := "I plan to go to Mu"
+let $v2 := "?nchen in September"
+return normalize-unicode(concat($v1, $v2))
</pre>
</div>
<p>where the "?" represents either the actual Unicode character
COMBINING DIARESIS (Unicode codepoint U+0308) or "&#x0308;",
will return:</p>
- <p>"I plan to go to München in September"</p>
+ <p>"I plan to go to München in September"</p>
<p>This returned result is normalized in NFC.</p>
</div>
<div class="div4">
@@ -5049,7 +5180,12 @@
<p>Assume a document:</p>
<div class="exampleInner">
<pre>
- <doc> <chap> <section> </section> </chap> </doc>
+<doc>
+ <chap>
+ <section>
+ </section>
+ </chap>
+</doc>
</pre>
</div>
<p>with the <code><section></code> as the context node, the
@@ -5439,17 +5575,16 @@
</li>
</ul>
<p>Conforming implementations <a title="must" class="termref" href="#must">
- <span class="arrow">·</span>must<span class="arrow">·</span>
- </a> support normalization form "NFC" and
-<a title="may" class="termref" href="#may">
- <span class="arrow">·</span>may<span class="arrow">·</span>
+ <span class="arrow">·</span>must<span class="arrow">·</span>
+ </a> support normalization form "NFC" and <a title="may" class="termref" href="#may">
+ <span class="arrow">·</span>may<span class="arrow">·</span>
</a> support
normalization forms "NFD", "NFKC", "NFKD", "FULLY-NORMALIZED". They
<a title="may" class="termref" href="#may">
- <span class="arrow">·</span>may<span class="arrow">·</span>
+ <span class="arrow">·</span>may<span class="arrow">·</span>
</a> also support
other normalization forms with <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a> semantics. If the effective value of the
<code>$normalizationForm</code> is other than one of the values
supported by the implementation, then an error is raised [<a href="#ERRFOCH0003" title="err:FOCH0003">err:FOCH0003</a>].</p>
@@ -5499,7 +5634,7 @@
(e.g. titlecase). In cases such as Turkish, a simple translation
should be used first.</p>
<p>Results may violate user expectations (in Quebec, for example,
-the standard uppercase equivalent of "è" is "È", while in
+the standard uppercase equivalent of "è" is "È", while in
metropolitan France it is more commonly "E"; only one of these is
supported by the functions as defined).</p>
<p>Many characters of class Ll lack uppercase equivalents in the
@@ -5563,7 +5698,7 @@
(e.g. titlecase). In cases such as Turkish, a simple translation
should be used first.</p>
<p>Results may violate user expectations (in Quebec, for example,
-the standard uppercase equivalent of "è" is "È", while in
+the standard uppercase equivalent of "è" is "È", while in
metropolitan France it is more commonly "E"; only one of these is
supported by the functions as defined).</p>
<p>Many characters of class Ll lack uppercase equivalents in the
@@ -5711,7 +5846,7 @@
<li>
<p>
<code>concat("http://www.example.com/",
-encode-for-uri("~bébé"))</code> returns
+encode-for-uri("~bébé"))</code> returns
<code>"http://www.example.com/~b%C3%A9b%C3%A9"</code>.</p>
</li>
<li>
@@ -5783,7 +5918,7 @@
</li>
<li>
<p>
- <code>fn:iri-to-uri ("http://www.example.com/~bébé")</code>
+ <code>fn:iri-to-uri ("http://www.example.com/~bébé")</code>
returns <code>"http://www.example.com/~b%C3%A9b%C3%A9"</code>.</p>
</li>
</ul>
@@ -5835,7 +5970,7 @@
<p>
<code>fn:escape-html-uri ("javascript:if
(navigator.browserLanguage == 'fr')
-window.open('http://www.example.com/~bébé;');") returns
+window.open('http://www.example.com/~bébé;');") returns
"javascript:if (navigator.browserLanguage == 'fr')
window.open('http://www.example.com/~b%C3%A9b%C3%A9');"</code>.</p>
</li>
@@ -5880,10 +6015,10 @@
<code>$arg1</code>. The characters in <code>$arg1</code> that match
are the characters corresponding to these collation units.</p>
<p>This rule may occasionally lead to surprises. For example,
-consider a collation that treats "Jaeger" and "Jäger" as equal. It
-might do this by treating "ä" as representing two collation units,
+consider a collation that treats "Jaeger" and "Jäger" as equal. It
+might do this by treating "ä" as representing two collation units,
in which case the expression <a href="#func-contains">
- <code>fn:contains("Jäger", "eg")</code>
+ <code>fn:contains("Jäger", "eg")</code>
</a> will
return <code>true</code>. Alternatively, a collation might treat
"ae" as a single collation unit, in which case the expression
@@ -5934,7 +6069,7 @@
or to give unexpected results or it may be rejected as an
unsuitable argument. The ability to decompose strings into
collation units is an <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a> property of the collation.</p>
<table summary="Function/operator summary" border="1">
<thead>
@@ -6066,7 +6201,7 @@
Collations</b>
</a>. If the specified collation does not support
collation units an error <a title="may" class="termref" href="#may">
- <span class="arrow">·</span>may<span class="arrow">·</span>
+ <span class="arrow">·</span>may<span class="arrow">·</span>
</a> be raised [<a href="#ERRFOCH0004" title="err:FOCH0004">err:FOCH0004</a>].</p>
<div class="div4">
<h5>
@@ -6194,7 +6329,7 @@
Collations</b>
</a>. If the specified collation does not support
collation units an error <a title="may" class="termref" href="#may">
- <span class="arrow">·</span>may<span class="arrow">·</span>
+ <span class="arrow">·</span>may<span class="arrow">·</span>
</a> be raised [<a href="#ERRFOCH0004" title="err:FOCH0004">err:FOCH0004</a>].</p>
<div class="div4">
<h5>
@@ -6327,7 +6462,7 @@
Collations</b>
</a>. If the specified collation does not support
collation units an error <a title="may" class="termref" href="#may">
- <span class="arrow">·</span>may<span class="arrow">·</span>
+ <span class="arrow">·</span>may<span class="arrow">·</span>
</a> be raised [<a href="#ERRFOCH0004" title="err:FOCH0004">err:FOCH0004</a>].</p>
<div class="div4">
<h5>
@@ -6458,7 +6593,7 @@
Collations</b>
</a> If the specified collation does not support
collation units an error <a title="may" class="termref" href="#may">
- <span class="arrow">·</span>may<span class="arrow">·</span>
+ <span class="arrow">·</span>may<span class="arrow">·</span>
</a> be raised [<a href="#ERRFOCH0004" title="err:FOCH0004">err:FOCH0004</a>].</p>
<div class="div4">
<h5>
@@ -6583,7 +6718,7 @@
Collations</b>
</a> If the specified collation does not support
collation units an error <a title="may" class="termref" href="#may">
- <span class="arrow">·</span>may<span class="arrow">·</span>
+ <span class="arrow">·</span>may<span class="arrow">·</span>
</a> be raised [<a href="#ERRFOCH0004" title="err:FOCH0004">err:FOCH0004</a>].</p>
<div class="div4">
<h5>
@@ -7148,7 +7283,12 @@
<p>Given the source document:</p>
<div class="exampleInner">
<pre>
- <poem author="Wilhelm Busch"> Kaum hat dies der Hahn gesehen, Fängt er auch schon an zu krähen: «Kikeriki! Kikikerikih!!» Tak, tak, tak! - da kommen sie. </poem>
+<poem author="Wilhelm Busch">
+Kaum hat dies der Hahn gesehen,
+Fängt er auch schon an zu krähen:
+«Kikeriki! Kikikerikih!!»
+Tak, tak, tak! - da kommen sie.
+</poem>
</pre>
</div>
<p>the following function calls produce the following results, with
@@ -7156,13 +7296,13 @@
<ul>
<li>
<p>
- <code>fn:matches(., "Kaum.*krähen")</code> returns
+ <code>fn:matches(., "Kaum.*krähen")</code> returns
<code>false</code>
</p>
</li>
<li>
<p>
- <code>fn:matches(., "Kaum.*krähen", "s")</code> returns
+ <code>fn:matches(., "Kaum.*krähen", "s")</code> returns
<code>true</code>
</p>
</li>
@@ -7343,7 +7483,7 @@
is the one matched by the first alternative. For example:</p>
<div class="exampleInner">
<pre>
- fn:replace("abcd", "(ab)|(a)", "[1=$1][2=$2]") returns "[1=ab][2=]cd"
+ fn:replace("abcd", "(ab)|(a)", "[1=$1][2=$2]") returns "[1=ab][2=]cd"
</pre>
</div>
<p>An error is raised [<a href="#ERRFORX0002" title="err:FORX0002">err:FORX0002</a>] if the value of
@@ -7512,7 +7652,7 @@
then the match that is chosen is the first. For example:</p>
<div class="exampleInner">
<pre>
- fn:tokenize("abracadabra", "(ab)|(a)") returns ("", "r", "c", "d", "r", "")
+ fn:tokenize("abracadabra", "(ab)|(a)") returns ("", "r", "c", "d", "r", "")
</pre>
</div>
<p>An error is raised [<a href="#ERRFORX0002" title="err:FORX0002">err:FORX0002</a>] if the value of
@@ -8011,27 +8151,27 @@
Schema Part 2: Datatypes Second Edition]</a> extends the basic
<a href="#ISO8601">[ISO 8601]</a> lexical representations, such as
YYYY-MM-DDThh:mm:ss.s for dateTime, by allowing a preceding minus
-sign, more than four digits to represent the year field — no
-maximum is specified — and an unlimited number of digits for
+sign, more than four digits to represent the year field — no
+maximum is specified — and an unlimited number of digits for
fractional seconds. Leap seconds are not supported.</p>
<p>All <em>minimally conforming</em> processors <a title="must" class="termref" href="#must">
- <span class="arrow">·</span>must<span class="arrow">·</span>
+ <span class="arrow">·</span>must<span class="arrow">·</span>
</a> support
positive year values with a minimum of 4 digits (i.e., YYYY) and a
minimum fractional second precision of 1 millisecond or three
digits (i.e., s.sss). However, <em>conforming</em> processors
<a title="may" class="termref" href="#may">
- <span class="arrow">·</span>may<span class="arrow">·</span>
+ <span class="arrow">·</span>may<span class="arrow">·</span>
</a> set larger
<a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a> limits on the maximum number of digits they
support in these two situations. Processors <a title="may" class="termref" href="#may">
- <span class="arrow">·</span>may<span class="arrow">·</span>
- </a> also choose to support the year 0000 and
-years with negative values. The results of operations on dates that
-cross the year 0000 are <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>may<span class="arrow">·</span>
+ </a> also choose to support the year 0000 and years
+with negative values. The results of operations on dates that cross
+the year 0000 are <a title="implementation-defined" class="termref" href="#implementation-defined">
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a>.</p>
<p>A processor that limits the number of digits in date and time
datatype representations may encounter overflow and underflow
@@ -8040,11 +8180,11 @@
Dates and Times</b>
</a>. In these situations, the processor
<a title="must" class="termref" href="#must">
- <span class="arrow">·</span>must<span class="arrow">·</span>
- </a> return P0M
-or PT0S in case of duration underflow and 00:00:00 in case of time
+ <span class="arrow">·</span>must<span class="arrow">·</span>
+ </a> return P0M or
+PT0S in case of duration underflow and 00:00:00 in case of time
underflow. It <a title="must" class="termref" href="#must">
- <span class="arrow">·</span>must<span class="arrow">·</span>
+ <span class="arrow">·</span>must<span class="arrow">·</span>
</a> raise an error [<a href="#ERRFODT0001" title="err:FODT0001">err:FODT0001</a>] in case of overflow.</p>
<p>The value spaces of the two totally ordered subtypes of
<code>xs:duration</code> described in <a href="#duration-subtypes">
@@ -8061,11 +8201,11 @@
Operators on Durations</b>
</a>. In these situations the processor
<a title="must" class="termref" href="#must">
- <span class="arrow">·</span>must<span class="arrow">·</span>
- </a> return zero
-in case of numeric underflow and P0M or PT0S in case of duration
+ <span class="arrow">·</span>must<span class="arrow">·</span>
+ </a> return zero in
+case of numeric underflow and P0M or PT0S in case of duration
underflow. It <a title="must" class="termref" href="#must">
- <span class="arrow">·</span>must<span class="arrow">·</span>
+ <span class="arrow">·</span>must<span class="arrow">·</span>
</a> raise an error [<a href="#ERRFODT0002" title="err:FODT0002">err:FODT0002</a>] in case of overflow.</p>
</div>
</div>
@@ -8097,9 +8237,9 @@
value is referred to as the <em>local</em> value in that the value
is in the given timezone. Before comparing or subtracting
<code>xs:dateTime</code> values, this local value <a title="must" class="termref" href="#must">
- <span class="arrow">·</span>must<span class="arrow">·</span>
- </a> be
-translated or <em>normalized</em> to UTC.</p>
+ <span class="arrow">·</span>must<span class="arrow">·</span>
+ </a> be translated
+or <em>normalized</em> to UTC.</p>
<p>For <code>xs:time</code>, <code>"00:00:00"</code> and
<code>"24:00:00"</code> are alternate lexical forms for the same
value, whose canonical representation is <code>"00:00:00"</code>.
@@ -8180,10 +8320,10 @@
are allowed provided they conform to the following:</p>
<p>If the number of years or months in any expression equals zero
(0), the number and its corresponding designator <a title="may" class="termref" href="#may">
- <span class="arrow">·</span>may<span class="arrow">·</span>
+ <span class="arrow">·</span>may<span class="arrow">·</span>
</a> be omitted.
However, at least one number and its designator <a title="must" class="termref" href="#must">
- <span class="arrow">·</span>must<span class="arrow">·</span>
+ <span class="arrow">·</span>must<span class="arrow">·</span>
</a> be present.
For example, P1347Y and P1347M are allowed; P-1347M is not allowed,
although -P1347M is allowed. P1Y2MT is not allowed. Also, P24YM is
@@ -8217,7 +8357,7 @@
negative sign is prepended to it. If a component has the value zero
(0), then the number and the designator for that component
<a title="must" class="termref" href="#must">
- <span class="arrow">·</span>must<span class="arrow">·</span>
+ <span class="arrow">·</span>must<span class="arrow">·</span>
</a> be omitted.
However, if the value is zero (0) months, the canonical form is
"P0M".</p>
@@ -8270,26 +8410,25 @@
<p>If the number of days, hours, minutes, or seconds in any
expression equals zero (0), the number and its corresponding
designator <a title="may" class="termref" href="#may">
- <span class="arrow">·</span>may<span class="arrow">·</span>
+ <span class="arrow">·</span>may<span class="arrow">·</span>
</a> be omitted.
However, at least one number and its designator <a title="must" class="termref" href="#must">
- <span class="arrow">·</span>must<span class="arrow">·</span>
+ <span class="arrow">·</span>must<span class="arrow">·</span>
</a> be
present.</p>
</li>
<li>
<p>The seconds part <a title="may" class="termref" href="#may">
- <span class="arrow">·</span>may<span class="arrow">·</span>
+ <span class="arrow">·</span>may<span class="arrow">·</span>
</a> have a decimal fraction.</p>
</li>
<li>
<p>The designator 'T' <a title="must" class="termref" href="#must">
- <span class="arrow">·</span>must<span class="arrow">·</span>
- </a> be absent if and only if all of the time
-items are absent. The designator 'P' <a title="must" class="termref" href="#must">
- <span class="arrow">·</span>must<span class="arrow">·</span>
- </a> always be
-present.</p>
+ <span class="arrow">·</span>must<span class="arrow">·</span>
+ </a> be absent if and only if all of the time items
+are absent. The designator 'P' <a title="must" class="termref" href="#must">
+ <span class="arrow">·</span>must<span class="arrow">·</span>
+ </a> always be present.</p>
</li>
</ul>
<p>For example, P13D, PT47H, P3DT2H, -PT35.89S and P4DT251M are all
@@ -8805,7 +8944,11 @@
<p>The semantics of this function are:</p>
<div class="exampleInner">
<pre>
- xs:yearMonthDuration($arg1) div xs:yearMonthDuration('P1M') eq xs:yearMonthDuration($arg2) div xs:yearMonthDuration('P1M') and xs:dayTimeDuration($arg1) div xs:dayTimeDuration('PT1S') eq xs:dayTimeDuration($arg2) div xs:dayTimeDuration('PT1S')
+xs:yearMonthDuration($arg1) div xs:yearMonthDuration('P1M') eq
+xs:yearMonthDuration($arg2) div xs:yearMonthDuration('P1M')
+ and
+xs:dayTimeDuration($arg1) div xs:dayTimeDuration('PT1S') eq
+xs:dayTimeDuration($arg2) div xs:dayTimeDuration('PT1S')
</pre>
</div>
<p>that is, the function returns <code>true</code> if the months
@@ -12789,7 +12932,8 @@
be achieved by writing:</p>
<div class="exampleInner">
<pre>
- if (contains($qname, ":")) then fn:resolve-QName($qname, $element) else fn:QName("", $qname)
+ if (contains($qname, ":")) then fn:resolve-QName($qname, $element) else
+ fn:QName("", $qname)
</pre>
</div>
<p>If the requirement is to construct an <code>xs:QName</code>
@@ -13393,7 +13537,18 @@
<code>5.0</code>.</p>
<div class="exampleInner">
<pre>
- <PurchaseOrder> <line-item> <description> ... </description> <price> ... </price> <quantity>5.0</quantity> ... </line-item> <line-item> ... </line-item> ... </PurchaseOrder>
+<PurchaseOrder>
+ <line-item>
+ <description> ... </description>
+ <price> ... </price>
+ <quantity>5.0</quantity>
+ ...
+ </line-item>
+ <line-item>
+ ...
+ </line-item>
+ ...
+</PurchaseOrder>
</pre>
</div>
<div class="div2">
@@ -13633,7 +13788,7 @@
the value of the XPath expression:</p>
<div class="exampleInner">
<pre>
- (ancestor-or-self::*/@xml:lang)[last()]
+(ancestor-or-self::*/@xml:lang)[last()]
</pre>
</div>
<p>If this expression returns an empty sequence, the function
@@ -13868,14 +14023,32 @@
<a href="#xquery">[XQuery 1.0: An XML Query Language]</a> as:</p>
<div class="exampleInner">
<pre>
- let $i := <tool>wrench</tool> let $o := <order> {$i} <quantity>5</quantity> </order> let $odoc := document {$o} let $newi := $o/tool
+let $i := <tool>wrench</tool>
+let $o := <order> {$i} <quantity>5</quantity> </order>
+let $odoc := document {$o}
+let $newi := $o/tool
</pre>
</div>
<p>Or they could be defined in <a href="#xslt20">[XSL
Transformations (XSLT) Version 2.0]</a> as:</p>
<div class="exampleInner">
<pre>
- <xsl:variable name="i" as="element()"> <tool>wrench</tool> </xsl:variable> <xsl:variable name="o" as="element()"> <order> <xsl:copy-of select="$i"/> <quantity>5</quantity> </order> </xsl:variable> <xsl:variable name="odoc"> <xsl:copy-of select="$o"/> </xsl:variable> <xsl:variable name="newi" select="$o/tool"/>
+<xsl:variable name="i" as="element()">
+ <tool>wrench</tool>
+</xsl:variable>
+
+<xsl:variable name="o" as="element()">
+ <order>
+ <xsl:copy-of select="$i"/>
+ <quantity>5</quantity>
+ </order>
+</xsl:variable>
+
+<xsl:variable name="odoc">
+ <xsl:copy-of select="$o"/>
+</xsl:variable>
+
+<xsl:variable name="newi" select="$o/tool"/>
</pre>
</div>
<ul>
@@ -13989,7 +14162,7 @@
<td>Returns a sequence in which all but one of a set of duplicate
values, based on value equality, have been deleted. The order in
which the distinct values are returned is <a title="implementation dependent" class="termref" href="#implementation-dependent">
- <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
</a>.</td>
</tr>
<tr>
@@ -14398,7 +14571,7 @@
<code>eq</code> operator is not defined for their types, are
considered to be distinct. The order in which the sequence of
values is returned is <a title="implementation dependent" class="termref" href="#implementation-dependent">
- <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
</a>.</p>
<p>The static type of the result is a sequence of prime types as
defined in <a href="http://www.w3.org/TR/xquery-semantics/#sec_fn_distinct_node_vals">Section
@@ -14429,7 +14602,7 @@
timezones are different.</p>
<p>Which value of a set of values that compare equal is returned is
<a title="implementation dependent" class="termref" href="#implementation-dependent">
- <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
</a>.</p>
<p>If the input sequence contains values of different numeric types
that differ from each other by small amounts, then the
@@ -14440,7 +14613,7 @@
but <code>A ne C</code>, then the number of items in the result of
the function (as well as the choice of which items are returned) is
<a title="implementation dependent" class="termref" href="#implementation-dependent">
- <span class="arrow">·</span>implementation-dependent<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-dependent<span class="arrow">·</span>
</a>, subject only to the constraints that (a) no
two items in the result sequence compare equal to each other, and
(b) every input item that does not appear in the result sequence
@@ -14449,7 +14622,10 @@
<p>For example, this arises when computing:</p>
<div class="exampleInner">
<pre>
- distinct-values( (xs:float('1.0'), xs:decimal('1.0000000000100000000001', xs:double( '1.00000000001'))
+ distinct-values(
+ (xs:float('1.0'),
+ xs:decimal('1.0000000000100000000001',
+ xs:double( '1.00000000001'))
</pre>
</div>
<p>because the values of type <code>xs:float</code> and
@@ -14468,7 +14644,12 @@
<p>The following query:</p>
<div class="exampleInner">
<pre>
- let $x as xs:untypedAtomic* := (xs:untypedAtomic("cherry"), xs:untypedAtomic("bar"), xs:untypedAtomic("bar")) return fn:distinct-values ($x)
+let $x as xs:untypedAtomic*
+ := (xs:untypedAtomic("cherry"),
+ xs:untypedAtomic("bar"),
+ xs:untypedAtomic("bar"))
+return fn:distinct-values ($x)
+
</pre>
</div>
<p>returns a sequence containing two items of type
@@ -14742,13 +14923,14 @@
<p>In the two-argument case, returns:</p>
<div class="exampleInner">
<pre>
- $sourceSeq[fn:round($startingLoc) le position()]
+$sourceSeq[fn:round($startingLoc) le position()]
</pre>
</div>
<p>In the three-argument case, returns:</p>
<div class="exampleInner">
<pre>
- $sourceSeq[fn:round($startingLoc) le position() and position() lt fn:round($startingLoc) + fn:round($length)]
+$sourceSeq[fn:round($startingLoc) le position()
+ and position() lt fn:round($startingLoc) + fn:round($length)]
</pre>
</div>
<div class="note">
@@ -14816,7 +14998,7 @@
</div>
<p>Summary: Returns the items of <code>$sourceSeq</code> in an
<a title="implementation dependent" class="termref" href="#implementation-dependent">
- <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
</a> order.</p>
<div class="note">
<p class="prefix">
@@ -15221,7 +15403,9 @@
<a name="func-deep-equal-examples" id="func-deep-equal-examples"/>15.3.1.1 Examples</h5>
<div class="exampleInner">
<pre>
- let $at := <attendees> <name last='Parker' first='Peter'/> <name last='Barker' first='Bob'/> <name last='Parker' first='Peter'/> </attendees>
+let $at := <attendees> <name last='Parker'
+ first='Peter'/> <name last='Barker' first='Bob'/>
+ <name last='Parker' first='Peter'/> </attendees>
</pre>
</div>
<ul>
@@ -15614,7 +15798,7 @@
of every other item in the input sequence. If there are two or more
such items, then the specific item whose value is returned is
<a title="implementation dependent" class="termref" href="#implementation-dependent">
- <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
</a>.</p>
<p>The following rules are applied to the input sequence:</p>
<ul>
@@ -15675,7 +15859,9 @@
expression:</p>
<div class="exampleInner">
<pre>
- if (every $v in $c satisfies $c[1] ge $v) then $c[1] else fn:max(fn:subsequence($c, 2))
+ if (every $v in $c satisfies $c[1] ge $v)
+ then $c[1]
+ else fn:max(fn:subsequence($c, 2))
</pre>
</div>
<p>evaluated with <code>$collation</code> as the default collation
@@ -15754,7 +15940,7 @@
every other item in the input sequence. If there are two or more
such items, then the specific item whose value is returned is
<a title="implementation dependent" class="termref" href="#implementation-dependent">
- <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
</a>.</p>
<p>The following rules are applied to the input sequence:</p>
<ul>
@@ -15815,7 +16001,9 @@
expression:</p>
<div class="exampleInner">
<pre>
- if (every $v in $c satisfies $c[1] le $v) then $c[1] else fn:min(fn:subsequence($c, 2))
+ if (every $v in $c satisfies $c[1] le $v)
+ then $c[1]
+ else fn:min(fn:subsequence($c, 2))
</pre>
</div>
<p>evaluated with <code>$collation</code> as the default collation
@@ -15862,7 +16050,7 @@
return either positive or negative zero. <a href="#xmlschema-2">[XML Schema Part 2: Datatypes Second Edition]</a>
does not distinguish between the values positive zero and negative
zero. The result is <a title="implementation dependent" class="termref" href="#implementation-dependent">
- <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
</a>.</p>
</li>
<li>
@@ -15950,7 +16138,12 @@
signature, is the result of the expression:</p>
<div class="exampleInner">
<pre>
- if (fn:count($c) eq 0) then $zero else if (fn:count($c) eq 1) then $c[1] else $c[1] + fn:sum(subsequence($c, 2))
+if (fn:count($c) eq 0) then
+ $zero
+else if (fn:count($c) eq 1) then
+ $c[1]
+else
+ $c[1] + fn:sum(subsequence($c, 2))
</pre>
</div>
<p>where <code>$c</code> is the converted sequence.</p>
@@ -15983,7 +16176,10 @@
<p>Assume:</p>
<div class="exampleInner">
<pre>
- $d1 = xs:yearMonthDuration("P20Y") $d2 = xs:yearMonthDuration("P10M") $seq1 = ($d1, $d2) $seq3 = (3, 4, 5)
+$d1 = xs:yearMonthDuration("P20Y")
+$d2 = xs:yearMonthDuration("P10M")
+$seq1 = ($d1, $d2)
+$seq3 = (3, 4, 5)
</pre>
</div>
<ul>
@@ -16240,7 +16436,8 @@
the expression:</p>
<div class="exampleInner">
<pre>
- for $s in $arg return fn:tokenize(fn:normalize-space($s), ' ') [. castable as xs:IDREF]
+for $s in $arg return fn:tokenize(fn:normalize-space($s), ' ')
+ [. castable as xs:IDREF]
</pre>
</div>
</li>
@@ -16374,7 +16571,7 @@
sequence</p>
<div class="exampleInner">
<pre>
- $arg[. castable as xs:NCName]
+$arg[. castable as xs:NCName]
</pre>
</div>
</li>
@@ -16450,7 +16647,7 @@
string, an error is raised [<a href="#ERRFODC0005" title="err:FODC0005">err:FODC0005</a>].</p>
<p>The URI may include a fragment identifier.</p>
<p>By default, this function is <a title="stable" class="termref" href="#stable">
- <span class="arrow">·</span>stable<span class="arrow">·</span>
+ <span class="arrow">·</span>stable<span class="arrow">·</span>
</a>. Two calls on this function return the same
document node if the same URI Reference (after resolution to an
absolute URI Reference) is supplied to both calls. Thus, the
@@ -16458,7 +16655,7 @@
true:</p>
<div class="exampleInner">
<pre>
- doc("foo.xml") is doc("foo.xml")
+doc("foo.xml") is doc("foo.xml")
</pre>
</div>
<p>However, for performance reasons, implementations may provide a
@@ -16501,7 +16698,7 @@
document nodes within the XPath data model. Both the set of
resources that are reachable, and the mechanisms by which those
resources are parsed and validated, are <a title="implementation dependent" class="termref" href="#implementation-dependent">
- <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
</a>.</p>
<p>One possible processing model for this function is as follows.
The resource identified by the URI Reference is retrieved. If the
@@ -16516,7 +16713,7 @@
function is the document node at the root of the resulting tree.
This tree is then optionally validated against a schema.</p>
<p>Various aspects of this processing are <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a>. Implementations may provide external
configuration options that allow any aspect of the processing to be
controlled by the user. In particular:</p>
@@ -16534,7 +16731,7 @@
</li>
<li>
<p>It is <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a> whether DTD validation and/or schema
validation is applied to the source document.</p>
</li>
@@ -16586,8 +16783,8 @@
<code>fn:doc($uri)</code>
</a> within the same
<a title="execution scope" class="termref" href="#execution-scope">
- <span class="arrow">·</span>execution
-scope<span class="arrow">·</span>
+ <span class="arrow">·</span>execution
+scope<span class="arrow">·</span>
</a> must return a document node.
However, if non-stable processing has been selected for the
<a href="#func-doc">
@@ -16644,14 +16841,14 @@
<p>If <code>$arg</code> is the empty sequence, the function behaves
as if it had been called without an argument. See above.</p>
<p>By default, this function is <a title="stable" class="termref" href="#stable">
- <span class="arrow">·</span>stable<span class="arrow">·</span>
+ <span class="arrow">·</span>stable<span class="arrow">·</span>
</a>. This means that repeated calls on the
function with the same argument will return the same result.
However, for performance reasons, implementations may provide a
user option to evaluate the function without a guarantee of
stability. The manner in which any such option is provided is
<a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a>. If the user has not selected such an option,
a call to this function must either return a stable result or must
raise an error: [<a href="#ERRFODC0003" title="err:FODC0003">err:FODC0003</a>].</p>
@@ -16786,7 +16983,7 @@
the expression:</p>
<div class="exampleInner">
<pre>
- for $s in $arg return fn:tokenize(fn:normalize-space($s), ' ')[. castable as xs:IDREF]
+for $s in $arg return fn:tokenize(fn:normalize-space($s), ' ')[. castable as xs:IDREF]
</pre>
</div>
</li>
@@ -16954,11 +17151,11 @@
evaluation of a query or transformation in which
<code>fn:current-dateTime()</code> is executed. This function is
<a title="stable" class="termref" href="#stable">
- <span class="arrow">·</span>stable<span class="arrow">·</span>
- </a>. The
-precise instant during the query or transformation represented by
-the value of <code>fn:current-dateTime()</code> is <a title="implementation dependent" class="termref" href="#implementation-dependent">
- <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
+ <span class="arrow">·</span>stable<span class="arrow">·</span>
+ </a>. The precise
+instant during the query or transformation represented by the value
+of <code>fn:current-dateTime()</code> is <a title="implementation dependent" class="termref" href="#implementation-dependent">
+ <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
</a>.</p>
<div class="div3">
<h4>
@@ -16991,11 +17188,11 @@
some time during the evaluation of a query or transformation in
which <code>fn:current-date()</code> is executed. This function is
<a title="stable" class="termref" href="#stable">
- <span class="arrow">·</span>stable<span class="arrow">·</span>
- </a>. The
-precise instant during the query or transformation represented by
-the value of <code>fn:current-date()</code> is <a title="implementation dependent" class="termref" href="#implementation-dependent">
- <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
+ <span class="arrow">·</span>stable<span class="arrow">·</span>
+ </a>. The precise
+instant during the query or transformation represented by the value
+of <code>fn:current-date()</code> is <a title="implementation dependent" class="termref" href="#implementation-dependent">
+ <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
</a>.</p>
<div class="div3">
<h4>
@@ -17026,11 +17223,11 @@
some time during the evaluation of a query or transformation in
which <code>fn:current-time()</code> is executed. This function is
<a title="stable" class="termref" href="#stable">
- <span class="arrow">·</span>stable<span class="arrow">·</span>
- </a>. The
-precise instant during the query or transformation represented by
-the value of <code>fn:current-time()</code> is <a title="implementation dependent" class="termref" href="#implementation-dependent">
- <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
+ <span class="arrow">·</span>stable<span class="arrow">·</span>
+ </a>. The precise
+instant during the query or transformation represented by the value
+of <code>fn:current-time()</code> is <a title="implementation dependent" class="termref" href="#implementation-dependent">
+ <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
</a>.</p>
<div class="div3">
<h4>
@@ -19162,7 +19359,7 @@
<p>For <code>xs:anyURI</code>, the extent to which an
implementation validates the lexical form of <code>xs:anyURI</code>
is <a title="implementation dependent" class="termref" href="#implementation-dependent">
- <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
</a>.</p>
<p>If the cast fails for any other reason, error [<a href="#ERRFORG0001" title="err:FORG0001">err:FORG0001</a>] is
raised.</p>
@@ -19364,7 +19561,7 @@
<p>In all other cases, <em>TV</em> is the <a href="#xmlschema-2">[XML Schema Part 2: Datatypes Second Edition]</a>
canonical representation of <em>SV</em>. For datatypes that do not
have a canonical lexical representation defined an <a title="implementation dependent" class="termref" href="#implementation-dependent">
- <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
</a> canonical representation may be used.</p>
</li>
</ul>
@@ -19409,7 +19606,7 @@
<code>NaN</code>, positive zero, or negative zero respectively.</p>
</li>
<li>
- <p>otherwise, <em>SV</em> can be expressed in the form <code>m ×
+ <p>otherwise, <em>SV</em> can be expressed in the form <code>m ×
2^e</code> where the mantissa <code>m</code> and exponent
<code>e</code> are signed <code>xs:integer</code>s whose value
range is defined in <a href="#xmlschema-2">[XML Schema Part 2:
@@ -19442,7 +19639,7 @@
</li>
<li>
<p>otherwise, <em>TV</em> is the <code>xs:float</code> value
-<code>M × 2^E</code>.</p>
+<code>M × 2^E</code>.</p>
</li>
</ul>
</li>
@@ -19474,7 +19671,7 @@
<b>Note:</b>
</p>
<p>Implementations <a title="may" class="termref" href="#may">
- <span class="arrow">·</span>may<span class="arrow">·</span>
+ <span class="arrow">·</span>may<span class="arrow">·</span>
</a> return negative zero for <code>"-0.0E0" cast
as xs:float</code>. <a href="#xmlschema-2">[XML Schema Part 2:
Datatypes Second Edition]</a> does not distinguish between the
@@ -19506,12 +19703,12 @@
<code>NaN</code>, positive zero, or negative zero respectively.</p>
</li>
<li>
- <p>otherwise, <em>SV</em> can be expressed in the form <code>m ×
+ <p>otherwise, <em>SV</em> can be expressed in the form <code>m ×
2^e</code> where the mantissa <code>m</code> and exponent
<code>e</code> are signed <code>xs:integer</code> values whose
value range is defined in <a href="#xmlschema-2">[XML Schema Part
2: Datatypes Second Edition]</a>, and <em>TV</em> is the
-<code>xs:double</code> value <code>m × 2^e</code>.</p>
+<code>xs:double</code> value <code>m × 2^e</code>.</p>
</li>
</ul>
</li>
@@ -19542,7 +19739,7 @@
<b>Note:</b>
</p>
<p>Implementations <a title="may" class="termref" href="#may">
- <span class="arrow">·</span>may<span class="arrow">·</span>
+ <span class="arrow">·</span>may<span class="arrow">·</span>
</a> return negative zero for <code>"-0.0E0" cast
as xs:double</code>. <a href="#xmlschema-2">[XML Schema Part 2:
Datatypes Second Edition]</a> does not distinguish between the
@@ -19573,7 +19770,7 @@
chosen. If <em>SV</em> is too large to be accommodated as an
<code>xs:decimal</code>, (see <a href="#xmlschema-2">[XML Schema
Part 2: Datatypes Second Edition]</a> for <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a> limits on numeric values) an error is raised
[<a href="#ERRFOCA0001" title="err:FOCA0001">err:FOCA0001</a>]. If
<em>SV</em> is one of the special <code>xs:float</code> or
@@ -19620,7 +19817,7 @@
<em>SV</em> is too large to be accommodated as an integer, (see
<a href="#xmlschema-2">[XML Schema Part 2: Datatypes Second
Edition]</a> for <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a> limits on numeric values) an error is raised
[<a href="#ERRFOCA0003" title="err:FOCA0003">err:FOCA0003</a>]. If
<em>SV</em> is one of the special <code>xs:float</code> or
@@ -19736,22 +19933,65 @@
correct and do no range checking on them.</p>
<div class="exampleInner">
<pre>
- declare function eg:convertYearToString($year as xs:integer) as xs:string { let $plusMinus := if ($year >= 0) then "" else "-" let $yearString := fn:abs($year) cast as xs:string let $length := fn:string-length($yearString) return if ($length = 1) then fn:concat($plusMinus, "000", $yearString) else if ($length = 2) then fn:concat($plusMinus, "00", $yearString) else if ($length = 3) then fn:concat($plusMinus, "0", $yearString) else fn:concat($plusMinus, $yearString) }
-</pre>
- </div>
- <div class="exampleInner">
- <pre>
- declare function eg:convertTo2CharString($value as xs:integer) as xs:string { let $string := $value cast as xs:string return if (fn:string-length($string) = 1) then fn:concat("0", $string) else $string }
-</pre>
- </div>
- <div class="exampleInner">
- <pre>
- declare function eg:convertSecondsToString($seconds as xs:decimal) as xs:string { let $string := $seconds cast as xs:string let $intLength := fn:string-length(($seconds cast as xs:integer) cast as xs:string) return if ($intLength = 1) then fn:concat("0", $string) else $string }
-</pre>
- </div>
- <div class="exampleInner">
- <pre>
- declare function eg:convertTZtoString($tz as xs:dayTimeDuration?) as xs:string { if (empty($tz)) then "" else if ($tz eq xs:dayTimeDuration('PT0S')) then "Z" else let $tzh := fn:hours-from-duration($tz) let $tzm := fn:minutes-from-duration($tz) let $plusMinus := if ($tzh >= 0) then "+" else "-" let $tzhString := eg:convertTo2CharString(fn:abs($tzh)) let $tzmString := eg:convertTo2CharString(fn:abs($tzm)) return fn:concat($plusMinus, $tzhString, ":", $tzmString) }
+declare function eg:convertYearToString($year as xs:integer) as xs:string
+{
+ let $plusMinus := if ($year >= 0) then "" else "-"
+ let $yearString := fn:abs($year) cast as xs:string
+ let $length := fn:string-length($yearString)
+ return
+ if ($length = 1) then fn:concat($plusMinus, "000", $yearString)
+ else
+ if ($length = 2) then fn:concat($plusMinus, "00", $yearString)
+ else
+ if ($length = 3) then fn:concat($plusMinus, "0", $yearString)
+ else fn:concat($plusMinus, $yearString)
+}
+
+</pre>
+ </div>
+ <div class="exampleInner">
+ <pre>
+declare function eg:convertTo2CharString($value as xs:integer) as xs:string
+{
+ let $string := $value cast as xs:string
+ return
+ if (fn:string-length($string) = 1) then fn:concat("0", $string)
+ else $string
+}
+
+</pre>
+ </div>
+ <div class="exampleInner">
+ <pre>
+declare function eg:convertSecondsToString($seconds as xs:decimal) as xs:string
+{
+ let $string := $seconds cast as xs:string
+ let $intLength := fn:string-length(($seconds cast as xs:integer) cast as xs:string)
+ return
+ if ($intLength = 1) then fn:concat("0", $string)
+ else $string
+}
+
+</pre>
+ </div>
+ <div class="exampleInner">
+ <pre>
+declare function eg:convertTZtoString($tz as xs:dayTimeDuration?) as xs:string
+{
+ if (empty($tz))
+ then ""
+ else if ($tz eq xs:dayTimeDuration('PT0S'))
+ then "Z"
+ else
+ let $tzh := fn:hours-from-duration($tz)
+ let $tzm := fn:minutes-from-duration($tz)
+ let $plusMinus := if ($tzh >= 0) then "+" else "-"
+ let $tzhString := eg:convertTo2CharString(fn:abs($tzh))
+ let $tzmString := eg:convertTo2CharString(fn:abs($tzm))
+ return fn:concat($plusMinus, $tzhString, ":", $tzmString)
+}
+
+
</pre>
</div>
<p>Conversion from primitive types to date and time types follows
@@ -20446,8 +20686,8 @@
</dt>
<dd>
<div>ISO (International Organization for Standardization).
-<em>ISO/IEC 10967-1:1994, Information technology—Language
-Independent Arithmetic—Part 1: Integer and floating point
+<em>ISO/IEC 10967-1:1994, Information technology—Language
+Independent Arithmetic—Part 1: Integer and floating point
arithmetic</em> [Geneva]: International Organization for
Standardization, 1994. Available from: <a href="http://www.iso.org/">http://www.iso.org/</a>
</div>
@@ -20464,7 +20704,7 @@
for the latest version and additional information on versions of
the standard and of the Unicode Character Database. The version of
Unicode to be used is <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a>, but implementations are recommended to use
the latest Unicode version; currently, Version 4.0.00,
Addison-Wesley, 2003 ISBN 0-321-18578-1</div>
@@ -21618,13 +21858,32 @@
<p>XSLT implementation</p>
<div class="exampleInner">
<pre>
- <xsl:function name="eg:if-empty" as="xs:anyAtomicType*"> <xsl:param name="node" as="node()?"/> <xsl:param name="value" as="xs:anyAtomicType"/> <xsl:choose> <xsl:when test="$node and $node/child::node()"> <xsl:sequence select="fn:data($node)"/> </xsl:when> <xsl:otherwise> <xsl:sequence select="$value"/> </xsl:otherwise> </xsl:choose> </xsl:function>
+<xsl:function name="eg:if-empty" as="xs:anyAtomicType*">
+ <xsl:param name="node" as="node()?"/>
+ <xsl:param name="value" as="xs:anyAtomicType"/>
+ <xsl:choose>
+ <xsl:when test="$node and $node/child::node()">
+ <xsl:sequence select="fn:data($node)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:sequence select="$value"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:function>
</pre>
</div>
<p>XQuery implementation</p>
<div class="exampleInner">
<pre>
- declare function eg:if-empty ( $node as node()?, $value as xs:anyAtomicType) as xs:anyAtomicType* { if ($node and $node/child::node()) then fn:data($node) else $value }
+declare function eg:if-empty (
+ $node as node()?,
+ $value as xs:anyAtomicType) as xs:anyAtomicType*
+{
+ if ($node and $node/child::node())
+ then fn:data($node)
+ else $value
+}
+
</pre>
</div>
</div>
@@ -21663,13 +21922,32 @@
<p>XSLT implementation</p>
<div class="exampleInner">
<pre>
- <xsl:function name="eg:if-absent"> <xsl:param name="node" as="node()?"/> <xsl:param name="value" as="xs:anyAtomicType"/> <xsl:choose> <xsl:when test="$node"> <xsl:sequence select="fn:data($node)"/> </xsl:when> <xsl:otherwise> <xsl:sequence select="$value"/> </xsl:otherwise> </xsl:choose> </xsl:function>
+<xsl:function name="eg:if-absent">
+ <xsl:param name="node" as="node()?"/>
+ <xsl:param name="value" as="xs:anyAtomicType"/>
+ <xsl:choose>
+ <xsl:when test="$node">
+ <xsl:sequence select="fn:data($node)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:sequence select="$value"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:function>
</pre>
</div>
<p>XQuery implementation</p>
<div class="exampleInner">
<pre>
- declare function eg:if-absent ( $node as node()?, $value as xs:anyAtomicType) as xs:anyAtomicType* { if ($node) then fn:data($node) else $value }
+declare function eg:if-absent (
+ $node as node()?,
+ $value as xs:anyAtomicType) as xs:anyAtomicType*
+{
+ if ($node)
+ then fn:data($node)
+ else $value
+}
+
</pre>
</div>
</div>
@@ -21713,13 +21991,24 @@
<p>XSLT implementation</p>
<div class="exampleInner">
<pre>
- xsl:function name="eg:value-union" as="xs:anyAtomicType*"> <xsl:param name="arg1" as="xs:anyAtomicType*"/> <xsl:param name="arg2" as="xs:anyAtomicType*"/> <xsl:sequence select="fn:distinct-values(($arg1, $arg2))"/> </xsl:function>
+xsl:function name="eg:value-union" as="xs:anyAtomicType*">
+ <xsl:param name="arg1" as="xs:anyAtomicType*"/>
+ <xsl:param name="arg2" as="xs:anyAtomicType*"/>
+ <xsl:sequence
+ select="fn:distinct-values(($arg1, $arg2))"/>
+</xsl:function>
</pre>
</div>
<p>XQuery implementation</p>
<div class="exampleInner">
<pre>
- declare function eg:value-union ( $arg1 as xs:anyAtomicType*, $arg2 as xs:anyAtomicType*) as xs:anyAtomicType* { fn:distinct-values(($arg1, $arg2)) }
+declare function eg:value-union (
+ $arg1 as xs:anyAtomicType*,
+ $arg2 as xs:anyAtomicType*) as xs:anyAtomicType*
+{
+ fn:distinct-values(($arg1, $arg2))
+}
+
</pre>
</div>
</div>
@@ -21759,13 +22048,24 @@
<p>XSLT implementation></p>
<div class="exampleInner">
<pre>
- <xsl:function name="eg:value-intersect" as="xs:anyAtomicType*"> <xsl:param name="arg1" as="xs:anyAtomicType*"/> <xsl:param name="arg2" as="xs:anyAtomicType*"/> <xsl:sequence select="fn:distinct-values($arg1[.=$arg2])"/> </xsl:function>
+<xsl:function name="eg:value-intersect" as="xs:anyAtomicType*">
+ <xsl:param name="arg1" as="xs:anyAtomicType*"/>
+ <xsl:param name="arg2" as="xs:anyAtomicType*"/>
+ <xsl:sequence
+ select="fn:distinct-values($arg1[.=$arg2])"/>
+</xsl:function>
</pre>
</div>
<p>XQuery implementation</p>
<div class="exampleInner">
<pre>
- declare function eg:value-intersect ( $arg1 as xs:anyAtomicType*, $arg2 as xs:anyAtomicType* ) as xs:anyAtomicType* { fn:distinct-values($arg1[.=$arg2]) }
+declare function eg:value-intersect (
+ $arg1 as xs:anyAtomicType*,
+ $arg2 as xs:anyAtomicType* ) as xs:anyAtomicType*
+{
+ fn:distinct-values($arg1[.=$arg2])
+}
+
</pre>
</div>
</div>
@@ -21805,13 +22105,23 @@
<p>XSLT implementation</p>
<div class="exampleInner">
<pre>
- <xsl:function name="eg:value-except" as="xs:anyAtomicType*"> <xsl:param name="arg1" as="xs:anyAtomicType*"/> <xsl:param name="arg2" as="xs:anyAtomicType*"/> <xsl:sequence select="fn:distinct-values($arg1[not(.=$arg2)])"/> </xsl:function>
+<xsl:function name="eg:value-except" as="xs:anyAtomicType*">
+ <xsl:param name="arg1" as="xs:anyAtomicType*"/>
+ <xsl:param name="arg2" as="xs:anyAtomicType*"/>
+ <xsl:sequence
+ select="fn:distinct-values($arg1[not(.=$arg2)])"/>
+</xsl:function>
</pre>
</div>
<p>XQuery implementation</p>
<div class="exampleInner">
<pre>
- declare function eg:value-except ( $arg1 as xs:anyAtomicType*, $arg2 as xs:anyAtomicType*) as xs:anyAtomicType* { fn:distinct-values($arg1[not(.=$arg2)]) }
+declare function eg:value-except (
+ $arg1 as xs:anyAtomicType*,
+ $arg2 as xs:anyAtomicType*) as xs:anyAtomicType*
+{
+ fn:distinct-values($arg1[not(.=$arg2)])
+}
</pre>
</div>
</div>
@@ -21846,13 +22156,24 @@
<p>XSLT implementation</p>
<div class="exampleInner">
<pre>
- <xsl:function name="eg:index-of-node" as="xs:integer*"> <xsl:param name="sequence" as="node()*"/> <xsl:param name="srch" as="node()"/> <xsl:for-each select="$sequence"> <xsl:if test=". is $srch"> <xsl:sequence select="position()"/> </xsl:if> </xsl:for-each> </xsl:function>
+<xsl:function name="eg:index-of-node" as="xs:integer*">
+ <xsl:param name="sequence" as="node()*"/>
+ <xsl:param name="srch" as="node()"/>
+ <xsl:for-each select="$sequence">
+ <xsl:if test=". is $srch">
+ <xsl:sequence select="position()"/>
+ </xsl:if>
+ </xsl:for-each>
+</xsl:function>
</pre>
</div>
<p>XQuery implementation</p>
<div class="exampleInner">
<pre>
- declare function eg:index-of-node($sequence as node()*, $srch as node()) as xs:integer* { for $n at $i in $sequence where ($n is $srch) return $i }
+declare function eg:index-of-node($sequence as node()*, $srch as node()) as xs:integer*
+{
+ for $n at $i in $sequence where ($n is $srch) return $i
+}
</pre>
</div>
</div>
@@ -21875,13 +22196,26 @@
<p>XSLT implementation</p>
<div class="exampleInner">
<pre>
- <xsl:function name="eg:string-pad" as="xs:string"> <xsl:param name="padString" as="xs:string?"/> <xsl:param name="padCount" as="xs:integer"/> <xsl:sequence select="fn:string-join((for $i in 1 to $padCount return $padString), '')"/> </xsl:function>
+<xsl:function name="eg:string-pad" as="xs:string">
+ <xsl:param name="padString" as="xs:string?"/>
+ <xsl:param name="padCount" as="xs:integer"/>
+ <xsl:sequence select="fn:string-join((for $i in 1 to $padCount
+ return $padString), '')"/>
+ </xsl:function>
+
</pre>
</div>
<p>XQuery implementation</p>
<div class="exampleInner">
<pre>
- declare function eg:string-pad ( $padString as xs:string?, $padCount as xs:integer) as xs:string { fn:string-join((for $i in 1 to $padCount return $padString), "") }
+declare function eg:string-pad (
+ $padString as xs:string?,
+ $padCount as xs:integer) as xs:string
+{
+ fn:string-join((for $i in 1 to $padCount return $padString), "")
+}
+
+
</pre>
</div>
<p>This returns the zero-length string if <code>$padString</code>
@@ -21906,19 +22240,30 @@
<p>XPath</p>
<div class="exampleInner">
<pre>
- $arg[empty(subsequence($arg, 1, position()-1) intersect .)]
+$arg[empty(subsequence($arg, 1, position()-1) intersect .)]
+
</pre>
</div>
<p>XSLT implementation</p>
<div class="exampleInner">
<pre>
- <xsl:function name="eg:distinct-nodes-stable" as="node()*"> <xsl:param name="arg" as="node()*"/> <xsl:sequence select="$arg[empty(subsequence($arg, 1, position()-1) intersect .)]"/> </xsl:function>
+<xsl:function name="eg:distinct-nodes-stable" as="node()*">
+ <xsl:param name="arg" as="node()*"/>
+ <xsl:sequence
+ select="$arg[empty(subsequence($arg, 1, position()-1) intersect .)]"/> </xsl:function>
+
</pre>
</div>
<p>XQuery implementation</p>
<div class="exampleInner">
<pre>
- declare function distinct-nodes-stable ($arg as node()*) as node()* { for $a at $apos in $arg let $before_a := fn:subsequence($arg, 1, $apos - 1) where every $ba in $before_a satisfies not($ba is $a) return $a }
+declare function distinct-nodes-stable ($arg as node()*) as node()*
+{
+ for $a at $apos in $arg
+ let $before_a := fn:subsequence($arg, 1, $apos - 1)
+ where every $ba in $before_a satisfies not($ba is $a)
+ return $a
+}
</pre>
</div>
</div>
@@ -21929,14 +22274,14 @@
Implementation-Defined Features (Non-Normative)</h2>
<p>This appendix provides a summary of features defined in this
specification whose effect is explicitly <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a>. The conformance rules require vendors to
provide documentation that explains how these choices have been
exercised.</p>
<ol class="enumar">
<li>
<p>The destination of the trace output is <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a>. See <a href="#func-trace">
<b>4 The Trace
Function</b>
@@ -21945,10 +22290,9 @@
<li>
<p>For <code>xs:integer</code> operations, implementations that
support limited-precision integer operations <a title="must" class="termref" href="#must">
- <span class="arrow">·</span>must<span class="arrow">·</span>
- </a> either raise
-an error [<a href="#ERRFOAR0002" title="err:FOAR0002">err:FOAR0002</a>] or provide an <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>must<span class="arrow">·</span>
+ </a> either raise an error [<a href="#ERRFOAR0002" title="err:FOAR0002">err:FOAR0002</a>] or provide an <a title="implementation-defined" class="termref" href="#implementation-defined">
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a> mechanism that allows users to choose between
raising an error and returning a result that is modulo the largest
representable integer value. See <a href="#op.numeric">
@@ -21959,10 +22303,10 @@
<li>
<p>For <code>xs:decimal</code> values the number of digits of
precision returned by the numeric operators is <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a>. See <a href="#op.numeric">
- <b>6.2 Operators
-on Numeric Values</b>
+ <b>6.2 Operators on
+Numeric Values</b>
</a>. See also <a href="#casting-to-decimal">
<b>17.1.3.3 Casting to xs:decimal</b>
</a> and
@@ -21976,7 +22320,7 @@
<p>If the number of digits in the result of a numeric operation
exceeds the number of digits that the implementation supports, the
result is truncated or rounded in an <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a> manner. See <a href="#op.numeric">
<b>6.2
Operators on Numeric Values</b>
@@ -21991,7 +22335,7 @@
</li>
<li>
<p>It is <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a> which version of Unicode is supported by the
features defined in this specification, but it is recommended that
the most recent version of Unicode be used. See <a href="#string-types">
@@ -22003,22 +22347,22 @@
<b>7.4.6
fn:normalize-unicode</b>
</a>, conforming implementations <a title="must" class="termref" href="#must">
- <span class="arrow">·</span>must<span class="arrow">·</span>
+ <span class="arrow">·</span>must<span class="arrow">·</span>
</a> support
normalization form "NFC" and <a title="may" class="termref" href="#may">
- <span class="arrow">·</span>may<span class="arrow">·</span>
+ <span class="arrow">·</span>may<span class="arrow">·</span>
</a> support normalization forms "NFD", "NFKC",
"NFKD", "FULLY-NORMALIZED". They <a title="may" class="termref" href="#may">
- <span class="arrow">·</span>may<span class="arrow">·</span>
+ <span class="arrow">·</span>may<span class="arrow">·</span>
</a> also support other normalization forms with
<a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a> semantics.</p>
</li>
<li>
<p>The ability to decompose strings into collation units suitable
for substring matching is an <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a> property of a collation. See <a href="#substring.functions">
<b>7.5 Functions Based on Substring
Matching</b>
@@ -22026,16 +22370,16 @@
</li>
<li>
<p>All <em>minimally conforming</em> processors <a title="must" class="termref" href="#must">
- <span class="arrow">·</span>must<span class="arrow">·</span>
+ <span class="arrow">·</span>must<span class="arrow">·</span>
</a> support year
values with a minimum of 4 digits (i.e., YYYY) and a minimum
fractional second precision of 1 millisecond or three digits (i.e.,
s.sss). However, <em>conforming processors</em>
<a title="may" class="termref" href="#may">
- <span class="arrow">·</span>may<span class="arrow">·</span>
+ <span class="arrow">·</span>may<span class="arrow">·</span>
</a> set larger
<a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a> limits on the maximum number of digits they
support in these two situations. See <a href="#date-time-duration-conformance">
<b>10.1.1 Limits and
@@ -22055,7 +22399,7 @@
<p>Various aspects of the processing provided by <a href="#func-doc">
<b>15.5.4 fn:doc</b>
</a> are <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a>. Implementations may provide external
configuration options that allow any aspect of the processing to be
controlled by the user.</p>
@@ -22063,7 +22407,7 @@
<li>
<p>The manner in which implementations provide options to weaken
the <a title="stable" class="termref" href="#stable">
- <span class="arrow">·</span>stable<span class="arrow">·</span>
+ <span class="arrow">·</span>stable<span class="arrow">·</span>
</a>
characteristic of <a href="#func-collection">
<b>15.5.6
@@ -22072,7 +22416,7 @@
<b>15.5.4
fn:doc</b>
</a> are <a title="implementation-defined" class="termref" href="#implementation-defined">
- <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
</a>.</p>
</li>
</ol>
@@ -25091,7 +25435,7 @@
<code> as </code>
<code>xs:NOTATION</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-NOTATION-equal">13.1.1</a>)</div>
+(§<a href="#func-NOTATION-equal">13.1.1</a>)</div>
<div class="protoref">
<a href="#func-QName">
<code>fn:QName</code>
@@ -25102,7 +25446,7 @@
<code> as </code>
<code>xs:string</code>)<code> as </code>
<code>xs:QName</code>
-(§<a href="#func-QName">11.1.2</a>)</div>
+(§<a href="#func-QName">11.1.2</a>)</div>
<div class="protoref">
<a href="#func-QName-equal">
<code>op:QName-equal</code>
@@ -25113,7 +25457,7 @@
<code> as </code>
<code>xs:QName</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-QName-equal">11.2.1</a>)</div>
+(§<a href="#func-QName-equal">11.2.1</a>)</div>
<div class="protoref">
<a href="#func-abs">
<code>fn:abs</code>
@@ -25121,7 +25465,7 @@
<code> as </code>
<code>numeric?</code>)<code> as </code>
<code>numeric?</code>
-(§<a href="#func-abs">6.4.1</a>)</div>
+(§<a href="#func-abs">6.4.1</a>)</div>
<div class="protoref">
<a href="#func-add-dayTimeDuration-to-date">
<code>op:add-dayTimeDuration-to-date</code>
@@ -25132,7 +25476,7 @@
<code> as </code>
<code>xs:dayTimeDuration</code>)<code> as </code>
<code>xs:date</code>
-(§<a href="#func-add-dayTimeDuration-to-date">10.8.9</a>)</div>
+(§<a href="#func-add-dayTimeDuration-to-date">10.8.9</a>)</div>
<div class="protoref">
<a href="#func-add-dayTimeDuration-to-dateTime">
<code>op:add-dayTimeDuration-to-dateTime</code>
@@ -25143,7 +25487,7 @@
<code> as </code>
<code>xs:dayTimeDuration</code>)<code> as </code>
<code>xs:dateTime</code>
-(§<a href="#func-add-dayTimeDuration-to-dateTime">10.8.5</a>)</div>
+(§<a href="#func-add-dayTimeDuration-to-dateTime">10.8.5</a>)</div>
<div class="protoref">
<a href="#func-add-dayTimeDuration-to-time">
<code>op:add-dayTimeDuration-to-time</code>
@@ -25154,7 +25498,7 @@
<code> as </code>
<code>xs:dayTimeDuration</code>)<code> as </code>
<code>xs:time</code>
-(§<a href="#func-add-dayTimeDuration-to-time">10.8.12</a>)</div>
+(§<a href="#func-add-dayTimeDuration-to-time">10.8.12</a>)</div>
<div class="protoref">
<a href="#func-add-dayTimeDurations">
<code>op:add-dayTimeDurations</code>
@@ -25165,7 +25509,7 @@
<code> as </code>
<code>xs:dayTimeDuration</code>)<code> as </code>
<code>xs:dayTimeDuration</code>
-(§<a href="#func-add-dayTimeDurations">10.6.6</a>)</div>
+(§<a href="#func-add-dayTimeDurations">10.6.6</a>)</div>
<div class="protoref">
<a href="#func-add-yearMonthDuration-to-date">
<code>op:add-yearMonthDuration-to-date</code>
@@ -25176,7 +25520,7 @@
<code> as </code>
<code>xs:yearMonthDuration</code>)<code> as </code>
<code>xs:date</code>
-(§<a href="#func-add-yearMonthDuration-to-date">10.8.8</a>)</div>
+(§<a href="#func-add-yearMonthDuration-to-date">10.8.8</a>)</div>
<div class="protoref">
<a href="#func-add-yearMonthDuration-to-dateTime">
<code>op:add-yearMonthDuration-to-dateTime</code>
@@ -25187,7 +25531,7 @@
<code> as </code>
<code>xs:yearMonthDuration</code>)<code> as </code>
<code>xs:dateTime</code>
-(§<a href="#func-add-yearMonthDuration-to-dateTime">10.8.4</a>)</div>
+(§<a href="#func-add-yearMonthDuration-to-dateTime">10.8.4</a>)</div>
<div class="protoref">
<a href="#func-add-yearMonthDurations">
<code>op:add-yearMonthDurations</code>
@@ -25198,7 +25542,7 @@
<code> as </code>
<code>xs:yearMonthDuration</code>)<code> as </code>
<code>xs:yearMonthDuration</code>
-(§<a href="#func-add-yearMonthDurations">10.6.1</a>)</div>
+(§<a href="#func-add-yearMonthDurations">10.6.1</a>)</div>
<div class="protoref">
<a href="#func-adjust-date-to-timezone">
<code>fn:adjust-date-to-timezone</code>
@@ -25206,7 +25550,7 @@
<code> as </code>
<code>xs:date?</code>)<code> as </code>
<code>xs:date?</code>
-(§<a href="#func-adjust-date-to-timezone">10.7.2</a>)</div>
+(§<a href="#func-adjust-date-to-timezone">10.7.2</a>)</div>
<div class="protoref">
<a href="#func-adjust-date-to-timezone">
<code>fn:adjust-date-to-timezone</code>
@@ -25217,7 +25561,7 @@
<code> as </code>
<code>xs:dayTimeDuration?</code>)<code> as </code>
<code>xs:date?</code>
-(§<a href="#func-adjust-date-to-timezone">10.7.2</a>)</div>
+(§<a href="#func-adjust-date-to-timezone">10.7.2</a>)</div>
<div class="protoref">
<a href="#func-adjust-dateTime-to-timezone">
<code>fn:adjust-dateTime-to-timezone</code>
@@ -25225,7 +25569,7 @@
<code> as </code>
<code>xs:dateTime?</code>)<code> as </code>
<code>xs:dateTime?</code>
-(§<a href="#func-adjust-dateTime-to-timezone">10.7.1</a>)</div>
+(§<a href="#func-adjust-dateTime-to-timezone">10.7.1</a>)</div>
<div class="protoref">
<a href="#func-adjust-dateTime-to-timezone">
<code>fn:adjust-dateTime-to-timezone</code>
@@ -25236,7 +25580,7 @@
<code> as </code>
<code>xs:dayTimeDuration?</code>)<code> as </code>
<code>xs:dateTime?</code>
-(§<a href="#func-adjust-dateTime-to-timezone">10.7.1</a>)</div>
+(§<a href="#func-adjust-dateTime-to-timezone">10.7.1</a>)</div>
<div class="protoref">
<a href="#func-adjust-time-to-timezone">
<code>fn:adjust-time-to-timezone</code>
@@ -25244,7 +25588,7 @@
<code> as </code>
<code>xs:time?</code>)<code> as </code>
<code>xs:time?</code>
-(§<a href="#func-adjust-time-to-timezone">10.7.3</a>)</div>
+(§<a href="#func-adjust-time-to-timezone">10.7.3</a>)</div>
<div class="protoref">
<a href="#func-adjust-time-to-timezone">
<code>fn:adjust-time-to-timezone</code>
@@ -25255,7 +25599,7 @@
<code> as </code>
<code>xs:dayTimeDuration?</code>)<code> as </code>
<code>xs:time?</code>
-(§<a href="#func-adjust-time-to-timezone">10.7.3</a>)</div>
+(§<a href="#func-adjust-time-to-timezone">10.7.3</a>)</div>
<div class="protoref">
<a href="#func-avg">
<code>fn:avg</code>
@@ -25263,13 +25607,13 @@
<code> as </code>
<code>xs:anyAtomicType*</code>)<code> as </code>
<code>xs:anyAtomicType?</code>
-(§<a href="#func-avg">15.4.2</a>)</div>
+(§<a href="#func-avg">15.4.2</a>)</div>
<div class="protoref">
<a href="#func-base-uri">
<code>fn:base-uri</code>
</a>()<code> as </code>
<code>xs:anyURI?</code>
-(§<a href="#func-base-uri">2.5</a>)</div>
+(§<a href="#func-base-uri">2.5</a>)</div>
<div class="protoref">
<a href="#func-base-uri">
<code>fn:base-uri</code>
@@ -25277,7 +25621,7 @@
<code> as </code>
<code>node()?</code>)<code> as </code>
<code>xs:anyURI?</code>
-(§<a href="#func-base-uri">2.5</a>)</div>
+(§<a href="#func-base-uri">2.5</a>)</div>
<div class="protoref">
<a href="#func-base64Binary-equal">
<code>op:base64Binary-equal</code>
@@ -25288,7 +25632,7 @@
<code> as </code>
<code>xs:base64Binary</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-base64Binary-equal">12.1.2</a>)</div>
+(§<a href="#func-base64Binary-equal">12.1.2</a>)</div>
<div class="protoref">
<a href="#func-boolean">
<code>fn:boolean</code>
@@ -25296,7 +25640,7 @@
<code> as </code>
<code>item()*</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-boolean">15.1.1</a>)</div>
+(§<a href="#func-boolean">15.1.1</a>)</div>
<div class="protoref">
<a href="#func-boolean-equal">
<code>op:boolean-equal</code>
@@ -25307,7 +25651,7 @@
<code> as </code>
<code>xs:boolean</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-boolean-equal">9.2.1</a>)</div>
+(§<a href="#func-boolean-equal">9.2.1</a>)</div>
<div class="protoref">
<a href="#func-boolean-greater-than">
<code>op:boolean-greater-than</code>
@@ -25318,7 +25662,7 @@
<code> as </code>
<code>xs:boolean</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-boolean-greater-than">9.2.3</a>)</div>
+(§<a href="#func-boolean-greater-than">9.2.3</a>)</div>
<div class="protoref">
<a href="#func-boolean-less-than">
<code>op:boolean-less-than</code>
@@ -25329,7 +25673,7 @@
<code> as </code>
<code>xs:boolean</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-boolean-less-than">9.2.2</a>)</div>
+(§<a href="#func-boolean-less-than">9.2.2</a>)</div>
<div class="protoref">
<a href="#func-ceiling">
<code>fn:ceiling</code>
@@ -25337,7 +25681,7 @@
<code> as </code>
<code>numeric?</code>)<code> as </code>
<code>numeric?</code>
-(§<a href="#func-ceiling">6.4.2</a>)</div>
+(§<a href="#func-ceiling">6.4.2</a>)</div>
<div class="protoref">
<a href="#func-codepoint-equal">
<code>fn:codepoint-equal</code>
@@ -25348,7 +25692,7 @@
<code> as </code>
<code>xs:string?</code>)<code> as </code>
<code>xs:boolean?</code>
-(§<a href="#func-codepoint-equal">7.3.3</a>)</div>
+(§<a href="#func-codepoint-equal">7.3.3</a>)</div>
<div class="protoref">
<a href="#func-codepoints-to-string">
<code>fn:codepoints-to-string</code>
@@ -25356,13 +25700,13 @@
<code> as </code>
<code>xs:integer*</code>)<code> as </code>
<code>xs:string</code>
-(§<a href="#func-codepoints-to-string">7.2.1</a>)</div>
+(§<a href="#func-codepoints-to-string">7.2.1</a>)</div>
<div class="protoref">
<a href="#func-collection">
<code>fn:collection</code>
</a>()<code> as </code>
<code>node()*</code>
-(§<a href="#func-collection">15.5.6</a>)</div>
+(§<a href="#func-collection">15.5.6</a>)</div>
<div class="protoref">
<a href="#func-collection">
<code>fn:collection</code>
@@ -25370,7 +25714,7 @@
<code> as </code>
<code>xs:string?</code>)<code> as </code>
<code>node()*</code>
-(§<a href="#func-collection">15.5.6</a>)</div>
+(§<a href="#func-collection">15.5.6</a>)</div>
<div class="protoref">
<a href="#func-compare">
<code>fn:compare</code>
@@ -25381,7 +25725,7 @@
<code> as </code>
<code>xs:string?</code>)<code> as </code>
<code>xs:integer?</code>
-(§<a href="#func-compare">7.3.2</a>)</div>
+(§<a href="#func-compare">7.3.2</a>)</div>
<div class="protoref">
<a href="#func-compare">
<code>fn:compare</code>
@@ -25395,7 +25739,7 @@
<code> as </code>
<code>xs:string</code>)<code> as </code>
<code>xs:integer?</code>
-(§<a href="#func-compare">7.3.2</a>)</div>
+(§<a href="#func-compare">7.3.2</a>)</div>
<div class="protoref">
<a href="#func-concat">
<code>fn:concat</code>
@@ -25407,7 +25751,7 @@
<code>xs:anyAtomicType?</code>,
<span class="varargs">...</span>)<code> as </code>
<code>xs:string</code>
-(§<a href="#func-concat">7.4.1</a>)</div>
+(§<a href="#func-concat">7.4.1</a>)</div>
<div class="protoref">
<a href="#func-concatenate">
<code>op:concatenate</code>
@@ -25418,7 +25762,7 @@
<code> as </code>
<code>item()*</code>)<code> as </code>
<code>item()*</code>
-(§<a href="#func-concatenate">15.1.2</a>)</div>
+(§<a href="#func-concatenate">15.1.2</a>)</div>
<div class="protoref">
<a href="#func-contains">
<code>fn:contains</code>
@@ -25429,7 +25773,7 @@
<code> as </code>
<code>xs:string?</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-contains">7.5.1</a>)</div>
+(§<a href="#func-contains">7.5.1</a>)</div>
<div class="protoref">
<a href="#func-contains">
<code>fn:contains</code>
@@ -25443,7 +25787,7 @@
<code> as </code>
<code>xs:string</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-contains">7.5.1</a>)</div>
+(§<a href="#func-contains">7.5.1</a>)</div>
<div class="protoref">
<a href="#func-count">
<code>fn:count</code>
@@ -25451,25 +25795,25 @@
<code> as </code>
<code>item()*</code>)<code> as </code>
<code>xs:integer</code>
-(§<a href="#func-count">15.4.1</a>)</div>
+(§<a href="#func-count">15.4.1</a>)</div>
<div class="protoref">
<a href="#func-current-date">
<code>fn:current-date</code>
</a>()<code> as </code>
<code>xs:date</code>
-(§<a href="#func-current-date">16.4</a>)</div>
+(§<a href="#func-current-date">16.4</a>)</div>
<div class="protoref">
<a href="#func-current-dateTime">
<code>fn:current-dateTime</code>
</a>()<code> as </code>
<code>xs:dateTime</code>
-(§<a href="#func-current-dateTime">16.3</a>)</div>
+(§<a href="#func-current-dateTime">16.3</a>)</div>
<div class="protoref">
<a href="#func-current-time">
<code>fn:current-time</code>
</a>()<code> as </code>
<code>xs:time</code>
-(§<a href="#func-current-time">16.5</a>)</div>
+(§<a href="#func-current-time">16.5</a>)</div>
<div class="protoref">
<a href="#func-data">
<code>fn:data</code>
@@ -25477,7 +25821,7 @@
<code> as </code>
<code>item()*</code>)<code> as </code>
<code>xs:anyAtomicType*</code>
-(§<a href="#func-data">2.4</a>)</div>
+(§<a href="#func-data">2.4</a>)</div>
<div class="protoref">
<a href="#func-date-equal">
<code>op:date-equal</code>
@@ -25488,7 +25832,7 @@
<code> as </code>
<code>xs:date</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-date-equal">10.4.9</a>)</div>
+(§<a href="#func-date-equal">10.4.9</a>)</div>
<div class="protoref">
<a href="#func-date-greater-than">
<code>op:date-greater-than</code>
@@ -25499,7 +25843,7 @@
<code> as </code>
<code>xs:date</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-date-greater-than">10.4.11</a>)</div>
+(§<a href="#func-date-greater-than">10.4.11</a>)</div>
<div class="protoref">
<a href="#func-date-less-than">
<code>op:date-less-than</code>
@@ -25510,7 +25854,7 @@
<code> as </code>
<code>xs:date</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-date-less-than">10.4.10</a>)</div>
+(§<a href="#func-date-less-than">10.4.10</a>)</div>
<div class="protoref">
<a href="#func-dateTime">
<code>fn:dateTime</code>
@@ -25521,7 +25865,7 @@
<code> as </code>
<code>xs:time?</code>)<code> as </code>
<code>xs:dateTime?</code>
-(§<a href="#func-dateTime">5.2</a>)</div>
+(§<a href="#func-dateTime">5.2</a>)</div>
<div class="protoref">
<a href="#func-dateTime-equal">
<code>op:dateTime-equal</code>
@@ -25532,7 +25876,7 @@
<code> as </code>
<code>xs:dateTime</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-dateTime-equal">10.4.6</a>)</div>
+(§<a href="#func-dateTime-equal">10.4.6</a>)</div>
<div class="protoref">
<a href="#func-dateTime-greater-than">
<code>op:dateTime-greater-than</code>
@@ -25543,7 +25887,7 @@
<code> as </code>
<code>xs:dateTime</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-dateTime-greater-than">10.4.8</a>)</div>
+(§<a href="#func-dateTime-greater-than">10.4.8</a>)</div>
<div class="protoref">
<a href="#func-dateTime-less-than">
<code>op:dateTime-less-than</code>
@@ -25554,7 +25898,7 @@
<code> as </code>
<code>xs:dateTime</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-dateTime-less-than">10.4.7</a>)</div>
+(§<a href="#func-dateTime-less-than">10.4.7</a>)</div>
<div class="protoref">
<a href="#func-day-from-date">
<code>fn:day-from-date</code>
@@ -25562,7 +25906,7 @@
<code> as </code>
<code>xs:date?</code>)<code> as </code>
<code>xs:integer?</code>
-(§<a href="#func-day-from-date">10.5.16</a>)</div>
+(§<a href="#func-day-from-date">10.5.16</a>)</div>
<div class="protoref">
<a href="#func-day-from-dateTime">
<code>fn:day-from-dateTime</code>
@@ -25570,7 +25914,7 @@
<code> as </code>
<code>xs:dateTime?</code>)<code> as </code>
<code>xs:integer?</code>
-(§<a href="#func-day-from-dateTime">10.5.9</a>)</div>
+(§<a href="#func-day-from-dateTime">10.5.9</a>)</div>
<div class="protoref">
<a href="#func-dayTimeDuration-greater-than">
<code>op:dayTimeDuration-greater-than</code>
@@ -25581,7 +25925,7 @@
<code> as </code>
<code>xs:dayTimeDuration</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-dayTimeDuration-greater-than">10.4.4</a>)</div>
+(§<a href="#func-dayTimeDuration-greater-than">10.4.4</a>)</div>
<div class="protoref">
<a href="#func-dayTimeDuration-less-than">
<code>op:dayTimeDuration-less-than</code>
@@ -25592,7 +25936,7 @@
<code> as </code>
<code>xs:dayTimeDuration</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-dayTimeDuration-less-than">10.4.3</a>)</div>
+(§<a href="#func-dayTimeDuration-less-than">10.4.3</a>)</div>
<div class="protoref">
<a href="#func-days-from-duration">
<code>fn:days-from-duration</code>
@@ -25600,7 +25944,7 @@
<code> as </code>
<code>xs:duration?</code>)<code> as </code>
<code>xs:integer?</code>
-(§<a href="#func-days-from-duration">10.5.3</a>)</div>
+(§<a href="#func-days-from-duration">10.5.3</a>)</div>
<div class="protoref">
<a href="#func-deep-equal">
<code>fn:deep-equal</code>
@@ -25611,7 +25955,7 @@
<code> as </code>
<code>item()*</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-deep-equal">15.3.1</a>)</div>
+(§<a href="#func-deep-equal">15.3.1</a>)</div>
<div class="protoref">
<a href="#func-deep-equal">
<code>fn:deep-equal</code>
@@ -25625,13 +25969,13 @@
<code> as </code>
<code>string</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-deep-equal">15.3.1</a>)</div>
+(§<a href="#func-deep-equal">15.3.1</a>)</div>
<div class="protoref">
<a href="#func-default-collation">
<code>fn:default-collation</code>
</a>()<code> as </code>
<code>xs:string</code>
-(§<a href="#func-default-collation">16.7</a>)</div>
+(§<a href="#func-default-collation">16.7</a>)</div>
<div class="protoref">
<a href="#func-distinct-values">
<code>fn:distinct-values</code>
@@ -25639,7 +25983,7 @@
<code> as </code>
<code>xs:anyAtomicType*</code>)<code> as </code>
<code>xs:anyAtomicType*</code>
-(§<a href="#func-distinct-values">15.1.6</a>)</div>
+(§<a href="#func-distinct-values">15.1.6</a>)</div>
<div class="protoref">
<a href="#func-distinct-values">
<code>fn:distinct-values</code>
@@ -25650,7 +25994,7 @@
<code> as </code>
<code>xs:string</code>)<code> as </code>
<code>xs:anyAtomicType*</code>
-(§<a href="#func-distinct-values">15.1.6</a>)</div>
+(§<a href="#func-distinct-values">15.1.6</a>)</div>
<div class="protoref">
<a href="#func-divide-dayTimeDuration">
<code>op:divide-dayTimeDuration</code>
@@ -25661,7 +26005,7 @@
<code> as </code>
<code>xs:double</code>)<code> as </code>
<code>xs:dayTimeDuration</code>
-(§<a href="#func-divide-dayTimeDuration">10.6.9</a>)</div>
+(§<a href="#func-divide-dayTimeDuration">10.6.9</a>)</div>
<div class="protoref">
<a href="#func-divide-dayTimeDuration-by-dayTimeDuration">
<code>op:divide-dayTimeDuration-by-dayTimeDuration</code>
@@ -25672,7 +26016,7 @@
<code> as </code>
<code>xs:dayTimeDuration</code>)<code> as </code>
<code>xs:decimal</code>
-(§<a href="#func-divide-dayTimeDuration-by-dayTimeDuration">10.6.10</a>)</div>
+(§<a href="#func-divide-dayTimeDuration-by-dayTimeDuration">10.6.10</a>)</div>
<div class="protoref">
<a href="#func-divide-yearMonthDuration">
<code>op:divide-yearMonthDuration</code>
@@ -25683,7 +26027,7 @@
<code> as </code>
<code>xs:double</code>)<code> as </code>
<code>xs:yearMonthDuration</code>
-(§<a href="#func-divide-yearMonthDuration">10.6.4</a>)</div>
+(§<a href="#func-divide-yearMonthDuration">10.6.4</a>)</div>
<div class="protoref">
<a href="#func-divide-yearMonthDuration-by-yearMonthDuration">
<code>op:divide-yearMonthDuration-by-yearMonthDuration</code>
@@ -25694,7 +26038,7 @@
<code> as </code>
<code>xs:yearMonthDuration</code>)<code> as </code>
<code>xs:decimal</code>
-(§<a href="#func-divide-yearMonthDuration-by-yearMonthDuration">10.6.5</a>)</div>
+(§<a href="#func-divide-yearMonthDuration-by-yearMonthDuration">10.6.5</a>)</div>
<div class="protoref">
<a href="#func-doc">
<code>fn:doc</code>
@@ -25702,7 +26046,7 @@
<code> as </code>
<code>xs:string?</code>)<code> as </code>
<code>document-node()?</code>
-(§<a href="#func-doc">15.5.4</a>)</div>
+(§<a href="#func-doc">15.5.4</a>)</div>
<div class="protoref">
<a href="#func-doc-available">
<code>fn:doc-available</code>
@@ -25710,7 +26054,7 @@
<code> as </code>
<code>xs:string?</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-doc-available">15.5.5</a>)</div>
+(§<a href="#func-doc-available">15.5.5</a>)</div>
<div class="protoref">
<a href="#func-document-uri">
<code>fn:document-uri</code>
@@ -25718,7 +26062,7 @@
<code> as </code>
<code>node()?</code>)<code> as </code>
<code>xs:anyURI?</code>
-(§<a href="#func-document-uri">2.6</a>)</div>
+(§<a href="#func-document-uri">2.6</a>)</div>
<div class="protoref">
<a href="#func-duration-equal">
<code>op:duration-equal</code>
@@ -25729,7 +26073,7 @@
<code> as </code>
<code>xs:duration</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-duration-equal">10.4.5</a>)</div>
+(§<a href="#func-duration-equal">10.4.5</a>)</div>
<div class="protoref">
<a href="#func-element-with-id">
<code>fn:element-with-id</code>
@@ -25737,7 +26081,7 @@
<code> as </code>
<code>xs:string*</code>)<code> as </code>
<code>element()*</code>
-(§<a href="#func-element-with-id">15.5.7</a>)</div>
+(§<a href="#func-element-with-id">15.5.7</a>)</div>
<div class="protoref">
<a href="#func-element-with-id">
<code>fn:element-with-id</code>
@@ -25748,7 +26092,7 @@
<code> as </code>
<code>node()</code>)<code> as </code>
<code>element()*</code>
-(§<a href="#func-element-with-id">15.5.7</a>)</div>
+(§<a href="#func-element-with-id">15.5.7</a>)</div>
<div class="protoref">
<a href="#func-empty">
<code>fn:empty</code>
@@ -25756,7 +26100,7 @@
<code> as </code>
<code>item()*</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-empty">15.1.4</a>)</div>
+(§<a href="#func-empty">15.1.4</a>)</div>
<div class="protoref">
<a href="#func-encode-for-uri">
<code>fn:encode-for-uri</code>
@@ -25764,7 +26108,7 @@
<code> as </code>
<code>xs:string?</code>)<code> as </code>
<code>xs:string</code>
-(§<a href="#func-encode-for-uri">7.4.10</a>)</div>
+(§<a href="#func-encode-for-uri">7.4.10</a>)</div>
<div class="protoref">
<a href="#func-ends-with">
<code>fn:ends-with</code>
@@ -25775,7 +26119,7 @@
<code> as </code>
<code>xs:string?</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-ends-with">7.5.3</a>)</div>
+(§<a href="#func-ends-with">7.5.3</a>)</div>
<div class="protoref">
<a href="#func-ends-with">
<code>fn:ends-with</code>
@@ -25789,13 +26133,13 @@
<code> as </code>
<code>xs:string</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-ends-with">7.5.3</a>)</div>
+(§<a href="#func-ends-with">7.5.3</a>)</div>
<div class="protoref">
<a href="#func-error">
<code>fn:error</code>
</a>()<code> as </code>
<code>none</code>
-(§<a href="#func-error">3</a>)</div>
+(§<a href="#func-error">3</a>)</div>
<div class="protoref">
<a href="#func-error">
<code>fn:error</code>
@@ -25803,7 +26147,7 @@
<code> as </code>
<code>xs:QName</code>)<code> as </code>
<code>none</code>
-(§<a href="#func-error">3</a>)</div>
+(§<a href="#func-error">3</a>)</div>
<div class="protoref">
<a href="#func-error">
<code>fn:error</code>
@@ -25814,7 +26158,7 @@
<code> as </code>
<code>xs:string</code>)<code> as </code>
<code>none</code>
-(§<a href="#func-error">3</a>)</div>
+(§<a href="#func-error">3</a>)</div>
<div class="protoref">
<a href="#func-error">
<code>fn:error</code>
@@ -25828,7 +26172,7 @@
<code> as </code>
<code>item()*</code>)<code> as </code>
<code>none</code>
-(§<a href="#func-error">3</a>)</div>
+(§<a href="#func-error">3</a>)</div>
<div class="protoref">
<a href="#func-escape-html-uri">
<code>fn:escape-html-uri</code>
@@ -25836,7 +26180,7 @@
<code> as </code>
<code>xs:string?</code>)<code> as </code>
<code>xs:string</code>
-(§<a href="#func-escape-html-uri">7.4.12</a>)</div>
+(§<a href="#func-escape-html-uri">7.4.12</a>)</div>
<div class="protoref">
<a href="#func-exactly-one">
<code>fn:exactly-one</code>
@@ -25844,7 +26188,7 @@
<code> as </code>
<code>item()*</code>)<code> as </code>
<code>item()</code>
-(§<a href="#func-exactly-one">15.2.3</a>)</div>
+(§<a href="#func-exactly-one">15.2.3</a>)</div>
<div class="protoref">
<a href="#func-except">
<code>op:except</code>
@@ -25855,7 +26199,7 @@
<code> as </code>
<code>node()*</code>)<code> as </code>
<code>node()*</code>
-(§<a href="#func-except">15.3.4</a>)</div>
+(§<a href="#func-except">15.3.4</a>)</div>
<div class="protoref">
<a href="#func-exists">
<code>fn:exists</code>
@@ -25863,13 +26207,13 @@
<code> as </code>
<code>item()*</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-exists">15.1.5</a>)</div>
+(§<a href="#func-exists">15.1.5</a>)</div>
<div class="protoref">
<a href="#func-false">
<code>fn:false</code>
</a>()<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-false">9.1.2</a>)</div>
+(§<a href="#func-false">9.1.2</a>)</div>
<div class="protoref">
<a href="#func-floor">
<code>fn:floor</code>
@@ -25877,7 +26221,7 @@
<code> as </code>
<code>numeric?</code>)<code> as </code>
<code>numeric?</code>
-(§<a href="#func-floor">6.4.3</a>)</div>
+(§<a href="#func-floor">6.4.3</a>)</div>
<div class="protoref">
<a href="#func-gDay-equal">
<code>op:gDay-equal</code>
@@ -25888,7 +26232,7 @@
<code> as </code>
<code>xs:gDay</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-gDay-equal">10.4.19</a>)</div>
+(§<a href="#func-gDay-equal">10.4.19</a>)</div>
<div class="protoref">
<a href="#func-gMonth-equal">
<code>op:gMonth-equal</code>
@@ -25899,7 +26243,7 @@
<code> as </code>
<code>xs:gMonth</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-gMonth-equal">10.4.18</a>)</div>
+(§<a href="#func-gMonth-equal">10.4.18</a>)</div>
<div class="protoref">
<a href="#func-gMonthDay-equal">
<code>op:gMonthDay-equal</code>
@@ -25910,7 +26254,7 @@
<code> as </code>
<code>xs:gMonthDay</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-gMonthDay-equal">10.4.17</a>)</div>
+(§<a href="#func-gMonthDay-equal">10.4.17</a>)</div>
<div class="protoref">
<a href="#func-gYear-equal">
<code>op:gYear-equal</code>
@@ -25921,7 +26265,7 @@
<code> as </code>
<code>xs:gYear</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-gYear-equal">10.4.16</a>)</div>
+(§<a href="#func-gYear-equal">10.4.16</a>)</div>
<div class="protoref">
<a href="#func-gYearMonth-equal">
<code>op:gYearMonth-equal</code>
@@ -25932,7 +26276,7 @@
<code> as </code>
<code>xs:gYearMonth</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-gYearMonth-equal">10.4.15</a>)</div>
+(§<a href="#func-gYearMonth-equal">10.4.15</a>)</div>
<div class="protoref">
<a href="#func-hexBinary-equal">
<code>op:hexBinary-equal</code>
@@ -25943,7 +26287,7 @@
<code> as </code>
<code>xs:hexBinary</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-hexBinary-equal">12.1.1</a>)</div>
+(§<a href="#func-hexBinary-equal">12.1.1</a>)</div>
<div class="protoref">
<a href="#func-hours-from-dateTime">
<code>fn:hours-from-dateTime</code>
@@ -25951,7 +26295,7 @@
<code> as </code>
<code>xs:dateTime?</code>)<code> as </code>
<code>xs:integer?</code>
-(§<a href="#func-hours-from-dateTime">10.5.10</a>)</div>
+(§<a href="#func-hours-from-dateTime">10.5.10</a>)</div>
<div class="protoref">
<a href="#func-hours-from-duration">
<code>fn:hours-from-duration</code>
@@ -25959,7 +26303,7 @@
<code> as </code>
<code>xs:duration?</code>)<code> as </code>
<code>xs:integer?</code>
-(§<a href="#func-hours-from-duration">10.5.4</a>)</div>
+(§<a href="#func-hours-from-duration">10.5.4</a>)</div>
<div class="protoref">
<a href="#func-hours-from-time">
<code>fn:hours-from-time</code>
@@ -25967,51 +26311,51 @@
<code> as </code>
<code>xs:time?</code>)<code> as </code>
<code>xs:integer?</code>
-(§<a href="#func-hours-from-time">10.5.18</a>)</div>
- <div class="protoref">
- <a href="#func-id">
- <code>fn:id</code>
- </a>(<code>$arg</code>
- <code> as </code>
- <code>xs:string*</code>)<code> as </code>
- <code>element()*</code>
-(§<a href="#func-id">15.5.2</a>)</div>
- <div class="protoref">
- <a href="#func-id">
- <code>fn:id</code>
- </a>(<code>$arg</code>
- <code> as </code>
- <code>xs:string*</code>,
-<code>$node</code>
- <code> as </code>
- <code>node()</code>)<code> as </code>
- <code>element()*</code>
-(§<a href="#func-id">15.5.2</a>)</div>
- <div class="protoref">
- <a href="#func-idref">
- <code>fn:idref</code>
- </a>(<code>$arg</code>
- <code> as </code>
- <code>xs:string*</code>)<code> as </code>
- <code>node()*</code>
-(§<a href="#func-idref">15.5.3</a>)</div>
- <div class="protoref">
- <a href="#func-idref">
- <code>fn:idref</code>
- </a>(<code>$arg</code>
- <code> as </code>
- <code>xs:string*</code>,
-<code>$node</code>
- <code> as </code>
- <code>node()</code>)<code> as </code>
- <code>node()*</code>
-(§<a href="#func-idref">15.5.3</a>)</div>
+(§<a href="#func-hours-from-time">10.5.18</a>)</div>
+ <div class="protoref">
+ <a href="#func-id">
+ <code>fn:id</code>
+ </a>(<code>$arg</code>
+ <code> as </code>
+ <code>xs:string*</code>)<code> as </code>
+ <code>element()*</code>
+(§<a href="#func-id">15.5.2</a>)</div>
+ <div class="protoref">
+ <a href="#func-id">
+ <code>fn:id</code>
+ </a>(<code>$arg</code>
+ <code> as </code>
+ <code>xs:string*</code>,
+<code>$node</code>
+ <code> as </code>
+ <code>node()</code>)<code> as </code>
+ <code>element()*</code>
+(§<a href="#func-id">15.5.2</a>)</div>
+ <div class="protoref">
+ <a href="#func-idref">
+ <code>fn:idref</code>
+ </a>(<code>$arg</code>
+ <code> as </code>
+ <code>xs:string*</code>)<code> as </code>
+ <code>node()*</code>
+(§<a href="#func-idref">15.5.3</a>)</div>
+ <div class="protoref">
+ <a href="#func-idref">
+ <code>fn:idref</code>
+ </a>(<code>$arg</code>
+ <code> as </code>
+ <code>xs:string*</code>,
+<code>$node</code>
+ <code> as </code>
+ <code>node()</code>)<code> as </code>
+ <code>node()*</code>
+(§<a href="#func-idref">15.5.3</a>)</div>
<div class="protoref">
<a href="#func-implicit-timezone">
<code>fn:implicit-timezone</code>
</a>()<code> as </code>
<code>xs:dayTimeDuration</code>
-(§<a href="#func-implicit-timezone">16.6</a>)</div>
+(§<a href="#func-implicit-timezone">16.6</a>)</div>
<div class="protoref">
<a href="#func-in-scope-prefixes">
<code>fn:in-scope-prefixes</code>
@@ -26019,7 +26363,7 @@
<code> as </code>
<code>element()</code>)<code> as </code>
<code>xs:string*</code>
-(§<a href="#func-in-scope-prefixes">11.2.6</a>)</div>
+(§<a href="#func-in-scope-prefixes">11.2.6</a>)</div>
<div class="protoref">
<a href="#func-index-of">
<code>fn:index-of</code>
@@ -26030,7 +26374,7 @@
<code> as </code>
<code>xs:anyAtomicType</code>)<code> as </code>
<code>xs:integer*</code>
-(§<a href="#func-index-of">15.1.3</a>)</div>
+(§<a href="#func-index-of">15.1.3</a>)</div>
<div class="protoref">
<a href="#func-index-of">
<code>fn:index-of</code>
@@ -26044,7 +26388,7 @@
<code> as </code>
<code>xs:string</code>)<code> as </code>
<code>xs:integer*</code>
-(§<a href="#func-index-of">15.1.3</a>)</div>
+(§<a href="#func-index-of">15.1.3</a>)</div>
<div class="protoref">
<a href="#func-insert-before">
<code>fn:insert-before</code>
@@ -26058,7 +26402,7 @@
<code> as </code>
<code>item()*</code>)<code> as </code>
<code>item()*</code>
-(§<a href="#func-insert-before">15.1.7</a>)</div>
+(§<a href="#func-insert-before">15.1.7</a>)</div>
<div class="protoref">
<a href="#func-intersect">
<code>op:intersect</code>
@@ -26069,7 +26413,7 @@
<code> as </code>
<code>node()*</code>)<code> as </code>
<code>node()*</code>
-(§<a href="#func-intersect">15.3.3</a>)</div>
+(§<a href="#func-intersect">15.3.3</a>)</div>
<div class="protoref">
<a href="#func-iri-to-uri">
<code>fn:iri-to-uri</code>
@@ -26077,7 +26421,7 @@
<code> as </code>
<code>xs:string?</code>)<code> as </code>
<code>xs:string</code>
-(§<a href="#func-iri-to-uri">7.4.11</a>)</div>
+(§<a href="#func-iri-to-uri">7.4.11</a>)</div>
<div class="protoref">
<a href="#func-is-same-node">
<code>op:is-same-node</code>
@@ -26088,7 +26432,7 @@
<code> as </code>
<code>node()</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-is-same-node">14.6</a>)</div>
+(§<a href="#func-is-same-node">14.6</a>)</div>
<div class="protoref">
<a href="#func-lang">
<code>fn:lang</code>
@@ -26096,7 +26440,7 @@
<code> as </code>
<code>xs:string?</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-lang">14.5</a>)</div>
+(§<a href="#func-lang">14.5</a>)</div>
<div class="protoref">
<a href="#func-lang">
<code>fn:lang</code>
@@ -26107,19 +26451,19 @@
<code> as </code>
<code>node()</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-lang">14.5</a>)</div>
+(§<a href="#func-lang">14.5</a>)</div>
<div class="protoref">
<a href="#func-last">
<code>fn:last</code>
</a>()<code> as </code>
<code>xs:integer</code>
-(§<a href="#func-last">16.2</a>)</div>
+(§<a href="#func-last">16.2</a>)</div>
<div class="protoref">
<a href="#func-local-name">
<code>fn:local-name</code>
</a>()<code> as </code>
<code>xs:string</code>
-(§<a href="#func-local-name">14.2</a>)</div>
+(§<a href="#func-local-name">14.2</a>)</div>
<div class="protoref">
<a href="#func-local-name">
<code>fn:local-name</code>
@@ -26127,7 +26471,7 @@
<code> as </code>
<code>node()?</code>)<code> as </code>
<code>xs:string</code>
-(§<a href="#func-local-name">14.2</a>)</div>
+(§<a href="#func-local-name">14.2</a>)</div>
<div class="protoref">
<a href="#func-local-name-from-QName">
<code>fn:local-name-from-QName</code>
@@ -26135,7 +26479,7 @@
<code> as </code>
<code>xs:QName?</code>)<code> as </code>
<code>xs:NCName?</code>
-(§<a href="#func-local-name-from-QName">11.2.3</a>)</div>
+(§<a href="#func-local-name-from-QName">11.2.3</a>)</div>
<div class="protoref">
<a href="#func-lower-case">
<code>fn:lower-case</code>
@@ -26143,7 +26487,7 @@
<code> as </code>
<code>xs:string?</code>)<code> as </code>
<code>xs:string</code>
-(§<a href="#func-lower-case">7.4.8</a>)</div>
+(§<a href="#func-lower-case">7.4.8</a>)</div>
<div class="protoref">
<a href="#func-matches">
<code>fn:matches</code>
@@ -26154,7 +26498,7 @@
<code> as </code>
<code>xs:string</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-matches">7.6.2</a>)</div>
+(§<a href="#func-matches">7.6.2</a>)</div>
<div class="protoref">
<a href="#func-matches">
<code>fn:matches</code>
@@ -26168,45 +26512,45 @@
<code> as </code>
<code>xs:string</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-matches">7.6.2</a>)</div>
- <div class="protoref">
- <a href="#func-max">
- <code>fn:max</code>
- </a>(<code>$arg</code>
- <code> as </code>
- <code>xs:anyAtomicType*</code>)<code> as </code>
- <code>xs:anyAtomicType?</code>
-(§<a href="#func-max">15.4.3</a>)</div>
- <div class="protoref">
- <a href="#func-max">
- <code>fn:max</code>
- </a>(<code>$arg</code>
- <code> as </code>
- <code>xs:anyAtomicType*</code>,
-<code>$collation</code>
- <code> as </code>
- <code>string</code>)<code> as </code>
- <code>xs:anyAtomicType?</code>
-(§<a href="#func-max">15.4.3</a>)</div>
- <div class="protoref">
- <a href="#func-min">
- <code>fn:min</code>
- </a>(<code>$arg</code>
- <code> as </code>
- <code>xs:anyAtomicType*</code>)<code> as </code>
- <code>xs:anyAtomicType?</code>
-(§<a href="#func-min">15.4.4</a>)</div>
- <div class="protoref">
- <a href="#func-min">
- <code>fn:min</code>
- </a>(<code>$arg</code>
- <code> as </code>
- <code>xs:anyAtomicType*</code>,
-<code>$collation</code>
- <code> as </code>
- <code>string</code>)<code> as </code>
- <code>xs:anyAtomicType?</code>
-(§<a href="#func-min">15.4.4</a>)</div>
+(§<a href="#func-matches">7.6.2</a>)</div>
+ <div class="protoref">
+ <a href="#func-max">
+ <code>fn:max</code>
+ </a>(<code>$arg</code>
+ <code> as </code>
+ <code>xs:anyAtomicType*</code>)<code> as </code>
+ <code>xs:anyAtomicType?</code>
+(§<a href="#func-max">15.4.3</a>)</div>
+ <div class="protoref">
+ <a href="#func-max">
+ <code>fn:max</code>
+ </a>(<code>$arg</code>
+ <code> as </code>
+ <code>xs:anyAtomicType*</code>,
+<code>$collation</code>
+ <code> as </code>
+ <code>string</code>)<code> as </code>
+ <code>xs:anyAtomicType?</code>
+(§<a href="#func-max">15.4.3</a>)</div>
+ <div class="protoref">
+ <a href="#func-min">
+ <code>fn:min</code>
+ </a>(<code>$arg</code>
+ <code> as </code>
+ <code>xs:anyAtomicType*</code>)<code> as </code>
+ <code>xs:anyAtomicType?</code>
+(§<a href="#func-min">15.4.4</a>)</div>
+ <div class="protoref">
+ <a href="#func-min">
+ <code>fn:min</code>
+ </a>(<code>$arg</code>
+ <code> as </code>
+ <code>xs:anyAtomicType*</code>,
+<code>$collation</code>
+ <code> as </code>
+ <code>string</code>)<code> as </code>
+ <code>xs:anyAtomicType?</code>
+(§<a href="#func-min">15.4.4</a>)</div>
<div class="protoref">
<a href="#func-minutes-from-dateTime">
<code>fn:minutes-from-dateTime</code>
@@ -26214,7 +26558,7 @@
<code> as </code>
<code>xs:dateTime?</code>)<code> as </code>
<code>xs:integer?</code>
-(§<a href="#func-minutes-from-dateTime">10.5.11</a>)</div>
+(§<a href="#func-minutes-from-dateTime">10.5.11</a>)</div>
<div class="protoref">
<a href="#func-minutes-from-duration">
<code>fn:minutes-from-duration</code>
@@ -26222,7 +26566,7 @@
<code> as </code>
<code>xs:duration?</code>)<code> as </code>
<code>xs:integer?</code>
-(§<a href="#func-minutes-from-duration">10.5.5</a>)</div>
+(§<a href="#func-minutes-from-duration">10.5.5</a>)</div>
<div class="protoref">
<a href="#func-minutes-from-time">
<code>fn:minutes-from-time</code>
@@ -26230,7 +26574,7 @@
<code> as </code>
<code>xs:time?</code>)<code> as </code>
<code>xs:integer?</code>
-(§<a href="#func-minutes-from-time">10.5.19</a>)</div>
+(§<a href="#func-minutes-from-time">10.5.19</a>)</div>
<div class="protoref">
<a href="#func-month-from-date">
<code>fn:month-from-date</code>
@@ -26238,7 +26582,7 @@
<code> as </code>
<code>xs:date?</code>)<code> as </code>
<code>xs:integer?</code>
-(§<a href="#func-month-from-date">10.5.15</a>)</div>
+(§<a href="#func-month-from-date">10.5.15</a>)</div>
<div class="protoref">
<a href="#func-month-from-dateTime">
<code>fn:month-from-dateTime</code>
@@ -26246,7 +26590,7 @@
<code> as </code>
<code>xs:dateTime?</code>)<code> as </code>
<code>xs:integer?</code>
-(§<a href="#func-month-from-dateTime">10.5.8</a>)</div>
+(§<a href="#func-month-from-dateTime">10.5.8</a>)</div>
<div class="protoref">
<a href="#func-months-from-duration">
<code>fn:months-from-duration</code>
@@ -26254,7 +26598,7 @@
<code> as </code>
<code>xs:duration?</code>)<code> as </code>
<code>xs:integer?</code>
-(§<a href="#func-months-from-duration">10.5.2</a>)</div>
+(§<a href="#func-months-from-duration">10.5.2</a>)</div>
<div class="protoref">
<a href="#func-multiply-dayTimeDuration">
<code>op:multiply-dayTimeDuration</code>
@@ -26265,7 +26609,7 @@
<code> as </code>
<code>xs:double</code>)<code> as </code>
<code>xs:dayTimeDuration</code>
-(§<a href="#func-multiply-dayTimeDuration">10.6.8</a>)</div>
+(§<a href="#func-multiply-dayTimeDuration">10.6.8</a>)</div>
<div class="protoref">
<a href="#func-multiply-yearMonthDuration">
<code>op:multiply-yearMonthDuration</code>
@@ -26276,35 +26620,35 @@
<code> as </code>
<code>xs:double</code>)<code> as </code>
<code>xs:yearMonthDuration</code>
-(§<a href="#func-multiply-yearMonthDuration">10.6.3</a>)</div>
- <div class="protoref">
- <a href="#func-name">
- <code>fn:name</code>
- </a>()<code> as </code>
- <code>xs:string</code>
-(§<a href="#func-name">14.1</a>)</div>
- <div class="protoref">
- <a href="#func-name">
- <code>fn:name</code>
- </a>(<code>$arg</code>
- <code> as </code>
- <code>node()?</code>)<code> as </code>
- <code>xs:string</code>
-(§<a href="#func-name">14.1</a>)</div>
- <div class="protoref">
- <a href="#func-namespace-uri">
- <code>fn:namespace-uri</code>
- </a>()<code> as </code>
- <code>xs:anyURI</code>
-(§<a href="#func-namespace-uri">14.3</a>)</div>
- <div class="protoref">
- <a href="#func-namespace-uri">
- <code>fn:namespace-uri</code>
- </a>(<code>$arg</code>
- <code> as </code>
- <code>node()?</code>)<code> as </code>
- <code>xs:anyURI</code>
-(§<a href="#func-namespace-uri">14.3</a>)</div>
+(§<a href="#func-multiply-yearMonthDuration">10.6.3</a>)</div>
+ <div class="protoref">
+ <a href="#func-name">
+ <code>fn:name</code>
+ </a>()<code> as </code>
+ <code>xs:string</code>
+(§<a href="#func-name">14.1</a>)</div>
+ <div class="protoref">
+ <a href="#func-name">
+ <code>fn:name</code>
+ </a>(<code>$arg</code>
+ <code> as </code>
+ <code>node()?</code>)<code> as </code>
+ <code>xs:string</code>
+(§<a href="#func-name">14.1</a>)</div>
+ <div class="protoref">
+ <a href="#func-namespace-uri">
+ <code>fn:namespace-uri</code>
+ </a>()<code> as </code>
+ <code>xs:anyURI</code>
+(§<a href="#func-namespace-uri">14.3</a>)</div>
+ <div class="protoref">
+ <a href="#func-namespace-uri">
+ <code>fn:namespace-uri</code>
+ </a>(<code>$arg</code>
+ <code> as </code>
+ <code>node()?</code>)<code> as </code>
+ <code>xs:anyURI</code>
+(§<a href="#func-namespace-uri">14.3</a>)</div>
<div class="protoref">
<a href="#func-namespace-uri-for-prefix">
<code>fn:namespace-uri-for-prefix</code>
@@ -26315,7 +26659,7 @@
<code> as </code>
<code>element()</code>)<code> as </code>
<code>xs:anyURI?</code>
-(§<a href="#func-namespace-uri-for-prefix">11.2.5</a>)</div>
+(§<a href="#func-namespace-uri-for-prefix">11.2.5</a>)</div>
<div class="protoref">
<a href="#func-namespace-uri-from-QName">
<code>fn:namespace-uri-from-QName</code>
@@ -26323,7 +26667,7 @@
<code> as </code>
<code>xs:QName?</code>)<code> as </code>
<code>xs:anyURI?</code>
-(§<a href="#func-namespace-uri-from-QName">11.2.4</a>)</div>
+(§<a href="#func-namespace-uri-from-QName">11.2.4</a>)</div>
<div class="protoref">
<a href="#func-nilled">
<code>fn:nilled</code>
@@ -26331,7 +26675,7 @@
<code> as </code>
<code>node()?</code>)<code> as </code>
<code>xs:boolean?</code>
-(§<a href="#func-nilled">2.2</a>)</div>
+(§<a href="#func-nilled">2.2</a>)</div>
<div class="protoref">
<a href="#func-node-after">
<code>op:node-after</code>
@@ -26342,7 +26686,7 @@
<code> as </code>
<code>node()</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-node-after">14.8</a>)</div>
+(§<a href="#func-node-after">14.8</a>)</div>
<div class="protoref">
<a href="#func-node-before">
<code>op:node-before</code>
@@ -26353,7 +26697,7 @@
<code> as </code>
<code>node()</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-node-before">14.7</a>)</div>
+(§<a href="#func-node-before">14.7</a>)</div>
<div class="protoref">
<a href="#func-node-name">
<code>fn:node-name</code>
@@ -26361,13 +26705,13 @@
<code> as </code>
<code>node()?</code>)<code> as </code>
<code>xs:QName?</code>
-(§<a href="#func-node-name">2.1</a>)</div>
+(§<a href="#func-node-name">2.1</a>)</div>
<div class="protoref">
<a href="#func-normalize-space">
<code>fn:normalize-space</code>
</a>()<code> as </code>
<code>xs:string</code>
-(§<a href="#func-normalize-space">7.4.5</a>)</div>
+(§<a href="#func-normalize-space">7.4.5</a>)</div>
<div class="protoref">
<a href="#func-normalize-space">
<code>fn:normalize-space</code>
@@ -26375,7 +26719,7 @@
<code> as </code>
<code>xs:string?</code>)<code> as </code>
<code>xs:string</code>
-(§<a href="#func-normalize-space">7.4.5</a>)</div>
+(§<a href="#func-normalize-space">7.4.5</a>)</div>
<div class="protoref">
<a href="#func-normalize-unicode">
<code>fn:normalize-unicode</code>
@@ -26383,7 +26727,7 @@
<code> as </code>
<code>xs:string?</code>)<code> as </code>
<code>xs:string</code>
-(§<a href="#func-normalize-unicode">7.4.6</a>)</div>
+(§<a href="#func-normalize-unicode">7.4.6</a>)</div>
<div class="protoref">
<a href="#func-normalize-unicode">
<code>fn:normalize-unicode</code>
@@ -26394,7 +26738,7 @@
<code> as </code>
<code>xs:string</code>)<code> as </code>
<code>xs:string</code>
-(§<a href="#func-normalize-unicode">7.4.6</a>)</div>
+(§<a href="#func-normalize-unicode">7.4.6</a>)</div>
<div class="protoref">
<a href="#func-not">
<code>fn:not</code>
@@ -26402,13 +26746,13 @@
<code> as </code>
<code>item()*</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-not">9.3.1</a>)</div>
+(§<a href="#func-not">9.3.1</a>)</div>
<div class="protoref">
<a href="#func-number">
<code>fn:number</code>
</a>()<code> as </code>
<code>xs:double</code>
-(§<a href="#func-number">14.4</a>)</div>
+(§<a href="#func-number">14.4</a>)</div>
<div class="protoref">
<a href="#func-number">
<code>fn:number</code>
@@ -26416,7 +26760,7 @@
<code> as </code>
<code>xs:anyAtomicType?</code>)<code> as </code>
<code>xs:double</code>
-(§<a href="#func-number">14.4</a>)</div>
+(§<a href="#func-number">14.4</a>)</div>
<div class="protoref">
<a href="#func-numeric-add">
<code>op:numeric-add</code>
@@ -26427,7 +26771,7 @@
<code> as </code>
<code>numeric</code>)<code> as </code>
<code>numeric</code>
-(§<a href="#func-numeric-add">6.2.1</a>)</div>
+(§<a href="#func-numeric-add">6.2.1</a>)</div>
<div class="protoref">
<a href="#func-numeric-divide">
<code>op:numeric-divide</code>
@@ -26438,7 +26782,7 @@
<code> as </code>
<code>numeric</code>)<code> as </code>
<code>numeric</code>
-(§<a href="#func-numeric-divide">6.2.4</a>)</div>
+(§<a href="#func-numeric-divide">6.2.4</a>)</div>
<div class="protoref">
<a href="#func-numeric-equal">
<code>op:numeric-equal</code>
@@ -26449,7 +26793,7 @@
<code> as </code>
<code>numeric</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-numeric-equal">6.3.1</a>)</div>
+(§<a href="#func-numeric-equal">6.3.1</a>)</div>
<div class="protoref">
<a href="#func-numeric-greater-than">
<code>op:numeric-greater-than</code>
@@ -26460,7 +26804,7 @@
<code> as </code>
<code>numeric</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-numeric-greater-than">6.3.3</a>)</div>
+(§<a href="#func-numeric-greater-than">6.3.3</a>)</div>
<div class="protoref">
<a href="#func-numeric-integer-divide">
<code>op:numeric-integer-divide</code>
@@ -26471,7 +26815,7 @@
<code> as </code>
<code>numeric</code>)<code> as </code>
<code>xs:integer</code>
-(§<a href="#func-numeric-integer-divide">6.2.5</a>)</div>
+(§<a href="#func-numeric-integer-divide">6.2.5</a>)</div>
<div class="protoref">
<a href="#func-numeric-less-than">
<code>op:numeric-less-than</code>
@@ -26482,7 +26826,7 @@
<code> as </code>
<code>numeric</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-numeric-less-than">6.3.2</a>)</div>
+(§<a href="#func-numeric-less-than">6.3.2</a>)</div>
<div class="protoref">
<a href="#func-numeric-mod">
<code>op:numeric-mod</code>
@@ -26493,7 +26837,7 @@
<code> as </code>
<code>numeric</code>)<code> as </code>
<code>numeric</code>
-(§<a href="#func-numeric-mod">6.2.6</a>)</div>
+(§<a href="#func-numeric-mod">6.2.6</a>)</div>
<div class="protoref">
<a href="#func-numeric-multiply">
<code>op:numeric-multiply</code>
@@ -26504,7 +26848,7 @@
<code> as </code>
<code>numeric</code>)<code> as </code>
<code>numeric</code>
-(§<a href="#func-numeric-multiply">6.2.3</a>)</div>
+(§<a href="#func-numeric-multiply">6.2.3</a>)</div>
<div class="protoref">
<a href="#func-numeric-subtract">
<code>op:numeric-subtract</code>
@@ -26515,7 +26859,7 @@
<code> as </code>
<code>numeric</code>)<code> as </code>
<code>numeric</code>
-(§<a href="#func-numeric-subtract">6.2.2</a>)</div>
+(§<a href="#func-numeric-subtract">6.2.2</a>)</div>
<div class="protoref">
<a href="#func-numeric-unary-minus">
<code>op:numeric-unary-minus</code>
@@ -26523,7 +26867,7 @@
<code> as </code>
<code>numeric</code>)<code> as </code>
<code>numeric</code>
-(§<a href="#func-numeric-unary-minus">6.2.8</a>)</div>
+(§<a href="#func-numeric-unary-minus">6.2.8</a>)</div>
<div class="protoref">
<a href="#func-numeric-unary-plus">
<code>op:numeric-unary-plus</code>
@@ -26531,7 +26875,7 @@
<code> as </code>
<code>numeric</code>)<code> as </code>
<code>numeric</code>
-(§<a href="#func-numeric-unary-plus">6.2.7</a>)</div>
+(§<a href="#func-numeric-unary-plus">6.2.7</a>)</div>
<div class="protoref">
<a href="#func-one-or-more">
<code>fn:one-or-more</code>
@@ -26539,13 +26883,13 @@
<code> as </code>
<code>item()*</code>)<code> as </code>
<code>item()+</code>
-(§<a href="#func-one-or-more">15.2.2</a>)</div>
+(§<a href="#func-one-or-more">15.2.2</a>)</div>
<div class="protoref">
<a href="#func-position">
<code>fn:position</code>
</a>()<code> as </code>
<code>xs:integer</code>
-(§<a href="#func-position">16.1</a>)</div>
+(§<a href="#func-position">16.1</a>)</div>
<div class="protoref">
<a href="#func-prefix-from-QName">
<code>fn:prefix-from-QName</code>
@@ -26553,7 +26897,7 @@
<code> as </code>
<code>xs:QName?</code>)<code> as </code>
<code>xs:NCName?</code>
-(§<a href="#func-prefix-from-QName">11.2.2</a>)</div>
+(§<a href="#func-prefix-from-QName">11.2.2</a>)</div>
<div class="protoref">
<a href="#func-remove">
<code>fn:remove</code>
@@ -26564,7 +26908,7 @@
<code> as </code>
<code>xs:integer</code>)<code> as </code>
<code>item()*</code>
-(§<a href="#func-remove">15.1.8</a>)</div>
+(§<a href="#func-remove">15.1.8</a>)</div>
<div class="protoref">
<a href="#func-replace">
<code>fn:replace</code>
@@ -26578,7 +26922,7 @@
<code> as </code>
<code>xs:string</code>)<code> as </code>
<code>xs:string</code>
-(§<a href="#func-replace">7.6.3</a>)</div>
+(§<a href="#func-replace">7.6.3</a>)</div>
<div class="protoref">
<a href="#func-replace">
<code>fn:replace</code>
@@ -26595,7 +26939,7 @@
<code> as </code>
<code>xs:string</code>)<code> as </code>
<code>xs:string</code>
-(§<a href="#func-replace">7.6.3</a>)</div>
+(§<a href="#func-replace">7.6.3</a>)</div>
<div class="protoref">
<a href="#func-resolve-QName">
<code>fn:resolve-QName</code>
@@ -26606,7 +26950,7 @@
<code> as </code>
<code>element()</code>)<code> as </code>
<code>xs:QName?</code>
-(§<a href="#func-resolve-QName">11.1.1</a>)</div>
+(§<a href="#func-resolve-QName">11.1.1</a>)</div>
<div class="protoref">
<a href="#func-resolve-uri">
<code>fn:resolve-uri</code>
@@ -26614,7 +26958,7 @@
<code> as </code>
<code>xs:string?</code>)<code> as </code>
<code>xs:anyURI?</code>
-(§<a href="#func-resolve-uri">8.1</a>)</div>
+(§<a href="#func-resolve-uri">8.1</a>)</div>
<div class="protoref">
<a href="#func-resolve-uri">
<code>fn:resolve-uri</code>
@@ -26625,7 +26969,7 @@
<code> as </code>
<code>xs:string</code>)<code> as </code>
<code>xs:anyURI?</code>
-(§<a href="#func-resolve-uri">8.1</a>)</div>
+(§<a href="#func-resolve-uri">8.1</a>)</div>
<div class="protoref">
<a href="#func-reverse">
<code>fn:reverse</code>
@@ -26633,13 +26977,13 @@
<code> as </code>
<code>item()*</code>)<code> as </code>
<code>item()*</code>
-(§<a href="#func-reverse">15.1.9</a>)</div>
+(§<a href="#func-reverse">15.1.9</a>)</div>
<div class="protoref">
<a href="#func-root">
<code>fn:root</code>
</a>()<code> as </code>
<code>node()</code>
-(§<a href="#func-root">14.9</a>)</div>
+(§<a href="#func-root">14.9</a>)</div>
<div class="protoref">
<a href="#func-root">
<code>fn:root</code>
@@ -26647,7 +26991,7 @@
<code> as </code>
<code>node()?</code>)<code> as </code>
<code>node()?</code>
-(§<a href="#func-root">14.9</a>)</div>
+(§<a href="#func-root">14.9</a>)</div>
<div class="protoref">
<a href="#func-round">
<code>fn:round</code>
@@ -26655,7 +26999,7 @@
<code> as </code>
<code>numeric?</code>)<code> as </code>
<code>numeric?</code>
-(§<a href="#func-round">6.4.4</a>)</div>
+(§<a href="#func-round">6.4.4</a>)</div>
<div class="protoref">
<a href="#func-round-half-to-even">
<code>fn:round-half-to-even</code>
@@ -26663,7 +27007,7 @@
<code> as </code>
<code>numeric?</code>)<code> as </code>
<code>numeric?</code>
-(§<a href="#func-round-half-to-even">6.4.5</a>)</div>
+(§<a href="#func-round-half-to-even">6.4.5</a>)</div>
<div class="protoref">
<a href="#func-round-half-to-even">
<code>fn:round-half-to-even</code>
@@ -26674,7 +27018,7 @@
<code> as </code>
<code>xs:integer</code>)<code> as </code>
<code>numeric?</code>
-(§<a href="#func-round-half-to-even">6.4.5</a>)</div>
+(§<a href="#func-round-half-to-even">6.4.5</a>)</div>
<div class="protoref">
<a href="#func-seconds-from-dateTime">
<code>fn:seconds-from-dateTime</code>
@@ -26682,7 +27026,7 @@
<code> as </code>
<code>xs:dateTime?</code>)<code> as </code>
<code>xs:decimal?</code>
-(§<a href="#func-seconds-from-dateTime">10.5.12</a>)</div>
+(§<a href="#func-seconds-from-dateTime">10.5.12</a>)</div>
<div class="protoref">
<a href="#func-seconds-from-duration">
<code>fn:seconds-from-duration</code>
@@ -26690,7 +27034,7 @@
<code> as </code>
<code>xs:duration?</code>)<code> as </code>
<code>xs:decimal?</code>
-(§<a href="#func-seconds-from-duration">10.5.6</a>)</div>
+(§<a href="#func-seconds-from-duration">10.5.6</a>)</div>
<div class="protoref">
<a href="#func-seconds-from-time">
<code>fn:seconds-from-time</code>
@@ -26698,7 +27042,7 @@
<code> as </code>
<code>xs:time?</code>)<code> as </code>
<code>xs:decimal?</code>
-(§<a href="#func-seconds-from-time">10.5.20</a>)</div>
+(§<a href="#func-seconds-from-time">10.5.20</a>)</div>
<div class="protoref">
<a href="#func-starts-with">
<code>fn:starts-with</code>
@@ -26709,7 +27053,7 @@
<code> as </code>
<code>xs:string?</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-starts-with">7.5.2</a>)</div>
+(§<a href="#func-starts-with">7.5.2</a>)</div>
<div class="protoref">
<a href="#func-starts-with">
<code>fn:starts-with</code>
@@ -26723,19 +27067,19 @@
<code> as </code>
<code>xs:string</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-starts-with">7.5.2</a>)</div>
+(§<a href="#func-starts-with">7.5.2</a>)</div>
<div class="protoref">
<a href="#func-static-base-uri">
<code>fn:static-base-uri</code>
</a>()<code> as </code>
<code>xs:anyURI?</code>
-(§<a href="#func-static-base-uri">16.8</a>)</div>
+(§<a href="#func-static-base-uri">16.8</a>)</div>
<div class="protoref">
<a href="#func-string">
<code>fn:string</code>
</a>()<code> as </code>
<code>xs:string</code>
-(§<a href="#func-string">2.3</a>)</div>
+(§<a href="#func-string">2.3</a>)</div>
<div class="protoref">
<a href="#func-string">
<code>fn:string</code>
@@ -26743,7 +27087,7 @@
<code> as </code>
<code>item()?</code>)<code> as </code>
<code>xs:string</code>
-(§<a href="#func-string">2.3</a>)</div>
+(§<a href="#func-string">2.3</a>)</div>
<div class="protoref">
<a href="#func-string-join">
<code>fn:string-join</code>
@@ -26754,13 +27098,13 @@
<code> as </code>
<code>xs:string</code>)<code> as </code>
<code>xs:string</code>
-(§<a href="#func-string-join">7.4.2</a>)</div>
+(§<a href="#func-string-join">7.4.2</a>)</div>
<div class="protoref">
<a href="#func-string-length">
<code>fn:string-length</code>
</a>()<code> as </code>
<code>xs:integer</code>
-(§<a href="#func-string-length">7.4.4</a>)</div>
+(§<a href="#func-string-length">7.4.4</a>)</div>
<div class="protoref">
<a href="#func-string-length">
<code>fn:string-length</code>
@@ -26768,7 +27112,7 @@
<code> as </code>
<code>xs:string?</code>)<code> as </code>
<code>xs:integer</code>
-(§<a href="#func-string-length">7.4.4</a>)</div>
+(§<a href="#func-string-length">7.4.4</a>)</div>
<div class="protoref">
<a href="#func-string-to-codepoints">
<code>fn:string-to-codepoints</code>
@@ -26776,107 +27120,107 @@
<code> as </code>
<code>xs:string?</code>)<code> as </code>
<code>xs:integer*</code>
-(§<a href="#func-string-to-codepoints">7.2.2</a>)</div>
- <div class="protoref">
- <a href="#func-subsequence">
- <code>fn:subsequence</code>
- </a>(<code>$sourceSeq</code>
- <code> as </code>
- <code>item()*</code>,
-<code>$startingLoc</code>
- <code> as </code>
- <code>xs:double</code>)<code> as </code>
- <code>item()*</code>
-(§<a href="#func-subsequence">15.1.10</a>)</div>
- <div class="protoref">
- <a href="#func-subsequence">
- <code>fn:subsequence</code>
- </a>(<code>$sourceSeq</code>
- <code> as </code>
- <code>item()*</code>,
-<code>$startingLoc</code>
- <code> as </code>
- <code>xs:double</code>,
-<code>$length</code>
- <code> as </code>
- <code>xs:double</code>)<code> as </code>
- <code>item()*</code>
-(§<a href="#func-subsequence">15.1.10</a>)</div>
- <div class="protoref">
- <a href="#func-substring">
- <code>fn:substring</code>
- </a>(<code>$sourceString</code>
- <code> as </code>
- <code>xs:string?</code>,
-<code>$startingLoc</code>
- <code> as </code>
- <code>xs:double</code>)<code> as </code>
- <code>xs:string</code>
-(§<a href="#func-substring">7.4.3</a>)</div>
- <div class="protoref">
- <a href="#func-substring">
- <code>fn:substring</code>
- </a>(<code>$sourceString</code>
- <code> as </code>
- <code>xs:string?</code>,
-<code>$startingLoc</code>
- <code> as </code>
- <code>xs:double</code>,
-<code>$length</code>
- <code> as </code>
- <code>xs:double</code>)<code> as </code>
- <code>xs:string</code>
-(§<a href="#func-substring">7.4.3</a>)</div>
- <div class="protoref">
- <a href="#func-substring-after">
- <code>fn:substring-after</code>
- </a>(<code>$arg1</code>
- <code> as </code>
- <code>xs:string?</code>,
-<code>$arg2</code>
- <code> as </code>
- <code>xs:string?</code>)<code> as </code>
- <code>xs:string</code>
-(§<a href="#func-substring-after">7.5.5</a>)</div>
- <div class="protoref">
- <a href="#func-substring-after">
- <code>fn:substring-after</code>
- </a>(<code>$arg1</code>
- <code> as </code>
- <code>xs:string?</code>,
-<code>$arg2</code>
- <code> as </code>
- <code>xs:string?</code>,
-<code>$collation</code>
- <code> as </code>
- <code>xs:string</code>)<code> as </code>
- <code>xs:string</code>
-(§<a href="#func-substring-after">7.5.5</a>)</div>
- <div class="protoref">
- <a href="#func-substring-before">
- <code>fn:substring-before</code>
- </a>(<code>$arg1</code>
- <code> as </code>
- <code>xs:string?</code>,
-<code>$arg2</code>
- <code> as </code>
- <code>xs:string?</code>)<code> as </code>
- <code>xs:string</code>
-(§<a href="#func-substring-before">7.5.4</a>)</div>
- <div class="protoref">
- <a href="#func-substring-before">
- <code>fn:substring-before</code>
- </a>(<code>$arg1</code>
- <code> as </code>
- <code>xs:string?</code>,
-<code>$arg2</code>
- <code> as </code>
- <code>xs:string?</code>,
-<code>$collation</code>
- <code> as </code>
- <code>xs:string</code>)<code> as </code>
- <code>xs:string</code>
-(§<a href="#func-substring-before">7.5.4</a>)</div>
+(§<a href="#func-string-to-codepoints">7.2.2</a>)</div>
+ <div class="protoref">
+ <a href="#func-subsequence">
+ <code>fn:subsequence</code>
+ </a>(<code>$sourceSeq</code>
+ <code> as </code>
+ <code>item()*</code>,
+<code>$startingLoc</code>
+ <code> as </code>
+ <code>xs:double</code>)<code> as </code>
+ <code>item()*</code>
+(§<a href="#func-subsequence">15.1.10</a>)</div>
+ <div class="protoref">
+ <a href="#func-subsequence">
+ <code>fn:subsequence</code>
+ </a>(<code>$sourceSeq</code>
+ <code> as </code>
+ <code>item()*</code>,
+<code>$startingLoc</code>
+ <code> as </code>
+ <code>xs:double</code>,
+<code>$length</code>
+ <code> as </code>
+ <code>xs:double</code>)<code> as </code>
+ <code>item()*</code>
+(§<a href="#func-subsequence">15.1.10</a>)</div>
+ <div class="protoref">
+ <a href="#func-substring">
+ <code>fn:substring</code>
+ </a>(<code>$sourceString</code>
+ <code> as </code>
+ <code>xs:string?</code>,
+<code>$startingLoc</code>
+ <code> as </code>
+ <code>xs:double</code>)<code> as </code>
+ <code>xs:string</code>
+(§<a href="#func-substring">7.4.3</a>)</div>
+ <div class="protoref">
+ <a href="#func-substring">
+ <code>fn:substring</code>
+ </a>(<code>$sourceString</code>
+ <code> as </code>
+ <code>xs:string?</code>,
+<code>$startingLoc</code>
+ <code> as </code>
+ <code>xs:double</code>,
+<code>$length</code>
+ <code> as </code>
+ <code>xs:double</code>)<code> as </code>
+ <code>xs:string</code>
+(§<a href="#func-substring">7.4.3</a>)</div>
+ <div class="protoref">
+ <a href="#func-substring-after">
+ <code>fn:substring-after</code>
+ </a>(<code>$arg1</code>
+ <code> as </code>
+ <code>xs:string?</code>,
+<code>$arg2</code>
+ <code> as </code>
+ <code>xs:string?</code>)<code> as </code>
+ <code>xs:string</code>
+(§<a href="#func-substring-after">7.5.5</a>)</div>
+ <div class="protoref">
+ <a href="#func-substring-after">
+ <code>fn:substring-after</code>
+ </a>(<code>$arg1</code>
+ <code> as </code>
+ <code>xs:string?</code>,
+<code>$arg2</code>
+ <code> as </code>
+ <code>xs:string?</code>,
+<code>$collation</code>
+ <code> as </code>
+ <code>xs:string</code>)<code> as </code>
+ <code>xs:string</code>
+(§<a href="#func-substring-after">7.5.5</a>)</div>
+ <div class="protoref">
+ <a href="#func-substring-before">
+ <code>fn:substring-before</code>
+ </a>(<code>$arg1</code>
+ <code> as </code>
+ <code>xs:string?</code>,
+<code>$arg2</code>
+ <code> as </code>
+ <code>xs:string?</code>)<code> as </code>
+ <code>xs:string</code>
+(§<a href="#func-substring-before">7.5.4</a>)</div>
+ <div class="protoref">
+ <a href="#func-substring-before">
+ <code>fn:substring-before</code>
+ </a>(<code>$arg1</code>
+ <code> as </code>
+ <code>xs:string?</code>,
+<code>$arg2</code>
+ <code> as </code>
+ <code>xs:string?</code>,
+<code>$collation</code>
+ <code> as </code>
+ <code>xs:string</code>)<code> as </code>
+ <code>xs:string</code>
+(§<a href="#func-substring-before">7.5.4</a>)</div>
<div class="protoref">
<a href="#func-subtract-dateTimes">
<code>op:subtract-dateTimes</code>
@@ -26887,7 +27231,7 @@
<code> as </code>
<code>xs:dateTime</code>)<code> as </code>
<code>xs:dayTimeDuration</code>
-(§<a href="#func-subtract-dateTimes">10.8.1</a>)</div>
+(§<a href="#func-subtract-dateTimes">10.8.1</a>)</div>
<div class="protoref">
<a href="#func-subtract-dates">
<code>op:subtract-dates</code>
@@ -26898,7 +27242,7 @@
<code> as </code>
<code>xs:date</code>)<code> as </code>
<code>xs:dayTimeDuration</code>
-(§<a href="#func-subtract-dates">10.8.2</a>)</div>
+(§<a href="#func-subtract-dates">10.8.2</a>)</div>
<div class="protoref">
<a href="#func-subtract-dayTimeDuration-from-date">
<code>op:subtract-dayTimeDuration-from-date</code>
@@ -26909,7 +27253,7 @@
<code> as </code>
<code>xs:dayTimeDuration</code>)<code> as </code>
<code>xs:date</code>
-(§<a href="#func-subtract-dayTimeDuration-from-date">10.8.11</a>)</div>
+(§<a href="#func-subtract-dayTimeDuration-from-date">10.8.11</a>)</div>
<div class="protoref">
<a href="#func-subtract-dayTimeDuration-from-dateTime">
<code>op:subtract-dayTimeDuration-from-dateTime</code>
@@ -26920,7 +27264,7 @@
<code> as </code>
<code>xs:dayTimeDuration</code>)<code> as </code>
<code>xs:dateTime</code>
-(§<a href="#func-subtract-dayTimeDuration-from-dateTime">10.8.7</a>)</div>
+(§<a href="#func-subtract-dayTimeDuration-from-dateTime">10.8.7</a>)</div>
<div class="protoref">
<a href="#func-subtract-dayTimeDuration-from-time">
<code>op:subtract-dayTimeDuration-from-time</code>
@@ -26931,7 +27275,7 @@
<code> as </code>
<code>xs:dayTimeDuration</code>)<code> as </code>
<code>xs:time</code>
-(§<a href="#func-subtract-dayTimeDuration-from-time">10.8.13</a>)</div>
+(§<a href="#func-subtract-dayTimeDuration-from-time">10.8.13</a>)</div>
<div class="protoref">
<a href="#func-subtract-dayTimeDurations">
<code>op:subtract-dayTimeDurations</code>
@@ -26942,7 +27286,7 @@
<code> as </code>
<code>xs:dayTimeDuration</code>)<code> as </code>
<code>xs:dayTimeDuration</code>
-(§<a href="#func-subtract-dayTimeDurations">10.6.7</a>)</div>
+(§<a href="#func-subtract-dayTimeDurations">10.6.7</a>)</div>
<div class="protoref">
<a href="#func-subtract-times">
<code>op:subtract-times</code>
@@ -26953,7 +27297,7 @@
<code> as </code>
<code>xs:time</code>)<code> as </code>
<code>xs:dayTimeDuration</code>
-(§<a href="#func-subtract-times">10.8.3</a>)</div>
+(§<a href="#func-subtract-times">10.8.3</a>)</div>
<div class="protoref">
<a href="#func-subtract-yearMonthDuration-from-date">
<code>op:subtract-yearMonthDuration-from-date</code>
@@ -26964,7 +27308,7 @@
<code> as </code>
<code>xs:yearMonthDuration</code>)<code> as </code>
<code>xs:date</code>
-(§<a href="#func-subtract-yearMonthDuration-from-date">10.8.10</a>)</div>
+(§<a href="#func-subtract-yearMonthDuration-from-date">10.8.10</a>)</div>
<div class="protoref">
<a href="#func-subtract-yearMonthDuration-from-dateTime">
<code>op:subtract-yearMonthDuration-from-dateTime</code>
@@ -26975,7 +27319,7 @@
<code> as </code>
<code>xs:yearMonthDuration</code>)<code> as </code>
<code>xs:dateTime</code>
-(§<a href="#func-subtract-yearMonthDuration-from-dateTime">10.8.6</a>)</div>
+(§<a href="#func-subtract-yearMonthDuration-from-dateTime">10.8.6</a>)</div>
<div class="protoref">
<a href="#func-subtract-yearMonthDurations">
<code>op:subtract-yearMonthDurations</code>
@@ -26986,7 +27330,7 @@
<code> as </code>
<code>xs:yearMonthDuration</code>)<code> as </code>
<code>xs:yearMonthDuration</code>
-(§<a href="#func-subtract-yearMonthDurations">10.6.2</a>)</div>
+(§<a href="#func-subtract-yearMonthDurations">10.6.2</a>)</div>
<div class="protoref">
<a href="#func-sum">
<code>fn:sum</code>
@@ -26994,7 +27338,7 @@
<code> as </code>
<code>xs:anyAtomicType*</code>)<code> as </code>
<code>xs:anyAtomicType</code>
-(§<a href="#func-sum">15.4.5</a>)</div>
+(§<a href="#func-sum">15.4.5</a>)</div>
<div class="protoref">
<a href="#func-sum">
<code>fn:sum</code>
@@ -27005,7 +27349,7 @@
<code> as </code>
<code>xs:anyAtomicType?</code>)<code> as </code>
<code>xs:anyAtomicType?</code>
-(§<a href="#func-sum">15.4.5</a>)</div>
+(§<a href="#func-sum">15.4.5</a>)</div>
<div class="protoref">
<a href="#func-time-equal">
<code>op:time-equal</code>
@@ -27016,7 +27360,7 @@
<code> as </code>
<code>xs:time</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-time-equal">10.4.12</a>)</div>
+(§<a href="#func-time-equal">10.4.12</a>)</div>
<div class="protoref">
<a href="#func-time-greater-than">
<code>op:time-greater-than</code>
@@ -27027,7 +27371,7 @@
<code> as </code>
<code>xs:time</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-time-greater-than">10.4.14</a>)</div>
+(§<a href="#func-time-greater-than">10.4.14</a>)</div>
<div class="protoref">
<a href="#func-time-less-than">
<code>op:time-less-than</code>
@@ -27038,7 +27382,7 @@
<code> as </code>
<code>xs:time</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-time-less-than">10.4.13</a>)</div>
+(§<a href="#func-time-less-than">10.4.13</a>)</div>
<div class="protoref">
<a href="#func-timezone-from-date">
<code>fn:timezone-from-date</code>
@@ -27046,7 +27390,7 @@
<code> as </code>
<code>xs:date?</code>)<code> as </code>
<code>xs:dayTimeDuration?</code>
-(§<a href="#func-timezone-from-date">10.5.17</a>)</div>
+(§<a href="#func-timezone-from-date">10.5.17</a>)</div>
<div class="protoref">
<a href="#func-timezone-from-dateTime">
<code>fn:timezone-from-dateTime</code>
@@ -27054,7 +27398,7 @@
<code> as </code>
<code>xs:dateTime?</code>)<code> as </code>
<code>xs:dayTimeDuration?</code>
-(§<a href="#func-timezone-from-dateTime">10.5.13</a>)</div>
+(§<a href="#func-timezone-from-dateTime">10.5.13</a>)</div>
<div class="protoref">
<a href="#func-timezone-from-time">
<code>fn:timezone-from-time</code>
@@ -27062,7 +27406,7 @@
<code> as </code>
<code>xs:time?</code>)<code> as </code>
<code>xs:dayTimeDuration?</code>
-(§<a href="#func-timezone-from-time">10.5.21</a>)</div>
+(§<a href="#func-timezone-from-time">10.5.21</a>)</div>
<div class="protoref">
<a href="#func-to">
<code>op:to</code>
@@ -27073,7 +27417,7 @@
<code> as </code>
<code>xs:integer</code>)<code> as </code>
<code>xs:integer*</code>
-(§<a href="#func-to">15.5.1</a>)</div>
+(§<a href="#func-to">15.5.1</a>)</div>
<div class="protoref">
<a href="#func-tokenize">
<code>fn:tokenize</code>
@@ -27084,7 +27428,7 @@
<code> as </code>
<code>xs:string</code>)<code> as </code>
<code>xs:string*</code>
-(§<a href="#func-tokenize">7.6.4</a>)</div>
+(§<a href="#func-tokenize">7.6.4</a>)</div>
<div class="protoref">
<a href="#func-tokenize">
<code>fn:tokenize</code>
@@ -27098,7 +27442,7 @@
<code> as </code>
<code>xs:string</code>)<code> as </code>
<code>xs:string*</code>
-(§<a href="#func-tokenize">7.6.4</a>)</div>
+(§<a href="#func-tokenize">7.6.4</a>)</div>
<div class="protoref">
<a href="#func-trace">
<code>fn:trace</code>
@@ -27109,7 +27453,7 @@
<code> as </code>
<code>xs:string</code>)<code> as </code>
<code>item()*</code>
-(§<a href="#func-trace">4</a>)</div>
+(§<a href="#func-trace">4</a>)</div>
<div class="protoref">
<a href="#func-translate">
<code>fn:translate</code>
@@ -27123,13 +27467,13 @@
<code> as </code>
<code>xs:string</code>)<code> as </code>
<code>xs:string</code>
-(§<a href="#func-translate">7.4.9</a>)</div>
+(§<a href="#func-translate">7.4.9</a>)</div>
<div class="protoref">
<a href="#func-true">
<code>fn:true</code>
</a>()<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-true">9.1.1</a>)</div>
+(§<a href="#func-true">9.1.1</a>)</div>
<div class="protoref">
<a href="#func-union">
<code>op:union</code>
@@ -27140,7 +27484,7 @@
<code> as </code>
<code>node()*</code>)<code> as </code>
<code>node()*</code>
-(§<a href="#func-union">15.3.2</a>)</div>
+(§<a href="#func-union">15.3.2</a>)</div>
<div class="protoref">
<a href="#func-unordered">
<code>fn:unordered</code>
@@ -27148,7 +27492,7 @@
<code> as </code>
<code>item()*</code>)<code> as </code>
<code>item()*</code>
-(§<a href="#func-unordered">15.1.11</a>)</div>
+(§<a href="#func-unordered">15.1.11</a>)</div>
<div class="protoref">
<a href="#func-upper-case">
<code>fn:upper-case</code>
@@ -27156,7 +27500,7 @@
<code> as </code>
<code>xs:string?</code>)<code> as </code>
<code>xs:string</code>
-(§<a href="#func-upper-case">7.4.7</a>)</div>
+(§<a href="#func-upper-case">7.4.7</a>)</div>
<div class="protoref">
<a href="#func-year-from-date">
<code>fn:year-from-date</code>
@@ -27164,7 +27508,7 @@
<code> as </code>
<code>xs:date?</code>)<code> as </code>
<code>xs:integer?</code>
-(§<a href="#func-year-from-date">10.5.14</a>)</div>
+(§<a href="#func-year-from-date">10.5.14</a>)</div>
<div class="protoref">
<a href="#func-year-from-dateTime">
<code>fn:year-from-dateTime</code>
@@ -27172,7 +27516,7 @@
<code> as </code>
<code>xs:dateTime?</code>)<code> as </code>
<code>xs:integer?</code>
-(§<a href="#func-year-from-dateTime">10.5.7</a>)</div>
+(§<a href="#func-year-from-dateTime">10.5.7</a>)</div>
<div class="protoref">
<a href="#func-yearMonthDuration-greater-than">
<code>op:yearMonthDuration-greater-than</code>
@@ -27183,7 +27527,7 @@
<code> as </code>
<code>xs:yearMonthDuration</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-yearMonthDuration-greater-than">10.4.2</a>)</div>
+(§<a href="#func-yearMonthDuration-greater-than">10.4.2</a>)</div>
<div class="protoref">
<a href="#func-yearMonthDuration-less-than">
<code>op:yearMonthDuration-less-than</code>
@@ -27194,7 +27538,7 @@
<code> as </code>
<code>xs:yearMonthDuration</code>)<code> as </code>
<code>xs:boolean</code>
-(§<a href="#func-yearMonthDuration-less-than">10.4.1</a>)</div>
+(§<a href="#func-yearMonthDuration-less-than">10.4.1</a>)</div>
<div class="protoref">
<a href="#func-years-from-duration">
<code>fn:years-from-duration</code>
@@ -27202,7 +27546,7 @@
<code> as </code>
<code>xs:duration?</code>)<code> as </code>
<code>xs:integer?</code>
-(§<a href="#func-years-from-duration">10.5.1</a>)</div>
+(§<a href="#func-years-from-duration">10.5.1</a>)</div>
<div class="protoref">
<a href="#func-zero-or-one">
<code>fn:zero-or-one</code>
@@ -27210,7 +27554,7 @@
<code> as </code>
<code>item()*</code>)<code> as </code>
<code>item()?</code>
-(§<a href="#func-zero-or-one">15.2.1</a>)</div>
+(§<a href="#func-zero-or-one">15.2.1</a>)</div>
</div>
</div>
</div>
=== modified file 'test/rbkt/Queries/zorba/spec/XQuery_3.0.html'
--- test/rbkt/Queries/zorba/spec/XQuery_3.0.html 2012-05-03 12:31:51 +0000
+++ test/rbkt/Queries/zorba/spec/XQuery_3.0.html 2012-06-06 14:48:22 +0000
@@ -1,17 +1,10 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<!--XSLT Processor: SAXON 9.1.0.5 from Saxonica SAXON 9.1.0.5-->
-<html xmlns:xs="http://www.w3.org/2001/XMLSchema" lang="EN" xmlns=
-"http://www.w3.org/1999/xhtml" xml:lang="EN">
-<head>
-<meta name="generator" content=
-"HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 15.6), see www.w3.org" />
-<meta http-equiv="Content-Type" content=
-"text/html; charset=utf-8" />
-<title>XPath and XQuery Functions and Operators 3.0</title>
-
-<style type="text/css">
-/*<![CDATA[*/
+<!--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">
+ <head>
+ <meta name="generator" content="HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 15.6), see www.w3.org"/>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>XPath and XQuery Functions and Operators 3.0</title>
+ <style type="text/css">
+/**/
code { font-family: monospace; }
div.constraint,
@@ -181,82 +174,81 @@
text-decoration: none }
a.env:visited, a.env:link { color: black;
text-decoration: none }
-/*]]>*/
+/**/
</style>
-<link rel="stylesheet" type="text/css" href=
-"http://www.w3.org/StyleSheets/TR/W3C-WD.css" />
-</head>
-<body>
-<div class="head">
-<p><a href="http://www.w3.org/"><img src=
-"http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width=
-"72" /></a></p>
-<h1><a name="title" id="title"></a>XPath and XQuery Functions and
+ <link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-WD.css"/>
+ </head>
+ <body>
+ <div class="head">
+ <p>
+ <a href="http://www.w3.org/">
+ <img src="http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width="72"/>
+ </a>
+ </p>
+ <h1>
+ <a name="title" id="title"/>XPath and XQuery Functions and
Operators 3.0</h1>
-<h2><a name="w3c-doctype" id="w3c-doctype"></a>W3C Working Draft 13
+ <h2>
+ <a name="w3c-doctype" id="w3c-doctype"/>W3C Working Draft 13
December 2011</h2>
-<dl>
-<dt>This version:</dt>
-<dd><a href=
-"http://www.w3.org/TR/2011/WD-xpath-functions-30-20111213/">http://www.w3.org/TR/2011/WD-xpath-functions-30-20111213/</a></dd>
-<dt>Latest version:</dt>
-<dd><a href=
-"http://www.w3.org/TR/xpath-functions-30/">http://www.w3.org/TR/xpath-functions-30/</a></dd>
-<dt>Previous versions:</dt>
-<dd><a href=
-"http://www.w3.org/TR/2011/WD-xpath-functions-30-20110614/">http://www.w3.org/TR/2011/WD-xpath-functions-30-20110614/</a>
-<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>
-<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></dd>
-<dt>Editor:</dt>
-<dd>Michael Kay (XSL WG), Saxonica <a href=
-"http://www.saxonica.com/">&lt;http://www.saxonica.com/&gt;</a></dd>
-</dl>
-<p>See also <a href=
-"http://www.w3.org/2003/03/Translations/byTechnology?technology=xpath-functions">
-<strong>translations</strong></a>.</p>
-<p>This document is also available in these non-normative formats:
-<a href=
-"http://www.w3.org/TR/2011/WD-xpath-functions-30-20111213/xpath-functions-30.xml">
-XML</a> and&#160;<a href=
-"http://www.w3.org/TR/2011/WD-xpath-functions-30-20111213/xpath-functions-30-diff.html">Change
+ <dl>
+ <dt>This version:</dt>
+ <dd>
+ <a href="http://www.w3.org/TR/2011/WD-xpath-functions-30-20111213/">http://www.w3.org/TR/2011/WD-xpath-functions-30-20111213/</a>
+ </dd>
+ <dt>Latest version:</dt>
+ <dd>
+ <a href="http://www.w3.org/TR/xpath-functions-30/">http://www.w3.org/TR/xpath-functions-30/</a>
+ </dd>
+ <dt>Previous versions:</dt>
+ <dd>
+ <a href="http://www.w3.org/TR/2011/WD-xpath-functions-30-20110614/">http://www.w3.org/TR/2011/WD-xpath-functions-30-20110614/</a>
+ <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>
+ <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>
+ </dd>
+ <dt>Editor:</dt>
+ <dd>Michael Kay (XSL WG), Saxonica <a href="http://www.saxonica.com/"><http://www.saxonica.com/></a>
+ </dd>
+ </dl>
+ <p>See also <a href="http://www.w3.org/2003/03/Translations/byTechnology?technology=xpath-functions">
+ <strong>translations</strong>
+ </a>.</p>
+ <p>This document is also available in these non-normative formats:
+<a href="http://www.w3.org/TR/2011/WD-xpath-functions-30-20111213/xpath-functions-30.xml">
+XML</a> and <a href="http://www.w3.org/TR/2011/WD-xpath-functions-30-20111213/xpath-functions-30-diff.html">Change
markings relative to previous Working Draft</a>.</p>
-<p class="copyright"><a href=
-"http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>&#160;©&#160;2011&#160;<a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup>
-(<a href="http://www.csail.mit.edu/"><acronym title=
-"Massachusetts Institute of Technology">MIT</acronym></a>, <a href=
-"http://www.ercim.eu/"><acronym title=
-"European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>,
+ <p class="copyright">
+ <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2011 <a href="http://www.w3.org/">
+ <acronym title="World Wide Web Consortium">W3C</acronym>
+ </a>
+ <sup>®</sup>
+(<a href="http://www.csail.mit.edu/">
+ <acronym title="Massachusetts Institute of Technology">MIT</acronym>
+ </a>, <a href="http://www.ercim.eu/">
+ <acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym>
+ </a>,
<a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved.
-W3C <a href=
-"http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
-<a href=
-"http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>
-and <a href=
-"http://www.w3.org/Consortium/Legal/copyright-documents">document
+W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
+<a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>
+and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document
use</a> rules apply.</p>
-</div>
-<hr />
-<div>
-<h2><a name="abstract" id="abstract"></a>Abstract</h2>
-<p>Change markings are relative to the Recommendation of 23 January
+ </div>
+ <hr/>
+ <div>
+ <h2>
+ <a name="abstract" id="abstract"/>Abstract</h2>
+ <p>Change markings are relative to the Recommendation of 23 January
2007.</p>
-<p>This document defines constructor functions, operators, and
+ <p>This document defines constructor functions, operators, and
functions on the datatypes defined in <a href="#xmlschema-2">[XML
Schema Part 2: Datatypes Second Edition]</a> and the datatypes
defined in <a href="#xpath-datamodel-30">[XQuery and XPath Data
Model (XDM) 3.0]</a>. It also defines functions and operators on
-nodes and node sequences as defined in the <a href=
-"#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>.
-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
+nodes and node sequences as defined in the <a href="#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>.
+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
related XML standards. The signatures and summaries of functions
-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>
-<p>This is the third version of the specification of this function
+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>
+ <p>This is the third version of the specification of this function
library. The first version was included as an intrinsic part of the
<a href="#xpath">[XML Path Language (XPath) Version 1.0]</a>
specification published on 16 November 1999. The second version was
@@ -266,1190 +258,1110 @@
the first to carry its own version number, which has been set at
3.0 to align with the version numbering for XPath, XQuery, and
XSLT.</p>
-</div>
-<div>
-<h2><a name="status" id="status"></a>Status of this Document</h2>
-<p><em>This section describes the status of this document at the
+ </div>
+ <div>
+ <h2>
+ <a name="status" id="status"/>Status of this Document</h2>
+ <p>
+ <em>This section describes the status of this document at the
time of its publication. Other documents may supersede this
document. A list of current W3C publications and the latest
-revision of this technical report can be found in the <a href=
-"http://www.w3.org/TR/">W3C technical reports index</a> at
-http://www.w3.org/TR/.</em></p>
-<p>This is one document in a set of seven documents that are being
+revision of this technical report can be found in the <a href="http://www.w3.org/TR/">W3C technical reports index</a> at
+http://www.w3.org/TR/.</em>
+ </p>
+ <p>This is one document in a set of seven documents that are being
progressed to Recommendation together (XQuery 3.0, XQueryX 3.0,
XSLT 3.0, Data Model 3.0, Functions and Operators 3.0,
Serialization 3.0, XPath 3.0).</p>
-<p>This is a <a href=
-"http://www.w3.org/2005/10/Process-20051014/tr.html#last-call">Last
-Call Working Draft</a> as described in the <a href=
-"http://www.w3.org/2005/10/Process-20051014/tr.html">Process
-Document</a>. It was jointly developed by the W3C <a href=
-"http://www.w3.org/XML/Query/">XML Query Working Group</a> and the
+ <p>This is a <a href="http://www.w3.org/2005/10/Process-20051014/tr.html#last-call">Last
+Call Working Draft</a> as described in the <a href="http://www.w3.org/2005/10/Process-20051014/tr.html">Process
+Document</a>. It was jointly developed by the W3C <a href="http://www.w3.org/XML/Query/">XML Query Working Group</a> and the
W3C <a href="http://www.w3.org/Style/XSL/">XSL Working Group</a>,
-each of which is part of the <a href=
-"http://www.w3.org/XML/Activity">XML Activity</a>. Comments on this
+each of which is part of the <a href="http://www.w3.org/XML/Activity">XML Activity</a>. Comments on this
document will be formally accepted at least through 10 February
2012. The Working Groups expect to advance this specification to
-<a href=
-"http://www.w3.org/2005/10/Process-20051014/tr.html#RecsW3C">Recommendation</a>
+<a href="http://www.w3.org/2005/10/Process-20051014/tr.html#RecsW3C">Recommendation</a>
Status.</p>
-<p>This Last Call Working Draft makes a number of substantive
+ <p>This Last Call Working Draft makes a number of substantive
technical changes (as well as many editorial changes), including
new features, adopted since the previous Working Draft was
published. Please note that this Working Draft of XPath and XQuery
Functions and Operators 3.0 represents the second version of
<a href="http://www.w3.org/TR/2010/REC-xpath-functions-20101214/">a
previous W3C Recommendation</a>.</p>
-<p>This specification is designed to be referenced normatively from
+ <p>This specification is designed to be referenced normatively from
other specifications defining a host language for it; it is not
intended to be implemented outside a host language. The
implementability of this specification has been tested in the
context of its normative inclusion in host languages defined by the
<a href="http://www.w3.org/TR/xquery-30/">XQuery 3.0</a> and XSLT
-3.0 (expected in 2012) specifications; see the <a href=
-"http://dev.w3.org/2011/xquery-30-test-suite/results/XQTSReport.html">
+3.0 (expected in 2012) specifications; see the <a href="http://dev.w3.org/2011/xquery-30-test-suite/results/XQTSReport.html">
XQuery 3.0 implementation report</a> (and, in the future, the WGs
expect that there will also be a member-only XSLT 3.0
implementation report) for details.</p>
-<p>This document incorporates changes made against the previous
+ <p>This document incorporates changes made against the previous
publication of the Working Draft. Changes to this document since
the previous publication of the Working Draft are detailed in
-<a href="#changelog"><b>F Changes since previous
-Recommendation</b></a>.</p>
-<p>Please report errors in this document using W3C's <a href=
-"http://www.w3.org/Bugs/Public/">public Bugzilla system</a>
-(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>).
+<a href="#changelog">
+ <b>F Changes since previous
+Recommendation</b>
+ </a>.</p>
+ <p>Please report errors in this document using W3C's <a href="http://www.w3.org/Bugs/Public/">public Bugzilla system</a>
+(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>).
If access to that system is not feasible, you may send your
comments to the W3C XSLT/XPath/XQuery public comments mailing list,
-<a href=
-"mailto:public-qt-comments@xxxxxx">public-qt-comments@xxxxxx</a>.
+<a href="mailto:public-qt-comments@xxxxxx">public-qt-comments@xxxxxx</a>.
It will be very helpful if you include the string “[FO30]” in the
subject line of your report, whether made in Bugzilla or in email.
Please use multiple Bugzilla entries (or, if necessary, multiple
email messages) if you have more than one comment to make. 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>
-<p>Publication as a Working Draft does not imply endorsement by the
+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>
+ <p>Publication as a Working Draft does not imply endorsement by the
W3C Membership. This is a draft document and may be updated,
replaced or obsoleted by other documents at any time. It is
inappropriate to cite this document as other than work in
progress.</p>
-<p>This document was produced by groups operating under the
+ <p>This document was produced by groups operating under the
<a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5
-February 2004 W3C Patent Policy</a>. W3C maintains a <a href=
-"http://www.w3.org/2004/01/pp-impl/18797/status#disclosures">public
+February 2004 W3C Patent Policy</a>. W3C maintains a <a href="http://www.w3.org/2004/01/pp-impl/18797/status#disclosures">public
list of any patent disclosures</a> made in connection with the
deliverables of the XML Query Working Group and also maintains a
-<a href=
-"http://www.w3.org/2004/01/pp-impl/19552/status#disclosures">public
+<a href="http://www.w3.org/2004/01/pp-impl/19552/status#disclosures">public
list of any patent disclosures</a> made in connection with the
deliverables of the XSL Working Group; those pages also include
instructions for disclosing a patent. An individual who has actual
knowledge of a patent which the individual believes contains
-<a href=
-"http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">
+<a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">
Essential Claim(s)</a> must disclose the information in accordance
-with <a href=
-"http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">
+with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">
section 6 of the W3C Patent Policy</a>.</p>
-</div>
-<div class="toc">
-<h2><a name="quickcontents" id="quickcontents"></a>Quick
+ </div>
+ <div class="toc">
+ <h2>
+ <a name="quickcontents" id="quickcontents"/>Quick
Contents</h2>
-<ul>
-<li>
-<p><a href="#func-abs">abs</a>&#160; <a href=
-"#func-math-acos">acos</a>&#160; <a href=
-"#func-add-dayTimeDurations">add-dayTimeDurations</a>&#160;
-<a href="#func-add-dayTimeDuration-to-date">add-dayTimeDuration-to-date</a>&#160;
-<a href=
-"#func-add-dayTimeDuration-to-dateTime">add-dayTimeDuration-to-dateTime</a>&#160;
-<a href=
-"#func-add-dayTimeDuration-to-time">add-dayTimeDuration-to-time</a>&#160;
-<a href=
-"#func-add-yearMonthDurations">add-yearMonthDurations</a>&#160;
-<a href=
-"#func-add-yearMonthDuration-to-date">add-yearMonthDuration-to-date</a>&#160;
-<a href=
-"#func-add-yearMonthDuration-to-dateTime">add-yearMonthDuration-to-dateTime</a>&#160;
-<a href=
-"#func-adjust-dateTime-to-timezone">adjust-dateTime-to-timezone</a>&#160;
-<a href=
-"#func-adjust-date-to-timezone">adjust-date-to-timezone</a>&#160;
-<a href=
-"#func-adjust-time-to-timezone">adjust-time-to-timezone</a>&#160;
-<a href="#func-analyze-string">analyze-string</a>&#160; <a href=
-"#func-math-asin">asin</a>&#160; <a href=
-"#func-math-atan">atan</a>&#160; <a href=
-"#func-math-atan2">atan2</a>&#160; <a href=
-"#func-available-environment-variables">available-environment-variables</a>&#160;
-<a href="#func-avg">avg</a>&#160;</p>
-</li>
-<li>
-<p><a href="#func-base64Binary-equal">base64Binary-equal</a>&#160;
-<a href="#func-base-uri">base-uri</a>&#160; <a href=
-"#func-boolean">boolean</a>&#160; <a href=
-"#func-boolean-equal">boolean-equal</a>&#160; <a href=
-"#func-boolean-greater-than">boolean-greater-than</a>&#160;
-<a href="#func-boolean-less-than">boolean-less-than</a>&#160;</p>
-</li>
-<li>
-<p><a href="#func-ceiling">ceiling</a>&#160; <a href=
-"#func-codepoint-equal">codepoint-equal</a>&#160; <a href=
-"#func-codepoints-to-string">codepoints-to-string</a>&#160;
-<a href="#func-collection">collection</a>&#160; <a href=
-"#func-compare">compare</a>&#160; <a href=
-"#func-concat">concat</a>&#160; <a href=
-"#func-concatenate">concatenate</a>&#160; <a href=
-"#func-contains">contains</a>&#160; <a href=
-"#func-math-cos">cos</a>&#160; <a href=
-"#func-count">count</a>&#160; <a href=
-"#func-current-date">current-date</a>&#160; <a href=
-"#func-current-dateTime">current-dateTime</a>&#160; <a href=
-"#func-current-time">current-time</a>&#160;</p>
-</li>
-<li>
-<p><a href="#func-data">data</a>&#160; <a href=
-"#func-date-equal">date-equal</a>&#160; <a href=
-"#func-date-greater-than">date-greater-than</a>&#160; <a href=
-"#func-date-less-than">date-less-than</a>&#160; <a href=
-"#func-dateTime">dateTime</a>&#160; <a href=
-"#func-dateTime-equal">dateTime-equal</a>&#160; <a href=
-"#func-dateTime-greater-than">dateTime-greater-than</a>&#160;
-<a href="#func-dateTime-less-than">dateTime-less-than</a>&#160;
-<a href="#func-day-from-date">day-from-date</a>&#160; <a href=
-"#func-day-from-dateTime">day-from-dateTime</a>&#160; <a href=
-"#func-days-from-duration">days-from-duration</a>&#160; <a href=
-"#func-dayTimeDuration-greater-than">dayTimeDuration-greater-than</a>&#160;
-<a href=
-"#func-dayTimeDuration-less-than">dayTimeDuration-less-than</a>&#160;
-<a href="#func-deep-equal">deep-equal</a>&#160; <a href=
-"#func-default-collation">default-collation</a>&#160; <a href=
-"#func-distinct-values">distinct-values</a>&#160; <a href=
-"#func-divide-dayTimeDuration">divide-dayTimeDuration</a>&#160;
-<a href=
-"#func-divide-dayTimeDuration-by-dayTimeDuration">divide-dayTimeDuration-by-dayTimeDuration</a>&#160;
-<a href=
-"#func-divide-yearMonthDuration">divide-yearMonthDuration</a>&#160;
-<a href=
-"#func-divide-yearMonthDuration-by-yearMonthDuration">divide-yearMonthDuration-by-yearMonthDuration</a>&#160;
-<a href="#func-doc">doc</a>&#160; <a href=
-"#func-doc-available">doc-available</a>&#160; <a href=
-"#func-document-uri">document-uri</a>&#160; <a href=
-"#func-duration-equal">duration-equal</a>&#160;</p>
-</li>
-<li>
-<p><a href="#func-element-with-id">element-with-id</a>&#160;
-<a href="#func-empty">empty</a>&#160; <a href=
-"#func-encode-for-uri">encode-for-uri</a>&#160; <a href=
-"#func-ends-with">ends-with</a>&#160; <a href=
-"#func-environment-variable">environment-variable</a>&#160;
-<a href="#func-error">error</a>&#160; <a href=
-"#func-escape-html-uri">escape-html-uri</a>&#160; <a href=
-"#func-exactly-one">exactly-one</a>&#160; <a href=
-"#func-except">except</a>&#160; <a href=
-"#func-exists">exists</a>&#160; <a href=
-"#func-math-exp">exp</a>&#160; <a href=
-"#func-math-exp10">exp10</a>&#160;</p>
-</li>
-<li>
-<p><a href="#func-false">false</a>&#160; <a href=
-"#func-filter">filter</a>&#160; <a href=
-"#func-floor">floor</a>&#160; <a href=
-"#func-fold-left">fold-left</a>&#160; <a href=
-"#func-fold-right">fold-right</a>&#160; <a href=
-"#func-format-date">format-date</a>&#160; <a href=
-"#func-format-dateTime">format-dateTime</a>&#160; <a href=
-"#func-format-integer">format-integer</a>&#160; <a href=
-"#func-format-number">format-number</a>&#160; <a href=
-"#func-format-time">format-time</a>&#160; <a href=
-"#func-function-arity">function-arity</a>&#160; <a href=
-"#func-function-lookup">function-lookup</a>&#160; <a href=
-"#func-function-name">function-name</a>&#160;</p>
-</li>
-<li>
-<p><a href="#func-gDay-equal">gDay-equal</a>&#160; <a href=
-"#func-generate-id">generate-id</a>&#160; <a href=
-"#func-gMonthDay-equal">gMonthDay-equal</a>&#160; <a href=
-"#func-gMonth-equal">gMonth-equal</a>&#160; <a href=
-"#func-gYear-equal">gYear-equal</a>&#160; <a href=
-"#func-gYearMonth-equal">gYearMonth-equal</a>&#160;</p>
-</li>
-<li>
-<p><a href="#func-has-children">has-children</a>&#160; <a href=
-"#func-head">head</a>&#160; <a href=
-"#func-hexBinary-equal">hexBinary-equal</a>&#160; <a href=
-"#func-hours-from-dateTime">hours-from-dateTime</a>&#160; <a href=
-"#func-hours-from-duration">hours-from-duration</a>&#160; <a href=
-"#func-hours-from-time">hours-from-time</a>&#160;</p>
-</li>
-<li>
-<p><a href="#func-id">id</a>&#160; <a href=
-"#func-idref">idref</a>&#160; <a href=
-"#func-implicit-timezone">implicit-timezone</a>&#160; <a href=
-"#func-index-of">index-of</a>&#160; <a href=
-"#func-innermost">innermost</a>&#160; <a href=
-"#func-in-scope-prefixes">in-scope-prefixes</a>&#160; <a href=
-"#func-insert-before">insert-before</a>&#160; <a href=
-"#func-intersect">intersect</a>&#160; <a href=
-"#func-iri-to-uri">iri-to-uri</a>&#160; <a href=
-"#func-is-same-node">is-same-node</a>&#160;</p>
-</li>
-<li>
-<p><a href="#func-lang">lang</a>&#160; <a href=
-"#func-last">last</a>&#160; <a href=
-"#func-local-name">local-name</a>&#160; <a href=
-"#func-local-name-from-QName">local-name-from-QName</a>&#160;
-<a href="#func-math-log">log</a>&#160; <a href=
-"#func-math-log10">log10</a>&#160; <a href=
-"#func-lower-case">lower-case</a>&#160;</p>
-</li>
-<li>
-<p><a href="#func-map">map</a>&#160; <a href=
-"#func-map-pairs">map-pairs</a>&#160; <a href=
-"#func-matches">matches</a>&#160; <a href="#func-max">max</a>&#160;
-<a href="#func-min">min</a>&#160; <a href=
-"#func-minutes-from-dateTime">minutes-from-dateTime</a>&#160;
-<a href=
-"#func-minutes-from-duration">minutes-from-duration</a>&#160;
-<a href="#func-minutes-from-time">minutes-from-time</a>&#160;
-<a href="#func-month-from-date">month-from-date</a>&#160; <a href=
-"#func-month-from-dateTime">month-from-dateTime</a>&#160; <a href=
-"#func-months-from-duration">months-from-duration</a>&#160;
-<a href="#func-multiply-dayTimeDuration">multiply-dayTimeDuration</a>&#160;
-<a href=
-"#func-multiply-yearMonthDuration">multiply-yearMonthDuration</a>&#160;</p>
-</li>
-<li>
-<p><a href="#func-name">name</a>&#160; <a href=
-"#func-namespace-uri">namespace-uri</a>&#160; <a href=
-"#func-namespace-uri-for-prefix">namespace-uri-for-prefix</a>&#160;
-<a href=
-"#func-namespace-uri-from-QName">namespace-uri-from-QName</a>&#160;
-<a href="#func-nilled">nilled</a>&#160; <a href=
-"#func-node-after">node-after</a>&#160; <a href=
-"#func-node-before">node-before</a>&#160; <a href=
-"#func-node-name">node-name</a>&#160; <a href=
-"#func-normalize-space">normalize-space</a>&#160; <a href=
-"#func-normalize-unicode">normalize-unicode</a>&#160; <a href=
-"#func-not">not</a>&#160; <a href=
-"#func-NOTATION-equal">NOTATION-equal</a>&#160; <a href=
-"#func-number">number</a>&#160; <a href=
-"#func-numeric-add">numeric-add</a>&#160; <a href=
-"#func-numeric-divide">numeric-divide</a>&#160; <a href=
-"#func-numeric-equal">numeric-equal</a>&#160; <a href=
-"#func-numeric-greater-than">numeric-greater-than</a>&#160;
-<a href="#func-numeric-integer-divide">numeric-integer-divide</a>&#160;
-<a href="#func-numeric-less-than">numeric-less-than</a>&#160;
-<a href="#func-numeric-mod">numeric-mod</a>&#160; <a href=
-"#func-numeric-multiply">numeric-multiply</a>&#160; <a href=
-"#func-numeric-subtract">numeric-subtract</a>&#160; <a href=
-"#func-numeric-unary-minus">numeric-unary-minus</a>&#160; <a href=
-"#func-numeric-unary-plus">numeric-unary-plus</a>&#160;</p>
-</li>
-<li>
-<p><a href="#func-one-or-more">one-or-more</a>&#160; <a href=
-"#func-outermost">outermost</a>&#160;</p>
-</li>
-<li>
-<p><a href="#func-parse-xml">parse-xml</a>&#160; <a href=
-"#func-parse-xml-fragment">parse-xml-fragment</a>&#160; <a href=
-"#func-path">path</a>&#160; <a href="#func-math-pi">pi</a>&#160;
-<a href="#func-position">position</a>&#160; <a href=
-"#func-math-pow">pow</a>&#160; <a href=
-"#func-prefix-from-QName">prefix-from-QName</a>&#160;</p>
-</li>
-<li>
-<p><a href="#func-QName">QName</a>&#160; <a href=
-"#func-QName-equal">QName-equal</a>&#160;</p>
-</li>
-<li>
-<p><a href="#func-remove">remove</a>&#160; <a href=
-"#func-replace">replace</a>&#160; <a href=
-"#func-resolve-QName">resolve-QName</a>&#160; <a href=
-"#func-resolve-uri">resolve-uri</a>&#160; <a href=
-"#func-reverse">reverse</a>&#160; <a href=
-"#func-root">root</a>&#160; <a href="#func-round">round</a>&#160;
-<a href="#func-round-half-to-even">round-half-to-even</a>&#160;</p>
-</li>
-<li>
-<p><a href=
-"#func-seconds-from-dateTime">seconds-from-dateTime</a>&#160;
-<a href=
-"#func-seconds-from-duration">seconds-from-duration</a>&#160;
-<a href="#func-seconds-from-time">seconds-from-time</a>&#160;
-<a href="#func-serialize">serialize</a>&#160; <a href=
-"#func-math-sin">sin</a>&#160; <a href=
-"#func-math-sqrt">sqrt</a>&#160; <a href=
-"#func-starts-with">starts-with</a>&#160; <a href=
-"#func-static-base-uri">static-base-uri</a>&#160; <a href=
-"#func-string">string</a>&#160; <a href=
-"#func-string-join">string-join</a>&#160; <a href=
-"#func-string-length">string-length</a>&#160; <a href=
-"#func-string-to-codepoints">string-to-codepoints</a>&#160;
-<a href="#func-subsequence">subsequence</a>&#160; <a href=
-"#func-substring">substring</a>&#160; <a href=
-"#func-substring-after">substring-after</a>&#160; <a href=
-"#func-substring-before">substring-before</a>&#160; <a href=
-"#func-subtract-dates">subtract-dates</a>&#160; <a href=
-"#func-subtract-dateTimes">subtract-dateTimes</a>&#160; <a href=
-"#func-subtract-dayTimeDuration-from-date">subtract-dayTimeDuration-from-date</a>&#160;
-<a href=
-"#func-subtract-dayTimeDuration-from-dateTime">subtract-dayTimeDuration-from-dateTime</a>&#160;
-<a href=
-"#func-subtract-dayTimeDuration-from-time">subtract-dayTimeDuration-from-time</a>&#160;
-<a href=
-"#func-subtract-dayTimeDurations">subtract-dayTimeDurations</a>&#160;
-<a href="#func-subtract-times">subtract-times</a>&#160; <a href=
-"#func-subtract-yearMonthDuration-from-date">subtract-yearMonthDuration-from-date</a>&#160;
-<a href=
-"#func-subtract-yearMonthDuration-from-dateTime">subtract-yearMonthDuration-from-dateTime</a>&#160;
-<a href=
-"#func-subtract-yearMonthDurations">subtract-yearMonthDurations</a>&#160;
-<a href="#func-sum">sum</a>&#160;</p>
-</li>
-<li>
-<p><a href="#func-tail">tail</a>&#160; <a href=
-"#func-math-tan">tan</a>&#160; <a href=
-"#func-time-equal">time-equal</a>&#160; <a href=
-"#func-time-greater-than">time-greater-than</a>&#160; <a href=
-"#func-time-less-than">time-less-than</a>&#160; <a href=
-"#func-timezone-from-date">timezone-from-date</a>&#160; <a href=
-"#func-timezone-from-dateTime">timezone-from-dateTime</a>&#160;
-<a href="#func-timezone-from-time">timezone-from-time</a>&#160;
-<a href="#func-to">to</a>&#160; <a href=
-"#func-tokenize">tokenize</a>&#160; <a href=
-"#func-trace">trace</a>&#160; <a href=
-"#func-translate">translate</a>&#160; <a href=
-"#func-true">true</a>&#160;</p>
-</li>
-<li>
-<p><a href="#func-union">union</a>&#160; <a href=
-"#func-unordered">unordered</a>&#160; <a href=
-"#func-unparsed-text">unparsed-text</a>&#160; <a href=
-"#func-unparsed-text-available">unparsed-text-available</a>&#160;
-<a href="#func-unparsed-text-lines">unparsed-text-lines</a>&#160;
-<a href="#func-upper-case">upper-case</a>&#160; <a href=
-"#func-uri-collection">uri-collection</a>&#160;</p>
-</li>
-<li>
-<p><a href="#func-year-from-date">year-from-date</a>&#160; <a href=
-"#func-year-from-dateTime">year-from-dateTime</a>&#160; <a href=
-"#func-yearMonthDuration-greater-than">yearMonthDuration-greater-than</a>&#160;
-<a href=
-"#func-yearMonthDuration-less-than">yearMonthDuration-less-than</a>&#160;
-<a href=
-"#func-years-from-duration">years-from-duration</a>&#160;</p>
-</li>
-<li>
-<p><a href="#func-zero-or-one">zero-or-one</a>&#160;</p>
-</li>
-</ul>
-</div>
-<div class="toc">
-<h2><a name="contents" id="contents"></a>Table of Contents</h2>
-<p class="toc">1 <a href="#intro">Introduction</a><br />
-&#160;&#160;&#160;&#160;1.1 <a href=
-"#conformance">Conformance</a><br />
-&#160;&#160;&#160;&#160;1.2 <a href=
-"#namespace-prefixes">Namespaces and prefixes</a><br />
-&#160;&#160;&#160;&#160;1.3 <a href="#func-overloading">Function
-overloading</a><br />
-&#160;&#160;&#160;&#160;1.4 <a href="#func-signatures">Function
-signatures and descriptions</a><br />
-&#160;&#160;&#160;&#160;1.5 <a href="#datatypes">Type
-system</a><br />
-&#160;&#160;&#160;&#160;1.6 <a href=
-"#terminology">Terminology</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;1.6.1 <a href=
-"#character-terminology">Strings, characters, and
-codepoints</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;1.6.2 <a href=
-"#namespace-terminology">Namespaces and URIs</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;1.6.3 <a href=
-"#conformance-terminology">Conformance terminology</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;1.6.4 <a href=
-"#properties-of-functions">Properties of functions</a><br />
-2 <a href="#accessors">Accessors</a><br />
-&#160;&#160;&#160;&#160;2.1 <a href=
-"#func-node-name">fn:node-name</a><br />
-&#160;&#160;&#160;&#160;2.2 <a href=
-"#func-nilled">fn:nilled</a><br />
-&#160;&#160;&#160;&#160;2.3 <a href=
-"#func-string">fn:string</a><br />
-&#160;&#160;&#160;&#160;2.4 <a href="#func-data">fn:data</a><br />
-&#160;&#160;&#160;&#160;2.5 <a href=
-"#func-base-uri">fn:base-uri</a><br />
-&#160;&#160;&#160;&#160;2.6 <a href=
-"#func-document-uri">fn:document-uri</a><br />
+ <ul>
+ <li>
+ <p>
+ <a href="#func-abs">abs</a> <a href="#func-math-acos">acos</a>
+<a href="#func-add-dayTimeDurations">add-dayTimeDurations</a>
+<a href="#func-add-dayTimeDuration-to-date">add-dayTimeDuration-to-date</a>
+<a href="#func-add-dayTimeDuration-to-dateTime">add-dayTimeDuration-to-dateTime</a>
+<a href="#func-add-dayTimeDuration-to-time">add-dayTimeDuration-to-time</a>
+<a href="#func-add-yearMonthDurations">add-yearMonthDurations</a>
+<a href="#func-add-yearMonthDuration-to-date">add-yearMonthDuration-to-date</a>
+<a href="#func-add-yearMonthDuration-to-dateTime">add-yearMonthDuration-to-dateTime</a>
+<a href="#func-adjust-dateTime-to-timezone">adjust-dateTime-to-timezone</a>
+<a href="#func-adjust-date-to-timezone">adjust-date-to-timezone</a>
+<a href="#func-adjust-time-to-timezone">adjust-time-to-timezone</a>
+<a href="#func-analyze-string">analyze-string</a> <a href="#func-math-asin">asin</a> <a href="#func-math-atan">atan</a>
+<a href="#func-math-atan2">atan2</a> <a href="#func-available-environment-variables">available-environment-variables</a>
+<a href="#func-avg">avg</a> </p>
+ </li>
+ <li>
+ <p>
+ <a href="#func-base64Binary-equal">base64Binary-equal</a>
+<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>
+ </li>
+ <li>
+ <p>
+ <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>
+<a href="#func-concatenate">concatenate</a> <a href="#func-contains">contains</a> <a href="#func-math-cos">cos</a>
+<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>
+ </li>
+ <li>
+ <p>
+ <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>
+<a href="#func-dayTimeDuration-less-than">dayTimeDuration-less-than</a>
+<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>
+<a href="#func-divide-yearMonthDuration">divide-yearMonthDuration</a>
+<a href="#func-divide-yearMonthDuration-by-yearMonthDuration">divide-yearMonthDuration-by-yearMonthDuration</a>
+<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>
+ </li>
+ <li>
+ <p>
+ <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>
+<a href="#func-math-exp">exp</a> <a href="#func-math-exp10">exp10</a> </p>
+ </li>
+ <li>
+ <p>
+ <a href="#func-false">false</a> <a href="#func-filter">filter</a> <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-lookup">function-lookup</a> <a href="#func-function-name">function-name</a> </p>
+ </li>
+ <li>
+ <p>
+ <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>
+ </li>
+ <li>
+ <p>
+ <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>
+ </li>
+ <li>
+ <p>
+ <a href="#func-id">id</a> <a href="#func-idref">idref</a>
+<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>
+ </li>
+ <li>
+ <p>
+ <a href="#func-lang">lang</a> <a href="#func-last">last</a>
+<a href="#func-local-name">local-name</a> <a href="#func-local-name-from-QName">local-name-from-QName</a> <a href="#func-math-log">log</a> <a href="#func-math-log10">log10</a>
+<a href="#func-lower-case">lower-case</a> </p>
+ </li>
+ <li>
+ <p>
+ <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>
+<a href="#func-multiply-yearMonthDuration">multiply-yearMonthDuration</a> </p>
+ </li>
+ <li>
+ <p>
+ <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>
+<a href="#func-namespace-uri-from-QName">namespace-uri-from-QName</a>
+<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>
+ </li>
+ <li>
+ <p>
+ <a href="#func-one-or-more">one-or-more</a> <a href="#func-outermost">outermost</a> </p>
+ </li>
+ <li>
+ <p>
+ <a href="#func-parse-xml">parse-xml</a> <a href="#func-parse-xml-fragment">parse-xml-fragment</a> <a href="#func-path">path</a> <a href="#func-math-pi">pi</a> <a href="#func-position">position</a> <a href="#func-math-pow">pow</a>
+<a href="#func-prefix-from-QName">prefix-from-QName</a> </p>
+ </li>
+ <li>
+ <p>
+ <a href="#func-QName">QName</a> <a href="#func-QName-equal">QName-equal</a> </p>
+ </li>
+ <li>
+ <p>
+ <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>
+<a href="#func-round">round</a> <a href="#func-round-half-to-even">round-half-to-even</a> </p>
+ </li>
+ <li>
+ <p>
+ <a href="#func-seconds-from-dateTime">seconds-from-dateTime</a>
+<a href="#func-seconds-from-duration">seconds-from-duration</a>
+<a href="#func-seconds-from-time">seconds-from-time</a> <a href="#func-serialize">serialize</a> <a href="#func-math-sin">sin</a>
+<a href="#func-math-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>
+<a href="#func-subtract-dayTimeDuration-from-dateTime">subtract-dayTimeDuration-from-dateTime</a>
+<a href="#func-subtract-dayTimeDuration-from-time">subtract-dayTimeDuration-from-time</a>
+<a href="#func-subtract-dayTimeDurations">subtract-dayTimeDurations</a>
+<a href="#func-subtract-times">subtract-times</a> <a href="#func-subtract-yearMonthDuration-from-date">subtract-yearMonthDuration-from-date</a>
+<a href="#func-subtract-yearMonthDuration-from-dateTime">subtract-yearMonthDuration-from-dateTime</a>
+<a href="#func-subtract-yearMonthDurations">subtract-yearMonthDurations</a>
+<a href="#func-sum">sum</a> </p>
+ </li>
+ <li>
+ <p>
+ <a href="#func-tail">tail</a> <a href="#func-math-tan">tan</a>
+<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>
+<a href="#func-true">true</a> </p>
+ </li>
+ <li>
+ <p>
+ <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>
+<a href="#func-unparsed-text-lines">unparsed-text-lines</a>
+<a href="#func-upper-case">upper-case</a> <a href="#func-uri-collection">uri-collection</a> </p>
+ </li>
+ <li>
+ <p>
+ <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>
+<a href="#func-yearMonthDuration-less-than">yearMonthDuration-less-than</a>
+<a href="#func-years-from-duration">years-from-duration</a> </p>
+ </li>
+ <li>
+ <p>
+ <a href="#func-zero-or-one">zero-or-one</a> </p>
+ </li>
+ </ul>
+ </div>
+ <div class="toc">
+ <h2>
+ <a name="contents" id="contents"/>Table of Contents</h2>
+ <p class="toc">1 <a href="#intro">Introduction</a>
+ <br/>
+ 1.1 <a href="#conformance">Conformance</a>
+ <br/>
+ 1.2 <a href="#namespace-prefixes">Namespaces and
+prefixes</a>
+ <br/>
+ 1.3 <a href="#func-overloading">Function overloading</a>
+ <br/>
+ 1.4 <a href="#func-signatures">Function signatures and
+descriptions</a>
+ <br/>
+ 1.5 <a href="#datatypes">Type system</a>
+ <br/>
+ 1.6 <a href="#terminology">Terminology</a>
+ <br/>
+ 1.6.1 <a href="#character-terminology">Strings, characters,
+and codepoints</a>
+ <br/>
+ 1.6.2 <a href="#namespace-terminology">Namespaces and
+URIs</a>
+ <br/>
+ 1.6.3 <a href="#conformance-terminology">Conformance
+terminology</a>
+ <br/>
+ 1.6.4 <a href="#properties-of-functions">Properties of
+functions</a>
+ <br/>
+2 <a href="#accessors">Accessors</a>
+ <br/>
+ 2.1 <a href="#func-node-name">fn:node-name</a>
+ <br/>
+ 2.2 <a href="#func-nilled">fn:nilled</a>
+ <br/>
+ 2.3 <a href="#func-string">fn:string</a>
+ <br/>
+ 2.4 <a href="#func-data">fn:data</a>
+ <br/>
+ 2.5 <a href="#func-base-uri">fn:base-uri</a>
+ <br/>
+ 2.6 <a href="#func-document-uri">fn:document-uri</a>
+ <br/>
3 <a href="#errors-and-diagnostics">Errors and
-diagnostics</a><br />
-&#160;&#160;&#160;&#160;3.1 <a href="#errors">Raising
-errors</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.1.1 <a href=
-"#func-error">fn:error</a><br />
-&#160;&#160;&#160;&#160;3.2 <a href="#diagnostics">Diagnostic
-tracing</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.1 <a href=
-"#func-trace">fn:trace</a><br />
+diagnostics</a>
+ <br/>
+ 3.1 <a href="#errors">Raising errors</a>
+ <br/>
+ 3.1.1 <a href="#func-error">fn:error</a>
+ <br/>
+ 3.2 <a href="#diagnostics">Diagnostic tracing</a>
+ <br/>
+ 3.2.1 <a href="#func-trace">fn:trace</a>
+ <br/>
4 <a href="#numeric-functions">Functions and operators on
-numerics</a><br />
-&#160;&#160;&#160;&#160;4.1 <a href="#numeric-types">Numeric
-types</a><br />
-&#160;&#160;&#160;&#160;4.2 <a href="#op.numeric">Arithmetic
-operators on numeric values</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.1 <a href=
-"#func-numeric-add">op:numeric-add</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.2 <a href=
-"#func-numeric-subtract">op:numeric-subtract</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.3 <a href=
-"#func-numeric-multiply">op:numeric-multiply</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.4 <a href=
-"#func-numeric-divide">op:numeric-divide</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.5 <a href=
-"#func-numeric-integer-divide">op:numeric-integer-divide</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.6 <a href=
-"#func-numeric-mod">op:numeric-mod</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.7 <a href=
-"#func-numeric-unary-plus">op:numeric-unary-plus</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.8 <a href=
-"#func-numeric-unary-minus">op:numeric-unary-minus</a><br />
-&#160;&#160;&#160;&#160;4.3 <a href="#comp.numeric">Comparison
-operators on numeric values</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.1 <a href=
-"#func-numeric-equal">op:numeric-equal</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.2 <a href=
-"#func-numeric-less-than">op:numeric-less-than</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.3 <a href=
-"#func-numeric-greater-than">op:numeric-greater-than</a><br />
-&#160;&#160;&#160;&#160;4.4 <a href=
-"#numeric-value-functions">Functions on numeric values</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.4.1 <a href=
-"#func-abs">fn:abs</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.4.2 <a href=
-"#func-ceiling">fn:ceiling</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.4.3 <a href=
-"#func-floor">fn:floor</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.4.4 <a href=
-"#func-round">fn:round</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.4.5 <a href=
-"#func-round-half-to-even">fn:round-half-to-even</a><br />
-&#160;&#160;&#160;&#160;4.5 <a href="#parsing-numbers">Parsing
-numbers</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.5.1 <a href=
-"#func-number">fn:number</a><br />
-&#160;&#160;&#160;&#160;4.6 <a href=
-"#formatting-integers">Formatting integers</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.6.1 <a href=
-"#func-format-integer">fn:format-integer</a><br />
-&#160;&#160;&#160;&#160;4.7 <a href=
-"#formatting-numbers">Formatting numbers</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.7.1 <a href=
-"#defining-decimal-format">Defining a decimal format</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.7.2 <a href=
-"#func-format-number">fn:format-number</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.7.3 <a href=
-"#syntax-of-picture-string">Syntax of the picture string</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.7.4 <a href=
-"#analysing-picture-string">Analysing the picture string</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.7.5 <a href=
-"#formatting-the-number">Formatting the number</a><br />
-&#160;&#160;&#160;&#160;4.8 <a href="#trigonometry">Trigonometric
-and exponential functions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.8.1 <a href=
-"#func-math-pi">math:pi</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.8.2 <a href=
-"#func-math-exp">math:exp</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.8.3 <a href=
-"#func-math-exp10">math:exp10</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.8.4 <a href=
-"#func-math-log">math:log</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.8.5 <a href=
-"#func-math-log10">math:log10</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.8.6 <a href=
-"#func-math-pow">math:pow</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.8.7 <a href=
-"#func-math-sqrt">math:sqrt</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.8.8 <a href=
-"#func-math-sin">math:sin</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.8.9 <a href=
-"#func-math-cos">math:cos</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.8.10 <a href=
-"#func-math-tan">math:tan</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.8.11 <a href=
-"#func-math-asin">math:asin</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.8.12 <a href=
-"#func-math-acos">math:acos</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.8.13 <a href=
-"#func-math-atan">math:atan</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.8.14 <a href=
-"#func-math-atan2">math:atan2</a><br />
-5 <a href="#string-functions">Functions on strings</a><br />
-&#160;&#160;&#160;&#160;5.1 <a href="#string-types">String
-types</a><br />
-&#160;&#160;&#160;&#160;5.2 <a href=
-"#func-assemble-disassemble-string">Functions to assemble and
-disassemble strings</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.2.1 <a href=
-"#func-codepoints-to-string">fn:codepoints-to-string</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.2.2 <a href=
-"#func-string-to-codepoints">fn:string-to-codepoints</a><br />
-&#160;&#160;&#160;&#160;5.3 <a href="#string-compare">Comparison of
-strings</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.3.1 <a href=
-"#collations">Collations</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.3.2 <a href=
-"#codepoint-collation">The Unicode Codepoint Collation</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.3.3 <a href=
-"#choosing-a-collation">Choosing a collation</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.3.4 <a href=
-"#func-compare">fn:compare</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.3.5 <a href=
-"#func-codepoint-equal">fn:codepoint-equal</a><br />
-&#160;&#160;&#160;&#160;5.4 <a href=
-"#string-value-functions">Functions on string values</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.4.1 <a href=
-"#func-concat">fn:concat</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.4.2 <a href=
-"#func-string-join">fn:string-join</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.4.3 <a href=
-"#func-substring">fn:substring</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.4.4 <a href=
-"#func-string-length">fn:string-length</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.4.5 <a href=
-"#func-normalize-space">fn:normalize-space</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.4.6 <a href=
-"#func-normalize-unicode">fn:normalize-unicode</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.4.7 <a href=
-"#func-upper-case">fn:upper-case</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.4.8 <a href=
-"#func-lower-case">fn:lower-case</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.4.9 <a href=
-"#func-translate">fn:translate</a><br />
-&#160;&#160;&#160;&#160;5.5 <a href=
-"#substring.functions">Functions based on substring
-matching</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.5.1 <a href=
-"#func-contains">fn:contains</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.5.2 <a href=
-"#func-starts-with">fn:starts-with</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.5.3 <a href=
-"#func-ends-with">fn:ends-with</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.5.4 <a href=
-"#func-substring-before">fn:substring-before</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.5.5 <a href=
-"#func-substring-after">fn:substring-after</a><br />
-&#160;&#160;&#160;&#160;5.6 <a href="#string.match">String
-functions that use regular expressions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.6.1 <a href=
-"#regex-syntax">Regular expression syntax</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.6.2 <a href=
-"#func-matches">fn:matches</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.6.3 <a href=
-"#func-replace">fn:replace</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.6.4 <a href=
-"#func-tokenize">fn:tokenize</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.6.5 <a href=
-"#func-analyze-string">fn:analyze-string</a><br />
+numerics</a>
+ <br/>
+ 4.1 <a href="#numeric-types">Numeric types</a>
+ <br/>
+ 4.2 <a href="#op.numeric">Arithmetic operators on numeric
+values</a>
+ <br/>
+ 4.2.1 <a href="#func-numeric-add">op:numeric-add</a>
+ <br/>
+ 4.2.2 <a href="#func-numeric-subtract">op:numeric-subtract</a>
+ <br/>
+ 4.2.3 <a href="#func-numeric-multiply">op:numeric-multiply</a>
+ <br/>
+ 4.2.4 <a href="#func-numeric-divide">op:numeric-divide</a>
+ <br/>
+ 4.2.5 <a href="#func-numeric-integer-divide">op:numeric-integer-divide</a>
+ <br/>
+ 4.2.6 <a href="#func-numeric-mod">op:numeric-mod</a>
+ <br/>
+ 4.2.7 <a href="#func-numeric-unary-plus">op:numeric-unary-plus</a>
+ <br/>
+ 4.2.8 <a href="#func-numeric-unary-minus">op:numeric-unary-minus</a>
+ <br/>
+ 4.3 <a href="#comp.numeric">Comparison operators on numeric
+values</a>
+ <br/>
+ 4.3.1 <a href="#func-numeric-equal">op:numeric-equal</a>
+ <br/>
+ 4.3.2 <a href="#func-numeric-less-than">op:numeric-less-than</a>
+ <br/>
+ 4.3.3 <a href="#func-numeric-greater-than">op:numeric-greater-than</a>
+ <br/>
+ 4.4 <a href="#numeric-value-functions">Functions on numeric
+values</a>
+ <br/>
+ 4.4.1 <a href="#func-abs">fn:abs</a>
+ <br/>
+ 4.4.2 <a href="#func-ceiling">fn:ceiling</a>
+ <br/>
+ 4.4.3 <a href="#func-floor">fn:floor</a>
+ <br/>
+ 4.4.4 <a href="#func-round">fn:round</a>
+ <br/>
+ 4.4.5 <a href="#func-round-half-to-even">fn:round-half-to-even</a>
+ <br/>
+ 4.5 <a href="#parsing-numbers">Parsing numbers</a>
+ <br/>
+ 4.5.1 <a href="#func-number">fn:number</a>
+ <br/>
+ 4.6 <a href="#formatting-integers">Formatting
+integers</a>
+ <br/>
+ 4.6.1 <a href="#func-format-integer">fn:format-integer</a>
+ <br/>
+ 4.7 <a href="#formatting-numbers">Formatting numbers</a>
+ <br/>
+ 4.7.1 <a href="#defining-decimal-format">Defining a decimal
+format</a>
+ <br/>
+ 4.7.2 <a href="#func-format-number">fn:format-number</a>
+ <br/>
+ 4.7.3 <a href="#syntax-of-picture-string">Syntax of the
+picture string</a>
+ <br/>
+ 4.7.4 <a href="#analysing-picture-string">Analysing the
+picture string</a>
+ <br/>
+ 4.7.5 <a href="#formatting-the-number">Formatting the
+number</a>
+ <br/>
+ 4.8 <a href="#trigonometry">Trigonometric and exponential
+functions</a>
+ <br/>
+ 4.8.1 <a href="#func-math-pi">math:pi</a>
+ <br/>
+ 4.8.2 <a href="#func-math-exp">math:exp</a>
+ <br/>
+ 4.8.3 <a href="#func-math-exp10">math:exp10</a>
+ <br/>
+ 4.8.4 <a href="#func-math-log">math:log</a>
+ <br/>
+ 4.8.5 <a href="#func-math-log10">math:log10</a>
+ <br/>
+ 4.8.6 <a href="#func-math-pow">math:pow</a>
+ <br/>
+ 4.8.7 <a href="#func-math-sqrt">math:sqrt</a>
+ <br/>
+ 4.8.8 <a href="#func-math-sin">math:sin</a>
+ <br/>
+ 4.8.9 <a href="#func-math-cos">math:cos</a>
+ <br/>
+ 4.8.10 <a href="#func-math-tan">math:tan</a>
+ <br/>
+ 4.8.11 <a href="#func-math-asin">math:asin</a>
+ <br/>
+ 4.8.12 <a href="#func-math-acos">math:acos</a>
+ <br/>
+ 4.8.13 <a href="#func-math-atan">math:atan</a>
+ <br/>
+ 4.8.14 <a href="#func-math-atan2">math:atan2</a>
+ <br/>
+5 <a href="#string-functions">Functions on strings</a>
+ <br/>
+ 5.1 <a href="#string-types">String types</a>
+ <br/>
+ 5.2 <a href="#func-assemble-disassemble-string">Functions to
+assemble and disassemble strings</a>
+ <br/>
+ 5.2.1 <a href="#func-codepoints-to-string">fn:codepoints-to-string</a>
+ <br/>
+ 5.2.2 <a href="#func-string-to-codepoints">fn:string-to-codepoints</a>
+ <br/>
+ 5.3 <a href="#string-compare">Comparison of strings</a>
+ <br/>
+ 5.3.1 <a href="#collations">Collations</a>
+ <br/>
+ 5.3.2 <a href="#codepoint-collation">The Unicode Codepoint
+Collation</a>
+ <br/>
+ 5.3.3 <a href="#choosing-a-collation">Choosing a
+collation</a>
+ <br/>
+ 5.3.4 <a href="#func-compare">fn:compare</a>
+ <br/>
+ 5.3.5 <a href="#func-codepoint-equal">fn:codepoint-equal</a>
+ <br/>
+ 5.4 <a href="#string-value-functions">Functions on string
+values</a>
+ <br/>
+ 5.4.1 <a href="#func-concat">fn:concat</a>
+ <br/>
+ 5.4.2 <a href="#func-string-join">fn:string-join</a>
+ <br/>
+ 5.4.3 <a href="#func-substring">fn:substring</a>
+ <br/>
+ 5.4.4 <a href="#func-string-length">fn:string-length</a>
+ <br/>
+ 5.4.5 <a href="#func-normalize-space">fn:normalize-space</a>
+ <br/>
+ 5.4.6 <a href="#func-normalize-unicode">fn:normalize-unicode</a>
+ <br/>
+ 5.4.7 <a href="#func-upper-case">fn:upper-case</a>
+ <br/>
+ 5.4.8 <a href="#func-lower-case">fn:lower-case</a>
+ <br/>
+ 5.4.9 <a href="#func-translate">fn:translate</a>
+ <br/>
+ 5.5 <a href="#substring.functions">Functions based on substring
+matching</a>
+ <br/>
+ 5.5.1 <a href="#func-contains">fn:contains</a>
+ <br/>
+ 5.5.2 <a href="#func-starts-with">fn:starts-with</a>
+ <br/>
+ 5.5.3 <a href="#func-ends-with">fn:ends-with</a>
+ <br/>
+ 5.5.4 <a href="#func-substring-before">fn:substring-before</a>
+ <br/>
+ 5.5.5 <a href="#func-substring-after">fn:substring-after</a>
+ <br/>
+ 5.6 <a href="#string.match">String functions that use regular
+expressions</a>
+ <br/>
+ 5.6.1 <a href="#regex-syntax">Regular expression
+syntax</a>
+ <br/>
+ 5.6.2 <a href="#func-matches">fn:matches</a>
+ <br/>
+ 5.6.3 <a href="#func-replace">fn:replace</a>
+ <br/>
+ 5.6.4 <a href="#func-tokenize">fn:tokenize</a>
+ <br/>
+ 5.6.5 <a href="#func-analyze-string">fn:analyze-string</a>
+ <br/>
6 <a href="#anyURI-functions">Functions that manipulate
-URIs</a><br />
-&#160;&#160;&#160;&#160;6.1 <a href=
-"#func-resolve-uri">fn:resolve-uri</a><br />
-&#160;&#160;&#160;&#160;6.2 <a href=
-"#func-encode-for-uri">fn:encode-for-uri</a><br />
-&#160;&#160;&#160;&#160;6.3 <a href=
-"#func-iri-to-uri">fn:iri-to-uri</a><br />
-&#160;&#160;&#160;&#160;6.4 <a href=
-"#func-escape-html-uri">fn:escape-html-uri</a><br />
+URIs</a>
+ <br/>
+ 6.1 <a href="#func-resolve-uri">fn:resolve-uri</a>
+ <br/>
+ 6.2 <a href="#func-encode-for-uri">fn:encode-for-uri</a>
+ <br/>
+ 6.3 <a href="#func-iri-to-uri">fn:iri-to-uri</a>
+ <br/>
+ 6.4 <a href="#func-escape-html-uri">fn:escape-html-uri</a>
+ <br/>
7 <a href="#boolean-functions">Functions and operators on Boolean
-values</a><br />
-&#160;&#160;&#160;&#160;7.1 <a href="#boolean-constructors">Boolean
-constant functions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;7.1.1 <a href=
-"#func-true">fn:true</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;7.1.2 <a href=
-"#func-false">fn:false</a><br />
-&#160;&#160;&#160;&#160;7.2 <a href="#op.boolean">Operators on
-Boolean values</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;7.2.1 <a href=
-"#func-boolean-equal">op:boolean-equal</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;7.2.2 <a href=
-"#func-boolean-less-than">op:boolean-less-than</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;7.2.3 <a href=
-"#func-boolean-greater-than">op:boolean-greater-than</a><br />
-&#160;&#160;&#160;&#160;7.3 <a href=
-"#boolean-value-functions">Functions on Boolean values</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;7.3.1 <a href=
-"#func-boolean">fn:boolean</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;7.3.2 <a href=
-"#func-not">fn:not</a><br />
+values</a>
+ <br/>
+ 7.1 <a href="#boolean-constructors">Boolean constant
+functions</a>
+ <br/>
+ 7.1.1 <a href="#func-true">fn:true</a>
+ <br/>
+ 7.1.2 <a href="#func-false">fn:false</a>
+ <br/>
+ 7.2 <a href="#op.boolean">Operators on Boolean values</a>
+ <br/>
+ 7.2.1 <a href="#func-boolean-equal">op:boolean-equal</a>
+ <br/>
+ 7.2.2 <a href="#func-boolean-less-than">op:boolean-less-than</a>
+ <br/>
+ 7.2.3 <a href="#func-boolean-greater-than">op:boolean-greater-than</a>
+ <br/>
+ 7.3 <a href="#boolean-value-functions">Functions on Boolean
+values</a>
+ <br/>
+ 7.3.1 <a href="#func-boolean">fn:boolean</a>
+ <br/>
+ 7.3.2 <a href="#func-not">fn:not</a>
+ <br/>
8 <a href="#durations">Functions and operators on
-durations</a><br />
-&#160;&#160;&#160;&#160;8.1 <a href="#duration-subtypes">Two
-totally ordered subtypes of duration</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.1.1 <a href=
-"#dt-yearMonthDuration">xs:yearMonthDuration</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.1.2 <a href=
-"#dt-dayTimeDuration">xs:dayTimeDuration</a><br />
-&#160;&#160;&#160;&#160;8.2 <a href="#comp.duration">Comparison
-operators on durations</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.2.1 <a href=
-"#func-yearMonthDuration-less-than">op:yearMonthDuration-less-than</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.2.2 <a href=
-"#func-yearMonthDuration-greater-than">op:yearMonthDuration-greater-than</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.2.3 <a href=
-"#func-dayTimeDuration-less-than">op:dayTimeDuration-less-than</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.2.4 <a href=
-"#func-dayTimeDuration-greater-than">op:dayTimeDuration-greater-than</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.2.5 <a href=
-"#func-duration-equal">op:duration-equal</a><br />
-&#160;&#160;&#160;&#160;8.3 <a href=
-"#component-extraction-durations">Component extraction functions on
-durations</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.3.1 <a href=
-"#func-years-from-duration">fn:years-from-duration</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.3.2 <a href=
-"#func-months-from-duration">fn:months-from-duration</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.3.3 <a href=
-"#func-days-from-duration">fn:days-from-duration</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.3.4 <a href=
-"#func-hours-from-duration">fn:hours-from-duration</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.3.5 <a href=
-"#func-minutes-from-duration">fn:minutes-from-duration</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.3.6 <a href=
-"#func-seconds-from-duration">fn:seconds-from-duration</a><br />
-&#160;&#160;&#160;&#160;8.4 <a href=
-"#duration-arithmetic">Arithmetic operators on durations</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.4.1 <a href=
-"#func-add-yearMonthDurations">op:add-yearMonthDurations</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.4.2 <a href=
-"#func-subtract-yearMonthDurations">op:subtract-yearMonthDurations</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.4.3 <a href=
-"#func-multiply-yearMonthDuration">op:multiply-yearMonthDuration</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.4.4 <a href=
-"#func-divide-yearMonthDuration">op:divide-yearMonthDuration</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.4.5 <a href=
-"#func-divide-yearMonthDuration-by-yearMonthDuration">op:divide-yearMonthDuration-by-yearMonthDuration</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.4.6 <a href=
-"#func-add-dayTimeDurations">op:add-dayTimeDurations</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.4.7 <a href=
-"#func-subtract-dayTimeDurations">op:subtract-dayTimeDurations</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.4.8 <a href=
-"#func-multiply-dayTimeDuration">op:multiply-dayTimeDuration</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.4.9 <a href=
-"#func-divide-dayTimeDuration">op:divide-dayTimeDuration</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.4.10 <a href=
-"#func-divide-dayTimeDuration-by-dayTimeDuration">op:divide-dayTimeDuration-by-dayTimeDuration</a><br />
+durations</a>
+ <br/>
+ 8.1 <a href="#duration-subtypes">Two totally ordered subtypes
+of duration</a>
+ <br/>
+ 8.1.1 <a href="#dt-yearMonthDuration">xs:yearMonthDuration</a>
+ <br/>
+ 8.1.2 <a href="#dt-dayTimeDuration">xs:dayTimeDuration</a>
+ <br/>
+ 8.2 <a href="#comp.duration">Comparison operators on
+durations</a>
+ <br/>
+ 8.2.1 <a href="#func-yearMonthDuration-less-than">op:yearMonthDuration-less-than</a>
+ <br/>
+
+ 8.2.2 <a href="#func-yearMonthDuration-greater-than">op:yearMonthDuration-greater-than</a>
+ <br/>
+
+ 8.2.3 <a href="#func-dayTimeDuration-less-than">op:dayTimeDuration-less-than</a>
+ <br/>
+
+ 8.2.4 <a href="#func-dayTimeDuration-greater-than">op:dayTimeDuration-greater-than</a>
+ <br/>
+
+ 8.2.5 <a href="#func-duration-equal">op:duration-equal</a>
+ <br/>
+ 8.3 <a href="#component-extraction-durations">Component
+extraction functions on durations</a>
+ <br/>
+ 8.3.1 <a href="#func-years-from-duration">fn:years-from-duration</a>
+ <br/>
+ 8.3.2 <a href="#func-months-from-duration">fn:months-from-duration</a>
+ <br/>
+ 8.3.3 <a href="#func-days-from-duration">fn:days-from-duration</a>
+ <br/>
+ 8.3.4 <a href="#func-hours-from-duration">fn:hours-from-duration</a>
+ <br/>
+ 8.3.5 <a href="#func-minutes-from-duration">fn:minutes-from-duration</a>
+ <br/>
+ 8.3.6 <a href="#func-seconds-from-duration">fn:seconds-from-duration</a>
+ <br/>
+ 8.4 <a href="#duration-arithmetic">Arithmetic operators on
+durations</a>
+ <br/>
+ 8.4.1 <a href="#func-add-yearMonthDurations">op:add-yearMonthDurations</a>
+ <br/>
+ 8.4.2 <a href="#func-subtract-yearMonthDurations">op:subtract-yearMonthDurations</a>
+ <br/>
+
+ 8.4.3 <a href="#func-multiply-yearMonthDuration">op:multiply-yearMonthDuration</a>
+ <br/>
+
+ 8.4.4 <a href="#func-divide-yearMonthDuration">op:divide-yearMonthDuration</a>
+ <br/>
+
+ 8.4.5 <a href="#func-divide-yearMonthDuration-by-yearMonthDuration">op:divide-yearMonthDuration-by-yearMonthDuration</a>
+ <br/>
+
+ 8.4.6 <a href="#func-add-dayTimeDurations">op:add-dayTimeDurations</a>
+ <br/>
+ 8.4.7 <a href="#func-subtract-dayTimeDurations">op:subtract-dayTimeDurations</a>
+ <br/>
+
+ 8.4.8 <a href="#func-multiply-dayTimeDuration">op:multiply-dayTimeDuration</a>
+ <br/>
+
+ 8.4.9 <a href="#func-divide-dayTimeDuration">op:divide-dayTimeDuration</a>
+ <br/>
+ 8.4.10 <a href="#func-divide-dayTimeDuration-by-dayTimeDuration">op:divide-dayTimeDuration-by-dayTimeDuration</a>
+ <br/>
9 <a href="#dates-times">Functions and operators on dates and
-times</a><br />
-&#160;&#160;&#160;&#160;9.1 <a href="#date-time-types">Date and
-time types</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.1.1 <a href=
-"#date-time-duration-conformance">Limits and precision</a><br />
-&#160;&#160;&#160;&#160;9.2 <a href="#date-time-values">Date/time
-datatype values</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.2.1 <a href=
-"#date-time-lexical-mapping">Examples</a><br />
-&#160;&#160;&#160;&#160;9.3 <a href=
-"#constructing-dateTime">Constructing a dateTime</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.3.1 <a href=
-"#func-dateTime">fn:dateTime</a><br />
-&#160;&#160;&#160;&#160;9.4 <a href="#comp.datetime">Comparison
-operators on duration, date and time values</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.4.1 <a href=
-"#func-dateTime-equal">op:dateTime-equal</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.4.2 <a href=
-"#func-dateTime-less-than">op:dateTime-less-than</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.4.3 <a href=
-"#func-dateTime-greater-than">op:dateTime-greater-than</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.4.4 <a href=
-"#func-date-equal">op:date-equal</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.4.5 <a href=
-"#func-date-less-than">op:date-less-than</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.4.6 <a href=
-"#func-date-greater-than">op:date-greater-than</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.4.7 <a href=
-"#func-time-equal">op:time-equal</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.4.8 <a href=
-"#func-time-less-than">op:time-less-than</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.4.9 <a href=
-"#func-time-greater-than">op:time-greater-than</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.4.10 <a href=
-"#func-gYearMonth-equal">op:gYearMonth-equal</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.4.11 <a href=
-"#func-gYear-equal">op:gYear-equal</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.4.12 <a href=
-"#func-gMonthDay-equal">op:gMonthDay-equal</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.4.13 <a href=
-"#func-gMonth-equal">op:gMonth-equal</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.4.14 <a href=
-"#func-gDay-equal">op:gDay-equal</a><br />
-&#160;&#160;&#160;&#160;9.5 <a href=
-"#component-extraction-dateTime">Component extraction functions on
-dates and times</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.5.1 <a href=
-"#func-year-from-dateTime">fn:year-from-dateTime</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.5.2 <a href=
-"#func-month-from-dateTime">fn:month-from-dateTime</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.5.3 <a href=
-"#func-day-from-dateTime">fn:day-from-dateTime</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.5.4 <a href=
-"#func-hours-from-dateTime">fn:hours-from-dateTime</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.5.5 <a href=
-"#func-minutes-from-dateTime">fn:minutes-from-dateTime</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.5.6 <a href=
-"#func-seconds-from-dateTime">fn:seconds-from-dateTime</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.5.7 <a href=
-"#func-timezone-from-dateTime">fn:timezone-from-dateTime</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.5.8 <a href=
-"#func-year-from-date">fn:year-from-date</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.5.9 <a href=
-"#func-month-from-date">fn:month-from-date</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.5.10 <a href=
-"#func-day-from-date">fn:day-from-date</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.5.11 <a href=
-"#func-timezone-from-date">fn:timezone-from-date</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.5.12 <a href=
-"#func-hours-from-time">fn:hours-from-time</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.5.13 <a href=
-"#func-minutes-from-time">fn:minutes-from-time</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.5.14 <a href=
-"#func-seconds-from-time">fn:seconds-from-time</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.5.15 <a href=
-"#func-timezone-from-time">fn:timezone-from-time</a><br />
-&#160;&#160;&#160;&#160;9.6 <a href="#timezone.functions">Timezone
-adjustment functions on dates and time values</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.6.1 <a href=
-"#func-adjust-dateTime-to-timezone">fn:adjust-dateTime-to-timezone</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.6.2 <a href=
-"#func-adjust-date-to-timezone">fn:adjust-date-to-timezone</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.6.3 <a href=
-"#func-adjust-time-to-timezone">fn:adjust-time-to-timezone</a><br />
-
-&#160;&#160;&#160;&#160;9.7 <a href=
-"#dateTime-arithmetic">Arithmetic operators on durations, dates and
-times</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.7.1 <a href=
-"#duration-limits">Limits and precision</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.7.2 <a href=
-"#func-subtract-dateTimes">op:subtract-dateTimes</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.7.3 <a href=
-"#func-subtract-dates">op:subtract-dates</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.7.4 <a href=
-"#func-subtract-times">op:subtract-times</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.7.5 <a href=
-"#func-add-yearMonthDuration-to-dateTime">op:add-yearMonthDuration-to-dateTime</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.7.6 <a href=
-"#func-add-dayTimeDuration-to-dateTime">op:add-dayTimeDuration-to-dateTime</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.7.7 <a href=
-"#func-subtract-yearMonthDuration-from-dateTime">op:subtract-yearMonthDuration-from-dateTime</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.7.8 <a href=
-"#func-subtract-dayTimeDuration-from-dateTime">op:subtract-dayTimeDuration-from-dateTime</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.7.9 <a href=
-"#func-add-yearMonthDuration-to-date">op:add-yearMonthDuration-to-date</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.7.10 <a href=
-"#func-add-dayTimeDuration-to-date">op:add-dayTimeDuration-to-date</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.7.11 <a href=
-"#func-subtract-yearMonthDuration-from-date">op:subtract-yearMonthDuration-from-date</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.7.12 <a href=
-"#func-subtract-dayTimeDuration-from-date">op:subtract-dayTimeDuration-from-date</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.7.13 <a href=
-"#func-add-dayTimeDuration-to-time">op:add-dayTimeDuration-to-time</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.7.14 <a href=
-"#func-subtract-dayTimeDuration-from-time">op:subtract-dayTimeDuration-from-time</a><br />
-
-&#160;&#160;&#160;&#160;9.8 <a href=
-"#formatting-dates-and-times">Formatting dates and times</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.8.1 <a href=
-"#func-format-dateTime">fn:format-dateTime</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.8.2 <a href=
-"#func-format-date">fn:format-date</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.8.3 <a href=
-"#func-format-time">fn:format-time</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.8.4 <a href=
-"#rules-for-datetime-formatting">The date/time formatting
-functions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.8.5 <a href=
-"#date-time-examples">Examples of date and time
-formatting</a><br />
-10 <a href="#QName-funcs">Functions related to QNames</a><br />
-&#160;&#160;&#160;&#160;10.1 <a href=
-"#QName-constructors">Functions to create a QName</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.1.1 <a href=
-"#func-resolve-QName">fn:resolve-QName</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.1.2 <a href=
-"#func-QName">fn:QName</a><br />
-&#160;&#160;&#160;&#160;10.2 <a href="#QName-functions">Functions
-and operators related to QNames</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.2.1 <a href=
-"#func-QName-equal">op:QName-equal</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.2.2 <a href=
-"#func-prefix-from-QName">fn:prefix-from-QName</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.2.3 <a href=
-"#func-local-name-from-QName">fn:local-name-from-QName</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.2.4 <a href=
-"#func-namespace-uri-from-QName">fn:namespace-uri-from-QName</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.2.5 <a href=
-"#func-namespace-uri-for-prefix">fn:namespace-uri-for-prefix</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.2.6 <a href=
-"#func-in-scope-prefixes">fn:in-scope-prefixes</a><br />
+times</a>
+ <br/>
+ 9.1 <a href="#date-time-types">Date and time types</a>
+ <br/>
+ 9.1.1 <a href="#date-time-duration-conformance">Limits and
+precision</a>
+ <br/>
+ 9.2 <a href="#date-time-values">Date/time datatype
+values</a>
+ <br/>
+ 9.2.1 <a href="#date-time-lexical-mapping">Examples</a>
+ <br/>
+ 9.3 <a href="#constructing-dateTime">Constructing a
+dateTime</a>
+ <br/>
+ 9.3.1 <a href="#func-dateTime">fn:dateTime</a>
+ <br/>
+ 9.4 <a href="#comp.datetime">Comparison operators on duration,
+date and time values</a>
+ <br/>
+ 9.4.1 <a href="#func-dateTime-equal">op:dateTime-equal</a>
+ <br/>
+ 9.4.2 <a href="#func-dateTime-less-than">op:dateTime-less-than</a>
+ <br/>
+ 9.4.3 <a href="#func-dateTime-greater-than">op:dateTime-greater-than</a>
+ <br/>
+ 9.4.4 <a href="#func-date-equal">op:date-equal</a>
+ <br/>
+ 9.4.5 <a href="#func-date-less-than">op:date-less-than</a>
+ <br/>
+ 9.4.6 <a href="#func-date-greater-than">op:date-greater-than</a>
+ <br/>
+ 9.4.7 <a href="#func-time-equal">op:time-equal</a>
+ <br/>
+ 9.4.8 <a href="#func-time-less-than">op:time-less-than</a>
+ <br/>
+ 9.4.9 <a href="#func-time-greater-than">op:time-greater-than</a>
+ <br/>
+ 9.4.10 <a href="#func-gYearMonth-equal">op:gYearMonth-equal</a>
+ <br/>
+ 9.4.11 <a href="#func-gYear-equal">op:gYear-equal</a>
+ <br/>
+ 9.4.12 <a href="#func-gMonthDay-equal">op:gMonthDay-equal</a>
+ <br/>
+ 9.4.13 <a href="#func-gMonth-equal">op:gMonth-equal</a>
+ <br/>
+ 9.4.14 <a href="#func-gDay-equal">op:gDay-equal</a>
+ <br/>
+ 9.5 <a href="#component-extraction-dateTime">Component
+extraction functions on dates and times</a>
+ <br/>
+ 9.5.1 <a href="#func-year-from-dateTime">fn:year-from-dateTime</a>
+ <br/>
+ 9.5.2 <a href="#func-month-from-dateTime">fn:month-from-dateTime</a>
+ <br/>
+ 9.5.3 <a href="#func-day-from-dateTime">fn:day-from-dateTime</a>
+ <br/>
+ 9.5.4 <a href="#func-hours-from-dateTime">fn:hours-from-dateTime</a>
+ <br/>
+ 9.5.5 <a href="#func-minutes-from-dateTime">fn:minutes-from-dateTime</a>
+ <br/>
+ 9.5.6 <a href="#func-seconds-from-dateTime">fn:seconds-from-dateTime</a>
+ <br/>
+ 9.5.7 <a href="#func-timezone-from-dateTime">fn:timezone-from-dateTime</a>
+ <br/>
+ 9.5.8 <a href="#func-year-from-date">fn:year-from-date</a>
+ <br/>
+ 9.5.9 <a href="#func-month-from-date">fn:month-from-date</a>
+ <br/>
+ 9.5.10 <a href="#func-day-from-date">fn:day-from-date</a>
+ <br/>
+ 9.5.11 <a href="#func-timezone-from-date">fn:timezone-from-date</a>
+ <br/>
+ 9.5.12 <a href="#func-hours-from-time">fn:hours-from-time</a>
+ <br/>
+ 9.5.13 <a href="#func-minutes-from-time">fn:minutes-from-time</a>
+ <br/>
+ 9.5.14 <a href="#func-seconds-from-time">fn:seconds-from-time</a>
+ <br/>
+ 9.5.15 <a href="#func-timezone-from-time">fn:timezone-from-time</a>
+ <br/>
+ 9.6 <a href="#timezone.functions">Timezone adjustment functions
+on dates and time values</a>
+ <br/>
+ 9.6.1 <a href="#func-adjust-dateTime-to-timezone">fn:adjust-dateTime-to-timezone</a>
+ <br/>
+
+ 9.6.2 <a href="#func-adjust-date-to-timezone">fn:adjust-date-to-timezone</a>
+ <br/>
+
+ 9.6.3 <a href="#func-adjust-time-to-timezone">fn:adjust-time-to-timezone</a>
+ <br/>
+
+ 9.7 <a href="#dateTime-arithmetic">Arithmetic operators on
+durations, dates and times</a>
+ <br/>
+ 9.7.1 <a href="#duration-limits">Limits and
+precision</a>
+ <br/>
+ 9.7.2 <a href="#func-subtract-dateTimes">op:subtract-dateTimes</a>
+ <br/>
+ 9.7.3 <a href="#func-subtract-dates">op:subtract-dates</a>
+ <br/>
+ 9.7.4 <a href="#func-subtract-times">op:subtract-times</a>
+ <br/>
+ 9.7.5 <a href="#func-add-yearMonthDuration-to-dateTime">op:add-yearMonthDuration-to-dateTime</a>
+ <br/>
+
+ 9.7.6 <a href="#func-add-dayTimeDuration-to-dateTime">op:add-dayTimeDuration-to-dateTime</a>
+ <br/>
+
+ 9.7.7 <a href="#func-subtract-yearMonthDuration-from-dateTime">op:subtract-yearMonthDuration-from-dateTime</a>
+ <br/>
+
+ 9.7.8 <a href="#func-subtract-dayTimeDuration-from-dateTime">op:subtract-dayTimeDuration-from-dateTime</a>
+ <br/>
+
+ 9.7.9 <a href="#func-add-yearMonthDuration-to-date">op:add-yearMonthDuration-to-date</a>
+ <br/>
+
+ 9.7.10 <a href="#func-add-dayTimeDuration-to-date">op:add-dayTimeDuration-to-date</a>
+ <br/>
+
+ 9.7.11 <a href="#func-subtract-yearMonthDuration-from-date">op:subtract-yearMonthDuration-from-date</a>
+ <br/>
+
+ 9.7.12 <a href="#func-subtract-dayTimeDuration-from-date">op:subtract-dayTimeDuration-from-date</a>
+ <br/>
+
+ 9.7.13 <a href="#func-add-dayTimeDuration-to-time">op:add-dayTimeDuration-to-time</a>
+ <br/>
+
+ 9.7.14 <a href="#func-subtract-dayTimeDuration-from-time">op:subtract-dayTimeDuration-from-time</a>
+ <br/>
+
+ 9.8 <a href="#formatting-dates-and-times">Formatting dates and
+times</a>
+ <br/>
+ 9.8.1 <a href="#func-format-dateTime">fn:format-dateTime</a>
+ <br/>
+ 9.8.2 <a href="#func-format-date">fn:format-date</a>
+ <br/>
+ 9.8.3 <a href="#func-format-time">fn:format-time</a>
+ <br/>
+ 9.8.4 <a href="#rules-for-datetime-formatting">The
+date/time formatting functions</a>
+ <br/>
+ 9.8.5 <a href="#date-time-examples">Examples of date and
+time formatting</a>
+ <br/>
+10 <a href="#QName-funcs">Functions related to QNames</a>
+ <br/>
+ 10.1 <a href="#QName-constructors">Functions to create a
+QName</a>
+ <br/>
+ 10.1.1 <a href="#func-resolve-QName">fn:resolve-QName</a>
+ <br/>
+ 10.1.2 <a href="#func-QName">fn:QName</a>
+ <br/>
+ 10.2 <a href="#QName-functions">Functions and operators related
+to QNames</a>
+ <br/>
+ 10.2.1 <a href="#func-QName-equal">op:QName-equal</a>
+ <br/>
+ 10.2.2 <a href="#func-prefix-from-QName">fn:prefix-from-QName</a>
+ <br/>
+ 10.2.3 <a href="#func-local-name-from-QName">fn:local-name-from-QName</a>
+ <br/>
+ 10.2.4 <a href="#func-namespace-uri-from-QName">fn:namespace-uri-from-QName</a>
+ <br/>
+
+ 10.2.5 <a href="#func-namespace-uri-for-prefix">fn:namespace-uri-for-prefix</a>
+ <br/>
+
+ 10.2.6 <a href="#func-in-scope-prefixes">fn:in-scope-prefixes</a>
+ <br/>
11 <a href="#binary-functions">Operators on base64Binary and
-hexBinary</a><br />
-&#160;&#160;&#160;&#160;11.1 <a href=
-"#binary-value-comparisons">Comparisons of base64Binary and
-hexBinary values</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;11.1.1 <a href=
-"#func-hexBinary-equal">op:hexBinary-equal</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;11.1.2 <a href=
-"#func-base64Binary-equal">op:base64Binary-equal</a><br />
-12 <a href="#NOTATION-functions">Operators on NOTATION</a><br />
-&#160;&#160;&#160;&#160;12.1 <a href=
-"#func-NOTATION-equal">op:NOTATION-equal</a><br />
+hexBinary</a>
+ <br/>
+ 11.1 <a href="#binary-value-comparisons">Comparisons of
+base64Binary and hexBinary values</a>
+ <br/>
+ 11.1.1 <a href="#func-hexBinary-equal">op:hexBinary-equal</a>
+ <br/>
+ 11.1.2 <a href="#func-base64Binary-equal">op:base64Binary-equal</a>
+ <br/>
+12 <a href="#NOTATION-functions">Operators on NOTATION</a>
+ <br/>
+ 12.1 <a href="#func-NOTATION-equal">op:NOTATION-equal</a>
+ <br/>
13 <a href="#node-functions">Functions and operators on
-nodes</a><br />
-&#160;&#160;&#160;&#160;13.1 <a href="#func-name">fn:name</a><br />
-&#160;&#160;&#160;&#160;13.2 <a href=
-"#func-local-name">fn:local-name</a><br />
-&#160;&#160;&#160;&#160;13.3 <a href=
-"#func-namespace-uri">fn:namespace-uri</a><br />
-&#160;&#160;&#160;&#160;13.4 <a href="#func-lang">fn:lang</a><br />
-&#160;&#160;&#160;&#160;13.5 <a href=
-"#func-is-same-node">op:is-same-node</a><br />
-&#160;&#160;&#160;&#160;13.6 <a href=
-"#func-node-before">op:node-before</a><br />
-&#160;&#160;&#160;&#160;13.7 <a href=
-"#func-node-after">op:node-after</a><br />
-&#160;&#160;&#160;&#160;13.8 <a href="#func-root">fn:root</a><br />
-&#160;&#160;&#160;&#160;13.9 <a href="#func-path">fn:path</a><br />
-&#160;&#160;&#160;&#160;13.10 <a href=
-"#func-has-children">fn:has-children</a><br />
-&#160;&#160;&#160;&#160;13.11 <a href=
-"#func-innermost">fn:innermost</a><br />
-&#160;&#160;&#160;&#160;13.12 <a href=
-"#func-outermost">fn:outermost</a><br />
+nodes</a>
+ <br/>
+ 13.1 <a href="#func-name">fn:name</a>
+ <br/>
+ 13.2 <a href="#func-local-name">fn:local-name</a>
+ <br/>
+ 13.3 <a href="#func-namespace-uri">fn:namespace-uri</a>
+ <br/>
+ 13.4 <a href="#func-lang">fn:lang</a>
+ <br/>
+ 13.5 <a href="#func-is-same-node">op:is-same-node</a>
+ <br/>
+ 13.6 <a href="#func-node-before">op:node-before</a>
+ <br/>
+ 13.7 <a href="#func-node-after">op:node-after</a>
+ <br/>
+ 13.8 <a href="#func-root">fn:root</a>
+ <br/>
+ 13.9 <a href="#func-path">fn:path</a>
+ <br/>
+ 13.10 <a href="#func-has-children">fn:has-children</a>
+ <br/>
+ 13.11 <a href="#func-innermost">fn:innermost</a>
+ <br/>
+ 13.12 <a href="#func-outermost">fn:outermost</a>
+ <br/>
14 <a href="#sequence-functions">Functions and operators on
-sequences</a><br />
-&#160;&#160;&#160;&#160;14.1 <a href="#general-seq-funcs">General
-functions and operators on sequences</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.1.1 <a href=
-"#func-concatenate">op:concatenate</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.1.2 <a href=
-"#func-empty">fn:empty</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.1.3 <a href=
-"#func-exists">fn:exists</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.1.4 <a href=
-"#func-head">fn:head</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.1.5 <a href=
-"#func-tail">fn:tail</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.1.6 <a href=
-"#func-insert-before">fn:insert-before</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.1.7 <a href=
-"#func-remove">fn:remove</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.1.8 <a href=
-"#func-reverse">fn:reverse</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.1.9 <a href=
-"#func-subsequence">fn:subsequence</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.1.10 <a href=
-"#func-unordered">fn:unordered</a><br />
-&#160;&#160;&#160;&#160;14.2 <a href=
-"#comparing-sequences">Functions that compare values in
-sequences</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.2.1 <a href=
-"#func-distinct-values">fn:distinct-values</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.2.2 <a href=
-"#func-index-of">fn:index-of</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.2.3 <a href=
-"#func-deep-equal">fn:deep-equal</a><br />
-&#160;&#160;&#160;&#160;14.3 <a href=
-"#cardinality-functions">Functions that test the cardinality of
-sequences</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.3.1 <a href=
-"#func-zero-or-one">fn:zero-or-one</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.3.2 <a href=
-"#func-one-or-more">fn:one-or-more</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.3.3 <a href=
-"#func-exactly-one">fn:exactly-one</a><br />
-&#160;&#160;&#160;&#160;14.4 <a href=
-"#union-intersection-except">Union, intersection and
-difference</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.4.1 <a href=
-"#func-union">op:union</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.4.2 <a href=
-"#func-intersect">op:intersect</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.4.3 <a href=
-"#func-except">op:except</a><br />
-&#160;&#160;&#160;&#160;14.5 <a href=
-"#aggregate-functions">Aggregate functions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.5.1 <a href=
-"#func-count">fn:count</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.5.2 <a href=
-"#func-avg">fn:avg</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.5.3 <a href=
-"#func-max">fn:max</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.5.4 <a href=
-"#func-min">fn:min</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.5.5 <a href=
-"#func-sum">fn:sum</a><br />
-&#160;&#160;&#160;&#160;14.6 <a href=
-"#fns-that-generate-sequences">Functions and operators that
-generate sequences</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.6.1 <a href=
-"#func-to">op:to</a><br />
-&#160;&#160;&#160;&#160;14.7 <a href=
-"#fns-on-identifiers">Functions on node identifiers</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.7.1 <a href=
-"#func-id">fn:id</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.7.2 <a href=
-"#func-element-with-id">fn:element-with-id</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.7.3 <a href=
-"#func-idref">fn:idref</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.7.4 <a href=
-"#func-generate-id">fn:generate-id</a><br />
-&#160;&#160;&#160;&#160;14.8 <a href="#fns-on-docs">Functions
-giving access to external information</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.8.1 <a href=
-"#func-doc">fn:doc</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.8.2 <a href=
-"#func-doc-available">fn:doc-available</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.8.3 <a href=
-"#func-collection">fn:collection</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.8.4 <a href=
-"#func-uri-collection">fn:uri-collection</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.8.5 <a href=
-"#func-unparsed-text">fn:unparsed-text</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.8.6 <a href=
-"#func-unparsed-text-lines">fn:unparsed-text-lines</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.8.7 <a href=
-"#func-unparsed-text-available">fn:unparsed-text-available</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.8.8 <a href=
-"#func-environment-variable">fn:environment-variable</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.8.9 <a href=
-"#func-available-environment-variables">fn:available-environment-variables</a><br />
-
-&#160;&#160;&#160;&#160;14.9 <a href=
-"#parsing-and-serializing">Parsing and serializing</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.9.1 <a href=
-"#func-parse-xml">fn:parse-xml</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.9.2 <a href=
-"#func-parse-xml-fragment">fn:parse-xml-fragment</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.9.3 <a href=
-"#func-serialize">fn:serialize</a><br />
-15 <a href="#context">Context functions</a><br />
-&#160;&#160;&#160;&#160;15.1 <a href=
-"#func-position">fn:position</a><br />
-&#160;&#160;&#160;&#160;15.2 <a href="#func-last">fn:last</a><br />
-&#160;&#160;&#160;&#160;15.3 <a href=
-"#func-current-dateTime">fn:current-dateTime</a><br />
-&#160;&#160;&#160;&#160;15.4 <a href=
-"#func-current-date">fn:current-date</a><br />
-&#160;&#160;&#160;&#160;15.5 <a href=
-"#func-current-time">fn:current-time</a><br />
-&#160;&#160;&#160;&#160;15.6 <a href=
-"#func-implicit-timezone">fn:implicit-timezone</a><br />
-&#160;&#160;&#160;&#160;15.7 <a href=
-"#func-default-collation">fn:default-collation</a><br />
-&#160;&#160;&#160;&#160;15.8 <a href=
-"#func-static-base-uri">fn:static-base-uri</a><br />
+sequences</a>
+ <br/>
+ 14.1 <a href="#general-seq-funcs">General functions and
+operators on sequences</a>
+ <br/>
+ 14.1.1 <a href="#func-concatenate">op:concatenate</a>
+ <br/>
+ 14.1.2 <a href="#func-empty">fn:empty</a>
+ <br/>
+ 14.1.3 <a href="#func-exists">fn:exists</a>
+ <br/>
+ 14.1.4 <a href="#func-head">fn:head</a>
+ <br/>
+ 14.1.5 <a href="#func-tail">fn:tail</a>
+ <br/>
+ 14.1.6 <a href="#func-insert-before">fn:insert-before</a>
+ <br/>
+ 14.1.7 <a href="#func-remove">fn:remove</a>
+ <br/>
+ 14.1.8 <a href="#func-reverse">fn:reverse</a>
+ <br/>
+ 14.1.9 <a href="#func-subsequence">fn:subsequence</a>
+ <br/>
+ 14.1.10 <a href="#func-unordered">fn:unordered</a>
+ <br/>
+ 14.2 <a href="#comparing-sequences">Functions that compare
+values in sequences</a>
+ <br/>
+ 14.2.1 <a href="#func-distinct-values">fn:distinct-values</a>
+ <br/>
+ 14.2.2 <a href="#func-index-of">fn:index-of</a>
+ <br/>
+ 14.2.3 <a href="#func-deep-equal">fn:deep-equal</a>
+ <br/>
+ 14.3 <a href="#cardinality-functions">Functions that test the
+cardinality of sequences</a>
+ <br/>
+ 14.3.1 <a href="#func-zero-or-one">fn:zero-or-one</a>
+ <br/>
+ 14.3.2 <a href="#func-one-or-more">fn:one-or-more</a>
+ <br/>
+ 14.3.3 <a href="#func-exactly-one">fn:exactly-one</a>
+ <br/>
+ 14.4 <a href="#union-intersection-except">Union, intersection
+and difference</a>
+ <br/>
+ 14.4.1 <a href="#func-union">op:union</a>
+ <br/>
+ 14.4.2 <a href="#func-intersect">op:intersect</a>
+ <br/>
+ 14.4.3 <a href="#func-except">op:except</a>
+ <br/>
+ 14.5 <a href="#aggregate-functions">Aggregate
+functions</a>
+ <br/>
+ 14.5.1 <a href="#func-count">fn:count</a>
+ <br/>
+ 14.5.2 <a href="#func-avg">fn:avg</a>
+ <br/>
+ 14.5.3 <a href="#func-max">fn:max</a>
+ <br/>
+ 14.5.4 <a href="#func-min">fn:min</a>
+ <br/>
+ 14.5.5 <a href="#func-sum">fn:sum</a>
+ <br/>
+ 14.6 <a href="#fns-that-generate-sequences">Functions and
+operators that generate sequences</a>
+ <br/>
+ 14.6.1 <a href="#func-to">op:to</a>
+ <br/>
+ 14.7 <a href="#fns-on-identifiers">Functions on node
+identifiers</a>
+ <br/>
+ 14.7.1 <a href="#func-id">fn:id</a>
+ <br/>
+ 14.7.2 <a href="#func-element-with-id">fn:element-with-id</a>
+ <br/>
+ 14.7.3 <a href="#func-idref">fn:idref</a>
+ <br/>
+ 14.7.4 <a href="#func-generate-id">fn:generate-id</a>
+ <br/>
+ 14.8 <a href="#fns-on-docs">Functions giving access to external
+information</a>
+ <br/>
+ 14.8.1 <a href="#func-doc">fn:doc</a>
+ <br/>
+ 14.8.2 <a href="#func-doc-available">fn:doc-available</a>
+ <br/>
+ 14.8.3 <a href="#func-collection">fn:collection</a>
+ <br/>
+ 14.8.4 <a href="#func-uri-collection">fn:uri-collection</a>
+ <br/>
+ 14.8.5 <a href="#func-unparsed-text">fn:unparsed-text</a>
+ <br/>
+ 14.8.6 <a href="#func-unparsed-text-lines">fn:unparsed-text-lines</a>
+ <br/>
+ 14.8.7 <a href="#func-unparsed-text-available">fn:unparsed-text-available</a>
+ <br/>
+
+ 14.8.8 <a href="#func-environment-variable">fn:environment-variable</a>
+ <br/>
+ 14.8.9 <a href="#func-available-environment-variables">fn:available-environment-variables</a>
+ <br/>
+
+ 14.9 <a href="#parsing-and-serializing">Parsing and
+serializing</a>
+ <br/>
+ 14.9.1 <a href="#func-parse-xml">fn:parse-xml</a>
+ <br/>
+ 14.9.2 <a href="#func-parse-xml-fragment">fn:parse-xml-fragment</a>
+ <br/>
+ 14.9.3 <a href="#func-serialize">fn:serialize</a>
+ <br/>
+15 <a href="#context">Context functions</a>
+ <br/>
+ 15.1 <a href="#func-position">fn:position</a>
+ <br/>
+ 15.2 <a href="#func-last">fn:last</a>
+ <br/>
+ 15.3 <a href="#func-current-dateTime">fn:current-dateTime</a>
+ <br/>
+ 15.4 <a href="#func-current-date">fn:current-date</a>
+ <br/>
+ 15.5 <a href="#func-current-time">fn:current-time</a>
+ <br/>
+ 15.6 <a href="#func-implicit-timezone">fn:implicit-timezone</a>
+ <br/>
+ 15.7 <a href="#func-default-collation">fn:default-collation</a>
+ <br/>
+ 15.8 <a href="#func-static-base-uri">fn:static-base-uri</a>
+ <br/>
16 <a href="#higher-order-functions">Higher-order
-functions</a><br />
-&#160;&#160;&#160;&#160;16.1 <a href=
-"#functions-on-functions">Functions on functions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;16.1.1 <a href=
-"#func-function-lookup">fn:function-lookup</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;16.1.2 <a href=
-"#func-function-name">fn:function-name</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;16.1.3 <a href=
-"#func-function-arity">fn:function-arity</a><br />
-&#160;&#160;&#160;&#160;16.2 <a href="#basic-hofs">Basic
-higher-order functions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;16.2.1 <a href=
-"#func-map">fn:map</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;16.2.2 <a href=
-"#func-filter">fn:filter</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;16.2.3 <a href=
-"#func-fold-left">fn:fold-left</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;16.2.4 <a href=
-"#func-fold-right">fn:fold-right</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;16.2.5 <a href=
-"#func-map-pairs">fn:map-pairs</a><br />
-17 <a href="#constructor-functions">Constructor functions</a><br />
-&#160;&#160;&#160;&#160;17.1 <a href=
-"#constructor-functions-for-xsd-types">Constructor functions for
-XML Schema built-in types</a><br />
-&#160;&#160;&#160;&#160;17.2 <a href=
-"#constructor-qname-notation">Constructor functions for xs:QName
-and xs:NOTATION</a><br />
-&#160;&#160;&#160;&#160;17.3 <a href=
-"#constructor-functions-for-user-defined-types">Constructor
-functions for user-defined types</a><br />
-18 <a href="#casting">Casting</a><br />
-&#160;&#160;&#160;&#160;18.1 <a href=
-"#casting-from-primitive-to-primitive">Casting from primitive types
-to primitive types</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.1.1 <a href=
-"#casting-to-string">Casting to xs:string and
-xs:untypedAtomic</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.1.2 <a href=
-"#casting-to-numerics">Casting to numeric types</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.1.3 <a href=
-"#casting-to-durations">Casting to duration types</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.1.4 <a href=
-"#casting-to-datetimes">Casting to date and time types</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.1.5 <a href=
-"#casting-boolean">Casting to xs:boolean</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.1.6 <a href=
-"#casting-to-binary">Casting to xs:base64Binary and
-xs:hexBinary</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.1.7 <a href=
-"#casting-to-anyuri">Casting to xs:anyURI</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.1.8 <a href=
-"#casting-to-qname-and-notation">Casting to xs:QName and
-xs:NOTATION</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.1.9 <a href=
-"#casting-to-ENTITY">Casting to xs:ENTITY</a><br />
-&#160;&#160;&#160;&#160;18.2 <a href=
-"#casting-from-strings">Casting from xs:string and
-xs:untypedAtomic</a><br />
-&#160;&#160;&#160;&#160;18.3 <a href=
-"#casting-non-primitive-types">Casting involving non-primitive
-types</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.3.1 <a href=
-"#casting-to-derived-types">Casting to derived types</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.3.2 <a href=
-"#casting-from-derived-to-parent">Casting from derived types to
-parent types</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.3.3 <a href=
-"#casting-within-branch">Casting within a branch of the type
-hierarchy</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.3.4 <a href=
-"#casting-across-hierarchy">Casting across the type
-hierarchy</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.3.5 <a href=
-"#casting-to-union">Casting to union types</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.3.6 <a href=
-"#casting-to-list">Casting to list types</a><br /></p>
-<h3><a name="appendices" id="appendices"></a>Appendices</h3>
-<p class="toc">A <a href="#biblio">References</a><br />
-&#160;&#160;&#160;&#160;A.1 <a href="#normative-biblio">Normative
-references</a><br />
-&#160;&#160;&#160;&#160;A.2 <a href=
-"#non-normative-biblio">Non-normative references</a><br />
-B <a href="#error-summary">Error summary</a><br />
+functions</a>
+ <br/>
+ 16.1 <a href="#functions-on-functions">Functions on
+functions</a>
+ <br/>
+ 16.1.1 <a href="#func-function-lookup">fn:function-lookup</a>
+ <br/>
+ 16.1.2 <a href="#func-function-name">fn:function-name</a>
+ <br/>
+ 16.1.3 <a href="#func-function-arity">fn:function-arity</a>
+ <br/>
+ 16.2 <a href="#basic-hofs">Basic higher-order
+functions</a>
+ <br/>
+ 16.2.1 <a href="#func-map">fn:map</a>
+ <br/>
+ 16.2.2 <a href="#func-filter">fn:filter</a>
+ <br/>
+ 16.2.3 <a href="#func-fold-left">fn:fold-left</a>
+ <br/>
+ 16.2.4 <a href="#func-fold-right">fn:fold-right</a>
+ <br/>
+ 16.2.5 <a href="#func-map-pairs">fn:map-pairs</a>
+ <br/>
+17 <a href="#constructor-functions">Constructor functions</a>
+ <br/>
+ 17.1 <a href="#constructor-functions-for-xsd-types">Constructor
+functions for XML Schema built-in types</a>
+ <br/>
+ 17.2 <a href="#constructor-qname-notation">Constructor
+functions for xs:QName and xs:NOTATION</a>
+ <br/>
+ 17.3 <a href="#constructor-functions-for-user-defined-types">Constructor
+functions for user-defined types</a>
+ <br/>
+18 <a href="#casting">Casting</a>
+ <br/>
+ 18.1 <a href="#casting-from-primitive-to-primitive">Casting
+from primitive types to primitive types</a>
+ <br/>
+ 18.1.1 <a href="#casting-to-string">Casting to xs:string
+and xs:untypedAtomic</a>
+ <br/>
+ 18.1.2 <a href="#casting-to-numerics">Casting to numeric
+types</a>
+ <br/>
+ 18.1.3 <a href="#casting-to-durations">Casting to duration
+types</a>
+ <br/>
+ 18.1.4 <a href="#casting-to-datetimes">Casting to date and
+time types</a>
+ <br/>
+ 18.1.5 <a href="#casting-boolean">Casting to
+xs:boolean</a>
+ <br/>
+ 18.1.6 <a href="#casting-to-binary">Casting to
+xs:base64Binary and xs:hexBinary</a>
+ <br/>
+ 18.1.7 <a href="#casting-to-anyuri">Casting to
+xs:anyURI</a>
+ <br/>
+ 18.1.8 <a href="#casting-to-qname-and-notation">Casting to
+xs:QName and xs:NOTATION</a>
+ <br/>
+ 18.1.9 <a href="#casting-to-ENTITY">Casting to
+xs:ENTITY</a>
+ <br/>
+ 18.2 <a href="#casting-from-strings">Casting from xs:string and
+xs:untypedAtomic</a>
+ <br/>
+ 18.3 <a href="#casting-non-primitive-types">Casting involving
+non-primitive types</a>
+ <br/>
+ 18.3.1 <a href="#casting-to-derived-types">Casting to
+derived types</a>
+ <br/>
+ 18.3.2 <a href="#casting-from-derived-to-parent">Casting
+from derived types to parent types</a>
+ <br/>
+ 18.3.3 <a href="#casting-within-branch">Casting within a
+branch of the type hierarchy</a>
+ <br/>
+ 18.3.4 <a href="#casting-across-hierarchy">Casting across
+the type hierarchy</a>
+ <br/>
+ 18.3.5 <a href="#casting-to-union">Casting to union
+types</a>
+ <br/>
+ 18.3.6 <a href="#casting-to-list">Casting to list
+types</a>
+ <br/>
+ </p>
+ <h3>
+ <a name="appendices" id="appendices"/>Appendices</h3>
+ <p class="toc">A <a href="#biblio">References</a>
+ <br/>
+ A.1 <a href="#normative-biblio">Normative references</a>
+ <br/>
+ A.2 <a href="#non-normative-biblio">Non-normative
+references</a>
+ <br/>
+B <a href="#error-summary">Error summary</a>
+ <br/>
C <a href="#xpath1-compatibility">Compatibility with XPath 1.0</a>
-(Non-Normative)<br />
+(Non-Normative)<br/>
D <a href="#examples">Illustrative user-written functions</a>
-(Non-Normative)<br />
-&#160;&#160;&#160;&#160;D.1 <a href=
-"#if-empty-if-absent">eg:if-empty and eg:if-absent</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;D.1.1 <a href=
-"#if-empty">eg:if-empty</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;D.1.2 <a href=
-"#if-absent">eg:if-absent</a><br />
-&#160;&#160;&#160;&#160;D.2 <a href=
-"#union-intersect-except-on-values">Union, intersection and
-difference on sequences of values</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;D.2.1 <a href=
-"#value-union">eg:value-union</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;D.2.2 <a href=
-"#value-intersect">eg:value-intersect</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;D.2.3 <a href=
-"#value-except">eg:value-except</a><br />
-&#160;&#160;&#160;&#160;D.3 <a href=
-"#index-of-node">eg:index-of-node</a><br />
-&#160;&#160;&#160;&#160;D.4 <a href=
-"#string-pad">eg:string-pad</a><br />
-&#160;&#160;&#160;&#160;D.5 <a href=
-"#func-distinct-nodes-stable">eg:distinct-nodes-stable</a><br />
-&#160;&#160;&#160;&#160;D.6 <a href="#highest-lowest">Finding
-minima and maxima</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;D.6.1 <a href=
-"#highest">eg:highest</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;D.6.2 <a href=
-"#lowest">eg:lowest</a><br />
-&#160;&#160;&#160;&#160;D.7 <a href="#sorting">Sorting</a><br />
+(Non-Normative)<br/>
+ D.1 <a href="#if-empty-if-absent">eg:if-empty and
+eg:if-absent</a>
+ <br/>
+ D.1.1 <a href="#if-empty">eg:if-empty</a>
+ <br/>
+ D.1.2 <a href="#if-absent">eg:if-absent</a>
+ <br/>
+ D.2 <a href="#union-intersect-except-on-values">Union,
+intersection and difference on sequences of values</a>
+ <br/>
+ D.2.1 <a href="#value-union">eg:value-union</a>
+ <br/>
+ D.2.2 <a href="#value-intersect">eg:value-intersect</a>
+ <br/>
+ D.2.3 <a href="#value-except">eg:value-except</a>
+ <br/>
+ D.3 <a href="#index-of-node">eg:index-of-node</a>
+ <br/>
+ D.4 <a href="#string-pad">eg:string-pad</a>
+ <br/>
+ D.5 <a href="#func-distinct-nodes-stable">eg:distinct-nodes-stable</a>
+ <br/>
+ D.6 <a href="#highest-lowest">Finding minima and
+maxima</a>
+ <br/>
+ D.6.1 <a href="#highest">eg:highest</a>
+ <br/>
+ D.6.2 <a href="#lowest">eg:lowest</a>
+ <br/>
+ D.7 <a href="#sorting">Sorting</a>
+ <br/>
E <a href="#impl-def">Checklist of implementation-defined
-features</a> (Non-Normative)<br />
+features</a> (Non-Normative)<br/>
F <a href="#changelog">Changes since previous Recommendation</a>
-(Non-Normative)<br />
-&#160;&#160;&#160;&#160;F.1 <a href=
-"#substantive-changes-2009-12-15">Substantive changes (15 December
-2009)</a><br />
-&#160;&#160;&#160;&#160;F.2 <a href=
-"#substantive-changes-current-draft">Substantive changes (current
-draft)</a><br />
-&#160;&#160;&#160;&#160;F.3 <a href=
-"#incompatibilities">Incompatibilities</a><br />
-&#160;&#160;&#160;&#160;F.4 <a href="#editorial-changes">Editorial
-changes</a><br />
+(Non-Normative)<br/>
+ F.1 <a href="#substantive-changes-2009-12-15">Substantive
+changes (15 December 2009)</a>
+ <br/>
+ F.2 <a href="#substantive-changes-current-draft">Substantive
+changes (current draft)</a>
+ <br/>
+ F.3 <a href="#incompatibilities">Incompatibilities</a>
+ <br/>
+ F.4 <a href="#editorial-changes">Editorial changes</a>
+ <br/>
G <a href="#quickref">Function and Operator Quick Reference</a>
-(Non-Normative)<br />
-&#160;&#160;&#160;&#160;G.1 <a href="#quickref-section">Functions
-and Operators by Section</a><br />
-&#160;&#160;&#160;&#160;G.2 <a href="#quickref-alpha">Functions and
-Operators Alphabetically</a><br /></p>
-</div>
-<hr />
-<div class="body">
-<div class="div1">
-<h2><a name="intro" id="intro"></a>1 Introduction</h2>
-<p>The purpose of this document is to catalog the functions and
+(Non-Normative)<br/>
+ G.1 <a href="#quickref-section">Functions and Operators by
+Section</a>
+ <br/>
+ G.2 <a href="#quickref-alpha">Functions and Operators
+Alphabetically</a>
+ <br/>
+ </p>
+ </div>
+ <hr/>
+ <div class="body">
+ <div class="div1">
+ <h2>
+ <a name="intro" id="intro"/>1 Introduction</h2>
+ <p>The purpose of this document is to catalog the functions and
operators required for XPath 3.0, XQuery 3.0 and XSLT 3.0. The
exact syntax used to call these functions and operators is
specified 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>.</p>
-<p>This document defines constructor functions and functions that
+ <p>This document defines constructor functions and functions that
take typed values as arguments. Some of the functions specify the
semantics of operators defined in <a href="#xpath-30">[XML Path
Language (XPath) 3.0]</a> and <a href="#xquery-30">[XQuery 3.0: An
XML Query Language]</a>.</p>
-<p><a href="#xmlschema-2">[XML Schema Part 2: Datatypes Second
+ <p>
+ <a href="#xmlschema-2">[XML Schema Part 2: Datatypes Second
Edition]</a> defines a number of primitive and derived datatypes,
collectively known as built-in datatypes. This document defines
functions and operations on these datatypes as well as the
-datatypes defined in <a href=
-"http://www.w3.org/TR/xpath-datamodel-30/#types">Section 2.7 Schema
-Information</a> <sup><small>DM30</small></sup> of the <a href=
-"#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>.
-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
+datatypes defined in <a href="http://www.w3.org/TR/xpath-datamodel-30/#types">Section 2.7 Schema
+Information</a>
+ <sup>
+ <small>DM30</small>
+ </sup> of the <a href="#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>.
+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
XML standards. This document also defines functions and operators
-on nodes and node sequences as defined in the <a href=
-"#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>
+on nodes and node sequences as defined in the <a href="#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>
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 related XML standards.</p>
-<p><a href="#xmlschema11-2">[XML Schema 1.1 Part 2: Datatypes]</a>
+ <p>
+ <a href="#xmlschema11-2">[XML Schema 1.1 Part 2: Datatypes]</a>
adds to the data types defined in <a href="#xmlschema-2">[XML
Schema Part 2: Datatypes Second Edition]</a>. It introduces a new
derived type <code>xs:dateTimeStamp</code>, and it incorporates as
@@ -1466,51 +1378,50 @@
to appear as the value of an <code>xs:anyURI</code> item.
Implementations of this specification <strong>may</strong> support
either XSD 1.0 or XSD 1.1 or both.</p>
-<p>References to specific sections of some of the above documents
+ <p>References to specific sections of some of the above documents
are indicated by cross-document links in this document. Each such
link consists of a pointer to a specific section followed a
superscript specifying the linked document. The superscripts have
the following meanings: 'XQ' <a href="#xquery-30">[XQuery 3.0: An
XML Query Language]</a>, 'XT' <a href="#xslt-30">[XSL
-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)
+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)
3.0]</a>.</p>
-<div class="div2">
-<h3><a name="conformance" id="conformance"></a>1.1 Conformance</h3>
-<p>The Functions and Operators specification is intended primarily
+ <div class="div2">
+ <h3>
+ <a name="conformance" id="conformance"/>1.1 Conformance</h3>
+ <p>The Functions and Operators specification is intended primarily
as a component that can be used by other specifications. Therefore,
Functions and Operators relies on specifications that use it (such
as <a href="#xpath-30">[XML Path Language (XPath) 3.0]</a>,
<a href="#xslt-30">[XSL Transformations (XSLT) Version 3.0]</a> and
<a href="#xquery-30">[XQuery 3.0: An XML Query Language]</a>) to
specify conformance criteria for their respective environments.</p>
-<p>Authors of conformance criteria for the use of the Functions and
+ <p>Authors of conformance criteria for the use of the Functions and
Operators should pay particular attention to the following
features:</p>
-<ul>
-<li>
-<p>It is <a title="implementation-defined" class="termref" href=
-"#implementation-defined"><span class=
-"arrow">·</span>implementation-defined<span class=
-"arrow">·</span></a> which version of Unicode is supported, but it
+ <ul>
+ <li>
+ <p>It is <a title="implementation-defined" class="termref" href="#implementation-defined">
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ </a> which version of Unicode is supported, but it
is recommended that the most recent version of Unicode be used.</p>
-</li>
-<li>
-<p>It is <a title="implementation-defined" class="termref" href=
-"#implementation-defined"><span class=
-"arrow">·</span>implementation-defined<span class=
-"arrow">·</span></a> whether the type system is based on XML Schema
+ </li>
+ <li>
+ <p>It is <a title="implementation-defined" class="termref" href="#implementation-defined">
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ </a> whether the type system is based on XML Schema
1.0 or XML Schema 1.1.</p>
-</li>
-<li>
-<p>Support for XML 1.0 and XML 1.1 by the datatypes used in
+ </li>
+ <li>
+ <p>Support for XML 1.0 and XML 1.1 by the datatypes used in
Functions and Operators.</p>
-</li>
-</ul>
-<div class="note">
-<p class="prefix"><b>Note:</b></p>
-<p>At the time of writing there is a Candidate Recommendation of
+ </li>
+ </ul>
+ <div class="note">
+ <p class="prefix">
+ <b>Note:</b>
+ </p>
+ <p>At the time of writing there is a Candidate Recommendation of
XML Schema 1.1 that introduces some new data types including
<code>xs:dateTimeStamp</code>. Furthermore, XSD 1.1 includes the
option of supporting revised definitions of types such as
@@ -1518,145 +1429,160 @@
1.0. The rules affecting support for XSD 1.0 versus XSD 1.1 and XML
1.0 versus XML 1.1 are likely to be refined in later drafts of this
specification.</p>
-</div>
-<p>In this document, text labeled as an example or as a Note is
+ </div>
+ <p>In this document, text labeled as an example or as a Note is
provided for explanatory purposes and is not normative.</p>
-</div>
-<div class="div2">
-<h3><a name="namespace-prefixes" id="namespace-prefixes"></a>1.2
+ </div>
+ <div class="div2">
+ <h3>
+ <a name="namespace-prefixes" id="namespace-prefixes"/>1.2
Namespaces and prefixes</h3>
-<p>The functions and operators defined in this document are
-contained in one of several namespaces (see <a href=
-"#REC-xml-names">[Namespaces in XML]</a>) and referenced using an
+ <p>The functions and operators defined in this document are
+contained in one of several namespaces (see <a href="#REC-xml-names">[Namespaces in XML]</a>) and referenced using an
<code>xs:QName</code>.</p>
-<p>This document uses conventional prefixes to refer to these
+ <p>This document uses conventional prefixes to refer to these
namespaces. User-written applications can choose a different prefix
to refer to the namespace, so long as it is bound to the correct
URI. The host language may also define a default namespace for
function calls, in which case function names in that namespace need
not be prefixed at all. In many cases the default namespace will be
<code>http://www.w3.org/2005/xpath-functions</code>, allowing a
-call on the <a href="#func-name"><code>fn:name</code></a> function
+call on the <a href="#func-name">
+ <code>fn:name</code>
+ </a> function
(for example) to be written as <code>name()</code> rather than
-<a href="#func-name"><code>fn:name()</code></a>; in this document,
+<a href="#func-name">
+ <code>fn:name()</code>
+ </a>; in this document,
however, all example function calls are explicitly prefixed.</p>
-<p>The URIs of the namespaces and the conventional prefixes
+ <p>The URIs of the namespaces and the conventional prefixes
associated with them are:</p>
-<ul>
-<li>
-<p><code>http://www.w3.org/2001/XMLSchema</code> for constructors
+ <ul>
+ <li>
+ <p>
+ <code>http://www.w3.org/2001/XMLSchema</code> for constructors
-- associated with <code>xs</code>.</p>
-<p>The section <a href="#constructor-functions"><b>17 Constructor
-functions</b></a> defines constructor functions for the built-in
+ <p>The section <a href="#constructor-functions">
+ <b>17 Constructor
+functions</b>
+ </a> defines constructor functions for the built-in
datatypes defined in <a href="#xmlschema-2">[XML Schema Part 2:
-Datatypes Second Edition]</a> and in <a href=
-"http://www.w3.org/TR/xpath-datamodel-30/#types">Section 2.7 Schema
-Information</a> <sup><small>DM30</small></sup> of <a href=
-"#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>.
+Datatypes Second Edition]</a> and in <a href="http://www.w3.org/TR/xpath-datamodel-30/#types">Section 2.7 Schema
+Information</a>
+ <sup>
+ <small>DM30</small>
+ </sup> of <a href="#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>.
These datatypes and the corresponding constructor functions are in
the XML Schema namespace,
<code>http://www.w3.org/2001/XMLSchema</code>, and are named in
this document using the <code>xs</code> prefix.</p>
-</li>
-<li>
-<p><code>http://www.w3.org/2005/xpath-functions</code> for
+ </li>
+ <li>
+ <p>
+ <code>http://www.w3.org/2005/xpath-functions</code> for
functions — associated with <code>fn</code>.</p>
-<p>The namespace prefix used in this document for most functions
+ <p>The namespace prefix used in this document for most functions
that are available to users is <code>fn</code>.</p>
-</li>
-<li>
-<p><code>http://www.w3.org/2005/xpath-functions/math</code> for
+ </li>
+ <li>
+ <p>
+ <code>http://www.w3.org/2005/xpath-functions/math</code> for
functions — associated with <code>math</code>.</p>
-<p>This namespace is used for some mathematical functions. The
+ <p>This namespace is used for some mathematical functions. The
namespace prefix used in this document for these functions is
<code>math</code>. These functions are available to users in
exactly the same way as those in the <code>fn</code> namespace.</p>
-</li>
-<li>
-<p><code>http://www.w3.org/2005/xqt-errors</code> — associated with
+ </li>
+ <li>
+ <p>
+ <code>http://www.w3.org/2005/xqt-errors</code> — associated with
<code>err</code>.</p>
-<p>There are no functions in this namespace; it is used for error
+ <p>There are no functions in this namespace; it is used for error
codes.</p>
-<p>This document uses the prefix <code>err</code> to represent the
+ <p>This document uses the prefix <code>err</code> to represent the
namespace URI <code>http://www.w3.org/2005/xqt-errors</code>, which
is the namespace for all XPath and XQuery error codes and messages.
This namespace prefix is not predeclared and its use in this
document is not normative.</p>
-<div class="note">
-<p class="prefix"><b>Note:</b></p>
-<p>The namespace URI associated with the <code>err</code> prefix is
+ <div class="note">
+ <p class="prefix">
+ <b>Note:</b>
+ </p>
+ <p>The namespace URI associated with the <code>err</code> prefix is
not expected to change from one version of this document to
another. The contents of this namespace may be extended to allow
additional errors to be returned.</p>
-</div>
-</li>
-<li>
-<p>Functions defined with the <code>op</code> prefix are described
-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
+ </div>
+ </li>
+ <li>
+ <p>Functions defined with the <code>op</code> prefix are described
+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
functions are not available directly to users, and there is no
requirement that implementations should actually provide these
functions. For this reason, no namespace is associated with the
<code>op</code> prefix. For example, multiplication is generally
associated with the <code>*</code> operator, but it is described as
a function in this document:</p>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:numeric-multiply</code>(<code class=
-"arg">$arg1</code><code class=
-"as">&#160;as&#160;</code><code class="type">numeric</code>,
-<code class="arg">$arg2</code><code class=
-"as">&#160;as&#160;</code><code class=
-"type">numeric</code>)<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">numeric</code></div>
-</div>
-</li>
-</ul>
-</div>
-<div class="div2">
-<h3><a name="func-overloading" id="func-overloading"></a>1.3
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:numeric-multiply</code>(<code class="arg">$arg1</code>
+ <code class="as"> as </code>
+ <code class="type">numeric</code>, <code class="arg">$arg2</code>
+ <code class="as"> as </code>
+ <code class="type">numeric</code>)<code class="as"> as </code>
+ <code class="return-type">numeric</code>
+ </div>
+ </div>
+ </li>
+ </ul>
+ </div>
+ <div class="div2">
+ <h3>
+ <a name="func-overloading" id="func-overloading"/>1.3
Function overloading</h3>
-<p>In general, the specifications named above do not support
+ <p>In general, the specifications named above do not support
function overloading in the sense that functions that have multiple
signatures with the same name and the same number of parameters are
not supported. Consequently, there are no such overloaded functions
in this document except for legacy <a href="#xpath">[XML Path
-Language (XPath) Version 1.0]</a> functions such as <a href=
-"#func-string"><code>fn:string</code></a>, which accepts a single
+Language (XPath) Version 1.0]</a> functions such as <a href="#func-string">
+ <code>fn:string</code>
+ </a>, which accepts a single
parameter of a variety of types. In addition, it should be noted
-that the functions defined in <a href="#numeric-functions"><b>4
-Functions and operators on numerics</b></a> that accept
+that the functions defined in <a href="#numeric-functions">
+ <b>4
+Functions and operators on numerics</b>
+ </a> that accept
<code>numeric</code> parameters accept arguments of type
<code>xs:integer</code>, <code>xs:decimal</code>,
-<code>xs:float</code> or <code>xs:double</code>. See <a href=
-"#func-signatures"><b>1.4 Function signatures and
-descriptions</b></a>. Operators such as "+" may be overloaded. This
+<code>xs:float</code> or <code>xs:double</code>. See <a href="#func-signatures">
+ <b>1.4 Function signatures and
+descriptions</b>
+ </a>. Operators such as "+" may be overloaded. This
document does define some functions with more than one signature
with the same name and different number of parameters. User-defined
functions with more than one signature with the same name and
different number of parameters are also supported.</p>
-</div>
-<div class="div2">
-<h3><a name="func-signatures" id="func-signatures"></a>1.4 Function
+ </div>
+ <div class="div2">
+ <h3>
+ <a name="func-signatures" id="func-signatures"/>1.4 Function
signatures and descriptions</h3>
-<p>Each function is defined by specifying its signature, a
+ <p>Each function is defined by specifying its signature, a
description of the return type and each of the parameters and its
semantics. For many functions, examples are included to illustrate
their use.</p>
-<p>Each function's signature is presented in a form like this:</p>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:function-name</code>(<code class=
-"arg">$parameter-name</code><code class=
-"as">&#160;as&#160;</code><code class="type">parameter-type</code>,
-<span class="varargs">...</span>)<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">return-type</code></div>
-</div>
-<p>In this notation, <b>function-name</b>, in bold-face, is the
+ <p>Each function's signature is presented in a form like this:</p>
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:function-name</code>(<code class="arg">$parameter-name</code>
+ <code class="as"> as </code>
+ <code class="type">parameter-type</code>,
+<span class="varargs">...</span>)<code class="as"> as </code>
+ <code class="return-type">return-type</code>
+ </div>
+ </div>
+ <p>In this notation, <b>function-name</b>, in bold-face, is the
name of the function whose signature is being specified. If the
function takes no parameters, then the name is followed by an empty
parameter list: "<code>()</code>"; otherwise, the name is followed
@@ -1664,159 +1590,177 @@
specifies the static type of the parameter, in italics, and a
descriptive, but non-normative, name. If there are two or more
parameter declarations, they are separated by a comma. The
-<em><code>return-type</code></em> , also in italics, specifies the
+<em>
+ <code>return-type</code>
+ </em> , also in italics, specifies the
static type of the value returned by the function. The dynamic type
of the value returned by the function is the same as its static
type or derived from the static type. All parameter types and
return types are specified using the SequenceType notation defined
-in <a href=
-"http://www.w3.org/TR/xpath-30/#id-sequencetype-syntax">Section
-2.5.4 SequenceType Syntax</a> <sup><small>XP30</small></sup>.</p>
-<p>One function, <a href="#func-concat"><code>fn:concat</code></a>,
+in <a href="http://www.w3.org/TR/xpath-30/#id-sequencetype-syntax">Section
+2.5.4 SequenceType Syntax</a>
+ <sup>
+ <small>XP30</small>
+ </sup>.</p>
+ <p>One function, <a href="#func-concat">
+ <code>fn:concat</code>
+ </a>,
has a variable number of arguments (two or more). More strictly,
-there is an infinite set of functions having the name <a href=
-"#func-concat"><code>fn:concat</code></a>, with arity ranging from
+there is an infinite set of functions having the name <a href="#func-concat">
+ <code>fn:concat</code>
+ </a>, with arity ranging from
2 to infinity. For this special case, a single function signature
is given, with an ellipsis indicating an indefinite number of
arguments.</p>
-<p>In some cases the word " <code>numeric</code> " is used in
+ <p>In some cases the word " <code>numeric</code> " is used in
function signatures as a shorthand to indicate the four numeric
types: <code>xs:integer</code>, <code>xs:decimal</code>,
<code>xs:float</code> and <code>xs:double</code>. For example, a
function with the signature:</p>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:numeric-function</code>(<code class=
-"arg">$arg</code><code class="as">&#160;as&#160;</code><code class=
-"type">numeric</code>)<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">...</code></div>
-</div>
-<p>represents the following four function signatures:</p>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:numeric-function</code>(<code class=
-"arg">$arg</code><code class="as">&#160;as&#160;</code><code class=
-"type">xs:integer</code>)<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">...</code></div>
-</div>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:numeric-function</code>(<code class=
-"arg">$arg</code><code class="as">&#160;as&#160;</code><code class=
-"type">xs:decimal</code>)<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">...</code></div>
-</div>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:numeric-function</code>(<code class=
-"arg">$arg</code><code class="as">&#160;as&#160;</code><code class=
-"type">xs:float</code>)<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">...</code></div>
-</div>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:numeric-function</code>(<code class=
-"arg">$arg</code><code class="as">&#160;as&#160;</code><code class=
-"type">xs:double</code>)<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">...</code></div>
-</div>
-<p>For most functions there is an initial paragraph describing what
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:numeric-function</code>(<code class="arg">$arg</code>
+ <code class="as"> as </code>
+ <code class="type">numeric</code>)<code class="as"> as </code>
+ <code class="return-type">...</code>
+ </div>
+ </div>
+ <p>represents the following four function signatures:</p>
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:numeric-function</code>(<code class="arg">$arg</code>
+ <code class="as"> as </code>
+ <code class="type">xs:integer</code>)<code class="as"> as </code>
+ <code class="return-type">...</code>
+ </div>
+ </div>
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:numeric-function</code>(<code class="arg">$arg</code>
+ <code class="as"> as </code>
+ <code class="type">xs:decimal</code>)<code class="as"> as </code>
+ <code class="return-type">...</code>
+ </div>
+ </div>
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:numeric-function</code>(<code class="arg">$arg</code>
+ <code class="as"> as </code>
+ <code class="type">xs:float</code>)<code class="as"> as </code>
+ <code class="return-type">...</code>
+ </div>
+ </div>
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:numeric-function</code>(<code class="arg">$arg</code>
+ <code class="as"> as </code>
+ <code class="type">xs:double</code>)<code class="as"> as </code>
+ <code class="return-type">...</code>
+ </div>
+ </div>
+ <p>For most functions there is an initial paragraph describing what
the function does followed by semantic rules. These rules are meant
to be followed in the order that they appear in this document.</p>
-<p>The function name is a <code>QName</code> as defined in <a href=
-"#xmlschema-2">[XML Schema Part 2: Datatypes Second Edition]</a>
+ <p>The function name is a <code>QName</code> as defined in <a href="#xmlschema-2">[XML Schema Part 2: Datatypes Second Edition]</a>
and must adhere to its syntactic conventions. Following the
precedent set by <a href="#xpath">[XML Path Language (XPath)
Version 1.0]</a>, function names are generally composed of English
words separated by hyphens ("-"). If a function name contains a
<a href="#xmlschema-2">[XML Schema Part 2: Datatypes Second
Edition]</a> datatype name, it may have intercapitalized spelling
-and is used in the function name as such. For example, <a href=
-"#func-timezone-from-dateTime"><code>fn:timezone-from-dateTime</code></a>.</p>
-<p>Rules for passing parameters to operators are described in the
+and is used in the function name as such. For example, <a href="#func-timezone-from-dateTime">
+ <code>fn:timezone-from-dateTime</code>
+ </a>.</p>
+ <p>Rules for passing parameters to operators are described in the
relevant sections of <a href="#xquery-30">[XQuery 3.0: An XML Query
Language]</a> and <a href="#xpath-30">[XML Path Language (XPath)
3.0]</a>. For example, the rules for passing parameters to
-arithmetic operators are described in <a href=
-"http://www.w3.org/TR/xpath-30/#id-arithmetic">Section 3.5
-Arithmetic Expressions</a> <sup><small>XP30</small></sup>.
+arithmetic operators are described in <a href="http://www.w3.org/TR/xpath-30/#id-arithmetic">Section 3.5
+Arithmetic Expressions</a>
+ <sup>
+ <small>XP30</small>
+ </sup>.
Specifically, rules for parameters of type
<code>xs:untypedAtomic</code> and the empty sequence are specified
in this section.</p>
-<p>As is customary, the parameter type name indicates that the
+ <p>As is customary, the parameter type name indicates that the
function or operator accepts arguments of that type, or types
derived from it, in that position. This is called <em>subtype
-substitution</em> (See <a href=
-"http://www.w3.org/TR/xpath-30/#id-sequencetype-matching">Section
-2.5.5 SequenceType Matching</a> <sup><small>XP30</small></sup>). In
+substitution</em> (See <a href="http://www.w3.org/TR/xpath-30/#id-sequencetype-matching">Section
+2.5.5 SequenceType Matching</a>
+ <sup>
+ <small>XP30</small>
+ </sup>). In
addition, numeric type instances and instances of type
<code>xs:anyURI</code> can be promoted to produce an argument of
-the required type. (See <a href=
-"http://www.w3.org/TR/xpath-30/#promotion">Section B.1 Type
-Promotion</a> <sup><small>XP30</small></sup>).</p>
-<ol class="enumar">
-<li>
-<p><em>Subtype Substitution</em>: A derived type may substitute for
+the required type. (See <a href="http://www.w3.org/TR/xpath-30/#promotion">Section B.1 Type
+Promotion</a>
+ <sup>
+ <small>XP30</small>
+ </sup>).</p>
+ <ol class="enumar">
+ <li>
+ <p>
+ <em>Subtype Substitution</em>: A derived type may substitute for
its base type. In particular, <code>xs:integer</code> may be used
where <code>xs:decimal</code> is expected.</p>
-</li>
-<li>
-<p><em>Numeric Type Promotion</em>: <code>xs:decimal</code> may be
+ </li>
+ <li>
+ <p>
+ <em>Numeric Type Promotion</em>: <code>xs:decimal</code> may be
promoted to <code>xs:float</code> or <code>xs:double</code>.
Promotion to <code>xs:double</code> should be done directly, not
via <code>xs:float</code>, to avoid loss of precision.</p>
-</li>
-<li>
-<p><em>anyURI Type Promotion</em>: A value of type
+ </li>
+ <li>
+ <p>
+ <em>anyURI Type Promotion</em>: A value of type
<code>xs:anyURI</code> can be promoted to the type
<code>xs:string</code>.</p>
-</li>
-</ol>
-<p>Some functions accept a single value or the empty sequence as an
+ </li>
+ </ol>
+ <p>Some functions accept a single value or the empty sequence as an
argument and some may return a single value or the empty sequence.
This is indicated in the function signature by following the
parameter or return type name with a question mark:
"<code>?</code>", indicating that either a single value or the
empty sequence must appear. See below.</p>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:function-name</code>(<code class=
-"arg">$parameter-name</code><code class=
-"as">&#160;as&#160;</code><code class=
-"type">parameter-type?</code>)<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">return-type?</code></div>
-</div>
-<p>Note that this function signature is different from a signature
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:function-name</code>(<code class="arg">$parameter-name</code>
+ <code class="as"> as </code>
+ <code class="type">parameter-type?</code>)<code class="as"> as </code>
+ <code class="return-type">return-type?</code>
+ </div>
+ </div>
+ <p>Note that this function signature is different from a signature
in which the parameter is omitted. See, for example, the two
-signatures for <a href="#func-string"><code>fn:string</code></a>.
+signatures for <a href="#func-string">
+ <code>fn:string</code>
+ </a>.
In the first signature, the parameter is omitted and the argument
defaults to the context item, referred to as ".". In the second
signature, the argument must be present but may be the empty
sequence, written as <code>()</code>.</p>
-<p>Some functions accept a sequence of zero or more values as an
+ <p>Some functions accept a sequence of zero or more values as an
argument. This is indicated by following the name of the type of
the items in the sequence with <code>*</code>. The sequence may
contain zero or more items of the named type. For example, the
function below accepts a sequence of <code>xs:double</code> and
returns a <code>xs:double</code> or the empty sequence.</p>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:median</code>(<code class=
-"arg">$arg</code><code class="as">&#160;as&#160;</code><code class=
-"type">xs:double*</code>)<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">xs:double?</code></div>
-</div>
-</div>
-<div class="div2">
-<h3><a name="datatypes" id="datatypes"></a>1.5 Type system</h3>
-<p>The diagrams below show how nodes, function items, primitive
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:median</code>(<code class="arg">$arg</code>
+ <code class="as"> as </code>
+ <code class="type">xs:double*</code>)<code class="as"> as </code>
+ <code class="return-type">xs:double?</code>
+ </div>
+ </div>
+ </div>
+ <div class="div2">
+ <h3>
+ <a name="datatypes" id="datatypes"/>1.5 Type system</h3>
+ <p>The diagrams below show how nodes, function items, primitive
simple types, and user defined types fit together into a type
system. This type system comprises two distinct hierarchies that
both include the primitive simple types. In the diagrams,
@@ -1827,548 +1771,571 @@
of the other diagrams. Dotted lines represent additional
relationships that follow an evident pattern. The information that
appears in each diagram is recapitulated in tabular form.</p>
-<p>The <code>xs:IDREFS</code>, <code>xs:NMTOKENS</code>, and
+ <p>The <code>xs:IDREFS</code>, <code>xs:NMTOKENS</code>, and
<code>xs:ENTITIES</code> types and the <code>user-defined list and
union types</code> are special types in that these types are lists
or unions rather than types derived by extension or
restriction.</p>
-<p>The first diagram and its corresponding table illustrate the
+ <p>The first diagram and its corresponding table illustrate the
"item" type hierarchy. In XDM, items include node types, function
types, and built-in atomic types.</p>
-<div class="note">
-<p class="prefix"><b>Note:</b></p>
-<p>This diagram fails to reveal that the graph of the subtype
+ <div class="note">
+ <p class="prefix">
+ <b>Note:</b>
+ </p>
+ <p>This diagram fails to reveal that the graph of the subtype
relationship between types is actually a lattice rather than a
hierarchy. This is particularly evident with function types, and
with union types: in both cases, a type may be an immediate subtype
of several other types.</p>
-</div>
-<img src="XPathTypeHierarchy-1-items.png" alt=
-"Type hierarchy graphic, item hierarchy" />
-<p>In the table, each type whose name is indented is derived from
+ </div>
+ <img src="XPathTypeHierarchy-1-items.png" alt="Type hierarchy graphic, item hierarchy"/>
+ <p>In the table, each type whose name is indented is derived from
the type whose name appears nearest above it with one less level of
indentation.</p>
-<table class="hierarchy" summary="Type summary" border="0">
-<tbody>
-<tr>
-<td class="castOther" align="left" valign="middle">item</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">
+ <table class="hierarchy" summary="Type summary" border="0">
+ <tbody>
+ <tr>
+ <td class="castOther" align="left" valign="middle">item</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">
xs:anyAtomicType</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">function(*)</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">function(*)</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">
function(item()*) as item()*</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">
function(item()*) as item()</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">
function(item()*) as item()?</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">
function(item()*, item()*) as item()*</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">node</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">attribute</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">user-defined
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">node</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">attribute</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">user-defined
attribute types</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">comment</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">document</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">user-defined
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">comment</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">document</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">user-defined
document types</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">element</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">user-defined
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">element</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">user-defined
element types</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">namespace</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">namespace</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">
processing-instruction</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">text</td>
-</tr>
-</tbody>
-</table>
-<p>The next diagram and table illustrate the "any type" type
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">text</td>
+ </tr>
+ </tbody>
+ </table>
+ <p>The next diagram and table illustrate the "any type" type
hierarchy, in which all types are derived from distinguished type
<code>xs:anyType</code>.</p>
-<img src="XPathTypeHierarchy-2-anyTypes.png" alt=
-"Type hierarchy graphic, anyType hierarchy" />
-<p>In the table, each type whose name is indented is derived from
+ <img src="XPathTypeHierarchy-2-anyTypes.png" alt="Type hierarchy graphic, anyType hierarchy"/>
+ <p>In the table, each type whose name is indented is derived from
the type whose name appears nearest above it with one less level of
indentation.</p>
-<table class="hierarchy" summary="Type summary" border="0">
-<tbody>
-<tr>
-<td class="castOther" align="left" valign="middle">xs:anyType</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">user-defined
+ <table class="hierarchy" summary="Type summary" border="0">
+ <tbody>
+ <tr>
+ <td class="castOther" align="left" valign="middle">xs:anyType</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">user-defined
complex types</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">xs:untyped</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">xs:untyped</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">
xs:anySimpleType</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">user-defined
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">user-defined
list and union types</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">xs:IDREFS</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">xs:NMTOKENS</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">xs:ENTITIES</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">xs:IDREFS</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">xs:NMTOKENS</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">xs:ENTITIES</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">
xs:anyAtomicType</td>
-</tr>
-</tbody>
-</table>
-<p>The final diagram and table show all of the atomic types,
+ </tr>
+ </tbody>
+ </table>
+ <p>The final diagram and table show all of the atomic types,
including the primitive simple types and the built-in types derived
from the primitive simple types. This includes all the built-in
datatypes defined in <a href="#xmlschema-2">[XML Schema Part 2:
Datatypes Second Edition]</a> as well as the two totally ordered
-subtypes of duration defined in <a href="#duration-subtypes"><b>8.1
-Two totally ordered subtypes of duration</b></a>.</p>
-<img src="XPathTypeHierarchy-3-anyAtomicTypes.png" alt=
-"Type hierarchy graphic, anyAtomicType hierarchy" />
-<p>In the table, each type whose name is indented is derived from
+subtypes of duration defined in <a href="#duration-subtypes">
+ <b>8.1
+Two totally ordered subtypes of duration</b>
+ </a>.</p>
+ <img src="XPathTypeHierarchy-3-anyAtomicTypes.png" alt="Type hierarchy graphic, anyAtomicType hierarchy"/>
+ <p>In the table, each type whose name is indented is derived from
the type whose name appears nearest above it with one less level of
indentation.</p>
-<table class="hierarchy" summary="Type summary" border="0">
-<tbody>
-<tr>
-<td class="castOther" align="left" valign="middle">
+ <table class="hierarchy" summary="Type summary" border="0">
+ <tbody>
+ <tr>
+ <td class="castOther" align="left" valign="middle">
xs:untypedAtomic</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle">xs:dateTime</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle">xs:dateTime</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">
xs:dateTimeStamp</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle">xs:date</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle">xs:time</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle">xs:duration</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle">xs:date</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle">xs:time</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle">xs:duration</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">
xs:yearMonthDuration</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">
xs:dayTimeDuration</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle">xs:float</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle">xs:double</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle">xs:decimal</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">xs:integer</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle">xs:float</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle">xs:double</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle">xs:decimal</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">xs:integer</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">
xs:nonPositiveInteger</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">
xs:negativeInteger</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">xs:long</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">xs:int</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">xs:short</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">xs:byte</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">xs:long</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">xs:int</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">xs:short</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">xs:byte</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">
xs:nonNegativeInteger</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">
xs:unsignedLong</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">
xs:unsignedInt</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">
xs:unsignedShort</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">
xs:unsignedByte</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">
xs:positiveInteger</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle">
xs:gYearMonth</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle">xs:gYear</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle">xs:gYear</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle">
xs:gMonthDay</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle">xs:gDay</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle">xs:gMonth</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle">xs:string</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle">xs:gDay</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle">xs:gMonth</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle">xs:string</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">
xs:normalizedString</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">xs:token</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">xs:language</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">xs:NMTOKEN</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">xs:Name</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">xs:NCName</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">xs:ID</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">xs:IDREF</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">xs:ENTITY</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle">xs:boolean</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">xs:token</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">xs:language</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">xs:NMTOKEN</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">xs:Name</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">xs:NCName</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">xs:ID</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">xs:IDREF</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">xs:ENTITY</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle">xs:boolean</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle">
xs:base64Binary</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle">
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle">
xs:hexBinary</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle">xs:anyURI</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle">xs:QName</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle">xs:NOTATION</td>
-</tr>
-</tbody>
-</table>
-<p>When XSD 1.1 is supported, one additional type needs to be added
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle">xs:anyURI</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle">xs:QName</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle">xs:NOTATION</td>
+ </tr>
+ </tbody>
+ </table>
+ <p>When XSD 1.1 is supported, one additional type needs to be added
to these diagrams: the type <code>xs:dateTimeStamp</code>, which is
derived from <code>xs:dateTime</code>.</p>
-</div>
-<div class="div2">
-<h3><a name="terminology" id="terminology"></a>1.6 Terminology</h3>
-<p>The terminology used to describe the functions and operators on
+ </div>
+ <div class="div2">
+ <h3>
+ <a name="terminology" id="terminology"/>1.6 Terminology</h3>
+ <p>The terminology used to describe the functions and operators on
<a href="#xmlschema-2">[XML Schema Part 2: Datatypes Second
Edition]</a> is defined in the body of this specification. The
terms defined in this section are used in building those
definitions</p>
-<div class="div3">
-<h4><a name="character-terminology" id=
-"character-terminology"></a>1.6.1 Strings, characters, and
+ <div class="div3">
+ <h4>
+ <a name="character-terminology" id="character-terminology"/>1.6.1 Strings, characters, and
codepoints</h4>
-<p>This document uses the terms <code>string</code>,
+ <p>This document uses the terms <code>string</code>,
<code>character</code>, and <code>codepoint</code> with the
following meanings:</p>
-<p><span class="termdef"><a name="character" id=
-"character"></a>[Definition] A <b>character</b> is an instance of
-the <a href=
-"http://www.w3.org/TR/REC-xml/#NT-Char">Char</a><sup><small>XML</small></sup>
-production of <a href="#REC-xml">[REC-xml]</a>.</span></p>
-<div class="note">
-<p class="prefix"><b>Note:</b></p>
-<p>This definition excludes Unicode characters in the surrogate
+ <p>
+ <span class="termdef">
+ <a name="character" id="character"/>[Definition] A <b>character</b> is an instance of
+the <a href="http://www.w3.org/TR/REC-xml/#NT-Char">Char</a>
+ <sup>
+ <small>XML</small>
+ </sup>
+production of <a href="#REC-xml">[REC-xml]</a>.</span>
+ </p>
+ <div class="note">
+ <p class="prefix">
+ <b>Note:</b>
+ </p>
+ <p>This definition excludes Unicode characters in the surrogate
blocks as well as xFFFE and xFFFF, while including characters with
codepoints greater than xFFFF which some programming languages
treat as two characters. The valid characters are defined by their
codepoints, and include some whose codepoints have not been
assigned by the Unicode consortium to any character.</p>
-</div>
-<p><span class="termdef"><a name="string" id=
-"string"></a>[Definition] A <b>string</b> is a sequence of zero or
-more <a title="character" class="termref" href=
-"#character"><span class="arrow">·</span>characters<span class=
-"arrow">·</span></a>, or equivalently, a value in the value space
-of the <code>xs:string</code> data type.</span></p>
-<p><span class="termdef"><a name="codepoint" id=
-"codepoint"></a>[Definition] A <b>codepoint</b> is a non-negative
-integer assigned to a <a title="character" class="termref" href=
-"#character"><span class="arrow">·</span>character<span class=
-"arrow">·</span></a> by the Unicode consortium, or reserved for
-future assignment to a character.</span></p>
-<div class="note">
-<p class="prefix"><b>Note:</b></p>
-<p>The set of codepoints is thus wider than the set of
+ </div>
+ <p>
+ <span class="termdef">
+ <a name="string" id="string"/>[Definition] A <b>string</b> is a sequence of zero or
+more <a title="character" class="termref" href="#character">
+ <span class="arrow">·</span>characters<span class="arrow">·</span>
+ </a>, or equivalently, a value in the value space
+of the <code>xs:string</code> data type.</span>
+ </p>
+ <p>
+ <span class="termdef">
+ <a name="codepoint" id="codepoint"/>[Definition] A <b>codepoint</b> is a non-negative
+integer assigned to a <a title="character" class="termref" href="#character">
+ <span class="arrow">·</span>character<span class="arrow">·</span>
+ </a> by the Unicode consortium, or reserved for
+future assignment to a character.</span>
+ </p>
+ <div class="note">
+ <p class="prefix">
+ <b>Note:</b>
+ </p>
+ <p>The set of codepoints is thus wider than the set of
characters.</p>
-<p>This specification spells "codepoint" as one word; the Unicode
+ <p>This specification spells "codepoint" as one word; the Unicode
specification spells it as "code point". Equivalent terms found in
other specifications are "character number" or "code position". See
<a href="#charmod">[Character Model for the World Wide Web 1.0:
-Fundamentals]</a></p>
-</div>
-<p>Because these terms appear so frequently, they are hyperlinked
+Fundamentals]</a>
+ </p>
+ </div>
+ <p>Because these terms appear so frequently, they are hyperlinked
to the definition only when there is a particular desire to draw
the reader's attention to the definition; the absence of a
hyperlink does not mean that the term is being used in some other
sense.</p>
-<p>It is <a title="implementation-defined" class="termref" href=
-"#implementation-defined"><span class=
-"arrow">·</span>implementation-defined<span class=
-"arrow">·</span></a> which version of <a href="#Unicode">[The
+ <p>It is <a title="implementation-defined" class="termref" href="#implementation-defined">
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ </a> which version of <a href="#Unicode">[The
Unicode Standard]</a> is supported, but it is recommended that the
most recent version of Unicode be used.</p>
-<p>Unless explicitly stated, the <code>xs:string</code> values
+ <p>Unless explicitly stated, the <code>xs:string</code> values
returned by the functions in this document are not normalized in
the sense of <a href="#charmod">[Character Model for the World Wide
Web 1.0: Fundamentals]</a>.</p>
-<div class="note">
-<p class="prefix"><b>Notes:</b></p>
-<p>In functions that involve character counting such as <a href=
-"#func-substring"><code>fn:substring</code></a>, <a href=
-"#func-string-length"><code>fn:string-length</code></a> and
-<a href="#func-translate"><code>fn:translate</code></a>, what is
-counted is the number of XML <a title="character" class="termref"
-href="#character"><span class=
-"arrow">·</span>characters<span class="arrow">·</span></a> in the
+ <div class="note">
+ <p class="prefix">
+ <b>Notes:</b>
+ </p>
+ <p>In functions that involve character counting such as <a href="#func-substring">
+ <code>fn:substring</code>
+ </a>, <a href="#func-string-length">
+ <code>fn:string-length</code>
+ </a> and
+<a href="#func-translate">
+ <code>fn:translate</code>
+ </a>, what is
+counted is the number of XML <a title="character" class="termref" href="#character">
+ <span class="arrow">·</span>characters<span class="arrow">·</span>
+ </a> in the
string (or equivalently, the number of Unicode codepoints). Some
implementations may represent a codepoint above xFFFF using two
16-bit values known as a surrogate pair. A surrogate pair counts as
one character, not two.</p>
-</div>
-</div>
-<div class="div3">
-<h4><a name="namespace-terminology" id=
-"namespace-terminology"></a>1.6.2 Namespaces and URIs</h4>
-<p>This document uses the phrase "namespace URI" to identify the
+ </div>
+ </div>
+ <div class="div3">
+ <h4>
+ <a name="namespace-terminology" id="namespace-terminology"/>1.6.2 Namespaces and URIs</h4>
+ <p>This document uses the phrase "namespace URI" to identify the
concept identified in <a href="#REC-xml-names">[Namespaces in
XML]</a> as "namespace name", and the phrase "local name" to
-identify the concept identified in <a href=
-"#REC-xml-names">[Namespaces in XML]</a> as "local part".</p>
-<p>It also uses the term "expanded-QName" defined below.</p>
-<p><span class="termdef"><a name="expanded-name" id=
-"expanded-name"></a>[Definition] An <b>expanded-QName</b> is a pair
+identify the concept identified in <a href="#REC-xml-names">[Namespaces in XML]</a> as "local part".</p>
+ <p>It also uses the term "expanded-QName" defined below.</p>
+ <p>
+ <span class="termdef">
+ <a name="expanded-name" id="expanded-name"/>[Definition] An <b>expanded-QName</b> is a pair
of values consisting of a namespace URI and a local name. They
belong to the value space of the <a href="#xmlschema-2">[XML Schema
Part 2: Datatypes Second Edition]</a> datatype
<code>xs:QName</code>. When this document refers to
<code>xs:QName</code> we always mean the value space, i.e. a
namespace URI, local name pair (and not the lexical space referring
-to constructs of the form prefix:local-name).</span></p>
-<p>The term URI is used as follows:</p>
-<p><span class="termdef"><a name="dt-uri" id=
-"dt-uri"></a>[Definition] Within this specification, the term
+to constructs of the form prefix:local-name).</span>
+ </p>
+ <p>The term URI is used as follows:</p>
+ <p>
+ <span class="termdef">
+ <a name="dt-uri" id="dt-uri"/>[Definition] Within this specification, the term
<b>URI</b> refers to Universal Resource Identifiers as defined in
-<a href="#rfc3986">[RFC 3986]</a> and extended in <a href=
-"#rfc3987">[RFC 3987]</a> with a new name <b>IRI</b>. The term
+<a href="#rfc3986">[RFC 3986]</a> and extended in <a href="#rfc3987">[RFC 3987]</a> with a new name <b>IRI</b>. The term
<b>URI Reference</b>, unless otherwise stated, refers to a string
in the lexical space of the <code>xs:anyURI</code> datatype as
defined in <a href="#xmlschema-2">[XML Schema Part 2: Datatypes
-Second Edition]</a>.</span></p>
-<div class="note">
-<p class="prefix"><b>Note:</b></p>
-<p>Note that this means, in practice, that where this specification
-requires a "URI Reference", an IRI as defined in <a href=
-"#rfc3987">[RFC 3987]</a> will be accepted, provided that other
+Second Edition]</a>.</span>
+ </p>
+ <div class="note">
+ <p class="prefix">
+ <b>Note:</b>
+ </p>
+ <p>Note that this means, in practice, that where this specification
+requires a "URI Reference", an IRI as defined in <a href="#rfc3987">[RFC 3987]</a> will be accepted, provided that other
relevant specifications also permit an IRI. The term URI has been
retained in preference to IRI to avoid introducing new names for
concepts such as "Base URI" that are defined or referenced across
@@ -2376,183 +2343,245 @@
definition of <code>xs:anyURI</code> is a wider definition than the
definition in <a href="#rfc3987">[RFC 3987]</a>; for example it
does not require non-ASCII characters to be escaped.</p>
-</div>
-</div>
-<div class="div3">
-<h4><a name="conformance-terminology" id=
-"conformance-terminology"></a>1.6.3 Conformance terminology</h4>
-<dl>
-<dt class="label"><span class="termdef"><a name="compatibility" id=
-"compatibility"></a>[Definition] <b>for
-compatibility</b></span></dt>
-<dd>
-<p>A feature of this specification included to ensure that
+ </div>
+ </div>
+ <div class="div3">
+ <h4>
+ <a name="conformance-terminology" id="conformance-terminology"/>1.6.3 Conformance terminology</h4>
+ <dl>
+ <dt class="label">
+ <span class="termdef">
+ <a name="compatibility" id="compatibility"/>[Definition] <b>for
+compatibility</b>
+ </span>
+ </dt>
+ <dd>
+ <p>A feature of this specification included to ensure that
implementations that use this feature remain compatible with
-<a href="#xpath">[XML Path Language (XPath) Version 1.0]</a></p>
-</dd>
-<dt class="label"><span class="termdef"><a name="may" id=
-"may"></a>[Definition] <b>may</b></span></dt>
-<dd>
-<p>Conforming documents and processors are permitted to, but need
+<a href="#xpath">[XML Path Language (XPath) Version 1.0]</a>
+ </p>
+ </dd>
+ <dt class="label">
+ <span class="termdef">
+ <a name="may" id="may"/>[Definition] <b>may</b>
+ </span>
+ </dt>
+ <dd>
+ <p>Conforming documents and processors are permitted to, but need
not, behave as described.</p>
-</dd>
-<dt class="label"><span class="termdef"><a name="must" id=
-"must"></a>[Definition] <b>must</b></span></dt>
-<dd>
-<p>Conforming documents and processors are required to behave as
+ </dd>
+ <dt class="label">
+ <span class="termdef">
+ <a name="must" id="must"/>[Definition] <b>must</b>
+ </span>
+ </dt>
+ <dd>
+ <p>Conforming documents and processors are required to behave as
described; otherwise, they are either non-conformant or else in
error.</p>
-</dd>
-<dt class="label"><span class="termdef"><a name=
-"implementation-defined" id=
-"implementation-defined"></a>[Definition]
-<b>implementation-defined</b></span></dt>
-<dd>
-<p>Possibly differing between implementations, but specified and
+ </dd>
+ <dt class="label">
+ <span class="termdef">
+ <a name="implementation-defined" id="implementation-defined"/>[Definition]
+<b>implementation-defined</b>
+ </span>
+ </dt>
+ <dd>
+ <p>Possibly differing between implementations, but specified and
documented by the implementor for each particular
implementation.</p>
-</dd>
-<dt class="label"><span class="termdef"><a name=
-"implementation-dependent" id=
-"implementation-dependent"></a>[Definition]
-<b>implementation-dependent</b></span></dt>
-<dd>
-<p>Possibly differing between implementations, but not specified by
+ </dd>
+ <dt class="label">
+ <span class="termdef">
+ <a name="implementation-dependent" id="implementation-dependent"/>[Definition]
+<b>implementation-dependent</b>
+ </span>
+ </dt>
+ <dd>
+ <p>Possibly differing between implementations, but not specified by
this or other W3C specification, and not required to be specified
by the implementor for any particular implementation.</p>
-</dd>
-</dl>
-</div>
-<div class="div3">
-<h4><a name="properties-of-functions" id=
-"properties-of-functions"></a>1.6.4 Properties of functions</h4>
-<p>This section is concerned with the question of whether two calls
+ </dd>
+ </dl>
+ </div>
+ <div class="div3">
+ <h4>
+ <a name="properties-of-functions" id="properties-of-functions"/>1.6.4 Properties of functions</h4>
+ <p>This section is concerned with the question of whether two calls
on a function, with the same arguments, may produce different
results.</p>
-<p><span class="termdef"><a name="execution-scope" id=
-"execution-scope"></a>[Definition] Two function calls are said to
+ <p>
+ <span class="termdef">
+ <a name="execution-scope" id="execution-scope"/>[Definition] Two function calls are said to
be within the same <b>execution scope</b> if the host environment
defines them as such. In XSLT, any two calls executed during the
same transformation are in the same execution scope. In XQuery, any
two calls executed during the evaluation of a top-level expression
are in the same execution scope. In other contexts, the execution
scope is specified by the host environment that invokes the
-function library.</span></p>
-<p>The following definition explains more precisely what it means
+function library.</span>
+ </p>
+ <p>The following definition explains more precisely what it means
for two function calls to return the same result:</p>
-<p><span class="termdef"><a name="dt-identical" id=
-"dt-identical"></a>[Definition]</span> Two values are defined to be
+ <p>
+ <span class="termdef">
+ <a name="dt-identical" id="dt-identical"/>[Definition]</span> Two values are defined to be
<b>identical</b> if they contain the same number of items and the
items are pairwise identical. Two items are identical if and only
if one of the following conditions applies:</p>
-<ul>
-<li>
-<p>Both items are atomic values, of precisely the same type, and
+ <ul>
+ <li>
+ <p>Both items are atomic values, of precisely the same type, and
the values are equal as defined using the <code>eq</code> operator,
using the Unicode codepoint collation when comparing strings</p>
-</li>
-<li>
-<p>Both items are nodes, and represent the same node</p>
-</li>
-<li>
-<p>Both items are function items, and have the same name (or
+ </li>
+ <li>
+ <p>Both items are nodes, and represent the same node</p>
+ </li>
+ <li>
+ <p>Both items are function items, and have the same name (or
absence of a name), arity, function signature, and closure. (Note
that there is no function or operator defined in the specification
that tests whether two function items are identical.)</p>
-</li>
-</ul>
-<p>Some functions produce results that depend not only on their
+ </li>
+ </ul>
+ <p>Some functions produce results that depend not only on their
explicit arguments, but also on the static and dynamic context.</p>
-<p><span class="termdef"><a name="dt-context-dependent" id=
-"dt-context-dependent"></a>[Definition] A function may have the
+ <p>
+ <span class="termdef">
+ <a name="dt-context-dependent" id="dt-context-dependent"/>[Definition] A function may have the
property of being <b>context-dependent</b>: the result of such a
function depends on the values of properties in the static and
dynamic evaluation context as well as on the actual supplied
-arguments (if any).</span></p>
-<p><span class="termdef"><a name="dt-context-independent" id=
-"dt-context-independent"></a>[Definition] A function that is not
-<a title="context-dependent" class="termref" href=
-"#dt-context-dependent"><span class=
-"arrow">·</span>context-dependent<span class="arrow">·</span></a>
-is called <b>context-independent</b>.</span></p>
-<p>Functions that are context-dependent cannot be used as literal
+arguments (if any).</span>
+ </p>
+ <p>
+ <span class="termdef">
+ <a name="dt-context-independent" id="dt-context-independent"/>[Definition] A function that is not
+<a title="context-dependent" class="termref" href="#dt-context-dependent">
+ <span class="arrow">·</span>context-dependent<span class="arrow">·</span>
+ </a>
+is called <b>context-independent</b>.</span>
+ </p>
+ <p>Functions that are context-dependent cannot be used as literal
function items, nor can they be partially applied. For example,
<code>position#0</code> is not valid as a literal function item,
-and <a href="#func-starts-with"><code>fn:starts-with(?, ?,
-"http://example.com/collation")</code></a> is not a valid partial
+and <a href="#func-starts-with">
+ <code>fn:starts-with(?, ?,
+"http://example.com/collation")</code>
+ </a> is not a valid partial
function application. In the latter case this is because, in
theory, the same URI might refer to different collations depending
on the static context in which the collation URI appears. It is
possible to circumvent this problem by writing a user-defined
-function as a simple wrapper for a call on <a href=
-"#func-starts-with"><code>fn:starts-with</code></a>, and writing a
+function as a simple wrapper for a call on <a href="#func-starts-with">
+ <code>fn:starts-with</code>
+ </a>, and writing a
partial application of this user-defined function. In this way the
-static context for the call on <a href=
-"#func-starts-with"><code>fn:starts-with</code></a> is made
+static context for the call on <a href="#func-starts-with">
+ <code>fn:starts-with</code>
+ </a> is made
unambiguous.</p>
-<p>Context-dependent functions fall into a number of
+ <p>Context-dependent functions fall into a number of
categories:</p>
-<ol class="enumar">
-<li>
-<p>The functions <a href=
-"#func-current-date"><code>fn:current-date</code></a>, <a href=
-"#func-current-dateTime"><code>fn:current-dateTime</code></a>,
-<a href="#func-current-time"><code>fn:current-time</code></a>,
-<a href=
-"#func-implicit-timezone"><code>fn:implicit-timezone</code></a>,
-<a href=
-"#func-adjust-date-to-timezone"><code>fn:adjust-date-to-timezone</code></a>,
-<a href=
-"#func-adjust-dateTime-to-timezone"><code>fn:adjust-dateTime-to-timezone</code></a>,
-and <a href=
-"#func-adjust-time-to-timezone"><code>fn:adjust-time-to-timezone</code></a>
+ <ol class="enumar">
+ <li>
+ <p>The functions <a href="#func-current-date">
+ <code>fn:current-date</code>
+ </a>, <a href="#func-current-dateTime">
+ <code>fn:current-dateTime</code>
+ </a>,
+<a href="#func-current-time">
+ <code>fn:current-time</code>
+ </a>,
+<a href="#func-implicit-timezone">
+ <code>fn:implicit-timezone</code>
+ </a>,
+<a href="#func-adjust-date-to-timezone">
+ <code>fn:adjust-date-to-timezone</code>
+ </a>,
+<a href="#func-adjust-dateTime-to-timezone">
+ <code>fn:adjust-dateTime-to-timezone</code>
+ </a>,
+and <a href="#func-adjust-time-to-timezone">
+ <code>fn:adjust-time-to-timezone</code>
+ </a>
depend on properties of the dynamic context that are fixed within
-the <a title="execution scope" class="termref" href=
-"#execution-scope"><span class="arrow">·</span>execution
-scope<span class="arrow">·</span></a>. The same applies to a number
+the <a title="execution scope" class="termref" href="#execution-scope">
+ <span class="arrow">·</span>execution
+scope<span class="arrow">·</span>
+ </a>. The same applies to a number
of functions in the <code>op:</code> namespace that manipulate
dates and times and that make use of the implicit timezone. These
functions will return the same result if called repeatedly during a
-single <a title="execution scope" class="termref" href=
-"#execution-scope"><span class="arrow">·</span>execution
-scope<span class="arrow">·</span></a>.</p>
-</li>
-<li>
-<p>A number of functions including <a href=
-"#func-base-uri"><code>fn:base-uri#0</code></a>, <a href=
-"#func-data"><code>fn:data#0</code></a>, <a href=
-"#func-document-uri"><code>fn:document-uri#0</code></a>, <a href=
-"#func-position"><code>fn:position</code></a>, <a href=
-"#func-last"><code>fn:last</code></a>, <a href=
-"#func-id"><code>fn:id#1</code></a>, <a href=
-"#func-idref"><code>fn:idref#1</code></a>, <a href=
-"#func-element-with-id"><code>fn:element-with-id#1</code></a>,
-<a href="#func-lang"><code>fn:lang#1</code></a>, <a href=
-"#func-local-name"><code>fn:local-name#0</code></a>, <a href=
-"#func-name"><code>fn:name#0</code></a>, <a href=
-"#func-namespace-uri"><code>fn:namespace-uri#0</code></a>, <a href=
-"#func-normalize-space"><code>fn:normalize-space#0</code></a>,
-<a href="#func-number"><code>fn:number#0</code></a>, <a href=
-"#func-root"><code>fn:root#0</code></a>, <a href=
-"#func-string"><code>fn:string#0</code></a>, <a href=
-"#func-string-length"><code>fn:string-length#0</code></a>, and
-<a href="#func-path"><code>fn:path#0</code></a> depend on the
+single <a title="execution scope" class="termref" href="#execution-scope">
+ <span class="arrow">·</span>execution
+scope<span class="arrow">·</span>
+ </a>.</p>
+ </li>
+ <li>
+ <p>A number of functions including <a href="#func-base-uri">
+ <code>fn:base-uri#0</code>
+ </a>, <a href="#func-data">
+ <code>fn:data#0</code>
+ </a>, <a href="#func-document-uri">
+ <code>fn:document-uri#0</code>
+ </a>, <a href="#func-position">
+ <code>fn:position</code>
+ </a>, <a href="#func-last">
+ <code>fn:last</code>
+ </a>, <a href="#func-id">
+ <code>fn:id#1</code>
+ </a>, <a href="#func-idref">
+ <code>fn:idref#1</code>
+ </a>, <a href="#func-element-with-id">
+ <code>fn:element-with-id#1</code>
+ </a>,
+<a href="#func-lang">
+ <code>fn:lang#1</code>
+ </a>, <a href="#func-local-name">
+ <code>fn:local-name#0</code>
+ </a>, <a href="#func-name">
+ <code>fn:name#0</code>
+ </a>, <a href="#func-namespace-uri">
+ <code>fn:namespace-uri#0</code>
+ </a>, <a href="#func-normalize-space">
+ <code>fn:normalize-space#0</code>
+ </a>,
+<a href="#func-number">
+ <code>fn:number#0</code>
+ </a>, <a href="#func-root">
+ <code>fn:root#0</code>
+ </a>, <a href="#func-string">
+ <code>fn:string#0</code>
+ </a>, <a href="#func-string-length">
+ <code>fn:string-length#0</code>
+ </a>, and
+<a href="#func-path">
+ <code>fn:path#0</code>
+ </a> depend on the
focus. These functions will in general return different results on
different calls if the focus is different.</p>
-<p><span class="termdef"><a name="dt-focus-dependent" id=
-"dt-focus-dependent"></a>[Definition] A function is
+ <p>
+ <span class="termdef">
+ <a name="dt-focus-dependent" id="dt-focus-dependent"/>[Definition] A function is
<b>focus-dependent</b> if its result depends on the focus (that is,
-the context item, position, or size).</span></p>
-<p><span class="termdef"><a name="dt-focus-independent" id=
-"dt-focus-independent"></a>[Definition] A function that is not
-<a title="focus-dependent" class="termref" href=
-"#dt-focus-dependent"><span class=
-"arrow">·</span>focus-dependent<span class="arrow">·</span></a> is
-called <b>focus-independent</b></span></p>
-</li>
-<li>
-<p>The function <a href=
-"#func-default-collation"><code>fn:default-collation</code></a> and
+the context item, position, or size).</span>
+ </p>
+ <p>
+ <span class="termdef">
+ <a name="dt-focus-independent" id="dt-focus-independent"/>[Definition] A function that is not
+<a title="focus-dependent" class="termref" href="#dt-focus-dependent">
+ <span class="arrow">·</span>focus-dependent<span class="arrow">·</span>
+ </a> is
+called <b>focus-independent</b>
+ </span>
+ </p>
+ </li>
+ <li>
+ <p>The function <a href="#func-default-collation">
+ <code>fn:default-collation</code>
+ </a> and
many string-handling operators and functions depend on the default
collation and the in-scope collations, which are both properties of
the static context. If a particular call of one of these functions
@@ -2562,642 +2591,702 @@
two calls on the function appearing in different places in the
source code) may produce different results even if the explicit
arguments are the same.</p>
-</li>
-<li>
-<p>Functions such as <a href=
-"#func-static-base-uri"><code>fn:static-base-uri</code></a>,
-<a href="#func-doc"><code>fn:doc</code></a>, and <a href=
-"#func-collection"><code>fn:collection</code></a> depend on other
+ </li>
+ <li>
+ <p>Functions such as <a href="#func-static-base-uri">
+ <code>fn:static-base-uri</code>
+ </a>,
+<a href="#func-doc">
+ <code>fn:doc</code>
+ </a>, and <a href="#func-collection">
+ <code>fn:collection</code>
+ </a> depend on other
aspects of the static context. As with functions that depend on
collations, a single call will produce the same results on each
call if the explicit arguments are the same, but two calls
appearing in different places in the source code may produce
different results.</p>
-</li>
-</ol>
-<p><span class="termdef"><a name="dt-implicit-arguments" id=
-"dt-implicit-arguments"></a>[Definition] For a <a title=
-"context-dependent" class="termref" href=
-"#dt-context-dependent"><span class=
-"arrow">·</span>context-dependent<span class="arrow">·</span></a>
+ </li>
+ </ol>
+ <p>
+ <span class="termdef">
+ <a name="dt-implicit-arguments" id="dt-implicit-arguments"/>[Definition] For a <a title="context-dependent" class="termref" href="#dt-context-dependent">
+ <span class="arrow">·</span>context-dependent<span class="arrow">·</span>
+ </a>
function, the parts of the context on which it depends are referred
-to as <b>implicit arguments</b>.</span></p>
-<p><span class="termdef"><a name="dt-deterministic" id=
-"dt-deterministic"></a>[Definition] A function that is guaranteed
-to produce <a title="identical" class="termref" href=
-"#dt-identical"><span class="arrow">·</span>identical<span class=
-"arrow">·</span></a> results from repeated calls if the explicit
+to as <b>implicit arguments</b>.</span>
+ </p>
+ <p>
+ <span class="termdef">
+ <a name="dt-deterministic" id="dt-deterministic"/>[Definition] A function that is guaranteed
+to produce <a title="identical" class="termref" href="#dt-identical">
+ <span class="arrow">·</span>identical<span class="arrow">·</span>
+ </a> results from repeated calls if the explicit
and implicit arguments are identical is referred to as
-<b>deterministic</b>.</span></p>
-<p><span class="termdef"><a name="dt-nondeterministic" id=
-"dt-nondeterministic"></a>[Definition] A function that is not
-<a title="deterministic" class="termref" href=
-"#dt-deterministic"><span class=
-"arrow">·</span>deterministic<span class="arrow">·</span></a> is
-referred to as <b>nondeterministic</b>.</span></p>
-<p>All functions defined in this specification are <a title=
-"deterministic" class="termref" href=
-"#dt-deterministic"><span class=
-"arrow">·</span>deterministic<span class="arrow">·</span></a>
+<b>deterministic</b>.</span>
+ </p>
+ <p>
+ <span class="termdef">
+ <a name="dt-nondeterministic" id="dt-nondeterministic"/>[Definition] A function that is not
+<a title="deterministic" class="termref" href="#dt-deterministic">
+ <span class="arrow">·</span>deterministic<span class="arrow">·</span>
+ </a> is
+referred to as <b>nondeterministic</b>.</span>
+ </p>
+ <p>All functions defined in this specification are <a title="deterministic" class="termref" href="#dt-deterministic">
+ <span class="arrow">·</span>deterministic<span class="arrow">·</span>
+ </a>
unless otherwise stated. Exceptions include the following:</p>
-<ul>
-<li>
-<p>Some functions (such as <a href=
-"#func-distinct-values"><code>fn:distinct-values</code></a> and
-<a href="#func-unordered"><code>fn:unordered</code></a>) produce
-results in an <a title="implementation-defined" class="termref"
-href="#implementation-defined"><span class=
-"arrow">·</span>implementation-defined<span class=
-"arrow">·</span></a> or <a title="implementation dependent" class=
-"termref" href="#implementation-dependent"><span class=
-"arrow">·</span>implementation-dependent<span class=
-"arrow">·</span></a> order. In such cases there is no guarantee
+ <ul>
+ <li>
+ <p>Some functions (such as <a href="#func-distinct-values">
+ <code>fn:distinct-values</code>
+ </a> and
+<a href="#func-unordered">
+ <code>fn:unordered</code>
+ </a>) produce
+results in an <a title="implementation-defined" class="termref" href="#implementation-defined">
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ </a> or <a title="implementation dependent" class="termref" href="#implementation-dependent">
+ <span class="arrow">·</span>implementation-dependent<span class="arrow">·</span>
+ </a> order. In such cases there is no guarantee
that the order of results from different calls will be the same.
These functions are said to be <b>non-deterministic with respect to
ordering</b>.</p>
-</li>
-<li>
-<p>The function <a href=
-"#func-analyze-string"><code>fn:analyze-string</code></a>
+ </li>
+ <li>
+ <p>The function <a href="#func-analyze-string">
+ <code>fn:analyze-string</code>
+ </a>
constructs an element node to represent its results. There is no
guarantee that repeated calls with the same arguments will return
the same identical node (in the sense of the <code>is</code>
operator). However, if non-identical nodes are returned, their
-content will be the same in the sense of the <a href=
-"#func-deep-equal"><code>fn:deep-equal</code></a> function. Such a
+content will be the same in the sense of the <a href="#func-deep-equal">
+ <code>fn:deep-equal</code>
+ </a> function. Such a
function is said to be <b>non-deterministic with respect to node
identity</b>.</p>
-</li>
-<li>
-<p>Some functions (such as <a href=
-"#func-doc"><code>fn:doc</code></a> and <a href=
-"#func-collection"><code>fn:collection</code></a>) create new nodes
+ </li>
+ <li>
+ <p>Some functions (such as <a href="#func-doc">
+ <code>fn:doc</code>
+ </a> and <a href="#func-collection">
+ <code>fn:collection</code>
+ </a>) create new nodes
by reading external documents. Such functions are guaranteed to be
-<a title="deterministic" class="termref" href=
-"#dt-deterministic"><span class=
-"arrow">·</span>deterministic<span class="arrow">·</span></a> with
+<a title="deterministic" class="termref" href="#dt-deterministic">
+ <span class="arrow">·</span>deterministic<span class="arrow">·</span>
+ </a> with
the exception that an implementation is allowed to make them
non-deterministic as a user option.</p>
-</li>
-</ul>
-<p>Where the results of a function are described as being (to a
-greater or lesser extent) <a title="implementation-defined" class=
-"termref" href="#implementation-defined"><span class=
-"arrow">·</span>implementation-defined<span class=
-"arrow">·</span></a> or <a title="implementation dependent" class=
-"termref" href="#implementation-dependent"><span class=
-"arrow">·</span>implementation-dependent<span class=
-"arrow">·</span></a>, this does not by itself remove the
+ </li>
+ </ul>
+ <p>Where the results of a function are described as being (to a
+greater or lesser extent) <a title="implementation-defined" class="termref" href="#implementation-defined">
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ </a> or <a title="implementation dependent" class="termref" href="#implementation-dependent">
+ <span class="arrow">·</span>implementation-dependent<span class="arrow">·</span>
+ </a>, this does not by itself remove the
requirement that the results should be deterministic: that is, that
repeated calls with the same explicit and implicit arguments
<strong>must</strong> return identical results.</p>
-</div>
-</div>
-</div>
-<div class="div1">
-<h2><a name="accessors" id="accessors"></a>2 Accessors</h2>
-<p>Accessors and their semantics are described in <a href=
-"#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>.
+ </div>
+ </div>
+ </div>
+ <div class="div1">
+ <h2>
+ <a name="accessors" id="accessors"/>2 Accessors</h2>
+ <p>Accessors and their semantics are described in <a href="#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>.
Some of these accessors are exposed to the user through the
functions described below.</p>
-<table summary="Function summary" border="1" width="80%">
-<col width="25%" span="1" />
-<col width="25%" span="1" />
-<col width="25%" span="1" />
-<col width="25%" span="1" />
-<thead>
-<tr>
-<th colspan="1">Function</th>
-<th colspan="1">Accessor</th>
-<th colspan="1">Accepts</th>
-<th colspan="1">Returns</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td><a href="#func-node-name"><code>fn:node-name</code></a></td>
-<td><code>node-name</code></td>
-<td>an optional node</td>
-<td>zero or one <code>xs:QName</code></td>
-</tr>
-<tr>
-<td><a href="#func-nilled"><code>fn:nilled</code></a></td>
-<td><code>nilled</code></td>
-<td>a node</td>
-<td>an optional <code>xs:boolean</code></td>
-</tr>
-<tr>
-<td><a href="#func-string"><code>fn:string</code></a></td>
-<td><code>string-value</code></td>
-<td>an optional item or no argument</td>
-<td><code>xs:string</code></td>
-</tr>
-<tr>
-<td><a href="#func-data"><code>fn:data</code></a></td>
-<td><code>typed-value</code></td>
-<td>zero or more items</td>
-<td>a sequence of atomic values</td>
-</tr>
-<tr>
-<td><a href="#func-base-uri"><code>fn:base-uri</code></a></td>
-<td><code>base-uri</code></td>
-<td>an optional node or no argument</td>
-<td>zero or one <code>xs:anyURI</code></td>
-</tr>
-<tr>
-<td><a href=
-"#func-document-uri"><code>fn:document-uri</code></a></td>
-<td><code>document-uri</code></td>
-<td>an optional node</td>
-<td>zero or one <code>xs:anyURI</code></td>
-</tr>
-</tbody>
-</table>
-<div class="div2">
-<h3><a name="func-node-name" id="func-node-name"></a>2.1
+ <table summary="Function summary" border="1" width="80%">
+ <col width="25%" span="1"/>
+ <col width="25%" span="1"/>
+ <col width="25%" span="1"/>
+ <col width="25%" span="1"/>
+ <thead>
+ <tr>
+ <th colspan="1">Function</th>
+ <th colspan="1">Accessor</th>
+ <th colspan="1">Accepts</th>
+ <th colspan="1">Returns</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <a href="#func-node-name">
+ <code>fn:node-name</code>
+ </a>
+ </td>
+ <td>
+ <code>node-name</code>
+ </td>
+ <td>an optional node</td>
+ <td>zero or one <code>xs:QName</code>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="#func-nilled">
+ <code>fn:nilled</code>
+ </a>
+ </td>
+ <td>
+ <code>nilled</code>
+ </td>
+ <td>a node</td>
+ <td>an optional <code>xs:boolean</code>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="#func-string">
+ <code>fn:string</code>
+ </a>
+ </td>
+ <td>
+ <code>string-value</code>
+ </td>
+ <td>an optional item or no argument</td>
+ <td>
+ <code>xs:string</code>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="#func-data">
+ <code>fn:data</code>
+ </a>
+ </td>
+ <td>
+ <code>typed-value</code>
+ </td>
+ <td>zero or more items</td>
+ <td>a sequence of atomic values</td>
+ </tr>
+ <tr>
+ <td>
+ <a href="#func-base-uri">
+ <code>fn:base-uri</code>
+ </a>
+ </td>
+ <td>
+ <code>base-uri</code>
+ </td>
+ <td>an optional node or no argument</td>
+ <td>zero or one <code>xs:anyURI</code>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="#func-document-uri">
+ <code>fn:document-uri</code>
+ </a>
+ </td>
+ <td>
+ <code>document-uri</code>
+ </td>
+ <td>an optional node</td>
+ <td>zero or one <code>xs:anyURI</code>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <div class="div2">
+ <h3>
+ <a name="func-node-name" id="func-node-name"/>2.1
fn:node-name</h3>
-<dl>
-<dt class="label">Summary</dt>
-<dd>
-<p>Returns the name of a node, as an <code>xs:QName</code>.</p>
-</dd>
-<dt class="label">Signatures</dt>
-<dd>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:node-name</code>()<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">xs:QName?</code></div>
-</div>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:node-name</code>(<code class=
-"arg">$arg</code><code class="as">&#160;as&#160;</code><code class=
-"type">node()?</code>)<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">xs:QName?</code></div>
-</div>
-</dd>
-<dt class="label">Properties</dt>
-<dd>
-<p>The zero-argument form of this function is <a title=
-"deterministic" class="termref" href=
-"#dt-deterministic"><span class=
-"arrow">·</span>deterministic<span class="arrow">·</span></a>,
-<a title="context-dependent" class="termref" href=
-"#dt-context-dependent"><span class=
-"arrow">·</span>context-dependent<span class="arrow">·</span></a>,
-and <a title="focus-dependent" class="termref" href=
-"#dt-focus-dependent"><span class=
-"arrow">·</span>focus-dependent<span class=
-"arrow">·</span></a>.</p>
-<p>The one-argument form of this function is <a title=
-"deterministic" class="termref" href=
-"#dt-deterministic"><span class=
-"arrow">·</span>deterministic<span class="arrow">·</span></a>,
-<a title="context-independent" class="termref" href=
-"#dt-context-independent"><span class=
-"arrow">·</span>context-independent<span class=
-"arrow">·</span></a>, and <a title="focus-dependent" class=
-"termref" href="#dt-focus-independent"><span class=
-"arrow">·</span>focus-independent<span class=
-"arrow">·</span></a>.</p>
-</dd>
-<dt class="label">Rules</dt>
-<dd>
-<p>If the argument is omitted, it defaults to the context item
+ <dl>
+ <dt class="label">Summary</dt>
+ <dd>
+ <p>Returns the name of a node, as an <code>xs:QName</code>.</p>
+ </dd>
+ <dt class="label">Signatures</dt>
+ <dd>
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:node-name</code>()<code class="as"> as </code>
+ <code class="return-type">xs:QName?</code>
+ </div>
+ </div>
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:node-name</code>(<code class="arg">$arg</code>
+ <code class="as"> as </code>
+ <code class="type">node()?</code>)<code class="as"> as </code>
+ <code class="return-type">xs:QName?</code>
+ </div>
+ </div>
+ </dd>
+ <dt class="label">Properties</dt>
+ <dd>
+ <p>The zero-argument form of this function is <a title="deterministic" class="termref" href="#dt-deterministic">
+ <span class="arrow">·</span>deterministic<span class="arrow">·</span>
+ </a>,
+<a title="context-dependent" class="termref" href="#dt-context-dependent">
+ <span class="arrow">·</span>context-dependent<span class="arrow">·</span>
+ </a>,
+and <a title="focus-dependent" class="termref" href="#dt-focus-dependent">
+ <span class="arrow">·</span>focus-dependent<span class="arrow">·</span>
+ </a>.</p>
+ <p>The one-argument form of this function is <a title="deterministic" class="termref" href="#dt-deterministic">
+ <span class="arrow">·</span>deterministic<span class="arrow">·</span>
+ </a>,
+<a title="context-independent" class="termref" href="#dt-context-independent">
+ <span class="arrow">·</span>context-independent<span class="arrow">·</span>
+ </a>, and <a title="focus-dependent" class="termref" href="#dt-focus-independent">
+ <span class="arrow">·</span>focus-independent<span class="arrow">·</span>
+ </a>.</p>
+ </dd>
+ <dt class="label">Rules</dt>
+ <dd>
+ <p>If the argument is omitted, it defaults to the context item
(<code>.</code>). The behavior of the function if the argument is
omitted is exactly the same as if the context item had been passed
as the argument.</p>
-<p>If <code>$arg</code> is the empty sequence, the empty sequence
+ <p>If <code>$arg</code> is the empty sequence, the empty sequence
is returned.</p>
-<p>Otherwise, the function returns the result of the
-<code>dm:node-name</code> accessor as defined in <a href=
-"#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>
-(see <a href=
-"http://www.w3.org/TR/xpath-datamodel-30/#dm-node-name">Section
-5.11 node-name Accessor</a> <sup><small>DM30</small></sup>).</p>
-</dd>
-<dt class="label">Error Conditions</dt>
-<dd>
-<p>The following errors may be raised when <code>$arg</code> is
-omitted: if the context item is <a href=
-"http://www.w3.org/TR/xpath-datamodel-30/#dt-absent">absent</a><sup><small>DM30</small></sup>
-[<a href="http://www.w3.org/TR/xpath20/#ERRXPDY0002" title=
-"err:XPDY0002">err:XPDY0002</a>]<sup><small>XP</small></sup>; if
-the context item is not a node [<a href=
-"http://www.w3.org/TR/xpath20/#ERRXPTY0004" title=
-"err:XPTY0004">err:XPTY0004</a>]<sup><small>XP</small></sup>.</p>
-</dd>
-<dt class="label">Notes</dt>
-<dd>
-<p>For element and attribute nodes, the name of the node is
+ <p>Otherwise, the function returns the result of the
+<code>dm:node-name</code> accessor as defined in <a href="#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>
+(see <a href="http://www.w3.org/TR/xpath-datamodel-30/#dm-node-name">Section
+5.11 node-name Accessor</a>
+ <sup>
+ <small>DM30</small>
+ </sup>).</p>
+ </dd>
+ <dt class="label">Error Conditions</dt>
+ <dd>
+ <p>The following errors may be raised when <code>$arg</code> is
+omitted: if the context item is <a href="http://www.w3.org/TR/xpath-datamodel-30/#dt-absent">absent</a>
+ <sup>
+ <small>DM30</small>
+ </sup>
+[<a href="http://www.w3.org/TR/xpath20/#ERRXPDY0002" title="err:XPDY0002">err:XPDY0002</a>]<sup>
+ <small>XP</small>
+ </sup>; if
+the context item is not a node [<a href="http://www.w3.org/TR/xpath20/#ERRXPTY0004" title="err:XPTY0004">err:XPTY0004</a>]<sup>
+ <small>XP</small>
+ </sup>.</p>
+ </dd>
+ <dt class="label">Notes</dt>
+ <dd>
+ <p>For element and attribute nodes, the name of the node is
returned as an <code>xs:QName</code>, retaining the prefix,
namespace URI, and local part.</p>
-<p>For processing instructions, the name of the node is returned as
+ <p>For processing instructions, the name of the node is returned as
an <code>xs:QName</code> in which the prefix and namespace URI are
-<a href=
-"http://www.w3.org/TR/xpath-datamodel-30/#dt-absent">absent</a><sup><small>DM30</small></sup>.</p>
-<p>For a namespace node, the function returns an empty sequence if
+<a href="http://www.w3.org/TR/xpath-datamodel-30/#dt-absent">absent</a>
+ <sup>
+ <small>DM30</small>
+ </sup>.</p>
+ <p>For a namespace node, the function returns an empty sequence if
the node represents the default namespace; otherwise it returns an
<code>xs:QName</code> in which prefix and namespace URI are
-<a href="http://www.w3.org/TR/xpath-datamodel-30/#dt-absent">absent</a><sup><small>DM30</small></sup>
+<a href="http://www.w3.org/TR/xpath-datamodel-30/#dt-absent">absent</a>
+ <sup>
+ <small>DM30</small>
+ </sup>
and the local part is the namespace prefix being bound).</p>
-<p>For all other kinds of node, the function returns the empty
+ <p>For all other kinds of node, the function returns the empty
sequence.</p>
-</dd>
-</dl>
-</div>
-<div class="div2">
-<h3><a name="func-nilled" id="func-nilled"></a>2.2 fn:nilled</h3>
-<dl>
-<dt class="label">Summary</dt>
-<dd>
-<p>Returns true for an element that is <b>nilled</b>.</p>
-</dd>
-<dt class="label">Signatures</dt>
-<dd>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:nilled</code>()<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">xs:boolean</code></div>
-</div>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:nilled</code>(<code class=
-"arg">$arg</code><code class="as">&#160;as&#160;</code><code class=
-"type">node()?</code>)<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">xs:boolean?</code></div>
-</div>
-</dd>
-<dt class="label">Properties</dt>
-<dd>
-<p>The zero-argument form of this function is <a title=
-"deterministic" class="termref" href=
-"#dt-deterministic"><span class=
-"arrow">·</span>deterministic<span class="arrow">·</span></a>,
-<a title="context-dependent" class="termref" href=
-"#dt-context-dependent"><span class=
-"arrow">·</span>context-dependent<span class="arrow">·</span></a>,
-and <a title="focus-dependent" class="termref" href=
-"#dt-focus-dependent"><span class=
-"arrow">·</span>focus-dependent<span class=
-"arrow">·</span></a>.</p>
-<p>The one-argument form of this function is <a title=
-"deterministic" class="termref" href=
-"#dt-deterministic"><span class=
-"arrow">·</span>deterministic<span class="arrow">·</span></a>,
-<a title="context-independent" class="termref" href=
-"#dt-context-independent"><span class=
-"arrow">·</span>context-independent<span class=
-"arrow">·</span></a>, and <a title="focus-dependent" class=
-"termref" href="#dt-focus-independent"><span class=
-"arrow">·</span>focus-independent<span class=
-"arrow">·</span></a>.</p>
-</dd>
-<dt class="label">Rules</dt>
-<dd>
-<p>If the argument is omitted, it defaults to the context item
+ </dd>
+ </dl>
+ </div>
+ <div class="div2">
+ <h3>
+ <a name="func-nilled" id="func-nilled"/>2.2 fn:nilled</h3>
+ <dl>
+ <dt class="label">Summary</dt>
+ <dd>
+ <p>Returns true for an element that is <b>nilled</b>.</p>
+ </dd>
+ <dt class="label">Signatures</dt>
+ <dd>
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:nilled</code>()<code class="as"> as </code>
+ <code class="return-type">xs:boolean</code>
+ </div>
+ </div>
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:nilled</code>(<code class="arg">$arg</code>
+ <code class="as"> as </code>
+ <code class="type">node()?</code>)<code class="as"> as </code>
+ <code class="return-type">xs:boolean?</code>
+ </div>
+ </div>
+ </dd>
+ <dt class="label">Properties</dt>
+ <dd>
+ <p>The zero-argument form of this function is <a title="deterministic" class="termref" href="#dt-deterministic">
+ <span class="arrow">·</span>deterministic<span class="arrow">·</span>
+ </a>,
+<a title="context-dependent" class="termref" href="#dt-context-dependent">
+ <span class="arrow">·</span>context-dependent<span class="arrow">·</span>
+ </a>,
+and <a title="focus-dependent" class="termref" href="#dt-focus-dependent">
+ <span class="arrow">·</span>focus-dependent<span class="arrow">·</span>
+ </a>.</p>
+ <p>The one-argument form of this function is <a title="deterministic" class="termref" href="#dt-deterministic">
+ <span class="arrow">·</span>deterministic<span class="arrow">·</span>
+ </a>,
+<a title="context-independent" class="termref" href="#dt-context-independent">
+ <span class="arrow">·</span>context-independent<span class="arrow">·</span>
+ </a>, and <a title="focus-dependent" class="termref" href="#dt-focus-independent">
+ <span class="arrow">·</span>focus-independent<span class="arrow">·</span>
+ </a>.</p>
+ </dd>
+ <dt class="label">Rules</dt>
+ <dd>
+ <p>If the argument is omitted, it defaults to the context item
(<code>.</code>). The behavior of the function if the argument is
omitted is exactly the same as if the context item had been passed
as the argument.</p>
-<p>If <code>$arg</code> is the empty sequence, the function returns
+ <p>If <code>$arg</code> is the empty sequence, the function returns
the empty sequence.</p>
-<p>Otherwise the function returns the result of the
-<code>dm:nilled</code> accessor as defined in <a href=
-"#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>
-(see <a href=
-"http://www.w3.org/TR/xpath-datamodel-30/#dm-nilled">Section 5.9
-nilled Accessor</a> <sup><small>DM30</small></sup>).</p>
-</dd>
-<dt class="label">Error Conditions</dt>
-<dd>
-<p>The following errors may be raised when <code>$arg</code> is
-omitted: if the context item is <a href=
-"http://www.w3.org/TR/xpath-datamodel-30/#dt-absent">absent</a><sup><small>DM30</small></sup>
-[<a href="http://www.w3.org/TR/xpath20/#ERRXPDY0002" title=
-"err:XPDY0002">err:XPDY0002</a>]<sup><small>XP</small></sup>; if
-the context item is not a node [<a href=
-"http://www.w3.org/TR/xpath20/#ERRXPTY0004" title=
-"err:XPTY0004">err:XPTY0004</a>]<sup><small>XP</small></sup>.</p>
-</dd>
-<dt class="label">Notes</dt>
-<dd>
-<p>If <code>$arg</code> is not an element node, the function
+ <p>Otherwise the function returns the result of the
+<code>dm:nilled</code> accessor as defined in <a href="#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>
+(see <a href="http://www.w3.org/TR/xpath-datamodel-30/#dm-nilled">Section 5.9
+nilled Accessor</a>
+ <sup>
+ <small>DM30</small>
+ </sup>).</p>
+ </dd>
+ <dt class="label">Error Conditions</dt>
+ <dd>
+ <p>The following errors may be raised when <code>$arg</code> is
+omitted: if the context item is <a href="http://www.w3.org/TR/xpath-datamodel-30/#dt-absent">absent</a>
+ <sup>
+ <small>DM30</small>
+ </sup>
+[<a href="http://www.w3.org/TR/xpath20/#ERRXPDY0002" title="err:XPDY0002">err:XPDY0002</a>]<sup>
+ <small>XP</small>
+ </sup>; if
+the context item is not a node [<a href="http://www.w3.org/TR/xpath20/#ERRXPTY0004" title="err:XPTY0004">err:XPTY0004</a>]<sup>
+ <small>XP</small>
+ </sup>.</p>
+ </dd>
+ <dt class="label">Notes</dt>
+ <dd>
+ <p>If <code>$arg</code> is not an element node, the function
returns the empty sequence.</p>
-<p>If <code>$arg</code> is an untyped element node, the function
+ <p>If <code>$arg</code> is an untyped element node, the function
returns false.</p>
-<p>In practice, the function returns <code>true</code> only for an
+ <p>In practice, the function returns <code>true</code> only for an
element node that has the attribute <code>xsi:nil="true"</code> and
that is successfully validated against a schema that defines the
element to be nillable; the detailed rules, however, are defined in
<a href="#xpath-datamodel-30">[XQuery and XPath Data Model (XDM)
3.0]</a>.</p>
-</dd>
-</dl>
-</div>
-<div class="div2">
-<h3><a name="func-string" id="func-string"></a>2.3 fn:string</h3>
-<dl>
-<dt class="label">Summary</dt>
-<dd>
-<p>Returns the value of <code>$arg</code> represented as an
+ </dd>
+ </dl>
+ </div>
+ <div class="div2">
+ <h3>
+ <a name="func-string" id="func-string"/>2.3 fn:string</h3>
+ <dl>
+ <dt class="label">Summary</dt>
+ <dd>
+ <p>Returns the value of <code>$arg</code> represented as an
<code>xs:string</code>.</p>
-</dd>
-<dt class="label">Signatures</dt>
-<dd>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:string</code>()<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">xs:string</code></div>
-</div>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:string</code>(<code class=
-"arg">$arg</code><code class="as">&#160;as&#160;</code><code class=
-"type">item()?</code>)<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">xs:string</code></div>
-</div>
-</dd>
-<dt class="label">Properties</dt>
-<dd>
-<p>The zero-argument form of this function is <a title=
-"deterministic" class="termref" href=
-"#dt-deterministic"><span class=
-"arrow">·</span>deterministic<span class="arrow">·</span></a>,
-<a title="context-dependent" class="termref" href=
-"#dt-context-dependent"><span class=
-"arrow">·</span>context-dependent<span class="arrow">·</span></a>,
-and <a title="focus-dependent" class="termref" href=
-"#dt-focus-dependent"><span class=
-"arrow">·</span>focus-dependent<span class=
-"arrow">·</span></a>.</p>
-<p>The one-argument form of this function is <a title=
-"deterministic" class="termref" href=
-"#dt-deterministic"><span class=
-"arrow">·</span>deterministic<span class="arrow">·</span></a>,
-<a title="context-independent" class="termref" href=
-"#dt-context-independent"><span class=
-"arrow">·</span>context-independent<span class=
-"arrow">·</span></a>, and <a title="focus-dependent" class=
-"termref" href="#dt-focus-independent"><span class=
-"arrow">·</span>focus-independent<span class=
-"arrow">·</span></a>.</p>
-</dd>
-<dt class="label">Rules</dt>
-<dd>
-<p>In the zero-argument version of the function, <code>$arg</code>
+ </dd>
+ <dt class="label">Signatures</dt>
+ <dd>
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:string</code>()<code class="as"> as </code>
+ <code class="return-type">xs:string</code>
+ </div>
+ </div>
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:string</code>(<code class="arg">$arg</code>
+ <code class="as"> as </code>
+ <code class="type">item()?</code>)<code class="as"> as </code>
+ <code class="return-type">xs:string</code>
+ </div>
+ </div>
+ </dd>
+ <dt class="label">Properties</dt>
+ <dd>
+ <p>The zero-argument form of this function is <a title="deterministic" class="termref" href="#dt-deterministic">
+ <span class="arrow">·</span>deterministic<span class="arrow">·</span>
+ </a>,
+<a title="context-dependent" class="termref" href="#dt-context-dependent">
+ <span class="arrow">·</span>context-dependent<span class="arrow">·</span>
+ </a>,
+and <a title="focus-dependent" class="termref" href="#dt-focus-dependent">
+ <span class="arrow">·</span>focus-dependent<span class="arrow">·</span>
+ </a>.</p>
+ <p>The one-argument form of this function is <a title="deterministic" class="termref" href="#dt-deterministic">
+ <span class="arrow">·</span>deterministic<span class="arrow">·</span>
+ </a>,
+<a title="context-independent" class="termref" href="#dt-context-independent">
+ <span class="arrow">·</span>context-independent<span class="arrow">·</span>
+ </a>, and <a title="focus-dependent" class="termref" href="#dt-focus-independent">
+ <span class="arrow">·</span>focus-independent<span class="arrow">·</span>
+ </a>.</p>
+ </dd>
+ <dt class="label">Rules</dt>
+ <dd>
+ <p>In the zero-argument version of the function, <code>$arg</code>
defaults to the context item. That is, calling
<code>fn:string()</code> is equivalent to calling
<code>fn:string(.)</code>.</p>
-<p>If <code>$arg</code> is the empty sequence, the function returns
+ <p>If <code>$arg</code> is the empty sequence, the function returns
the zero-length string.</p>
-<p>If <code>$arg</code> is a node, the function returns the
+ <p>If <code>$arg</code> is a node, the function returns the
string-value of the node, as obtained using the
-<code>dm:string-value</code> accessor defined in <a href=
-"#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>
-(see <a href=
-"http://www.w3.org/TR/xpath-datamodel-30/#dm-string-value">Section
-5.13 string-value Accessor</a> <sup><small>DM30</small></sup>).</p>
-<p>If <code>$arg</code> is an atomic value, the function returns
+<code>dm:string-value</code> accessor defined in <a href="#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>
+(see <a href="http://www.w3.org/TR/xpath-datamodel-30/#dm-string-value">Section
+5.13 string-value Accessor</a>
+ <sup>
+ <small>DM30</small>
+ </sup>).</p>
+ <p>If <code>$arg</code> is an atomic value, the function returns
the result of the expression <code>$arg cast as xs:string</code>
-(see <a href="#casting"><b>18 Casting</b></a>).</p>
-</dd>
-<dt class="label">Error Conditions</dt>
-<dd>
-<p>An error is raised [<a href=
-"http://www.w3.org/TR/xpath20/#ERRXPDY0002" title=
-"err:XPDY0002">err:XPDY0002</a>]<sup><small>XP</small></sup> by the
+(see <a href="#casting">
+ <b>18 Casting</b>
+ </a>).</p>
+ </dd>
+ <dt class="label">Error Conditions</dt>
+ <dd>
+ <p>An error is raised [<a href="http://www.w3.org/TR/xpath20/#ERRXPDY0002" title="err:XPDY0002">err:XPDY0002</a>]<sup>
+ <small>XP</small>
+ </sup> by the
zero-argument version of the function if the context item is
-<a href=
-"http://www.w3.org/TR/xpath-datamodel-30/#dt-absent">absent</a><sup><small>DM30</small></sup>.</p>
-<p>An error is raised [<a href="#ERRFOTY0014" title=
-"err:FOTY0014">err:FOTY0014</a>] if <code>$arg</code> is a function
+<a href="http://www.w3.org/TR/xpath-datamodel-30/#dt-absent">absent</a>
+ <sup>
+ <small>DM30</small>
+ </sup>.</p>
+ <p>An error is raised [<a href="#ERRFOTY0014" title="err:FOTY0014">err:FOTY0014</a>] if <code>$arg</code> is a function
item.</p>
-</dd>
-<dt class="label">Examples</dt>
-<dd>
-<p>The expression <code>string(23)</code> returns
+ </dd>
+ <dt class="label">Examples</dt>
+ <dd>
+ <p>The expression <code>string(23)</code> returns
<code>"23"</code>.</p>
-<p>The expression <code>string(false())</code> returns
+ <p>The expression <code>string(false())</code> returns
<code>"false"</code>.</p>
-<p>The expression <code>string("Paris")</code> returns
+ <p>The expression <code>string("Paris")</code> returns
<code>"Paris"</code>.</p>
-<p>The expression <code>string(abs#1)</code> raises error
+ <p>The expression <code>string(abs#1)</code> raises error
<code>FOTY0014</code>.</p>
-<p>let <code>$para</code> :=</p>
-<div class="exampleInner">
-<pre>
-&lt;para&gt;In a hole in the ground there lived a &lt;term author="Tolkein"&gt;hobbit&lt;/term&gt;.&lt;/para&gt;
+ <p>let <code>$para</code> :=</p>
+ <div class="exampleInner">
+ <pre>
+<para>In a hole in the ground there lived a <term author="Tolkein">hobbit</term>.</para>
-</pre></div>
-<p>The expression <code>string($para)</code> returns <code>"In a
+</pre>
+ </div>
+ <p>The expression <code>string($para)</code> returns <code>"In a
hole in the ground there lived a hobbit."</code>.</p>
-</dd>
-</dl>
-</div>
-<div class="div2">
-<h3><a name="func-data" id="func-data"></a>2.4 fn:data</h3>
-<dl>
-<dt class="label">Summary</dt>
-<dd>
-<p>Returns the result of atomizing a sequence, that is, replacing
+ </dd>
+ </dl>
+ </div>
+ <div class="div2">
+ <h3>
+ <a name="func-data" id="func-data"/>2.4 fn:data</h3>
+ <dl>
+ <dt class="label">Summary</dt>
+ <dd>
+ <p>Returns the result of atomizing a sequence, that is, replacing
all nodes in the sequence by their typed values.</p>
-</dd>
-<dt class="label">Signatures</dt>
-<dd>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:data</code>()<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">xs:anyAtomicType*</code></div>
-</div>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:data</code>(<code class="arg">$arg</code><code class=
-"as">&#160;as&#160;</code><code class=
-"type">item()*</code>)<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">xs:anyAtomicType*</code></div>
-</div>
-</dd>
-<dt class="label">Properties</dt>
-<dd>
-<p>The zero-argument form of this function is <a title=
-"deterministic" class="termref" href=
-"#dt-deterministic"><span class=
-"arrow">·</span>deterministic<span class="arrow">·</span></a>,
-<a title="context-dependent" class="termref" href=
-"#dt-context-dependent"><span class=
-"arrow">·</span>context-dependent<span class="arrow">·</span></a>,
-and <a title="focus-dependent" class="termref" href=
-"#dt-focus-dependent"><span class=
-"arrow">·</span>focus-dependent<span class=
-"arrow">·</span></a>.</p>
-<p>The one-argument form of this function is <a title=
-"deterministic" class="termref" href=
-"#dt-deterministic"><span class=
-"arrow">·</span>deterministic<span class="arrow">·</span></a>,
-<a title="context-independent" class="termref" href=
-"#dt-context-independent"><span class=
-"arrow">·</span>context-independent<span class=
-"arrow">·</span></a>, and <a title="focus-dependent" class=
-"termref" href="#dt-focus-independent"><span class=
-"arrow">·</span>focus-independent<span class=
-"arrow">·</span></a>.</p>
-</dd>
-<dt class="label">Rules</dt>
-<dd>
-<p>If the argument is omitted, it defaults to the context item
+ </dd>
+ <dt class="label">Signatures</dt>
+ <dd>
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:data</code>()<code class="as"> as </code>
+ <code class="return-type">xs:anyAtomicType*</code>
+ </div>
+ </div>
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:data</code>(<code class="arg">$arg</code>
+ <code class="as"> as </code>
+ <code class="type">item()*</code>)<code class="as"> as </code>
+ <code class="return-type">xs:anyAtomicType*</code>
+ </div>
+ </div>
+ </dd>
+ <dt class="label">Properties</dt>
+ <dd>
+ <p>The zero-argument form of this function is <a title="deterministic" class="termref" href="#dt-deterministic">
+ <span class="arrow">·</span>deterministic<span class="arrow">·</span>
+ </a>,
+<a title="context-dependent" class="termref" href="#dt-context-dependent">
+ <span class="arrow">·</span>context-dependent<span class="arrow">·</span>
+ </a>,
+and <a title="focus-dependent" class="termref" href="#dt-focus-dependent">
+ <span class="arrow">·</span>focus-dependent<span class="arrow">·</span>
+ </a>.</p>
+ <p>The one-argument form of this function is <a title="deterministic" class="termref" href="#dt-deterministic">
+ <span class="arrow">·</span>deterministic<span class="arrow">·</span>
+ </a>,
+<a title="context-independent" class="termref" href="#dt-context-independent">
+ <span class="arrow">·</span>context-independent<span class="arrow">·</span>
+ </a>, and <a title="focus-dependent" class="termref" href="#dt-focus-independent">
+ <span class="arrow">·</span>focus-independent<span class="arrow">·</span>
+ </a>.</p>
+ </dd>
+ <dt class="label">Rules</dt>
+ <dd>
+ <p>If the argument is omitted, it defaults to the context item
(<code>.</code>). The behavior of the function if the argument is
omitted is exactly the same as if the context item had been passed
as the argument.</p>
-<p>The result of <code>fn:data</code> is the sequence of atomic
+ <p>The result of <code>fn:data</code> is the sequence of atomic
values produced by applying the following rules to each item in
<code>$arg</code>:</p>
-<ul>
-<li>
-<p>If the item is an atomic value, it is appended to the result
+ <ul>
+ <li>
+ <p>If the item is an atomic value, it is appended to the result
sequence.</p>
-</li>
-<li>
-<p>If the item is a node, the typed value of the node is appended
+ </li>
+ <li>
+ <p>If the item is a node, the typed value of the node is appended
to the result sequence. The typed value is a sequence of zero or
more atomic values: specifically, the result of the
-<code>dm:typed-value</code> accessor as defined in <a href=
-"#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>
-(See <a href=
-"http://www.w3.org/TR/xpath-datamodel-30/#dm-typed-value">Section
-5.15 typed-value Accessor</a> <sup><small>DM30</small></sup>).</p>
-</li>
-</ul>
-</dd>
-<dt class="label">Error Conditions</dt>
-<dd>
-<p>An error is raised [<a href="#ERRFOTY0012" title=
-"err:FOTY0012">err:FOTY0012</a>] if an item in the sequence
+<code>dm:typed-value</code> accessor as defined in <a href="#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>
+(See <a href="http://www.w3.org/TR/xpath-datamodel-30/#dm-typed-value">Section
+5.15 typed-value Accessor</a>
+ <sup>
+ <small>DM30</small>
+ </sup>).</p>
+ </li>
+ </ul>
+ </dd>
+ <dt class="label">Error Conditions</dt>
+ <dd>
+ <p>An error is raised [<a href="#ERRFOTY0012" title="err:FOTY0012">err:FOTY0012</a>] if an item in the sequence
<code>$arg</code> is a node that does not have a typed value.</p>
-<p>An error is raised [<a href="#ERRFOTY0013" title=
-"err:FOTY0013">err:FOTY0013</a>] if an item in the sequence
+ <p>An error is raised [<a href="#ERRFOTY0013" title="err:FOTY0013">err:FOTY0013</a>] if an item in the sequence
<code>$arg</code> is a function item.</p>
-<p>The following errors may be raised when <code>$arg</code> is
-omitted: if the context item is <a href=
-"http://www.w3.org/TR/xpath-datamodel-30/#dt-absent">absent</a><sup><small>DM30</small></sup>
-[<a href="http://www.w3.org/TR/xpath20/#ERRXPDY0002" title=
-"err:XPDY0002">err:XPDY0002</a>]<sup><small>XP</small></sup>; if
-the context item is not a node [<a href=
-"http://www.w3.org/TR/xpath20/#ERRXPTY0004" title=
-"err:XPTY0004">err:XPTY0004</a>]<sup><small>XP</small></sup>.</p>
-</dd>
-<dt class="label">Notes</dt>
-<dd>
-<p>The process of applying the <code>fn:data</code> function to a
+ <p>The following errors may be raised when <code>$arg</code> is
+omitted: if the context item is <a href="http://www.w3.org/TR/xpath-datamodel-30/#dt-absent">absent</a>
+ <sup>
+ <small>DM30</small>
+ </sup>
+[<a href="http://www.w3.org/TR/xpath20/#ERRXPDY0002" title="err:XPDY0002">err:XPDY0002</a>]<sup>
+ <small>XP</small>
+ </sup>; if
+the context item is not a node [<a href="http://www.w3.org/TR/xpath20/#ERRXPTY0004" title="err:XPTY0004">err:XPTY0004</a>]<sup>
+ <small>XP</small>
+ </sup>.</p>
+ </dd>
+ <dt class="label">Notes</dt>
+ <dd>
+ <p>The process of applying the <code>fn:data</code> function to a
sequence is referred to as <code>atomization</code>. In many cases
an explicit call on <code>fn:data</code> is not required, because
atomization is invoked implicitly when a node or sequence of nodes
is supplied in a context where an atomic value or sequence of
atomic values is required.</p>
-</dd>
-<dt class="label">Examples</dt>
-<dd>
-<p>The expression <code>data(123)</code> returns
+ </dd>
+ <dt class="label">Examples</dt>
+ <dd>
+ <p>The expression <code>data(123)</code> returns
<code>123</code>.</p>
-<p>let <code>$para</code> :=</p>
-<div class="exampleInner">
-<pre>
-&lt;para&gt;In a hole in the ground there lived a &lt;term author="Tolkein"&gt;hobbit&lt;/term&gt;.&lt;/para&gt;
+ <p>let <code>$para</code> :=</p>
+ <div class="exampleInner">
+ <pre>
+<para>In a hole in the ground there lived a <term author="Tolkein">hobbit</term>.</para>
-</pre></div>
-<p>The expression <code>data($para)</code> returns
+</pre>
+ </div>
+ <p>The expression <code>data($para)</code> returns
<code>xs:untypedAtomic("In a hole in the ground there lived a
hobbit.")</code>.</p>
-<p>The expression <code>data($para/term/@author)</code> returns
+ <p>The expression <code>data($para/term/@author)</code> returns
<code>xs:untypedAtomic("Tolkein")</code>.</p>
-<p>The expression <code>data(abs#1)</code> raises error
+ <p>The expression <code>data(abs#1)</code> raises error
<code>FOTY0013</code>.</p>
-</dd>
-</dl>
-</div>
-<div class="div2">
-<h3><a name="func-base-uri" id="func-base-uri"></a>2.5
+ </dd>
+ </dl>
+ </div>
+ <div class="div2">
+ <h3>
+ <a name="func-base-uri" id="func-base-uri"/>2.5
fn:base-uri</h3>
-<dl>
-<dt class="label">Summary</dt>
-<dd>
-<p>Returns the base URI of a node.</p>
-</dd>
-<dt class="label">Signatures</dt>
-<dd>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:base-uri</code>()<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">xs:anyURI?</code></div>
-</div>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:base-uri</code>(<code class=
-"arg">$arg</code><code class="as">&#160;as&#160;</code><code class=
-"type">node()?</code>)<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">xs:anyURI?</code></div>
-</div>
-</dd>
-<dt class="label">Properties</dt>
-<dd>
-<p>The zero-argument form of this function is <a title=
-"deterministic" class="termref" href=
-"#dt-deterministic"><span class=
-"arrow">·</span>deterministic<span class="arrow">·</span></a>,
-<a title="context-dependent" class="termref" href=
-"#dt-context-dependent"><span class=
-"arrow">·</span>context-dependent<span class="arrow">·</span></a>,
-and <a title="focus-dependent" class="termref" href=
-"#dt-focus-dependent"><span class=
-"arrow">·</span>focus-dependent<span class=
-"arrow">·</span></a>.</p>
-<p>The one-argument form of this function is <a title=
-"deterministic" class="termref" href=
-"#dt-deterministic"><span class=
-"arrow">·</span>deterministic<span class="arrow">·</span></a>,
-<a title="context-independent" class="termref" href=
-"#dt-context-independent"><span class=
-"arrow">·</span>context-independent<span class=
-"arrow">·</span></a>, and <a title="focus-dependent" class=
-"termref" href="#dt-focus-independent"><span class=
-"arrow">·</span>focus-independent<span class=
-"arrow">·</span></a>.</p>
-</dd>
-<dt class="label">Rules</dt>
-<dd>
-<p>The zero-argument version of the function returns the base URI
+ <dl>
+ <dt class="label">Summary</dt>
+ <dd>
+ <p>Returns the base URI of a node.</p>
+ </dd>
+ <dt class="label">Signatures</dt>
+ <dd>
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:base-uri</code>()<code class="as"> as </code>
+ <code class="return-type">xs:anyURI?</code>
+ </div>
+ </div>
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:base-uri</code>(<code class="arg">$arg</code>
+ <code class="as"> as </code>
+ <code class="type">node()?</code>)<code class="as"> as </code>
+ <code class="return-type">xs:anyURI?</code>
+ </div>
+ </div>
+ </dd>
+ <dt class="label">Properties</dt>
+ <dd>
+ <p>The zero-argument form of this function is <a title="deterministic" class="termref" href="#dt-deterministic">
+ <span class="arrow">·</span>deterministic<span class="arrow">·</span>
+ </a>,
+<a title="context-dependent" class="termref" href="#dt-context-dependent">
+ <span class="arrow">·</span>context-dependent<span class="arrow">·</span>
+ </a>,
+and <a title="focus-dependent" class="termref" href="#dt-focus-dependent">
+ <span class="arrow">·</span>focus-dependent<span class="arrow">·</span>
+ </a>.</p>
+ <p>The one-argument form of this function is <a title="deterministic" class="termref" href="#dt-deterministic">
+ <span class="arrow">·</span>deterministic<span class="arrow">·</span>
+ </a>,
+<a title="context-independent" class="termref" href="#dt-context-independent">
+ <span class="arrow">·</span>context-independent<span class="arrow">·</span>
+ </a>, and <a title="focus-dependent" class="termref" href="#dt-focus-independent">
+ <span class="arrow">·</span>focus-independent<span class="arrow">·</span>
+ </a>.</p>
+ </dd>
+ <dt class="label">Rules</dt>
+ <dd>
+ <p>The zero-argument version of the function returns the base URI
of the context node: it is equivalent to calling
<code>fn:base-uri(.)</code>. This may result in an error being
-raised: if the context item is <a href=
-"http://www.w3.org/TR/xpath-datamodel-30/#dt-absent">absent</a><sup><small>DM30</small></sup>
-[<a href="http://www.w3.org/TR/xpath20/#ERRXPDY0002" title=
-"err:XPDY0002">err:XPDY0002</a>]<sup><small>XP</small></sup>; if
-the context item is not a node [<a href=
-"http://www.w3.org/TR/xpath20/#ERRXPTY0004" title=
-"err:XPTY0004">err:XPTY0004</a>]<sup><small>XP</small></sup>.</p>
-<p>The single-argument version of the function behaves as
+raised: if the context item is <a href="http://www.w3.org/TR/xpath-datamodel-30/#dt-absent">absent</a>
+ <sup>
+ <small>DM30</small>
+ </sup>
+[<a href="http://www.w3.org/TR/xpath20/#ERRXPDY0002" title="err:XPDY0002">err:XPDY0002</a>]<sup>
+ <small>XP</small>
+ </sup>; if
+the context item is not a node [<a href="http://www.w3.org/TR/xpath20/#ERRXPTY0004" title="err:XPTY0004">err:XPTY0004</a>]<sup>
+ <small>XP</small>
+ </sup>.</p>
+ <p>The single-argument version of the function behaves as
follows:</p>
-<ol class="enumar">
-<li>If <code>$arg</code> is the empty sequence, the function
+ <ol class="enumar">
+ <li>If <code>$arg</code> is the empty sequence, the function
returns the empty sequence.</li>
-<li>Otherwise, the function returns the value of the
+ <li>Otherwise, the function returns the value of the
<code>dm:base-uri</code> accessor applied to the node
<code>$arg</code>. This accessor is defined, for each kind of node,
-in the XDM specification (See <a href=
-"http://www.w3.org/TR/xpath-datamodel-30/#dm-base-uri">Section 5.2
-base-uri Accessor</a> <sup><small>DM30</small></sup>).</li>
-</ol>
-<div class="note">
-<p class="prefix"><b>Note:</b></p>
+in the XDM specification (See <a href="http://www.w3.org/TR/xpath-datamodel-30/#dm-base-uri">Section 5.2
+base-uri Accessor</a>
+ <sup>
+ <small>DM30</small>
+ </sup>).</li>
+ </ol>
+ <div class="note">
+ <p class="prefix">
+ <b>Note:</b>
+ </p>
As explained in XDM, document, element and processing-instruction
nodes have a base-uri property which may be empty. The base-uri
property for all other node kinds is the empty sequence. The
@@ -3209,258 +3298,284 @@
is empty, the empty sequence is returned. In the case of namespace
nodes, however, the result is always an empty sequence -- it does
not depend on the base URI of the parent element.</div>
-<p>See also <a href=
-"#func-static-base-uri"><code>fn:static-base-uri</code></a>.</p>
-</dd>
-<dt class="label">Error Conditions</dt>
-<dd>
-<p>If <code>$arg</code> is not specified, the following errors may
-be raised: if the context item is <a href=
-"http://www.w3.org/TR/xpath-datamodel-30/#dt-absent">absent</a><sup><small>DM30</small></sup>
-[<a href="http://www.w3.org/TR/xpath20/#ERRXPDY0002" title=
-"err:XPDY0002">err:XPDY0002</a>]<sup><small>XP</small></sup>; if
-the context item is not a node [<a href=
-"http://www.w3.org/TR/xpath20/#ERRXPTY0004" title=
-"err:XPTY0004">err:XPTY0004</a>]<sup><small>XP</small></sup>.</p>
-</dd>
-</dl>
-</div>
-<div class="div2">
-<h3><a name="func-document-uri" id="func-document-uri"></a>2.6
+ <p>See also <a href="#func-static-base-uri">
+ <code>fn:static-base-uri</code>
+ </a>.</p>
+ </dd>
+ <dt class="label">Error Conditions</dt>
+ <dd>
+ <p>If <code>$arg</code> is not specified, the following errors may
+be raised: if the context item is <a href="http://www.w3.org/TR/xpath-datamodel-30/#dt-absent">absent</a>
+ <sup>
+ <small>DM30</small>
+ </sup>
+[<a href="http://www.w3.org/TR/xpath20/#ERRXPDY0002" title="err:XPDY0002">err:XPDY0002</a>]<sup>
+ <small>XP</small>
+ </sup>; if
+the context item is not a node [<a href="http://www.w3.org/TR/xpath20/#ERRXPTY0004" title="err:XPTY0004">err:XPTY0004</a>]<sup>
+ <small>XP</small>
+ </sup>.</p>
+ </dd>
+ </dl>
+ </div>
+ <div class="div2">
+ <h3>
+ <a name="func-document-uri" id="func-document-uri"/>2.6
fn:document-uri</h3>
-<dl>
-<dt class="label">Summary</dt>
-<dd>
-<p>Returns the URI of a resource where a document can be found, if
+ <dl>
+ <dt class="label">Summary</dt>
+ <dd>
+ <p>Returns the URI of a resource where a document can be found, if
available.</p>
-</dd>
-<dt class="label">Signatures</dt>
-<dd>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:document-uri</code>()<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">xs:anyURI?</code></div>
-</div>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:document-uri</code>(<code class=
-"arg">$arg</code><code class="as">&#160;as&#160;</code><code class=
-"type">node()?</code>)<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">xs:anyURI?</code></div>
-</div>
-</dd>
-<dt class="label">Properties</dt>
-<dd>
-<p>The zero-argument form of this function is <a title=
-"deterministic" class="termref" href=
-"#dt-deterministic"><span class=
-"arrow">·</span>deterministic<span class="arrow">·</span></a>,
-<a title="context-dependent" class="termref" href=
-"#dt-context-dependent"><span class=
-"arrow">·</span>context-dependent<span class="arrow">·</span></a>,
-and <a title="focus-dependent" class="termref" href=
-"#dt-focus-dependent"><span class=
-"arrow">·</span>focus-dependent<span class=
-"arrow">·</span></a>.</p>
-<p>The one-argument form of this function is <a title=
-"deterministic" class="termref" href=
-"#dt-deterministic"><span class=
-"arrow">·</span>deterministic<span class="arrow">·</span></a>,
-<a title="context-independent" class="termref" href=
-"#dt-context-independent"><span class=
-"arrow">·</span>context-independent<span class=
-"arrow">·</span></a>, and <a title="focus-dependent" class=
-"termref" href="#dt-focus-independent"><span class=
-"arrow">·</span>focus-independent<span class=
-"arrow">·</span></a>.</p>
-</dd>
-<dt class="label">Rules</dt>
-<dd>
-<p>If the argument is omitted, it defaults to the context item
+ </dd>
+ <dt class="label">Signatures</dt>
+ <dd>
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:document-uri</code>()<code class="as"> as </code>
+ <code class="return-type">xs:anyURI?</code>
+ </div>
+ </div>
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:document-uri</code>(<code class="arg">$arg</code>
+ <code class="as"> as </code>
+ <code class="type">node()?</code>)<code class="as"> as </code>
+ <code class="return-type">xs:anyURI?</code>
+ </div>
+ </div>
+ </dd>
+ <dt class="label">Properties</dt>
+ <dd>
+ <p>The zero-argument form of this function is <a title="deterministic" class="termref" href="#dt-deterministic">
+ <span class="arrow">·</span>deterministic<span class="arrow">·</span>
+ </a>,
+<a title="context-dependent" class="termref" href="#dt-context-dependent">
+ <span class="arrow">·</span>context-dependent<span class="arrow">·</span>
+ </a>,
+and <a title="focus-dependent" class="termref" href="#dt-focus-dependent">
+ <span class="arrow">·</span>focus-dependent<span class="arrow">·</span>
+ </a>.</p>
+ <p>The one-argument form of this function is <a title="deterministic" class="termref" href="#dt-deterministic">
+ <span class="arrow">·</span>deterministic<span class="arrow">·</span>
+ </a>,
+<a title="context-independent" class="termref" href="#dt-context-independent">
+ <span class="arrow">·</span>context-independent<span class="arrow">·</span>
+ </a>, and <a title="focus-dependent" class="termref" href="#dt-focus-independent">
+ <span class="arrow">·</span>focus-independent<span class="arrow">·</span>
+ </a>.</p>
+ </dd>
+ <dt class="label">Rules</dt>
+ <dd>
+ <p>If the argument is omitted, it defaults to the context item
(<code>.</code>). The behavior of the function if the argument is
omitted is exactly the same as if the context item had been passed
as the argument.</p>
-<p>If <code>$arg</code> is the empty sequence, the function returns
+ <p>If <code>$arg</code> is the empty sequence, the function returns
the empty sequence.</p>
-<p>If <code>$arg</code> is not a document node, the function
+ <p>If <code>$arg</code> is not a document node, the function
returns the empty sequence.</p>
-<p>Otherwise, the function returns the value of the
+ <p>Otherwise, the function returns the value of the
<code>document-uri</code> accessor applied to <code>$arg</code>, as
defined in <a href="#xpath-datamodel-30">[XQuery and XPath Data
-Model (XDM) 3.0]</a> (See <a href=
-"http://www.w3.org/TR/xpath-datamodel-30/#DocumentNodeAccessors">Section
-6.1.2 Accessors</a> <sup><small>DM30</small></sup>).</p>
-</dd>
-<dt class="label">Error Conditions</dt>
-<dd>
-<p>The following errors may be raised when <code>$arg</code> is
-omitted: if the context item is <a href=
-"http://www.w3.org/TR/xpath-datamodel-30/#dt-absent">absent</a><sup><small>DM30</small></sup>
-[<a href="http://www.w3.org/TR/xpath20/#ERRXPDY0002" title=
-"err:XPDY0002">err:XPDY0002</a>]<sup><small>XP</small></sup>; if
-the context item is not a node [<a href=
-"http://www.w3.org/TR/xpath20/#ERRXPTY0004" title=
-"err:XPTY0004">err:XPTY0004</a>]<sup><small>XP</small></sup>.</p>
-</dd>
-<dt class="label">Notes</dt>
-<dd>
-<p>In the case of a document node <code>$D</code> returned by the
-<a href="#func-doc"><code>fn:doc</code></a> function, or a document
+Model (XDM) 3.0]</a> (See <a href="http://www.w3.org/TR/xpath-datamodel-30/#DocumentNodeAccessors">Section
+6.1.2 Accessors</a>
+ <sup>
+ <small>DM30</small>
+ </sup>).</p>
+ </dd>
+ <dt class="label">Error Conditions</dt>
+ <dd>
+ <p>The following errors may be raised when <code>$arg</code> is
+omitted: if the context item is <a href="http://www.w3.org/TR/xpath-datamodel-30/#dt-absent">absent</a>
+ <sup>
+ <small>DM30</small>
+ </sup>
+[<a href="http://www.w3.org/TR/xpath20/#ERRXPDY0002" title="err:XPDY0002">err:XPDY0002</a>]<sup>
+ <small>XP</small>
+ </sup>; if
+the context item is not a node [<a href="http://www.w3.org/TR/xpath20/#ERRXPTY0004" title="err:XPTY0004">err:XPTY0004</a>]<sup>
+ <small>XP</small>
+ </sup>.</p>
+ </dd>
+ <dt class="label">Notes</dt>
+ <dd>
+ <p>In the case of a document node <code>$D</code> returned by the
+<a href="#func-doc">
+ <code>fn:doc</code>
+ </a> function, or a document
node at the root of a tree containing a node returned by the
-<a href="#func-collection"><code>fn:collection</code></a> function,
+<a href="#func-collection">
+ <code>fn:collection</code>
+ </a> function,
it will always be true that either <code>fn:document-uri($D)</code>
returns the empty sequence, or that the following expression is
-true: <a href=
-"#func-doc"><code>fn:doc(fn:document-uri($D))</code></a> is
-<code>$D</code>. It is <a title="implementation-defined" class=
-"termref" href="#implementation-defined"><span class=
-"arrow">·</span>implementation-defined<span class=
-"arrow">·</span></a> whether this guarantee also holds for document
+true: <a href="#func-doc">
+ <code>fn:doc(fn:document-uri($D))</code>
+ </a> is
+<code>$D</code>. It is <a title="implementation-defined" class="termref" href="#implementation-defined">
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ </a> whether this guarantee also holds for document
nodes obtained by other means, for example a document node passed
as the initial context node of a query or transformation.</p>
-</dd>
-</dl>
-</div>
-</div>
-<div class="div1">
-<h2><a name="errors-and-diagnostics" id=
-"errors-and-diagnostics"></a>3 Errors and diagnostics</h2>
-<div class="div2">
-<h3><a name="errors" id="errors"></a>3.1 Raising errors</h3>
-<p>In this document, as well as in <a href="#xquery-30">[XQuery
+ </dd>
+ </dl>
+ </div>
+ </div>
+ <div class="div1">
+ <h2>
+ <a name="errors-and-diagnostics" id="errors-and-diagnostics"/>3 Errors and diagnostics</h2>
+ <div class="div2">
+ <h3>
+ <a name="errors" id="errors"/>3.1 Raising errors</h3>
+ <p>In this document, as well as in <a href="#xquery-30">[XQuery
3.0: An XML Query Language]</a> and <a href="#xpath-30">[XML Path
Language (XPath) 3.0]</a>, the phrase "an error is raised" is used.
-Raising an error is equivalent to calling the <a href=
-"#func-error"><code>fn:error</code></a> function defined in this
+Raising an error is equivalent to calling the <a href="#func-error">
+ <code>fn:error</code>
+ </a> function defined in this
section with the provided error code.</p>
-<p>The above phrase is normally accompanied by specification of a
+ <p>The above phrase is normally accompanied by specification of a
specific error, to wit: "an error is raised [<em>error code</em>]".
Each error defined in this document is identified by an
<code>xs:QName</code> that is in the
<code>http://www.w3.org/2005/xqt-errors</code> namespace,
represented in this document by the <code>err</code> prefix. It is
this <code>xs:QName</code> that is actually passed as an argument
-to the <a href="#func-error"><code>fn:error</code></a> function.
+to the <a href="#func-error">
+ <code>fn:error</code>
+ </a> function.
Calling this function raises an error. For a more detailed
-treatment of error handing, see <a href=
-"http://www.w3.org/TR/xpath-30/#id-handling-dynamic">Section 2.3.3
-Handling Dynamic Errors</a> <sup><small>XP30</small></sup>.</p>
-<p>The <a href="#func-error"><code>fn:error</code></a> function is
+treatment of error handing, see <a href="http://www.w3.org/TR/xpath-30/#id-handling-dynamic">Section 2.3.3
+Handling Dynamic Errors</a>
+ <sup>
+ <small>XP30</small>
+ </sup>.</p>
+ <p>The <a href="#func-error">
+ <code>fn:error</code>
+ </a> function is
a general function that may be called as above but may also be
called from <a href="#xquery-30">[XQuery 3.0: An XML Query
Language]</a> or <a href="#xpath-30">[XML Path Language (XPath)
3.0]</a> applications with, for example, an <code>xs:QName</code>
argument.</p>
-<div class="div3">
-<h4><a name="func-error" id="func-error"></a>3.1.1 fn:error</h4>
-<dl>
-<dt class="label">Summary</dt>
-<dd>
-<p>Calling the <code>fn:error</code> function raises an
+ <div class="div3">
+ <h4>
+ <a name="func-error" id="func-error"/>3.1.1 fn:error</h4>
+ <dl>
+ <dt class="label">Summary</dt>
+ <dd>
+ <p>Calling the <code>fn:error</code> function raises an
application-defined error.</p>
-</dd>
-<dt class="label">Signatures</dt>
-<dd>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:error</code>()<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">none</code></div>
-</div>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:error</code>(<code class=
-"arg">$code</code><code class=
-"as">&#160;as&#160;</code><code class="type">xs:QName</code>)<code class="as">&#160;as&#160;</code><code class="return-type">none</code></div>
-</div>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:error</code>(<code class=
-"arg">$code</code><code class=
-"as">&#160;as&#160;</code><code class="type">xs:QName?</code>,
-<code class="arg">$description</code><code class=
-"as">&#160;as&#160;</code><code class=
-"type">xs:string</code>)<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">none</code></div>
-</div>
-<div class="exampleInner">
-<div class="proto">
-<table border="0" cellpadding="0" cellspacing="0" summary=
-"Function/operator prototype">
-<tr>
-<td valign="baseline" rowspan="3"><code class=
-"function">fn:error</code>(</td>
-<td valign="baseline"><code class="arg">$code</code></td>
-<td valign="baseline"><code class=
-"as">&#160;as&#160;</code><code class="type">xs:QName?</code>,</td>
-</tr>
-<tr>
-<td valign="baseline"><code class="arg">$description</code></td>
-<td valign="baseline"><code class=
-"as">&#160;as&#160;</code><code class="type">xs:string</code>,</td>
-</tr>
-<tr>
-<td valign="baseline"><code class="arg">$error-object</code></td>
-<td valign="baseline"><code class=
-"as">&#160;as&#160;</code><code class=
-"type">item()*</code>)<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">none</code></td>
-</tr>
-</table>
-</div>
-</div>
-</dd>
-<dt class="label">Properties</dt>
-<dd>
-<p>This function is <a title="nondeterministic" class="termref"
-href="#dt-nondeterministic"><span class=
-"arrow">·</span>nondeterministic<span class="arrow">·</span></a>,
-<a title="context-independent" class="termref" href=
-"#dt-context-independent"><span class=
-"arrow">·</span>context-independent<span class=
-"arrow">·</span></a>, and <a title="focus-dependent" class=
-"termref" href="#dt-focus-independent"><span class=
-"arrow">·</span>focus-independent<span class=
-"arrow">·</span></a>.</p>
-</dd>
-<dt class="label">Rules</dt>
-<dd>
-<p>This function never returns a value. Instead it always raises an
+ </dd>
+ <dt class="label">Signatures</dt>
+ <dd>
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:error</code>()<code class="as"> as </code>
+ <code class="return-type">none</code>
+ </div>
+ </div>
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:error</code>(<code class="arg">$code</code>
+ <code class="as"> as </code>
+ <code class="type">xs:QName</code>)<code class="as"> as </code>
+ <code class="return-type">none</code>
+ </div>
+ </div>
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:error</code>(<code class="arg">$code</code>
+ <code class="as"> as </code>
+ <code class="type">xs:QName?</code>, <code class="arg">$description</code>
+ <code class="as"> as </code>
+ <code class="type">xs:string</code>)<code class="as"> as </code>
+ <code class="return-type">none</code>
+ </div>
+ </div>
+ <div class="exampleInner">
+ <div class="proto">
+ <table border="0" cellpadding="0" cellspacing="0" summary="Function/operator prototype">
+ <tr>
+ <td valign="baseline" rowspan="3">
+ <code class="function">fn:error</code>(</td>
+ <td valign="baseline">
+ <code class="arg">$code</code>
+ </td>
+ <td valign="baseline">
+ <code class="as"> as </code>
+ <code class="type">xs:QName?</code>,</td>
+ </tr>
+ <tr>
+ <td valign="baseline">
+ <code class="arg">$description</code>
+ </td>
+ <td valign="baseline">
+ <code class="as"> as </code>
+ <code class="type">xs:string</code>,</td>
+ </tr>
+ <tr>
+ <td valign="baseline">
+ <code class="arg">$error-object</code>
+ </td>
+ <td valign="baseline">
+ <code class="as"> as </code>
+ <code class="type">item()*</code>)<code class="as"> as </code>
+ <code class="return-type">none</code>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ </dd>
+ <dt class="label">Properties</dt>
+ <dd>
+ <p>This function is <a title="nondeterministic" class="termref" href="#dt-nondeterministic">
+ <span class="arrow">·</span>nondeterministic<span class="arrow">·</span>
+ </a>,
+<a title="context-independent" class="termref" href="#dt-context-independent">
+ <span class="arrow">·</span>context-independent<span class="arrow">·</span>
+ </a>, and <a title="focus-dependent" class="termref" href="#dt-focus-independent">
+ <span class="arrow">·</span>focus-independent<span class="arrow">·</span>
+ </a>.</p>
+ </dd>
+ <dt class="label">Rules</dt>
+ <dd>
+ <p>This function never returns a value. Instead it always raises an
error. The effect of the error is identical to the effect of
dynamic errors raised implicitly, for example when an incorrect
argument is supplied to a function.</p>
-<p>The parameters to the <code>fn:error</code> function supply
+ <p>The parameters to the <code>fn:error</code> function supply
information that is associated with the error condition and that is
made available to a caller that asks for information about the
error. The error may be caught either by the host language (using a
try/catch construct in XSLT or XQuery, for example), or by the
calling application or external processing environment. The way in
which error information is returned to the external processing
-environment is <a title="implementation dependent" class="termref"
-href="#implementation-dependent"><span class=
-"arrow">·</span>implementation dependent<span class=
-"arrow">·</span></a></p>
-<p>If <code>fn:error</code> is called with no arguments, then its
+environment is <a title="implementation dependent" class="termref" href="#implementation-dependent">
+ <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
+ </a>
+ </p>
+ <p>If <code>fn:error</code> is called with no arguments, then its
behavior is the same as the function call:</p>
-<div class="exampleInner">
-<pre>
+ <div class="exampleInner">
+ <pre>
fn:error(fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000'))
-</pre></div>
-<p>If <code>$code</code> is the empty sequence then the effective
+</pre>
+ </div>
+ <p>If <code>$code</code> is the empty sequence then the effective
value is the <code>xs:QName</code> constructed by:</p>
-<div class="exampleInner">
-<pre>
+ <div class="exampleInner">
+ <pre>
fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')
-</pre></div>
-<p>There are three pieces of information that may be associated
+</pre>
+ </div>
+ <p>There are three pieces of information that may be associated
with an error:</p>
-<ul>
-<li>
-<p>The <code>$code</code> is an error code that distinguishes this
+ <ul>
+ <li>
+ <p>The <code>$code</code> is an error code that distinguishes this
error from others. It is an <code>xs:QName</code>; the namespace
URI conventionally identifies the component, subsystem, or
authority responsible for defining the meaning of the error code,
@@ -3468,330 +3583,392 @@
namespace URI <code>http://www.w3.org/2005/xqt-errors</code> is
used for errors defined in this specification; other namespace URIs
may be used for errors defined by the application.</p>
-<p>If the external processing environment expects the error code to
+ <p>If the external processing environment expects the error code to
be returned as a URI or a string rather than as an
<code>xs:QName</code>, then an error code with namespace URI
<code>NS</code> and local part <code>LP</code> will be returned in
the form <code>NS#LP</code>. The namespace URI part of the error
code should therefore not include a fragment identifier.</p>
-</li>
-<li>
-<p>The <code>$description</code> is a natural-language description
+ </li>
+ <li>
+ <p>The <code>$description</code> is a natural-language description
of the error condition.</p>
-</li>
-<li>
-<p>The <code>$error-object</code> is an arbitrary value used to
+ </li>
+ <li>
+ <p>The <code>$error-object</code> is an arbitrary value used to
convey additional information about the error, and may be used in
any way the application chooses.</p>
-</li>
-</ul>
-</dd>
-<dt class="label">Error Conditions</dt>
-<dd>
-<p>This function always raises an error.</p>
-</dd>
-<dt class="label">Notes</dt>
-<dd>
-<p>The value of the <code>$description</code> parameter may need to
+ </li>
+ </ul>
+ </dd>
+ <dt class="label">Error Conditions</dt>
+ <dd>
+ <p>This function always raises an error.</p>
+ </dd>
+ <dt class="label">Notes</dt>
+ <dd>
+ <p>The value of the <code>$description</code> parameter may need to
be localized.</p>
-<p>The type "none" is a special type defined in <a href=
-"#xquery-semantics">[XQuery 1.0 and XPath 2.0 Formal Semantics]</a>
+ <p>The type "none" is a special type defined in <a href="#xquery-semantics">[XQuery 1.0 and XPath 2.0 Formal Semantics]</a>
and is not available to the user. It indicates that the function
never returns and ensures that it has the correct static type.</p>
-</dd>
-<dt class="label">Examples</dt>
-<dd>
-<p>The expression <code>fn:error()</code> raises error
+ </dd>
+ <dt class="label">Examples</dt>
+ <dd>
+ <p>The expression <code>fn:error()</code> raises error
<code>FOER0000</code>. <em>(This returns the URI
<code>http://www.w3.org/2005/xqt-errors#FOER0000</code> (or the
corresponding <code>xs:QName</code>) to the external processing
environment, unless the error is caught using a try/catch construct
-in the host language.).</em></p>
-<p>The expression
+in the host language.).</em>
+ </p>
+ <p>The expression
<code>fn:error(fn:QName('http://www.example.com/HR',
'myerr:toohighsal'), 'Does not apply because salary is too
high')</code> raises error <code>myerr:toohighsal</code>. <em>(This
returns <code>http://www.example.com/HR#toohighsal</code> and the
-<code>xs:string</code> <code>"Does not apply because salary is too
+<code>xs:string</code>
+ <code>"Does not apply because salary is too
high"</code> (or the corresponding <code>xs:QName</code>) to the
external processing environment, unless the error is caught using a
-try/catch construct in the host language.).</em></p>
-</dd>
-</dl>
-</div>
-</div>
-<div class="div2">
-<h3><a name="diagnostics" id="diagnostics"></a>3.2 Diagnostic
+try/catch construct in the host language.).</em>
+ </p>
+ </dd>
+ </dl>
+ </div>
+ </div>
+ <div class="div2">
+ <h3>
+ <a name="diagnostics" id="diagnostics"/>3.2 Diagnostic
tracing</h3>
-<div class="div3">
-<h4><a name="func-trace" id="func-trace"></a>3.2.1 fn:trace</h4>
-<dl>
-<dt class="label">Summary</dt>
-<dd>
-<p>Provides an execution trace intended to be used in debugging
+ <div class="div3">
+ <h4>
+ <a name="func-trace" id="func-trace"/>3.2.1 fn:trace</h4>
+ <dl>
+ <dt class="label">Summary</dt>
+ <dd>
+ <p>Provides an execution trace intended to be used in debugging
queries.</p>
-</dd>
-<dt class="label">Signature</dt>
-<dd>
-<div class="exampleInner">
-<div class="proto"><code class=
-"function">fn:trace</code>(<code class=
-"arg">$value</code><code class=
-"as">&#160;as&#160;</code><code class="type">item()*</code>,
-<code class="arg">$label</code><code class=
-"as">&#160;as&#160;</code><code class=
-"type">xs:string</code>)<code class=
-"as">&#160;as&#160;</code><code class=
-"return-type">item()*</code></div>
-</div>
-</dd>
-<dt class="label">Properties</dt>
-<dd>
-<p>This function is <a title="deterministic" class="termref" href=
-"#dt-deterministic"><span class=
-"arrow">·</span>deterministic<span class="arrow">·</span></a>,
-<a title="context-independent" class="termref" href=
-"#dt-context-independent"><span class=
-"arrow">·</span>context-independent<span class=
-"arrow">·</span></a>, and <a title="focus-dependent" class=
-"termref" href="#dt-focus-independent"><span class=
-"arrow">·</span>focus-independent<span class=
-"arrow">·</span></a>.</p>
-</dd>
-<dt class="label">Rules</dt>
-<dd>
-<p>The function returns the value of <code>$value</code>,
+ </dd>
+ <dt class="label">Signature</dt>
+ <dd>
+ <div class="exampleInner">
+ <div class="proto">
+ <code class="function">fn:trace</code>(<code class="arg">$value</code>
+ <code class="as"> as </code>
+ <code class="type">item()*</code>, <code class="arg">$label</code>
+ <code class="as"> as </code>
+ <code class="type">xs:string</code>)<code class="as"> as </code>
+ <code class="return-type">item()*</code>
+ </div>
+ </div>
+ </dd>
+ <dt class="label">Properties</dt>
+ <dd>
+ <p>This function is <a title="deterministic" class="termref" href="#dt-deterministic">
+ <span class="arrow">·</span>deterministic<span class="arrow">·</span>
+ </a>,
+<a title="context-independent" class="termref" href="#dt-context-independent">
+ <span class="arrow">·</span>context-independent<span class="arrow">·</span>
+ </a>, and <a title="focus-dependent" class="termref" href="#dt-focus-independent">
+ <span class="arrow">·</span>focus-independent<span class="arrow">·</span>
+ </a>.</p>
+ </dd>
+ <dt class="label">Rules</dt>
+ <dd>
+ <p>The function returns the value of <code>$value</code>,
unchanged.</p>
-<p>In addition, the values of <code>$value</code>, converted to an
+ <p>In addition, the values of <code>$value</code>, converted to an
<code>xs:string</code>, and <code>$label</code>
-<strong>may</strong> be directed to a trace data set. The
-destination of the trace output is <a title=
-"implementation-defined" class="termref" href=
-"#implementation-defined"><span class=
-"arrow">·</span>implementation-defined<span class=
-"arrow">·</span></a>. The format of the trace output is <a title=
-"implementation dependent" class="termref" href=
-"#implementation-dependent"><span class=
-"arrow">·</span>implementation dependent<span class=
-"arrow">·</span></a>. The ordering of output from calls of the
-<code>fn:trace</code> function is <a title=
-"implementation dependent" class="termref" href=
-"#implementation-dependent"><span class=
-"arrow">·</span>implementation dependent<span class=
-"arrow">·</span></a>.</p>
-</dd>
-<dt class="label">Examples</dt>
-<dd>
-<p>Consider a situation in which a user wants to investigate the
+ <strong>may</strong> be directed to a trace data set. The
+destination of the trace output is <a title="implementation-defined" class="termref" href="#implementation-defined">
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ </a>. The format of the trace output is <a title="implementation dependent" class="termref" href="#implementation-dependent">
+ <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
+ </a>. The ordering of output from calls of the
+<code>fn:trace</code> function is <a title="implementation dependent" class="termref" href="#implementation-dependent">
+ <span class="arrow">·</span>implementation dependent<span class="arrow">·</span>
+ </a>.</p>
+ </dd>
+ <dt class="label">Examples</dt>
+ <dd>
+ <p>Consider a situation in which a user wants to investigate the
actual value passed to a function. Assume that in a particular
execution, <code>$v</code> is an <code>xs:decimal</code> with value
<code>124.84</code>. Writing <code>fn:trace($v, 'the value of $v
is:')</code> will put the strings <code>"124.84"</code> and
<code>"the value of $v is:"</code> in the trace data set in
implementation dependent order.</p>
-</dd>
-</dl>
-</div>
-</div>
-</div>
-<div class="div1">
-<h2><a name="numeric-functions" id="numeric-functions"></a>4
+ </dd>
+ </dl>
+ </div>
+ </div>
+ </div>
+ <div class="div1">
+ <h2>
+ <a name="numeric-functions" id="numeric-functions"/>4
Functions and operators on numerics</h2>
-<p>This section specifies arithmetic operators on the numeric
+ <p>This section specifies arithmetic operators on the numeric
datatypes defined in <a href="#xmlschema-2">[XML Schema Part 2:
Datatypes Second Edition]</a>. It uses an approach that permits
lightweight implementation whenever possible.</p>
-<div class="div2">
-<h3><a name="numeric-types" id="numeric-types"></a>4.1 Numeric
+ <div class="div2">
+ <h3>
+ <a name="numeric-types" id="numeric-types"/>4.1 Numeric
types</h3>
-<p>The operators described in this section are defined on the
+ <p>The operators described in this section are defined on the
following numeric types. Each type whose name is indented is
derived from the type whose name appears nearest above with one
less level of indentation.</p>
-<table class="hierarchy" summary="Numeric types" border="0" width=
-"288">
-<tbody>
-<tr>
-<td class="castOther" align="left" valign="middle">xs:decimal</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle"></td>
-<td class="castOther" align="left" valign="middle">xs:integer</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle">xs:float</td>
-</tr>
-<tr>
-<td class="castOther" align="left" valign="middle">xs:double</td>
-</tr>
-</tbody>
-</table>
-<p>They also apply to types derived by restriction from the above
+ <table class="hierarchy" summary="Numeric types" border="0" width="288">
+ <tbody>
+ <tr>
+ <td class="castOther" align="left" valign="middle">xs:decimal</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle"/>
+ <td class="castOther" align="left" valign="middle">xs:integer</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle">xs:float</td>
+ </tr>
+ <tr>
+ <td class="castOther" align="left" valign="middle">xs:double</td>
+ </tr>
+ </tbody>
+ </table>
+ <p>They also apply to types derived by restriction from the above
types.</p>
-<div class="note">
-<p class="prefix"><b>Note:</b></p>
-<p>This specification uses <a href="#ieee754-2008">[IEEE
+ <div class="note">
+ <p class="prefix">
+ <b>Note:</b>
+ </p>
+ <p>This specification uses <a href="#ieee754-2008">[IEEE
754-2008]</a> arithmetic for <code>xs:float</code> and
<code>xs:double</code> values. <span>One consequence of this is
that some operations result in the value <code>NaN</code> (not-a
number), which has the unusual property that it is not equal to
itself. Another consequence is that some operations return the
-value negative zero.</span> This differs from <a href=
-"#xmlschema-2">[XML Schema Part 2: Datatypes Second Edition]</a>
+value negative zero.</span> This differs from <a href="#xmlschema-2">[XML Schema Part 2: Datatypes Second Edition]</a>
which defines <code>NaN</code> as being equal to itself and defines
only a single zero in the value space. The text accompanying
several functions defines behavior for both positive and negative
-zero inputs and outputs in the interest of alignment with <a href=
-"#ieee754-2008">[IEEE 754-2008]</a>. <span>A conformant
+zero inputs and outputs in the interest of alignment with <a href="#ieee754-2008">[IEEE 754-2008]</a>. <span>A conformant
implementation must respect these semantics. In consequence, the
expression <code>-0.0e0</code> (which is actually a unary minus
operator applied to an <code>xs:double</code> value) will always
-return negative zero: see <a href=
-"#func-numeric-unary-minus"><b>4.2.8
-op:numeric-unary-minus</b></a>. As a concession to implementations
+return negative zero: see <a href="#func-numeric-unary-minus">
+ <b>4.2.8
+op:numeric-unary-minus</b>
+ </a>. As a concession to implementations
that rely on implementations of XSD 1.0, however, when casting from
string to double the lexical form <code>-0</code>
-<strong>may</strong> be converted to positive zero, though negative
-zero is <strong>recommended</strong>.</span></p>
-<p>XML Schema 1.1 introduces support for positive and negative zero
+ <strong>may</strong> be converted to positive zero, though negative
+zero is <strong>recommended</strong>.</span>
+ </p>
+ <p>XML Schema 1.1 introduces support for positive and negative zero
as distinct values, and also uses the <a href="#ieee754-2008">[IEEE
754-2008]</a> semantics for comparisons involving
<code>NaN</code>.</p>
-</div>
-</div>
-<div class="div2">
-<h3><a name="op.numeric" id="op.numeric"></a>4.2 Arithmetic
+ </div>
+ </div>
+ <div class="div2">
+ <h3>
+ <a name="op.numeric" id="op.numeric"/>4.2 Arithmetic
operators on numeric values</h3>
-<p>The following functions define the semantics of arithmetic
+ <p>The following functions define the semantics of arithmetic
operators defined in <a href="#xquery-30">[XQuery 3.0: An XML Query
Language]</a> and <a href="#xpath-30">[XML Path Language (XPath)
3.0]</a> on these numeric types.</p>
-<table summary="Operator summary" border="1">
-<thead>
-<tr>
-<th colspan="1">Operators</th>
-<th colspan="1">Meaning</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td><a href=
-"#func-numeric-add"><code>op:numeric-add</code></a></td>
-<td>Addition</td>
-</tr>
-<tr>
-<td><a href=
-"#func-numeric-subtract"><code>op:numeric-subtract</code></a></td>
-<td>Subtraction</td>
-</tr>
-<tr>
-<td><a href=
-"#func-numeric-multiply"><code>op:numeric-multiply</code></a></td>
-<td>Multiplication</td>
-</tr>
-<tr>
-<td><a href=
-"#func-numeric-divide"><code>op:numeric-divide</code></a></td>
-<td>Division</td>
-</tr>
-<tr>
-<td><a href=
-"#func-numeric-integer-divide"><code>op:numeric-integer-divide</code></a></td>
-<td>Integer division</td>
-</tr>
-<tr>
-<td><a href=
-"#func-numeric-mod"><code>op:numeric-mod</code></a></td>
-<td>Modulus</td>
-</tr>
-<tr>
-<td><a href=
-"#func-numeric-unary-plus"><code>op:numeric-unary-plus</code></a></td>
-<td>Unary plus</td>
-</tr>
-<tr>
-<td><a href=
-"#func-numeric-unary-minus"><code>op:numeric-unary-minus</code></a></td>
-<td>Unary minus (negation)</td>
-</tr>
-</tbody>
-</table>
-<p>The parameters and return types for the above operators are the
+ <table summary="Operator summary" border="1">
+ <thead>
+ <tr>
+ <th colspan="1">Operators</th>
+ <th colspan="1">Meaning</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <a href="#func-numeric-add">
+ <code>op:numeric-add</code>
+ </a>
+ </td>
+ <td>Addition</td>
+ </tr>
+ <tr>
+ <td>
+ <a href="#func-numeric-subtract">
+ <code>op:numeric-subtract</code>
+ </a>
+ </td>
+ <td>Subtraction</td>
+ </tr>
+ <tr>
+ <td>
+ <a href="#func-numeric-multiply">
+ <code>op:numeric-multiply</code>
+ </a>
+ </td>
+ <td>Multiplication</td>
+ </tr>
+ <tr>
+ <td>
+ <a href="#func-numeric-divide">
+ <code>op:numeric-divide</code>
+ </a>
+ </td>
+ <td>Division</td>
+ </tr>
+ <tr>
+ <td>
+ <a href="#func-numeric-integer-divide">
+ <code>op:numeric-integer-divide</code>
+ </a>
+ </td>
+ <td>Integer division</td>
+ </tr>
+ <tr>
+ <td>
+ <a href="#func-numeric-mod">
+ <code>op:numeric-mod</code>
+ </a>
+ </td>
+ <td>Modulus</td>
+ </tr>
+ <tr>
+ <td>
+ <a href="#func-numeric-unary-plus">
+ <code>op:numeric-unary-plus</code>
+ </a>
+ </td>
+ <td>Unary plus</td>
+ </tr>
+ <tr>
+ <td>
+ <a href="#func-numeric-unary-minus">
+ <code>op:numeric-unary-minus</code>
+ </a>
+ </td>
+ <td>Unary minus (negation)</td>
+ </tr>
+ </tbody>
+ </table>
+ <p>The parameters and return types for the above operators are the
basic numeric types: <code>xs:integer</code>,
<code>xs:decimal</code>, <code>xs:float</code> and
<code>xs:double</code>, and types derived from them. The word "
<code>numeric</code> " in function signatures signifies these four
types. For simplicity, each operator is defined to operate on
operands of the same type and return the same type. The exceptions
-are <a href=
-"#func-numeric-divide"><code>op:numeric-divide</code></a>, which
+are <a href="#func-numeric-divide">
+ <code>op:numeric-divide</code>
+ </a>, which
returns an <code>xs:decimal</code> if called with two
-<code>xs:integer</code> operands and <a href=
-"#func-numeric-integer-divide"><code>op:numeric-integer-divide</code></a>
+<code>xs:integer</code> operands and <a href="#func-numeric-integer-divide">
+ <code>op:numeric-integer-divide</code>
+ </a>
which always returns an <code>xs:integer</code>.</p>
-<p>If the two operands are not of the same type, <em>subtype
+ <p>If the two operands are not of the same type, <em>subtype
substitution</em> and <em>numeric type promotion</em> are used to
-obtain two operands of the same type. <a href=
-"http://www.w3.org/TR/xpath-30/#promotion">Section B.1 Type
-Promotion</a> <sup><small>XP30</small></sup> and <a href=
-"http://www.w3.org/TR/xpath-30/#mapping">Section B.2 Operator
-Mapping</a> <sup><small>XP30</small></sup> describe the semantics
+obtain two operands of the same type. <a href="http://www.w3.org/TR/xpath-30/#promotion">Section B.1 Type
+Promotion</a>
+ <sup>
+ <small>XP30</small>
+ </sup> and <a href="http://www.w3.org/TR/xpath-30/#mapping">Section B.2 Operator
+Mapping</a>
+ <sup>
+ <small>XP30</small>
+ </sup> describe the semantics
of these operations in detail.</p>
-<p>The result type of operations depends on their argument
+ <p>The result type of operations depends on their argument
datatypes and is defined in the following table:</p>
-<table summary="Function/operator summary" border="1">
-<col width="50%" span="1" />
-<col width="50%" span="1" />
-<thead>
-<tr>
-<th colspan="1">Operator</th>
-<th colspan="1">Returns</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td><code>op:operation(xs:integer, xs:integer)</code></td>
-<td><code>xs:integer</code> (except for <a href=
-"#func-numeric-divide"><code>op:numeric-divide(integer,
-integer)</code></a>, which returns <code>xs:decimal</code>)</td>
-</tr>
-<tr>
-<td><code>op:operation(xs:decimal, xs:decimal)</code></td>
-<td><code>xs:decimal</code></td>
-</tr>
-<tr>
-<td><code>op:operation(xs:float, xs:float)</code></td>
-<td><code>xs:float</code></td>
-</tr>
-<tr>
-<td><code>op:operation(xs:double, xs:double)</code></td>
-<td><code>xs:double</code></td>
-</tr>
-<tr>
-<td><code>op:operation(xs:integer)</code></td>
-<td><code>xs:integer</code></td>
-</tr>
-<tr>
-<td><code>op:operation(xs:decimal)</code></td>
-<td><code>xs:decimal</code></td>
-</tr>
-<tr>
-<td><code>op:operation(xs:float)</code></td>
-<td><code>xs:float</code></td>
-</tr>
-<tr>
-<td><code>op:operation(xs:double)</code></td>
-<td><code>xs:double</code></td>
-</tr>
-</tbody>
-</table>
-<p>These rules define any operation on any pair of arithmetic
+ <table summary="Function/operator summary" border="1">
+ <col width="50%" span="1"/>
+ <col width="50%" span="1"/>
+ <thead>
+ <tr>
+ <th colspan="1">Operator</th>
+ <th colspan="1">Returns</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <code>op:operation(xs:integer, xs:integer)</code>
+ </td>
+ <td>
+ <code>xs:integer</code> (except for <a href="#func-numeric-divide">
+ <code>op:numeric-divide(integer,
+integer)</code>
+ </a>, which returns <code>xs:decimal</code>)</td>
+ </tr>
+ <tr>
+ <td>
+ <code>op:operation(xs:decimal, xs:decimal)</code>
+ </td>
+ <td>
+ <code>xs:decimal</code>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <code>op:operation(xs:float, xs:float)</code>
+ </td>
+ <td>
+ <code>xs:float</code>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <code>op:operation(xs:double, xs:double)</code>
+ </td>
+ <td>
+ <code>xs:double</code>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <code>op:operation(xs:integer)</code>
+ </td>
+ <td>
+ <code>xs:integer</code>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <code>op:operation(xs:decimal)</code>
+ </td>
+ <td>
+ <code>xs:decimal</code>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <code>op:operation(xs:float)</code>
+ </td>
+ <td>
+ <code>xs:float</code>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <code>op:operation(xs:double)</code>
+ </td>
+ <td>
+ <code>xs:double</code>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <p>These rules define any operation on any pair of arithmetic
types. Consider the following example:</p>
-<div class="exampleInner">
-<pre>
-op:operation(xs:int, xs:double) =&gt; op:operation(xs:double, xs:double)
-</pre></div>
-<p>For this operation, <code>xs:int</code> must be converted to
+ <div class="exampleInner">
+ <pre>
+op:operation(xs:int, xs:double) => op:operation(xs:double, xs:double)
+</pre>
+ </div>
+ <p>For this operation, <code>xs:int</code> must be converted to
<code>xs:double</code>. This can be done, since by the rules above:
<code>xs:int</code> can be substituted for <code>xs:integer</code>,
<code>xs:integer</code> can be substituted for
@@ -3801,139 +3978,144 @@
<code>xs:decimal</code> is promoted to an <code>xs:double</code>,
it should not be converted to an <code>xs:float</code> and then to
<code>xs:double</code>, as this risks loss of precision.</p>
-<p>As another example, a user may define <code>height</code> as a
+ <p>As another example, a user may define <code>height</code> as a
derived type of <code>xs:integer</code> with a minimum value of 20
and a maximum value of 100. He may then derive
<code>fenceHeight</code> using an enumeration to restrict the
permitted set of values to, say, 36, 48 and 60.</p>
-<div class="exampleInner">
-<pre>
-op:operation(fenceHeight, xs:integer) =&gt; op:operation(xs:integer, xs:integer)
-</pre></div>
-<p><code>fenceHeight</code> can be substituted for its base type
+ <div class="exampleInner">
+ <pre>
+op:operation(fenceHeight, xs:integer) => op:operation(xs:integer, xs:integer)
+</pre>
+ </div>
+ <p>
+ <code>fenceHeight</code> can be substituted for its base type
<code>height</code> and <code>height</code> can be substituted for
its base type <code>xs:integer</code>.</p>
-<p>The basic rules for addition, subtraction, and multiplication of
+ <p>The basic rules for addition, subtraction, and multiplication of
ordinary numbers are not set out in this specification; they are
taken as given. In the case of <code>xs:double</code> and
-<code>xs:float</code> the rules are as defined in <a href=
-"#ieee754-2008">[IEEE 754-2008]</a>. The rules for handling
+<code>xs:float</code> the rules are as defined in <a href="#ieee754-2008">[IEEE 754-2008]</a>. The rules for handling
division and modulus operations, as well as the rules for handling
special values such as infinity and <code>NaN</code>, and exception
conditions such as overflow and underflow, are described more
explicitly since they are not necessarily obvious.</p>
-<p>On overflow and underflow situations during arithmetic
-operations conforming implementations <a title="must" class=
-"termref" href="#must"><span class="arrow">·</span>must<span class=
-"arrow">·</span></a> behave as follows:</p>
-<ul>
-<li>
-<p>For <code>xs:float</code> and <code>xs:double</code> operations,
-overflow behavior <a title="must" class="termref" href=
-"#must"><span class="arrow">·</span>must<span class=
-"arrow">·</span></a> be conformant with <a href=
-"#ieee754-2008">[IEEE 754-2008]</a>. This specification allows the
+ <p>On overflow and underflow situations during arithmetic
+operations conforming implementations <a title="must" class="termref" href="#must">
+ <span class="arrow">·</span>must<span class="arrow">·</span>
+ </a> behave as follows:</p>
+ <ul>
+ <li>
+ <p>For <code>xs:float</code> and <code>xs:double</code> operations,
+overflow behavior <a title="must" class="termref" href="#must">
+ <span class="arrow">·</span>must<span class="arrow">·</span>
+ </a> be conformant with <a href="#ieee754-2008">[IEEE 754-2008]</a>. This specification allows the
following options:</p>
-<ul>
-<li>
-<p>Raising an error [<a href="#ERRFOAR0002" title=
-"err:FOAR0002">err:FOAR0002</a>] via an overflow trap.</p>
-</li>
-<li>
-<p>Returning <code>INF</code> or <code>-INF</code>.</p>
-</li>
-<li>
-<p>Returning the largest (positive or negative) non-infinite
+ <ul>
+ <li>
+ <p>Raising an error [<a href="#ERRFOAR0002" title="err:FOAR0002">err:FOAR0002</a>] via an overflow trap.</p>
+ </li>
+ <li>
+ <p>Returning <code>INF</code> or <code>-INF</code>.</p>
+ </li>
+ <li>
+ <p>Returning the largest (positive or negative) non-infinite
number.</p>
-</li>
-</ul>
-</li>
-<li>
-<p>For <code>xs:float</code> and <code>xs:double</code> operations,
-underflow behavior <a title="must" class="termref" href=
-"#must"><span class="arrow">·</span>must<span class=
-"arrow">·</span></a> be conformant with <a href=
-"#ieee754-2008">[IEEE 754-2008]</a>. This specification allows the
+ </li>
+ </ul>
+ </li>
+ <li>
+ <p>For <code>xs:float</code> and <code>xs:double</code> operations,
+underflow behavior <a title="must" class="termref" href="#must">
+ <span class="arrow">·</span>must<span class="arrow">·</span>
+ </a> be conformant with <a href="#ieee754-2008">[IEEE 754-2008]</a>. This specification allows the
following options:</p>
-<ul>
-<li>
-<p>Raising an error [<a href="#ERRFOAR0002" title=
-"err:FOAR0002">err:FOAR0002</a>] via an underflow trap.</p>
-</li>
-<li>
-<p>Returning <code>0.0E0</code> or <code>+/- 2**Emin</code> or a
+ <ul>
+ <li>
+ <p>Raising an error [<a href="#ERRFOAR0002" title="err:FOAR0002">err:FOAR0002</a>] via an underflow trap.</p>
+ </li>
+ <li>
+ <p>Returning <code>0.0E0</code> or <code>+/- 2**Emin</code> or a
denormalized value; where <code>Emin</code> is the smallest
possible <code>xs:float</code> or <code>xs:double</code>
exponent.</p>
-</li>
-</ul>
-</li>
-<li>
-<p>For <code>xs:decimal</code> operations, overflow behavior
-<a title="must" class="termref" href="#must"><span class=
-"arrow">·</span>must<span class="arrow">·</span></a> raise an error
+ </li>
+ </ul>
+ </li>
+ <li>
+ <p>For <code>xs:decimal</code> operations, overflow behavior
+<a title="must" class="termref" href="#must">
+ <span class="arrow">·</span>must<span class="arrow">·</span>
+ </a> raise an error
[<a href="#ERRFOAR0002" title="err:FOAR0002">err:FOAR0002</a>]. On
underflow, <code>0.0</code> must be returned.</p>
-</li>
-<li>
-<p>For <code>xs:integer</code> operations, implementations that
-support limited-precision integer operations <a title="must" class=
-"termref" href="#must"><span class="arrow">·</span>must<span class=
-"arrow">·</span></a> select from the following options:</p>
-<ul>
-<li>
-<p>They <a title="may" class="termref" href="#may"><span class=
-"arrow">·</span>may<span class="arrow">·</span></a> choose to
-always raise an error [<a href="#ERRFOAR0002" title=
-"err:FOAR0002">err:FOAR0002</a>].</p>
-</li>
-<li>
-<p>They <a title="may" class="termref" href="#may"><span class=
-"arrow">·</span>may<span class="arrow">·</span></a> provide an
-<a title="implementation-defined" class="termref" href=
-"#implementation-defined"><span class=
-"arrow">·</span>implementation-defined<span class=
-"arrow">·</span></a> mechanism that allows users to choose between
+ </li>
+ <li>
+ <p>For <code>xs:integer</code> operations, implementations that
+support limited-precision integer operations <a title="must" class="termref" href="#must">
+ <span class="arrow">·</span>must<span class="arrow">·</span>
+ </a> select from the following options:</p>
+ <ul>
+ <li>
+ <p>They <a title="may" class="termref" href="#may">
+ <span class="arrow">·</span>may<span class="arrow">·</span>
+ </a> choose to
+always raise an error [<a href="#ERRFOAR0002" title="err:FOAR0002">err:FOAR0002</a>].</p>
+ </li>
+ <li>
+ <p>They <a title="may" class="termref" href="#may">
+ <span class="arrow">·</span>may<span class="arrow">·</span>
+ </a> provide an
+<a title="implementation-defined" class="termref" href="#implementation-defined">
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ </a> mechanism that allows users to choose between
raising an error and returning a result that is modulo the largest
representable integer value. See <a href="#ISO10967">[ISO
10967]</a>.</p>
-</li>
-</ul>
-</li>
-</ul>
-<p>The functions <a href=
-"#func-numeric-add"><code>op:numeric-add</code></a>, <a href=
-"#func-numeric-subtract"><code>op:numeric-subtract</code></a>,
-<a href=
-"#func-numeric-multiply"><code>op:numeric-multiply</code></a>,
-<a href="#func-numeric-divide"><code>op:numeric-divide</code></a>,
-<a href=
-"#func-numeric-integer-divide"><code>op:numeric-integer-divide</code></a>
-and <a href="#func-numeric-mod"><code>op:numeric-mod</code></a> are
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <p>The functions <a href="#func-numeric-add">
+ <code>op:numeric-add</code>
+ </a>, <a href="#func-numeric-subtract">
+ <code>op:numeric-subtract</code>
+ </a>,
+<a href="#func-numeric-multiply">
+ <code>op:numeric-multiply</code>
+ </a>,
+<a href="#func-numeric-divide">
+ <code>op:numeric-divide</code>
+ </a>,
+<a href="#func-numeric-integer-divide">
+ <code>op:numeric-integer-divide</code>
+ </a>
+and <a href="#func-numeric-mod">
+ <code>op:numeric-mod</code>
+ </a> are
each defined for pairs of numeric operands, each of which has the
same type:<code>xs:integer</code>, <code>xs:decimal</code>,
<code>xs:float</code>, or <code>xs:double</code>. The functions
-<a href=
-"#func-numeric-unary-plus"><code>op:numeric-unary-plus</code></a>
-and <a href=
-"#func-numeric-unary-minus"><code>op:numeric-unary-minus</code></a>
+<a href="#func-numeric-unary-plus">
+ <code>op:numeric-unary-plus</code>
+ </a>
+and <a href="#func-numeric-unary-minus">
+ <code>op:numeric-unary-minus</code>
+ </a>
are defined for a single operand whose type is one of those same
numeric types.</p>
-<p>For <code>xs:float</code> and <code>xs:double</code> arguments,
+ <p>For <code>xs:float</code> and <code>xs:double</code> arguments,
if either argument is <code>NaN</code>, the result is
<code>NaN</code>.</p>
-<p>For <code>xs:decimal</code> values the number of digits of
-precision returned by the numeric operators is <a title=
-"implementation-defined" class="termref" href=
-"#implementation-defined"><span class=
-"arrow">·</span>implementation-defined<span class=
-"arrow">·</span></a>. If the number of digits in the result exceeds
+ <p>For <code>xs:decimal</code> values the number of digits of
+precision returned by the numeric operators is <a title="implementation-defined" class="termref" href="#implementation-defined">
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ </a>. If the number of digits in the result exceeds
the number of digits that the implementation supports, the result
-is truncated or rounded in an <a title="implementation-defined"
-class="termref" href="#implementation-defined"><span class=
-"arrow">·</span>implementation-defined<span class=
-"arrow">·</span></a> manner.</p>
-<p>The <a href="#ieee754-2008">[IEEE 754-2008]</a> specification
+is truncated or rounded in an <a title="implementation-defined" class="termref" href="#implementation-defined">
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ </a> manner.</p>
+ <p>The <a href="#ieee754-2008">[IEEE 754-2008]</a> specification
also describes handling of two exception conditions called
<code>divideByZero</code> and <code>invalidOperation</code>. The
IEEE <code>divideByZero</code> exception is raised not only by a
@@ -3946,61 +4128,61 @@
rather they result in the relevant function or operator returning
<code>NaN</code>. The underlying IEEE exception
<strong>may</strong> be notified to the application or to the user
-by some <a title="implementation-defined" class="termref" href=
-"#implementation-defined"><span class=
-"arrow">·</span>implementation-defined<span class=
-"arrow">·</span></a> warning condition, but the observable effect
+by some <a title="implementation-defined" class="termref" href="#implementation-defined">
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ </a> warning condition, but the observable effect
on an application using the functions and operators defined in this
specification is simply to return <code>NaN</code> with no
error.</p>
-<p>The <a href="#ieee754-2008">[IEEE 754-2008]</a> specification
+ <p>The <a href="#ieee754-2008">[IEEE 754-2008]</a> specification
distinguishes two NaN values, a quiet NaN and a signaling NaN.
These two values are not distinguishable in the XDM model: the
value spaces of <code>xs:float</code> and <code>xs:double</code>
each include only a single <code>NaN</code> value. This does not
prevent the implementation distinguishing them internally, and
-triggering different <a title="implementation-defined" class=
-"termref" href="#implementation-defined"><span class=
-"arrow">·</span>implementation-defined<span class=
-"arrow">·</span></a> warning conditions, but such distinctions do
+triggering different <a title="implementation-defined" class="termref" href="#implementation-defined">
+ <span class="arrow">·</span>implementation-defined<span class="arrow">·</span>
+ </a> warning conditions, but such distinctions do
not affect the observable behavior of an application using the
functions and operators defined in this specification.</p>
-<div class="div3">
-<h4><a name="func-numeric-add" id="func-numeric-add"></a>4.2.1
+ <div class="div3">
+ <h4>
+ <a name="func-numeric-add"
Follow ups