Constructs an `xs:QName`

value given a namespace URI and a lexical\n QName.

This function is

The namespace URI in the returned QName is taken from `$paramURI`

. If\n `$paramURI`

is the zero-length string or the empty sequence, it represents\n \"no namespace\".

The prefix (or absence of a prefix) in `$paramQName`

is retained in the\n returned `xs:QName`

value.

The local name in the result is taken from the local part of\n `$paramQName`

.

A `$paramQName`

does\n not have the correct lexical form for an instance of `xs:QName`

.

A `$paramURI`

is the\n zero-length string or the empty sequence, and the value of `$paramQName`

\n contains a colon (`:`

).

A `$paramURI`

is not a valid URI (XML Namespaces 1.0) or\n IRI (XML Namespaces 1.1).

Constructs an xs:QName value given a namespace URI and a lexical\n QName.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "paramURI", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "paramQName", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:QName", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "abs", "qname" : "fn:abs", "signature" : "($arg as numeric?) as numeric? external", "description" : "Returns the absolute value of `$arg`

.

This function is

General rules: see

If `$arg`

is negative the function returns `-$arg`

, otherwise it\n returns `$arg`

.

If the type of `$arg`

is one of the four numeric types `xs:float`

,\n `xs:double`

, `xs:decimal`

or `xs:integer`

the type\n of the result is the same as the type of `$arg`

. If the type of\n `$arg`

is a type derived from one of the numeric types, the result is an\n instance of the base numeric type.

For `xs:float`

and `xs:double`

arguments, if the argument is\n positive zero or negative zero, then positive zero is returned. If the argument is\n positive or negative infinity, positive infinity is returned.

For detailed type semantics, see [Formal Semantics].

The expression `fn:abs(10.5)`

returns `10.5`

.

The expression `fn:abs(-10.5)`

returns `10.5`

.

Returns the absolute value of $arg .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "numeric", "occurence" : null, "description" : "" } ], "returns" : { "type" : "numeric?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "adjust-date-to-timezone", "qname" : "fn:adjust-date-to-timezone", "signature" : "($arg as xs:date?) as xs:date? external", "description" : "Adjusts an `xs:date`

value to a specific timezone, or to no timezone\n at all; the result is the date in the target timezone that contains the starting instant\n of the supplied date.

The one-argument form of this function is

The two-argument form of this function is

If `$timezone`

is not specified, then the effective value of\n `$timezone`

is the value of the implicit timezone in the dynamic\n context.

If `$arg`

is the empty sequence, then the function returns the empty\n sequence.

If `$arg`

does not have a timezone component and `$timezone`

is\n the empty sequence, then the result is the value of `$arg`

.

If `$arg`

does not have a timezone component and `$timezone`

is\n not the empty sequence, then the result is `$arg`

with `$timezone`

\n as the timezone component.

If `$arg`

has a timezone component and `$timezone`

is the empty\n sequence, then the result is the local value of `$arg`

without its timezone\n component.

If `$arg`

has a timezone component and `$timezone`

is not the\n empty sequence, then the function returns the value of the expression:

Let `$dt`

be the value of `fn:dateTime($arg,\n xs:time('00:00:00'))`

.

Let `$adt`

be the value of `fn:adjust-dateTime-to-timezone($dt,\n $timezone)`

The function returns the value of `xs:date($adt)`

A `$timezone`

is less\n than `-PT14H`

or greater than `PT14H`

or is not an integral number\n of minutes.

Adjusts an xs:date value to a specific timezone, or to no timezone\n at all; the result is the date in the target timezone that contains the starting instant\n of the supplied date.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:date", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:date?", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "adjust-date-to-timezone", "qname" : "fn:adjust-date-to-timezone", "signature" : "($arg as xs:date?, $timezone as xs:dayTimeDuration?) as xs:date? external", "description" : "Adjusts an `xs:date`

value to a specific timezone, or to no timezone\n at all; the result is the date in the target timezone that contains the starting instant\n of the supplied date.

The one-argument form of this function is

The two-argument form of this function is

If `$timezone`

is not specified, then the effective value of\n `$timezone`

is the value of the implicit timezone in the dynamic\n context.

If `$arg`

is the empty sequence, then the function returns the empty\n sequence.

If `$arg`

does not have a timezone component and `$timezone`

is\n the empty sequence, then the result is the value of `$arg`

.

If `$arg`

does not have a timezone component and `$timezone`

is\n not the empty sequence, then the result is `$arg`

with `$timezone`

\n as the timezone component.

If `$arg`

has a timezone component and `$timezone`

is the empty\n sequence, then the result is the local value of `$arg`

without its timezone\n component.

If `$arg`

has a timezone component and `$timezone`

is not the\n empty sequence, then the function returns the value of the expression:

Let `$dt`

be the value of `fn:dateTime($arg,\n xs:time('00:00:00'))`

.

Let `$adt`

be the value of `fn:adjust-dateTime-to-timezone($dt,\n $timezone)`

The function returns the value of `xs:date($adt)`

A `$timezone`

is less\n than `-PT14H`

or greater than `PT14H`

or is not an integral number\n of minutes.

Adjusts an `xs:dateTime`

value to a specific timezone, or to no\n timezone at all.

The one-argument form of this function is

The two-argument form of this function is

If `$timezone`

is not specified, then the effective value of\n `$timezone`

is the value of the implicit timezone in the dynamic\n context.

If `$arg`

is the empty sequence, then the function returns the empty\n sequence.

If `$arg`

does not have a timezone component and `$timezone`

is\n the empty sequence, then the result is `$arg`

.

If `$arg`

does not have a timezone component and `$timezone`

is\n not the empty sequence, then the result is `$arg`

with `$timezone`

\n as the timezone component.

If `$arg`

has a timezone component and `$timezone`

is the empty\n sequence, then the result is the local value of `$arg`

without its timezone\n component.

If `$arg`

has a timezone component and `$timezone`

is not the\n empty sequence, then the result is the `xs:dateTime`

value that is equal to\n `$arg`

and that has a timezone component equal to\n `$timezone`

.

A `$timezone`

is less\n than `-PT14H`

or greater than `PT14H`

or is not an integral number\n of minutes.

Adjusts an xs:dateTime value to a specific timezone, or to no\n timezone at all.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:dateTime", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:dateTime", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "adjust-dateTime-to-timezone", "qname" : "fn:adjust-dateTime-to-timezone", "signature" : "($arg as xs:dateTime?, $timezone as xs:dayTimeDuration?) as xs:dateTime external", "description" : "Adjusts an `xs:dateTime`

value to a specific timezone, or to no\n timezone at all.

`$timezone`

is not specified, then the effective value of\n `$timezone`

is the value of the implicit timezone in the dynamic\n context.

If `$arg`

is the empty sequence, then the function returns the empty\n sequence.

If `$arg`

does not have a timezone component and `$timezone`

is\n the empty sequence, then the result is `$arg`

.

`$arg`

does not have a timezone component and `$timezone`

is\n not the empty sequence, then the result is `$arg`

with `$timezone`

\n as the timezone component.

`$arg`

has a timezone component and `$timezone`

is the empty\n sequence, then the result is the local value of `$arg`

without its timezone\n component.

If `$arg`

has a timezone component and `$timezone`

is not the\n empty sequence, then the result is the `xs:dateTime`

value that is equal to\n `$arg`

and that has a timezone component equal to\n `$timezone`

.

`$timezone`

is less\n than `-PT14H`

or greater than `PT14H`

or is not an integral number\n of minutes.

Adjusts an xs:dateTime value to a specific timezone, or to no\n timezone at all.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:dateTime", "occurence" : null, "description" : "" }, { "name" : "timezone", "type" : "xs:dayTimeDuration", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:dateTime", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "adjust-time-to-timezone", "qname" : "fn:adjust-time-to-timezone", "signature" : "($arg as xs:time?) as xs:time? external", "description" : "Adjusts an `xs:time`

value to a specific timezone, or to no timezone\n at all.

`$timezone`

is not specified, then the effective value of\n `$timezone`

is the value of the implicit timezone in the dynamic\n context.

If `$arg`

is the empty sequence, then the function returns the empty\n sequence.

If `$arg`

does not have a timezone component and `$timezone`

is\n the empty sequence, then the result is `$arg`

.

`$arg`

does not have a timezone component and `$timezone`

is\n not the empty sequence, then the result is `$arg`

with `$timezone`

\n as the timezone component.

If `$arg`

has a timezone component and `$timezone`

is the empty\n sequence, then the result is the localized value of `$arg`

without its\n timezone component.

If `$arg`

has a timezone component and `$timezone`

is not the\n empty sequence, then:

Let `$dt`

be the `xs:dateTime`

value\n `fn:dateTime(xs:date('1972-12-31'), $arg)`

.

Let `$adt`

be the value of `fn:adjust-dateTime-to-timezone($dt,\n $timezone)`

\n

The function returns the `xs:time`

value\n `xs:time($adt)`

.

A `$timezone`

is less\n than `-PT14H`

or greater than `PT14H`

or if does not contain an\n integral number of minutes.

Adjusts an xs:time value to a specific timezone, or to no timezone\n at all.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:time", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:time?", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "adjust-time-to-timezone", "qname" : "fn:adjust-time-to-timezone", "signature" : "($arg as xs:time?, $timezone as xs:dayTimeDuration?) as xs:time? external", "description" : "Adjusts an `xs:time`

value to a specific timezone, or to no timezone\n at all.

`$timezone`

is not specified, then the effective value of\n `$timezone`

is the value of the implicit timezone in the dynamic\n context.

If `$arg`

is the empty sequence, then the function returns the empty\n sequence.

`$arg`

does not have a timezone component and `$timezone`

is\n the empty sequence, then the result is `$arg`

.

`$arg`

does not have a timezone component and `$timezone`

is\n not the empty sequence, then the result is `$arg`

with `$timezone`

\n as the timezone component.

If `$arg`

has a timezone component and `$timezone`

is the empty\n sequence, then the result is the localized value of `$arg`

without its\n timezone component.

If `$arg`

has a timezone component and `$timezone`

is not the\n empty sequence, then:

Let `$dt`

be the `xs:dateTime`

value\n `fn:dateTime(xs:date('1972-12-31'), $arg)`

.

Let `$adt`

be the value of `fn:adjust-dateTime-to-timezone($dt,\n $timezone)`

\n

The function returns the `xs:time`

value\n `xs:time($adt)`

.

A `$timezone`

is less\n than `-PT14H`

or greater than `PT14H`

or if does not contain an\n integral number of minutes.

Adjusts an xs:time value to a specific timezone, or to no timezone\n at all.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:time", "occurence" : null, "description" : "" }, { "name" : "timezone", "type" : "xs:dayTimeDuration", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:time?", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "analyze-string", "qname" : "fn:analyze-string", "signature" : "($input as xs:string?, $pattern as xs:string) as element(fn:analyze-string-result) external", "description" : "Analyzes a string using a regular expression, returning an XML structure that\n identifies which parts of the input string matched or failed to match the regular\n expression, and in the case of matched substrings, which substrings matched each\n capturing group in the regular expression.

This function is

The effect of calling the first version of this function (omitting the argument\n `$flags`

) is the same as the effect of calling the second version with the\n `$flags`

argument set to a zero-length string. Flags are defined in\n

The `$flags`

argument is interpreted in the same way as for the\n `fn:matches`

function.

If `$input`

is the empty sequence the function behaves as if\n `$input`

were the zero-length string. In this situation the result will be\n an element node with no children.

The function returns an element node whose local name is\n `analyze-string-result`

. This element and all its descendant elements have\n the namespace URI `http://www.w3.org/2005/xpath-functions`

. The namespace\n prefix is `fn:match`

and `fn:non-match`

elements. This sequence\n is formed by breaking the `$input`

string into a sequence of strings,\n returning any substring that matches `$pattern`

as the content of a\n `match`

element, and any intervening substring as the content of a\n `non-match`

element.

More specifically, the function starts at the beginning of the input string and attempts\n to find the first substring that matches the regular expression. If there are several\n matches, the first match is defined to be the one whose starting position comes first in\n the string. If several alternatives within the regular expression both match at the same\n position in the input string, then the match that is chosen is the first alternative\n that matches. For example, if the input string is `The quick brown fox jumps`

\n and the regular expression is `jump|jumps`

, then the match that is chosen is\n `jump`

.

Having found the first match, the instruction proceeds to find the second and subsequent\n matches by repeating the search, starting at the first

The input string is thus partitioned into a sequence of substrings, some of which match\n the regular expression, others which do not match it. Each substring will contain at\n least one character. This sequence is represented in the result by the sequence of\n `fn:match`

and `fn:non-match`

children of the returned element\n node; the string value of the `fn:match`

or `fn:non-match`

element\n will be the corresponding substring of `$input`

, and the string value of the\n returned element node will therefore be the same as `$input`

.

The content of an `fn:non-match`

element is always a single text node.

The content of a `fn:match`

element, however, is in general a sequence of\n text nodes and `fn:group`

element children. An `fn:group`

element\n with a `nr`

attribute having the integer value `N` identifies the\n substring captured by the `Nth` parenthesized sub-expression in the regular\n expression. For each capturing subexpression there will be at most one corresponding\n `fn:group`

element in each `fn:match`

element in the\n result.

If the function is called twice with the same arguments, it is

The base URI of the element nodes in the result is\n

A schema is defined for the structure of the returned element, containing the\n definitions below. The returned element and its descendants will have type annotations\n obtained by validating the returned element against this schema, unless the function is\n used in an environment where type annotations are not supported (for example, a Basic\n XSLT Processor), in which case the elements will all be annotated as\n `xs:untyped`

and the attributes as `xs:untypedAtomic`

.

A free-standing copy of this schema can be found at

\n

A `$pattern`

is invalid according to the rules described in section

A `$flags`

is invalid according to the rules described in section

A `$pattern`

matches a zero-length string, that is, if `fn:matches(\"\",\n $pattern, $flags)`

returns `true`

.

Analyzes a string using a regular expression, returning an XML structure that\n identifies which parts of the input string matched or failed to match the regular\n expression, and in the case of matched substrings, which substrings matched each\n capturing group in the regular expression.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "input", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "pattern", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "element(fn:analyze-string-result)", "description" : "" }, "errors" : [ ] }, { "arity" : 3, "name" : "analyze-string", "qname" : "fn:analyze-string", "signature" : "($input as xs:string?, $pattern as xs:string, $flags as xs:string) as element(fn:analyze-string-result) external", "description" : "Analyzes a string using a regular expression, returning an XML structure that\n identifies which parts of the input string matched or failed to match the regular\n expression, and in the case of matched substrings, which substrings matched each\n capturing group in the regular expression.

This function is

The effect of calling the first version of this function (omitting the argument\n `$flags`

) is the same as the effect of calling the second version with the\n `$flags`

argument set to a zero-length string. Flags are defined in\n

The `$flags`

argument is interpreted in the same way as for the\n `fn:matches`

function.

If `$input`

is the empty sequence the function behaves as if\n `$input`

were the zero-length string. In this situation the result will be\n an element node with no children.

The function returns an element node whose local name is\n `analyze-string-result`

. This element and all its descendant elements have\n the namespace URI `http://www.w3.org/2005/xpath-functions`

. The namespace\n prefix is `fn:match`

and `fn:non-match`

elements. This sequence\n is formed by breaking the `$input`

string into a sequence of strings,\n returning any substring that matches `$pattern`

as the content of a\n `match`

element, and any intervening substring as the content of a\n `non-match`

element.

More specifically, the function starts at the beginning of the input string and attempts\n to find the first substring that matches the regular expression. If there are several\n matches, the first match is defined to be the one whose starting position comes first in\n the string. If several alternatives within the regular expression both match at the same\n position in the input string, then the match that is chosen is the first alternative\n that matches. For example, if the input string is `The quick brown fox jumps`

\n and the regular expression is `jump|jumps`

, then the match that is chosen is\n `jump`

.

Having found the first match, the instruction proceeds to find the second and subsequent\n matches by repeating the search, starting at the first

The input string is thus partitioned into a sequence of substrings, some of which match\n the regular expression, others which do not match it. Each substring will contain at\n least one character. This sequence is represented in the result by the sequence of\n `fn:match`

and `fn:non-match`

children of the returned element\n node; the string value of the `fn:match`

or `fn:non-match`

element\n will be the corresponding substring of `$input`

, and the string value of the\n returned element node will therefore be the same as `$input`

.

The content of an `fn:non-match`

element is always a single text node.

The content of a `fn:match`

element, however, is in general a sequence of\n text nodes and `fn:group`

element children. An `fn:group`

element\n with a `nr`

attribute having the integer value `N` identifies the\n substring captured by the `Nth` parenthesized sub-expression in the regular\n expression. For each capturing subexpression there will be at most one corresponding\n `fn:group`

element in each `fn:match`

element in the\n result.

If the function is called twice with the same arguments, it is

The base URI of the element nodes in the result is\n

A schema is defined for the structure of the returned element, containing the\n definitions below. The returned element and its descendants will have type annotations\n obtained by validating the returned element against this schema, unless the function is\n used in an environment where type annotations are not supported (for example, a Basic\n XSLT Processor), in which case the elements will all be annotated as\n `xs:untyped`

and the attributes as `xs:untypedAtomic`

.

A free-standing copy of this schema can be found at

\n

A `$pattern`

is invalid according to the rules described in section

A `$flags`

is invalid according to the rules described in section

A `$pattern`

matches a zero-length string, that is, if `fn:matches(\"\",\n $pattern, $flags)`

returns `true`

.

Returns a list of environment variable names that are suitable for passing to\n `fn:environment-variable`

, as a (possibly empty) sequence of strings.

This function is

The function returns a sequence of strings, being the names of the environment variables\n in the dynamic context in some

The function is

The function returns a list of strings, containing no duplicates.

It is intended that the strings in this list should be suitable for passing to\n `fn:environment-variable`

.

See also the note on security under the definition of the\n `fn:environment-variable`

function. If access to environment variables has\n been disabled, `fn:available-environment-variables`

always returns the empty\n sequence.

Returns a list of environment variable names that are suitable for passing to\n fn:environment-variable , as a (possibly empty) sequence of strings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "available-environment-variables", "qname" : "fn:available-environment-variables", "signature" : "() as xs:string* external", "description" : "Returns a list of environment variable names that are suitable for passing to\n `fn:environment-variable`

, as a (possibly empty) sequence of strings.

This function is

The function returns a sequence of strings, being the names of the environment variables\n in the dynamic context in some

The function is

The function returns a list of strings, containing no duplicates.

It is intended that the strings in this list should be suitable for passing to\n `fn:environment-variable`

.

See also the note on security under the definition of the\n `fn:environment-variable`

function. If access to environment variables has\n been disabled, `fn:available-environment-variables`

always returns the empty\n sequence.

Returns the average of the values in the input sequence `$arg`

, that\n is, the sum of the values divided by the number of values.

This function is

If `$arg`

is the empty sequence, the empty sequence is returned.

If `$arg`

contains values of type `xs:untypedAtomic`

they are cast\n to `xs:double`

.

Duration values must either all be `xs:yearMonthDuration`

values or must all\n be `xs:dayTimeDuration`

values. For numeric values, the numeric promotion\n rules defined in `$arg`

must contain items of a single\n type, which must be one of the four numeric types, `xs:yearMonthDuration`

or\n `xs:dayTimeDuration`

or one if its subtypes.

The function returns the average of the values as `sum($arg) div\n count($arg)`

; but the implementation may use an otherwise equivalent algorithm\n that avoids arithmetic overflow.

For detailed type semantics, see [Formal Semantics].

A type error is raised

Returns the average of the values in the input sequence $arg , that\n is, the sum of the values divided by the number of values.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyAtomicType?", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "base-uri", "qname" : "fn:base-uri", "signature" : "() as xs:anyURI? external", "description" : "Returns the base URI of a node.

The zero-argument form of this function is

The one-argument form of this function is

The zero-argument version of the function returns the base URI of the\n context node: it is equivalent to calling `fn:base-uri(.)`

.

The single-argument version of the function behaves as follows:

`$arg`

is the empty sequence, the function returns the empty\n sequence.`dm:base-uri`

accessor\n applied to the node `$arg`

. This accessor is defined, for each kind of\n node, in the XDM specification (See See also `fn:static-base-uri`

.

The following errors may be raised when `$arg`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns the base URI of a node.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:anyURI?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "base-uri", "qname" : "fn:base-uri", "signature" : "($arg as node()?) as xs:anyURI? external", "description" : "Returns the base URI of a node.

The zero-argument form of this function is

The one-argument form of this function is

The zero-argument version of the function returns the base URI of the\n context node: it is equivalent to calling `fn:base-uri(.)`

.

The single-argument version of the function behaves as follows:

`$arg`

is the empty sequence, the function returns the empty\n sequence.`dm:base-uri`

accessor\n applied to the node `$arg`

. This accessor is defined, for each kind of\n node, in the XDM specification (See See also `fn:static-base-uri`

.

The following errors may be raised when `$arg`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns the base URI of a node.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "node()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyURI?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "boolean", "qname" : "fn:boolean", "signature" : "($arg as item()*) as xs:boolean external", "description" : "Computes the effective boolean value of the sequence `$arg`

.

The function computes the effective boolean value of a sequence, defined according to\n the following rules. See also

If `$arg`

is the empty sequence, `fn:boolean`

returns\n `false`

.

If `$arg`

is a sequence whose first item is a node,\n `fn:boolean`

returns `true`

.

If `$arg`

is a singleton value of type `xs:boolean`

or a\n derived from `xs:boolean`

, `fn:boolean`

returns\n `$arg`

.

If `$arg`

is a singleton value of type `xs:string`

or a type\n derived from `xs:string`

, `xs:anyURI`

or a type derived from\n `xs:anyURI`

or `xs:untypedAtomic`

,\n `fn:boolean`

returns `false`

if the operand value has\n zero length; otherwise it returns `true`

.

If `$arg`

is a singleton value of any numeric type or a type derived\n from a numeric type, `fn:boolean`

returns `false`

if the\n operand value is `NaN`

or is numerically equal to zero; otherwise it\n returns `true`

.

In all other cases, `fn:boolean`

raises a type error

The static semantics of this function are described in [Formal\n Semantics].

The result of this function is not necessarily the same as `$arg cast as\n xs:boolean`

. For example, `fn:boolean(\"false\")`

returns the value\n `true`

whereas `\"false\" cast as xs:boolean`

(which can also be\n written `xs:boolean(\"false\")`

) returns `false`

.

let `$abc`

:= `(\"a\", \"b\", \"\")`

`fn:boolean($abc)`

raises a type error

The expression `fn:boolean($abc[1])`

returns `true()`

.

The expression `fn:boolean($abc[0])`

returns `false()`

.

The expression `fn:boolean($abc[3])`

returns `false()`

.

Computes the effective boolean value of the sequence $arg .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "ceiling", "qname" : "fn:ceiling", "signature" : "($arg as numeric?) as numeric? external", "description" : "Rounds `$arg`

upwards to a whole number.

This function is

General rules: see

The function returns the smallest (closest to negative infinity) number with no\n fractional part that is not less than the value of `$arg`

.

If the type of `$arg`

is one of the four numeric types `xs:float`

,\n `xs:double`

, `xs:decimal`

or `xs:integer`

the type\n of the result is the same as the type of `$arg`

. If the type of\n `$arg`

is a type derived from one of the numeric types, the result is an\n instance of the base numeric type.

For `xs:float`

and `xs:double`

arguments, if the argument is\n positive zero, then positive zero is returned. If the argument is negative zero, then\n negative zero is returned. If the argument is less than zero and greater than -1,\n negative zero is returned.

For detailed type semantics, see [Formal Semantics].

The expression `fn:ceiling(10.5)`

returns `11`

.

The expression `fn:ceiling(-10.5)`

returns `-10`

.

Rounds $arg upwards to a whole number.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "numeric", "occurence" : null, "description" : "" } ], "returns" : { "type" : "numeric?", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "codepoint-equal", "qname" : "fn:codepoint-equal", "signature" : "($comparand1 as xs:string?, $comparand2 as xs:string?) as xs:boolean? external", "description" : "Returns true if two strings are equal, considered codepoint-by-codepoint.

This function is

If either argument is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns `true`

or `false`

depending on\n whether the value of `$comparand1`

is equal to the value of\n `$comparand2`

, according to the Unicode codepoint collation\n (`http://www.w3.org/2005/xpath-functions/collation/codepoint`

).

This function allows `xs:anyURI`

values to be compared without having to\n specify the Unicode codepoint collation.

Returns true if two strings are equal, considered codepoint-by-codepoint.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "comparand1", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "comparand2", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "codepoints-to-string", "qname" : "fn:codepoints-to-string", "signature" : "($arg as xs:integer*) as xs:string external", "description" : "Creates an `xs:string`

from a sequence of

This function is

The function returns the string made up from the `$arg`

. This will be the zero-length string if `$arg`

\n is the empty sequence.

A `$arg`

is not a permitted XML character.

Creates an xs:string from a sequence of codepoints .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:integer", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "codepoints-to-string", "qname" : "fn:codepoints-to-string", "signature" : "($arg as xs:integer*) as xs:string external", "description" : "Creates an `xs:string`

from a sequence of

This function is

The function returns the string made up from the `$arg`

. This will be the zero-length string if `$arg`

\n is the empty sequence.

A `$arg`

is not a permitted XML character.

Creates an xs:string from a sequence of codepoints .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:integer", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "collection", "qname" : "fn:collection", "signature" : "() as node()* external", "description" : "Returns a sequence of nodes representing a collection of documents indentified\n by a collection URI; or a default collection if no URI is supplied.

This function is

This function takes an `xs:string`

as argument and returns a sequence of\n nodes obtained by interpreting `$arg`

as an `xs:anyURI`

and\n resolving it according to the mapping specified in

If

If `$arg`

is not specified, the function returns the sequence of the nodes in\n the default node collection in the dynamic context. See

If the value of `$arg`

is a relative `xs:anyURI`

, it is resolved\n against the value of the base-URI property from the static context.

If `$arg`

is the empty sequence, the function behaves as if it had been\n called without an argument. See above.

By default, this function is

There is no requirement that the returned nodes should be in document\n order, nor is there a requirement that the result should contain no duplicates.

For detailed type semantics, see [Formal Semantics].

A

A

A `$arg`

is not a\n valid `xs:anyURI`

.

Returns a sequence of nodes representing a collection of documents indentified\n by a collection URI; or a default collection if no URI is supplied.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "node()*", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "collection", "qname" : "fn:collection", "signature" : "($arg as xs:string?) as node()* external", "description" : "Returns a sequence of nodes representing a collection of documents indentified\n by a collection URI; or a default collection if no URI is supplied.

This function is

This function takes an `xs:string`

as argument and returns a sequence of\n nodes obtained by interpreting `$arg`

as an `xs:anyURI`

and\n resolving it according to the mapping specified in

If

If `$arg`

is not specified, the function returns the sequence of the nodes in\n the default node collection in the dynamic context. See

If the value of `$arg`

is a relative `xs:anyURI`

, it is resolved\n against the value of the base-URI property from the static context.

If `$arg`

is the empty sequence, the function behaves as if it had been\n called without an argument. See above.

By default, this function is

There is no requirement that the returned nodes should be in document\n order, nor is there a requirement that the result should contain no duplicates.

For detailed type semantics, see [Formal Semantics].

A

A

A `$arg`

is not a\n valid `xs:anyURI`

.

Returns -1, 0, or 1, depending on whether `$comparand1`

collates\n before, equal to, or after `$comparand2`

according to the rules of a selected\n collation.

The two-argument form of this function is

The three-argument form of this function is

Returns -1, 0, or 1, depending on whether the value of the `$comparand1`

is\n respectively less than, equal to, or greater than the value of `$comparand2`

,\n according to the rules of the collation that is used.

The collation used by this function is determined according to the rules in

If either `$comparand1`

or `$comparand2`

is the empty sequence,\n the function returns the empty sequence.

This function, called with the first signature, defines the semantics of the \"eq\", \"ne\",\n \"gt\", \"lt\", \"le\" and \"ge\" operators on `xs:string`

values.

The expression `fn:compare('abc', 'abc')`

returns `0`

.

The expression `fn:compare('Strasse', 'Straße')`

returns `0`

. ss

and the (German) character ß

\n (sharp-s

). Otherwise, the returned value depends on the\n semantics of the default collation.).

The expression `fn:compare('Strasse', 'Straße',\n 'http://example.com/deutsch')`

returns `0`

. `http://example.com/deutsch`

includes provisions that equate\n ss

and the (German) character ß

\n (sharp-s

). Otherwise, the returned value depends on the\n semantics of that collation.).

