fn:outermost($seq as node()*) as node()*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:outermost(node()*) as node()*
Returns the outermost nodes of the input sequence that are not ancestors of any other
node in the input sequence
@@ -748,7 +748,7 @@
@@ -748,7 +748,7 @@
fn:innermost($seq as node()*) as node()*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:innermost(node()*) as node()*
Returns the innermost nodes of the input sequence that are not descendants of any other
node in the input sequence
@@ -783,7 +783,7 @@
@@ -783,7 +783,7 @@
fn:has-children($arg as node()?) as xs:boolean
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:has-children(node()?) as xs:boolean
Returns true if the specified node has one or more children, otherwise returns false
Arguments and return type: @@ -817,7 +817,7 @@
Arguments and return type: @@ -817,7 +817,7 @@
fn:path($arg as node()?) as xs:string
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:path(node()?) as xs:string
Returns a string that represents the path of the specified node within the XML
document
@@ -852,7 +852,7 @@
@@ -852,7 +852,7 @@
fn:root($arg as node()?) as node()?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:root(node()?) as node()?
Returns the root node of the tree that contains the specified node
Arguments and return type: @@ -886,7 +886,7 @@
Arguments and return type: @@ -886,7 +886,7 @@
fn:namespace-uri($srcval as node()?) as xs:anyURI
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:namespace-uri(node()?) as xs:anyURI
Returns the namespace URI of the specified node
Arguments and return type: @@ -920,7 +920,7 @@
Arguments and return type: @@ -920,7 +920,7 @@
fn:local-name($srcval as node()?) as xs:string
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:local-name(node()?) as xs:string
Returns the local part of the name of the specified node
Arguments and return type: @@ -953,7 +953,7 @@
Arguments and return type: @@ -953,7 +953,7 @@
fn:name($node as node()?) as xs:string
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:name(node()?) as xs:string
Returns the expanded QName of the specified node as a string
Arguments and return type: @@ -1105,7 +1105,7 @@
Arguments and return type: @@ -1105,7 +1105,7 @@
fn:not($arg as item()*) as xs:boolean
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:not(item()*) as xs:boolean
Returns the negation of the effective boolean value of the argument
Arguments and return type: @@ -1215,7 +1215,7 @@
Arguments and return type: @@ -1215,7 +1215,7 @@
fn:boolean($arg as item()*) as xs:boolean
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:boolean(item()*) as xs:boolean
Converts the argument to a boolean value
Arguments and return type: @@ -1265,7 +1265,7 @@
Arguments and return type: @@ -1265,7 +1265,7 @@
fn:unparsed-text-available($uri as xs:string?, $encoding as xs:string?) as xs:boolean
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:unparsed-text-available(xs:string?, xs:string?) as xs:boolean
Determines if an unparsed text resource identified by a URI can be read using the given
encoding
@@ -1305,7 +1305,7 @@
@@ -1305,7 +1305,7 @@
fn:unparsed-text-lines($uri as xs:string?, $encoding as xs:string?) as xs:string*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:unparsed-text-lines(xs:string?, xs:string?) as xs:string*
Returns the contents of an unparsed text resource identified by a URI, split into
lines
@@ -1345,7 +1345,7 @@
@@ -1345,7 +1345,7 @@
fn:unparsed-text($uri as xs:string?, $encoding as xs:string?) as xs:string?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:unparsed-text(xs:string?, xs:string?) as xs:string?
Returns the contents of an unparsed text resource identified by a URI
Arguments and return type: @@ -1384,7 +1384,7 @@
Arguments and return type: @@ -1384,7 +1384,7 @@
fn:escape-html-uri($uri as xs:string?) as xs:string
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:escape-html-uri(xs:string?) as xs:string
Escapes special characters in a URI to be used in HTML
Arguments and return type: @@ -1418,7 +1418,7 @@
Arguments and return type: @@ -1418,7 +1418,7 @@
fn:iri-to-uri($iri as xs:string?) as xs:string
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:iri-to-uri(xs:string?) as xs:string
Converts an IRI to a URI by escaping non-ASCII characters
Arguments and return type: @@ -1452,7 +1452,7 @@
Arguments and return type: @@ -1452,7 +1452,7 @@
fn:encode-for-uri($uriPart as xs:string?) as xs:string
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:encode-for-uri(xs:string?) as xs:string
Encodes a string for use in a URI by escaping special characters
Arguments and return type: @@ -1486,7 +1486,7 @@
Arguments and return type: @@ -1486,7 +1486,7 @@
fn:resolve-uri($relative as xs:string?, $base as xs:string?) as xs:anyURI?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:resolve-uri(xs:string?, xs:string?) as xs:anyURI?
Resolves a relative URI using a base URI
Arguments and return type: @@ -1526,7 +1526,7 @@
Arguments and return type: @@ -1526,7 +1526,7 @@
fn:analyze-string($input as xs:string?, $pattern as xs:string, $flags as xs:string?) as element(fn:analyze-string-result)
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:analyze-string(xs:string?, xs:string, xs:string?) as element(fn:analyze-string-result)
Analyzes the input string and returns an XML fragment containing match and non-match
elements
@@ -1569,7 +1569,7 @@
@@ -1569,7 +1569,7 @@
fn:tokenize($input as xs:string?, $pattern as xs:string, $flags as xs:string?) as xs:string*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:tokenize(xs:string?, xs:string, xs:string?) as xs:string*
Splits the input string into a sequence of substrings using the pattern as a delimiter
@@ -1612,7 +1612,7 @@
@@ -1612,7 +1612,7 @@
fn:replace($input as xs:string?, $pattern as xs:string, $replacement as xs:string, $flags as xs:string?) as xs:string
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:replace(xs:string?, xs:string, xs:string, xs:string?) as xs:string
Replaces occurrences of the pattern in the input string with the replacement string
Arguments and return type: @@ -1658,7 +1658,7 @@
Arguments and return type: @@ -1658,7 +1658,7 @@
fn:matches($input as xs:string?, $pattern as xs:string, $flags as xs:string?) as xs:boolean
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:matches(xs:string?, xs:string, xs:string?) as xs:boolean
Returns true if the input string matches the regular expression pattern, otherwise false
@@ -1909,7 +1909,7 @@
@@ -1909,7 +1909,7 @@
fn:translate($arg as xs:string?, $mapString as xs:string, $transString as xs:string) as xs:string
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:translate(xs:string?, xs:string, xs:string) as xs:string
Returns the input string with specified characters replaced
Arguments and return type: @@ -1951,7 +1951,7 @@
Arguments and return type: @@ -1951,7 +1951,7 @@
fn:lower-case($arg as xs:string?) as xs:string
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:lower-case(xs:string?) as xs:string
Returns the input string with all characters converted to lowercase
Arguments and return type: @@ -1989,7 +1989,7 @@
Arguments and return type: @@ -1989,7 +1989,7 @@
fn:upper-case($arg as xs:string?) as xs:string
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:upper-case(xs:string?) as xs:string
Returns the input string with all characters converted to uppercase
Arguments and return type: @@ -2027,7 +2027,7 @@
Arguments and return type: @@ -2027,7 +2027,7 @@
fn:normalize-unicode($arg as xs:string?, $normalizationForm as xs:string) as xs:string
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:normalize-unicode(xs:string?, xs:string) as xs:string
Returns the input string with Unicode normalization applied
Arguments and return type: @@ -2065,7 +2065,7 @@
Arguments and return type: @@ -2065,7 +2065,7 @@
fn:normalize-space($arg as xs:string?) as xs:string
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:normalize-space(xs:string?) as xs:string
Returns the input string with whitespace normalized
Arguments and return type: @@ -2103,7 +2103,7 @@
Arguments and return type: @@ -2103,7 +2103,7 @@
fn:string-length($arg as xs:string?) as xs:integer
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:string-length(xs:string?) as xs:integer
Returns the length of the input string
Arguments and return type: @@ -2141,7 +2141,7 @@
Arguments and return type: @@ -2141,7 +2141,7 @@
fn:substring($sourceString as xs:string?, $startingLoc as xs:double) as xs:string
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:substring(xs:string?, xs:double) as xs:string
Returns a substring of the source string, starting from a specific location
Arguments and return type: @@ -2182,7 +2182,7 @@
Arguments and return type: @@ -2182,7 +2182,7 @@
fn:string-join($arg1 as xs:string*, $separator as xs:string) as xs:string
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:string-join($arg1 as xs:string*, xs:string) as xs:string
Joins a sequence of strings with a specified separator, returning a single string
Arguments and return type: @@ -2348,7 +2348,7 @@
Arguments and return type: @@ -2348,7 +2348,7 @@
fn:string-to-codepoints($arg as xs:string?) as xs:integer*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:string-to-codepoints(xs:string?) as xs:integer*
Returns a sequence of Unicode code points for a given string
Arguments and return type: @@ -2386,7 +2386,7 @@
Arguments and return type: @@ -2386,7 +2386,7 @@
fn:codepoints-to-string($arg as xs:integer*) as xs:string
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:codepoints-to-string(xs:integer*) as xs:string
Constructs a string from a sequence of Unicode code points
Arguments and return type: @@ -2468,7 +2468,7 @@
Arguments and return type: @@ -2468,7 +2468,7 @@
fn:format-number($value as numeric?, $picture as xs:string, $decimal-format-name as xs:string?) as xs:string
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:format-number(numeric?, xs:string, $decimal-format-name as xs:string?) as xs:string
Formats a numeric value according to the supplied picture string and optional decimal
format name
@@ -2515,7 +2515,7 @@
@@ -2515,7 +2515,7 @@
fn:format-integer($value as xs:integer?, $picture as xs:string) as xs:string?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:format-integer(xs:integer?, xs:string) as xs:string?
Formats an integer value according to the supplied picture string
Arguments and return type: @@ -2557,7 +2557,7 @@
Arguments and return type: @@ -2557,7 +2557,7 @@
fn:round-half-to-even($arg as numeric?) as numeric?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:round-half-to-even(numeric?) as numeric?
Returns the closest integer to the given numeric value, rounding half-way cases to the
nearest even integer (also known as "bankers' rounding")
@@ -2600,7 +2600,7 @@
@@ -2600,7 +2600,7 @@
fn:round($arg as numeric?) as numeric?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:round(numeric?) as numeric?
Returns the closest integer to the given numeric value, rounding half-way cases away
from zero
@@ -2639,7 +2639,7 @@
@@ -2639,7 +2639,7 @@
fn:floor($arg as numeric?) as numeric?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:floor(numeric?) as numeric?
Returns the largest integer less than or equal to the given numeric value
Arguments and return type: @@ -2678,7 +2678,7 @@
Arguments and return type: @@ -2678,7 +2678,7 @@
fn:ceiling($arg as numeric?) as numeric?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:ceiling(numeric?) as numeric?
Returns the smallest integer greater than or equal to the given numeric value
Arguments and return type: @@ -2716,7 +2716,7 @@
Arguments and return type: @@ -2716,7 +2716,7 @@
fn:abs($arg as numeric?) as numeric?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:abs(numeric?) as numeric?
Returns the absolute value of the given numeric value
Arguments and return type: @@ -2797,10 +2797,11 @@ -
Arguments and return type: @@ -2797,10 +2797,11 @@ -
+
+ fn:fold-right($sourceSeq as item()*, $zero as item()*, $processingFunc as function(item(), item()*) as item()*) as item()*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:fold-right(item()*, item()*, function(item(), item()*) as item()*) as item()*
Applies a processing function cumulatively to the items of a sequence from right to
left, so as to reduce the sequence to a single value
@@ -2845,7 +2846,7 @@
@@ -2845,7 +2846,7 @@
fn:fold-left($sourceSeq as item()*, $zero as item()*, $processingFunc as function(item()*, item()) as item()*) as item()*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:fold-left(item()*, item()*, function(item()*, item()) as item()*) as item()*
Applies a processing function cumulatively to the items of a sequence from left to
right, so as to reduce the sequence to a single value
@@ -2965,7 +2966,7 @@
@@ -2965,7 +2966,7 @@
fn:collection($uri as xs:string?) as xs:anyAtomicType*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:collection(xs:string?) as xs:anyAtomicType*
Returns a sequence of documents in a collection identified by a URI
Arguments and return type: @@ -3005,7 +3006,7 @@
Arguments and return type: @@ -3005,7 +3006,7 @@
fn:sum($seq as xs:anyAtomicType*, $zero as xs:anyAtomicType?) as xs:anyAtomicType?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:sum(xs:anyAtomicType*, xs:anyAtomicType?) as xs:anyAtomicType?
Returns the sum of a sequence of numeric values
Arguments and return type: @@ -3047,7 +3048,7 @@
Arguments and return type: @@ -3047,7 +3048,7 @@
fn:min($seq as xs:anyAtomicType*, $collation as xs:string) as xs:anyAtomicType?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:min(xs:anyAtomicType*, xs:string) as xs:anyAtomicType?
Returns the minimum value from a sequence of values
Arguments and return type: @@ -3094,7 +3095,7 @@
Arguments and return type: @@ -3094,7 +3095,7 @@
fn:max($seq as xs:anyAtomicType*, $collation as xs:string) as xs:anyAtomicType?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:max(xs:anyAtomicType*, xs:string) as xs:anyAtomicType?
Returns the maximum value from a sequence of values
Arguments and return type: @@ -3141,7 +3142,7 @@
Arguments and return type: @@ -3141,7 +3142,7 @@
fn:avg($seq as xs:anyAtomicType*) as xs:anyAtomicType?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:avg(xs:anyAtomicType*) as xs:anyAtomicType?
Computes the average of the numeric values in the input sequence
Arguments and return type: @@ -3183,7 +3184,7 @@
Arguments and return type: @@ -3183,7 +3184,7 @@
fn:count($seq as item()*) as xs:integer
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:count(item()*) as xs:integer
Returns the number of items in the input sequence
Arguments and return type: @@ -3225,7 +3226,7 @@
Arguments and return type: @@ -3225,7 +3226,7 @@
fn:exactly-one($srcval as item()*) as item()
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:exactly-one(item()*) as item()
Returns the single item in the input sequence or raises an error if the sequence is
empty or contains more than one item
@@ -3268,7 +3269,7 @@
@@ -3268,7 +3269,7 @@
fn:one-or-more($srcval as item()*) as item()+
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:one-or-more(item()*) as item()+
Returns the input sequence if it contains one or more items, otherwise raises an
error
@@ -3307,7 +3308,7 @@
@@ -3307,7 +3308,7 @@
fn:zero-or-one($srcval as item()*) as item()?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:zero-or-one(item()*) as item()?
Returns the input sequence if it contains zero or one items, otherwise raises an
error
@@ -3389,7 +3390,7 @@
@@ -3389,7 +3390,7 @@
fn:index-of($sequence as xs:anyAtomicType*, $search as xs:anyAtomicType) as xs:integer*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:index-of(xs:anyAtomicType*, xs:anyAtomicType) as xs:integer*
Returns a sequence of integers indicating the positions of items in the input sequence
that are equal to the search item
@@ -3434,7 +3435,7 @@
@@ -3434,7 +3435,7 @@
fn:distinct-values($arg as xs:anyAtomicType*) as xs:anyAtomicType*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:distinct-values(xs:anyAtomicType*) as xs:anyAtomicType*
Returns a sequence of distinct atomic values from the input sequence
Arguments and return type: @@ -3473,7 +3474,7 @@
Arguments and return type: @@ -3473,7 +3474,7 @@
fn:unordered($sourceSeq as item()*) as item()*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:unordered(item()*) as item()*
Returns the items of a sequence in an implementation-dependent order
Arguments and return type: @@ -3512,7 +3513,7 @@
Arguments and return type: @@ -3512,7 +3513,7 @@
fn:subsequence($sourceSeq as item()*, $startingLoc as xs:double, $length as xs:double) as item()*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:subsequence(item()*, xs:double, xs:double) as item()*
Returns a subsequence of a given sequence starting at a specified position with a
specified length
@@ -3563,7 +3564,7 @@
@@ -3563,7 +3564,7 @@
fn:reverse($sequence as item()*) as item()*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:reverse(item()*) as item()*
Reverses the order of items in a sequence
Arguments and return type: @@ -3605,7 +3606,7 @@
Arguments and return type: @@ -3605,7 +3606,7 @@
fn:remove($target as item()*, $position as xs:integer) as item()*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:remove(item()*, xs:integer) as item()*
Removes an item from a sequence at the specified position
Arguments and return type: @@ -3651,7 +3652,7 @@
Arguments and return type: @@ -3651,7 +3652,7 @@
fn:insert-before($target as item()*, $position as xs:integer, $inserts as item()*) as item()*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:insert-before(item()*, xs:integer, item()*) as item()*
Inserts items from the specified sequence into another sequence at a given position
Arguments and return type: @@ -3701,7 +3702,7 @@
Arguments and return type: @@ -3701,7 +3702,7 @@
fn:tail($seq as item()*) as item()*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:tail(item()*) as item()*
Returns all items of the input sequence except the first one, or an empty sequence if
the input is empty or contains only one item
@@ -3744,7 +3745,7 @@
@@ -3744,7 +3745,7 @@
fn:head($seq as item()*) as item()?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:head(item()*) as item()?
Returns the first item of the input sequence, or an empty sequence if the input is
empty
@@ -3787,7 +3788,7 @@
- @@ -3787,7 +3788,7 @@
fn:exists($seq as item()*) as xs:boolean
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:exists(item()*) as xs:boolean
Returns true if the input sequence is not empty, otherwise returns false
Arguments and return type: @@ -3829,7 +3830,7 @@
+ Arguments and return type: @@ -3829,7 +3830,7 @@
fn:empty($seq as item()*) as xs:boolean
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:empty(item()*) as xs:boolean
Returns true if the input sequence is empty, otherwise returns false
Arguments and return type: @@ -3907,9 +3908,9 @@
- Arguments and return type: @@ -3907,9 +3908,9 @@
+
@@ -4056,7 +4057,7 @@
fn:format-time($value as xs:time?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $country as xs:string?) as xs:string?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:format-time(xs:time?, xs:string, xs:string?, xs:string?, xs:string?) as xs:string?
Formats a time value using the provided picture string and optional language,
calendar, and country settings
@@ -4107,7 +4108,7 @@
@@ -4107,7 +4108,7 @@
fn:format-date($value as xs:date?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $country as xs:string?) as xs:string?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:format-date(xs:date?, xs:string, xs:string?, xs:string?, xs:string?) as xs:string?
Formats a date value using the provided picture string and optional language,
calendar, and country settings
@@ -4158,7 +4159,7 @@
@@ -4158,7 +4159,7 @@
fn:format-dateTime($value as xs:dateTime?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $country as xs:string?) as xs:string?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:format-dateTime(xs:dateTime?, xs:string, xs:string?, xs:string?, xs:string?) as xs:string?
Formats a dateTime value using the provided picture string and optional language,
calendar, and country settings
@@ -4211,7 +4212,7 @@
@@ -4211,7 +4212,7 @@
fn:adjust-time-to-timezone($arg as xs:time?, $timezone as xs:dayTimeDuration?) as xs:time?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:adjust-time-to-timezone(xs:time?, xs:dayTimeDuration?) as xs:time?
Adjusts the timezone of a time value
Arguments and return type: @@ -4253,7 +4254,7 @@
Arguments and return type: @@ -4253,7 +4254,7 @@
fn:adjust-date-to-timezone($arg as xs:date?, $timezone as xs:dayTimeDuration?) as xs:date?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:adjust-date-to-timezone(xs:date?, xs:dayTimeDuration?) as xs:date?
Adjusts the timezone of a date value
Arguments and return type: @@ -4293,7 +4294,7 @@
Arguments and return type: @@ -4293,7 +4294,7 @@
fn:adjust-dateTime-to-timezone($arg as xs:dateTime?, $timezone as xs:dayTimeDuration?) as xs:dateTime?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:adjust-dateTime-to-timezone(xs:dateTime?, xs:dayTimeDuration?) as xs:dateTime?
Adjusts the timezone of a dateTime value
Arguments and return type: @@ -4333,7 +4334,7 @@
Arguments and return type: @@ -4333,7 +4334,7 @@
fn:timezone-from-time($arg as xs:time?) as xs:dayTimeDuration?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:timezone-from-time(xs:time?) as xs:dayTimeDuration?
Extracts the timezone component from an xs:time value
Arguments and return type: @@ -4367,7 +4368,7 @@
Arguments and return type: @@ -4367,7 +4368,7 @@
fn:seconds-from-time($arg as xs:time?) as xs:decimal?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:seconds-from-time(xs:time?) as xs:decimal?
Extracts the seconds component from an xs:time value
Arguments and return type: @@ -4401,7 +4402,7 @@
Arguments and return type: @@ -4401,7 +4402,7 @@
fn:minutes-from-time($arg as xs:time?) as xs:integer?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:minutes-from-time(xs:time?) as xs:integer?
Extracts the minutes component from an xs:time value
Arguments and return type: @@ -4435,7 +4436,7 @@
Arguments and return type: @@ -4435,7 +4436,7 @@
fn:hours-from-time($arg as xs:time?) as xs:integer?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:hours-from-time(xs:time?) as xs:integer?
Extracts the hours component from an xs:time value
Arguments and return type: @@ -4469,7 +4470,7 @@
Arguments and return type: @@ -4469,7 +4470,7 @@
fn:timezone-from-date($arg as xs:date?) as xs:dayTimeDuration?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:timezone-from-date(xs:date?) as xs:dayTimeDuration?
Extracts the timezone component from an xs:date value
Arguments and return type: @@ -4503,7 +4504,7 @@
Arguments and return type: @@ -4503,7 +4504,7 @@
fn:day-from-date($arg as xs:date?) as xs:integer?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:day-from-date(xs:date?) as xs:integer?
Extracts the day component from an xs:date value
Arguments and return type: @@ -4537,7 +4538,7 @@
Arguments and return type: @@ -4537,7 +4538,7 @@
fn:month-from-date($arg as xs:date?) as xs:integer?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:month-from-date(xs:date?) as xs:integer?
Extracts the month component from an xs:date value
Arguments and return type: @@ -4571,7 +4572,7 @@
Arguments and return type: @@ -4571,7 +4572,7 @@
fn:year-from-date($arg as xs:date?) as xs:integer?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:year-from-date(xs:date?) as xs:integer?
Extracts the year component from an xs:date value
Arguments and return type: @@ -4605,7 +4606,7 @@
Arguments and return type: @@ -4605,7 +4606,7 @@
fn:timezone-from-dateTime($arg as xs:dateTime?) as xs:dayTimeDuration?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:timezone-from-dateTime(xs:dateTime?) as xs:dayTimeDuration?
Extracts the timezone component from an xs:dateTime value
Arguments and return type: @@ -4639,7 +4640,7 @@
Arguments and return type: @@ -4639,7 +4640,7 @@
fn:seconds-from-dateTime($arg as xs:dateTime?) as xs:decimal?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:seconds-from-dateTime(xs:dateTime?) as xs:decimal?
Extracts the seconds component from an xs:dateTime value
Arguments and return type: @@ -4674,7 +4675,7 @@
Arguments and return type: @@ -4674,7 +4675,7 @@
fn:minutes-from-dateTime($arg as xs:dateTime?) as xs:integer?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:minutes-from-dateTime(xs:dateTime?) as xs:integer?
Extracts the minutes component from an xs:dateTime value
Arguments and return type: @@ -4708,7 +4709,7 @@
Arguments and return type: @@ -4708,7 +4709,7 @@
fn:hours-from-dateTime($arg as xs:dateTime?) as xs:integer?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:hours-from-dateTime(xs:dateTime?) as xs:integer?
Extracts the hours component from an xs:dateTime value
Arguments and return type: @@ -4742,7 +4743,7 @@
Arguments and return type: @@ -4742,7 +4743,7 @@
fn:day-from-dateTime($arg as xs:dateTime?) as xs:integer?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:day-from-dateTime(xs:dateTime?) as xs:integer?
Extracts the day component from an xs:dateTime value
Arguments and return type: @@ -4776,7 +4777,7 @@
Arguments and return type: @@ -4776,7 +4777,7 @@
fn:month-from-dateTime($arg as xs:dateTime?) as xs:integer?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:month-from-dateTime(xs:dateTime?) as xs:integer?
Extracts the month component from an xs:dateTime value
Arguments and return type: @@ -4810,7 +4811,7 @@
Arguments and return type: @@ -4810,7 +4811,7 @@
fn:year-from-dateTime($arg as xs:dateTime?) as xs:integer?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:year-from-dateTime(xs:dateTime?) as xs:integer?
Extracts the year component from an xs:dateTime value
Arguments and return type: @@ -4884,7 +4885,7 @@
Arguments and return type: @@ -4884,7 +4885,7 @@
fn:seconds-from-duration($arg as xs:duration?) as xs:decimal?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:seconds-from-duration(xs:duration?) as xs:decimal?
Returns the seconds component of the duration
Arguments and return type: @@ -4918,7 +4919,7 @@
Arguments and return type: @@ -4918,7 +4919,7 @@
fn:minutes-from-duration($arg as xs:duration?) as xs:integer?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:minutes-from-duration(xs:duration?) as xs:integer?
Returns the minutes component of the duration
Arguments and return type: @@ -4952,7 +4953,7 @@
Arguments and return type: @@ -4952,7 +4953,7 @@
fn:hours-from-duration($arg as xs:duration?) as xs:integer?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:hours-from-duration(xs:duration?) as xs:integer?
Returns the hours component of the duration
Arguments and return type: @@ -4986,7 +4987,7 @@
Arguments and return type: @@ -4986,7 +4987,7 @@
fn:days-from-duration($arg as xs:duration?) as xs:integer?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:days-from-duration(xs:duration?) as xs:integer?
Returns the days component of the duration
Arguments and return type: @@ -5021,7 +5022,7 @@
-
Arguments and return type: @@ -5021,7 +5022,7 @@
fn:months-from-duration($arg as xs:duration?) as xs:integer?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:months-from-duration(xs:duration?) as xs:integer?
Returns the months component of the duration
Arguments and return type: @@ -5055,7 +5056,7 @@
- Arguments and return type: @@ -5055,7 +5056,7 @@
fn:years-from-duration($arg as xs:duration?) as xs:integer?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:years-from-duration(xs:duration?) as xs:integer?
Returns the years component of the duration
Arguments and return type: @@ -5128,15 +5129,15 @@
- Arguments and return type: @@ -5128,15 +5129,15 @@
+
+ fn:trace($value as item()*, $label as xs:string) as item()*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:trace(item()*, xs:string) as item()*
Outputs the provided label and value for diagnostic purposes and returns the value
unchanged
@@ -5176,7 +5177,7 @@
- @@ -5176,7 +5177,7 @@
fn:error($error as xs:QName?, $description as xs:string?, $error-object as item()*)
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:error(xs:QName?, xs:string?, $error-object as item()*)
Raises an error with the specified error code, description, and error object
Arguments and return type: @@ -5218,15 +5219,15 @@
Arguments and return type: @@ -5218,15 +5219,15 @@
+
+ fn:function-arity($function as function(*)) as xs:integer
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:function-arity(function(*)) as xs:integer
Returns the arity (number of arguments) of the specified function
Arguments and return type: @@ -5262,7 +5263,7 @@
Arguments and return type: @@ -5262,7 +5263,7 @@
fn:function-name($function as function(*)) as xs:QName?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:function-name(function(*)) as xs:QName?
Returns the QName of the specified function
Arguments and return type: @@ -5299,7 +5300,7 @@
Arguments and return type: @@ -5299,7 +5300,7 @@
fn:function-lookup($functionName as xs:QName, $arity as xs:integer) as function(*)?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:function-lookup(xs:QName, xs:integer) as function(*)?
Returns a function with the specified QName and arity if available, otherwise
returns an empty sequence
@@ -5410,7 +5411,7 @@
@@ -5410,7 +5411,7 @@
fn:serialize($node as item()?, $options as item()?) as xs:string?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:serialize(item()?, item()?) as xs:string?
Serializes an XML node, producing a string representation of the node
Arguments and return type: @@ -5455,7 +5456,7 @@
Arguments and return type: @@ -5455,7 +5456,7 @@
fn:parse-xml-fragment($srcval as xs:string?) as document-node(element(*))?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:parse-xml-fragment(xs:string?) as document-node(element(*))?
Parses a string containing an XML fragment and returns a corresponding document
node
@@ -5492,7 +5493,7 @@
@@ -5492,7 +5493,7 @@
fn:parse-xml($srcval as xs:string?) as document-node(element(*))?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:parse-xml(xs:string?) as document-node(element(*))?
Parses a string containing an XML document and returns a corresponding document
node
@@ -5563,7 +5564,7 @@
@@ -5563,7 +5564,7 @@
fn:environment-variable($name as xs:string) as xs:string?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:environment-variable(xs:string) as xs:string?
Retrieves the value of an environment variable
Arguments and return type: @@ -5599,7 +5600,7 @@
Arguments and return type: @@ -5599,7 +5600,7 @@
fn:uri-collection($uri as xs:string?) as xs:anyURI*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:uri-collection(xs:string?) as xs:anyURI*
Returns a sequence of URIs in a collection identified by a URI
Arguments and return type: @@ -5639,7 +5640,7 @@
Arguments and return type: @@ -5639,7 +5640,7 @@
fn:doc-available($uri as xs:string?) as xs:boolean
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:doc-available(xs:string?) as xs:boolean
Tests whether an XML document is available at a given URI
Arguments and return type: @@ -5679,7 +5680,7 @@
Arguments and return type: @@ -5679,7 +5680,7 @@
fn:doc($uri as xs:string?) as document-node()?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:doc(xs:string?) as document-node()?
Loads an XML document from a URI and returns the document node
Arguments and return type: @@ -5719,7 +5720,7 @@
Arguments and return type: @@ -5719,7 +5720,7 @@
fn:generate-id($node as node()?) as xs:string
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:generate-id(node()?) as xs:string
Returns a unique identifier for the specified node
Arguments and return type: @@ -5758,7 +5759,7 @@
Arguments and return type: @@ -5758,7 +5759,7 @@
fn:idref($arg as xs:string*) as node()*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:idref(xs:string*) as node()*
Returns a sequence of nodes that are referenced by the specified IDREF attribute
values
@@ -5799,7 +5800,7 @@
@@ -5799,7 +5800,7 @@
fn:id($arg as xs:string*) as element()*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:id(xs:string*) as element()*
Returns a sequence of elements with the specified ID attribute values
Arguments and return type: @@ -5837,7 +5838,7 @@
Arguments and return type: @@ -5837,7 +5838,7 @@
fn:lang($testlang as xs:string, $node as node()?) as xs:boolean
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:lang(xs:string, node()?) as xs:boolean
Returns true if the language of the specified node or its nearest ancestor matches
the given language code
@@ -5877,7 +5878,7 @@
@@ -5877,7 +5878,7 @@
fn:in-scope-prefixes($element as element()) as xs:string*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:in-scope-prefixes(element()) as xs:string*
Returns a sequence of strings representing the prefixes of the in-scope namespaces
for the specified element
@@ -5908,7 +5909,7 @@
@@ -5908,7 +5909,7 @@
fn:namespace-uri-for-prefix($prefix as xs:string?, $element as element()) as xs:anyURI?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:namespace-uri-for-prefix(xs:string?, element()) as xs:anyURI?
Returns the namespace URI associated with the given prefix, using the in-scope
namespaces for the specified element
@@ -5947,7 +5948,7 @@
@@ -5947,7 +5948,7 @@
fn:namespace-uri-from-QName($arg as xs:QName?) as xs:anyURI?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:namespace-uri-from-QName(xs:QName?) as xs:anyURI?
Returns the namespace URI of the given QName value, or an empty sequence if there's
no namespace URI
@@ -5983,7 +5984,7 @@
@@ -5983,7 +5984,7 @@
fn:local-name-from-QName($arg as xs:QName?) as xs:NCName?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:local-name-from-QName(xs:QName?) as xs:NCName?
Returns the local name of the given QName value, or an empty sequence if there's no
local name
@@ -6019,7 +6020,7 @@
@@ -6019,7 +6020,7 @@
fn:prefix-from-QName($arg as xs:QName?) as xs:NCName?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:prefix-from-QName(xs:QName?) as xs:NCName?
Returns the prefix of the given QName value, or an empty sequence if there's no
prefix
@@ -6055,7 +6056,7 @@
- @@ -6055,7 +6056,7 @@
fn:QName($paramURI as xs:string?, $paramQName as xs:string) as xs:QName
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:QName(xs:string?, xs:string) as xs:QName
Constructs an xs:QName value from a namespace URI and a lexical QName
Arguments and return type: @@ -6093,7 +6094,7 @@
+ Arguments and return type: @@ -6093,7 +6094,7 @@
fn:resolve-QName($qname as xs:string?, $element as element()) as xs:QName?
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:resolve-QName(xs:string?, element()) as xs:QName?
Resolves a QName by expanding a prefix using the in-scope namespaces of a given
element
@@ -6146,9 +6147,9 @@
- @@ -6146,9 +6147,9 @@
+
@@ -6156,7 +6157,7 @@
fn:for-each-pair($sourceSeq1 as item()*, $sourceSeq2 as item()*, $processingFunc as function(item(), item()) as item()*) as item()*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:for-each-pair($sourceSeq1 as item()*, $sourceSeq2 as item()*, function(item(), item()) as item()*) as item()*
Applies a processing function to pairs of items from two input sequences in a
pairwise fashion, resulting in a sequence of the same length as the shorter input
@@ -6206,7 +6207,7 @@
fn:filter($sourceSeq as item()*, $predicate as function(item()) as xs:boolean) as item()*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:filter(item()*, function(item()) as xs:boolean) as item()*
Filters a sequence of items based on a given predicate function
Arguments and return type: @@ -6245,7 +6246,7 @@
Arguments and return type: @@ -6245,7 +6246,7 @@
fn:for-each($sourceSeq as item()*, $action as function(item()) as item()*) as item()*
+ class="hyperlink collapsible collapsibleMini collapseTrigger">fn:for-each(item()*, function(item()) as item()*) as item()*
Applies a specified function to each item in a sequence, returning a new
sequence
@@ -6288,6 +6289,5610 @@
+
+ @@ -6288,6 +6289,5610 @@
+
+
+
+
+
+
+
+ fn:outermost(node()*) as node()*
+
+ Returns the outermost nodes of the input sequence that are not ancestors of any other
+ node in the input sequence
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| node()* | +Sequence of nodes | +
+
| Expression | +Result | +
|---|---|
| fn:outermost(//chapter) | +Sequence of outermost chapter nodes | +
| fn:outermost(/book//*) | +Sequence of outermost nodes in the book | +
+
W3C Documentation reference: outermost
+ fn:innermost(node()*) as node()*
+
+ Returns the innermost nodes of the input sequence that are not descendants of any other
+ node in the input sequence
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| node()* | +Sequence of nodes | +
+
| Expression | +Result | +
|---|---|
| fn:innermost(//chapter) | +Sequence of innermost chapter nodes | +
| fn:innermost(/book//*) | +Sequence of innermost nodes in the book | +
+
W3C Documentation reference: innermost
+ fn:has-children(node()?) as xs:boolean
+
+ Returns true if the specified node has one or more children, otherwise returns false
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| node()? | +Optional node | +
+
| Expression | +Result | +
|---|---|
| fn:has-children(/book/chapter[1]) | +true | +
| fn:has-children(/book/chapter[1]/title) | +false | +
+
W3C Documentation reference: has-children
+ fn:path(node()?) as xs:string
+
+ Returns a string that represents the path of the specified node within the XML
+ document
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| node()? | +Optional node | +
+
| Expression | +Result | +
|---|---|
| fn:path(/book/chapter[1]) | +/book/chapter[1] | +
| fn:path(/book/chapter[2]/title) | +/book/chapter[2]/title | +
+
W3C Documentation reference: path
+ fn:root(node()?) as node()?
+
+ Returns the root node of the tree that contains the specified node
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| node()? | +Optional node | +
+
| Expression | +Result | +
|---|---|
| fn:root(/book/chapter) | +<book> element (root node) | +
| fn:root(/book/chapter[1]) | +<book> element (root node) | +
+
W3C Documentation reference: root
+ fn:namespace-uri(node()?) as xs:anyURI
+
+ Returns the namespace URI of the specified node
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| node()? | +Optional node | +
+
| Expression | +Result | +
|---|---|
| fn:namespace-uri(/example:root) | +"http://www.example.com/ns" | +
| fn:namespace-uri(/a/b) | +"" | +
+
W3C Documentation reference: namespace-uri
+ fn:local-name(node()?) as xs:string
+
+ Returns the local part of the name of the specified node
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| node()? | +Optional node | +
+
| Expression | +Result | +
|---|---|
| fn:local-name(/a/b) | +"b" | +
| fn:local-name(/example:root) | +"root" | +
+
W3C Documentation reference: local-name
+ fn:name(node()?) as xs:string
+
+ Returns the expanded QName of the specified node as a string
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| node()? | +Optional node | +
+
| Expression | +Result | +
|---|---|
| fn:name(/a/b) | +"b" | +
| fn:name(/example:root) | +"example:root" | +
+
W3C Documentation reference: name
+ fn:document-uri(node?)
+
+ Returns the document URI of the given node or the context item
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| node? | +Returns the document URI of the specified node or the context item (if no + argument is provided) | +
+
| Expression | +Result | +
|---|---|
| fn:document-uri(/library/fiction:book[1]) | +http://example.com/library.xml (assuming the document URI of the first + fiction:book element is "http://example.com/library.xml") | +
| fn:document-uri(/library) | +http://example.com/library.xml (assuming the document URI of the library + element is "http://example.com/library.xml") | +
+
W3C Documentation reference: Document-URI
+ fn:base-uri(node?)
+
+ Returns the base URI of the node or the context item
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| node? | +Returns the base URI of the specified node or the context item (if no + argument is provided) | +
+
| Expression | +Result | +
|---|---|
| fn:base-uri(/library/fiction:book[1]) | +http://example.com/library.xml (assuming the base URI of the first + fiction:book element is "http://example.com/library.xml") | +
| fn:base-uri(/library) | +http://example.com/library.xml (assuming the base URI of the library element + is "http://example.com/library.xml") | +
+
W3C Documentation reference: Base-URI
+ fn:node-name(node?)
+
+
+ Returns the name of a node as an xs:QName
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| node? | +Returns the name of the specified node or the context item if the argument + is omitted | +
+
| Expression | +Result | +
|---|---|
| fn:node-name(/library/*[1]) | +fiction:book | +
| fn:node-name(/library/fiction:book[1]/title) | +title | +
+
W3C Documentation reference: Node-Name
+
+
+
+
+
+
+
+
+ fn:not(item()*) as xs:boolean
+
+ Returns the negation of the effective boolean value of the argument
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()* | +Argument whose effective boolean value is to be negated | +
+
| Expression | +Result | +
|---|---|
| fn:not(1) | +false | +
| fn:not(0) | +true | +
| fn:not('') | +true | +
| fn:not('true') | +false | +
+
W3C Documentation reference: Not
+ fn:false() as xs:boolean
+
+ Returns the boolean value false
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| None | +Returns the boolean value false | +
+
| Expression | +Result | +
|---|---|
| fn:false() | +false | +
| //item[fn:false()] | +Returns an empty node-set | +
+
W3C Documentation reference: False
+ fn:true() as xs:boolean
+
+ Returns the boolean value true
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| None | +Returns the boolean value true | +
+
| Expression | +Result | +
|---|---|
| fn:true() | +true | +
| //item[fn:true()] | +Returns all <item> elements | +
+
W3C Documentation reference: True
+ fn:boolean(item()*) as xs:boolean
+
+ Converts the argument to a boolean value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()* | +Argument to be converted to a boolean value | +
+
| Expression | +Result | +
|---|---|
| fn:boolean(1) | +true | +
| fn:boolean(0) | +false | +
| fn:boolean('') | +false | +
| fn:boolean('true') | +true | +
+
W3C Documentation reference: Boolean
+
+
+
+
+
+
+
+
+ fn:unparsed-text-available(xs:string?, xs:string?) as xs:boolean
+
+ Determines if an unparsed text resource identified by a URI can be read using the given
+ encoding
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +The URI identifying the unparsed text resource | +
| xs:string? | +The encoding to be used for reading the resource | +
| xs:boolean | +Indicates if the resource can be read using the given encoding | +
+
| Expression | +Result | +
|---|---|
| fn:unparsed-text-available("http://www.example.com/text.txt", "UTF-8") | +Returns true if the text resource identified by the specified URI can be + read using the specified encoding, otherwise false | +
+
W3C Documentation reference: unparsed-text-available
+ fn:unparsed-text-lines(xs:string?, xs:string?) as xs:string*
+
+ Returns the contents of an unparsed text resource identified by a URI, split into
+ lines
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +The URI identifying the unparsed text resource | +
| xs:string? | +The encoding to be used for reading the resource | +
| xs:string* | +The lines of the unparsed text resource | +
+
| Expression | +Result | +
|---|---|
| fn:unparsed-text-lines("http://www.example.com/text.txt", "UTF-8") | +Returns the lines of the text resource identified by the specified URI, + using the specified encoding | +
+
W3C Documentation reference: unparsed-text-lines
+ fn:unparsed-text(xs:string?, xs:string?) as xs:string?
+
+ Returns the contents of an unparsed text resource identified by a URI
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +The URI identifying the unparsed text resource | +
| xs:string? | +The encoding to be used for reading the resource | +
| xs:string? | +The contents of the unparsed text resource | +
+
| Expression | +Result | +
|---|---|
| fn:unparsed-text("http://www.example.com/text.txt", "UTF-8") | +Returns the contents of the text resource identified by the specified URI, + using the specified encoding | +
+
W3C Documentation reference: unparsed-text
+ fn:escape-html-uri(xs:string?) as xs:string
+
+ Escapes special characters in a URI to be used in HTML
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +URI to be escaped for use in HTML | +
+
| Expression | +Result | +
|---|---|
| fn:escape-html-uri('https://example.com/search?q=test&lang=en') | +https://example.com/search?q=test&lang=en | +
| fn:escape-html-uri('https://example.com/page?id=1§ion=2') | +https://example.com/page?id=1§ion=2 | +
+
W3C Documentation reference: Escape-HTML-URI
+ fn:iri-to-uri(xs:string?) as xs:string
+
+ Converts an IRI to a URI by escaping non-ASCII characters
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +IRI to be converted to a URI | +
+
| Expression | +Result | +
|---|---|
| fn:iri-to-uri('https://example.com/ümlaut') | +https://example.com/%C3%BCmlaut | +
| fn:iri-to-uri('https://example.com/日本語') | +https://example.com/%E6%97%A5%E6%9C%AC%E8%AA%9E | +
+
W3C Documentation reference: IRI-to-URI
+ fn:encode-for-uri(xs:string?) as xs:string
+
+ Encodes a string for use in a URI by escaping special characters
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +String to be encoded for use in a URI | +
+
| Expression | +Result | +
|---|---|
| fn:encode-for-uri('hello world') | +hello%20world | +
| fn:encode-for-uri('example?query=value¶m=value2') | +example%3Fquery%3Dvalue%26param%3Dvalue2 | +
+
W3C Documentation reference: Encode-for-URI
+ fn:resolve-uri(xs:string?, xs:string?) as xs:anyURI?
+
+ Resolves a relative URI using a base URI
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +Relative URI to resolve | +
| xs:string? | +Base URI to use for resolving (optional) | +
+
| Expression | +Result | +
|---|---|
| fn:resolve-uri('example.html', 'https://www.example.com/folder/') | +https://www.example.com/folder/example.html | +
| fn:resolve-uri('../images/pic.jpg', + 'https://www.example.com/folder/page.html') | +https://www.example.com/images/pic.jpg | +
+
W3C Documentation reference: Resolve-URI
+ fn:analyze-string(xs:string?, xs:string, xs:string?) as element(fn:analyze-string-result)
+
+ Analyzes the input string and returns an XML fragment containing match and non-match
+ elements
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +Input string to analyze | +
| xs:string | +Regular expression pattern to match | +
| xs:string? | +Flags to control the regular expression matching (optional) | +
+
| Expression | +Result | +
|---|---|
| fn:analyze-string('red,green,blue', ',') | ++ <fn:analyze-string-result><fn:non-match>red</fn:non-match><fn:match>, + <fn:non-match>green</fn:non-match><fn:match>, + <fn:non-match>blue</fn:non-match></fn:analyze-string-result> + | +
+
W3C Documentation reference: Analyze-String
+ fn:tokenize(xs:string?, xs:string, xs:string?) as xs:string*
+
+ Splits the input string into a sequence of substrings using the pattern as a delimiter
+
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +Input string to tokenize | +
| xs:string | +Regular expression pattern to use as delimiter | +
| xs:string? | +Flags to control the regular expression matching (optional) | +
+
| Expression | +Result | +
|---|---|
| fn:tokenize('XPath 3.0, XQuery 3.0, XSLT 3.0', ',\\s*') | +('XPath 3.0', 'XQuery 3.0', 'XSLT 3.0') | +
| fn:tokenize('apple,orange,banana', ',') | +('apple', 'orange', 'banana') | +
+
W3C Documentation reference: Tokenize
+ fn:replace(xs:string?, xs:string, xs:string, xs:string?) as xs:string
+
+ Replaces occurrences of the pattern in the input string with the replacement string
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +Input string to search within | +
| xs:string | +Regular expression pattern to match | +
| xs:string | +Replacement string | +
| xs:string? | +Flags to control the regular expression matching (optional) | +
+
| Expression | +Result | +
|---|---|
| fn:replace('XPath 3.0 is great', '3.0', '3.1') | +'XPath 3.1 is great' | +
| fn:replace('Hello, World!', 'World', 'XPath') | +'Hello, XPath!' | +
+
W3C Documentation reference: Replace
+ fn:matches(xs:string?, xs:string, xs:string?) as xs:boolean
+
+ Returns true if the input string matches the regular expression pattern, otherwise false
+
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +Input string to search within | +
| xs:string | +Regular expression pattern to match | +
| xs:string? | +Flags to control the regular expression matching (optional) | +
+
| Expression | +Result | +
|---|---|
| fn:matches('XPath 3.0', '\\d\\.\\d') | +true | +
| fn:matches('Hello, World!', '[A-Z][a-z]*') | +true | +
| fn:matches('example123', '\\d+', 'q') | +false | +
+
W3C Documentation reference: Matches
+ fn:substring-after($arg1 as xs:string?, $arg2 as xs:string?) as xs:string
+
+ Returns the part of the first string that follows the first occurrence of the second
+ string
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +Input string to search within | +
| xs:string? | +Substring to search for | +
+
| Expression | +Result | +
|---|---|
| fn:substring-after('Hello, World!', ',') | +' World!' | +
| fn:substring-after('XPath 3.0 is awesome!', '3.0') | +' is awesome!' | +
+
W3C Documentation reference: Substring-After
+ fn:substring-before($arg1 as xs:string?, $arg2 as xs:string?) as xs:string
+
+ Returns the part of the first string that precedes the first occurrence of the second
+ string
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +Input string to search within | +
| xs:string? | +Substring to search for | +
+
| Expression | +Result | +
|---|---|
| fn:substring-before('Hello, World!', ',') | +'Hello' | +
| fn:substring-before('XPath 3.0 is awesome!', '3.0') | +'XPath ' | +
+
W3C Documentation reference: Substring-Before
+ fn:ends-with($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean
+
+ Returns true if the first string ends with the second string, otherwise false
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +Input string to check | +
| xs:string? | +Substring to check for at the end of the first string | +
+
| Expression | +Result | +
|---|---|
| fn:ends-with('Hello, World!', 'World!') | +true | +
| fn:ends-with('Hello, World!', 'Hello') | +false | +
| fn:ends-with('XPath 3.0', '3.0') | +true | +
+
W3C Documentation reference: Ends-With
+ fn:starts-with($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean
+
+ Returns true if the first string starts with the second string, otherwise false
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +Input string to check | +
| xs:string? | +Substring to check for at the beginning of the first string | +
+
| Expression | +Result | +
|---|---|
| fn:starts-with('Hello, World!', 'Hello') | +true | +
| fn:starts-with('Hello, World!', 'World') | +false | +
| fn:starts-with('XPath 3.0', 'XPath') | +true | +
+
W3C Documentation reference: Starts-With
+ fn:contains($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean
+
+ Returns true if the first string contains the second string, otherwise false
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +Input string to search within | +
| xs:string? | +Substring to search for | +
+
| Expression | +Result | +
|---|---|
| fn:contains('Hello, World!', 'World') | +true | +
| fn:contains('Hello, World!', 'world') | +false | +
| fn:contains('XPath 3.0', '3.0') | +true | +
+
W3C Documentation reference: Contains
+ fn:translate(xs:string?, xs:string, xs:string) as xs:string
+
+ Returns the input string with specified characters replaced
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +Input string to be translated | +
| xs:string | +Map string with characters to replace | +
| xs:string | +Translate string with replacement characters | +
+
| Expression | +Result | +
|---|---|
| fn:translate('apple', 'aeiou', '12345') | +'1ppl2' | +
| fn:translate('Hello, World!', 'HW', 'hw') | +'hello, world!' | +
+
W3C Documentation reference: Translate
+ fn:lower-case(xs:string?) as xs:string
+
+ Returns the input string with all characters converted to lowercase
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +Input string to convert to lowercase | +
+
| Expression | +Result | +
|---|---|
| fn:lower-case('HELLO, WORLD!') | +'hello, world!' | +
| fn:lower-case('XPath 3.0') | +'xpath 3.0' | +
| fn:lower-case('BANANA') | +'banana' | +
+
W3C Documentation reference: Lower-Case
+ fn:upper-case(xs:string?) as xs:string
+
+ Returns the input string with all characters converted to uppercase
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +Input string to convert to uppercase | +
+
| Expression | +Result | +
|---|---|
| fn:upper-case('Hello, World!') | +'HELLO, WORLD!' | +
| fn:upper-case('XPath 3.0') | +'XPATH 3.0' | +
| fn:upper-case('banana') | +'BANANA' | +
+
W3C Documentation reference: Upper-Case
+ fn:normalize-unicode(xs:string?, xs:string) as xs:string
+
+ Returns the input string with Unicode normalization applied
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +Input string to normalize | +
| xs:string | +Normalization form to apply (NFC, NFD, NFKC, NFKD) | +
+
| Expression | +Result | +
|---|---|
| fn:normalize-unicode('Café', 'NFC') | +'Café' | +
| fn:normalize-unicode('Café', 'NFD') | +'Café' | +
+
W3C Documentation reference: Normalize-Unicode
+ fn:normalize-space(xs:string?) as xs:string
+
+ Returns the input string with whitespace normalized
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +Input string to normalize whitespace | +
+
| Expression | +Result | +
|---|---|
| fn:normalize-space(' Hello, World! ') | +'Hello, World!' | +
| fn:normalize-space(' XPath 3.0 ') | +'XPath 3.0' | +
| fn:normalize-space('\tbanana\t') | +'banana' | +
+
W3C Documentation reference: Normalize-Space
+ fn:string-length(xs:string?) as xs:integer
+
+ Returns the length of the input string
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +Input string to calculate length | +
+
| Expression | +Result | +
|---|---|
| fn:string-length('Hello, World!') | +13 | +
| fn:string-length('XPath 3.0') | +8 | +
| fn:string-length('banana') | +6 | +
+
W3C Documentation reference: String-Length
+ fn:substring(xs:string?, xs:double) as xs:string
+
+ Returns a substring of the source string, starting from a specific location
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +Input source string | +
| xs:double | +Starting location to extract the substring | +
+
| Expression | +Result | +
|---|---|
| fn:substring('Hello, World!', 1, 5) | +'Hello' | +
| fn:substring('XPath 3.0', 7) | +'3.0' | +
| fn:substring('banana', 2, 3) | +'ana' | +
+
W3C Documentation reference: Substring
+ fn:string-join($arg1 as xs:string*, xs:string) as xs:string
+
+ Joins a sequence of strings with a specified separator, returning a single string
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string* | +Input sequence of strings to join | +
| xs:string | +Separator string to insert between joined strings | +
+
| Expression | +Result | +
|---|---|
| fn:string-join(('apple', 'banana', 'orange'), ', ') | +'apple, banana, orange' | +
| fn:string-join(('XPath', '3.0', 'Functions'), ' - ') | +'XPath - 3.0 - Functions' | +
| fn:string-join(('A', 'B', 'C'), '') | +'ABC' | +
+
W3C Documentation reference: String-Join
+ fn:concat($arg1 as xs:anyAtomicType?, $arg2 as xs:anyAtomicType?, ...) as xs:string
+
+ Concatenates two or more strings or atomic values, returning a single string
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:anyAtomicType? | +Input strings or atomic values to concatenate | +
+
| Expression | +Result | +
|---|---|
| fn:concat('Hello', ' ', 'World') | +'Hello World' | +
| fn:concat('I have ', 3, ' apples') | +'I have 3 apples' | +
| fn:concat('XPath ', '3.0') | +'XPath 3.0' | +
+
W3C Documentation reference: Concat
+ fn:codepoint-equal($comparand1 as xs:string?, $comparand2 as xs:string?) as xs:boolean?
+
+ Compares two strings on a codepoint-by-codepoint basis and returns true if they are
+ equal, false otherwise
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +First string to compare | +
| xs:string? | +Second string to compare | +
+
| Expression | +Result | +
|---|---|
| fn:codepoint-equal('Hello', 'Hello') | +true | +
| fn:codepoint-equal('Hello', 'hello') | +false | +
| fn:codepoint-equal('apple', 'banana') | +false | +
+
W3C Documentation reference: Codepoint-Equal
+ fn:compare($comparand1 as xs:string?, $comparand2 as xs:string?) as xs:integer?
+
+ Compares two strings and returns -1, 0, or 1 if the first string is less than, equal to,
+ or greater than the second string, respectively
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +First string to compare | +
| xs:string? | +Second string to compare | +
+
| Expression | +Result | +
|---|---|
| fn:compare('apple', 'banana') | +-1 | +
| fn:compare('apple', 'apple') | +0 | +
| fn:compare('banana', 'apple') | +1 | +
+
W3C Documentation reference: Compare
+ fn:string-to-codepoints(xs:string?) as xs:integer*
+
+ Returns a sequence of Unicode code points for a given string
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +Input string | +
+
| Expression | +Result | +
|---|---|
| fn:string-to-codepoints('Hello') | +(72, 101, 108, 108, 111) | +
| fn:string-to-codepoints('( ͡° ͜ʖ ͡°)') | +(40, 32, 865, 176, 32, 860, 662, 32, 865, 176, 41) | +
| fn:string-to-codepoints('😊') | +(128522) | +
+
W3C Documentation reference: String-To-Codepoints
+ fn:codepoints-to-string(xs:integer*) as xs:string
+
+ Constructs a string from a sequence of Unicode code points
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:integer* | +Sequence of Unicode code points | +
+
| Expression | +Result | +
|---|---|
| fn:codepoints-to-string((72, 101, 108, 108, 111)) | +Hello | +
| codepoints-to-string((40, 32, 865, 176, 32, 860, 662, 32, 865, 176, 41)) + | +( ͡° ͜ʖ ͡°) | +
| fn:codepoints-to-string((128522)) | +😊 | +
+
W3C Documentation reference: Codepoints-To-String
+ fn:string(object)
+
+ Returns the string representation of the object argument
+ Arguments and return type: +
+
Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| string | +The object to convert to a string | +
+
| Expression | +Result | +
|---|---|
| string((1<0)) | +false | +
| string(.11) | +0.11 | +
+
W3C Documentation reference: String-Functions
+
+
+
+
+
+
+
+
+
+
+ fn:format-number(numeric?, xs:string, item()?) as xs:string
+
+ Returns a string that represents a formatted version of a number using a formatting pattern and an optional
+ set of properties
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| numeric? | +The number to format | +
| xs:string | +The formatting pattern | +
| item()? | +Optional: the set of properties for formatting the number | +
| xs:string | +The formatted number as a string | +
+
| Expression | +Result | +
|---|---|
| format-number(12345.678, "#,##0.00") | +Returns the formatted number: "12,345.68" |
+
| format-number(12345.678, "#,##0") | +Returns the formatted number: "12,346" |
+
| format-number(12345.678, "0.000") | +Returns the formatted number: "12345.678" |
+
+
W3C Documentation reference: format-number
+ fn:format-integer(xs:integer?, xs:string) as xs:string?
+
+ Formats an integer value according to the supplied picture string
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:integer? | +Integer value to be formatted | +
| xs:string | +Picture string defining the format | +
+
| Expression | +Result | +
|---|---|
| fn:format-integer(12345, '0,0') | +12,345 | +
| fn:format-integer(-1234, '0,0') | +-1,234 | +
| fn:format-integer(1234, '00-00-00') | +01-23-45 | +
+
W3C Documentation reference: Format-Integer
+ fn:round-half-to-even(numeric?) as numeric?
+
+ Returns the closest integer to the given numeric value, rounding half-way cases to the
+ nearest even integer (also known as "bankers' rounding")
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| numeric? | +Numeric value for which the rounded value will be calculated | +
+
| Expression | +Result | +
|---|---|
| fn:round-half-to-even(3.5) | +4 | +
| fn:round-half-to-even(2.5) | +2 | +
| fn:round-half-to-even(-1.5) | +-2 | +
| fn:round-half-to-even(xs:decimal('1.25'), 1) | +1.2 | +
+
W3C Documentation reference: Round-Half-To-Even
+ fn:round(numeric?) as numeric?
+
+ Returns the closest integer to the given numeric value, rounding half-way cases away
+ from zero
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| numeric? | +Numeric value for which the rounded value will be calculated | +
+
| Expression | +Result | +
|---|---|
| fn:round(3.14) | +3 | +
| fn:round(-4.7) | +-5 | +
| fn:round(xs:decimal('2.5')) | +3 | +
+
W3C Documentation reference: Round
+ fn:floor(numeric?) as numeric?
+
+ Returns the largest integer less than or equal to the given numeric value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| numeric? | +Numeric value for which the floor value will be calculated | +
+
| Expression | +Result | +
|---|---|
| fn:floor(3.14) | +3 | +
| fn:floor(-4.7) | +-5 | +
| fn:floor(xs:decimal('2.5')) | +2 | +
+
W3C Documentation reference: Floor
+ fn:ceiling(numeric?) as numeric?
+
+ Returns the smallest integer greater than or equal to the given numeric value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| numeric? | +Numeric value for which the ceiling value will be calculated | +
+
| Expression | +Result | +
|---|---|
| fn:ceiling(3.14) | +4 | +
| fn:ceiling(-4.7) | +-4 | +
| fn:ceiling(xs:decimal('2.5')) | +3 | +
+
W3C Documentation reference: Ceiling
+ fn:abs(numeric?) as numeric?
+
+ Returns the absolute value of the given numeric value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| numeric? | +Numeric value for which the absolute value will be calculated | +
+
| Expression | +Result | +
|---|---|
| fn:abs(-42) | +42 | +
| fn:abs(3.14) | +3.14 | +
| fn:abs(xs:decimal('-5.5')) | +5.5 | +
+
W3C Documentation reference: Abs
+ fn:number(item?)
+
+ Converts the given value to a number
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item? | +Returns the numeric value of the specified expression or the context item + (if no argument is provided) | +
+
| Expression | +Result | +
|---|---|
| fn:number(/library/fiction:book[1]/@id) | +1 (if the first fiction:book element's id attribute is "1") | +
| fn:number(/library/fiction:book[1]/price) | +19.99 (if the first fiction:book element's price element contains "19.99") + | +
+
W3C Documentation reference: Number
+
+
+
+
+
+
+
+
+
+ fn:fold-right(item()*, item()*, function(item(), item()*) as item()*) as item()*
+
+ Applies a processing function cumulatively to the items of a sequence from right to
+ left, so as to reduce the sequence to a single value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()* | +The input sequence of items | +
| item()* | +The initial value, also known as the zero value | +
| function(item(), item()*) | +The processing function used to accumulate the items | +
| item()* | +The resulting single value after applying the processing function | +
+
| Expression | +Result | +
|---|---|
| fold-right((1, 2, 3, 4), 0, function($current, $accumulator) { $accumulator + - $current }) | +Returns the result of subtracting each number in the input sequence from
+ right to left: -2 |
+
+
W3C Documentation reference: fold-right
+ fn:fold-left(item()*, item()*, function(item()*, item()) as item()*) as item()*
+
+ Applies a processing function cumulatively to the items of a sequence from left to
+ right, so as to reduce the sequence to a single value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()* | +The input sequence of items | +
| item()* | +The initial value, also known as the zero value | +
| function(item()*, item()) | +The processing function used to accumulate the items | +
| item()* | +The resulting single value after applying the processing function | +
+
| Expression | +Result | +
|---|---|
| fold-left((1, 2, 3, 4), 0, function($accumulator, $current) { $accumulator + + $current }) | +Returns the sum of the numbers in the input sequence: 10 |
+
+
W3C Documentation reference: fold-left
+ fn:last()
+
+ Returns the position of the last item in the current context sequence
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| None | +Returns the position of the last item in the current context sequence | +
+
| Expression | +Result | +
|---|---|
| /library/fiction:book[position() = last()] | +Returns the last fiction:book element in the library | +
| /library/fiction:book[last()] | +Returns the last fiction:book element in the library | +
+
W3C Documentation reference: Last
+ fn:position() as xs:integer
+
+ Returns the context position of the context item in the sequence currently being
+ processed
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| None | +Function takes no arguments | +
| xs:integer | +The position of the context item in the sequence | +
+
| Expression | +Result | +
|---|---|
| <items><item>Item 1</item><item>Item + 2</item></items>/item[position()=2] | +Returns '<item>Item 2</item>' | +
| <items><item>Item 1</item><item>Item + 2</item></items>/item[position()=1] | +Returns '<item>Item 1</item>' | +
+
W3C Documentation reference: position
+ fn:collection(xs:string?) as document-node()*
+
+ Returns a sequence of document nodes obtained from the collection identified by the argument URI, or the
+ default collection if no argument is supplied.
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +The URI of the collection to retrieve (Optional) | +
| document-node()* | +A sequence of document nodes obtained from the collection | +
+
| Expression | +Result | +
|---|---|
| collection() | +Returns the sequence of document nodes from the default collection | +
| collection("http://example.com/collection") | +Returns the sequence of document nodes from the collection identified by the specified URI | +
| count(collection()) | +Returns the number of document nodes in the default collection | +
+
W3C Documentation reference: collection
+ fn:sum(xs:anyAtomicType*, xs:anyAtomicType?) as xs:anyAtomicType?
+
+ Returns the sum of a sequence of numeric values
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:anyAtomicType* | +Input sequence of numeric values | +
| xs:anyAtomicType? | +Value to return if the sequence is empty (optional) | +
| xs:anyAtomicType? | +Sum of the input sequence | +
+
| Expression | +Result | +
|---|---|
| fn:sum((10, 20, 30, 40, 50)) | +150 | +
| fn:sum((), 0) | +0 | +
+
W3C Documentation reference: sum
+ fn:min(xs:anyAtomicType*) as xs:anyAtomicType?
+
+ Returns the minimum value of a sequence of atomic values, according to the ordering rules for the value's
+ type
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:anyAtomicType* | +The input sequence of atomic values | +
| xs:anyAtomicType? | +The minimum value of the input sequence, or the empty sequence if the input sequence is empty + | +
+
| Expression | +Result | +
|---|---|
| min((5, 1, 9, 3)) | +Returns the minimum value: 1 |
+
| min(()) | +Returns the empty sequence: () |
+
| min(("apple", "banana", "cherry")) | +Returns the minimum value (alphabetical order): "apple" |
+
+
W3C Documentation reference: min
+ fn:max(xs:anyAtomicType*) as xs:anyAtomicType?
+
+ Returns the maximum value of a sequence of atomic values, according to the ordering rules for the value's
+ type
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:anyAtomicType* | +The input sequence of atomic values | +
| xs:anyAtomicType? | +The maximum value of the input sequence, or the empty sequence if the input sequence is empty + | +
+
| Expression | +Result | +
|---|---|
| max((5, 1, 9, 3)) | +Returns the maximum value: 9 |
+
| max(()) | +Returns the empty sequence: () |
+
| max(("apple", "banana", "cherry")) | +Returns the maximum value (alphabetical order): "cherry" |
+
+
W3C Documentation reference: max
+ fn:avg(xs:anyAtomicType*) as xs:anyAtomicType?
+
+ Computes the average of the numeric values in the input sequence
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:anyAtomicType* | +Input sequence of numeric values | +
| xs:anyAtomicType? | +Average of the numeric values in the input sequence | +
+
| Expression | +Result | +
|---|---|
| fn:avg((10, 20, 30, 40, 50)) | +30 | +
| fn:avg((2.5, 3.5, 4.5)) | +3.5 | +
| fn:avg(()) | +empty sequence | +
+
W3C Documentation reference: avg
+ fn:count(item()*) as xs:integer
+
+ Returns the number of items in the input sequence
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()* | +Input sequence | +
| xs:integer | +Number of items in the input sequence | +
+
| Expression | +Result | +
|---|---|
| fn:count(('apple', 'banana', 'orange')) | +3 | +
| fn:count(()) | +0 | +
| fn:count((1, 2, 3, 4, 5)) | +5 | +
+
W3C Documentation reference: count
+ fn:exactly-one(item()*) as item()
+
+ Returns the single item in the input sequence or raises an error if the sequence is
+ empty or contains more than one item
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()* | +Input sequence | +
| item() | +Single item from the input sequence, otherwise an error is raised | +
+
| Expression | +Result | +
|---|---|
| fn:exactly-one(('apple')) | +'apple' | +
| fn:exactly-one(('apple', 'banana')) | +Error (more than one item) | +
| fn:exactly-one(()) | +Error (empty sequence) | +
+
W3C Documentation reference: exactly-one
+ fn:one-or-more(item()*) as item()+
+
+ Returns the input sequence if it contains one or more items, otherwise raises an
+ error
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()* | +Input sequence | +
| item()+ | +Sequence containing one or more items, otherwise an error is raised | +
+
| Expression | +Result | +
|---|---|
| fn:one-or-more(('apple', 'banana')) | +('apple', 'banana') | +
| fn:one-or-more(('pear')) | +('pear') | +
+
W3C Documentation reference: one-or-more
+ fn:zero-or-one(item()*) as item()?
+
+ Returns the input sequence if it contains zero or one items, otherwise raises an
+ error
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()* | +Input sequence | +
| item()? | +Sequence containing zero or one item, otherwise an error is raised | +
+
| Expression | +Result | +
|---|---|
| fn:zero-or-one(('apple')) | +('apple') | +
| fn:zero-or-one(()) | +() | +
+
W3C Documentation reference: zero-or-one
+ fn:deep-equal($parameter1 as item()* , $parameter2 as item()*) as xs:boolean
+
+ Returns true if the two input sequences are deep-equal, meaning that they have the same
+ structure and atomic values
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()* | +First input sequence | +
| item()* | +Second input sequence | +
| xs:boolean | +True if the input sequences are deep-equal, otherwise false | +
+
| Expression | +Result | +
|---|---|
| fn:deep-equal((1, 2, 3), (1, 2, 3)) | +true | +
| fn:deep-equal((1, 2, 3), (1, 2, 4)) | +false | +
+
W3C Documentation reference: deep-equal
+ fn:index-of(xs:anyAtomicType*, xs:anyAtomicType) as xs:integer*
+
+ Returns a sequence of integers indicating the positions of items in the input sequence
+ that are equal to the search item
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:anyAtomicType* | +Input sequence of atomic values | +
| xs:anyAtomicType | +Search item to find in the input sequence | +
| xs:integer* | +Sequence of integers representing the positions of the search item in the + input sequence | +
+
| Expression | +Result | +
|---|---|
| fn:index-of((3, 1, 4, 1, 5, 9, 2, 2, 3), 1) | +(2, 4) | +
| fn:index-of(('apple', 'banana', 'orange', 'apple', 'grape', 'orange'), + 'apple') | +(1, 4) | +
+
W3C Documentation reference: index-of
+ fn:distinct-values(xs:anyAtomicType*) as xs:anyAtomicType*
+
+ Returns a sequence of distinct atomic values from the input sequence
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:anyAtomicType* | +Input sequence of atomic values | +
| xs:anyAtomicType* | +Distinct sequence of atomic values | +
+
| Expression | +Result | +
|---|---|
| fn:distinct-values((3, 1, 4, 1, 5, 9, 2, 2, 3)) | +(3, 1, 4, 5, 9, 2) | +
| fn:distinct-values(('apple', 'banana', 'orange', 'apple', 'grape', + 'orange')) | +('apple', 'banana', 'orange', 'grape') | +
+
W3C Documentation reference: distinct-values
+ fn:unordered(item()*) as item()*
+
+ Returns the items of a sequence in an implementation-dependent order
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()* | +Input sequence | +
| item()* | +Unordered sequence | +
+
| Expression | +Result | +
|---|---|
| fn:unordered((3, 1, 4, 1, 5, 9, 2)) | +(1, 2, 3, 4, 5, 9, 1) (example result; actual order may vary) | +
| fn:unordered(('apple', 'banana', 'orange', 'grape')) | +('banana', 'apple', 'orange', 'grape') (example result; actual order may + vary) | +
+
W3C Documentation reference: unordered
+ fn:subsequence(item()*, xs:double, xs:double) as item()*
+
+ Returns a subsequence of a given sequence starting at a specified position with a
+ specified length
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()* | +Input sequence | +
| xs:double | +Starting position | +
| xs:double | +Length of subsequence | +
| item()* | +Subsequence | +
+
| Expression | +Result | +
|---|---|
| fn:subsequence((1, 2, 3, 4, 5), 2, 3) | +(2, 3, 4) | +
| fn:subsequence(('apple', 'banana', 'orange', 'grape'), 1, 2) | +('apple', 'banana') | +
| fn:subsequence(('red', 'blue', 'green', 'yellow'), 3) | +('green', 'yellow') | +
+
W3C Documentation reference: subsequence
+ fn:reverse(item()*) as item()*
+
+ Reverses the order of items in a sequence
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()* | +Input sequence | +
| item()* | +Reversed sequence | +
+
| Expression | +Result | +
|---|---|
| fn:reverse((1, 2, 3, 4)) | +(4, 3, 2, 1) | +
| fn:reverse(('apple', 'banana', 'orange')) | +('orange', 'banana', 'apple') | +
| fn:reverse(('red', 'blue', 'green')) | +('green', 'blue', 'red') | +
+
W3C Documentation reference: reverse
+ fn:remove(item()*, xs:integer) as item()*
+
+ Removes an item from a sequence at the specified position
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()* | +Target sequence | +
| xs:integer | +Position of the item to remove | +
| item()* | +New sequence with the item removed | +
+
| Expression | +Result | +
|---|---|
| fn:remove((1, 2, 3, 4), 2) | +(1, 3, 4) | +
| fn:remove(('apple', 'banana', 'orange'), 3) | +('apple', 'banana') | +
| fn:remove((10, 20, 30), 1) | +(20, 30) | +
+
W3C Documentation reference: remove
+ fn:insert-before(item()*, xs:integer, item()*) as item()*
+
+ Inserts items from the specified sequence into another sequence at a given position
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()* | +Target sequence | +
| xs:integer | +Position at which to insert the items | +
| item()* | +Sequence of items to insert | +
| item()* | +New sequence with items inserted | +
+
| Expression | +Result | +
|---|---|
| fn:insert-before((1, 3, 4), 2, (2)) | +(1, 2, 3, 4) | +
| fn:insert-before(('apple', 'orange'), 1, ('banana')) | +('banana', 'apple', 'orange') | +
| fn:insert-before((10, 20, 30), 4, (40)) | +(10, 20, 30, 40) | +
+
W3C Documentation reference: insert-before
+ fn:tail(item()*) as item()*
+
+ Returns all items of the input sequence except the first one, or an empty sequence if
+ the input is empty or contains only one item
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()* | +Sequence of items | +
| item()* | +All items except the first one, or an empty sequence | +
+
| Expression | +Result | +
|---|---|
| fn:tail((1, 2, 3)) | +(2, 3) | +
| fn:tail((1)) | +() | +
| fn:tail(/books/book/author) | +All authors in the "books" element except the first one | +
+
W3C Documentation reference: tail
+ fn:head(item()*) as item()?
+
+ Returns the first item of the input sequence, or an empty sequence if the input is
+ empty
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()* | +Sequence of items | +
| item()? | +The first item of the sequence, or an empty sequence | +
+
| Expression | +Result | +
|---|---|
| fn:head((1, 2, 3)) | +1 | +
| fn:head(()) | +() | +
| fn:head(/books/book[1]/author) | +The first author of the first book in the "books" element | +
+
W3C Documentation reference: head
+ fn:exists(item()*) as xs:boolean
+
+ Returns true if the input sequence is not empty, otherwise returns false
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()* | +Sequence of items | +
| xs:boolean | +Result of the test (true or false) | +
+
| Expression | +Result | +
|---|---|
| fn:exists((1, 2, 3)) | +true | +
| fn:exists(()) | +false | +
| fn:exists(//chapter[5]) | +true if there are at least 5 chapters, otherwise false | +
+
W3C Documentation reference: exists
+ fn:empty(item()*) as xs:boolean
+
+ Returns true if the input sequence is empty, otherwise returns false
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()* | +Sequence of items | +
| xs:boolean | +Result of the test (true or false) | +
+
| Expression | +Result | +
|---|---|
| fn:empty((1, 2, 3)) | +false | +
| fn:empty(()) | +true | +
| fn:empty(//chapter[100]) | +true if there are less than 100 chapters, otherwise false | +
+
W3C Documentation reference: empty
+ fn:data(item*)
+
+ Returns the simple value of an item or a sequence of items
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item? | +Returns the simple value of the specified item or the context item (if no + argument is provided) | +
+
| Expression | +Result | +
|---|---|
| fn:data(/library/fiction:book[1]/title) | +The Catcher in the Rye | +
| fn:data(/library/fiction:book[2]/author) | +Harper Lee | +
+
W3C Documentation reference: Data
+
+
+
+
+
+
+
+
+
+
+ fn:implicit-timezone() as xs:dayTimeDuration
+
+ Returns the implicit timezone as an xs:dayTimeDuration
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| None | +Function takes no arguments | +
| xs:dayTimeDuration | +The implicit timezone as a dayTimeDuration | +
+
| Expression | +Result | +
|---|---|
| implicit-timezone() | +Returns the implicit timezone as an xs:dayTimeDuration, e.g., '-PT7H' + | +
+
W3C Documentation reference: implicit-timezone
+ fn:current-time() as xs:time
+
+ Returns the current time with timezone
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| None | +Function takes no arguments | +
| xs:time | +The current time with timezone | +
+
| Expression | +Result | +
|---|---|
| current-time() | +Returns the current time with timezone, e.g., '13:45:30.123-07:00' | +
+
W3C Documentation reference: current-time
+ fn:current-date() as xs:date
+
+ Returns the current date with timezone
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| None | +Function takes no arguments | +
| xs:date | +The current date with timezone | +
+
| Expression | +Result | +
|---|---|
| current-date() | +Returns the current date with timezone, e.g., '2023-03-29-07:00' | +
+
W3C Documentation reference: current-date
+ fn:current-dateTime() as xs:dateTime
+
+ Returns the current date and time with timezone
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| None | +Function takes no arguments | +
| xs:dateTime | +The current date and time with timezone | +
+
| Expression | +Result | +
|---|---|
| current-dateTime() | +Returns the current date and time with timezone, e.g., + '2023-03-29T12:34:56.789-07:00' | +
+
W3C Documentation reference: current-dateTime
+ fn:format-time(xs:time?, xs:string, xs:string?, xs:string?, xs:string?) as xs:string
+
+ Formats a time value according to a formatting picture string, with optional language, calendar, and
+ country parameters.
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:time? | +The time value to be formatted (Optional) | +
| xs:string | +The formatting picture string | +
| xs:string? | +The language for formatting (Optional) | +
| xs:string? | +The calendar for formatting (Optional) | +
| xs:string? | +The country for formatting (Optional) | +
| xs:string | +The formatted time value as a string | +
+
| Expression | +Result | +
|---|---|
| format-time(xs:time("14:30:00"), "[H]:[m]") | +"14:30" | +
| format-time(xs:time("14:30:00"), "[H]:[m]:[s]") | +"14:30:00" | +
| format-time(xs:time("14:30:00.456"), "[H]:[m]:[s].[f]") | +"14:30:00.456" | +
+
W3C Documentation reference: format-time
+ fn:format-date(xs:date?, xs:string, xs:string?, xs:string?, xs:string?) as xs:string?
+
+ Formats a date value using the provided picture string and optional language,
+ calendar, and country settings
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:date? | +Date value | +
| xs:string | +Picture string | +
| xs:string? | +Language | +
| xs:string? | +Calendar | +
| xs:string? | +Country | +
+
| Expression | +Result | +
|---|---|
| fn:format-date(xs:date('2023-04-01'), '[Y0001]-[M01]-[D01]') | +2023-04-01 | +
| fn:format-date(xs:date('2023-04-01'), '[MNn,*-3] [D], [Y]') | +Apr 1, 2023 | +
+
W3C Documentation reference: Format-Date
+ fn:format-dateTime(xs:dateTime?, xs:string, xs:string?, xs:string?, xs:string?) as xs:string
+
+ Formats a dateTime value according to a formatting picture string, with optional language, calendar, and
+ country parameters.
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:dateTime? | +The dateTime value to be formatted (Optional) | +
| xs:string | +The formatting picture string | +
| xs:string? | +The language for formatting (Optional) | +
| xs:string? | +The calendar for formatting (Optional) | +
| xs:string? | +The country for formatting (Optional) | +
| xs:string | +The formatted dateTime value as a string | +
+
| Expression | +Result | +
|---|---|
| format-dateTime(xs:dateTime("2023-04-12T14:30:00"), "[Y]-[M]-[D]T[H]:[m]") | +"2023-04-12T14:30" | +
| format-dateTime(xs:dateTime("2023-04-12T14:30:00"), "[FNn, Nn] [D] [MNn] [Y]") | +"Wednesday, 12 April 2023" | +
| format-dateTime(xs:dateTime("2023-04-12T14:30:00.123"), "[Y]-[M]-[D]T[H]:[m]:[s].[f]") | +"2023-04-12T14:30:00.123" | +
+
W3C Documentation reference: format-dateTime
+ fn:adjust-time-to-timezone(xs:time?, xs:dayTimeDuration?) as xs:time?
+
+ Adjusts the timezone of a time value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:time? | +Time value | +
| xs:dayTimeDuration? | +Timezone adjustment | +
+
| Expression | +Result | +
|---|---|
| fn:adjust-time-to-timezone(xs:time('10:00:00-07:00'), + xs:dayTimeDuration('PT2H')) | +12:00:00-05:00 | +
| fn:adjust-time-to-timezone(xs:time('10:00:00Z'), + xs:dayTimeDuration('-PT3H')) | +07:00:00-03:00 | +
+
W3C Documentation reference: Adjust-Time-To-Timezone
+ fn:adjust-date-to-timezone(xs:date?, xs:dayTimeDuration?) as xs:date?
+
+ Adjusts the timezone of a date value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:date? | +Date value | +
| xs:dayTimeDuration? | +Timezone adjustment | +
+
| Expression | +Result | +
|---|---|
| fn:adjust-date-to-timezone(xs:date('2023-01-01-07:00'), + xs:dayTimeDuration('PT2H')) | +2023-01-01-05:00 | +
| fn:adjust-date-to-timezone(xs:date('2023-01-01Z'), + xs:dayTimeDuration('-PT3H')) | +2022-12-31-03:00 | +
+
W3C Documentation reference: Adjust-Date-To-Timezone
+ fn:adjust-dateTime-to-timezone(xs:dateTime?, xs:dayTimeDuration?) as xs:dateTime?
+
+ Adjusts the timezone of a dateTime value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:dateTime? | +DateTime value | +
| xs:dayTimeDuration? | +Timezone adjustment | +
+
| Expression | +Result | +
|---|---|
| fn:adjust-dateTime-to-timezone(xs:dateTime('2023-01-01T12:00:00-07:00'), + xs:dayTimeDuration('PT2H')) | +2023-01-01T17:00:00-05:00 | +
| fn:adjust-dateTime-to-timezone(xs:dateTime('2023-01-01T12:00:00Z'), + xs:dayTimeDuration('-PT3H')) | +2023-01-01T09:00:00-03:00 | +
+
W3C Documentation reference: Adjust-DateTime-To-Timezone
+ fn:timezone-from-time(xs:time?) as xs:dayTimeDuration?
+
+ Extracts the timezone component from an xs:time value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:time? | +Time value | +
+
| Expression | +Result | +
|---|---|
| fn:timezone-from-time(xs:time('12:00:00-07:00')) | +-PT7H | +
| fn:timezone-from-time(xs:time('14:30:00+02:30')) | +PT2H30M | +
+
W3C Documentation reference: Timezone-From-Time
+ fn:seconds-from-time(xs:time?) as xs:decimal?
+
+ Extracts the seconds component from an xs:time value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:time? | +Time value | +
+
| Expression | +Result | +
|---|---|
| fn:seconds-from-time(xs:time('21:45:30.5')) | +30.5 | +
| fn:seconds-from-time(xs:time('04:15:12.1')) | +12.1 | +
+
W3C Documentation reference: Seconds-From-Time
+ fn:minutes-from-time(xs:time?) as xs:integer?
+
+ Extracts the minutes component from an xs:time value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:time? | +Time value | +
+
| Expression | +Result | +
|---|---|
| fn:minutes-from-time(xs:time('21:45:30')) | +45 | +
| fn:minutes-from-time(xs:time('04:15:12')) | +15 | +
+
W3C Documentation reference: Minutes-From-Time
+ fn:hours-from-time(xs:time?) as xs:integer?
+
+ Extracts the hours component from an xs:time value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:time? | +Time value | +
+
| Expression | +Result | +
|---|---|
| fn:hours-from-time(xs:time('21:45:30')) | +21 | +
| fn:hours-from-time(xs:time('04:15:12')) | +4 | +
+
W3C Documentation reference: Hours-From-Time
+ fn:timezone-from-date(xs:date?) as xs:dayTimeDuration?
+
+ Extracts the timezone component from an xs:date value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:date? | +Date value | +
+
| Expression | +Result | +
|---|---|
| fn:timezone-from-date(xs:date('2023-03-29+02:00')) | +PT2H | +
| fn:timezone-from-date(xs:date('1980-12-15-05:00')) | +-PT5H | +
+
W3C Documentation reference: Timezone-From-Date
+ fn:day-from-date(xs:date?) as xs:integer?
+
+ Extracts the day component from an xs:date value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:date? | +Date value | +
+
| Expression | +Result | +
|---|---|
| fn:day-from-date(xs:date('2023-03-29')) | +29 | +
| fn:day-from-date(xs:date('1980-12-15')) | +15 | +
+
W3C Documentation reference: Day-From-Date
+ fn:month-from-date(xs:date?) as xs:integer?
+
+ Extracts the month component from an xs:date value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:date? | +Date value | +
+
| Expression | +Result | +
|---|---|
| fn:month-from-date(xs:date('2023-03-29')) | +3 | +
| fn:month-from-date(xs:date('1980-12-15')) | +12 | +
+
W3C Documentation reference: Month-From-Date
+ fn:year-from-date(xs:date?) as xs:integer?
+
+ Extracts the year component from an xs:date value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:date? | +Date value | +
+
| Expression | +Result | +
|---|---|
| fn:year-from-date(xs:date('2023-03-29')) | +2023 | +
| fn:year-from-date(xs:date('1980-12-15')) | +1980 | +
+
W3C Documentation reference: Year-From-Date
+ fn:timezone-from-dateTime(xs:dateTime?) as xs:dayTimeDuration?
+
+ Extracts the timezone component from an xs:dateTime value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:dateTime? | +DateTime value | +
+
| Expression | +Result | +
|---|---|
| fn:timezone-from-dateTime(xs:dateTime('2023-03-29T12:30:45-07:00')) | +-PT7H | +
| fn:timezone-from-dateTime(xs:dateTime('2023-12-15T18:45:30+03:30')) | +PT3H30M | +
+
W3C Documentation reference: Timezone-From-DateTime
+ fn:seconds-from-dateTime(xs:dateTime?) as xs:decimal?
+
+ Extracts the seconds component from an xs:dateTime value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:dateTime? | +DateTime value | +
+
| Expression | +Result | +
|---|---|
| fn:seconds-from-dateTime(xs:dateTime('2023-03-29T12:30:45')) | +45 | +
| fn:seconds-from-dateTime(xs:dateTime('2023-12-15T18:45:30.5-08:00')) + | +30.5 | +
+
W3C Documentation reference: Seconds-From-DateTime
+ fn:minutes-from-dateTime(xs:dateTime?) as xs:integer?
+
+ Extracts the minutes component from an xs:dateTime value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:dateTime? | +DateTime value | +
+
| Expression | +Result | +
|---|---|
| fn:minutes-from-dateTime(xs:dateTime('2023-03-29T12:30:00')) | +30 | +
| fn:minutes-from-dateTime(xs:dateTime('2023-12-15T18:45:00-08:00')) | +45 | +
+
W3C Documentation reference: Minutes-From-DateTime
+ fn:hours-from-dateTime(xs:dateTime?) as xs:integer?
+
+ Extracts the hours component from an xs:dateTime value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:dateTime? | +DateTime value | +
+
| Expression | +Result | +
|---|---|
| fn:hours-from-dateTime(xs:dateTime('2023-03-29T12:30:00')) | +12 | +
| fn:hours-from-dateTime(xs:dateTime('2023-12-15T18:45:00-08:00')) | +18 | +
+
W3C Documentation reference: Hours-From-DateTime
+ fn:day-from-dateTime(xs:dateTime?) as xs:integer?
+
+ Extracts the day component from an xs:dateTime value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:dateTime? | +DateTime value | +
+
| Expression | +Result | +
|---|---|
| fn:day-from-dateTime(xs:dateTime('2023-03-29T12:30:00')) | +29 | +
| fn:day-from-dateTime(xs:dateTime('2023-12-15T18:45:00-08:00')) | +15 | +
+
W3C Documentation reference: Day-From-DateTime
+ fn:month-from-dateTime(xs:dateTime?) as xs:integer?
+
+ Extracts the month component from an xs:dateTime value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:dateTime? | +DateTime value | +
+
| Expression | +Result | +
|---|---|
| fn:month-from-dateTime(xs:dateTime('2023-03-29T12:30:00')) | +3 | +
| fn:month-from-dateTime(xs:dateTime('2023-12-15T18:45:00-08:00')) | +12 | +
+
W3C Documentation reference: Month-From-DateTime
+ fn:year-from-dateTime(xs:dateTime?) as xs:integer?
+
+ Extracts the year component from an xs:dateTime value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:dateTime? | +DateTime value | +
+
| Expression | +Result | +
|---|---|
| fn:year-from-dateTime(xs:dateTime('2023-03-29T12:30:00')) | +2023 | +
| fn:year-from-dateTime(xs:dateTime('2023-03-29T12:30:00-08:00')) | +2023 | +
+
W3C Documentation reference: Year-From-DateTime
+ fn:dateTime($arg1 as xs:date?, $arg2 as xs:time?) as xs:dateTime?
+
+ Constructs an xs:dateTime value from an xs:date and an xs:time value
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:date? | +Date value | +
| xs:time? | +Time value | +
+
| Expression | +Result | +
|---|---|
| fn:dateTime(xs:date('2023-03-29'), xs:time('12:30:00')) | +2023-03-29T12:30:00 | +
| fn:dateTime(xs:date('2023-03-29+05:00'), xs:time('12:30:00-08:00')) | +2023-03-29T12:30:00-08:00 | +
+
W3C Documentation reference: DateTime
+ fn:seconds-from-duration(xs:duration?) as xs:decimal?
+
+ Returns the seconds component of the duration
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:duration? | +Duration from which to extract the seconds component | +
+
| Expression | +Result | +
|---|---|
| fn:seconds-from-duration(xs:dayTimeDuration('PT1H30M15.5S')) | +15.5 | +
| fn:seconds-from-duration(xs:dayTimeDuration('-PT2M10.3S')) | +-10.3 | +
+
W3C Documentation reference: Seconds-From-Duration
+ fn:minutes-from-duration(xs:duration?) as xs:integer?
+
+ Returns the minutes component of the duration
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:duration? | +Duration from which to extract the minutes component | +
+
| Expression | +Result | +
|---|---|
| fn:minutes-from-duration(xs:dayTimeDuration('PT2H30M')) | +30 | +
| fn:minutes-from-duration(xs:dayTimeDuration('-PT1H45M')) | +-45 | +
+
W3C Documentation reference: Minutes-From-Duration
+ fn:hours-from-duration(xs:duration?) as xs:integer?
+
+ Returns the hours component of the duration
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:duration? | +Duration from which to extract the hours component | +
+
| Expression | +Result | +
|---|---|
| fn:hours-from-duration(xs:dayTimeDuration('PT36H')) | +36 | +
| fn:hours-from-duration(xs:dayTimeDuration('-PT12H30M')) | +-12 | +
+
W3C Documentation reference: Hours-From-Duration
+ fn:days-from-duration(xs:duration?) as xs:integer?
+
+ Returns the days component of the duration
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:duration? | +Duration from which to extract the days component | +
+
| Expression | +Result | +
|---|---|
| fn:days-from-duration(xs:dayTimeDuration('P5DT12H30M')) | +5 | +
| fn:days-from-duration(xs:dayTimeDuration('-P2DT6H')) | +-2 | +
+
W3C Documentation reference: Days-From-Duration
+ fn:months-from-duration(xs:duration?) as xs:integer?
+
+ Returns the months component of the duration
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:duration? | +Duration from which to extract the months component | +
+
| Expression | +Result | +
|---|---|
| fn:months-from-duration(xs:duration('P2Y3M4DT5H6M7S')) | +3 | +
| fn:months-from-duration(xs:duration('-P2Y3M4DT5H6M7S')) | +-3 | +
+
W3C Documentation reference: Months-From-Duration
+ fn:years-from-duration(xs:duration?) as xs:integer?
+
+ Returns the years component of the duration
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:duration? | +Duration from which to extract the years component | +
+
| Expression | +Result | +
|---|---|
| fn:years-from-duration(xs:duration('P2Y3M4DT5H6M7S')) | +2 | +
| fn:years-from-duration(xs:duration('-P2Y3M4DT5H6M7S')) | +-2 | +
+
W3C Documentation reference: Years-From-Duration
+ fn:adjust-date-to-timezone(date,timezone)
+
+ If the timezone argument is empty, it returns a date without a timezone. Otherwise,
+ it returns a date with a timezone
+ Arguments and return type: +
+
Examples:
+
+
+
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| date | +date to be adjusted | +
| timezone | +timezone to be imposed into date | +
+
| Expression | +Result | +
|---|---|
| adjust-date-to-timezone(xs:date('2011-11-15'), + xs:dayTimeDuration("PT10H")) | +2011-11-15+10:00 | +
+
W3C Documentation reference: #func-adjust-date-to-timezone
+
+
+
+
+
+
+
+
+ fn:trace(item()*, xs:string) as item()*
+
+ Outputs the provided label and value for diagnostic purposes and returns the value
+ unchanged
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()* | +Value to be traced | +
| xs:string | +Label to be output along with the value | +
+
| Expression | +Result | +
|---|---|
| fn:trace(42, 'The value is:') | +Outputs "The value is: 42" for diagnostic purposes and returns 42 | +
| fn:trace(/library/book/title, 'Book title:') | +Outputs "Book title: [book title]" for diagnostic purposes and returns + the book title | +
+
W3C Documentation reference: Trace
+ fn:error(xs:QName?, xs:string?, $error-object as item()*)
+
+ Raises an error with the specified error code, description, and error object
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:QName? | +Error code (optional) | +
| xs:string? | +Description of the error (optional) | +
| item()* | +Error object (optional) | +
+
| Expression | +Result | +
|---|---|
| fn:error(xs:QName('err:FOER0000')) | +Raise error with the code err:FOER0000 | +
| fn:error(xs:QName('err:FOER0000'), 'Invalid value') | +Raise error with the code err:FOER0000 and description "Invalid value" + | +
+
W3C Documentation reference: Error
+
+
+
+
+
+
+
+
+
+ fn:function-arity(function(*)) as xs:integer
+
+ Returns the arity (number of arguments) of the specified function
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| function(*) | +The function to obtain the arity for | +
| xs:integer | +The arity (number of arguments) of the specified function | +
+
| Expression | +Result | +
|---|---|
| function-arity(fn:substring) | +Returns the arity of the substring function: 2 (since
+ substring accepts two required arguments: the input string and the
+ starting index) |
+
+
W3C Documentation reference: function-arity
+ fn:function-name(function(*)) as xs:QName?
+
+ Returns the QName of the specified function
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| function(*) | +The function to obtain the QName for | +
| xs:QName? | +The QName of the specified function, or an empty sequence if the + function is anonymous | +
+
| Expression | +Result | +
|---|---|
| function-name(fn:substring) | +Returns the QName of the substring function:
+ QName("http://www.w3.org/2005/xpath-functions", "substring")
+ |
+
+
W3C Documentation reference: function-name
+ fn:function-lookup(xs:QName, xs:integer) as function(*)?
+
+ Returns a function with the specified QName and arity if available, otherwise
+ returns an empty sequence
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:QName | +Function name as QName | +
| xs:integer | +Arity of the function | +
| function(*)? | +A function with the specified QName and arity if available, otherwise an + empty sequence | +
+
| Expression | +Result | +
|---|---|
| function-lookup(QName('http://www.w3.org/2005/xpath-functions', + 'substring'), 2) | +Returns the substring function with arity 2, if available | +
+
W3C Documentation reference: function-lookup
+ fn:static-base-uri() as xs:anyURI?
+
+ Returns the static base URI as an xs:anyURI, if available
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| None | +Function takes no arguments | +
| xs:anyURI? | +The static base URI, if available; otherwise, an empty sequence | +
+
| Expression | +Result | +
|---|---|
| static-base-uri() | +Returns the static base URI as an xs:anyURI, if available, e.g., + 'https://www.example.com/base/' | +
+
W3C Documentation reference: static-base-uri
+ fn:default-collation() as xs:string
+
+ Returns the default collation URI as an xs:string
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| None | +Function takes no arguments | +
| xs:string | +The default collation URI as a string | +
+
| Expression | +Result | +
|---|---|
| default-collation() | +Returns the default collation URI as an xs:string, e.g., + 'http://www.w3.org/2005/xpath-functions/collation/codepoint' | +
+
W3C Documentation reference: default-collation
+ fn:serialize(item()?, item()?) as xs:string?
+
+ Serializes an XML node, producing a string representation of the node
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()? | +An XML node to serialize | +
| item()? | +Serialization options as a map, with key-value pairs defining the + serialization parameters (optional) | +
| xs:string? | +A string representation of the serialized XML node or an empty sequence + if the input is an empty sequence | +
+
| Expression | +Result | +
|---|---|
| fn:serialize(<item>Item 1</item>) | +Returns '<item>Item 1</item>' | +
| fn:serialize(<item>Item 1</item>, map{'method': 'xml', 'indent': + 'yes'}) | +Returns an indented XML string representation of the input node | +
+
W3C Documentation reference: serialize
+ fn:parse-xml-fragment(xs:string?) as document-node(element(*))?
+
+ Parses a string containing an XML fragment and returns a corresponding document
+ node
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +A string containing an XML fragment | +
| document-node(element(*))? | +A document node containing the parsed XML fragment or an empty sequence + if the input is an empty sequence | +
+
| Expression | +Result | +
|---|---|
| fn:parse-xml-fragment('<item>Item 1</item><item>Item + 2</item>') | +Returns a document node containing the parsed XML fragment | +
+
W3C Documentation reference: parse-xml-fragment
+ fn:parse-xml(xs:string?) as document-node(element(*))?
+
+ Parses a string containing an XML document and returns a corresponding document
+ node
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +A string containing an XML document | +
| document-node(element(*))? | +A document node containing the parsed XML content or an empty sequence + if the input is an empty sequence | +
+
| Expression | +Result | +
|---|---|
| fn:parse-xml('<root><item>Item 1</item></root>') | +Returns a document node containing the parsed XML content | +
+
W3C Documentation reference: parse-xml
+ fn:available-environment-variables() as xs:string*
+
+ Retrieves a sequence of the names of all available environment variables
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| None | +No argument is required | +
| xs:string* | +A sequence of the names of all available environment variables | +
+
| Expression | +Result | +
|---|---|
| fn:available-environment-variables() | +Returns a sequence of the names of all available environment variables + | +
+
W3C Documentation reference: available-environment-variables
+ fn:environment-variable(xs:string) as xs:string?
+
+ Retrieves the value of an environment variable
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string | +The name of the environment variable | +
| xs:string? | +The value of the environment variable, or an empty sequence if the + variable is not set | +
+
| Expression | +Result | +
|---|---|
| fn:environment-variable("PATH") | +Returns the value of the PATH environment variable, or an empty sequence + if the variable is not set | +
+
W3C Documentation reference: environment-variable
+ fn:uri-collection(xs:string?) as xs:anyURI*
+
+ Returns a sequence of URIs in a collection identified by a URI
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +The URI identifying the collection of URIs | +
| xs:anyURI* | +A sequence of URIs in the collection | +
+
| Expression | +Result | +
|---|---|
| fn:uri-collection("http://www.example.com/collection/") | +Returns a sequence of URIs in the collection identified by the specified + URI + | +
| fn:uri-collection() | +Returns a sequence of URIs in the default collection, if one is defined + | +
+
W3C Documentation reference: uri-collection
+ fn:doc-available(xs:string?) as xs:boolean
+
+ Tests whether an XML document is available at a given URI
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +The URI of the XML document to be tested | +
| xs:boolean | +True if the XML document is available, otherwise false | +
+
| Expression | +Result | +
|---|---|
| fn:doc-available("http://www.example.com/books.xml") | +Returns true if the XML document located at the specified URI is + available, otherwise false | +
| fn:doc-available("") | +Returns true if the XML document containing the context item is + available, otherwise false | +
+
W3C Documentation reference: doc-available
+ fn:doc(xs:string?) as document-node()?
+
+ Loads an XML document from a URI and returns the document node
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +The URI of the XML document to be loaded | +
| document-node()? | +The document node of the loaded XML document | +
+
| Expression | +Result | +
|---|---|
| fn:doc("http://www.example.com/books.xml") | +Loads the XML document located at the specified URI and returns its + document node | +
| fn:doc("") | +Returns the document node of the XML document containing the context + item | +
+
W3C Documentation reference: doc
+ fn:generate-id(node()?) as xs:string
+
+ Returns a unique identifier for the specified node
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| node()? | +Input node for which the unique identifier is to be generated | +
| xs:string | +Unique identifier for the specified node | +
+
| Expression | +Result | +
|---|---|
| fn:generate-id(/bookstore/book[1]) | +A unique identifier for the first <book> element in the + <bookstore> | +
| fn:generate-id(.) | +A unique identifier for the context node | +
+
W3C Documentation reference: generate-id
+ fn:idref(xs:string*) as node()*
+
+ Returns a sequence of nodes that are referenced by the specified IDREF attribute
+ values
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string* | +Input sequence of IDREF attribute values | +
| node()* | +Sequence of nodes referenced by the specified IDREF attribute values + | +
+
| Expression | +Result | +
|---|---|
| fn:idref("reference42") | +Nodes referenced by the IDREF attribute value "reference42" | +
| fn:idref(("ref1", "ref2", "ref3")) | +Nodes referenced by the IDREF attribute values "ref1", "ref2", and + "ref3" | +
+
W3C Documentation reference: idref
+ fn:id(xs:string*) as element()*
+
+ Returns a sequence of elements with the specified ID attribute values
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string* | +Input sequence of ID attribute values | +
| element()* | +Sequence of elements with the specified ID attribute values | +
+
| Expression | +Result | +
|---|---|
| fn:id("item42") | +Element with the ID attribute value "item42" | +
| fn:id(("item1", "item2", "item3")) | +Elements with the ID attribute values "item1", "item2", and "item3" | +
+
W3C Documentation reference: id
+ fn:lang(xs:string, node()?) as xs:boolean
+
+ Returns true if the language of the specified node or its nearest ancestor matches
+ the given language code
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string | +Language code to test | +
| node()? | +Optional node | +
+
| Expression | +Result | +
|---|---|
| fn:lang("en", /book/title) | +true | +
| fn:lang("fr", /book/title) | +false | +
+
W3C Documentation reference: lang
+ fn:in-scope-prefixes(element()) as xs:string*
+
+ Returns a sequence of strings representing the prefixes of the in-scope namespaces
+ for the specified element
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| element() | +Element node | +
+
| Expression | +Result | +
|---|---|
| fn:in-scope-prefixes(/*) | +("xml", "x") | +
+
W3C Documentation reference: in-scope-prefixes
+ fn:namespace-uri-for-prefix(xs:string?, element()) as xs:anyURI?
+
+ Returns the namespace URI associated with the given prefix, using the in-scope
+ namespaces for the specified element
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +Prefix | +
| element() | +Element node | +
+
| Expression | +Result | +
|---|---|
| fn:namespace-uri-for-prefix('x', /*) | +"http://www.example.com/ns" | +
| fn:namespace-uri-for-prefix('', /*) | +"" | +
+
W3C Documentation reference: namespace-uri-for-prefix
+ fn:namespace-uri-from-QName(xs:QName?) as xs:anyURI?
+
+ Returns the namespace URI of the given QName value, or an empty sequence if there's
+ no namespace URI
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:QName? | +QName value | +
+
| Expression | +Result | +
|---|---|
| fn:namespace-uri-from-QName(fn:QName('http://www.example.com/ns', + 'x:local')) | +"http://www.example.com/ns" | +
| fn:namespace-uri-from-QName(fn:QName('', 'local')) | +"" | +
+
W3C Documentation reference: namespace-uri-from-QName
+ fn:local-name-from-QName(xs:QName?) as xs:NCName?
+
+ Returns the local name of the given QName value, or an empty sequence if there's no
+ local name
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:QName? | +QName value | +
+
| Expression | +Result | +
|---|---|
| fn:local-name-from-QName(fn:QName('http://www.example.com/ns', + 'x:local')) | +"local" | +
| fn:local-name-from-QName(fn:QName('', 'local')) | +"local" | +
+
W3C Documentation reference: local-name-from-QName
+ fn:prefix-from-QName(xs:QName?) as xs:NCName?
+
+ Returns the prefix of the given QName value, or an empty sequence if there's no
+ prefix
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:QName? | +QName value | +
+
| Expression | +Result | +
|---|---|
| fn:prefix-from-QName(fn:QName('http://www.example.com/ns', 'x:local')) + | +"x" | +
| fn:prefix-from-QName(fn:QName('', 'local')) | +() | +
+
W3C Documentation reference: prefix-from-QName
+ fn:QName(xs:string?, xs:string) as xs:QName
+
+ Constructs an xs:QName value from a namespace URI and a lexical QName
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +Namespace URI | +
| xs:string | +Lexical QName | +
+
| Expression | +Result | +
|---|---|
| fn:QName('http://www.example.com/ns', 'x:local') | +QName("http://www.example.com/ns", "x:local") | +
| fn:QName('', 'local') | +QName("", "local") | +
+
W3C Documentation reference: QName
+ fn:resolve-QName(xs:string?, element()) as xs:QName?
+
+ Resolves a QName by expanding a prefix using the in-scope namespaces of a given
+ element
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| xs:string? | +QName to resolve | +
| element() | +Element with in-scope namespaces | +
+
| Expression | +Result | +
|---|---|
| fn:resolve-QName('x:local', $element) | +QName("http://www.example.com/ns", "local") | +
| fn:resolve-QName('local', $element) | +QName("", "local") | +
+
W3C Documentation reference: Resolve-QName
+ fn:nilled(node)
+
+ Returns a Boolean value indicating whether the argument node is nilled
+
+
+
+
+
+
+
+ +
+
W3C Documentation reference: #func-nilled
+
+
+
+
+
+
+
+
+
+
+ fn:for-each-pair($sourceSeq1 as item()*, $sourceSeq2 as item()*, function(item(), item()) as item()*) as item()*
+
+ Applies a processing function to pairs of items from two input sequences in a
+ pairwise fashion, resulting in a sequence of the same length as the shorter input
+ sequence
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()* | +The first input sequence of items | +
| item()* | +The second input sequence of items | +
| function(item(), item()) | +The processing function used to process pairs of items from the input + sequences | +
| item()* | +The resulting sequence after applying the processing function to pairs + of items | +
+
| Expression | +Result | +
|---|---|
| for-each-pair((1, 2, 3), ("a", "b"), function($item1, $item2) { + concat($item1, $item2) }) | +Returns a sequence with the concatenated pairs of items:
+ ("1a", "2b")
+ |
+
+
W3C Documentation reference: for-each-pair
+ fn:filter(item()*, function(item()) as xs:boolean) as item()*
+
+ Filters a sequence of items based on a given predicate function
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()* | +The input sequence of items | +
| function(item()) | +The predicate function used to filter the items | +
| item()* | +The resulting sequence after applying the predicate function | +
+
| Expression | +Result | +
|---|---|
| filter((1, 2, 3, 4), function($x) { $x mod 2 = 0 }) | +Returns a new sequence containing only the even numbers from the input
+ sequence: (2, 4) |
+
+
W3C Documentation reference: filter
+ fn:for-each(item()*, function(item()) as item()*) as item()*
+
+ Applies a specified function to each item in a sequence, returning a new
+ sequence
+ Arguments and return type: +
+
+ Examples:
+
+
+
+
+ + Arguments and return type: +
| Type | +Description | +
|---|---|
| item()* | +The input sequence of items | +
| function(item()) | +The function to apply to each item in the sequence | +
| item()* | +The new sequence created by applying the function to each item in the + input sequence | +
+
| Expression | +Result | +
|---|---|
| for-each((1, 2, 3, 4), function($x) { $x * 2 }) | +Returns a new sequence with the result of doubling each number in the
+ input sequence: (2, 4, 6, 8) |
+
+
W3C Documentation reference: for-each
+