Merge lp:~zorba-coders/zorba/xqdoc-improvements into lp:zorba

Proposed by William Candillon
Status: Merged
Merged at revision: 11712
Proposed branch: lp:~zorba-coders/zorba/xqdoc-improvements
Merge into: lp:zorba
Diff against target: 638 lines (+88/-87)
3 files modified
modules/org/jsoniq/www/functions.xq (+15/-14)
modules/store/static/indexes/dml.xq (+1/-1)
modules/w3c/xpath_functions.xq (+72/-72)
To merge this branch: bzr merge lp:~zorba-coders/zorba/xqdoc-improvements
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
William Candillon Approve
Review via email: mp+204669@code.launchpad.net

Commit message

Update documentation on modules.

Description of the change

Update XQDoc modules.

To post a comment you must log in.
Revision history for this message
William Candillon (wcandillon) :
review: Approve
Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue succeeded - proposal merged!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/org/jsoniq/www/functions.xq'
2--- modules/org/jsoniq/www/functions.xq 2013-09-19 01:09:27 +0000
3+++ modules/org/jsoniq/www/functions.xq 2014-02-04 12:29:13 +0000
4@@ -22,7 +22,7 @@
5 : sections 1.7 (Functions) and 1.10 (Update Primitives). JSONiq extends
6 : the XQuery specification to also deal with JSON data natively. See
7 :
8- : http://jsoniq.org/
9+ : <a href="http://jsoniq.org/">jsoniq.org</a>
10 :
11 : for details.
12 :
13@@ -47,7 +47,7 @@
14 : Calling this version of the function is equivalent to calling the
15 : 2 argument version of the function with the second argument
16 :
17- : { "prefix" : "Q{http://jsoniq.org/roundtrip}" }
18+ : <code>{ "prefix" : "Q{http://jsoniq.org/roundtrip}" }</code>
19 :
20 : @param $items the items to be decoded.
21 : @return the decoded items.
22@@ -63,23 +63,23 @@
23 : that determines if this function decodes an item.
24 :
25 : Example:
26- : jn:decode-from-roundtrip(
27+ : <pre highlight-as="jsoniq">jn:decode-from-roundtrip(
28 : { "nan" : { "pre-type" : "xs:double", "pre-value" : "NaN" } },
29 : { "prefix" : "pre-" }
30- : )
31+ : )</pre>
32 : returns the same instance that would be constructed by
33- : { "nan" : xs:double("NaN") }
34+ : <code>{ "nan" : xs:double("NaN") }</code>
35 :
36 : So
37- : let $decoded := jn:decode-from-roundtrip(
38+ : <pre highlight-as="jsoniq">let $decoded := jn:decode-from-roundtrip(
39 : { "nan" : { "pre-type" : "xs:double", "pre-value" : "NaN" } },
40 : { "prefix" : "pre-" }
41 : )
42 : let $nan := $decoded("nan")
43 : return
44- : ($nan instance of xs:double, $nan)
45+ : ($nan instance of xs:double, $nan)</pre>
46 : returns
47- : true NaN
48+ : <code>true NaN</code>
49 :
50 : @param $items the items to be decoded.
51 : @param $options the decoding options.
52@@ -98,11 +98,12 @@
53 : can be serialized as JSON while keeping roundtrip capability.
54 : Calling this version of the function is equivalent to calling the
55 : 2 argument version of the function with the second argument
56- :
57+ : <code>
58 : {
59 : "prefix" : "Q{http://jsoniq.org/roundtrip}"
60 : "serialization-parameters" : <serialization-parameters xmlns="http://www.w3.org/2010/xslt-xquery-serialization"/>
61 : }
62+ : </code>
63 :
64 : Note: The computations are made with respect to the static context of the
65 : caller, so that the schema type definitions are available.
66@@ -121,12 +122,12 @@
67 : caller, so that the schema type definitions are available.
68 :
69 : Example:
70- : jn:encode-for-roundtrip(
71+ : <pre highlight-as="jsoniq">jn:encode-for-roundtrip(
72 : { "nan" : xs:double("NaN") },
73 : { "prefix" : "pre-" }
74- : )
75+ : )</pre>
76 : returns
77- : { "nan" : { "pre-type" : "xs:double", "pre-value" : "NaN" } }
78+ : <code>{ "nan" : { "pre-type" : "xs:double", "pre-value" : "NaN" } }</code>
79 :
80 : @param $items the items to be encoded.
81 : @param $options the encoding options.
82@@ -250,7 +251,7 @@
83 :
84 : Note: The function is equivalent to
85 :
86- : define function jn:flatten($args as item()*)
87+ : <pre highlight-as="jsoniq">define function jn:flatten($args as item()*)
88 : {
89 : for $arg in args
90 : return
91@@ -263,7 +264,7 @@
92 : else $value
93 : else
94 : $arg
95- : };
96+ : };</pre>
97 :
98 : @param $items A sequence of items
99 : @return The flattened-out items of the arrays in $items.
100
101=== modified file 'modules/store/static/indexes/dml.xq'
102--- modules/store/static/indexes/dml.xq 2013-12-03 23:39:47 +0000
103+++ modules/store/static/indexes/dml.xq 2014-02-04 12:29:13 +0000
104@@ -337,7 +337,7 @@
105 (:~
106 : Gets a sequence of all keys contained in the index with the given name.
107 : Each element has the following structure:
108- : <pre class="brush: xml;">
109+ : <pre highlight-as="xml">
110 : &lt;key xmlns="http://zorba.io/modules/store/static/indexes/dml"&gt;
111 : &lt;attribute value="key1_value"/&gt;
112 : &lt;attribute value="key2_value"/&gt;
113
114=== modified file 'modules/w3c/xpath_functions.xq'
115--- modules/w3c/xpath_functions.xq 2013-10-31 19:55:27 +0000
116+++ modules/w3c/xpath_functions.xq 2014-02-04 12:29:13 +0000
117@@ -249,7 +249,7 @@
118 : used in an environment where type annotations are not supported (for example, a Basic
119 : XSLT Processor), in which case the elements will all be annotated as
120 : <code>xs:untyped</code> and the attributes as <code>xs:untypedAtomic</code>.</p><note xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><p diff="add" at="M">A free-standing copy of this schema can be found at <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="analyze-string.xsd" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">analyze-string.xsd</loc></p></note><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">
121- : <eg xml:space="preserve">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
122+ : <pre highlight-as="xquery" xml:space="preserve">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
123 : &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
124 : targetNamespace="http://www.w3.org/2005/xpath-functions"
125 : xmlns:fn="http://www.w3.org/2005/xpath-functions"
126@@ -281,7 +281,7 @@
127 : &lt;/xs:complexType&gt;
128 :
129 : &lt;/xs:schema&gt;
130- : </eg>
131+ : </pre>
132 : </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0002"/> if the value of
133 : <code>$pattern</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0001"/> if the value of
134 : <code>$flags</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0003"/> if the supplied
135@@ -339,7 +339,7 @@
136 : used in an environment where type annotations are not supported (for example, a Basic
137 : XSLT Processor), in which case the elements will all be annotated as
138 : <code>xs:untyped</code> and the attributes as <code>xs:untypedAtomic</code>.</p><note xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><p diff="add" at="M">A free-standing copy of this schema can be found at <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="analyze-string.xsd" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">analyze-string.xsd</loc></p></note><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">
139- : <eg xml:space="preserve">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
140+ : <pre xml:space="preserve">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
141 : &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
142 : targetNamespace="http://www.w3.org/2005/xpath-functions"
143 : xmlns:fn="http://www.w3.org/2005/xpath-functions"
144@@ -371,7 +371,7 @@
145 : &lt;/xs:complexType&gt;
146 :
147 : &lt;/xs:schema&gt;
148- : </eg>
149+ : </pre>
150 : </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0002"/> if the value of
151 : <code>$pattern</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0001"/> if the value of
152 : <code>$flags</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0003"/> if the supplied
153@@ -833,10 +833,10 @@
154 :
155 : <p>For example, this arises when computing:</p>
156 :
157- : <eg xml:space="preserve"> distinct-values(
158+ : <pre highlight-as="xquery" xml:space="preserve"> distinct-values(
159 : (xs:float('1.0'),
160 : xs:decimal('1.0000000000100000000001',
161- : xs:double( '1.00000000001'))</eg>
162+ : xs:double( '1.00000000001'))</pre>
163 :
164 : <p>because the values of type <code>xs:float</code> and <code>xs:double</code> both
165 : compare equal to the value of type <code>xs:decimal</code> but not equal to each
166@@ -878,10 +878,10 @@
167 :
168 : <p>For example, this arises when computing:</p>
169 :
170- : <eg xml:space="preserve"> distinct-values(
171+ : <pre highlight-as="xquery" xml:space="preserve"> distinct-values(
172 : (xs:float('1.0'),
173 : xs:decimal('1.0000000000100000000001',
174- : xs:double( '1.00000000001'))</eg>
175+ : xs:double( '1.00000000001'))</pre>
176 :
177 : <p>because the values of type <code>xs:float</code> and <code>xs:double</code> both
178 : compare equal to the value of type <code>xs:decimal</code> but not equal to each
179@@ -902,7 +902,7 @@
180 : node, the function returns that document node.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="A-E26">The URI may include a fragment identifier.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">By default, this function is <termref def="deterministic">deterministic</termref>. Two calls on this function
181 : return the same document node if the same URI Reference (after resolution to an absolute
182 : URI Reference) is supplied to both calls. Thus, the following expression (if it does not
183- : raise an error) will always be true:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">doc("foo.xml") is doc("foo.xml")</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">However, for performance reasons, implementations may provide a user option to evaluate
184+ : raise an error) will always be true:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">doc("foo.xml") is doc("foo.xml")</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">However, for performance reasons, implementations may provide a user option to evaluate
185 : the function without a guarantee of determinism. The manner in which any such option is
186 : provided is implementation-defined. If the user has not selected such an option, a call
187 : of the function must either return a deterministic result or must raise a <phrase diff="add" at="L">dynamic</phrase> error
188@@ -1005,8 +1005,8 @@
189 : tokens is not a lexically valid <code>IDREF</code> (that is, if it is not
190 : lexically an <code>xs:NCName</code>), it is ignored. Formally, the
191 : candidate <code>IDREF</code> values are the strings in the sequence given
192- : by the expression:</p><eg xml:space="preserve">for $s in $arg return
193- : fn:tokenize(fn:normalize-space($s), ' ')[. castable as xs:IDREF]</eg></item></ulist></item><item><p> If several elements have the same <code>ID</code> value, then <code>E</code>
194+ : by the expression:</p><pre highlight-as="xquery" xml:space="preserve">for $s in $arg return
195+ : fn:tokenize(fn:normalize-space($s), ' ')[. castable as xs:IDREF]</pre></item></ulist></item><item><p> If several elements have the same <code>ID</code> value, then <code>E</code>
196 : is the one that is first in document order.</p></item></olist>
197 : </change><change xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="A-E31">
198 : <p>A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0001" type="dynamic"/> if
199@@ -1062,8 +1062,8 @@
200 : tokens is not a lexically valid <code>IDREF</code> (that is, if it is not
201 : lexically an <code>xs:NCName</code>), it is ignored. Formally, the
202 : candidate <code>IDREF</code> values are the strings in the sequence given
203- : by the expression:</p><eg xml:space="preserve">for $s in $arg return
204- : fn:tokenize(fn:normalize-space($s), ' ')[. castable as xs:IDREF]</eg></item></ulist></item><item><p> If several elements have the same <code>ID</code> value, then <code>E</code>
205+ : by the expression:</p><pre highlight-as="xquery" xml:space="preserve">for $s in $arg return
206+ : fn:tokenize(fn:normalize-space($s), ' ')[. castable as xs:IDREF]</pre></item></ulist></item><item><p> If several elements have the same <code>ID</code> value, then <code>E</code>
207 : is the one that is first in document order.</p></item></olist>
208 : </change><change xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="A-E31">
209 : <p>A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0001" type="dynamic"/> if
210@@ -1181,8 +1181,8 @@
211 : a try/catch construct in XSLT or XQuery, for example), or by the calling application or
212 : external processing environment. The way in which error information is returned to the
213 : external processing environment is <termref def="implementation-dependent"/></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>fn:error</code> is called with no arguments, then its behavior is the same as
214- : the function call: </p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:error(fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')) </eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$code</code> is the empty sequence then the effective value is the
215- : <code>xs:QName</code> constructed by:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">There are three pieces of information that may be associated with an error:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>The <code>$code</code> is an error code that distinguishes this error from others.
216+ : the function call: </p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:error(fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')) </pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$code</code> is the empty sequence then the effective value is the
217+ : <code>xs:QName</code> constructed by:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">There are three pieces of information that may be associated with an error:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>The <code>$code</code> is an error code that distinguishes this error from others.
218 : It is an <code>xs:QName</code>; the namespace URI conventionally identifies the
219 : component, subsystem, or authority responsible for defining the meaning of the
220 : error code, while the local part identifies the specific error condition. The
221@@ -1211,8 +1211,8 @@
222 : a try/catch construct in XSLT or XQuery, for example), or by the calling application or
223 : external processing environment. The way in which error information is returned to the
224 : external processing environment is <termref def="implementation-dependent"/></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>fn:error</code> is called with no arguments, then its behavior is the same as
225- : the function call: </p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:error(fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')) </eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$code</code> is the empty sequence then the effective value is the
226- : <code>xs:QName</code> constructed by:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">There are three pieces of information that may be associated with an error:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>The <code>$code</code> is an error code that distinguishes this error from others.
227+ : the function call: </p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:error(fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')) </pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$code</code> is the empty sequence then the effective value is the
228+ : <code>xs:QName</code> constructed by:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">There are three pieces of information that may be associated with an error:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>The <code>$code</code> is an error code that distinguishes this error from others.
229 : It is an <code>xs:QName</code>; the namespace URI conventionally identifies the
230 : component, subsystem, or authority responsible for defining the meaning of the
231 : error code, while the local part identifies the specific error condition. The
232@@ -1241,8 +1241,8 @@
233 : a try/catch construct in XSLT or XQuery, for example), or by the calling application or
234 : external processing environment. The way in which error information is returned to the
235 : external processing environment is <termref def="implementation-dependent"/></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>fn:error</code> is called with no arguments, then its behavior is the same as
236- : the function call: </p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:error(fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')) </eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$code</code> is the empty sequence then the effective value is the
237- : <code>xs:QName</code> constructed by:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">There are three pieces of information that may be associated with an error:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>The <code>$code</code> is an error code that distinguishes this error from others.
238+ : the function call: </p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:error(fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')) </pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$code</code> is the empty sequence then the effective value is the
239+ : <code>xs:QName</code> constructed by:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">There are three pieces of information that may be associated with an error:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>The <code>$code</code> is an error code that distinguishes this error from others.
240 : It is an <code>xs:QName</code>; the namespace URI conventionally identifies the
241 : component, subsystem, or authority responsible for defining the meaning of the
242 : error code, while the local part identifies the specific error condition. The
243@@ -1271,8 +1271,8 @@
244 : a try/catch construct in XSLT or XQuery, for example), or by the calling application or
245 : external processing environment. The way in which error information is returned to the
246 : external processing environment is <termref def="implementation-dependent"/></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>fn:error</code> is called with no arguments, then its behavior is the same as
247- : the function call: </p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:error(fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')) </eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$code</code> is the empty sequence then the effective value is the
248- : <code>xs:QName</code> constructed by:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">There are three pieces of information that may be associated with an error:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>The <code>$code</code> is an error code that distinguishes this error from others.
249+ : the function call: </p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:error(fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')) </pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$code</code> is the empty sequence then the effective value is the
250+ : <code>xs:QName</code> constructed by:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">There are three pieces of information that may be associated with an error:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>The <code>$code</code> is an error code that distinguishes this error from others.
251 : It is an <code>xs:QName</code>; the namespace URI conventionally identifies the
252 : component, subsystem, or authority responsible for defining the meaning of the
253 : error code, while the local part identifies the specific error condition. The
254@@ -1317,7 +1317,7 @@
255
256 (:~
257 : <div><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns those items from the sequence <var>$seq</var> for which the supplied
258- : function <var>$f</var> returns true.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="filter" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="seq" type="item()*"/><arg name="f" type="function(item()) as xs:boolean"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>, and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of the function is equivalent to the following implementation in XQuery:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
259+ : function <var>$f</var> returns true.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="filter" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="seq" type="item()*"/><arg name="f" type="function(item()) as xs:boolean"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>, and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of the function is equivalent to the following implementation in XQuery:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
260 : declare function fn:filter(
261 : $seq as item()*,
262 : $f as function(item()) as xs:boolean)
263@@ -1327,7 +1327,7 @@
264 : else ( fn:head($seq)[$f(.) eq fn:true()],
265 : fn:filter(fn:tail($seq), $f)
266 : )
267- : };</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">or its equivalent in XSLT:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
268+ : };</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">or its equivalent in XSLT:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
269 : &lt;xsl:function name="fn:filter" as="item()*"&gt;
270 : &lt;xsl:param name="seq" as="item()*"/&gt;
271 : &lt;xsl:param name="f" as="function(item()) as xs:boolean"/&gt;
272@@ -1335,7 +1335,7 @@
273 : &lt;xsl:sequence select="fn:head($seq)[$f(.) eq fn:true()], fn:filter(fn:tail($seq), $f)"/&gt;
274 : &lt;/xsl:if&gt;
275 : &lt;/xsl:function&gt;
276- : </eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">As a consequence of the function signature and the function calling
277+ : </pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">As a consequence of the function signature and the function calling
278 : rules, a type error occurs if the supplied function <var>$f</var> returns anything other
279 : than a single <code>xs:boolean</code> item; there is no conversion to an effective
280 : boolean value.</p></div>
281@@ -1360,7 +1360,7 @@
282
283 (:~
284 : <div><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Processes the supplied sequence from left to right, applying the supplied
285- : function repeatedly to each item in turn, together with an accumulated result value.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="fold-left" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="seq" type="item()*"/><arg name="zero" type="item()*"/><arg name="f" type="function(item()*, item()) as item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>, and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of the function is equivalent to the following implementation in XQuery:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
286+ : function repeatedly to each item in turn, together with an accumulated result value.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="fold-left" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="seq" type="item()*"/><arg name="zero" type="item()*"/><arg name="f" type="function(item()*, item()) as item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>, and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of the function is equivalent to the following implementation in XQuery:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
287 : declare function fn:fold-left(
288 : $seq as item()*
289 : $zero as item()*,
290@@ -1369,7 +1369,7 @@
291 : if (fn:empty($seq))
292 : then $zero
293 : else fn:fold-left(fn:tail($seq), $f($zero, fn:head($seq)), $f)
294- : };</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">or its equivalent in XSLT:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
295+ : };</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">or its equivalent in XSLT:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
296 : &lt;xsl:function name="fn:fold-left" as="item()*"&gt;
297 : &lt;xsl:param name="seq" as="item()*"/&gt;
298 : &lt;xsl:param name="zero" as="item()*"/&gt;
299@@ -1383,7 +1383,7 @@
300 : &lt;/xsl:otherwise&gt;
301 : &lt;/xsl:choose&gt;
302 : &lt;/xsl:function&gt;
303- : </eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">As a consequence of the function signature and the function calling
304+ : </pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">As a consequence of the function signature and the function calling
305 : rules, a type error occurs if the supplied function <var>$f</var> cannot be applied to
306 : two arguments, where the first argument is either the value of <var>$zero</var> or the
307 : result of a previous application of <var>$f</var>, and the second is <var>$seq</var> or
308@@ -1395,7 +1395,7 @@
309
310 (:~
311 : <div><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Processes the supplied sequence from right to left, applying the supplied
312- : function repeatedly to each item in turn, together with an accumulated result value.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="fold-right" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="seq" type="item()*"/><arg name="zero" type="item()*"/><arg name="f" type="function(item()*, item()) as item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>, and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of the function is equivalent to the following implementation in XQuery:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
313+ : function repeatedly to each item in turn, together with an accumulated result value.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="fold-right" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="seq" type="item()*"/><arg name="zero" type="item()*"/><arg name="f" type="function(item()*, item()) as item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>, and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of the function is equivalent to the following implementation in XQuery:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
314 : declare function fn:fold-right(
315 : $seq as item()*,
316 : $zero as item()*,
317@@ -1404,7 +1404,7 @@
318 : if (fn:empty($seq))
319 : then $zero
320 : else $f(fn:head($seq), fn:fold-right(fn:tail($seq), $zero, $f))
321- : };</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">or its equivalent in XSLT:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
322+ : };</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">or its equivalent in XSLT:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
323 : &lt;xsl:function name="fn:fold-right" as="item()*"&gt;
324 : &lt;xsl:param name="seq" as="item()*"/&gt;
325 : &lt;xsl:param name="zero" as="item()*"/&gt;
326@@ -1418,7 +1418,7 @@
327 : &lt;/xsl:otherwise&gt;
328 : &lt;/xsl:choose&gt;
329 : &lt;/xsl:function&gt;
330- : </eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">As a consequence of the function signature and the function calling
331+ : </pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">As a consequence of the function signature and the function calling
332 : rules, a type error occurs if the supplied function <var>$f</var> cannot be applied to
333 : two arguments, where the first argument is any item in the sequence <var>$seq</var>, and
334 : the second is either the value of <var>$zero</var> or the result of a previous
335@@ -1618,8 +1618,8 @@
336 : modifier are supported. If ordinal numbering is not supported for the combination of the
337 : format token, the language, and the string appearing in parentheses, the request is
338 : ignored and cardinal numbers are generated instead.</p><example xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><head>Ordinal Numbering in Italian</head><p>The specification <code>"1;o(-º)"</code> with <code>$lang</code> equal to
339- : <code>it</code>, if supported, should produce the sequence:</p><eg xml:space="preserve">1º 2º 3º 4º ...</eg><p>The specification <code>"Ww;o"</code> with <code>$lang</code> equal to
340- : <code>it</code>, if supported, should produce the sequence:</p><eg xml:space="preserve">Primo Secondo Terzo Quarto Quinto ...</eg></example><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <phrase diff="chg" at="G">use of the <code>a</code> or <code>t</code>
341+ : <code>it</code>, if supported, should produce the sequence:</p><pre highlight-as="xquery" xml:space="preserve">1º 2º 3º 4º ...</pre><p>The specification <code>"Ww;o"</code> with <code>$lang</code> equal to
342+ : <code>it</code>, if supported, should produce the sequence:</p><pre highlight-as="xquery" xml:space="preserve">Primo Secondo Terzo Quarto Quinto ...</pre></example><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <phrase diff="chg" at="G">use of the <code>a</code> or <code>t</code>
343 : modifier</phrase> disambiguates between numbering sequences that use letters. In many
344 : languages there are two commonly used numbering sequences that use letters. One
345 : numbering sequence assigns numeric values to letters in alphabetic sequence, and the
346@@ -1782,8 +1782,8 @@
347 : modifier are supported. If ordinal numbering is not supported for the combination of the
348 : format token, the language, and the string appearing in parentheses, the request is
349 : ignored and cardinal numbers are generated instead.</p><example xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><head>Ordinal Numbering in Italian</head><p>The specification <code>"1;o(-º)"</code> with <code>$lang</code> equal to
350- : <code>it</code>, if supported, should produce the sequence:</p><eg xml:space="preserve">1º 2º 3º 4º ...</eg><p>The specification <code>"Ww;o"</code> with <code>$lang</code> equal to
351- : <code>it</code>, if supported, should produce the sequence:</p><eg xml:space="preserve">Primo Secondo Terzo Quarto Quinto ...</eg></example><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <phrase diff="chg" at="G">use of the <code>a</code> or <code>t</code>
352+ : <code>it</code>, if supported, should produce the sequence:</p><pre highlight-as="xquery" xml:space="preserve">1º 2º 3º 4º ...</pre><p>The specification <code>"Ww;o"</code> with <code>$lang</code> equal to
353+ : <code>it</code>, if supported, should produce the sequence:</p><pre highlight-as="xquery" xml:space="preserve">Primo Secondo Terzo Quarto Quinto ...</pre></example><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <phrase diff="chg" at="G">use of the <code>a</code> or <code>t</code>
354 : modifier</phrase> disambiguates between numbering sequences that use letters. In many
355 : languages there are two commonly used numbering sequences that use letters. One
356 : numbering sequence assigns numeric values to letters in alphabetic sequence, and the
357@@ -2008,8 +2008,8 @@
358 : lexically valid <code>IDREF</code> (that is, if it is not lexically an
359 : <code>xs:NCName</code>), it is ignored. Formally, the candidate
360 : <code>IDREF</code> values are the strings in the sequence given by the
361- : expression:</p><eg xml:space="preserve">for $s in $arg return
362- : fn:tokenize(fn:normalize-space($s), ' ')[. castable as xs:IDREF]</eg></item></ulist></item><item><p>If several elements have the same <code>ID</code> value, then <code>E</code> is
363+ : expression:</p><pre highlight-as="xquery" xml:space="preserve">for $s in $arg return
364+ : fn:tokenize(fn:normalize-space($s), ' ')[. castable as xs:IDREF]</pre></item></ulist></item><item><p>If several elements have the same <code>ID</code> value, then <code>E</code> is
365 : the one that is first in document order.</p></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0001" type="dynamic"/> if
366 : <code>$node</code>, or the context item if the second argument is absent, is a node
367 : in a tree whose root is not a document node.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$node</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context
368@@ -2048,8 +2048,8 @@
369 : lexically valid <code>IDREF</code> (that is, if it is not lexically an
370 : <code>xs:NCName</code>), it is ignored. Formally, the candidate
371 : <code>IDREF</code> values are the strings in the sequence given by the
372- : expression:</p><eg xml:space="preserve">for $s in $arg return
373- : fn:tokenize(fn:normalize-space($s), ' ')[. castable as xs:IDREF]</eg></item></ulist></item><item><p>If several elements have the same <code>ID</code> value, then <code>E</code> is
374+ : expression:</p><pre highlight-as="xquery" xml:space="preserve">for $s in $arg return
375+ : fn:tokenize(fn:normalize-space($s), ' ')[. castable as xs:IDREF]</pre></item></ulist></item><item><p>If several elements have the same <code>ID</code> value, then <code>E</code> is
376 : the one that is first in document order.</p></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0001" type="dynamic"/> if
377 : <code>$node</code>, or the context item if the second argument is absent, is a node
378 : in a tree whose root is not a document node.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$node</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context
379@@ -2072,7 +2072,7 @@
380 : function if <code>$node</code> is omitted is exactly the same as if the context
381 : item had been passed as <code>$node</code>.</p></item><item><p><code>$N</code> has an <code>IDREF</code> value equal to one of the candidate
382 : <code>ID</code> values, where:</p><ulist><item><p>A node <code>$N</code> has an <code>IDREF</code> value equal to
383- : <code>V</code> if both of the following conditions are true:</p><ulist><item><p>The <code>is-idrefs</code> property (see <xspecref spec="DM30" ref="dm-is-idrefs"/>) of <code>$N</code> is <code>true</code>.</p></item><item><p>The sequence <!--Text replaced by erratum E29 change 1"--><eg diff="chg" at="A-E29" xml:space="preserve">fn:tokenize(fn:normalize-space(fn:string($N)), ' ')</eg>
384+ : <code>V</code> if both of the following conditions are true:</p><ulist><item><p>The <code>is-idrefs</code> property (see <xspecref spec="DM30" ref="dm-is-idrefs"/>) of <code>$N</code> is <code>true</code>.</p></item><item><p>The sequence <!--Text replaced by erratum E29 change 1"--><pre highlight-as="xquery" diff="chg" at="A-E29" xml:space="preserve">fn:tokenize(fn:normalize-space(fn:string($N)), ' ')</pre>
385 : <!--End of text replaced by erratum E29--> contains a string that is
386 : equal to <code>V</code> under the rules of the <code>eq</code>
387 : operator using the Unicode code point collation
388@@ -2082,7 +2082,7 @@
389 : in <code>$arg</code> is not a lexically valid <code>xs:ID</code> (that is,
390 : if it is not lexically an <code>xs:NCName</code>), it is ignored. More
391 : formally, the candidate <code>ID</code> values are the strings in the
392- : sequence:</p><eg xml:space="preserve">$arg[. castable as xs:NCName]</eg></item></ulist></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0001" type="dynamic"/> if
393+ : sequence:</p><pre highlight-as="xquery" xml:space="preserve">$arg[. castable as xs:NCName]</pre></item></ulist></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0001" type="dynamic"/> if
394 : <code>$node</code>, or the context item if the second argument is omitted, is a node
395 : in a tree whose root is not a document node. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$node</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context
396 : item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>
397@@ -2104,7 +2104,7 @@
398 : function if <code>$node</code> is omitted is exactly the same as if the context
399 : item had been passed as <code>$node</code>.</p></item><item><p><code>$N</code> has an <code>IDREF</code> value equal to one of the candidate
400 : <code>ID</code> values, where:</p><ulist><item><p>A node <code>$N</code> has an <code>IDREF</code> value equal to
401- : <code>V</code> if both of the following conditions are true:</p><ulist><item><p>The <code>is-idrefs</code> property (see <xspecref spec="DM30" ref="dm-is-idrefs"/>) of <code>$N</code> is <code>true</code>.</p></item><item><p>The sequence <!--Text replaced by erratum E29 change 1"--><eg diff="chg" at="A-E29" xml:space="preserve">fn:tokenize(fn:normalize-space(fn:string($N)), ' ')</eg>
402+ : <code>V</code> if both of the following conditions are true:</p><ulist><item><p>The <code>is-idrefs</code> property (see <xspecref spec="DM30" ref="dm-is-idrefs"/>) of <code>$N</code> is <code>true</code>.</p></item><item><p>The sequence <!--Text replaced by erratum E29 change 1"--><pre highlight-as="xquery" diff="chg" at="A-E29" xml:space="preserve">fn:tokenize(fn:normalize-space(fn:string($N)), ' ')</pre>
403 : <!--End of text replaced by erratum E29--> contains a string that is
404 : equal to <code>V</code> under the rules of the <code>eq</code>
405 : operator using the Unicode code point collation
406@@ -2114,7 +2114,7 @@
407 : in <code>$arg</code> is not a lexically valid <code>xs:ID</code> (that is,
408 : if it is not lexically an <code>xs:NCName</code>), it is ignored. More
409 : formally, the candidate <code>ID</code> values are the strings in the
410- : sequence:</p><eg xml:space="preserve">$arg[. castable as xs:NCName]</eg></item></ulist></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0001" type="dynamic"/> if
411+ : sequence:</p><pre highlight-as="xquery" xml:space="preserve">$arg[. castable as xs:NCName]</pre></item></ulist></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0001" type="dynamic"/> if
412 : <code>$node</code>, or the context item if the second argument is omitted, is a node
413 : in a tree whose root is not a document node. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$node</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context
414 : item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>
415@@ -2240,12 +2240,12 @@
416 (:~
417 : <div><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Applies the function item <var>$f</var> to every item from the sequence
418 : <var>$seq</var> in turn, returning the concatenation of the resulting sequences in
419- : order.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="for-each" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="seq" type="item()*"/><arg name="f" type="function(item()) as item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>, and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of the function is equivalent to the following implementation in XQuery:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
420+ : order.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="for-each" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="seq" type="item()*"/><arg name="f" type="function(item()) as item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>, and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of the function is equivalent to the following implementation in XQuery:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
421 : declare function fn:for-each($seq, $f) {
422 : if (fn:empty($seq))
423 : then ()
424 : else ($f(fn:head($seq)), fn:for-each(fn:tail($seq), $f))
425- : };</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">or its equivalent in XSLT:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
426+ : };</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">or its equivalent in XSLT:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
427 : &lt;xsl:function name="fn:for-each"&gt;
428 : &lt;xsl:param name="seq"/&gt;
429 : &lt;xsl:param name="f"/&gt;
430@@ -2253,7 +2253,7 @@
431 : &lt;xsl:sequence select="$f(fn:head($seq)), fn:for-each(fn:tail($seq), $f)"/&gt;
432 : &lt;/xsl:if&gt;
433 : &lt;/xsl:function&gt;
434- : </eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function call <code>fn:for-each($SEQ, $F)</code> is equivalent to the expression
435+ : </pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function call <code>fn:for-each($SEQ, $F)</code> is equivalent to the expression
436 : <code>for $i in $SEQ return $F($i)</code><phrase diff="add" at="G">, assuming that
437 : ordering mode is <code>ordered</code>.</phrase></p></div>
438 :
439@@ -2264,7 +2264,7 @@
440 (:~
441 : <div><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Applies the function item <var>$f</var> to successive pairs of items taken one
442 : from <var>$seq1</var> and one from <var>$seq2</var>, returning the concatenation of the
443- : resulting sequences in order.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="for-each-pair" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="seq1" type="item()*"/><arg name="seq2" type="item()*"/><arg name="f" type="function(item(), item()) as item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>, and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of the function is equivalent to the following implementation in XQuery:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
444+ : resulting sequences in order.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="for-each-pair" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="seq1" type="item()*"/><arg name="seq2" type="item()*"/><arg name="f" type="function(item(), item()) as item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>, and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of the function is equivalent to the following implementation in XQuery:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
445 : declare function fn:for-each-pair($seq1, $seq2, $f)
446 : {
447 : if(fn:exists($seq1) and fn:exists($seq2))
448@@ -2273,7 +2273,7 @@
449 : fn:for-each-pair(fn:tail($seq1), fn:tail($seq2), $f)
450 : )
451 : else ()
452- : };</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">or its equivalent in XSLT:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
453+ : };</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">or its equivalent in XSLT:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
454 : &lt;xsl:function name="fn:for-each-pair"&gt;
455 : &lt;xsl:param name="seq1/&gt;
456 : &lt;xsl:param name="seq2/&gt;
457@@ -2283,7 +2283,7 @@
458 : &lt;xsl:sequence select="fn:for-each-pair(fn:tail($seq1), fn:tail($seq2), $f)"/&gt;
459 : &lt;/xsl:if&gt;
460 : &lt;/xsl:function&gt;
461- : </eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:for-each-pair(("a", "b", "c"), ("x", "y", "z"), concat#2)</code> returns <code>("ax", "by", "cz")</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:for-each-pair(1 to 5, 1 to 5, function($a, $b){10*$a + $b}</code> returns <code>(11, 22, 33, 44, 55)</code>.</p></div>
462+ : </pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:for-each-pair(("a", "b", "c"), ("x", "y", "z"), concat#2)</code> returns <code>("ax", "by", "cz")</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:for-each-pair(1 to 5, 1 to 5, function($a, $b){10*$a + $b}</code> returns <code>(11, 22, 33, 44, 55)</code>.</p></div>
463 :
464 : @see http://www.w3.org/TR/xpath-functions-30/#func-for-each-pair
465 :)
466@@ -2343,10 +2343,10 @@
467 : type <code>xs:string</code> or types derived by restriction from <code>xs:string</code>,
468 : then the determination of the item with the smallest value is made according to the
469 : collation that is used. If the type of the items in the <phrase diff="chg" at="A-E47">converted sequence</phrase> is not <code>xs:string</code> and
470- : <code>$collation</code> is specified, the collation is ignored.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the result of the expression:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
471+ : <code>$collation</code> is specified, the collation is ignored.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the result of the expression:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
472 : if (every $v in $c satisfies $c[1] ge $v)
473 : then $c[1]
474- : else fn:max(fn:subsequence($c, 2))</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">evaluated with <code>$collation</code> as the default collation if specified, and with
475+ : else fn:max(fn:subsequence($c, 2))</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">evaluated with <code>$collation</code> as the default collation if specified, and with
476 : <code>$c</code> as the converted sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A type error is raised <errorref class="RG" code="0006"/> if the input sequence contains
477 : items of incompatible types, as described above.</p></div>
478 :
479@@ -2376,10 +2376,10 @@
480 : type <code>xs:string</code> or types derived by restriction from <code>xs:string</code>,
481 : then the determination of the item with the smallest value is made according to the
482 : collation that is used. If the type of the items in the <phrase diff="chg" at="A-E47">converted sequence</phrase> is not <code>xs:string</code> and
483- : <code>$collation</code> is specified, the collation is ignored.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the result of the expression:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
484+ : <code>$collation</code> is specified, the collation is ignored.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the result of the expression:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
485 : if (every $v in $c satisfies $c[1] ge $v)
486 : then $c[1]
487- : else fn:max(fn:subsequence($c, 2))</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">evaluated with <code>$collation</code> as the default collation if specified, and with
488+ : else fn:max(fn:subsequence($c, 2))</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">evaluated with <code>$collation</code> as the default collation if specified, and with
489 : <code>$c</code> as the converted sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A type error is raised <errorref class="RG" code="0006"/> if the input sequence contains
490 : items of incompatible types, as described above.</p></div>
491 :
492@@ -2409,10 +2409,10 @@
493 : type <code>xs:string</code> or types derived by restriction from <code>xs:string</code>,
494 : then the determination of the item with the smallest value is made according to the
495 : collation that is used. If the type of the items in the <phrase diff="chg" at="A-E47">converted sequence</phrase> is not <code>xs:string</code> and
496- : <code>$collation</code> is specified, the collation is ignored.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the result of the expression:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
497+ : <code>$collation</code> is specified, the collation is ignored.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the result of the expression:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
498 : if (every $v in $c satisfies $c[1] le $v)
499 : then $c[1]
500- : else fn:min(fn:subsequence($c, 2))</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">evaluated with <code>$collation</code> as the default collation if specified, and with
501+ : else fn:min(fn:subsequence($c, 2))</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">evaluated with <code>$collation</code> as the default collation if specified, and with
502 : <code>$c</code> as the converted sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A type error is raised <errorref class="RG" code="0006"/> if the input sequence contains
503 : items of incompatible types, as described above.</p></div>
504 :
505@@ -2442,10 +2442,10 @@
506 : type <code>xs:string</code> or types derived by restriction from <code>xs:string</code>,
507 : then the determination of the item with the smallest value is made according to the
508 : collation that is used. If the type of the items in the <phrase diff="chg" at="A-E47">converted sequence</phrase> is not <code>xs:string</code> and
509- : <code>$collation</code> is specified, the collation is ignored.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the result of the expression:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
510+ : <code>$collation</code> is specified, the collation is ignored.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the result of the expression:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
511 : if (every $v in $c satisfies $c[1] le $v)
512 : then $c[1]
513- : else fn:min(fn:subsequence($c, 2))</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">evaluated with <code>$collation</code> as the default collation if specified, and with
514+ : else fn:min(fn:subsequence($c, 2))</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">evaluated with <code>$collation</code> as the default collation if specified, and with
515 : <code>$c</code> as the converted sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A type error is raised <errorref class="RG" code="0006"/> if the input sequence contains
516 : items of incompatible types, as described above.</p></div>
517 :
518@@ -2508,10 +2508,10 @@
519 : sequence, then if <code>$element</code> has a default namespace (that is, a namespace
520 : node with no name), the function returns the namespace URI of the default namespace. If
521 : <code>$element</code> has no default namespace, the function returns the empty
522- : sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Prefixes are equal only if their Unicode codepoints match exactly.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">let <code>$e</code> := <eg xml:space="preserve">
523+ : sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Prefixes are equal only if their Unicode codepoints match exactly.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">let <code>$e</code> := <pre highlight-as="xquery" xml:space="preserve">
524 : &lt;z:a xmlns="http://example.org/one" xmlns:z="http://example.org/two"&gt;
525 : &lt;b xmlns=""/&gt;
526- : &lt;/z:a&gt;</eg></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:namespace-uri-for-prefix("z", $e)</code> returns <code>"http://example.org/two"</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:namespace-uri-for-prefix("", $e)</code> returns <code>"http://example.org/one"</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:namespace-uri-for-prefix((), $e)</code> returns <code>"http://example.org/one"</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:namespace-uri-for-prefix("xml", $e)</code> returns <code>"http://www.w3.org/XML/1998/namespace"</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:namespace-uri-for-prefix("xml", $e)</code> returns <code>"http://www.w3.org/XML/1998/namespace"</code>.</p></div>
527+ : &lt;/z:a&gt;</pre></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:namespace-uri-for-prefix("z", $e)</code> returns <code>"http://example.org/two"</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:namespace-uri-for-prefix("", $e)</code> returns <code>"http://example.org/one"</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:namespace-uri-for-prefix((), $e)</code> returns <code>"http://example.org/one"</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:namespace-uri-for-prefix("xml", $e)</code> returns <code>"http://www.w3.org/XML/1998/namespace"</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:namespace-uri-for-prefix("xml", $e)</code> returns <code>"http://www.w3.org/XML/1998/namespace"</code>.</p></div>
528 :
529 : @see http://www.w3.org/TR/xpath-functions-30/#func-namespace-uri-for-prefix
530 :)
531@@ -2802,7 +2802,7 @@
532 : character within the replacement string must be written as <code>\$</code>, and a
533 : literal <code>\</code> character must be written as <code>\\</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If two alternatives within the pattern both match at the same position in the
534 : <code>$input</code>, then the match that is chosen is the one matched by the first
535- : alternative. For example:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:replace("abcd", "(ab)|(a)", "[1=$1][2=$2]") returns "[1=ab][2=]cd"</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0002"/> if the value of
536+ : alternative. For example:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:replace("abcd", "(ab)|(a)", "[1=$1][2=$2]") returns "[1=ab][2=]cd"</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0002"/> if the value of
537 : <code>$pattern</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0001"/> if the value of
538 : <code>$flags</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0003"/> if the pattern matches a
539 : zero-length string, that is, if the expression <code>fn:matches("", $pattern,
540@@ -2858,7 +2858,7 @@
541 : character within the replacement string must be written as <code>\$</code>, and a
542 : literal <code>\</code> character must be written as <code>\\</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If two alternatives within the pattern both match at the same position in the
543 : <code>$input</code>, then the match that is chosen is the one matched by the first
544- : alternative. For example:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:replace("abcd", "(ab)|(a)", "[1=$1][2=$2]") returns "[1=ab][2=]cd"</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0002"/> if the value of
545+ : alternative. For example:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:replace("abcd", "(ab)|(a)", "[1=$1][2=$2]") returns "[1=ab][2=]cd"</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0002"/> if the value of
546 : <code>$pattern</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0001"/> if the value of
547 : <code>$flags</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0003"/> if the pattern matches a
548 : zero-length string, that is, if the expression <code>fn:matches("", $pattern,
549@@ -3214,8 +3214,8 @@
550 : <div><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the contiguous sequence of items in the value of
551 : <code>$sourceSeq</code> beginning at the position indicated by the value of
552 : <code>$startingLoc</code> and continuing for the number of items indicated by the
553- : value of <code>$length</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="subsequence" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="sourceSeq" type="item()*"/><arg name="startingLoc" type="xs:double"/></proto></example><example role="signature"><proto name="subsequence" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="sourceSeq" type="item()*"/><arg name="startingLoc" type="xs:double"/><arg name="length" type="xs:double"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>, and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In the two-argument case, returns:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E2" xml:space="preserve">$sourceSeq[fn:round($startingLoc) le position()]</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In the three-argument case, returns:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E2" xml:space="preserve">$sourceSeq[fn:round($startingLoc) le position()
554- : and position() lt fn:round($startingLoc) + fn:round($length)]</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The first item of a sequence is located at position 1, not position 0.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$sourceSeq</code> is the empty sequence, the empty sequence is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$startingLoc</code> is zero or negative, the subsequence includes items from
555+ : value of <code>$length</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="subsequence" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="sourceSeq" type="item()*"/><arg name="startingLoc" type="xs:double"/></proto></example><example role="signature"><proto name="subsequence" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="sourceSeq" type="item()*"/><arg name="startingLoc" type="xs:double"/><arg name="length" type="xs:double"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>, and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In the two-argument case, returns:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E2" xml:space="preserve">$sourceSeq[fn:round($startingLoc) le position()]</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In the three-argument case, returns:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E2" xml:space="preserve">$sourceSeq[fn:round($startingLoc) le position()
556+ : and position() lt fn:round($startingLoc) + fn:round($length)]</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The first item of a sequence is located at position 1, not position 0.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$sourceSeq</code> is the empty sequence, the empty sequence is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$startingLoc</code> is zero or negative, the subsequence includes items from
557 : the beginning of the <code>$sourceSeq</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$length</code> is not specified, the subsequence includes items to the end of
558 : <code>$sourceSeq</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$length</code> is greater than the number of items in the value of
559 : <code>$sourceSeq</code> following <code>$startingLoc</code>, the subsequence includes
560@@ -3236,8 +3236,8 @@
561 : <div><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the contiguous sequence of items in the value of
562 : <code>$sourceSeq</code> beginning at the position indicated by the value of
563 : <code>$startingLoc</code> and continuing for the number of items indicated by the
564- : value of <code>$length</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="subsequence" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="sourceSeq" type="item()*"/><arg name="startingLoc" type="xs:double"/></proto></example><example role="signature"><proto name="subsequence" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="sourceSeq" type="item()*"/><arg name="startingLoc" type="xs:double"/><arg name="length" type="xs:double"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>, and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In the two-argument case, returns:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E2" xml:space="preserve">$sourceSeq[fn:round($startingLoc) le position()]</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In the three-argument case, returns:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E2" xml:space="preserve">$sourceSeq[fn:round($startingLoc) le position()
565- : and position() lt fn:round($startingLoc) + fn:round($length)]</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The first item of a sequence is located at position 1, not position 0.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$sourceSeq</code> is the empty sequence, the empty sequence is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$startingLoc</code> is zero or negative, the subsequence includes items from
566+ : value of <code>$length</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="subsequence" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="sourceSeq" type="item()*"/><arg name="startingLoc" type="xs:double"/></proto></example><example role="signature"><proto name="subsequence" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="sourceSeq" type="item()*"/><arg name="startingLoc" type="xs:double"/><arg name="length" type="xs:double"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>, and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In the two-argument case, returns:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E2" xml:space="preserve">$sourceSeq[fn:round($startingLoc) le position()]</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In the three-argument case, returns:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E2" xml:space="preserve">$sourceSeq[fn:round($startingLoc) le position()
567+ : and position() lt fn:round($startingLoc) + fn:round($length)]</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The first item of a sequence is located at position 1, not position 0.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$sourceSeq</code> is the empty sequence, the empty sequence is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$startingLoc</code> is zero or negative, the subsequence includes items from
568 : the beginning of the <code>$sourceSeq</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$length</code> is not specified, the subsequence includes items to the end of
569 : <code>$sourceSeq</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$length</code> is greater than the number of items in the value of
570 : <code>$sourceSeq</code> following <code>$startingLoc</code>, the subsequence includes
571@@ -3398,13 +3398,13 @@
572 : common type. The sum of a sequence of integers will therefore be an integer, while the
573 : sum of a numeric sequence that includes at least one <code>xs:double</code> will be an
574 : <code>xs:double</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result of the function, using the second signature, is the result of the
575- : expression:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
576+ : expression:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
577 : if (fn:count($c) eq 0) then
578 : $zero
579 : else if (fn:count($c) eq 1) then
580 : $c[1]
581 : else
582- : $c[1] + fn:sum(subsequence($c, 2))</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">where <code>$c</code> is the converted sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result of the function, using the first signature, is the result of the expression:
583+ : $c[1] + fn:sum(subsequence($c, 2))</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">where <code>$c</code> is the converted sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result of the function, using the first signature, is the result of the expression:
584 : <code>fn:sum($arg, 0)</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A type error is raised <errorref class="RG" code="0006"/> if the input sequence contains
585 : items of incompatible types, as described above.</p></div>
586 :
587@@ -3428,13 +3428,13 @@
588 : common type. The sum of a sequence of integers will therefore be an integer, while the
589 : sum of a numeric sequence that includes at least one <code>xs:double</code> will be an
590 : <code>xs:double</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result of the function, using the second signature, is the result of the
591- : expression:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
592+ : expression:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">
593 : if (fn:count($c) eq 0) then
594 : $zero
595 : else if (fn:count($c) eq 1) then
596 : $c[1]
597 : else
598- : $c[1] + fn:sum(subsequence($c, 2))</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">where <code>$c</code> is the converted sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result of the function, using the first signature, is the result of the expression:
599+ : $c[1] + fn:sum(subsequence($c, 2))</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">where <code>$c</code> is the converted sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result of the function, using the first signature, is the result of the expression:
600 : <code>fn:sum($arg, 0)</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A type error is raised <errorref class="RG" code="0006"/> if the input sequence contains
601 : items of incompatible types, as described above.</p></div>
602 :
603@@ -3498,7 +3498,7 @@
604 : the result sequence if a separator occurs at the end of the <code>$input</code> string,
605 : or if two adjacent substrings match the supplied <code>$pattern</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If two alternatives within the supplied <code>$pattern</code> both match at the same
606 : position in the <code>$input</code> string, then the match that is chosen is the first.
607- : For example:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:tokenize("abracadabra", "(ab)|(a)") returns ("", "r", "c", "d", "r", "")</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0002"/> if the value of
608+ : For example:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:tokenize("abracadabra", "(ab)|(a)") returns ("", "r", "c", "d", "r", "")</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0002"/> if the value of
609 : <code>$pattern</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0001"/> if the value of
610 : <code>$flags</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0003"/> if the supplied
611 : <code>$pattern</code> matches a zero-length string, that is, if <code>fn:matches("",
612@@ -3523,7 +3523,7 @@
613 : the result sequence if a separator occurs at the end of the <code>$input</code> string,
614 : or if two adjacent substrings match the supplied <code>$pattern</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If two alternatives within the supplied <code>$pattern</code> both match at the same
615 : position in the <code>$input</code> string, then the match that is chosen is the first.
616- : For example:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:tokenize("abracadabra", "(ab)|(a)") returns ("", "r", "c", "d", "r", "")</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0002"/> if the value of
617+ : For example:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:tokenize("abracadabra", "(ab)|(a)") returns ("", "r", "c", "d", "r", "")</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0002"/> if the value of
618 : <code>$pattern</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0001"/> if the value of
619 : <code>$flags</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0003"/> if the supplied
620 : <code>$pattern</code> matches a zero-length string, that is, if <code>fn:matches("",
621@@ -4182,7 +4182,7 @@
622 : <code>xml:lang</code> attribute. If there is no such ancestor, then the function
623 : returns <code>false</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$testlang</code> is the empty sequence it is interpreted as the zero-length
624 : string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The relevant <code>xml:lang</code> attribute is determined by the value of the XPath
625- : expression:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">(ancestor-or-self::*/@xml:lang)[last()]</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If this expression returns an empty sequence, the function returns <code>false</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns <code>true</code> if and only if, based on a caseless
626+ : expression:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">(ancestor-or-self::*/@xml:lang)[last()]</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If this expression returns an empty sequence, the function returns <code>false</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns <code>true</code> if and only if, based on a caseless
627 : default match as specified in section 3.13 of <bibref ref="Unicode"/>, either:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p diff="chg" at="A-E16">
628 : <code>$testlang</code> is equal to the string-value of the relevant
629 : <code>xml:lang</code> attribute, or</p></item><item><p diff="chg" at="A-E16">
630@@ -4210,7 +4210,7 @@
631 : <code>xml:lang</code> attribute. If there is no such ancestor, then the function
632 : returns <code>false</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$testlang</code> is the empty sequence it is interpreted as the zero-length
633 : string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The relevant <code>xml:lang</code> attribute is determined by the value of the XPath
634- : expression:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">(ancestor-or-self::*/@xml:lang)[last()]</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If this expression returns an empty sequence, the function returns <code>false</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns <code>true</code> if and only if, based on a caseless
635+ : expression:</p><pre highlight-as="xquery" xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">(ancestor-or-self::*/@xml:lang)[last()]</pre><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If this expression returns an empty sequence, the function returns <code>false</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns <code>true</code> if and only if, based on a caseless
636 : default match as specified in section 3.13 of <bibref ref="Unicode"/>, either:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p diff="chg" at="A-E16">
637 : <code>$testlang</code> is equal to the string-value of the relevant
638 : <code>xml:lang</code> attribute, or</p></item><item><p diff="chg" at="A-E16">

Subscribers

People subscribed via source and target branches