The expression `fn:compare('Strassen', 'Straße')`

returns `1`

. ss

and the (German) character ß

\n (sharp-s

) with less strength than the differences between the\n base characters, such as the final n

. ).

Returns -1, 0, or 1, depending on whether $comparand1 collates\n before, equal to, or after $comparand2 according to the rules of a selected\n collation.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "comparand1", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "comparand2", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "arity" : 3, "name" : "compare", "qname" : "fn:compare", "signature" : "($comparand1 as xs:string?, $comparand2 as xs:string?, $collation as xs:string) as xs:integer? external", "description" : "Returns -1, 0, or 1, depending on whether `$comparand1`

collates\n before, equal to, or after `$comparand2`

according to the rules of a selected\n collation.

The two-argument form of this function is

The three-argument form of this function is

Returns -1, 0, or 1, depending on whether the value of the `$comparand1`

is\n respectively less than, equal to, or greater than the value of `$comparand2`

,\n according to the rules of the collation that is used.

The collation used by this function is determined according to the rules in

If either `$comparand1`

or `$comparand2`

is the empty sequence,\n the function returns the empty sequence.

This function, called with the first signature, defines the semantics of the \"eq\", \"ne\",\n \"gt\", \"lt\", \"le\" and \"ge\" operators on `xs:string`

values.

The expression `fn:compare('abc', 'abc')`

returns `0`

.

The expression `fn:compare('Strasse', 'Straße')`

returns `0`

. ss

and the (German) character ß

\n (sharp-s

). Otherwise, the returned value depends on the\n semantics of the default collation.).

The expression `fn:compare('Strasse', 'Straße',\n 'http://example.com/deutsch')`

returns `0`

. `http://example.com/deutsch`

includes provisions that equate\n ss

and the (German) character ß

\n (sharp-s

). Otherwise, the returned value depends on the\n semantics of that collation.).

The expression `fn:compare('Strassen', 'Straße')`

returns `1`

. ss

and the (German) character ß

\n (sharp-s

) with less strength than the differences between the\n base characters, such as the final n

. ).

Returns the concatenation of the string values of the arguments.

\n The two-argument form of this function defines the semantics of the \"||\" operator.

This function is

This function accepts two or more `xs:anyAtomicType`

arguments and casts each\n one to `xs:string`

. The function returns the `xs:string`

that is\n the concatenation of the values of its arguments after conversion. If any argument is\n the empty sequence, that argument is treated as the zero-length string.

The `fn:concat`

function is specified to allow two or\n more arguments, which are concatenated together. This is the only function specified in\n this document that allows a variable number of arguments. This capability is retained\n for compatibility with

Returns the concatenation of the string values of the arguments.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "" }, { "name" : "arg2", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "contains", "qname" : "fn:contains", "signature" : "($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean external", "description" : "Returns true if the string `$arg1`

contains `$arg2`

as a\n substring, taking collations into account.

The two-argument form of this function is

The three-argument form of this function is

If the value of `$arg1`

or `$arg2`

is the empty sequence, or\n contains only ignorable collation units, it is interpreted as the zero-length\n string.

If the value of `$arg2`

is the zero-length string, then the function returns\n `true`

.

If the value of `$arg1`

is the zero-length string, the function returns\n `false`

.

The collation used by this function is determined according to the rules in

The function returns an `xs:boolean`

indicating whether or not the value of\n `$arg1`

contains (at the beginning, at the end, or anywhere within) at\n least one sequence of collation units that provides a `$arg2`

, according to the collation that is\n used.

A

Returns true if the string $arg1 contains $arg2 as a\n substring, taking collations into account.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "arg2", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "arity" : 3, "name" : "contains", "qname" : "fn:contains", "signature" : "($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:boolean external", "description" : "Returns true if the string `$arg1`

contains `$arg2`

as a\n substring, taking collations into account.

If the value of `$arg1`

or `$arg2`

is the empty sequence, or\n contains only ignorable collation units, it is interpreted as the zero-length\n string.

If the value of `$arg2`

is the zero-length string, then the function returns\n `true`

.

If the value of `$arg1`

is the zero-length string, the function returns\n `false`

.

The collation used by this function is determined according to the rules in

The function returns an `xs:boolean`

indicating whether or not the value of\n `$arg1`

contains (at the beginning, at the end, or anywhere within) at\n least one sequence of collation units that provides a `$arg2`

, according to the collation that is\n used.

A

Returns true if the string $arg1 contains $arg2 as a\n substring, taking collations into account.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "arg2", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "collation", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "count", "qname" : "fn:count", "signature" : "($arg as item()*) as xs:integer external", "description" : "Returns the number of items in a sequence.

This function is

The function returns the number of items in the value of `$arg`

.

Returns 0 if `$arg`

is the empty sequence.

Returns the number of items in a sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "current-date", "qname" : "fn:current-date", "signature" : "() as xs:date external", "description" : "Returns the current date.

This function is

Returns `xs:date(fn:current-dateTime())`

. This is an `xs:date`

\n (with timezone) that is current at some time during the evaluation of a query or\n transformation in which `fn:current-date`

is executed.

This function is `fn:current-date`

is

The returned date will always have an associated timezone, which will always be the same\n as the implicit timezone in the dynamic context

Returns the current date.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:date", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "current-dateTime", "qname" : "fn:current-dateTime", "signature" : "() as xs:dateTimeStamp external", "description" : "Returns the current date and time (with timezone).

This function is

Returns the current dateTime (with timezone) from the dynamic context. (See `xs:dateTime`

that is current at some time during the evaluation of a\n query or transformation in which `fn:current-dateTime`

is executed.

This function is `fn:current-dateTime()`

is\n

If the implementation supports data types from XSD 1.1 then the\n returned value will be an instance of `xs:dateTimeStamp`

. Otherwise, the only\n guarantees are that it will be an instance of `xs:dateTime`

and will have a\n timezone component.

The returned `xs:dateTime`

will always have an associated timezone, which\n will always be the same as the implicit timezone in the dynamic context

Returns the current date and time (with timezone).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:dateTimeStamp", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "current-time", "qname" : "fn:current-time", "signature" : "() as xs:time external", "description" : "Returns the current time.

This function is

Returns `xs:time(fn:current-dateTime())`

. This is an `xs:time`

\n (with timezone) that is current at some time during the evaluation of a query or\n transformation in which `fn:current-time`

is executed.

This function is `fn:current-time()`

is

The returned time will always have an associated timezone, which will always be the same\n as the implicit timezone in the dynamic context

Returns the current time.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:time", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "data", "qname" : "fn:data", "signature" : "() as xs:anyAtomicType* external", "description" : "Returns the result of atomizing a sequence, that is, replacing all nodes in the\n sequence by their typed values.

The zero-argument form of this function is

The one-argument form of this function is

If the argument is omitted, it defaults to the context item\n (`.`

). The behavior of the function if the argument is omitted is exactly\n the same as if the context item had been passed as the argument.

The result of `fn:data`

is the sequence of atomic values produced by\n applying the following rules to each item in `$arg`

:

If the item is an atomic value, it is appended to the result sequence.

If the item is a node, the typed value of the node is appended to the result\n sequence. The typed value is a sequence of zero or more atomic values:\n specifically, the result of the `dm:typed-value`

accessor as defined in\n

A `$arg`

is a node that does not have a typed value.

A `$arg`

is a function item.

A `$arg`

is omitted\n and the context item is

Returns the result of atomizing a sequence, that is, replacing all nodes in the\n sequence by their typed values.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:anyAtomicType*", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "data", "qname" : "fn:data", "signature" : "($arg as item()*) as xs:anyAtomicType* external", "description" : "Returns the result of atomizing a sequence, that is, replacing all nodes in the\n sequence by their typed values.

The zero-argument form of this function is

If the argument is omitted, it defaults to the context item\n (`.`

). The behavior of the function if the argument is omitted is exactly\n the same as if the context item had been passed as the argument.

The result of `fn:data`

is the sequence of atomic values produced by\n applying the following rules to each item in `$arg`

:

If the item is an atomic value, it is appended to the result sequence.

If the item is a node, the typed value of the node is appended to the result\n sequence. The typed value is a sequence of zero or more atomic values:\n specifically, the result of the `dm:typed-value`

accessor as defined in\n

A `$arg`

is a node that does not have a typed value.

A `$arg`

is a function item.

A `$arg`

is omitted\n and the context item is

Returns an `xs:dateTime`

value created by combining an\n `xs:date`

and an `xs:time`

.

This function is

If either `$arg1`

or `$arg2`

is the empty sequence the function\n returns the empty sequence.

Otherwise, the function returns an `xs:dateTime`

whose date component is\n equal to `$arg1`

and whose time component is equal to `$arg2`

.

The timezone of the result is computed as follows:

If neither argument has a timezone, the result has no timezone.

If exactly one of the arguments has a timezone, or if both arguments have the same\n timezone, the result has this timezone.

A

Returns an xs:dateTime value created by combining an\n xs:date and an xs:time .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:date", "occurence" : null, "description" : "" }, { "name" : "arg2", "type" : "xs:time", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:dateTime?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "day-from-date", "qname" : "fn:day-from-date", "signature" : "($arg as xs:date?) as xs:integer? external", "description" : "Returns the day component of an `xs:date`

.

This function is

If `$arg`

is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an `xs:integer`

between 1 and 31, both\n inclusive, representing the day component in the localized value of\n `$arg`

.

The expression `fn:day-from-date(xs:date(\"1999-05-31-05:00\"))`

returns `31`

.

The expression `fn:day-from-date(xs:date(\"2000-01-01+05:00\"))`

returns `1`

.

Returns the day component of an xs:date .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:date", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "days-from-duration", "qname" : "fn:days-from-duration", "signature" : "($arg as xs:duration?) as xs:integer? external", "description" : "Returns the number of days in a duration.

This function is

If `$arg`

is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an `xs:integer`

representing the days\n component in the value of `$arg`

. The result is obtained by casting\n `$arg`

to an `xs:dayTimeDuration`

(see

If `$arg`

is a negative duration then the result will be negative..

If `$arg`

is an `xs:yearMonthDuration`

the function returns 0.

The expression `fn:days-from-duration(xs:dayTimeDuration(\"P3DT10H\"))`

returns `3`

.

The expression `fn:days-from-duration(xs:dayTimeDuration(\"P3DT55H\"))`

returns `5`

.

The expression `fn:days-from-duration(xs:yearMonthDuration(\"P3Y5M\"))`

returns `0`

.

Returns the number of days in a duration.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:duration", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "deep-equal", "qname" : "fn:deep-equal", "signature" : "($parameter1 as item()*, $parameter2 as item()*) as xs:boolean external", "description" : "This function assesses whether two sequences are deep-equal to each other. To\n be deep-equal, they must contain items that are pairwise deep-equal; and for two items\n to be deep-equal, they must either be atomic values that compare equal, or nodes of the\n same kind, with the same name, whose children are deep-equal.

The two-argument form of this function is

The three-argument form of this function is

The `$collation`

argument identifies a collation which is used at all levels\n of recursion when strings are compared (but not when names are compared), according to\n the rules in

If the two sequences are both empty, the function returns `true`

.

If the two sequences are of different lengths, the function returns\n `false`

.

If the two sequences are of the same length, the function returns `true`

if\n and only if every item in the sequence `$parameter1`

is deep-equal to the\n item at the same position in the sequence `$parameter2`

. The rules for\n deciding whether two items are deep-equal follow.

Call the two items `$i1`

and `$i2`

respectively.

If `$i1`

and `$i2`

are both atomic values, they are deep-equal if\n and only if `($i1 eq $i2)`

is `true`

, or if both values are\n `NaN`

. If the `eq`

operator is not defined for `$i1`

\n and `$i2`

, the function returns `false`

.

If one of the pair `$i1`

or `$i2`

is an atomic value and the\n other is not,\n \n the function returns `false`

.

If `$i1`

and `$i2`

are both nodes, they are compared as described\n below:

If the two nodes are of different kinds, the result is `false`

.

If the two nodes are both document nodes then they are deep-equal if and only if\n the sequence `$i1/(*|text())`

is deep-equal to the sequence\n `$i2/(*|text())`

.

If the two nodes are both element nodes then they are deep-equal if and only if\n all of the following conditions are satisfied:

The two nodes have the same name, that is `(node-name($i1) eq\n node-name($i2))`

.

Either both nodes are both annotated as having simple content or both nodes are\n annotated as having complex content. For this purpose \"simple content\" means either a simple\n type or a complex type with simple content; \"complex content\" means a complex type whose variety\n is mixed, element-only, or empty.

It is a consequence of this rule that validating a document\n `D` against a schema will usually (but not necessarily) result in a document that is not deep-equal\n to `D`. The exception is when the schema allows all elements to have mixed content.

The two nodes have the same number of attributes, and for every attribute\n `$a1`

in `$i1/@*`

there exists an attribute\n `$a2`

in `$i2/@*`

such that `$a1`

and\n `$a2`

are deep-equal.

One of the following conditions holds:

Both element nodes are annotated as having simple content\n `$i1`

is deep-equal to the typed value\n of `$i2`

.

Both element nodes have a type annotation that is `$i1/*`

is\n deep-equal to the sequence `$i2/*`

.

Both element nodes have a type annotation that is `$i1/(*|text())`

is\n deep-equal to the sequence `$i2/(*|text())`

.

Both element nodes have a type annotation that is

If the two nodes are both attribute nodes then they are deep-equal if and only if\n both the following conditions are satisfied:

The two nodes have the same name, that is `(node-name($i1) eq\n node-name($i2))`

.

The typed value of `$i1`

is deep-equal to the typed value of\n `$i2`

.

If the two nodes are both processing instruction nodes

The two nodes have the same name, that is `(node-name($i1) eq\n node-name($i2))`

.

The string value of `$i1`

is equal to the string value of\n `$i2`

.

If the two nodes are both namespace nodes, then they are deep-equal if and only\n if both the following conditions are satisfied:

The two nodes either have the same name or are both nameless, that is\n `fn:deep-equal(node-name($i1), node-name($i2))`

.

The string value of `$i1`

is equal to the string value of\n `$i2`

when compared using the Unicode codepoint collation.

If the two nodes are both text nodes or comment nodes, then they are deep-equal if\n and only if their string-values are equal.

A

This function assesses whether two sequences are deep-equal to each other.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "parameter1", "type" : "item()", "occurence" : null, "description" : "" }, { "name" : "parameter2", "type" : "item()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "arity" : 3, "name" : "deep-equal", "qname" : "fn:deep-equal", "signature" : "($parameter1 as item()*, $parameter2 as item()*, $collation as xs:string) as xs:boolean external", "description" : "This function assesses whether two sequences are deep-equal to each other. To\n be deep-equal, they must contain items that are pairwise deep-equal; and for two items\n to be deep-equal, they must either be atomic values that compare equal, or nodes of the\n same kind, with the same name, whose children are deep-equal.

The two-argument form of this function is

The three-argument form of this function is

The `$collation`

argument identifies a collation which is used at all levels\n of recursion when strings are compared (but not when names are compared), according to\n the rules in

If the two sequences are both empty, the function returns `true`

.

If the two sequences are of different lengths, the function returns\n `false`

.

If the two sequences are of the same length, the function returns `true`

if\n and only if every item in the sequence `$parameter1`

is deep-equal to the\n item at the same position in the sequence `$parameter2`

. The rules for\n deciding whether two items are deep-equal follow.

Call the two items `$i1`

and `$i2`

respectively.

If `$i1`

and `$i2`

are both atomic values, they are deep-equal if\n and only if `($i1 eq $i2)`

is `true`

, or if both values are\n `NaN`

. If the `eq`

operator is not defined for `$i1`

\n and `$i2`

, the function returns `false`

.

If one of the pair `$i1`

or `$i2`

is an atomic value and the\n other is not,\n \n the function returns `false`

.

If `$i1`

and `$i2`

are both nodes, they are compared as described\n below:

If the two nodes are of different kinds, the result is `false`

.

If the two nodes are both document nodes then they are deep-equal if and only if\n the sequence `$i1/(*|text())`

is deep-equal to the sequence\n `$i2/(*|text())`

.

If the two nodes are both element nodes then they are deep-equal if and only if\n all of the following conditions are satisfied:

The two nodes have the same name, that is `(node-name($i1) eq\n node-name($i2))`

.

Either both nodes are both annotated as having simple content or both nodes are\n annotated as having complex content. For this purpose \"simple content\" means either a simple\n type or a complex type with simple content; \"complex content\" means a complex type whose variety\n is mixed, element-only, or empty.

It is a consequence of this rule that validating a document\n `D` against a schema will usually (but not necessarily) result in a document that is not deep-equal\n to `D`. The exception is when the schema allows all elements to have mixed content.

The two nodes have the same number of attributes, and for every attribute\n `$a1`

in `$i1/@*`

there exists an attribute\n `$a2`

in `$i2/@*`

such that `$a1`

and\n `$a2`

are deep-equal.

One of the following conditions holds:

Both element nodes are annotated as having simple content\n `$i1`

is deep-equal to the typed value\n of `$i2`

.

Both element nodes have a type annotation that is `$i1/*`

is\n deep-equal to the sequence `$i2/*`

.

Both element nodes have a type annotation that is `$i1/(*|text())`

is\n deep-equal to the sequence `$i2/(*|text())`

.

Both element nodes have a type annotation that is

If the two nodes are both attribute nodes then they are deep-equal if and only if\n both the following conditions are satisfied:

The two nodes have the same name, that is `(node-name($i1) eq\n node-name($i2))`

.

The typed value of `$i1`

is deep-equal to the typed value of\n `$i2`

.

If the two nodes are both processing instruction nodes

The two nodes have the same name, that is `(node-name($i1) eq\n node-name($i2))`

.

The string value of `$i1`

is equal to the string value of\n `$i2`

.

If the two nodes are both namespace nodes, then they are deep-equal if and only\n if both the following conditions are satisfied:

The two nodes either have the same name or are both nameless, that is\n `fn:deep-equal(node-name($i1), node-name($i2))`

.

The string value of `$i1`

is equal to the string value of\n `$i2`

when compared using the Unicode codepoint collation.

If the two nodes are both text nodes or comment nodes, then they are deep-equal if\n and only if their string-values are equal.

A

This function assesses whether two sequences are deep-equal to each other.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "parameter1", "type" : "item()", "occurence" : null, "description" : "" }, { "name" : "parameter2", "type" : "item()", "occurence" : null, "description" : "" }, { "name" : "collation", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "default-collation", "qname" : "fn:default-collation", "signature" : "() as xs:string external", "description" : "Returns the value of the default collation property from the static context.\n

This function is

Returns the value of the default collation property from the static context. Components\n of the static context are discussed in

The default collation property can never be absent. If it is not explicitly defined, a\n system defined default can be invoked. If this is not provided, the Unicode codepoint\n collation (`http://www.w3.org/2005/xpath-functions/collation/codepoint`

) is\n used.

Returns the value of the default collation property from the static context.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "distinct-values", "qname" : "fn:distinct-values", "signature" : "($arg as xs:anyAtomicType*) as xs:anyAtomicType* external", "description" : "Returns the values that appear in a sequence, with duplicates eliminated.

The one-argument form of this function is

The two-argument form of this function is

The function returns the sequence that results from removing from `$arg`

all\n but one of a set of values that are equal to one another. Values are compared using the\n `eq`

operator, subject to the caveats defined below.

Values of type `xs:untypedAtomic`

are compared as if they were of type\n `xs:string`

.

Values that cannot be compared, because the `eq`

operator is not defined for\n their types, are considered to be distinct.

The collation used by this function is determined according to the rules in

For `xs:float`

and `xs:double`

values, positive zero is equal to\n negative zero and, although `NaN`

does not equal itself, if `$arg`

\n contains multiple `NaN`

values a single `NaN`

is returned.

If `xs:dateTime`

, `xs:date`

or `xs:time`

values do not\n have a timezone, they are considered to have the implicit timezone provided by the\n dynamic context for the purpose of comparison. Note that `xs:dateTime`

,\n `xs:date`

or `xs:time`

values can compare equal even if their\n timezones are different.

The order in which the sequence of values is returned is

Which value of a set of values that compare equal is returned is

The static type of the result is a sequence of prime types as defined\n in [Formal Semantics].

If the input sequence contains values of different numeric types that differ from\n each other by small amounts, then the eq operator is not transitive, because of\n rounding effects occurring during type promotion. In the situation where the input\n contains three values `A`

, `B`

, and `C`

such that\n `A eq B`

, `B eq C`

, but `A ne C`

, then the number\n of items in the result of the function (as well as the choice of which items are\n returned) is

For example, this arises when computing:

\nbecause the values of type `xs:float`

and `xs:double`

both\n compare equal to the value of type `xs:decimal`

but not equal to each\n other.

If `$arg`

is the empty sequence, the function returns the empty sequence.

Returns the values that appear in a sequence, with duplicates eliminated.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyAtomicType*", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "distinct-values", "qname" : "fn:distinct-values", "signature" : "($arg as xs:anyAtomicType*, $collation as xs:string) as xs:anyAtomicType* external", "description" : "Returns the values that appear in a sequence, with duplicates eliminated.

The one-argument form of this function is

The two-argument form of this function is

The function returns the sequence that results from removing from `$arg`

all\n but one of a set of values that are equal to one another. Values are compared using the\n `eq`

operator, subject to the caveats defined below.

Values of type `xs:untypedAtomic`

are compared as if they were of type\n `xs:string`

.

Values that cannot be compared, because the `eq`

operator is not defined for\n their types, are considered to be distinct.

The collation used by this function is determined according to the rules in

For `xs:float`

and `xs:double`

values, positive zero is equal to\n negative zero and, although `NaN`

does not equal itself, if `$arg`

\n contains multiple `NaN`

values a single `NaN`

is returned.

If `xs:dateTime`

, `xs:date`

or `xs:time`

values do not\n have a timezone, they are considered to have the implicit timezone provided by the\n dynamic context for the purpose of comparison. Note that `xs:dateTime`

,\n `xs:date`

or `xs:time`

values can compare equal even if their\n timezones are different.

The order in which the sequence of values is returned is

Which value of a set of values that compare equal is returned is

The static type of the result is a sequence of prime types as defined\n in [Formal Semantics].

If the input sequence contains values of different numeric types that differ from\n each other by small amounts, then the eq operator is not transitive, because of\n rounding effects occurring during type promotion. In the situation where the input\n contains three values `A`

, `B`

, and `C`

such that\n `A eq B`

, `B eq C`

, but `A ne C`

, then the number\n of items in the result of the function (as well as the choice of which items are\n returned) is

For example, this arises when computing:

\nbecause the values of type `xs:float`

and `xs:double`

both\n compare equal to the value of type `xs:decimal`

but not equal to each\n other.

If `$arg`

is the empty sequence, the function returns the empty sequence.

Returns the values that appear in a sequence, with duplicates eliminated.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "" }, { "name" : "collation", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyAtomicType*", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "doc-available", "qname" : "fn:doc-available", "signature" : "($uri as xs:string?) as xs:boolean external", "description" : "The function returns true if and only if the function\n call `fn:doc($uri)`

would return a document node.

This function is

If `$uri`

is an empty sequence, this function returns\n `false`

.

If a call on `fn:doc($uri)`

would return a document\n node, this function returns `true`

.

A `$uri`

is not a valid URI according to the rules applied by the\n implementation of `fn:doc`

.

Otherwise, this function returns `false`

.

If this function returns `true`

, then calling `fn:doc($uri)`

\n within the same `fn:doc`

function,\n this guarantee is lost.

The function returns true if and only if the function\n call fn:doc($uri) would return a document node.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "uri", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "doc", "qname" : "fn:doc", "signature" : "($uri as xs:string?) as document()? external", "description" : "Retrieves a document using a URI supplied as an\n `xs:string`

, and returns the corresponding document node.

This function is

If `$uri`

is the empty sequence, the result is an empty sequence.

If `$uri`

is a relative URI reference, it is resolved\n relative to the value of the `xs:string`

.

If the

The URI may include a fragment identifier.

By default, this function is

However, for performance reasons, implementations may provide a user option to evaluate\n the function without a guarantee of determinism. The manner in which any such option is\n provided is implementation-defined. If the user has not selected such an option, a call\n of the function must either return a deterministic result or must raise a

For detailed type semantics, see [Formal Semantics].

If `$uri`

is read from a source document, it is generally appropriate to\n resolve it relative to the base URI property of the relevant node in the source\n document. This can be achieved by calling the `fn:resolve-uri`

function,\n and passing the resulting absolute URI as an argument to the `fn:doc`

\n function.

If two calls to this function supply different absolute URI References as arguments, the\n same document node may be returned if the implementation can determine that the two\n arguments refer to the same resource.

By defining the semantics of this function in terms of a string-to-document-node\n mapping in the dynamic context, the specification is acknowledging that the results of\n this function are outside the purview of the language specification itself, and depend\n entirely on the run-time environment in which the expression is evaluated. This run-time\n environment includes not only an unpredictable collection of resources (\"the web\"), but\n configurable machinery for locating resources and turning their contents into document\n nodes within the XPath data model. Both the set of resources that are reachable, and the\n mechanisms by which those resources are parsed and validated, are

One possible processing model for this function is as follows. The resource identified\n by the URI Reference is retrieved. If the resource cannot be retrieved, a

Various aspects of this processing are

The set of URI schemes that the implementation recognizes is\n implementation-defined. Implementations may allow the mapping of URIs to resources\n to be configured by the user, using mechanisms such as catalogs or user-written\n URI handlers.

The handling of non-XML media types is implementation-defined. Implementations may\n allow instances of the data model to be constructed from non-XML resources, under\n user control.

It is

Implementations may provide user-defined error handling options that allow\n processing to continue following an error in retrieving a resource, or in parsing\n and validating its content. When errors have been handled in this way, the\n function may return either an empty sequence, or a fallback document provided by\n the error handler.

Implementations may provide user options that relax the requirement for the\n function to return deterministic results.

A `$uri`

is not a valid URI.

A

A

A

Retrieves a document using a URI supplied as an\n xs:string , and returns the corresponding document node.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "uri", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "document()?", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "document-uri", "qname" : "fn:document-uri", "signature" : "() as xs:anyURI? external", "description" : "Returns the URI of a resource where a document can be found, if available.

The zero-argument form of this function is

If the argument is omitted, it defaults to the context item\n (`.`

). The behavior of the function if the argument is omitted is exactly\n the same as if the context item had been passed as the argument.

If `$arg`

is the empty sequence, the function returns the empty sequence.

If `$arg`

is not a document node, the function returns the empty\n sequence.

Otherwise, the function returns the value of the `document-uri`

accessor\n applied to `$arg`

, as defined in

The following errors may be raised when `$arg`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns the URI of a resource where a document can be found, if available.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:anyURI?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "document-uri", "qname" : "fn:document-uri", "signature" : "($arg as node()?) as xs:anyURI? external", "description" : "Returns the URI of a resource where a document can be found, if available.

The zero-argument form of this function is

`.`

). The behavior of the function if the argument is omitted is exactly\n the same as if the context item had been passed as the argument.

If `$arg`

is the empty sequence, the function returns the empty sequence.

If `$arg`

is not a document node, the function returns the empty\n sequence.

Otherwise, the function returns the value of the `document-uri`

accessor\n applied to `$arg`

, as defined in

The following errors may be raised when `$arg`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns the URI of a resource where a document can be found, if available.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "node()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyURI?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "element-with-id", "qname" : "fn:element-with-id", "signature" : "($arg as xs:string*) as element(*)* external", "description" : " Returns the sequence of element nodes that have an\n `ID`

value matching the value of one or more of the `IDREF`

\n values supplied in `$arg`

.

The one-argument form of this function is

The effect of this function is identical to `is-id`

property. However,\n it behaves differently in respect of element nodes with the `is-id`

\n property. Whereas the `fn:id`

, for legacy reasons, returns the element\n that has the `is-id`

property, this parent returns the element\n identified by the ID, which is the parent of the element having the\n `is-id`

property.

The function returns a sequence, in document order with duplicates eliminated,\n containing every element node `E`

that satisfies all the following\n conditions:

\n `E`

is in the target document. The target document is the document\n containing `$node`

, or the document containing the context item\n (`.`

) if the second argument is omitted. The behavior of the\n function if `$node`

is omitted is exactly the same as if the context\n item had been passed as `$node`

.

`E`

has an `ID`

value equal to one of the candidate\n `IDREF`

values, where:

An element has an `ID`

value equal to `V`

if\n either or both of the following conditions are true:

The element has an child element node whose `is-id`

\n property (See `V`

under the rules of the\n `eq`

operator using the Unicode code point collation\n (`http://www.w3.org/2005/xpath-functions/collation/codepoint`

).

The element has an attribute node whose `is-id`

property\n (See `V`

under the rules of the\n `eq`

operator using the Unicode code point collation\n (`http://www.w3.org/2005/xpath-functions/collation/codepoint`

).

Each `xs:string`

in `$arg`

is parsed as if it were\n of type `IDREFS`

, that is, each `xs:string`

in\n `$arg`

is treated as a whitespace-separated sequence of\n tokens, each acting as an `IDREF`

. These tokens are then\n included in the list of candidate `IDREF`

s. If any of the\n tokens is not a lexically valid `IDREF`

(that is, if it is not\n lexically an `xs:NCName`

), it is ignored. Formally, the\n candidate `IDREF`

values are the strings in the sequence given\n by the expression:

If several elements have the same `ID`

value, then `E`

\n is the one that is first in document order.

A `$node`

, or the context item if the second argument is omitted, is a\n node in a tree whose root is not a document node.

The following errors may be raised when `$node`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns the sequence of element nodes that have an\n ID value matching the value of one or more of the IDREF \n values supplied in $arg .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "element(*)*", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "element-with-id", "qname" : "fn:element-with-id", "signature" : "($arg as xs:string*, $node as node()) as element(*)* external", "description" : " Returns the sequence of element nodes that have an\n `ID`

value matching the value of one or more of the `IDREF`

\n values supplied in `$arg`

.

The one-argument form of this function is

The effect of this function is identical to `is-id`

property. However,\n it behaves differently in respect of element nodes with the `is-id`

\n property. Whereas the `fn:id`

, for legacy reasons, returns the element\n that has the `is-id`

property, this parent returns the element\n identified by the ID, which is the parent of the element having the\n `is-id`

property.

The function returns a sequence, in document order with duplicates eliminated,\n containing every element node `E`

that satisfies all the following\n conditions:

\n `E`

is in the target document. The target document is the document\n containing `$node`

, or the document containing the context item\n (`.`

) if the second argument is omitted. The behavior of the\n function if `$node`

is omitted is exactly the same as if the context\n item had been passed as `$node`

.

`E`

has an `ID`

value equal to one of the candidate\n `IDREF`

values, where:

An element has an `ID`

value equal to `V`

if\n either or both of the following conditions are true:

The element has an child element node whose `is-id`

\n property (See `V`

under the rules of the\n `eq`

operator using the Unicode code point collation\n (`http://www.w3.org/2005/xpath-functions/collation/codepoint`

).

The element has an attribute node whose `is-id`

property\n (See `V`

under the rules of the\n `eq`

operator using the Unicode code point collation\n (`http://www.w3.org/2005/xpath-functions/collation/codepoint`

).

Each `xs:string`

in `$arg`

is parsed as if it were\n of type `IDREFS`

, that is, each `xs:string`

in\n `$arg`

is treated as a whitespace-separated sequence of\n tokens, each acting as an `IDREF`

. These tokens are then\n included in the list of candidate `IDREF`

s. If any of the\n tokens is not a lexically valid `IDREF`

(that is, if it is not\n lexically an `xs:NCName`

), it is ignored. Formally, the\n candidate `IDREF`

values are the strings in the sequence given\n by the expression:

If several elements have the same `ID`

value, then `E`

\n is the one that is first in document order.

A `$node`

, or the context item if the second argument is omitted, is a\n node in a tree whose root is not a document node.

The following errors may be raised when `$node`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns true if the argument is the empty sequence.

This function is

If the value of `$arg`

is the empty sequence, the function returns\n `true`

; otherwise, the function returns `false`

.

The expression `fn:empty((1,2,3)[10])`

returns `true()`

.

The expression `fn:empty(fn:remove((\"hello\", \"world\"), 1))`

returns `false()`

.

Returns true if the argument is the empty sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "encode-for-uri", "qname" : "fn:encode-for-uri", "signature" : "($uri-part as xs:string?) as xs:string external", "description" : "Encodes reserved characters in a string that is intended to be used in the path\n segment of a URI.

This function is

If `$uri-part`

is the empty sequence, the function returns the zero-length\n string.

This function applies the URI escaping rules defined in section 2 of `xs:string`

supplied as `$uri-part`

. The\n effect of the function is to escape reserved characters. Each such character in the\n string is replaced with its percent-encoded form as described in

Since

All characters are escaped except those identified as \"unreserved\" by

This function escapes URI delimiters and therefore cannot be used indiscriminately to\n encode \"invalid\" characters in a path segment.

This function is invertible but not idempotent. This is because a string containing a\n percent character will be modified by applying the function: for example\n `100%`

becomes `100%25`

, while `100%25`

becomes\n `100%2525`

.

Encodes reserved characters in a string that is intended to be used in the path\n segment of a URI.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "uri-part", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "ends-with", "qname" : "fn:ends-with", "signature" : "($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean external", "description" : "Returns true if the string `$arg1`

contains `$arg2`

as a\n trailing substring, taking collations into account.

If the value of `$arg1`

or `$arg2`

is the empty sequence, or\n contains only ignorable collation units, it is interpreted as the zero-length\n string.

If the value of `$arg2`

is the zero-length string, then the function returns\n `true`

. If the value of `$arg1`

is the zero-length string and\n the value of `$arg2`

is not the zero-length string, then the function returns\n `false`

.

The collation used by this function is determined according to the rules in

The function returns an `xs:boolean`

indicating whether or not the value of\n `$arg1`

starts with a sequence of collation units that provides a\n `$arg2`

according to the\n collation that is used.

\n

A

Returns true if the string $arg1 contains $arg2 as a\n trailing substring, taking collations into account.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "arg2", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "arity" : 3, "name" : "ends-with", "qname" : "fn:ends-with", "signature" : "($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:boolean external", "description" : "Returns true if the string `$arg1`

contains `$arg2`

as a\n trailing substring, taking collations into account.

`$arg1`

or `$arg2`

is the empty sequence, or\n contains only ignorable collation units, it is interpreted as the zero-length\n string.

If the value of `$arg2`

is the zero-length string, then the function returns\n `true`

. If the value of `$arg1`

is the zero-length string and\n the value of `$arg2`

is not the zero-length string, then the function returns\n `false`

.

The collation used by this function is determined according to the rules in

The function returns an `xs:boolean`

indicating whether or not the value of\n `$arg1`

starts with a sequence of collation units that provides a\n `$arg2`

according to the\n collation that is used.

\n

A

Returns the value of a system environment variable, if it exists.

This function is

The set of available

If the `$name`

argument matches the name of one of these pairs, the function\n returns the corresponding value.

If there is no environment variable with a matching name, the function returns the empty\n sequence.

The collation used for matching names is

The function is

On many platforms, the term \"environment variable\" has a natural meaning in terms of\n facilities provided by the operating system. This interpretation of the concept does not\n exclude other interpretations, such as a mapping to a set of configuration parameters in\n a database system.

Environment variable names are usually case sensitive. Names are usually of the form\n `(letter|_) (letter|_|digit)*`

, but this varies by platform.

On some platforms, there may sometimes be multiple environment variables with the same name;\n in this case, it is implementation-dependent as to which is returned; see for example\n

The requirement to ensure that the function is deterministic means in practice that\n the implementation must make a snapshot of the environment variables at some time\n during execution, and return values obtained from this snapshot, rather than using\n live values that are subject to change at any time.

Operating system environment variables may be associated with a particular process,\n while queries and stylesheets may execute across multiple processes (or multiple machines).\n In such circumstances implementations

Security advice: Queries from untrusted sources should not be permitted unrestricted\n access to environment variables. For example, the name of the account under which the\n query is running may be useful information to a would-be intruder. An implementation may\n therefore choose to restrict access to the environment, or may provide a facility to\n make `fn:environment-variable`

always return the empty sequence.

Returns the value of a system environment variable, if it exists.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "environment-variable", "qname" : "fn:environment-variable", "signature" : "($arg as xs:string) as xs:string? external", "description" : "Returns the value of a system environment variable, if it exists.

The set of available

If the `$name`

argument matches the name of one of these pairs, the function\n returns the corresponding value.

If there is no environment variable with a matching name, the function returns the empty\n sequence.

The collation used for matching names is

The function is

On many platforms, the term \"environment variable\" has a natural meaning in terms of\n facilities provided by the operating system. This interpretation of the concept does not\n exclude other interpretations, such as a mapping to a set of configuration parameters in\n a database system.

Environment variable names are usually case sensitive. Names are usually of the form\n `(letter|_) (letter|_|digit)*`

, but this varies by platform.

On some platforms, there may sometimes be multiple environment variables with the same name;\n in this case, it is implementation-dependent as to which is returned; see for example\n

The requirement to ensure that the function is deterministic means in practice that\n the implementation must make a snapshot of the environment variables at some time\n during execution, and return values obtained from this snapshot, rather than using\n live values that are subject to change at any time.

Operating system environment variables may be associated with a particular process,\n while queries and stylesheets may execute across multiple processes (or multiple machines).\n In such circumstances implementations

Security advice: Queries from untrusted sources should not be permitted unrestricted\n access to environment variables. For example, the name of the account under which the\n query is running may be useful information to a would-be intruder. An implementation may\n therefore choose to restrict access to the environment, or may provide a facility to\n make `fn:environment-variable`

always return the empty sequence.

Returns the value of a system environment variable, if it exists.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "error", "qname" : "fn:error", "signature" : "() as none external", "description" : "Calling the `fn:error`

function raises an application-defined\n error.

This function is

This function never returns a value. Instead it always raises an error. The effect of\n the error is identical to the effect of dynamic errors raised implicitly, for example\n when an incorrect argument is supplied to a function.

The parameters to the `fn:error`

function supply information that is\n associated with the error condition and that is made available to a caller that asks for\n information about the error. The error may be caught either by the host language (using\n a try/catch construct in XSLT or XQuery, for example), or by the calling application or\n external processing environment. The way in which error information is returned to the\n external processing environment is

If `fn:error`

is called with no arguments, then its behavior is the same as\n the function call:

If `$code`

is the empty sequence then the effective value is the\n `xs:QName`

constructed by:

There are three pieces of information that may be associated with an error:

The `$code`

is an error code that distinguishes this error from others.\n It is an `xs:QName`

; the namespace URI conventionally identifies the\n component, subsystem, or authority responsible for defining the meaning of the\n error code, while the local part identifies the specific error condition. The\n namespace URI `http://www.w3.org/2005/xqt-errors`

is used for errors\n defined in this specification; other namespace URIs may be used for errors defined\n by the application.

If the external processing environment expects the error code to be returned as a\n URI or a string rather than as an `xs:QName`

, then an error code with\n namespace URI `NS`

and local part `LP`

will be returned in\n the form `NS#LP`

. The namespace URI part of the error code should\n therefore not include a fragment identifier.

The `$description`

is a natural-language description of the error\n condition.

The `$error-object`

is an arbitrary value used to convey additional\n information about the error, and may be used in any way the application\n chooses.

This function always raises a

Calling the fn:error function raises an application-defined\n error.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "none", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "error", "qname" : "fn:error", "signature" : "($code as xs:QName) as none external", "description" : "Calling the `fn:error`

function raises an application-defined\n error.

This function is

This function never returns a value. Instead it always raises an error. The effect of\n the error is identical to the effect of dynamic errors raised implicitly, for example\n when an incorrect argument is supplied to a function.

The parameters to the `fn:error`

function supply information that is\n associated with the error condition and that is made available to a caller that asks for\n information about the error. The error may be caught either by the host language (using\n a try/catch construct in XSLT or XQuery, for example), or by the calling application or\n external processing environment. The way in which error information is returned to the\n external processing environment is

If `fn:error`

is called with no arguments, then its behavior is the same as\n the function call:

If `$code`

is the empty sequence then the effective value is the\n `xs:QName`

constructed by:

There are three pieces of information that may be associated with an error:

The `$code`

is an error code that distinguishes this error from others.\n It is an `xs:QName`

; the namespace URI conventionally identifies the\n component, subsystem, or authority responsible for defining the meaning of the\n error code, while the local part identifies the specific error condition. The\n namespace URI `http://www.w3.org/2005/xqt-errors`

is used for errors\n defined in this specification; other namespace URIs may be used for errors defined\n by the application.

If the external processing environment expects the error code to be returned as a\n URI or a string rather than as an `xs:QName`

, then an error code with\n namespace URI `NS`

and local part `LP`

will be returned in\n the form `NS#LP`

. The namespace URI part of the error code should\n therefore not include a fragment identifier.

The `$description`

is a natural-language description of the error\n condition.

The `$error-object`

is an arbitrary value used to convey additional\n information about the error, and may be used in any way the application\n chooses.

This function always raises a

Calling the fn:error function raises an application-defined\n error.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "code", "type" : "xs:QName", "occurence" : null, "description" : "" } ], "returns" : { "type" : "none", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "error", "qname" : "fn:error", "signature" : "($code as xs:QName?, $description as xs:string) as none external", "description" : "Calling the `fn:error`

function raises an application-defined\n error.

This function is

This function never returns a value. Instead it always raises an error. The effect of\n the error is identical to the effect of dynamic errors raised implicitly, for example\n when an incorrect argument is supplied to a function.

The parameters to the `fn:error`

function supply information that is\n associated with the error condition and that is made available to a caller that asks for\n information about the error. The error may be caught either by the host language (using\n a try/catch construct in XSLT or XQuery, for example), or by the calling application or\n external processing environment. The way in which error information is returned to the\n external processing environment is

If `fn:error`

is called with no arguments, then its behavior is the same as\n the function call:

If `$code`

is the empty sequence then the effective value is the\n `xs:QName`

constructed by:

There are three pieces of information that may be associated with an error:

The `$code`

is an error code that distinguishes this error from others.\n It is an `xs:QName`

; the namespace URI conventionally identifies the\n component, subsystem, or authority responsible for defining the meaning of the\n error code, while the local part identifies the specific error condition. The\n namespace URI `http://www.w3.org/2005/xqt-errors`

is used for errors\n defined in this specification; other namespace URIs may be used for errors defined\n by the application.

If the external processing environment expects the error code to be returned as a\n URI or a string rather than as an `xs:QName`

, then an error code with\n namespace URI `NS`

and local part `LP`

will be returned in\n the form `NS#LP`

. The namespace URI part of the error code should\n therefore not include a fragment identifier.

The `$description`

is a natural-language description of the error\n condition.

The `$error-object`

is an arbitrary value used to convey additional\n information about the error, and may be used in any way the application\n chooses.

This function always raises a

Calling the fn:error function raises an application-defined\n error.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "code", "type" : "xs:QName", "occurence" : null, "description" : "" }, { "name" : "description", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "none", "description" : "" }, "errors" : [ ] }, { "arity" : 3, "name" : "error", "qname" : "fn:error", "signature" : "($code as xs:QName?, $description as xs:string, $error-object as item()*) as none external", "description" : "Calling the `fn:error`

function raises an application-defined\n error.

This function is

`fn:error`

function supply information that is\n associated with the error condition and that is made available to a caller that asks for\n information about the error. The error may be caught either by the host language (using\n a try/catch construct in XSLT or XQuery, for example), or by the calling application or\n external processing environment. The way in which error information is returned to the\n external processing environment is

If `fn:error`

is called with no arguments, then its behavior is the same as\n the function call:

If `$code`

is the empty sequence then the effective value is the\n `xs:QName`

constructed by:

There are three pieces of information that may be associated with an error:

`$code`

is an error code that distinguishes this error from others.\n It is an `xs:QName`

; the namespace URI conventionally identifies the\n component, subsystem, or authority responsible for defining the meaning of the\n error code, while the local part identifies the specific error condition. The\n namespace URI `http://www.w3.org/2005/xqt-errors`

is used for errors\n defined in this specification; other namespace URIs may be used for errors defined\n by the application.

`xs:QName`

, then an error code with\n namespace URI `NS`

and local part `LP`

will be returned in\n the form `NS#LP`

. The namespace URI part of the error code should\n therefore not include a fragment identifier.

The `$description`

is a natural-language description of the error\n condition.

`$error-object`

is an arbitrary value used to convey additional\n information about the error, and may be used in any way the application\n chooses.

This function always raises a

Calling the fn:error function raises an application-defined\n error.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "code", "type" : "xs:QName", "occurence" : null, "description" : "" }, { "name" : "description", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "error-object", "type" : "item()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "none", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "escape-html-uri", "qname" : "fn:escape-html-uri", "signature" : "($uri as xs:string?) as xs:string external", "description" : "Escapes a URI in the same way that HTML user agents handle attribute values\n expected to contain URIs.

This function is

If `$uri`

is the empty sequence, the function returns the zero-length\n string.

Otherwise, the function escapes all `$uri`

to be escaped is replaced by an escape sequence, which is\n formed by encoding the character as a sequence of octets in UTF-8, and then representing\n each of these octets in the form %HH, where HH is the hexadecimal representation of the\n octet. This function must always generate hexadecimal values using the upper-case\n letters A-F.

The behavior of this function corresponds to the recommended handling of non-ASCII\n characters in URI attribute values as described in

Escapes a URI in the same way that HTML user agents handle attribute values\n expected to contain URIs.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "uri", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "exactly-one", "qname" : "fn:exactly-one", "signature" : "($arg as item()*) as item() external", "description" : "Returns `$arg`

if it contains exactly one item. Otherwise, raises an\n error.

This function is

Except in error cases, the function returns `$arg`

unchanged.

For detailed type semantics, see [Formal Semantics].

A `$arg`

is an empty\n sequence or a sequence containing more than one item.

Returns $arg if it contains exactly one item.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "item()", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "exists", "qname" : "fn:exists", "signature" : "($arg as item()*) as xs:boolean external", "description" : "Returns true if the argument is a non-empty sequence.

This function is

If the value of `$arg`

is a non-empty sequence, the function returns\n `true`

; otherwise, the function returns `false`

.

The expression `fn:exists(fn:remove((\"hello\"), 1))`

returns `false()`

.

The expression `fn:exists(fn:remove((\"hello\", \"world\"), 1))`

returns `true()`

.

Returns true if the argument is a non-empty sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "false", "qname" : "fn:false", "signature" : "() as xs:boolean external", "description" : "Returns the `xs:boolean`

value `false`

.

This function is

The result is equivalent to `xs:boolean(\"0\")`

.

The expression `fn:false()`

returns `xs:boolean(0)`

.

Returns the xs:boolean value false .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "filter", "qname" : "fn:filter", "signature" : "($seq as item()*, $f as function (item()) as xs:boolean) as item()* external", "description" : "Returns those items from the sequence `$seq` for which the supplied\n function `$f` returns true.

This function is

The effect of the function is equivalent to the following implementation in XQuery:

or its equivalent in XSLT:

As a consequence of the function signature and the function calling\n rules, a type error occurs if the supplied function `$f` returns anything other\n than a single `xs:boolean`

item; there is no conversion to an effective\n boolean value.

Returns those items from the sequence $seq for which the supplied\n function $f returns true.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq", "type" : "item()", "occurence" : null, "description" : "" }, { "name" : "f", "type" : "function (item()) as xs:boolean", "occurence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "floor", "qname" : "fn:floor", "signature" : "($arg as numeric?) as numeric? external", "description" : "Rounds `$arg`

downwards to a whole number.

This function is

General rules: see

The function returns the largest (closest to positive infinity) number with no\n fractional part that is not greater than the value of `$arg`

.

If the type of `$arg`

is one of the four numeric types `xs:float`

,\n `xs:double`

, `xs:decimal`

or `xs:integer`

the type\n of the result is the same as the type of `$arg`

. If the type of\n `$arg`

is a type derived from one of the numeric types, the result is an\n instance of the base numeric type.

For `xs:float`

and `xs:double`

arguments, if the argument is\n positive zero, then positive zero is returned. If the argument is negative zero, then\n negative zero is returned.

For detailed type semantics, see [Formal Semantics].

The expression `fn:floor(10.5)`

returns `10`

.

The expression `fn:floor(-10.5)`

returns `-11`

.

Rounds $arg downwards to a whole number.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "numeric", "occurence" : null, "description" : "" } ], "returns" : { "type" : "numeric?", "description" : "" }, "errors" : [ ] }, { "arity" : 3, "name" : "fold-left", "qname" : "fn:fold-left", "signature" : "($seq as item()*, $zero as item()*, $f as function (item()*, item()) as item()*) as item()* external", "description" : "Processes the supplied sequence from left to right, applying the supplied\n function repeatedly to each item in turn, together with an accumulated result value.

This function is

The effect of the function is equivalent to the following implementation in XQuery:

or its equivalent in XSLT:

As a consequence of the function signature and the function calling\n rules, a type error occurs if the supplied function `$f` cannot be applied to\n two arguments, where the first argument is either the value of `$zero` or the\n result of a previous application of `$f`, and the second is `$seq` or\n any trailing subsequence of `$seq`.

Processes the supplied sequence from left to right, applying the supplied\n function repeatedly to each item in turn, together with an accumulated result value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq", "type" : "item()", "occurence" : null, "description" : "" }, { "name" : "zero", "type" : "item()", "occurence" : null, "description" : "" }, { "name" : "f", "type" : "function (item()*, item()) as item()*", "occurence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "arity" : 3, "name" : "fold-right", "qname" : "fn:fold-right", "signature" : "($seq as item()*, $zero as item()*, $f as function (item()*, item()) as item()*) as item()* external", "description" : "Processes the supplied sequence from right to left, applying the supplied\n function repeatedly to each item in turn, together with an accumulated result value.

This function is

The effect of the function is equivalent to the following implementation in XQuery:

or its equivalent in XSLT:

As a consequence of the function signature and the function calling\n rules, a type error occurs if the supplied function `$f` cannot be applied to\n two arguments, where the first argument is any item in the sequence `$seq`, and\n the second is either the value of `$zero` or the result of a previous\n application of `$f`.

Processes the supplied sequence from right to left, applying the supplied\n function repeatedly to each item in turn, together with an accumulated result value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq", "type" : "item()", "occurence" : null, "description" : "" }, { "name" : "zero", "type" : "item()", "occurence" : null, "description" : "" }, { "name" : "f", "type" : "function (item()*, item()) as item()*", "occurence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "arity" : 3, "name" : "for-each-pair", "qname" : "fn:for-each-pair", "signature" : "($seq1 as item()*, $seq2 as item()*, $f as function (item(), item()) as item()*) as item()* external", "description" : "Applies the function item `$f` to successive pairs of items taken one\n from `$seq1` and one from `$seq2`, returning the concatenation of the\n resulting sequences in order.

This function is

The effect of the function is equivalent to the following implementation in XQuery:

or its equivalent in XSLT:

The expression `fn:for-each-pair((\"a\", \"b\", \"c\"), (\"x\", \"y\", \"z\"), concat#2)`

returns `(\"ax\", \"by\", \"cz\")`

.

The expression `fn:for-each-pair(1 to 5, 1 to 5, function($a, $b){10*$a + $b}`

returns `(11, 22, 33, 44, 55)`

.

Applies the function item $f to successive pairs of items taken one\n from $seq1 and one from $seq2 , returning the concatenation of the\n resulting sequences in order.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq1", "type" : "item()", "occurence" : null, "description" : "" }, { "name" : "seq2", "type" : "item()", "occurence" : null, "description" : "" }, { "name" : "f", "type" : "function (item(), item()) as item()*", "occurence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "for-each", "qname" : "fn:for-each", "signature" : "($seq as item()*, $f as function (item()) as item()*) as item()* external", "description" : "Applies the function item `$f` to every item from the sequence\n `$seq` in turn, returning the concatenation of the resulting sequences in\n order.

This function is

The effect of the function is equivalent to the following implementation in XQuery:

or its equivalent in XSLT:

The function call `fn:for-each($SEQ, $F)`

is equivalent to the expression\n `for $i in $SEQ return $F($i)`

`ordered`

.

Applies the function item $f to every item from the sequence\n $seq in turn, returning the concatenation of the resulting sequences in\n order.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq", "type" : "item()", "occurence" : null, "description" : "" }, { "name" : "f", "type" : "function (item()) as item()*", "occurence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "format-date", "qname" : "fn:format-date", "signature" : "($value as xs:date?, $picture as xs:string) as xs:string? external", "description" : "Returns a string containing an `xs:date`

value formatted for display.

The two-argument form of this function is

The five-argument form of this function is

See

Returns a string containing an xs:date value formatted for display.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:date", "occurence" : null, "description" : "" }, { "name" : "picture", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "arity" : 5, "name" : "format-date", "qname" : "fn:format-date", "signature" : "($value as xs:date?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $place as xs:string?) as xs:string? external", "description" : "Returns a string containing an `xs:date`

value formatted for display.

The two-argument form of this function is

The five-argument form of this function is

See

Returns a string containing an xs:date value formatted for display.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:date", "occurence" : null, "description" : "" }, { "name" : "picture", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "language", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "calendar", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "place", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "format-dateTime", "qname" : "fn:format-dateTime", "signature" : "($value as xs:dateTime?, $picture as xs:string) as xs:string? external", "description" : "Returns a string containing an `xs:dateTime`

value formatted for display.

The two-argument form of this function is

The five-argument form of this function is

See

Returns a string containing an xs:dateTime value formatted for display.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:dateTime", "occurence" : null, "description" : "" }, { "name" : "picture", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "arity" : 5, "name" : "format-dateTime", "qname" : "fn:format-dateTime", "signature" : "($value as xs:dateTime?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $place as xs:string?) as xs:string? external", "description" : "Returns a string containing an `xs:dateTime`

value formatted for display.

See

Returns a string containing an xs:dateTime value formatted for display.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:dateTime", "occurence" : null, "description" : "" }, { "name" : "picture", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "language", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "calendar", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "place", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "format-integer", "qname" : "fn:format-integer", "signature" : "($value as xs:integer?, $picture as xs:string) as xs:string external", "description" : "Formats an integer according to a given picture string, using the conventions\n of a given natural language if specified.

The two-argument form of this function is

The three-argument form of this function is

If `$value`

is an empty sequence, the function returns a zero-length\n string.

In all other cases, the `$picture`

argument describes the format in which\n `$value`

is output.

The rules that follow describe how non-negative numbers are output. If the value of\n `$value`

is negative, the rules below are applied to the absolute value of\n `$value`

, and a minus sign is prepended to the result.

The value of `$picture`

consists of a primary format token,\n optionally followed\n by a format modifier. The primary format token is always present and

The primary format token is classified as one of the following:

A `decimal-digit-pattern` made up of `optional-digit-signs`,\n `mandatory-digit-signs`, and `grouping-separator-signs`.

The `optional-digit-sign` is the character \"#\".

A `mandatory-digit-sign` is a `mandatory-digit-signs` within the format token `000`

, `001`

, or\n `999`

.

a `grouping-separator-sign` is a non-alphanumeric character, that\n is a

If the primary format token contains at least one Unicode digit\n then it is taken as a decimal digit pattern, and in this case it `^((\\p{Nd}|#|[^\\p{N}\\p{L}])+?)$`

. If it contains\n a digit but does not match this pattern, a

If a semicolon is to be used as a grouping separator, then the primary\n format token as a whole must be followed by another semicolon, to ensure that\n the grouping separator is not mistaken as a separator between the primary format\n token and the format modifier.

There `mandatory-digit-sign`. There may be zero or\n more `optional-digit-signs`, and (if present) these `mandatory-digit-signs`. There may be zero or more\n `grouping-separator-signs`. A `grouping-separator-sign` `decimal-digit-pattern`, nor\n adjacent to another `grouping-separator-sign`.

The corresponding output format is a decimal number, using this digit family, with\n at least as many digits as there are `mandatory-digit-signs` in the\n format token. Thus, a format token `1`

generates the sequence `0 1\n 2 ... 10 11 12 ...`

, and a format token `01`

(or equivalently,\n `00`

or `99`

) generates the sequence `00 01 02 ...\n 09 10 11 12 ... 99 100 101`

. A format token of `١`

\n (Arabic-Indic digit one) generates the sequence `١`

then `٢`

\n then `٣`

...

The `grouping-separator-signs` are handled as follows. The position of\n grouping separators within the format token, counting backwards from the last\n digit, indicates the position of grouping separators to appear within the\n formatted number, and the character used as the `grouping-separator-sign`\n within the format token indicates the character to be used as the corresponding\n grouping separator in the formatted number. If `grouping-separator-signs`\n appear at regular intervals within the format token, that is if the same grouping\n separator appears at positions forming a sequence `N`, 2`N`,\n 3`N`, ... for some integer value `N` (including the case\n where there is only one number in the list), then the sequence is extrapolated to\n the left, so grouping separators will be used in the formatted number at every\n multiple of `N`. For example, if the format token is `0'000`

\n then the number one million will be formatted as `1'000'000`

, while the\n number fifteen will be formatted as `0'015`

.

The only purpose of `optional-digit-signs` is to mark the position of\n `grouping-separator-signs`. For example, if the format token is\n `#'##0`

then the number one million will be formatted as\n `1'000'000`

, while the number fifteen will be formatted as\n `15`

. A grouping separator is included in the formatted number only\n if there is a digit to its left, which will only be the case if either (a) the\n number is large enough to require that digit, or (b) the number of\n `mandatory-digit-signs` in the format token requires insignificant\n leading zeros to be present.

Numbers will never be truncated. Given the `decimal-digit-pattern`\n `01`

, the number three hundred will be output as `300`

,\n despite the absence of any `optional-digit-sign`.

The format token `A`

, which generates the sequence `A B C ... Z AA AB\n AC...`

.

The format token `a`

, which generates the sequence `a b c ... z aa ab\n ac...`

.

The format token `i`

, which generates the sequence `i ii iii iv v vi vii\n viii ix x ...`

.

The format token `I`

, which generates the sequence `I II III IV V VI VII\n VIII IX X ...`

.

The format token `w`

, which generates numbers written as lower-case words, for\n example in English, `one two three four ...`

\n

The format token `W`

, which generates numbers written as upper-case words, for\n example in English, `ONE TWO THREE FOUR ...`

\n

The format token `Ww`

, which generates numbers written as title-case words, for\n example in English, `One Two Three Four ...`

\n

Any other format token, which indicates a numbering sequence in which that token\n represents the number 1 (one) (but see the note below).\n \n It is `1`

.

In some traditional numbering sequences additional signs are added to denote\n that the letters should be interpreted as numbers; these are not included in\n the format token. An example (see also the example below) is classical Greek\n where a

For all format tokens other than the first kind above (one that consists of decimal\n digits), there `①`

(circled\n digit one, ①) has a range `1`

.

The above expansions of numbering sequences for format tokens such as `a`

and\n `i`

are indicative but not prescriptive. There are various conventions in\n use for how alphabetic sequences continue when the alphabet is exhausted, and differing\n conventions for how roman numerals are written (for example, `IV`

versus\n `IIII`

as the representation of the number 4). Sometimes alphabetic\n sequences are used that omit letters such as `i`

and `o`

. This\n specification does not prescribe the detail of any sequence other than those sequences\n consisting entirely of decimal digits.

Many numbering sequences are language-sensitive. This applies especially to the sequence\n selected by the tokens `w`

, `W`

and `Ww`

. It also\n applies to other sequences, for example different languages using the Cyrillic alphabet\n use different sequences of characters, each starting with the letter #x410 (Cyrillic\n capital letter A). In such cases, the `$lang`

argument specifies which\n language's conventions are to be used. `xml:lang`

attribute (see

The set of languages\n for which numbering is supported is `$lang`

argument is absent,\n or is set to an empty sequence, or is invalid, or is not a language supported by the\n implementation, then the number is formatted using

The format modifier `^([co](\\(.+\\))?)?[at]?$`

.

either `c`

or `o`

, optionally followed by\n a sequence of characters enclosed between parentheses, to indicate cardinal or\n ordinal numbering respectively, the default being cardinal numbering

either `a`

or `t`

, to indicate alphabetic\n or traditional numbering respectively, the default being

If the `o`

modifier is present, this indicates a request to output ordinal\n numbers rather than cardinal numbers. For example, in English, when used with the format\n token `1`

, this outputs the sequence `1st 2nd 3rd 4th ...`

, and\n when used with the format token `w`

outputs the sequence `first second\n third fourth ...`

.

The string of characters between the parentheses, if present, is used to\n select between other possible variations of cardinal or ordinal numbering sequences.\n The interpretation of this string is

For example, in some languages, ordinal numbers vary depending on the grammatical context:\n they may have different genders and may decline with the noun that they qualify.\n In such cases the string appearing in parentheses after the letter `o`

may be\n used to indicate the variation of the ordinal number required. The way in which the\n variation is indicated will depend on the conventions of the language. For inflected\n languages that vary the ending of the word, the `o(-e)`

, `o(-er)`

, `o(-es)`

, `o(-en)`

.

It is

The specification `\"1;o(-º)\"`

with `$lang`

equal to\n `it`

, if supported, should produce the sequence:

The specification `\"Ww;o\"`

with `$lang`

equal to\n `it`

, if supported, should produce the sequence:

The `a`

or `t`

\n modifier`a`

and `i`

. In some languages, the first member of\n each sequence is the same, and so the format token alone would be ambiguous. `a`

or `t`

modifier,\n the default is

A

Formats an integer according to a given picture string, using the conventions\n of a given natural language if specified.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:integer", "occurence" : null, "description" : "" }, { "name" : "picture", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 3, "name" : "format-integer", "qname" : "fn:format-integer", "signature" : "($value as xs:integer?, $picture as xs:string, $language as xs:string) as xs:string external", "description" : "Formats an integer according to a given picture string, using the conventions\n of a given natural language if specified.

The two-argument form of this function is

The three-argument form of this function is

If `$value`

is an empty sequence, the function returns a zero-length\n string.

In all other cases, the `$picture`

argument describes the format in which\n `$value`

is output.

The rules that follow describe how non-negative numbers are output. If the value of\n `$value`

is negative, the rules below are applied to the absolute value of\n `$value`

, and a minus sign is prepended to the result.

The value of `$picture`

consists of a primary format token,\n optionally followed\n by a format modifier. The primary format token is always present and

The primary format token is classified as one of the following:

A `decimal-digit-pattern` made up of `optional-digit-signs`,\n `mandatory-digit-signs`, and `grouping-separator-signs`.

The `optional-digit-sign` is the character \"#\".

A `mandatory-digit-sign` is a `mandatory-digit-signs` within the format token `000`

, `001`

, or\n `999`

.

a `grouping-separator-sign` is a non-alphanumeric character, that\n is a

If the primary format token contains at least one Unicode digit\n then it is taken as a decimal digit pattern, and in this case it `^((\\p{Nd}|#|[^\\p{N}\\p{L}])+?)$`

. If it contains\n a digit but does not match this pattern, a

If a semicolon is to be used as a grouping separator, then the primary\n format token as a whole must be followed by another semicolon, to ensure that\n the grouping separator is not mistaken as a separator between the primary format\n token and the format modifier.

There `mandatory-digit-sign`. There may be zero or\n more `optional-digit-signs`, and (if present) these `mandatory-digit-signs`. There may be zero or more\n `grouping-separator-signs`. A `grouping-separator-sign` `decimal-digit-pattern`, nor\n adjacent to another `grouping-separator-sign`.

The corresponding output format is a decimal number, using this digit family, with\n at least as many digits as there are `mandatory-digit-signs` in the\n format token. Thus, a format token `1`

generates the sequence `0 1\n 2 ... 10 11 12 ...`

, and a format token `01`

(or equivalently,\n `00`

or `99`

) generates the sequence `00 01 02 ...\n 09 10 11 12 ... 99 100 101`

. A format token of `١`

\n (Arabic-Indic digit one) generates the sequence `١`

then `٢`

\n then `٣`

...

The `grouping-separator-signs` are handled as follows. The position of\n grouping separators within the format token, counting backwards from the last\n digit, indicates the position of grouping separators to appear within the\n formatted number, and the character used as the `grouping-separator-sign`\n within the format token indicates the character to be used as the corresponding\n grouping separator in the formatted number. If `grouping-separator-signs`\n appear at regular intervals within the format token, that is if the same grouping\n separator appears at positions forming a sequence `N`, 2`N`,\n 3`N`, ... for some integer value `N` (including the case\n where there is only one number in the list), then the sequence is extrapolated to\n the left, so grouping separators will be used in the formatted number at every\n multiple of `N`. For example, if the format token is `0'000`

\n then the number one million will be formatted as `1'000'000`

, while the\n number fifteen will be formatted as `0'015`

.

The only purpose of `optional-digit-signs` is to mark the position of\n `grouping-separator-signs`. For example, if the format token is\n `#'##0`

then the number one million will be formatted as\n `1'000'000`

, while the number fifteen will be formatted as\n `15`

. A grouping separator is included in the formatted number only\n if there is a digit to its left, which will only be the case if either (a) the\n number is large enough to require that digit, or (b) the number of\n `mandatory-digit-signs` in the format token requires insignificant\n leading zeros to be present.

Numbers will never be truncated. Given the `decimal-digit-pattern`\n `01`

, the number three hundred will be output as `300`

,\n despite the absence of any `optional-digit-sign`.

The format token `A`

, which generates the sequence `A B C ... Z AA AB\n AC...`

.

The format token `a`

, which generates the sequence `a b c ... z aa ab\n ac...`

.

The format token `i`

, which generates the sequence `i ii iii iv v vi vii\n viii ix x ...`

.

The format token `I`

, which generates the sequence `I II III IV V VI VII\n VIII IX X ...`

.

The format token `w`

, which generates numbers written as lower-case words, for\n example in English, `one two three four ...`

\n

The format token `W`

, which generates numbers written as upper-case words, for\n example in English, `ONE TWO THREE FOUR ...`

\n

The format token `Ww`

, which generates numbers written as title-case words, for\n example in English, `One Two Three Four ...`

\n

Any other format token, which indicates a numbering sequence in which that token\n represents the number 1 (one) (but see the note below).\n \n It is `1`

.

In some traditional numbering sequences additional signs are added to denote\n that the letters should be interpreted as numbers; these are not included in\n the format token. An example (see also the example below) is classical Greek\n where a

For all format tokens other than the first kind above (one that consists of decimal\n digits), there `①`

(circled\n digit one, ①) has a range `1`

.

The above expansions of numbering sequences for format tokens such as `a`

and\n `i`

are indicative but not prescriptive. There are various conventions in\n use for how alphabetic sequences continue when the alphabet is exhausted, and differing\n conventions for how roman numerals are written (for example, `IV`

versus\n `IIII`

as the representation of the number 4). Sometimes alphabetic\n sequences are used that omit letters such as `i`

and `o`

. This\n specification does not prescribe the detail of any sequence other than those sequences\n consisting entirely of decimal digits.

Many numbering sequences are language-sensitive. This applies especially to the sequence\n selected by the tokens `w`

, `W`

and `Ww`

. It also\n applies to other sequences, for example different languages using the Cyrillic alphabet\n use different sequences of characters, each starting with the letter #x410 (Cyrillic\n capital letter A). In such cases, the `$lang`

argument specifies which\n language's conventions are to be used. `xml:lang`

attribute (see

The set of languages\n for which numbering is supported is `$lang`

argument is absent,\n or is set to an empty sequence, or is invalid, or is not a language supported by the\n implementation, then the number is formatted using

The format modifier `^([co](\\(.+\\))?)?[at]?$`

.

either `c`

or `o`

, optionally followed by\n a sequence of characters enclosed between parentheses, to indicate cardinal or\n ordinal numbering respectively, the default being cardinal numbering

either `a`

or `t`

, to indicate alphabetic\n or traditional numbering respectively, the default being

If the `o`

modifier is present, this indicates a request to output ordinal\n numbers rather than cardinal numbers. For example, in English, when used with the format\n token `1`

, this outputs the sequence `1st 2nd 3rd 4th ...`

, and\n when used with the format token `w`

outputs the sequence `first second\n third fourth ...`

.

The string of characters between the parentheses, if present, is used to\n select between other possible variations of cardinal or ordinal numbering sequences.\n The interpretation of this string is

For example, in some languages, ordinal numbers vary depending on the grammatical context:\n they may have different genders and may decline with the noun that they qualify.\n In such cases the string appearing in parentheses after the letter `o`

may be\n used to indicate the variation of the ordinal number required. The way in which the\n variation is indicated will depend on the conventions of the language. For inflected\n languages that vary the ending of the word, the `o(-e)`

, `o(-er)`

, `o(-es)`

, `o(-en)`

.

It is

The specification `\"1;o(-º)\"`

with `$lang`

equal to\n `it`

, if supported, should produce the sequence:

The specification `\"Ww;o\"`

with `$lang`

equal to\n `it`

, if supported, should produce the sequence:

The `a`

or `t`

\n modifier`a`

and `i`

. In some languages, the first member of\n each sequence is the same, and so the format token alone would be ambiguous. `a`

or `t`

modifier,\n the default is

A

Returns a string containing a number formatted according to a given picture\n string, taking account of decimal formats specified in the static context.

The three-argument form of this function is

The effect of the two-argument form of the function is equivalent to calling\n the three-argument form with an empty sequence as the value of the third argument.

The function formats `$value`

as a string using the `$picture`

argument and the decimal-format named by the\n `$decimal-format-name`

argument, or the default decimal-format, if there\n is no `$decimal-format-name`

argument. The syntax of the picture string is\n described in

The `$value`

argument may be of any numeric data type\n (`xs:double`

, `xs:float`

, `xs:decimal`

, or their\n subtypes including `xs:integer`

). Note that if an `xs:decimal`

is\n supplied, it is not automatically promoted to an `xs:double`

, as such\n promotion can involve a loss of precision.

If the supplied value of the `$value`

argument is an empty sequence, the\n function behaves as if the supplied value were the `xs:double`

value\n `NaN`

.

The value of `$decimal-format-name`

,\n `EQName`

as defined in the XPath 3.0 grammar, that is one of the following

A lexical QName, which is expanded using the\n

A `URIQualifiedName`

using the syntax `Q{uri}local`

,\n where the URI can be zero-length to indicate a name in no namespace.

The decimal format that is used is the decimal format\n in the static context whose name matches `$decimal-format-name`

if supplied,\n or the default decimal format in the static context otherwise.

The evaluation of the

The analysis phase takes as its inputs the

The result of the function is the formatted string representation of the supplied\n number.

A `$decimal-format-name`

argument is\n `URIQualifiedName`

Returns a string containing a number formatted according to a given picture\n string, taking account of decimal formats specified in the static context.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "numeric", "occurence" : null, "description" : "" }, { "name" : "picture", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 3, "name" : "format-number", "qname" : "fn:format-number", "signature" : "($value as numeric?, $picture as xs:string, $decimal-format-name as xs:string) as xs:string external", "description" : "Returns a string containing a number formatted according to a given picture\n string, taking account of decimal formats specified in the static context.

The three-argument form of this function is

The effect of the two-argument form of the function is equivalent to calling\n the three-argument form with an empty sequence as the value of the third argument.

The function formats `$value`

as a string using the `$picture`

argument and the decimal-format named by the\n `$decimal-format-name`

argument, or the default decimal-format, if there\n is no `$decimal-format-name`

argument. The syntax of the picture string is\n described in

The `$value`

argument may be of any numeric data type\n (`xs:double`

, `xs:float`

, `xs:decimal`

, or their\n subtypes including `xs:integer`

). Note that if an `xs:decimal`

is\n supplied, it is not automatically promoted to an `xs:double`

, as such\n promotion can involve a loss of precision.

If the supplied value of the `$value`

argument is an empty sequence, the\n function behaves as if the supplied value were the `xs:double`

value\n `NaN`

.

The value of `$decimal-format-name`

,\n `EQName`

as defined in the XPath 3.0 grammar, that is one of the following

A lexical QName, which is expanded using the\n

A `URIQualifiedName`

using the syntax `Q{uri}local`

,\n where the URI can be zero-length to indicate a name in no namespace.

The decimal format that is used is the decimal format\n in the static context whose name matches `$decimal-format-name`

if supplied,\n or the default decimal format in the static context otherwise.

The evaluation of the

The analysis phase takes as its inputs the

The result of the function is the formatted string representation of the supplied\n number.

A `$decimal-format-name`

argument is\n `URIQualifiedName`

Returns a string containing an `xs:time`

value formatted for display.

See

Returns a string containing an xs:time value formatted for display.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:time", "occurence" : null, "description" : "" }, { "name" : "picture", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "arity" : 5, "name" : "format-time", "qname" : "fn:format-time", "signature" : "($value as xs:time?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $place as xs:string?) as xs:string? external", "description" : "Returns a string containing an `xs:time`

value formatted for display.

See

Returns a string containing an xs:time value formatted for display.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:time", "occurence" : null, "description" : "" }, { "name" : "picture", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "language", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "calendar", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "place", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "function-arity", "qname" : "fn:function-arity", "signature" : "($func as function (*)) as xs:integer external", "description" : "Returns the arity of the function identified by a function item.

This function is

The `fn:function-arity`

function returns the arity (number of arguments) of\n the function identified by `$func`

.

The expression `fn:function-arity(fn:substring#2)`

returns `2`

.

The expression `fn:function-arity(function($node){name($node)})`

returns `1`

.

The expression `let $initial := fn:substring(?, 1, 1) return fn:function-arity($initial)`

returns `1`

.

Returns the arity of the function identified by a function item.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "func", "type" : "function (*)", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "generate-id", "qname" : "fn:generate-id", "signature" : "() as xs:string external", "description" : "This function returns a string that uniquely identifies a given node.

The zero-argument form of this function is

If the argument is omitted, it defaults to the context item (`.`

). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

If the argument is the empty sequence, the result is the zero-length string.

In other cases, the function returns a string that uniquely identifies a given node.

The returned identifier

An implementation is free to generate an identifier in any convenient way provided that\n it always generates the same identifier for the same node and that different identifiers\n are always generated from different nodes. An implementation is under no obligation to\n generate the same identifiers each time a document is transformed or queried.

The following errors may be raised when `$arg`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

This function returns a string that uniquely identifies a given node.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "generate-id", "qname" : "fn:generate-id", "signature" : "($arg as node()?) as xs:string external", "description" : "This function returns a string that uniquely identifies a given node.

The zero-argument form of this function is

If the argument is omitted, it defaults to the context item (`.`

). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

If the argument is the empty sequence, the result is the zero-length string.

In other cases, the function returns a string that uniquely identifies a given node.

The returned identifier

An implementation is free to generate an identifier in any convenient way provided that\n it always generates the same identifier for the same node and that different identifiers\n are always generated from different nodes. An implementation is under no obligation to\n generate the same identifiers each time a document is transformed or queried.

The following errors may be raised when `$arg`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

This function returns a string that uniquely identifies a given node.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "node()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "has-children", "qname" : "fn:has-children", "signature" : "() as xs:boolean external", "description" : "Returns true if the supplied node has one or more child nodes (of any kind).

The zero-argument form of this function is

If the argument is omitted, it defaults to the context item (`.`

). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

`$node`

matches the expected\n type `node()?`

, `fn:has-children($node)`

is defined to be\n the same as the result of the expression\n `fn:exists($node/child::node())`

.

The following errors may be raised when `$node`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns true if the supplied node has one or more child nodes (of any kind).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "has-children", "qname" : "fn:has-children", "signature" : "($node as node()?) as xs:boolean external", "description" : "Returns true if the supplied node has one or more child nodes (of any kind).

The zero-argument form of this function is

`.`

). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

`$node`

matches the expected\n type `node()?`

, `fn:has-children($node)`

is defined to be\n the same as the result of the expression\n `fn:exists($node/child::node())`

.

The following errors may be raised when `$node`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns true if the supplied node has one or more child nodes (of any kind).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node", "type" : "node()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "head", "qname" : "fn:head", "signature" : "($arg as item()*) as item()? external", "description" : "Returns the first item in a sequence.

This function is

The function returns the value of the expression `$arg[1]`

If `$arg`

is the empty sequence, the empty sequence is returned. Otherwise\n the first item in the sequence is returned.

Returns the first item in a sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "item()?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "hours-from-duration", "qname" : "fn:hours-from-duration", "signature" : "($arg as xs:duration?) as xs:integer? external", "description" : "Returns the number of hours in a duration.

This function is

If `$arg`

is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an `xs:integer`

representing the hours\n component in the value of `$arg`

. The result is obtained by casting\n `$arg`

to an `xs:dayTimeDuration`

(see

If `$arg`

is a negative duration then the result will be negative..

If `$arg`

is an `xs:yearMonthDuration`

the function returns 0.

The expression `fn:hours-from-duration(xs:dayTimeDuration(\"P3DT10H\"))`

returns `10`

.

The expression `fn:hours-from-duration(xs:dayTimeDuration(\"P3DT12H32M12S\"))`

returns `12`

.

The expression `fn:hours-from-duration(xs:dayTimeDuration(\"PT123H\"))`

returns `3`

.

The expression `fn:hours-from-duration(xs:dayTimeDuration(\"-P3DT10H\"))`

returns `-10`

.

Returns the number of hours in a duration.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:duration", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "hours-from-time", "qname" : "fn:hours-from-time", "signature" : "($arg as xs:time?) as xs:integer? external", "description" : "Returns the hours component of an `xs:time`

.

This function is

If `$arg`

is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an `xs:integer`

between 0 and 23, both\n inclusive, representing the value of the hours component in the local value of\n `$arg`

.

Assume that the dynamic context provides an implicit timezone value of\n `-05:00`

.

The expression `fn:hours-from-time(xs:time(\"11:23:00\"))`

returns `11`

.

The expression `fn:hours-from-time(xs:time(\"21:23:00\"))`

returns `21`

.

The expression `fn:hours-from-time(xs:time(\"01:23:00+05:00\"))`

returns `1`

.

The expression `fn:hours-from-time(fn:adjust-time-to-timezone(xs:time(\"01:23:00+05:00\"),\n xs:dayTimeDuration(\"PT0S\")))`

returns `20`

.

The expression `fn:hours-from-time(xs:time(\"24:00:00\"))`

returns `0`

.

Returns the hours component of an xs:time .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:time", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "id", "qname" : "fn:id", "signature" : "($arg as xs:string*) as element(*)* external", "description" : "Returns the sequence of element nodes that have an `ID`

value\n matching the value of one or more of the `IDREF`

values supplied in\n `$arg`

.

The one-argument form of this function is

The function returns a sequence, in document order with duplicates eliminated,\n containing every element node `E`

that satisfies all the following\n conditions:

\n `E`

is in the target document. The target document is the document\n containing `$node`

, or the document containing the context item\n (`.`

) if the second argument is omitted. The behavior of the\n function if `$node`

is omitted is exactly the same as if the context\n item had been passed as `$node`

.

`E`

has an `ID`

value equal to one of the candidate\n `IDREF`

values, where:

An element has an `ID`

value equal to `V`

if either\n or both of the following conditions are true:

The `is-id`

property (See `V`

under the rules of the\n `eq`

operator using the Unicode codepoint collation\n (`http://www.w3.org/2005/xpath-functions/collation/codepoint`

).

The element has an attribute node whose `is-id`

property\n (See `V`

under the rules of the\n `eq`

operator using the Unicode code point collation\n (`http://www.w3.org/2005/xpath-functions/collation/codepoint`

).

Each `xs:string`

in `$arg`

is parsed as if it were of\n type `IDREFS`

, that is, each `xs:string`

in\n `$arg`

is treated as a whitespace-separated sequence of\n tokens, each acting as an `IDREF`

. These tokens are then included\n in the list of candidate `IDREF`

s. If any of the tokens is not a\n lexically valid `IDREF`

(that is, if it is not lexically an\n `xs:NCName`

), it is ignored. Formally, the candidate\n `IDREF`

values are the strings in the sequence given by the\n expression:

If several elements have the same `ID`

value, then `E`

is\n the one that is first in document order.

A `$node`

, or the context item if the second argument is absent, is a node\n in a tree whose root is not a document node.

The following errors may be raised when `$node`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns the sequence of element nodes that have an ID value\n matching the value of one or more of the IDREF values supplied in\n $arg .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "element(*)*", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "id", "qname" : "fn:id", "signature" : "($arg as xs:string*, $node as node()) as element(*)* external", "description" : "Returns the sequence of element nodes that have an `ID`

value\n matching the value of one or more of the `IDREF`

values supplied in\n `$arg`

.

The one-argument form of this function is

`E`

that satisfies all the following\n conditions:

`E`

is in the target document. The target document is the document\n containing `$node`

, or the document containing the context item\n (`.`

) if the second argument is omitted. The behavior of the\n function if `$node`

is omitted is exactly the same as if the context\n item had been passed as `$node`

.

`E`

has an `ID`

value equal to one of the candidate\n `IDREF`

values, where:

An element has an `ID`

value equal to `V`

if either\n or both of the following conditions are true:

The `is-id`

property (See `V`

under the rules of the\n `eq`

operator using the Unicode codepoint collation\n (`http://www.w3.org/2005/xpath-functions/collation/codepoint`

).

The element has an attribute node whose `is-id`

property\n (See `V`

under the rules of the\n `eq`

operator using the Unicode code point collation\n (`http://www.w3.org/2005/xpath-functions/collation/codepoint`

).

Each `xs:string`

in `$arg`

is parsed as if it were of\n type `IDREFS`

, that is, each `xs:string`

in\n `$arg`

is treated as a whitespace-separated sequence of\n tokens, each acting as an `IDREF`

. These tokens are then included\n in the list of candidate `IDREF`

s. If any of the tokens is not a\n lexically valid `IDREF`

(that is, if it is not lexically an\n `xs:NCName`

), it is ignored. Formally, the candidate\n `IDREF`

values are the strings in the sequence given by the\n expression:

If several elements have the same `ID`

value, then `E`

is\n the one that is first in document order.

A `$node`

, or the context item if the second argument is absent, is a node\n in a tree whose root is not a document node.

The following errors may be raised when `$node`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns the sequence of element or attribute nodes with an `IDREF`

\n value matching the value of one or more of the `ID`

values supplied in\n `$arg`

.

The one-argument form of this function is

The function returns a sequence, in document order with duplicates eliminated,\n containing every element or attribute node `$N`

that satisfies all the\n following conditions:

`$N`

is in the target document. The target document is the document\n containing `$node`

or the document containing the context item\n (`.`

) if the second argument is omitted. The behavior of the\n function if `$node`

is omitted is exactly the same as if the context\n item had been passed as `$node`

.

`$N`

has an `IDREF`

value equal to one of the candidate\n `ID`

values, where:

A node `$N`

has an `IDREF`

value equal to\n `V`

if both of the following conditions are true:

The `is-idrefs`

property (see `$N`

is `true`

.

The sequence `V`

under the rules of the `eq`

\n operator using the Unicode code point collation\n (`http://www.w3.org/2005/xpath-functions/collation/codepoint`

).

Each `xs:string`

in `$arg`

is parsed as if it were of\n lexically of type `xs:ID`

. These `xs:string`

s are then\n included in the list of candidate `xs:ID`

s. If any of the strings\n in `$arg`

is not a lexically valid `xs:ID`

(that is,\n if it is not lexically an `xs:NCName`

), it is ignored. More\n formally, the candidate `ID`

values are the strings in the\n sequence:

A `$node`

, or the context item if the second argument is omitted, is a node\n in a tree whose root is not a document node.

The following errors may be raised when `$node`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns the sequence of element or attribute nodes with an IDREF \n value matching the value of one or more of the ID values supplied in\n $arg .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "node()*", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "idref", "qname" : "fn:idref", "signature" : "($arg as xs:string*, $node as node()) as node()* external", "description" : "Returns the sequence of element or attribute nodes with an `IDREF`

\n value matching the value of one or more of the `ID`

values supplied in\n `$arg`

.

The one-argument form of this function is

The function returns a sequence, in document order with duplicates eliminated,\n containing every element or attribute node `$N`

that satisfies all the\n following conditions:

`$N`

is in the target document. The target document is the document\n containing `$node`

or the document containing the context item\n (`.`

) if the second argument is omitted. The behavior of the\n function if `$node`

is omitted is exactly the same as if the context\n item had been passed as `$node`

.

`$N`

has an `IDREF`

value equal to one of the candidate\n `ID`

values, where:

A node `$N`

has an `IDREF`

value equal to\n `V`

if both of the following conditions are true:

The `is-idrefs`

property (see `$N`

is `true`

.

The sequence `V`

under the rules of the `eq`

\n operator using the Unicode code point collation\n (`http://www.w3.org/2005/xpath-functions/collation/codepoint`

).

Each `xs:string`

in `$arg`

is parsed as if it were of\n lexically of type `xs:ID`

. These `xs:string`

s are then\n included in the list of candidate `xs:ID`

s. If any of the strings\n in `$arg`

is not a lexically valid `xs:ID`

(that is,\n if it is not lexically an `xs:NCName`

), it is ignored. More\n formally, the candidate `ID`

values are the strings in the\n sequence:

A `$node`

, or the context item if the second argument is omitted, is a node\n in a tree whose root is not a document node.

The following errors may be raised when `$node`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns the value of the implicit timezone property from the dynamic context.\n

Returns the value of the implicit timezone property from the dynamic context. Components\n of the dynamic context are discussed in

Returns the value of the implicit timezone property from the dynamic context.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:dayTimeDuration", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "in-scope-prefixes", "qname" : "fn:in-scope-prefixes", "signature" : "($element as element(*)) as xs:string* external", "description" : "Returns the prefixes of the in-scope namespaces for an element node.

This function is

The function returns a sequence of strings representing the prefixes of the in-scope\n namespaces for `$element`

.

For namespace bindings that have a prefix, the function returns the prefix as an\n `xs:NCName`

. For the default namespace, which has no prefix, it returns\n the zero-length string.

The result sequence contains no duplicates.

The ordering of the result sequence is

Returns the prefixes of the in-scope namespaces for an element node.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "element", "type" : "element(*)", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "index-of", "qname" : "fn:index-of", "signature" : "($seq as xs:anyAtomicType*, $search as xs:anyAtomicType) as xs:integer* external", "description" : "Returns a sequence of positive integers giving the positions within the\n sequence `$seq`

of items that are equal to `$search`

.

The two-argument form of this function is

The three-argument form of this function is

The function returns a sequence of positive integers giving the positions within the\n sequence `$seq`

of items that are equal to `$search`

.

The collation used by this function is determined according to the rules in

The items in the sequence `$seq`

are compared with `$search`

under\n the rules for the `eq`

operator. Values of type `xs:untypedAtomic`

\n are compared as if they were of type `xs:string`

. Values that cannot be\n compared, because the `eq`

operator is not defined for their types, are\n considered to be distinct. If an item compares equal, then the position of that item in\n the sequence `$seq`

is included in the result.

The first item in a sequence is at position 1, not position 0.

The result sequence is in ascending numeric order.

If the value of `$seq`

is the empty sequence, or if no item in\n `$seq`

matches `$search`

, then the function returns the empty\n sequence.

No error occurs if non-comparable values are encountered. So when\n comparing two atomic values, the effective boolean value of `fn:index-of($a,\n $b)`

is true if `$a`

and `$b`

are equal, false if they\n are not equal or not comparable.

Returns a sequence of positive integers giving the positions within the\n sequence $seq of items that are equal to $search .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "" }, { "name" : "search", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer*", "description" : "" }, "errors" : [ ] }, { "arity" : 3, "name" : "index-of", "qname" : "fn:index-of", "signature" : "($seq as xs:anyAtomicType*, $search as xs:anyAtomicType, $collation as xs:string) as xs:integer* external", "description" : "Returns a sequence of positive integers giving the positions within the\n sequence `$seq`

of items that are equal to `$search`

.

The function returns a sequence of positive integers giving the positions within the\n sequence `$seq`

of items that are equal to `$search`

.

The items in the sequence `$seq`

are compared with `$search`

under\n the rules for the `eq`

operator. Values of type `xs:untypedAtomic`

\n are compared as if they were of type `xs:string`

. Values that cannot be\n compared, because the `eq`

operator is not defined for their types, are\n considered to be distinct. If an item compares equal, then the position of that item in\n the sequence `$seq`

is included in the result.

The first item in a sequence is at position 1, not position 0.

The result sequence is in ascending numeric order.

If the value of `$seq`

is the empty sequence, or if no item in\n `$seq`

matches `$search`

, then the function returns the empty\n sequence.

No error occurs if non-comparable values are encountered. So when\n comparing two atomic values, the effective boolean value of `fn:index-of($a,\n $b)`

is true if `$a`

and `$b`

are equal, false if they\n are not equal or not comparable.

Returns every node within the input sequence that is not an ancestor of another member\n of the input sequence; the nodes are returned in document order with duplicates\n eliminated.

This function is

The effect of the function call `fn:innermost($nodes)`

is defined to be\n equivalent to the result of the expression `$nodes except\n $nodes/ancestor::node()`

.

That is, the function takes as input a sequence of nodes, and returns every node within\n the sequence that is not an ancestor of another node within the sequence; the nodes are\n returned in document order with duplicates eliminated.

If the source document contains nested sections represented by `div`

\n elements, the expression `innermost(//div)`

returns those `div`

\n elements that do not contain further `div`

elements.

Returns every node within the input sequence that is not an ancestor of another member\n of the input sequence; the nodes are returned in document order with duplicates\n eliminated.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "node()*", "description" : "" }, "errors" : [ ] }, { "arity" : 3, "name" : "insert-before", "qname" : "fn:insert-before", "signature" : "($target as item()*, $position as xs:integer, $inserts as item()*) as item()* external", "description" : "Returns a sequence constructed by inserting an item or a sequence of items at a\n given position within an existing sequence.

This function is

The value returned by the function consists of all items of `$target`

whose\n index is less than `$position`

, followed by all items of\n `$inserts`

, followed by the remaining elements of `$target`

, in\n that order.

For detailed type semantics, see [Formal Semantics].

If `$target`

is the empty sequence, `$inserts`

is returned. If\n `$inserts`

is the empty sequence, `$target`

is returned.

If `$position`

is less than one (1), the first position, the effective value\n of `$position`

is one (1). If `$position`

is greater than the\n number of items in `$target`

, then the effective value of\n `$position`

is equal to the number of items in `$target`

plus\n 1.

The value of `$target`

is not affected by the sequence construction.

Returns a sequence constructed by inserting an item or a sequence of items at a\n given position within an existing sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "target", "type" : "item()", "occurence" : null, "description" : "" }, { "name" : "position", "type" : "xs:integer", "occurence" : null, "description" : "" }, { "name" : "inserts", "type" : "item()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "iri-to-uri", "qname" : "fn:iri-to-uri", "signature" : "($iri as xs:string?) as xs:string external", "description" : "Converts a string containing an IRI into a URI according to the rules of\n

This function is

If `$iri`

is the empty sequence, the function returns the zero-length\n string.

Otherwise, the function converts the value of `$iri`

into a URI according to\n the rules given in Section 3.1 of `$iri`

contains a character\n that is invalid in an IRI, such as the space character (see note below), the invalid\n character is replaced by its percent-encoded form as described in

Since

The function is idempotent but not invertible. Both the inputs `My Documents`

\n and `My%20Documents`

will be converted to the output\n `My%20Documents`

.

This function does not check whether `$iri`

is a valid IRI. It treats it as\n an

The following printable ASCII characters are invalid in an IRI: \"<\", \">\", \n \"

(double quote), space, \"{\", \"}\", \"|\", \"\\\", \"^\", and \"`\". Since these\n characters should not appear in an IRI, if they do appear in `$iri`

they will\n be percent-encoded. In addition, characters outside the range x20-

Since this function does not escape the PERCENT SIGN \"%\" and this character is not\n allowed in data within a URI, users wishing to convert character strings (such as file\n names) that include \"%\" to a URI should manually escape \"%\" by replacing it with \"%25\".\n

Converts a string containing an IRI into a URI according to the rules of\n .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "iri", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "lang", "qname" : "fn:lang", "signature" : "($testlang as xs:string?) as xs:boolean external", "description" : "This function tests whether the language of `$node`

, or the context\n item if the second argument is omitted, as specified by `xml:lang`

attributes\n is the same as, or is a sublanguage of, the language specified by\n `$testlang`

.

The one-argument form of this function is

The behavior of the function if the second argument is omitted is exactly the same as if\n the context item (`.`

) had been passed as the second argument.

The language of the argument `$node`

, or the context item if the second\n argument is omitted, is determined by the value of the `xml:lang`

attribute\n on the node, or, if the node has no such attribute, by the value of the\n `xml:lang`

attribute on the nearest ancestor of the node that has an\n `xml:lang`

attribute. If there is no such ancestor, then the function\n returns `false`

.

If `$testlang`

is the empty sequence it is interpreted as the zero-length\n string.

The relevant `xml:lang`

attribute is determined by the value of the XPath\n expression:

If this expression returns an empty sequence, the function returns `false`

.

Otherwise, the function returns `true`

if and only if, based on a caseless\n default match as specified in section 3.13 of

\n `$testlang`

is equal to the string-value of the relevant\n `xml:lang`

attribute, or

\n `$testlang`

is equal to some substring of the string-value of the\n relevant `xml:lang`

attribute that starts at the start of the\n string-value and ends immediately before a hyphen, \"-\" (the character \"-\" is\n HYPHEN-MINUS, #x002D).

The following errors may be raised when `$arg`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

This function tests whether the language of $node , or the context\n item if the second argument is omitted, as specified by xml:lang attributes\n is the same as, or is a sublanguage of, the language specified by\n $testlang .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "testlang", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "lang", "qname" : "fn:lang", "signature" : "($testlang as xs:string?, $node as node()) as xs:boolean external", "description" : "This function tests whether the language of `$node`

, or the context\n item if the second argument is omitted, as specified by `xml:lang`

attributes\n is the same as, or is a sublanguage of, the language specified by\n `$testlang`

.

The one-argument form of this function is

The behavior of the function if the second argument is omitted is exactly the same as if\n the context item (`.`

) had been passed as the second argument.

The language of the argument `$node`

, or the context item if the second\n argument is omitted, is determined by the value of the `xml:lang`

attribute\n on the node, or, if the node has no such attribute, by the value of the\n `xml:lang`

attribute on the nearest ancestor of the node that has an\n `xml:lang`

attribute. If there is no such ancestor, then the function\n returns `false`

.

If `$testlang`

is the empty sequence it is interpreted as the zero-length\n string.

The relevant `xml:lang`

attribute is determined by the value of the XPath\n expression:

If this expression returns an empty sequence, the function returns `false`

.

Otherwise, the function returns `true`

if and only if, based on a caseless\n default match as specified in section 3.13 of

\n `$testlang`

is equal to the string-value of the relevant\n `xml:lang`

attribute, or

\n `$testlang`

is equal to some substring of the string-value of the\n relevant `xml:lang`

attribute that starts at the start of the\n string-value and ends immediately before a hyphen, \"-\" (the character \"-\" is\n HYPHEN-MINUS, #x002D).

The following errors may be raised when `$arg`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns the context size from the dynamic context.

This function is

Returns the context size from the dynamic context. (See

A

Returns the context size from the dynamic context.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:integer", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "local-name-from-QName", "qname" : "fn:local-name-from-QName", "signature" : "($arg as xs:QName?) as xs:NCName? external", "description" : "Returns the local part of the supplied QName.

This function is

If `$arg`

is the empty sequence the function returns the empty sequence.

Otherwise, the function returns an `xs:NCName`

representing the local part of\n `$arg`

.

The expression `fn:local-name-from-QName(fn:QName(\"http://www.example.com/example\",\n \"person\"))`

returns `\"person\"`

.

Returns the local part of the supplied QName.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:QName", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:NCName?", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "local-name", "qname" : "fn:local-name", "signature" : "() as xs:string external", "description" : "Returns the local part of the name of `$arg`

as an\n `xs:string`

that is either the zero-length string, or has the lexical form\n of an `xs:NCName`

.

The zero-argument form of this function is

`.`

). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

If the argument is supplied and is the empty sequence, the function returns the\n zero-length string.

If the node identified by `$arg`

has no name (that is, if it is a document\n node, a comment, a text node, or a namespace node having no name), the function returns\n the zero-length string.

Otherwise, the function returns the local part of the expanded-QName of the node\n identified by `$arg`

, as determined by the `dm:node-name`

accessor\n defined in `xs:string`

whose lexical form is an `xs:NCName`

.

The following errors may be raised when `$arg`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns the local part of the name of $arg as an\n xs:string that is either the zero-length string, or has the lexical form\n of an xs:NCName .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "local-name", "qname" : "fn:local-name", "signature" : "($arg as node()?) as xs:string external", "description" : "Returns the local part of the name of `$arg`

as an\n `xs:string`

that is either the zero-length string, or has the lexical form\n of an `xs:NCName`

.

The zero-argument form of this function is

`.`

). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

If the argument is supplied and is the empty sequence, the function returns the\n zero-length string.

If the node identified by `$arg`

has no name (that is, if it is a document\n node, a comment, a text node, or a namespace node having no name), the function returns\n the zero-length string.

Otherwise, the function returns the local part of the expanded-QName of the node\n identified by `$arg`

, as determined by the `dm:node-name`

accessor\n defined in `xs:string`

whose lexical form is an `xs:NCName`

.

The following errors may be raised when `$arg`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Converts a string to lower case.

This function is

If the value of `$arg`

is the empty sequence, the zero-length string is\n returned.

Otherwise, the function returns the value of `$arg`

after translating every\n

Case mappings may change the length of a string. In general, the\n `fn:upper-case`

and `fn:lower-case`

functions are not inverses\n of each other: `fn:lower-case(fn:upper-case($arg))`

is not guaranteed to\n return `$arg`

, nor is `fn:upper-case(fn:lower-case($arg))`

. The\n Latin small letter dotless i (as used in Turkish) is perhaps the most prominent\n lower-case letter which will not round-trip. The Latin capital letter i with dot above\n is the most prominent upper-case letter which will not round trip; there are others,\n such as Latin capital letter Sharp S (#1E9E) which is introduced in Unicode 5.1.

These functions may not always be linguistically appropriate (e.g. Turkish i without\n dot) or appropriate for the application (e.g. titlecase). In cases such as Turkish, a\n simple translation should be used first.

Because the function is not sensitive to locale, results will not always match user\n expectations. In Quebec, for example, the standard uppercase equivalent of \"è\" is \"È\",\n while in metropolitan France it is more commonly \"E\"; only one of these is supported by\n the functions as defined.

Many characters of class Ll lack uppercase equivalents in the Unicode case mapping\n tables; many characters of class Lu lack lowercase equivalents.

Converts a string to lower case.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "matches", "qname" : "fn:matches", "signature" : "($input as xs:string?, $pattern as xs:string) as xs:boolean external", "description" : "Returns true if the supplied string matches a given regular expression.

This function is

The effect of calling the first version of this function (omitting the argument\n `$flags`

) is the same as the effect of calling the second version with the\n `$flags`

argument set to a zero-length string. Flags are defined in\n

If `$input`

is the empty sequence, it is interpreted as the zero-length\n string.

The function returns `true`

if `$input`

or some substring of\n `$input`

matches the regular expression supplied as `$pattern`

.\n Otherwise, the function returns `false`

. The matching rules are influenced by\n the value of `$flags`

if present.

A `$pattern`

is invalid according to the rules described in

A `$flags`

is invalid according to the rules described in

Returns true if the supplied string matches a given regular expression.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "input", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "pattern", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "arity" : 3, "name" : "matches", "qname" : "fn:matches", "signature" : "($input as xs:string?, $pattern as xs:string, $flags as xs:string) as xs:boolean external", "description" : "Returns true if the supplied string matches a given regular expression.

This function is

`$flags`

) is the same as the effect of calling the second version with the\n `$flags`

argument set to a zero-length string. Flags are defined in\n

If `$input`

is the empty sequence, it is interpreted as the zero-length\n string.

The function returns `true`

if `$input`

or some substring of\n `$input`

matches the regular expression supplied as `$pattern`

.\n Otherwise, the function returns `false`

. The matching rules are influenced by\n the value of `$flags`

if present.

A `$pattern`

is invalid according to the rules described in

A `$flags`

is invalid according to the rules described in

Returns true if the supplied string matches a given regular expression.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "input", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "pattern", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "flags", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "max", "qname" : "fn:max", "signature" : "($arg as xs:anyAtomicType*) as xs:anyAtomicType? external", "description" : "Returns a value that is equal to the highest value appearing in the input\n sequence.

The zero-argument form of this function is

The one-argument form of this function is

The following rules are applied to the input sequence `$arg`

:

Values of type `xs:untypedAtomic`

in `$arg`

are cast to\n `xs:double`

.

Numeric and `xs:anyURI`

values are converted to\n the least common type reachable by a combination of type promotion and subtype\n substitution. See

The items in the resulting sequence may be reordered in an arbitrary order. The\n resulting sequence is referred to below as the converted sequence. The function returns\n an item from the converted sequence rather than the input sequence.

If the converted sequence is empty, the function returns the empty sequence.

All items in the `le`

operator is\n defined. In addition, the values in the sequence must have a total order. If date/time\n values do not have a timezone, they are considered to have the implicit timezone\n provided by the dynamic context for the purpose of comparison. Duration values must\n either all be `xs:yearMonthDuration`

values or must all be\n `xs:dayTimeDuration`

values.

If the converted sequence contains the value `NaN`

, the value\n `NaN`

is returned.

If the items in the `xs:string`

or types derived by restriction from `xs:string`

,\n then the determination of the item with the smallest value is made according to the\n collation that is used. If the type of the items in the `xs:string`

and\n `$collation`

is specified, the collation is ignored.

The collation used by this function is determined according to the rules in

The function returns the result of the expression:

evaluated with `$collation`

as the default collation if specified, and with\n `$c`

as the converted sequence.

For detailed type semantics, see [Formal Semantics].

A type error is raised

Returns a value that is equal to the highest value appearing in the input\n sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyAtomicType?", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "max", "qname" : "fn:max", "signature" : "($arg as xs:anyAtomicType*, $collation as xs:string) as xs:anyAtomicType? external", "description" : "Returns a value that is equal to the highest value appearing in the input\n sequence.

The zero-argument form of this function is

The one-argument form of this function is

The following rules are applied to the input sequence `$arg`

:

Values of type `xs:untypedAtomic`

in `$arg`

are cast to\n `xs:double`

.

Numeric and `xs:anyURI`

values are converted to\n the least common type reachable by a combination of type promotion and subtype\n substitution. See

The items in the resulting sequence may be reordered in an arbitrary order. The\n resulting sequence is referred to below as the converted sequence. The function returns\n an item from the converted sequence rather than the input sequence.

If the converted sequence is empty, the function returns the empty sequence.

All items in the `le`

operator is\n defined. In addition, the values in the sequence must have a total order. If date/time\n values do not have a timezone, they are considered to have the implicit timezone\n provided by the dynamic context for the purpose of comparison. Duration values must\n either all be `xs:yearMonthDuration`

values or must all be\n `xs:dayTimeDuration`

values.

If the converted sequence contains the value `NaN`

, the value\n `NaN`

is returned.

If the items in the `xs:string`

or types derived by restriction from `xs:string`

,\n then the determination of the item with the smallest value is made according to the\n collation that is used. If the type of the items in the `xs:string`

and\n `$collation`

is specified, the collation is ignored.

The collation used by this function is determined according to the rules in

The function returns the result of the expression:

evaluated with `$collation`

as the default collation if specified, and with\n `$c`

as the converted sequence.

For detailed type semantics, see [Formal Semantics].

A type error is raised

Returns a value that is equal to the highest value appearing in the input\n sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "" }, { "name" : "collation", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyAtomicType?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "min", "qname" : "fn:min", "signature" : "($arg as xs:anyAtomicType*) as xs:anyAtomicType? external", "description" : "Returns a value that is equal to the lowest value appearing in the input\n sequence.

The zero-argument form of this function is

The one-argument form of this function is

The following rules are applied to the input sequence:

Values of type `xs:untypedAtomic`

in `$arg`

are cast to\n `xs:double`

.

Numeric and `xs:anyURI`

values are converted to\n the least common type reachable by a combination of type promotion and subtype\n substitution. See

The items in the resulting sequence may be reordered in an arbitrary order. The\n resulting sequence is referred to below as the converted sequence. The function returns\n an item from the converted sequence rather than the input sequence.

If the converted sequence is empty, the empty sequence is returned.

All items in the `le`

operator is\n defined. In addition, the values in the sequence must have a total order. If date/time\n values do not have a timezone, they are considered to have the implicit timezone\n provided by the dynamic context for the purpose of comparison. Duration values must\n either all be `xs:yearMonthDuration`

values or must all be\n `xs:dayTimeDuration`

values.

If the converted sequence contains the value `NaN`

, the value\n `NaN`

is returned.

If the items in the `xs:string`

or types derived by restriction from `xs:string`

,\n then the determination of the item with the smallest value is made according to the\n collation that is used. If the type of the items in the `xs:string`

and\n `$collation`

is specified, the collation is ignored.

The collation used by this function is determined according to the rules in

The function returns the result of the expression:

evaluated with `$collation`

as the default collation if specified, and with\n `$c`

as the converted sequence.

For detailed type semantics, see [Formal Semantics].

Returns a value that is equal to the lowest value appearing in the input\n sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyAtomicType?", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "min", "qname" : "fn:min", "signature" : "($arg as xs:anyAtomicType*, $collation as xs:string) as xs:anyAtomicType? external", "description" : "Returns a value that is equal to the lowest value appearing in the input\n sequence.

The following rules are applied to the input sequence:

Values of type `xs:untypedAtomic`

in `$arg`

are cast to\n `xs:double`

.

`xs:anyURI`

values are converted to\n the least common type reachable by a combination of type promotion and subtype\n substitution. See

If the converted sequence is empty, the empty sequence is returned.

`le`

operator is\n defined. In addition, the values in the sequence must have a total order. If date/time\n values do not have a timezone, they are considered to have the implicit timezone\n provided by the dynamic context for the purpose of comparison. Duration values must\n either all be `xs:yearMonthDuration`

values or must all be\n `xs:dayTimeDuration`

values.

If the converted sequence contains the value `NaN`

, the value\n `NaN`

is returned.

`xs:string`

or types derived by restriction from `xs:string`

,\n then the determination of the item with the smallest value is made according to the\n collation that is used. If the type of the items in the `xs:string`

and\n `$collation`

is specified, the collation is ignored.

The collation used by this function is determined according to the rules in

The function returns the result of the expression:

`$collation`

as the default collation if specified, and with\n `$c`

as the converted sequence.

For detailed type semantics, see [Formal Semantics].

Returns a value that is equal to the lowest value appearing in the input\n sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "" }, { "name" : "collation", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyAtomicType?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "minutes-from-dateTime", "qname" : "fn:minutes-from-dateTime", "signature" : "($arg as xs:dateTime?) as xs:integer? external", "description" : "Returns the minute component of an `xs:dateTime`

.

This function is

If `$arg`

is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an `xs:integer`

value between 0 and 59, both\n inclusive, representing the minute component in the local value of\n `$arg`

.

The expression `fn:minutes-from-dateTime(xs:dateTime(\"1999-05-31T13:20:00-05:00\"))`

returns `20`

.

The expression `fn:minutes-from-dateTime(xs:dateTime(\"1999-05-31T13:30:00+05:30\"))`

returns `30`

.

Returns the minute component of an xs:dateTime .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:dateTime", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "minutes-from-duration", "qname" : "fn:minutes-from-duration", "signature" : "($arg as xs:duration?) as xs:integer? external", "description" : "Returns the number of minutes in a duration.

This function is

If `$arg`

is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an `xs:integer`

representing the minutes\n component in the value of `$arg`

. The result is obtained by casting\n `$arg`

to an `xs:dayTimeDuration`

(see

If `$arg`

is a negative duration then the result will be negative..

If `$arg`

is an `xs:yearMonthDuration`

the function returns 0.

The expression `fn:minutes-from-duration(xs:dayTimeDuration(\"P3DT10H\"))`

returns `0`

.

The expression `fn:minutes-from-duration(xs:dayTimeDuration(\"-P5DT12H30M\"))`

returns `-30`

.

Returns the number of minutes in a duration.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:duration", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "minutes-from-time", "qname" : "fn:minutes-from-time", "signature" : "($arg as xs:time?) as xs:integer? external", "description" : "Returns the minutes component of an `xs:time`

.

This function is

If `$arg`

is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an `xs:integer`

value between 0 and 59, both\n inclusive, representing the value of the minutes component in the local value of\n `$arg`

.

The expression `fn:minutes-from-time(xs:time(\"13:00:00Z\"))`

returns `0`

.

Returns the minutes component of an xs:time .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:time", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "month-from-date", "qname" : "fn:month-from-date", "signature" : "($arg as xs:date?) as xs:integer? external", "description" : "Returns the month component of an `xs:date`

.

This function is

If `$arg`

is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an `xs:integer`

between 1 and 12, both\n inclusive, representing the month component in the local value of `$arg`

.\n

The expression `fn:month-from-date(xs:date(\"1999-05-31-05:00\"))`

returns `5`

.

The expression `fn:month-from-date(xs:date(\"2000-01-01+05:00\"))`

returns `1`

.

Returns the month component of an xs:date .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:date", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "months-from-duration", "qname" : "fn:months-from-duration", "signature" : "($arg as xs:duration?) as xs:integer? external", "description" : "Returns the number of months in a duration.

This function is

If `$arg`

is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an `xs:integer`

representing the months\n component in the value of `$arg`

. The result is obtained by casting\n `$arg`

to an `xs:yearMonthDuration`

(see

If `$arg`

is a negative duration then the result will be negative..

If `$arg`

is an `xs:dayTimeDuration`

the function returns 0.

The expression `fn:months-from-duration(xs:yearMonthDuration(\"P20Y15M\"))`

returns `3`

.

The expression `fn:months-from-duration(xs:yearMonthDuration(\"-P20Y18M\"))`

returns `-6`

.

The expression `fn:months-from-duration(xs:dayTimeDuration(\"-P2DT15H0M0S\"))`

returns `0`

.

Returns the number of months in a duration.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:duration", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "name", "qname" : "fn:name", "signature" : "() as xs:string external", "description" : "Returns the name of a node, as an `xs:string`

that is either the\n zero-length string, or has the lexical form of an `xs:QName`

.

The zero-argument form of this function is

`.`

). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

If the argument is supplied and is the empty sequence, the function returns the\n zero-length string.

If the node identified by `$arg`

has no name (that is, if it is a document\n node, a comment, a text node, or a namespace node having no name), the function returns\n the zero-length string.

Otherwise, the function returns the value of the expression\n `fn:string(fn:node-name($arg))`

.

The following errors may be raised when `$arg`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns the name of a node, as an xs:string that is either the\n zero-length string, or has the lexical form of an xs:QName .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "name", "qname" : "fn:name", "signature" : "($arg as node()?) as xs:string external", "description" : "Returns the name of a node, as an `xs:string`

that is either the\n zero-length string, or has the lexical form of an `xs:QName`

.

The zero-argument form of this function is

`.`

). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

`$arg`

has no name (that is, if it is a document\n node, a comment, a text node, or a namespace node having no name), the function returns\n the zero-length string.

Otherwise, the function returns the value of the expression\n `fn:string(fn:node-name($arg))`

.

The following errors may be raised when `$arg`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns the namespace URI of one of the in-scope namespaces for\n `$element`

, identified by its namespace prefix.

This function is

If `$element`

has an in-scope namespace whose namespace prefix is equal to\n `$prefix`

, the function returns the namespace URI of that namespace.

If `$element`

has no in-scope namespace whose namespace prefix is equal to\n `$prefix`

, the function returns the empty sequence.

If `$prefix`

is the zero-length string or the empty\n sequence, then if `$element`

has a default namespace (that is, a namespace\n node with no name), the function returns the namespace URI of the default namespace. If\n `$element`

has no default namespace, the function returns the empty\n sequence.

Prefixes are equal only if their Unicode codepoints match exactly.

let `$e`

:=

The expression `fn:namespace-uri-for-prefix(\"z\", $e)`

returns `\"http://example.org/two\"`

.

The expression `fn:namespace-uri-for-prefix(\"\", $e)`

returns `\"http://example.org/one\"`

.

The expression `fn:namespace-uri-for-prefix((), $e)`

returns `\"http://example.org/one\"`

.

The expression `fn:namespace-uri-for-prefix(\"xml\", $e)`

returns `\"http://www.w3.org/XML/1998/namespace\"`

.

The expression `fn:namespace-uri-for-prefix(\"xml\", $e)`

returns `\"http://www.w3.org/XML/1998/namespace\"`

.

Returns the namespace URI of one of the in-scope namespaces for\n $element , identified by its namespace prefix.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "prefix", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "element", "type" : "element(*)", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyURI?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "namespace-uri-from-QName", "qname" : "fn:namespace-uri-from-QName", "signature" : "($arg as xs:QName?) as xs:anyURI? external", "description" : "Returns the namespace URI part of the supplied QName.

This function is

If `$arg`

is the empty sequence the function returns the empty sequence.

Otherwise, the function returns an `xs:anyURI`

representing the namespace URI\n part of `$arg`

.

If `$arg`

is in no namespace, the function returns the zero-length\n `xs:anyURI`

.

The expression `fn:namespace-uri-from-QName(fn:QName(\"http://www.example.com/example\",\n \"person\"))`

returns `xs:anyURI(\"http://www.example.com/example\")`

.

Returns the namespace URI part of the supplied QName.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:QName", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyURI?", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "namespace-uri", "qname" : "fn:namespace-uri", "signature" : "() as xs:anyURI external", "description" : "Returns the namespace URI part of the name of\n `$arg`

, as an `xs:anyURI`

value.

The zero-argument form of this function is

If the argument is omitted, it defaults to the context node (`.`

). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

If the node identified by `$arg`

is neither an element nor an attribute node,\n or if it is an element or attribute node whose expanded-QName (as determined by the\n `dm:node-name`

accessor in the `xs:anyURI`

\n value.

Otherwise, the result will be the namespace URI part of the expanded-QName of the node\n identified by `$arg`

, as determined by the `dm:node-name`

accessor\n defined in `xs:anyURI`

value.

The following errors may be raised when `$arg`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns the namespace URI part of the name of\n $arg , as an xs:anyURI value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:anyURI", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "namespace-uri", "qname" : "fn:namespace-uri", "signature" : "($arg as node()?) as xs:anyURI external", "description" : "Returns the namespace URI part of the name of\n `$arg`

, as an `xs:anyURI`

value.

The zero-argument form of this function is

If the argument is omitted, it defaults to the context node (`.`

). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

If the node identified by `$arg`

is neither an element nor an attribute node,\n or if it is an element or attribute node whose expanded-QName (as determined by the\n `dm:node-name`

accessor in the `xs:anyURI`

\n value.

Otherwise, the result will be the namespace URI part of the expanded-QName of the node\n identified by `$arg`

, as determined by the `dm:node-name`

accessor\n defined in `xs:anyURI`

value.

The following errors may be raised when `$arg`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns the namespace URI part of the name of\n $arg , as an xs:anyURI value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "node()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyURI", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "nilled", "qname" : "fn:nilled", "signature" : "() as xs:boolean external", "description" : "Returns true for an element that is

The zero-argument form of this function is

`.`

). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

If `$arg`

is the empty sequence, the function returns the empty sequence.

Otherwise the function returns the result of the `dm:nilled`

accessor as\n defined in

The following errors may be raised when `$arg`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns true for an element that is nilled .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "nilled", "qname" : "fn:nilled", "signature" : "($arg as node()?) as xs:boolean? external", "description" : "Returns true for an element that is

The zero-argument form of this function is

`.`

). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

If `$arg`

is the empty sequence, the function returns the empty sequence.

Otherwise the function returns the result of the `dm:nilled`

accessor as\n defined in

The following errors may be raised when `$arg`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns true for an element that is nilled .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "node()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean?", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "node-name", "qname" : "fn:node-name", "signature" : "() as xs:QName? external", "description" : "Returns the name of a node, as an `xs:QName`

.

The zero-argument form of this function is

`.`

). The behavior of the function if the argument is omitted is exactly\n the same as if the context item had been passed as the argument.

If `$arg`

is the empty sequence, the empty sequence is returned.

Otherwise, the function returns the result of the `dm:node-name`

accessor as\n defined in

The following errors may be raised when `$arg`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns the name of a node, as an xs:QName .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:QName?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "node-name", "qname" : "fn:node-name", "signature" : "($arg as node()?) as xs:QName? external", "description" : "Returns the name of a node, as an `xs:QName`

.

The zero-argument form of this function is

`.`

). The behavior of the function if the argument is omitted is exactly\n the same as if the context item had been passed as the argument.

If `$arg`

is the empty sequence, the empty sequence is returned.

Otherwise, the function returns the result of the `dm:node-name`

accessor as\n defined in

The following errors may be raised when `$arg`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns the name of a node, as an xs:QName .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "node()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:QName?", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "normalize-space", "qname" : "fn:normalize-space", "signature" : "() as xs:string external", "description" : "Returns the value of `$arg`

with leading and trailing whitespace\n removed, and sequences of internal whitespace reduced to a single space character.

The zero-argument form of this function is

If the value of `$arg`

is the empty sequence, the function returns the\n zero-length string.

The function returns a string constructed by stripping leading and trailing whitespace\n from the value of `$arg`

, and replacing sequences of one or more adjacent\n whitespace characters with a single space, `#x20`

.

The whitespace characters are defined in the metasymbol S (Production 3) of

If no argument is supplied, then `$arg`

defaults to the\n string value (calculated using `fn:string`

) of the context item\n (`.`

).

If no argument is supplied and the context item is

Returns the value of $arg with leading and trailing whitespace\n removed, and sequences of internal whitespace reduced to a single space character.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "normalize-space", "qname" : "fn:normalize-space", "signature" : "($arg as xs:string?) as xs:string external", "description" : "Returns the value of `$arg`

with leading and trailing whitespace\n removed, and sequences of internal whitespace reduced to a single space character.

The zero-argument form of this function is

If the value of `$arg`

is the empty sequence, the function returns the\n zero-length string.

The function returns a string constructed by stripping leading and trailing whitespace\n from the value of `$arg`

, and replacing sequences of one or more adjacent\n whitespace characters with a single space, `#x20`

.

The whitespace characters are defined in the metasymbol S (Production 3) of

If no argument is supplied, then `$arg`

defaults to the\n string value (calculated using `fn:string`

) of the context item\n (`.`

).

If no argument is supplied and the context item is

Returns the value of `$arg`

after applying Unicode\n normalization.

This function is

If the value of `$arg`

is the empty sequence, the function returns the\n zero-length string.

If the single-argument version of the function is used, the result is the same as\n calling the two-argument version with `$normalizationForm`

set to the string\n \"NFC\".

Otherwise, the function returns the value of `$arg`

normalized according to\n the rules of the normalization form identified by the value of\n `$normalizationForm`

.

The effective value of `$normalizationForm`

is the value of the expression\n `fn:upper-case(fn:normalize-space($normalizationForm))`

.

See

If the effective value of `$normalizationForm`

is NFC

,\n then the function returns the value of `$arg`

converted to Unicode\n Normalization Form C (NFC).

If the effective value of `$normalizationForm`

is NFD

,\n then the function returns the value of `$arg`

converted to Unicode\n Normalization Form D (NFD).

If the effective value of `$normalizationForm`

is NFKC

,\n then the function returns the value of `$arg`

in Unicode Normalization\n Form KC (NFKC).

If the effective value of `$normalizationForm`

is NFKD

,\n then the function returns the value of `$arg`

converted to Unicode\n Normalization Form KD (NFKD).

If the effective value of `$normalizationForm`

is\n FULLY-NORMALIZED

, then the function returns the value of\n `$arg`

converted to fully normalized form.

If the effective value of `$normalizationForm`

is the zero-length\n string, no normalization is performed and `$arg`

is returned.

Normalization forms NFC, NFD, NFKC, and NFKD, and the algorithms to be\n used for converting a string to each of these forms, are defined in

The motivation for normalization form FULLY-NORMALIZED is explained in\n

A string is

A composing character is a character that is one or both of the following:

the second character in the canonical decomposition mapping of some\n character that is not listed in the Composition Exclusion Table defined in\n

of non-zero canonical combining class (as defined in

A string is converted to FULLY-NORMALIZED form as follows:

if the first character in the string is a composing character, prepend a\n single space (x20);

convert the resulting string to normalization form NFC.

Conforming implementations

It is `fn:normalize-unicode`

function leaves such codepoints\n unchanged. If the implementation supports the requested normalization form then\n it

A `$normalizationForm`

argument is not one of the values supported by the\n implementation.

Returns the value of $arg after applying Unicode\n normalization.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "normalize-unicode", "qname" : "fn:normalize-unicode", "signature" : "($arg as xs:string?, $normalizationForm as xs:string) as xs:string external", "description" : "Returns the value of `$arg`

after applying Unicode\n normalization.

This function is

If the value of `$arg`

is the empty sequence, the function returns the\n zero-length string.

If the single-argument version of the function is used, the result is the same as\n calling the two-argument version with `$normalizationForm`

set to the string\n \"NFC\".

Otherwise, the function returns the value of `$arg`

normalized according to\n the rules of the normalization form identified by the value of\n `$normalizationForm`

.

The effective value of `$normalizationForm`

is the value of the expression\n `fn:upper-case(fn:normalize-space($normalizationForm))`

.

See

If the effective value of `$normalizationForm`

is NFC

,\n then the function returns the value of `$arg`

converted to Unicode\n Normalization Form C (NFC).

If the effective value of `$normalizationForm`

is NFD

,\n then the function returns the value of `$arg`

converted to Unicode\n Normalization Form D (NFD).

If the effective value of `$normalizationForm`

is NFKC

,\n then the function returns the value of `$arg`

in Unicode Normalization\n Form KC (NFKC).

If the effective value of `$normalizationForm`

is NFKD

,\n then the function returns the value of `$arg`

converted to Unicode\n Normalization Form KD (NFKD).

If the effective value of `$normalizationForm`

is\n FULLY-NORMALIZED

, then the function returns the value of\n `$arg`

converted to fully normalized form.

If the effective value of `$normalizationForm`

is the zero-length\n string, no normalization is performed and `$arg`

is returned.

Normalization forms NFC, NFD, NFKC, and NFKD, and the algorithms to be\n used for converting a string to each of these forms, are defined in

The motivation for normalization form FULLY-NORMALIZED is explained in\n

A string is

A composing character is a character that is one or both of the following:

the second character in the canonical decomposition mapping of some\n character that is not listed in the Composition Exclusion Table defined in\n

of non-zero canonical combining class (as defined in

A string is converted to FULLY-NORMALIZED form as follows:

if the first character in the string is a composing character, prepend a\n single space (x20);

convert the resulting string to normalization form NFC.

Conforming implementations

It is `fn:normalize-unicode`

function leaves such codepoints\n unchanged. If the implementation supports the requested normalization form then\n it

A `$normalizationForm`

argument is not one of the values supported by the\n implementation.

Returns the value of $arg after applying Unicode\n normalization.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "normalizationForm", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "not", "qname" : "fn:not", "signature" : "($arg as item()*) as xs:boolean external", "description" : "Returns `true`

if the effective boolean value of `$arg`

\n is `false`

, or `false`

if it is `true`

.

This function is

The value of `$arg`

is first reduced to an effective boolean value by\n applying the `fn:boolean()`

function. The function returns `true`

\n if the effective boolean value is `false`

, or `false`

if the\n effective boolean value is `true`

.

The expression `fn:not(fn:true())`

returns `false()`

.

The expression `fn:not(\"false\")`

returns `false()`

.

Returns true if the effective boolean value of $arg \n is false , or false if it is true .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "number", "qname" : "fn:number", "signature" : "() as xs:double external", "description" : "Returns the value indicated by `$arg`

or, if `$arg`

is\n not specified, the context item after atomization, converted to an\n `xs:double`

.

The zero-argument form of this function is

Calling the zero-argument version of the function is defined to give the same result as\n calling the single-argument version with the context item (`.`

). That is,\n `fn:number()`

is equivalent to `fn:number(.)`

, as\n defined by the rules that follow.

If `$arg`

is the empty sequence or if `$arg`

`xs:double`

, the `xs:double`

value\n `NaN`

is returned.

Otherwise, `$arg`

`xs:double`

following the rules of `xs:double`

fails, the `xs:double`

value\n `NaN`

is returned.

A `$arg`

is omitted and the context item is

As a consequence of the rules given above, a type error occurs if the context\n item cannot be atomized, or if the result of atomizing the context item is a sequence containing\n more than one atomic value.

Returns the value indicated by $arg or, if $arg is\n not specified, the context item after atomization, converted to an\n xs:double .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:double", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "number", "qname" : "fn:number", "signature" : "($arg as xs:anyAtomicType?) as xs:double external", "description" : "Returns the value indicated by `$arg`

or, if `$arg`

is\n not specified, the context item after atomization, converted to an\n `xs:double`

.

The zero-argument form of this function is

Calling the zero-argument version of the function is defined to give the same result as\n calling the single-argument version with the context item (`.`

). That is,\n `fn:number()`

is equivalent to `fn:number(.)`

, as\n defined by the rules that follow.

If `$arg`

is the empty sequence or if `$arg`

`xs:double`

, the `xs:double`

value\n `NaN`

is returned.

Otherwise, `$arg`

`xs:double`

following the rules of `xs:double`

fails, the `xs:double`

value\n `NaN`

is returned.

A `$arg`

is omitted and the context item is

As a consequence of the rules given above, a type error occurs if the context\n item cannot be atomized, or if the result of atomizing the context item is a sequence containing\n more than one atomic value.

Returns `$arg`

if it contains one or more items. Otherwise, raises\n an error.

This function is

Except in error cases, the function returns `$arg`

unchanged.

For detailed type semantics, see [Formal Semantics].

A `$arg`

is an empty\n sequence.

Returns $arg if it contains one or more items.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "item()+", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "outermost", "qname" : "fn:outermost", "signature" : "($nodes as node()*) as node()* external", "description" : "Returns every node within the input sequence that has no ancestor that is itself a\n member of the input sequence; the nodes are returned in document order with duplicates\n eliminated.

This function is

The effect of the function call `fn:outermost($nodes)`

is defined to be\n equivalent to the result of the expression `$nodes[not(ancestor::node() intersect\n $nodes)]/.`

.

That is, the function takes as input a sequence of nodes, and returns every node within\n the sequence that

The formulation `$nodes except $nodes/descendant::node()`

might appear to be\n simpler, but does not correctly account for attribute nodes, as these are not\n descendants of their parent element.

The motivation for the function was based on XSLT streaming use cases. There are cases\n where the `outermost(//section)`

but do not allow `//section`

; the\n function can therefore be useful in cases where it is known that sections will not be\n nested, as well as cases where the application actually wishes to process all sections\n except those that are nested within another.

Returns every node within the input sequence that has no ancestor that is itself a\n member of the input sequence; the nodes are returned in document order with duplicates\n eliminated.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "node()*", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "parse-xml-fragment", "qname" : "fn:parse-xml-fragment", "signature" : "($arg as xs:string?) as document(element(*,xs:untyped)) external", "description" : "This function takes as input an XML external entity represented as a string,\n and returns the document node at the root of an XDM tree representing the parsed\n document fragment.

This function is

If `$arg`

is the empty sequence, the function returns the empty sequence.

The input must be a namespace-well-formed external general parsed entity. More specifically,\n it must be a string conforming to the production rule

The string is parsed to form a sequence of nodes which\n become children of the new document node, in the same way as the content of any element\n is converted into a sequence of children for the resulting element node.

Schema validation is

The precise process used to construct the XDM instance is

The Static Base URI from the static context of the `fn:parse-xml-fragment`

function call\n is used as the base URI of the document node\n that is returned.

The document URI of the returned node is

The function is

A `$arg`

is not a well-formed external general parsed entity,\n if it contains entity references other than references to predefined entities, or if a document that\n incorporates this well-formed parsed entity would not be namespace-well-formed.

This function takes as input an XML external entity represented as a string,\n and returns the document node at the root of an XDM tree representing the parsed\n document fragment.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "document(element(*,xs:untyped))", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "parse-xml", "qname" : "fn:parse-xml", "signature" : "($arg as xs:string?) as document(element(*,xs:untyped)) external", "description" : "This function takes as input an XML document represented as a string, and\n returns the document node at the root of an XDM tree representing the parsed\n document.

This function is

If `$arg`

is the empty sequence, the function returns the\n empty sequence.

The precise process used to construct the XDM instance is

The Static Base URI property from the static context of the\n `fn:parse-xml`

function call is used both as the base URI used by the XML parser to resolve\n relative entity references within the document, and as the base URI of the document node\n that is returned.

The document URI of the returned node is

The function is

A `$arg`

is not a well-formed and namespace-well-formed XML document.

A `$arg`

is not valid against its\n DTD.

This function takes as input an XML document represented as a string, and\n returns the document node at the root of an XDM tree representing the parsed\n document.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "document(element(*,xs:untyped))", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "parse-xml", "qname" : "fn:parse-xml", "signature" : "($arg as xs:string?, $baseURI as xs:string) as document(element(*,xs:untyped)) external", "description" : "This function takes as input an XML document represented as a string, and\n returns the document node at the root of an XDM tree representing the parsed\n document.

This function is

If `$arg`

is the empty sequence, the function returns the\n empty sequence.

The precise process used to construct the XDM instance is

The Static Base URI property from the static context of the\n `fn:parse-xml`

function call is used both as the base URI used by the XML parser to resolve\n relative entity references within the document, and as the base URI of the document node\n that is returned.

The document URI of the returned node is

The function is

A `$arg`

is not a well-formed and namespace-well-formed XML document.

A `$arg`

is not valid against its\n DTD.

Returns the context position from the dynamic context.

This function is

Returns the context position from the dynamic context. (See

A

Returns the context position from the dynamic context.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:integer", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "prefix-from-QName", "qname" : "fn:prefix-from-QName", "signature" : "($arg as xs:QName?) as xs:NCName? external", "description" : "Returns the prefix component of the supplied QName.

This function is

If `$arg`

is the empty sequence the function returns the empty sequence.

If `$arg`

has no prefix component the function returns the empty\n sequence.

Otherwise, the function returns an `xs:NCName`

representing the prefix\n component of `$arg`

.

Returns the prefix component of the supplied QName.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:QName", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:NCName?", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "remove", "qname" : "fn:remove", "signature" : "($target as item()*, $position as xs:integer) as item()* external", "description" : "Returns a new sequence containing all the items of `$target`

except\n the item at position `$position`

.

This function is

The function returns a sequence consisting of all items of `$target`

whose\n index is less than `$position`

, followed by all items of `$target`

\n whose index is greater than `$position`

.

For detailed type semantics, see [Formal Semantics].

If `$position`

is less than 1 or greater than the number of items in\n `$target`

, `$target`

is returned.

If `$target`

is the empty sequence, the empty sequence is returned.

Returns a new sequence containing all the items of $target except\n the item at position $position .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "target", "type" : "item()", "occurence" : null, "description" : "" }, { "name" : "position", "type" : "xs:integer", "occurence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "arity" : 3, "name" : "replace", "qname" : "fn:replace", "signature" : "($input as xs:string?, $pattern as xs:string, $replacement as xs:string) as xs:string external", "description" : "Returns a string produced from the input string by replacing any substrings\n that match a given regular expression with a supplied replacement string.

This function is

`$flags`

) is the same as the effect of calling the second version with the\n `$flags`

argument set to a zero-length string. Flags are defined in\n

The `$flags`

argument is interpreted in the same manner as for the\n `fn:matches`

function.

If `$input`

is the empty sequence, it is interpreted as the zero-length\n string.

The function returns the `xs:string`

that is obtained by replacing each\n non-overlapping substring of `$input`

that matches the given\n `$pattern`

with an occurrence of the `$replacement`

string.

If two overlapping substrings of `$input`

both match the\n `$pattern`

, then only the first one (that is, the one whose first `$input`

string) is\n replaced.

If the `q`

flag is present, the replacement string is used\n

`$replacement`

\n string, a variable `$N`

may be used to refer to the substring captured by the\n Nth parenthesized sub-expression in the regular expression. For each match of the\n pattern, these variables are assigned the value of the content matched by the relevant\n sub-expression, and the modified replacement string is then substituted for the `$input`

that matched the pattern.\n `$0`

refers to the substring captured by the regular expression as a\n whole.

More specifically, the rules are as follows, where `S`

is the number of\n parenthesized sub-expressions in the regular expression, and `N`

is the\n decimal number formed by taking all the digits that consecutively follow the\n `$`

character:

If `N`

=`0`

, then the variable is replaced by the substring\n matched by the regular expression as a whole.

If `1`

<=`N`

<=`S`

, then the variable is\n replaced by the substring captured by the Nth parenthesized sub-expression. If the\n `Nth`

parenthesized sub-expression was not matched, then the\n variable is replaced by the zero-length string.

If `S`

<`N`

<=`9`

, then the variable is\n replaced by the zero-length string.

Otherwise (if `N`

>`S`

and\n `N`

>`9`

), the last digit of `N`

is taken to\n be a literal character to be included \"as is\" in the replacement string, and the\n rules are reapplied using the number `N`

formed by stripping off this\n last digit.

For example, if the replacement string is \n

and there are 5 substrings, the result contains the value of the substring that\n matches the second sub-expression, followed by the digit `$23`

\n \n

.`3`

\n

Unless the `q`

flag is used, a literal `$`

\n character within the replacement string must be written as `\\$`

, and a\n literal `\\`

character must be written as `\\\\`

.

If two alternatives within the pattern both match at the same position in the\n `$input`

, then the match that is chosen is the one matched by the first\n alternative. For example:

A `$pattern`

is invalid according to the rules described in section

A `$flags`

is invalid according to the rules described in section

A `fn:matches(\"\", $pattern,\n $flags)`

returns `true`

. It is not an error, however, if a captured\n substring is zero-length.

A `$replacement`

contains a \"`$`

\" character that is not\n immediately followed by a digit `0-9`

and not immediately preceded by a\n \"\\\".

A `$replacement`

contains a \"`\\`

\" character that is not part of a\n \"`\\\\`

\" pair, unless it is immediately followed by a \"`$`

\"\n character.

Returns a string produced from the input string by replacing any substrings\n that match a given regular expression with a supplied replacement string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "input", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "pattern", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "replacement", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 4, "name" : "replace", "qname" : "fn:replace", "signature" : "($input as xs:string?, $pattern as xs:string, $replacement as xs:string, $flags as xs:string) as xs:string external", "description" : "Returns a string produced from the input string by replacing any substrings\n that match a given regular expression with a supplied replacement string.

This function is

`$flags`

) is the same as the effect of calling the second version with the\n `$flags`

argument set to a zero-length string. Flags are defined in\n

The `$flags`

argument is interpreted in the same manner as for the\n `fn:matches`

function.

If `$input`

is the empty sequence, it is interpreted as the zero-length\n string.

The function returns the `xs:string`

that is obtained by replacing each\n non-overlapping substring of `$input`

that matches the given\n `$pattern`

with an occurrence of the `$replacement`

string.

If two overlapping substrings of `$input`

both match the\n `$pattern`

, then only the first one (that is, the one whose first `$input`

string) is\n replaced.

If the `q`

flag is present, the replacement string is used\n

`$replacement`

\n string, a variable `$N`

may be used to refer to the substring captured by the\n Nth parenthesized sub-expression in the regular expression. For each match of the\n pattern, these variables are assigned the value of the content matched by the relevant\n sub-expression, and the modified replacement string is then substituted for the `$input`

that matched the pattern.\n `$0`

refers to the substring captured by the regular expression as a\n whole.

More specifically, the rules are as follows, where `S`

is the number of\n parenthesized sub-expressions in the regular expression, and `N`

is the\n decimal number formed by taking all the digits that consecutively follow the\n `$`

character:

If `N`

=`0`

, then the variable is replaced by the substring\n matched by the regular expression as a whole.

If `1`

<=`N`

<=`S`

, then the variable is\n replaced by the substring captured by the Nth parenthesized sub-expression. If the\n `Nth`

parenthesized sub-expression was not matched, then the\n variable is replaced by the zero-length string.

If `S`

<`N`

<=`9`

, then the variable is\n replaced by the zero-length string.

Otherwise (if `N`

>`S`

and\n `N`

>`9`

), the last digit of `N`

is taken to\n be a literal character to be included \"as is\" in the replacement string, and the\n rules are reapplied using the number `N`

formed by stripping off this\n last digit.

For example, if the replacement string is \n

and there are 5 substrings, the result contains the value of the substring that\n matches the second sub-expression, followed by the digit `$23`

\n \n

.`3`

\n

Unless the `q`

flag is used, a literal `$`

\n character within the replacement string must be written as `\\$`

, and a\n literal `\\`

character must be written as `\\\\`

.

If two alternatives within the pattern both match at the same position in the\n `$input`

, then the match that is chosen is the one matched by the first\n alternative. For example:

`$pattern`

is invalid according to the rules described in section

`$flags`

is invalid according to the rules described in section

A `fn:matches(\"\", $pattern,\n $flags)`

returns `true`

. It is not an error, however, if a captured\n substring is zero-length.

A `$replacement`

contains a \"`$`

\" character that is not\n immediately followed by a digit `0-9`

and not immediately preceded by a\n \"\\\".

A `$replacement`

contains a \"`\\`

\" character that is not part of a\n \"`\\\\`

\" pair, unless it is immediately followed by a \"`$`

\"\n character.

Returns an `xs:QName`

value (that is, an expanded-QName) by taking\n an `xs:string`

that has the lexical form of an `xs:QName`

(a\n string in the form \"prefix:local-name\" or \"local-name\") and resolving it using the\n in-scope namespaces for a given element.

This function is

If `$qname`

is the empty sequence, returns the empty sequence.

More specifically, the function searches the namespace bindings of `$element`

\n for a binding whose name matches the prefix of `$qname`

, or the zero-length\n string if it has no prefix, and constructs an expanded-QName whose local name is taken\n from the supplied `$qname`

, and whose namespace URI is taken from the string\n value of the namespace binding.

If the `$qname`

has no prefix, and there is no namespace binding for\n `$element`

corresponding to the default (unnamed) namespace, then the\n resulting expanded-QName has no namespace part.

The prefix (or absence of a prefix) in the supplied `$qname`

argument is\n retained in the returned expanded-QName, as discussed in

A `$qname`

does not\n have the correct lexical form for an instance of `xs:QName`

.

A `$qname`

has a\n prefix and there is no namespace binding for `$element`

that matches this\n prefix.

Returns an xs:QName value (that is, an expanded-QName) by taking\n an xs:string that has the lexical form of an xs:QName (a\n string in the form \"prefix:local-name\" or \"local-name\") and resolving it using the\n in-scope namespaces for a given element.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "qname", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "element", "type" : "element(*)", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:QName?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "resolve-uri", "qname" : "fn:resolve-uri", "signature" : "($relative as xs:string?) as xs:anyURI? external", "description" : "Resolves a relative IRI reference against an absolute IRI.

The one-argument form of this function is

If the second argument is absent, the effect is the same as calling the two-argument\n function with the value of `fn:static-base-uri()`

as the second argument.

The function is defined to operate on IRI references as defined in

If `$relative`

is the empty sequence, the function returns the empty\n sequence.

If `$relative`

is an absolute IRI (as defined above), then it is returned\n unchanged.

Otherwise, the function resolves the relative IRI reference `$relative`

\n against the base IRI `$base`

using the algorithm defined in

The first form of this function resolves `$relative`

against the value of the\n base-uri property from the static context. A

A `$relative`

is not a\n valid IRI according to the rules of RFC3987, extended with an implementation-defined\n subset of the extensions permitted in LEIRI, or if it is not a suitable relative\n reference to use as input to the RFC3986 resolution algorithm extended to handle\n additional unreserved characters.

A `$base`

is not a\n valid IRI according to the rules of RFC3987, extended with an implementation-defined\n subset of the extensions permitted in LEIRI, or if it is not a suitable IRI to use as\n input to the chosen resolution algorithm (for example, if it is a relative IRI\n reference, if it is a non-hierarchic URI, or if it contains a fragment identifier).

A

Resolves a relative IRI reference against an absolute IRI.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "relative", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyURI?", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "resolve-uri", "qname" : "fn:resolve-uri", "signature" : "($relative as xs:string?, $base as xs:string) as xs:anyURI? external", "description" : "Resolves a relative IRI reference against an absolute IRI.

The one-argument form of this function is

If the second argument is absent, the effect is the same as calling the two-argument\n function with the value of `fn:static-base-uri()`

as the second argument.

The function is defined to operate on IRI references as defined in

If `$relative`

is the empty sequence, the function returns the empty\n sequence.

If `$relative`

is an absolute IRI (as defined above), then it is returned\n unchanged.

Otherwise, the function resolves the relative IRI reference `$relative`

\n against the base IRI `$base`

using the algorithm defined in

The first form of this function resolves `$relative`

against the value of the\n base-uri property from the static context. A

A `$relative`

is not a\n valid IRI according to the rules of RFC3987, extended with an implementation-defined\n subset of the extensions permitted in LEIRI, or if it is not a suitable relative\n reference to use as input to the RFC3986 resolution algorithm extended to handle\n additional unreserved characters.

A `$base`

is not a\n valid IRI according to the rules of RFC3987, extended with an implementation-defined\n subset of the extensions permitted in LEIRI, or if it is not a suitable IRI to use as\n input to the chosen resolution algorithm (for example, if it is a relative IRI\n reference, if it is a non-hierarchic URI, or if it contains a fragment identifier).

A

Resolves a relative IRI reference against an absolute IRI.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "relative", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "base", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyURI?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "reverse", "qname" : "fn:reverse", "signature" : "($arg as item()*) as item()* external", "description" : "Reverses the order of items in a sequence.

This function is

The function returns a sequence containing the items in `$arg`

in reverse\n order.

For detailed type semantics, see [Formal Semantics].

If `$arg`

is the empty sequence, the empty sequence is returned.

Reverses the order of items in a sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "root", "qname" : "fn:root", "signature" : "() as node() external", "description" : "Returns the root of the tree to which `$arg`

belongs. This will\n usually, but not necessarily, be a document node.

The zero-argument form of this function is

If the function is called without an argument, the context item (`.`

) is used\n as the default argument. The behavior of the function if the argument is omitted is\n exactly the same as if the context item had been passed as the argument.

The function returns the value of the expression\n `($arg/ancestor-or-self::node())[1]`

.

The following errors may be raised when `$arg`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns the root of the tree to which $arg belongs.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "node()", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "root", "qname" : "fn:root", "signature" : "($arg as node()?) as node()? external", "description" : "Returns the root of the tree to which `$arg`

belongs. This will\n usually, but not necessarily, be a document node.

The zero-argument form of this function is

If the function is called without an argument, the context item (`.`

) is used\n as the default argument. The behavior of the function if the argument is omitted is\n exactly the same as if the context item had been passed as the argument.

The function returns the value of the expression\n `($arg/ancestor-or-self::node())[1]`

.

The following errors may be raised when `$arg`

is omitted:

If the context\n item is

absent ,dynamic error \nIf the context item is not a\n node,

type error .

Returns the root of the tree to which $arg belongs.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "node()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "node()?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "round-half-to-even", "qname" : "fn:round-half-to-even", "signature" : "($arg as numeric?) as numeric? external", "description" : "Rounds a value to a specified number of decimal places, rounding to make the\n last digit even if two such values are equally near.

This function is

General rules: see

The function returns the nearest (that is, numerically closest) value to\n `$arg`

that is a multiple of ten to the power of minus\n `$precision`

. If two such values are equally near (e.g. if the fractional\n part in `$arg`

is exactly .500...), the function returns the one whose least\n significant digit is even.

`$arg`

is one of the four numeric types `xs:float`

,\n `xs:double`

, `xs:decimal`

or `xs:integer`

the type\n of the result is the same as the type of `$arg`

. If the type of\n `$arg`

is a type derived from one of the numeric types, the result is an\n instance of the base numeric type.

The first signature of this function produces the same result as the second signature\n with `$precision=0`

.

For arguments of type `xs:float`

and `xs:double`

:

If the argument is `NaN`

, positive or negative zero, or positive or\n negative infinity, then the result is the same as the argument.

In all other cases, the argument is cast to `xs:decimal`

\n `xs:decimal`

value, and the resulting\n `xs:decimal`

is cast back to `xs:float`

or\n `xs:double`

as appropriate to form the function result. If the\n resulting `xs:decimal`

value is zero, then positive or negative zero is\n returned according to the sign of the original argument.

For detailed type semantics, see [Formal Semantics].

This function is typically used in financial applications where the\n argument is of type `xs:decimal`

. For arguments of type `xs:float`

\n and `xs:double`

the results may be counter-intuitive. For example, consider\n `round-half-to-even(xs:float(150.015), 2)`

. The result is not 150.02 as\n might be expected, but 150.01. This is because the conversion of the\n `xs:float`

value represented by the literal 150.015 to an\n `xs:decimal`

produces the `xs:decimal`

value 150.014999389...,\n which is closer to 150.01 than to 150.02.

Rounds a value to a specified number of decimal places, rounding to make the\n last digit even if two such values are equally near.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "numeric", "occurence" : null, "description" : "" } ], "returns" : { "type" : "numeric?", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "round-half-to-even", "qname" : "fn:round-half-to-even", "signature" : "($arg as numeric?, $precision as xs:integer) as numeric? external", "description" : "Rounds a value to a specified number of decimal places, rounding to make the\n last digit even if two such values are equally near.

This function is

General rules: see

The function returns the nearest (that is, numerically closest) value to\n `$arg`

that is a multiple of ten to the power of minus\n `$precision`

. If two such values are equally near (e.g. if the fractional\n part in `$arg`

is exactly .500...), the function returns the one whose least\n significant digit is even.

`$arg`

is one of the four numeric types `xs:float`

,\n `xs:double`

, `xs:decimal`

or `xs:integer`

the type\n of the result is the same as the type of `$arg`

. If the type of\n `$arg`

is a type derived from one of the numeric types, the result is an\n instance of the base numeric type.

The first signature of this function produces the same result as the second signature\n with `$precision=0`

.

For arguments of type `xs:float`

and `xs:double`

:

If the argument is `NaN`

, positive or negative zero, or positive or\n negative infinity, then the result is the same as the argument.

In all other cases, the argument is cast to `xs:decimal`

\n `xs:decimal`

value, and the resulting\n `xs:decimal`

is cast back to `xs:float`

or\n `xs:double`

as appropriate to form the function result. If the\n resulting `xs:decimal`

value is zero, then positive or negative zero is\n returned according to the sign of the original argument.

For detailed type semantics, see [Formal Semantics].

This function is typically used in financial applications where the\n argument is of type `xs:decimal`

. For arguments of type `xs:float`

\n and `xs:double`

the results may be counter-intuitive. For example, consider\n `round-half-to-even(xs:float(150.015), 2)`

. The result is not 150.02 as\n might be expected, but 150.01. This is because the conversion of the\n `xs:float`

value represented by the literal 150.015 to an\n `xs:decimal`

produces the `xs:decimal`

value 150.014999389...,\n which is closer to 150.01 than to 150.02.

Rounds a value to a specified number of decimal places, rounding upwards if two\n such values are equally near.

This function is

General rules: see

The function returns the nearest (that is, numerically closest) value to\n `$arg`

that is a multiple of ten to the power of minus\n `$precision`

. If two such values are equally near (for example, if the\n fractional part in `$arg`

is exactly .5), the function returns the one that\n is closest to positive infinity.

`$arg`

is one of the four numeric types `xs:float`

,\n `xs:double`

, `xs:decimal`

or `xs:integer`

the type\n of the result is the same as the type of `$arg`

. If the type of\n `$arg`

is a type derived from one of the numeric types, the result is an\n instance of the base numeric type.

The single-argument version of this function produces the same result as the\n two-argument version with `$precision=0`

(that is, it rounds to a whole\n number).

When `$arg`

is of type `xs:float`

and `xs:double`

:

If `$arg`

is NaN, positive or negative zero, or positive or negative\n infinity, then the result is the same as the argument.

For other values, the argument is cast to `xs:decimal`

using an\n implementation of `xs:decimal`

that imposes no limits on the number of\n digits that can be represented. The function is applied to this\n `xs:decimal`

value, and the resulting `xs:decimal`

is\n cast back to `xs:float`

or `xs:double`

as appropriate to\n form the function result. If the resulting `xs:decimal`

value is zero,\n then positive or negative zero is returned according to the sign of\n `$arg`

.

For detailed type semantics, see [Formal Semantics].

This function is typically used with a non-zero `$precision`

in financial\n applications where the argument is of type `xs:decimal`

. For arguments of\n type `xs:float`

and `xs:double`

the results may be\n counter-intuitive. For example, consider `round(35.425e0, 2)`

. The result is\n not 35.43, as might be expected, but 35.42. This is because the `xs:double`

written as 35.425e0\n has an exact value equal to 35.42499999999..., which is closer\n to 35.42 than to 35.43.

Rounds a value to a specified number of decimal places, rounding upwards if two\n such values are equally near.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "numeric", "occurence" : null, "description" : "" } ], "returns" : { "type" : "numeric?", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "round", "qname" : "fn:round", "signature" : "($arg as numeric?, $precision as xs:integer) as numeric? external", "description" : "Rounds a value to a specified number of decimal places, rounding upwards if two\n such values are equally near.

This function is

General rules: see

The function returns the nearest (that is, numerically closest) value to\n `$arg`

that is a multiple of ten to the power of minus\n `$precision`

. If two such values are equally near (for example, if the\n fractional part in `$arg`

is exactly .5), the function returns the one that\n is closest to positive infinity.

`$arg`

is one of the four numeric types `xs:float`

,\n `xs:double`

, `xs:decimal`

or `xs:integer`

the type\n of the result is the same as the type of `$arg`

. If the type of\n `$arg`

is a type derived from one of the numeric types, the result is an\n instance of the base numeric type.

The single-argument version of this function produces the same result as the\n two-argument version with `$precision=0`

(that is, it rounds to a whole\n number).

When `$arg`

is of type `xs:float`

and `xs:double`

:

If `$arg`

is NaN, positive or negative zero, or positive or negative\n infinity, then the result is the same as the argument.

For other values, the argument is cast to `xs:decimal`

using an\n implementation of `xs:decimal`

that imposes no limits on the number of\n digits that can be represented. The function is applied to this\n `xs:decimal`

value, and the resulting `xs:decimal`

is\n cast back to `xs:float`

or `xs:double`

as appropriate to\n form the function result. If the resulting `xs:decimal`

value is zero,\n then positive or negative zero is returned according to the sign of\n `$arg`

.

For detailed type semantics, see [Formal Semantics].

This function is typically used with a non-zero `$precision`

in financial\n applications where the argument is of type `xs:decimal`

. For arguments of\n type `xs:float`

and `xs:double`

the results may be\n counter-intuitive. For example, consider `round(35.425e0, 2)`

. The result is\n not 35.43, as might be expected, but 35.42. This is because the `xs:double`

written as 35.425e0\n has an exact value equal to 35.42499999999..., which is closer\n to 35.42 than to 35.43.

Returns the seconds component of an `xs:dateTime`

.

This function is

If `$arg`

is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an `xs:decimal`

value greater than or equal\n to zero and less than 60, representing the seconds and fractional seconds in the local\n value of `$arg`

.

The expression `fn:seconds-from-dateTime(xs:dateTime(\"1999-05-31T13:20:00-05:00\"))`

returns `0`

.

Returns the seconds component of an xs:dateTime .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:dateTime", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:decimal?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "seconds-from-duration", "qname" : "fn:seconds-from-duration", "signature" : "($arg as xs:duration?) as xs:decimal? external", "description" : "Returns the number of seconds in a duration.

This function is

If `$arg`

is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an `xs:decimal`

representing the seconds\n component in the value of `$arg`

. The result is obtained by casting\n `$arg`

to an `xs:dayTimeDuration`

(see

If `$arg`

is a negative duration then the result will be negative..

If `$arg`

is an `xs:yearMonthDuration`

the function returns 0.

The expression `fn:seconds-from-duration(xs:dayTimeDuration(\"P3DT10H12.5S\"))`

returns `12.5`

.

The expression `fn:seconds-from-duration(xs:dayTimeDuration(\"-PT256S\"))`

returns `-16.0`

.

Returns the number of seconds in a duration.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:duration", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:decimal?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "seconds-from-time", "qname" : "fn:seconds-from-time", "signature" : "($arg as xs:time?) as xs:decimal? external", "description" : "Returns the seconds component of an `xs:time`

.

This function is

If `$arg`

is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an `xs:decimal`

value greater than or equal\n to zero and less than 60, representing the seconds and fractional seconds in the local\n value of `$arg`

.

The expression `fn:seconds-from-time(xs:time(\"13:20:10.5\"))`

returns `10.5`

.

Returns the seconds component of an xs:time .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:time", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:decimal?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "serialize", "qname" : "fn:serialize", "signature" : "($arg as item()*) as xs:string external", "description" : "This function serializes the supplied `$arg`

as described in

This function is

The value of `$arg`

acts as the input sequence to the serialization process,\n which starts with sequence normalization.

The single-argument version of this function has the same effect as\n the two-argument version called with `$params`

set to an empty sequence. This\n in turn is the same as the effect of passing an\n `output:serialization-parameters`

element with no child elements.

The `$params`

argument is used to identify a set of\n serialization parameters. These are supplied in the form of an\n `output:serialization-parameters`

element, having the format described in\n

The final stage of serialization, that is, encoding, is skipped. If the serializer does\n not allow this phase to be skipped, then the sequence of octets returned by the\n serializer is decoded into a string by reversing the character encoding performed in the\n final stage.

If the host language makes serialization an optional feature and\n the implementation does not support serialization, then a dynamic error\n

The serialization process will raise an error if `$arg`

is an attribute or\n namespace node.

If any serialization error occurs, including the detection of an invalid value for a\n serialization parameter, this results in the `fn:serialize`

call failing with\n a dynamic error.

This function serializes the supplied input\n sequence \n $arg as described in ,\n returning the serialized representation of the\n sequence as a string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "serialize", "qname" : "fn:serialize", "signature" : "($arg as item()*, $params as element(output:serialization-parameters)?) as xs:string external", "description" : "This function serializes the supplied `$arg`

as described in

This function is

The value of `$arg`

acts as the input sequence to the serialization process,\n which starts with sequence normalization.

The single-argument version of this function has the same effect as\n the two-argument version called with `$params`

set to an empty sequence. This\n in turn is the same as the effect of passing an\n `output:serialization-parameters`

element with no child elements.

The `$params`

argument is used to identify a set of\n serialization parameters. These are supplied in the form of an\n `output:serialization-parameters`

element, having the format described in\n

The final stage of serialization, that is, encoding, is skipped. If the serializer does\n not allow this phase to be skipped, then the sequence of octets returned by the\n serializer is decoded into a string by reversing the character encoding performed in the\n final stage.

If the host language makes serialization an optional feature and\n the implementation does not support serialization, then a dynamic error\n

The serialization process will raise an error if `$arg`

is an attribute or\n namespace node.

If any serialization error occurs, including the detection of an invalid value for a\n serialization parameter, this results in the `fn:serialize`

call failing with\n a dynamic error.

Returns true if the string `$arg1`

contains `$arg2`

as a\n leading substring, taking collations into account.

`$arg1`

or `$arg2`

is the empty sequence, or\n contains only ignorable collation units, it is interpreted as the zero-length\n string.

If the value of `$arg2`

is the zero-length string, then the function returns\n `true`

. If the value of `$arg1`

is the zero-length string and\n the value of `$arg2`

is not the zero-length string, then the function returns\n `false`

.

The collation used by this function is determined according to the rules in

The function returns an `xs:boolean`

indicating whether or not the value of\n `$arg1`

starts with a sequence of collation units that provides a\n `$arg2`

according to the\n collation that is used.

A

Returns true if the string $arg1 contains $arg2 as a\n leading substring, taking collations into account.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "arg2", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "arity" : 3, "name" : "starts-with", "qname" : "fn:starts-with", "signature" : "($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:boolean external", "description" : "Returns true if the string `$arg1`

contains `$arg2`

as a\n leading substring, taking collations into account.

`$arg1`

or `$arg2`

is the empty sequence, or\n contains only ignorable collation units, it is interpreted as the zero-length\n string.

`$arg2`

is the zero-length string, then the function returns\n `true`

. If the value of `$arg1`

is the zero-length string and\n the value of `$arg2`

is not the zero-length string, then the function returns\n `false`

.

The collation used by this function is determined according to the rules in

`xs:boolean`

indicating whether or not the value of\n `$arg1`

starts with a sequence of collation units that provides a\n `$arg2`

according to the\n collation that is used.

A

This function returns the value of the Static Base URI property from the static context.

This function is

The function returns the value of the Static Base URI property from the static context. If the\n property is absent, the empty sequence is returned.

Components of the static context are discussed in

XQuery 3.0 and XSLT 3.0 give an implementation freedom to use different base URIs during the\n static analysis phase and the dynamic evaluation phase, that is, for compile-time and run-time resources respectively.\n In this situation, the `fn:static-base-uri`

function should return a URI suitable for locating resources needed\n during dynamic evaluation.

This function returns the value of the Static Base URI property from the static context.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:anyURI?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "string-join", "qname" : "fn:string-join", "signature" : "($arg1 as xs:string*) as xs:string external", "description" : "Returns a string created by concatenating the items in a sequence, with a\n defined separator between adjacent items.

This function is

The effect of calling the single-argument version of this function is\n the same as calling the two-argument version with `$arg2`

set to a\n zero-length string.

The function returns an `xs:string`

created by concatenating the items in the\n sequence `$arg1`

, in order, using the value of `$arg2`

as a\n separator between adjacent items. If the value of `$arg2`

is the zero-length\n string, then the members of `$arg1`

are concatenated without a separator.

If the value of `$arg1`

is the empty sequence, the function returns the\n zero-length string.

Returns a string created by concatenating the items in a sequence, with a\n defined separator between adjacent items.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "string-join", "qname" : "fn:string-join", "signature" : "($arg1 as xs:string*, $arg2 as xs:string) as xs:string external", "description" : "Returns a string created by concatenating the items in a sequence, with a\n defined separator between adjacent items.

This function is

The effect of calling the single-argument version of this function is\n the same as calling the two-argument version with `$arg2`

set to a\n zero-length string.

The function returns an `xs:string`

created by concatenating the items in the\n sequence `$arg1`

, in order, using the value of `$arg2`

as a\n separator between adjacent items. If the value of `$arg2`

is the zero-length\n string, then the members of `$arg1`

are concatenated without a separator.

If the value of `$arg1`

is the empty sequence, the function returns the\n zero-length string.

Returns the number of

The zero-argument form of this function is

The function returns an `xs:integer`

equal to the length in `$arg`

.

Calling the zero-argument version of the function is equivalent to calling\n `fn:string-length(fn:string(.))`

.

If the value of `$arg`

is the empty sequence, the function returns the\n `xs:integer`

value zero (0).

If `$arg`

is not specified and the context item is

Returns the number of characters in a\n string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:integer", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "string-length", "qname" : "fn:string-length", "signature" : "($arg as xs:string?) as xs:integer external", "description" : "Returns the number of

The zero-argument form of this function is

The function returns an `xs:integer`

equal to the length in `$arg`

.

Calling the zero-argument version of the function is equivalent to calling\n `fn:string-length(fn:string(.))`

.

If the value of `$arg`

is the empty sequence, the function returns the\n `xs:integer`

value zero (0).

If `$arg`

is not specified and the context item is

Returns the number of characters in a\n string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "string-to-codepoints", "qname" : "fn:string-to-codepoints", "signature" : "($arg as xs:string?) as xs:integer* external", "description" : "Returns the sequence of `xs:string`

value.

This function is

The function returns a sequence of integers, each integer being the Unicode `$arg`

.

If `$arg`

is a zero-length string or the empty sequence, the function returns\n the empty sequence.

The expression `fn:string-to-codepoints(\"Thérèse\")`

returns `(84, 104, 233, 114, 232, 115, 101)`

.

Returns the sequence of codepoints that\n constitute an xs:string value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer*", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "string-to-codepoints", "qname" : "fn:string-to-codepoints", "signature" : "($arg as xs:string?) as xs:integer* external", "description" : "Returns the sequence of `xs:string`

value.

This function is

The function returns a sequence of integers, each integer being the Unicode `$arg`

.

If `$arg`

is a zero-length string or the empty sequence, the function returns\n the empty sequence.

The expression `fn:string-to-codepoints(\"Thérèse\")`

returns `(84, 104, 233, 114, 232, 115, 101)`

.

Returns the sequence of codepoints that\n constitute an xs:string value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer*", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "string", "qname" : "fn:string", "signature" : "() as xs:string external", "description" : "Returns the value of `$arg`

represented as an\n `xs:string`

.

The zero-argument form of this function is

In the zero-argument version of the function, `$arg`

defaults to the context\n item. That is, calling `fn:string()`

is equivalent to calling\n `fn:string(.)`

.

If `$arg`

is the empty sequence, the function returns the zero-length\n string.

If `$arg`

is a node, the function returns the string-value of the node, as\n obtained using the `dm:string-value`

accessor defined in

If `$arg`

is an atomic value, the function returns the result of the\n expression `$arg cast as xs:string`

(see

A

A `$arg`

is a function item.

Returns the value of $arg represented as an\n xs:string .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "string", "qname" : "fn:string", "signature" : "($arg as item()?) as xs:string external", "description" : "Returns the value of `$arg`

represented as an\n `xs:string`

.

The zero-argument form of this function is

In the zero-argument version of the function, `$arg`

defaults to the context\n item. That is, calling `fn:string()`

is equivalent to calling\n `fn:string(.)`

.

If `$arg`

is the empty sequence, the function returns the zero-length\n string.

If `$arg`

is a node, the function returns the string-value of the node, as\n obtained using the `dm:string-value`

accessor defined in

If `$arg`

is an atomic value, the function returns the result of the\n expression `$arg cast as xs:string`

(see

A

A `$arg`

is a function item.

Returns the value of $arg represented as an\n xs:string .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "subsequence", "qname" : "fn:subsequence", "signature" : "($sourceSeq as item()*, $startingLoc as xs:double) as item()* external", "description" : "Returns the contiguous sequence of items in the value of\n `$sourceSeq`

beginning at the position indicated by the value of\n `$startingLoc`

and continuing for the number of items indicated by the\n value of `$length`

.

This function is

In the two-argument case, returns:

In the three-argument case, returns:

For detailed type semantics, see [Formal Semantics].

The first item of a sequence is located at position 1, not position 0.

If `$sourceSeq`

is the empty sequence, the empty sequence is returned.

If `$startingLoc`

is zero or negative, the subsequence includes items from\n the beginning of the `$sourceSeq`

.

If `$length`

is not specified, the subsequence includes items to the end of\n `$sourceSeq`

.

If `$length`

is greater than the number of items in the value of\n `$sourceSeq`

following `$startingLoc`

, the subsequence includes\n items to the end of `$sourceSeq`

.

As an exception to the previous two notes, if\n `$startingLoc`

is `-INF`

and `$length`

is\n `+INF`

, then `fn:round($startingLoc) + fn:round($length)`

is\n `NaN`

; since `position() lt NaN`

is always false, the result is\n an empty sequence.

The reason the function accepts arguments of type `xs:double`

is that many\n computations on untyped data return an `xs:double`

result; and the reason for\n the rounding rules is to compensate for any imprecision in these floating-point\n computations.

Returns the contiguous sequence of items in the value of\n $sourceSeq beginning at the position indicated by the value of\n $startingLoc and continuing for the number of items indicated by the\n value of $length .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "sourceSeq", "type" : "item()", "occurence" : null, "description" : "" }, { "name" : "startingLoc", "type" : "xs:double", "occurence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "arity" : 3, "name" : "subsequence", "qname" : "fn:subsequence", "signature" : "($sourceSeq as item()*, $startingLoc as xs:double, $length as xs:double) as item()* external", "description" : "Returns the contiguous sequence of items in the value of\n `$sourceSeq`

beginning at the position indicated by the value of\n `$startingLoc`

and continuing for the number of items indicated by the\n value of `$length`

.

This function is

In the two-argument case, returns:

In the three-argument case, returns:

For detailed type semantics, see [Formal Semantics].

The first item of a sequence is located at position 1, not position 0.

If `$sourceSeq`

is the empty sequence, the empty sequence is returned.

If `$startingLoc`

is zero or negative, the subsequence includes items from\n the beginning of the `$sourceSeq`

.

If `$length`

is not specified, the subsequence includes items to the end of\n `$sourceSeq`

.

If `$length`

is greater than the number of items in the value of\n `$sourceSeq`

following `$startingLoc`

, the subsequence includes\n items to the end of `$sourceSeq`

.

As an exception to the previous two notes, if\n `$startingLoc`

is `-INF`

and `$length`

is\n `+INF`

, then `fn:round($startingLoc) + fn:round($length)`

is\n `NaN`

; since `position() lt NaN`

is always false, the result is\n an empty sequence.

The reason the function accepts arguments of type `xs:double`

is that many\n computations on untyped data return an `xs:double`

result; and the reason for\n the rounding rules is to compensate for any imprecision in these floating-point\n computations.

Returns the part of `$arg1`

that follows the first occurrence of\n `$arg2`

, taking collations into account.

`$arg1`

or `$arg2`

is the empty sequence, or\n contains only ignorable collation units, it is interpreted as the zero-length\n string.

If the value of `$arg2`

is the zero-length string, then the function returns\n the value of `$arg1`

.

If the value of `$arg1`

does not contain a string that is equal to the value\n of `$arg2`

, then the function returns the zero-length string.

The collation used by this function is determined according to the rules in

The function returns the substring of the value of `$arg1`

that follows in\n the value of `$arg1`

the first occurrence of a sequence of collation units\n that provides a `$arg2`

\n according to the collation that is used.

A

Returns the part of $arg1 that follows the first occurrence of\n $arg2 , taking collations into account.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "arg2", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 3, "name" : "substring-after", "qname" : "fn:substring-after", "signature" : "($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:string external", "description" : "Returns the part of `$arg1`

that follows the first occurrence of\n `$arg2`

, taking collations into account.

`$arg1`

or `$arg2`

is the empty sequence, or\n contains only ignorable collation units, it is interpreted as the zero-length\n string.

If the value of `$arg2`

is the zero-length string, then the function returns\n the value of `$arg1`

.

If the value of `$arg1`

does not contain a string that is equal to the value\n of `$arg2`

, then the function returns the zero-length string.

The collation used by this function is determined according to the rules in

The function returns the substring of the value of `$arg1`

that follows in\n the value of `$arg1`

the first occurrence of a sequence of collation units\n that provides a `$arg2`

\n according to the collation that is used.

A

Returns the part of `$arg1`

that precedes the first occurrence of\n `$arg2`

, taking collations into account.

`$arg1`

or `$arg2`

is the empty sequence, or\n contains only ignorable collation units, it is interpreted as the zero-length\n string.

If the value of `$arg2`

is the zero-length string, then the function returns\n the zero-length string.

If the value of `$arg1`

does not contain a string that is equal to the value\n of `$arg2`

, then the function returns the zero-length string.

The collation used by this function is determined according to the rules in

The function returns the substring of the value of `$arg1`

that precedes in\n the value of `$arg1`

the first occurrence of a sequence of collation units\n that provides a `$arg2`

\n according to the collation that is used.

A

Returns the part of $arg1 that precedes the first occurrence of\n $arg2 , taking collations into account.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "arg2", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 3, "name" : "substring-before", "qname" : "fn:substring-before", "signature" : "($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:string external", "description" : "Returns the part of `$arg1`

that precedes the first occurrence of\n `$arg2`

, taking collations into account.

`$arg1`

or `$arg2`

is the empty sequence, or\n contains only ignorable collation units, it is interpreted as the zero-length\n string.

If the value of `$arg2`

is the zero-length string, then the function returns\n the zero-length string.

`$arg1`

does not contain a string that is equal to the value\n of `$arg2`

, then the function returns the zero-length string.

The collation used by this function is determined according to the rules in

The function returns the substring of the value of `$arg1`

that precedes in\n the value of `$arg1`

the first occurrence of a sequence of collation units\n that provides a `$arg2`

\n according to the collation that is used.

A

Returns the portion of the value of `$sourceString`

beginning at the\n position indicated by the value of `$start`

and continuing for the number of\n `$length`

.

This function is

If the value of `$sourceString`

is the empty sequence, the function returns\n the zero-length string.

Otherwise, the function returns a string comprising those `$sourceString`

whose index position (counting\n from one) is greater than or equal to the value of `$start`

(rounded to an\n integer), and (if `$length`

is specified) less than the sum of\n `$start`

and `$length`

(both rounded to integers).

The characters returned do not extend beyond `$sourceString`

. If\n `$start`

is zero or negative, only those characters in positions greater\n than zero are returned.

More specifically, the three argument version of the function returns the characters in\n `$sourceString`

whose position `$p`

satisfies:

\n `fn:round($start) <= $p < fn:round($start) + fn:round($length)`

\n

The two argument version of the function assumes that `$length`

is infinite\n and thus returns the `$sourceString`

whose position `$p`

satisfies:

\n `fn:round($start) <= $p`

\n

In the above computations, the rules for `op:numeric-less-than`

and\n `op:numeric-greater-than`

apply.

The first character of a string is located at position 1, not position 0.

Returns the portion of the value of $sourceString beginning at the\n position indicated by the value of $start and continuing for the number of\n characters indicated by the value of\n $length .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "sourceString", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "start", "type" : "xs:double", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 3, "name" : "substring", "qname" : "fn:substring", "signature" : "($sourceString as xs:string?, $start as xs:double, $length as xs:double) as xs:string external", "description" : "Returns the portion of the value of `$sourceString`

beginning at the\n position indicated by the value of `$start`

and continuing for the number of\n `$length`

.

This function is

If the value of `$sourceString`

is the empty sequence, the function returns\n the zero-length string.

Otherwise, the function returns a string comprising those `$sourceString`

whose index position (counting\n from one) is greater than or equal to the value of `$start`

(rounded to an\n integer), and (if `$length`

is specified) less than the sum of\n `$start`

and `$length`

(both rounded to integers).

The characters returned do not extend beyond `$sourceString`

. If\n `$start`

is zero or negative, only those characters in positions greater\n than zero are returned.

More specifically, the three argument version of the function returns the characters in\n `$sourceString`

whose position `$p`

satisfies:

\n `fn:round($start) <= $p < fn:round($start) + fn:round($length)`

\n

The two argument version of the function assumes that `$length`

is infinite\n and thus returns the `$sourceString`

whose position `$p`

satisfies:

\n `fn:round($start) <= $p`

\n

In the above computations, the rules for `op:numeric-less-than`

and\n `op:numeric-greater-than`

apply.

The first character of a string is located at position 1, not position 0.

Returns a value obtained by adding together the values in\n `$arg`

.

This function is

Any values of type `xs:untypedAtomic`

in `$arg`

are cast to\n `xs:double`

. The items in the resulting sequence may be reordered in an\n arbitrary order. The resulting sequence is referred to below as the converted\n sequence.

If the converted sequence is empty, then the single-argument form of the function\n returns the `xs:integer`

value `0`

; the two-argument form returns\n the value of the argument `$zero`

.

If the converted sequence contains the value `NaN`

, `NaN`

is\n returned.

All items in `$arg`

must be numeric or derived from a single base type. In\n addition, the type must support addition. Duration values must either all be\n `xs:yearMonthDuration`

values or must all be\n `xs:dayTimeDuration`

values. For numeric values, the numeric promotion\n rules defined in `xs:double`

will be an\n `xs:double`

.

The result of the function, using the second signature, is the result of the\n expression:

where `$c`

is the converted sequence.

The result of the function, using the first signature, is the result of the expression:\n `fn:sum($arg, 0)`

.

For detailed type semantics, see [Formal Semantics].

Returns a value obtained by adding together the values in\n $arg .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "sum", "qname" : "fn:sum", "signature" : "($arg as xs:anyAtomicType*, $zero as xs:anyAtomicType?) as xs:anyAtomicType? external", "description" : "Returns a value obtained by adding together the values in\n `$arg`

.

This function is

Any values of type `xs:untypedAtomic`

in `$arg`

are cast to\n `xs:double`

. The items in the resulting sequence may be reordered in an\n arbitrary order. The resulting sequence is referred to below as the converted\n sequence.

If the converted sequence is empty, then the single-argument form of the function\n returns the `xs:integer`

value `0`

; the two-argument form returns\n the value of the argument `$zero`

.

If the converted sequence contains the value `NaN`

, `NaN`

is\n returned.

All items in `$arg`

must be numeric or derived from a single base type. In\n addition, the type must support addition. Duration values must either all be\n `xs:yearMonthDuration`

values or must all be\n `xs:dayTimeDuration`

values. For numeric values, the numeric promotion\n rules defined in `xs:double`

will be an\n `xs:double`

.

The result of the function, using the second signature, is the result of the\n expression:

where `$c`

is the converted sequence.

The result of the function, using the first signature, is the result of the expression:\n `fn:sum($arg, 0)`

.

For detailed type semantics, see [Formal Semantics].

Returns a value obtained by adding together the values in\n $arg .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "" }, { "name" : "zero", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyAtomicType?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "tail", "qname" : "fn:tail", "signature" : "($arg as item()*) as item()* external", "description" : "Returns all but the first item in a sequence.

This function is

The function returns the value of the expression `subsequence($arg, 2)`

If `$arg`

is the empty sequence, or a sequence containing a single item, then\n the empty sequence is returned.

Returns all but the first item in a sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "timezone-from-date", "qname" : "fn:timezone-from-date", "signature" : "($arg as xs:date?) as xs:dayTimeDuration? external", "description" : "Returns the timezone component of an `xs:date`

.

This function is

If `$arg`

is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns the timezone component of `$arg`

, if any. If\n `$arg`

has a timezone component, then the result is an\n `xs:dayTimeDuration`

that indicates deviation from UTC; its value may\n range from +14:00 to -14:00 hours, both inclusive. If `$arg`

has no timezone\n component, the result is the empty sequence.

The expression `fn:timezone-from-date(xs:date(\"1999-05-31-05:00\"))`

returns `xs:dayTimeDuration(\"-PT5H\")`

.

The expression `fn:timezone-from-date(xs:date(\"2000-06-12Z\"))`

returns `xs:dayTimeDuration(\"PT0S\")`

.

Returns the timezone component of an xs:date .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:date", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:dayTimeDuration?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "timezone-from-dateTime", "qname" : "fn:timezone-from-dateTime", "signature" : "($arg as xs:dateTime?) as xs:dayTimeDuration? external", "description" : "Returns the timezone component of an `xs:dateTime`

.

This function is

If `$arg`

is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns the timezone component of `$arg`

, if any. If\n `$arg`

has a timezone component, then the result is an\n `xs:dayTimeDuration`

that indicates deviation from UTC; its value may\n range from +14:00 to -14:00 hours, both inclusive. If `$arg`

has no timezone\n component, the result is the empty sequence.

The expression `fn:timezone-from-dateTime(xs:dateTime(\"1999-05-31T13:20:00-05:00\"))`

returns `xs:dayTimeDuration(\"-PT5H\")`

.

The expression `fn:timezone-from-dateTime(xs:dateTime(\"2000-06-12T13:20:00Z\"))`

returns `xs:dayTimeDuration(\"PT0S\")`

.

The expression `fn:timezone-from-dateTime(xs:dateTime(\"2004-08-27T00:00:00\"))`

returns `()`

.

Returns the timezone component of an xs:dateTime .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:dateTime", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:dayTimeDuration?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "timezone-from-time", "qname" : "fn:timezone-from-time", "signature" : "($arg as xs:time?) as xs:dayTimeDuration? external", "description" : "Returns the timezone component of an `xs:time`

.

This function is

If `$arg`

is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns the timezone component of `$arg`

, if any. If\n `$arg`

has a timezone component, then the result is an\n `xs:dayTimeDuration`

that indicates deviation from UTC; its value may\n range from +14:00 to -14:00 hours, both inclusive. If `$arg`

has no timezone\n component, the result is the empty sequence.

The expression `fn:timezone-from-time(xs:time(\"13:20:00-05:00\"))`

returns `xs:dayTimeDuration(\"-PT5H\")`

.

The expression `fn:timezone-from-time(xs:time(\"13:20:00\"))`

returns `()`

.

Returns the timezone component of an xs:time .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:time", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:dayTimeDuration?", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "tokenize", "qname" : "fn:tokenize", "signature" : "($input as xs:string?, $pattern as xs:string) as xs:string* external", "description" : "Returns a sequence of strings constructed by splitting the input wherever a\n separator is found; the separator is any substring that matches a given regular\n expression.

This function is

`$flags`

) is the same as the effect of calling the second version with the\n `$flags`

argument set to a zero-length string. Flags are defined in\n

The `$flags`

argument is interpreted in the same way as for the\n `fn:matches`

function.

If `$input`

is the empty sequence, or if `$input`

is the\n zero-length string, the function returns the empty sequence.

The function returns a sequence of strings formed by breaking the `$input`

\n string into a sequence of strings, treating any substring that matches\n `$pattern`

as a separator. The separators themselves are not returned.

If a separator occurs at the start of the `$input`

string, the result\n sequence will start with a zero-length string. Zero-length strings will also occur in\n the result sequence if a separator occurs at the end of the `$input`

string,\n or if two adjacent substrings match the supplied `$pattern`

.

If two alternatives within the supplied `$pattern`

both match at the same\n position in the `$input`

string, then the match that is chosen is the first.\n For example:

`$pattern`

is invalid according to the rules described in section

`$flags`

is invalid according to the rules described in section

A `$pattern`

matches a zero-length string, that is, if `fn:matches(\"\",\n $pattern, $flags)`

returns `true`

.

Returns a sequence of strings constructed by splitting the input wherever a\n separator is found; the separator is any substring that matches a given regular\n expression.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "input", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "pattern", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] }, { "arity" : 3, "name" : "tokenize", "qname" : "fn:tokenize", "signature" : "($input as xs:string?, $pattern as xs:string, $flags as xs:string) as xs:string* external", "description" : "Returns a sequence of strings constructed by splitting the input wherever a\n separator is found; the separator is any substring that matches a given regular\n expression.

This function is

`$flags`

) is the same as the effect of calling the second version with the\n `$flags`

argument set to a zero-length string. Flags are defined in\n

The `$flags`

argument is interpreted in the same way as for the\n `fn:matches`

function.

If `$input`

is the empty sequence, or if `$input`

is the\n zero-length string, the function returns the empty sequence.

The function returns a sequence of strings formed by breaking the `$input`

\n string into a sequence of strings, treating any substring that matches\n `$pattern`

as a separator. The separators themselves are not returned.

If a separator occurs at the start of the `$input`

string, the result\n sequence will start with a zero-length string. Zero-length strings will also occur in\n the result sequence if a separator occurs at the end of the `$input`

string,\n or if two adjacent substrings match the supplied `$pattern`

.

If two alternatives within the supplied `$pattern`

both match at the same\n position in the `$input`

string, then the match that is chosen is the first.\n For example:

`$pattern`

is invalid according to the rules described in section

`$flags`

is invalid according to the rules described in section

`$pattern`

matches a zero-length string, that is, if `fn:matches(\"\",\n $pattern, $flags)`

returns `true`

.

Provides an execution trace intended to be used in debugging queries.

This function is

The function returns the value of `$value`

, unchanged.

In addition, the values of `$value`

, converted to an `xs:string`

,\n and `$label`

\n `fn:trace`

function is

Consider a situation in which a user wants to investigate the actual value passed to\n a function. Assume that in a particular execution, `$v`

is an\n `xs:decimal`

with value `124.84`

. Writing `fn:trace($v,\n 'the value of $v is:')`

will put the strings `\"124.84\"`

and\n `\"the value of $v is:\"`

in the trace data set in implementation\n dependent order.

Provides an execution trace intended to be used in debugging queries.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "item()", "occurence" : null, "description" : "" }, { "name" : "label", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "arity" : 3, "name" : "translate", "qname" : "fn:translate", "signature" : "($arg as xs:string?, $mapString as xs:string, $transString as xs:string) as xs:string external", "description" : "Returns the value of `$arg`

modified by replacing or removing\n individual characters.

This function is

If the value of `$arg`

is the empty sequence, the function returns the\n zero-length string.

Otherwise, the function returns a result string constructed by processing each `$arg`

, in order,\n according to the following rules:

If the character does not appear in the value of `$mapString`

then it\n is added to the result string unchanged.

If the character first appears in the value of `$mapString`

at some\n position `$transString`

is\n `$transString`

is added to the result string.

If the character first appears in the value of `$mapString`

at some\n position `$transString`

is less than\n

If `$mapString`

is the zero-length string then the function returns\n `$arg`

unchanged.

If a character occurs more than once in `$mapString`

, then the first\n occurrence determines the action taken.

If `$transString`

is longer than `$mapString`

, the excess\n characters are ignored.

Returns the value of $arg modified by replacing or removing\n individual characters.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "mapString", "type" : "xs:string", "occurence" : null, "description" : "" }, { "name" : "transString", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "true", "qname" : "fn:true", "signature" : "() as xs:boolean external", "description" : "Returns the `xs:boolean`

value `true`

.

This function is

The result is equivalent to `xs:boolean(\"1\")`

.

The expression `fn:true()`

returns `xs:boolean(1)`

.

Returns the xs:boolean value true .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "unordered", "qname" : "fn:unordered", "signature" : "($sourceSeq as item()*) as item()* external", "description" : "Returns the items of `$sourceSeq`

in an

This function is

The function returns the items of `$sourceSeq`

in an

Query optimizers may be able to do a better job if the order of the output sequence is\n not specified. For example, when retrieving prices from a purchase order, if an index\n exists on prices, it may be more efficient to return the prices in index order rather\n than in document order.

Returns the items of $sourceSeq in an order.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "sourceSeq", "type" : "item()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "unparsed-text-available", "qname" : "fn:unparsed-text-available", "signature" : "($href as xs:string?) as xs:boolean external", "description" : "Because errors in evaluating the

This function is

The

If the first argument is an empty sequence, the function returns false.

In other cases, the function returns true if a call on\n

The functions `fn:doc`

and `fn:doc-available`

. This means that unless the\n user has explicitly stated a requirement for a reduced level of determinism, either of\n these functions if called twice with the same arguments during the course of a\n transformation

This requires that the `if (unparsed-text-available(A)) then unparsed-text(A) else ...`

to\n generate a single call internally.

Because errors in evaluating the fn:unparsed-text function are\n non-recoverable, these two functions are provided to allow an application to determine\n whether a call with particular arguments would succeed.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "unparsed-text-available", "qname" : "fn:unparsed-text-available", "signature" : "($href as xs:string?) as xs:boolean external", "description" : "Because errors in evaluating the

This function is

The

If the first argument is an empty sequence, the function returns false.

In other cases, the function returns true if a call on\n

The functions `fn:doc`

and `fn:doc-available`

. This means that unless the\n user has explicitly stated a requirement for a reduced level of determinism, either of\n these functions if called twice with the same arguments during the course of a\n transformation

This requires that the `if (unparsed-text-available(A)) then unparsed-text(A) else ...`

to\n generate a single call internally.

The

If the first argument is an empty sequence, the function returns false.

In other cases, the function returns true if a call on\n

The functions `fn:doc`

and `fn:doc-available`

. This means that unless the\n user has explicitly stated a requirement for a reduced level of determinism, either of\n these functions if called twice with the same arguments during the course of a\n transformation

This requires that the `if (unparsed-text-available(A)) then unparsed-text(A) else ...`

to\n generate a single call internally.

`fn:doc`

and `fn:doc-available`

. This means that unless the\n user has explicitly stated a requirement for a reduced level of determinism, either of\n these functions if called twice with the same arguments during the course of a\n transformation

`if (unparsed-text-available(A)) then unparsed-text(A) else ...`

to\n generate a single call internally.

The `fn:unparsed-text-lines`

function reads an external resource (for\n example, a file) and returns its contents as a sequence of strings, one for each line of\n text in the

The `unparsed-text-lines`

function reads an external resource (for example, a\n file) and returns its

The result of the single-argument function is the same as the result of the expression\n `fn:tokenize(fn:unparsed-text($href), '\\r\\n|\\r|\\n')[not(position()=last() and\n .='')]`

. The result of the two-argument function is the same as the result of\n the expression `fn:tokenize(fn:unparsed-text($href, $encoding),\n '\\r\\n|\\r|\\n'))[not(position()=last() and .='')]`

.

The result is a thus a sequence of strings containing the text of the resource retrieved\n using the URI, each string representing one line of text. Lines are separated by one of\n the sequences x0A, x0D, or x0Dx0A. The characters representing the newline are not\n included in the returned strings. If there are two adjacent newline sequences, a\n zero-length string will be returned to represent the empty line; but if the external\n resource ends with a newline sequence, no zero-length string will be returned as the\n last item in the result.

Error conditions are the same as for the `fn:unparsed-text`

function.

The fn:unparsed-text-lines function reads an external resource (for\n example, a file) and returns its contents as a sequence of strings, one for each line of\n text in the string representation of the resource.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] }, { "arity" : 2, "name" : "unparsed-text-lines", "qname" : "fn:unparsed-text-lines", "signature" : "($href as xs:string?, $encoding as xs:string) as xs:string* external", "description" : "The `fn:unparsed-text-lines`

function reads an external resource (for\n example, a file) and returns its contents as a sequence of strings, one for each line of\n text in the

The `unparsed-text-lines`

function reads an external resource (for example, a\n file) and returns its

The result of the single-argument function is the same as the result of the expression\n `fn:tokenize(fn:unparsed-text($href), '\\r\\n|\\r|\\n')[not(position()=last() and\n .='')]`

. The result of the two-argument function is the same as the result of\n the expression `fn:tokenize(fn:unparsed-text($href, $encoding),\n '\\r\\n|\\r|\\n'))[not(position()=last() and .='')]`

.

The result is a thus a sequence of strings containing the text of the resource retrieved\n using the URI, each string representing one line of text. Lines are separated by one of\n the sequences x0A, x0D, or x0Dx0A. The characters representing the newline are not\n included in the returned strings. If there are two adjacent newline sequences, a\n zero-length string will be returned to represent the empty line; but if the external\n resource ends with a newline sequence, no zero-length string will be returned as the\n last item in the result.

Error conditions are the same as for the `fn:unparsed-text`

function.

`fn:unparsed-text-lines`

function reads an external resource (for\n example, a file) and returns its contents as a sequence of strings, one for each line of\n text in the

The `unparsed-text-lines`

function reads an external resource (for example, a\n file) and returns its

The result of the single-argument function is the same as the result of the expression\n `fn:tokenize(fn:unparsed-text($href), '\\r\\n|\\r|\\n')[not(position()=last() and\n .='')]`

. The result of the two-argument function is the same as the result of\n the expression `fn:tokenize(fn:unparsed-text($href, $encoding),\n '\\r\\n|\\r|\\n'))[not(position()=last() and .='')]`

.

The result is a thus a sequence of strings containing the text of the resource retrieved\n using the URI, each string representing one line of text. Lines are separated by one of\n the sequences x0A, x0D, or x0Dx0A. The characters representing the newline are not\n included in the returned strings. If there are two adjacent newline sequences, a\n zero-length string will be returned to represent the empty line; but if the external\n resource ends with a newline sequence, no zero-length string will be returned as the\n last item in the result.

Error conditions are the same as for the `fn:unparsed-text`

function.

The `fn:unparsed-text`

function reads an external resource (for example, a\n file) and returns

The `$href`

argument

The mapping of URIs to the string representation of a resource is the mapping defined\n in the

If the value of the `$href`

argument is an empty sequence, the function\n returns an empty sequence.

The `$encoding`

argument, if present, is the name of an encoding. The values\n for this attribute follow the same rules as for the `encoding`

attribute in\n an XML declaration. The only values which every `utf-8`

and `utf-16`

.

The encoding of the external resource is determined as follows:

external encoding information is used if available, otherwise

if the media type of the resource is `text/xml`

or\n `application/xml`

(see `text/*+xml`

or `application/*+xml`

(see\n

the value of the `$encoding`

argument is used if present, otherwise

the processor

UTF-8 is assumed.

The result of the function is a string containing the\n

A `$href`

\n contains a fragment identifier, or if it cannot be used to retrieve the\n

A `$encoding`

argument is not a valid encoding name,

A `$encoding`

is absent and the

The fn:unparsed-text function reads an external resource (for example, a\n file) and returns a string representation of the resource .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "unparsed-text", "qname" : "fn:unparsed-text", "signature" : "($href as xs:string?) as xs:string? external", "description" : "The `fn:unparsed-text`

function reads an external resource (for example, a\n file) and returns

The `$href`

argument

The mapping of URIs to the string representation of a resource is the mapping defined\n in the

If the value of the `$href`

argument is an empty sequence, the function\n returns an empty sequence.

The `$encoding`

argument, if present, is the name of an encoding. The values\n for this attribute follow the same rules as for the `encoding`

attribute in\n an XML declaration. The only values which every `utf-8`

and `utf-16`

.

The encoding of the external resource is determined as follows:

external encoding information is used if available, otherwise

if the media type of the resource is `text/xml`

or\n `application/xml`

(see `text/*+xml`

or `application/*+xml`

(see\n

the value of the `$encoding`

argument is used if present, otherwise

the processor

UTF-8 is assumed.

The result of the function is a string containing the\n

A `$href`

\n contains a fragment identifier, or if it cannot be used to retrieve the\n

A `$encoding`

argument is not a valid encoding name,

A `$encoding`

is absent and the

`fn:unparsed-text`

function reads an external resource (for example, a\n file) and returns

The `$href`

argument

The mapping of URIs to the string representation of a resource is the mapping defined\n in the

If the value of the `$href`

argument is an empty sequence, the function\n returns an empty sequence.

The `$encoding`

argument, if present, is the name of an encoding. The values\n for this attribute follow the same rules as for the `encoding`

attribute in\n an XML declaration. The only values which every `utf-8`

and `utf-16`

.

The encoding of the external resource is determined as follows:

external encoding information is used if available, otherwise

if the media type of the resource is `text/xml`

or\n `application/xml`

(see `text/*+xml`

or `application/*+xml`

(see\n

the value of the `$encoding`

argument is used if present, otherwise

the processor

UTF-8 is assumed.

The result of the function is a string containing the\n

A `$href`

\n contains a fragment identifier, or if it cannot be used to retrieve the\n

A `$encoding`

argument is not a valid encoding name,

A `$encoding`

is absent and the

`fn:unparsed-text`

function reads an external resource (for example, a\n file) and returns

`$href`

argument

If the value of the `$href`

argument is an empty sequence, the function\n returns an empty sequence.

`$encoding`

argument, if present, is the name of an encoding. The values\n for this attribute follow the same rules as for the `encoding`

attribute in\n an XML declaration. The only values which every `utf-8`

and `utf-16`

.

The encoding of the external resource is determined as follows:

external encoding information is used if available, otherwise

`text/xml`

or\n `application/xml`

(see `text/*+xml`

or `application/*+xml`

(see\n

the value of the `$encoding`

argument is used if present, otherwise

UTF-8 is assumed.

`$href`

\n contains a fragment identifier, or if it cannot be used to retrieve the\n

`$encoding`

argument is not a valid encoding name,

`$encoding`

is absent and the

Converts a string to upper case.

This function is

If the value of `$arg`

is the empty sequence, the zero-length string is\n returned.

Otherwise, the function returns the value of `$arg`

after translating every\n

Case mappings may change the length of a string. In general, the\n `fn:upper-case`

and `fn:lower-case`

functions are not inverses\n of each other: `fn:lower-case(fn:upper-case($arg))`

is not guaranteed to\n return `$arg`

, nor is `fn:upper-case(fn:lower-case($arg))`

. The\n Latin small letter dotless i (as used in Turkish) is perhaps the most prominent\n lower-case letter which will not round-trip. The Latin capital letter i with dot above\n is the most prominent upper-case letter which will not round trip; there are others,\n such as Latin capital letter Sharp S (#1E9E) which is introduced in Unicode 5.1.

These functions may not always be linguistically appropriate (e.g. Turkish i without\n dot) or appropriate for the application (e.g. titlecase). In cases such as Turkish, a\n simple translation should be used first.

Because the function is not sensitive to locale, results will not always match user\n expectations. In Quebec, for example, the standard uppercase equivalent of \"è\" is \"È\",\n while in metropolitan France it is more commonly \"E\"; only one of these is supported by\n the functions as defined.

Many characters of class Ll lack uppercase equivalents in the Unicode case mapping\n tables; many characters of class Lu lack lowercase equivalents.

Converts a string to upper case.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "uri-collection", "qname" : "fn:uri-collection", "signature" : "() as xs:anyURI* external", "description" : "Returns a sequence of `xs:anyURI`

values representing the URIs in a resource collection.

This function is

The zero-argument form of the function returns the URIs in the

If the value of `$arg`

is a relative `xs:anyURI`

, it is resolved\n against the value of the base-URI property from the static context.

If `$arg`

is the empty sequence, the function behaves as if it had been\n called without an argument. See above.

The single-argument form of the function returns the sequence of URIs corresponding to the\n supplied URI in the

A

A

A `$arg`

is not a\n valid `xs:anyURI`

.

Returns a sequence of xs:anyURI values representing the URIs in a resource collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:anyURI*", "description" : "" }, "errors" : [ ] }, { "arity" : 0, "name" : "uri-collection", "qname" : "fn:uri-collection", "signature" : "() as xs:anyURI* external", "description" : "Returns a sequence of `xs:anyURI`

values representing the URIs in a resource collection.

This function is

The zero-argument form of the function returns the URIs in the

`$arg`

is a relative `xs:anyURI`

, it is resolved\n against the value of the base-URI property from the static context.

`$arg`

is the empty sequence, the function behaves as if it had been\n called without an argument. See above.

The single-argument form of the function returns the sequence of URIs corresponding to the\n supplied URI in the

A

A

A `$arg`

is not a\n valid `xs:anyURI`

.

Returns a sequence of xs:anyURI values representing the URIs in a resource collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:anyURI*", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "uri-collection", "qname" : "fn:uri-collection", "signature" : "($arg as xs:string?) as xs:anyURI* external", "description" : "Returns a sequence of `xs:anyURI`

values representing the URIs in a resource collection.

This function is

The zero-argument form of the function returns the URIs in the

`$arg`

is a relative `xs:anyURI`

, it is resolved\n against the value of the base-URI property from the static context.

`$arg`

is the empty sequence, the function behaves as if it had been\n called without an argument. See above.

The single-argument form of the function returns the sequence of URIs corresponding to the\n supplied URI in the

A

A

A `$arg`

is not a\n valid `xs:anyURI`

.

Returns a sequence of xs:anyURI values representing the URIs in a resource collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyURI*", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "uri-collection", "qname" : "fn:uri-collection", "signature" : "($arg as xs:string?) as xs:anyURI* external", "description" : "Returns a sequence of `xs:anyURI`

values representing the URIs in a resource collection.

`$arg`

is a relative `xs:anyURI`

, it is resolved\n against the value of the base-URI property from the static context.

`$arg`

is the empty sequence, the function behaves as if it had been\n called without an argument. See above.

A `$arg`

is not a\n valid `xs:anyURI`

.

Returns a sequence of xs:anyURI values representing the URIs in a resource collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyURI*", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "year-from-date", "qname" : "fn:year-from-date", "signature" : "($arg as xs:date?) as xs:integer? external", "description" : "Returns the year component of an `xs:date`

.

This function is

If `$arg`

is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an `xs:integer`

representing the year in the\n local value of `$arg`

. The value may be negative.

The expression `fn:year-from-date(xs:date(\"1999-05-31\"))`

returns `1999`

.

The expression `fn:year-from-date(xs:date(\"2000-01-01+05:00\"))`

returns `2000`

.

Returns the year component of an xs:date .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:date", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "years-from-duration", "qname" : "fn:years-from-duration", "signature" : "($arg as xs:duration?) as xs:integer? external", "description" : "Returns the number of years in a duration.

This function is

If `$arg`

is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an `xs:integer`

representing the years\n component in the value of `$arg`

. The result is obtained by casting\n `$arg`

to an `xs:yearMonthDuration`

(see

If `$arg`

is a negative duration then the result will be negative..

If `$arg`

is an `xs:dayTimeDuration`

the function returns 0.

The expression `fn:years-from-duration(xs:yearMonthDuration(\"P20Y15M\"))`

returns `21`

.

The expression `fn:years-from-duration(xs:yearMonthDuration(\"-P15M\"))`

returns `-1`

.

The expression `fn:years-from-duration(xs:dayTimeDuration(\"-P2DT15H\"))`

returns `0`

.

Returns the number of years in a duration.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:duration", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "arity" : 1, "name" : "zero-or-one", "qname" : "fn:zero-or-one", "signature" : "($arg as item()*) as item()? external", "description" : "Returns `$arg`

if it contains zero or one items. Otherwise, raises\n an error.

This function is

Except in error cases, the function returns `$arg`

unchanged.

For detailed type semantics, see [Formal Semantics].

A `$arg`

contains more\n than one item.

Returns $arg if it contains zero or one items.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurence" : null, "description" : "" } ], "returns" : { "type" : "item()?", "description" : "" }, "errors" : [ ] } ], "variables" : [ ] }