Source: XQuery 1.0 and XPath 2.0 Functions and Operators

An extract from xquery-operators listing functions.

Copyright © Dave Pawson 2009, Revision 1.2. Date 2009-01-25T17:14:20Z

Table of contents


abs( numeric ) as numeric

Summary: Returns the absolute value of $arg. If $arg is negative returns -$arg otherwise returns $arg. If type of $arg is one of the four numeric types xs:float, xs:double, xs:decimal or xs:integer the type of the result is the same as the type of $arg. If the type of $arg is a type derived from one of the numeric types, the result is an instance of the base numeric type.

adjust-date-to-timezone( xs:date ) as xs:date


adjust-date-to-timezone( xs:date xs:dayTimeDuration ) as xs:date

Summary: Adjusts an xs:date value to a specific timezone, or to no timezone at all. If $timezone is the empty sequence, returns an xs:date without a timezone. Otherwise, returns an xs:date with a timezone. For purposes of timezone adjustment, an xs:date is treated as an xs:dateTime with time 00:00:00.

adjust-dateTime-to-timezone( xs:dateTime ) as xs:dateTime


adjust-dateTime-to-timezone( xs:dateTime xs:dayTimeDuration ) as xs:dateTime

Summary: Adjusts an xs:dateTime value to a specific timezone, or to no timezone at all. If $timezone is the empty sequence, returns an xs:dateTime without a timezone. Otherwise, returns an xs:dateTime with a timezone.

adjust-time-to-timezone( xs:time ) as xs:time


adjust-time-to-timezone( xs:time xs:dayTimeDuration ) as xs:time

Summary: Adjusts an xs:time value to a specific timezone, or to no timezone at all. If $timezone is the empty sequence, returns an xs:time without a timezone. Otherwise, returns an xs:time with a timezone.

avg( xs:anyAtomicType* ) as xs:anyAtomicType

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

base-uri( ) as xs:anyURI


base-uri( node() ) as xs:anyURI

Summary: Returns the value of the base-uri URI property for $arg as defined by the accessor function dm:base-uri() for that kind of node in . If $arg is not specified, the behavior is identical to calling the function with the context item (.) as argument. The following errors may be raised: if the context item is undefined ; if the context item is not a node .

boolean( item()* ) as xs:boolean

Summary: Computes the effective boolean value of the sequence $arg. See

ceiling( numeric ) as numeric

Summary: Returns the smallest (closest to negative infinity) number with no fractional part that is not less than the value of $arg. If type of $arg is one of the four numeric types xs:float, xs:double, xs:decimal or xs:integer the type of the result is the same as the type of $arg. If the type of $arg is a type derived from one of the numeric types, the result is an instance of the base numeric type.

codepoint-equal( xs:string xs:string ) as xs:boolean

Summary: Returns true or false depending on whether the value of $comparand1 is equal to the value of $comparand2, according to the Unicode code point collation (http://www.w3.org/2005/xpath-functions/collation/codepoint).

codepoints-to-string( xs:integer* ) as xs:string

Summary: Creates an xs:string from a sequence of code points. Returns the zero-length string if $arg is the empty sequence. If any of the code points in $arg is not a legal XML character, an error is raised .

collection( ) as node()*


collection( xs:string ) as node()*

Summary: This function takes an xs:string as argument and returns a sequence of nodes obtained by interpreting $arg as an xs:anyURI and resolving it according to the mapping specified in described in . If provides a mapping from this string to a sequence of nodes, the function returns that sequence. If maps the string to an empty sequence, then the function returns an empty sequence. If provides no mapping for the string, an error is raised . If $arg is not specified, the function returns the sequence of the nodes in the default collection in the dynamic context. See . If the value of the default collection is undefined an error is raised .

compare( xs:string xs:string ) as xs:integer

compare( xs:string xs:string xs:string ) as xs:integer

Summary: Returns -1, 0, or 1, depending on whether the value of the $comparand1 is respectively less than, equal to, or greater than the value of $comparand2, according to the rules of the collation that is used.

concat( xs:anyAtomicType xs:anyAtomicType ) as xs:string

Summary: Accepts two or more xs:anyAtomicType arguments and casts them to xs:string. Returns the xs:string that is the concatenation of the values of its arguments after conversion. If any of the arguments is the empty sequence, the argument is treated as the zero-length string.

contains( xs:string xs:string ) as xs:boolean

contains( xs:string xs:string xs:string ) as xs:boolean

Summary: Returns an xs:boolean indicating whether or not the value of $arg1 contains (at the beginning, at the end, or anywhere within) at least one sequence of collation units that provides a minimal match to the collation units in the value of $arg2, according to the collation that is used.

count( item()* ) as xs:integer

Summary: Returns the number of items in the value of $arg.

current-date( ) as xs:date

Summary: Returns xs:date(fn:current-dateTime()). This is an xs:date (with timezone) that is current at some time during the evaluation of a query or transformation in which fn:current-date() is executed. This function is . The precise instant during the query or transformation represented by the value of fn:current-date() is .

current-dateTime( ) as xs:dateTime

Summary: Returns the current dateTime (with timezone) from the dynamic context. (See .) This is an xs:dateTime that is current at some time during the evaluation of a query or transformation in which fn:current-dateTime() is executed. This function is . The precise instant during the query or transformation represented by the value of fn:current-dateTime() is .

current-time( ) as xs:time

Summary: Returns xs:time(fn:current-dateTime()). This is an xs:time (with timezone) that is current at some time during the evaluation of a query or transformation in which fn:current-time() is executed. This function is . The precise instant during the query or transformation represented by the value of fn:current-time() is .

data( item()* ) as xs:anyAtomicType*

Summary: fn:data takes a sequence of items and returns a sequence of atomic values.

day-from-date( xs:date ) as xs:integer

Summary: Returns an xs:integer between 1 and 31, both inclusive, representing the day component in the localized value of $arg.

day-from-dateTime( xs:dateTime ) as xs:integer

Summary: Returns an xs:integer between 1 and 31, both inclusive, representing the day component in the localized value of $arg.

days-from-duration( xs:duration ) as xs:integer

Summary: Returns an xs:integer representing the days component in the value of $arg. The result is obtained by casting $arg to an xs:dayTimeDuration (see ) and then computing the days component as described in .

deep-equal( item()* item()* ) as xs:boolean

deep-equal( item()* item()* string ) as xs:boolean

Summary: This function assesses whether two sequences are deep-equal to each other. To be deep-equal, they must contain items that are pairwise deep-equal; and for two items to be deep-equal, they must either be atomic values that compare equal, or nodes of the same kind, with the same name, whose children are deep-equal. This is defined in more detail below. The $collation argument identifies a collation which is used at all levels of recursion when strings are compared (but not when names are compared), according to the rules in .

default-collation( ) as xs:string

Summary: Returns the value of the default collation property from the static context. Components of the static context are discussed in .

distinct-values( xs:anyAtomicType* ) as xs:anyAtomicType*

distinct-values( xs:anyAtomicType* xs:string ) as xs:anyAtomicType*

Summary: Returns the sequence that results from removing from $arg all but one of a set of values that are eq to one other. Values of type xs:untypedAtomic are compared as if they were of type xs:string. Values that cannot be compared, i.e. the eq operator is not defined for their types, are considered to be distinct. The order in which the sequence of values is returned is .

doc( xs:string ) as document-node()

Summary: Retrieves a document using an xs:anyURI, which may include a fragment identifier, supplied as an xs:string. If $uri is not a valid xs:anyURI, an error is raised . If it is a relative URI Reference, it is resolved relative to the value of the base URI property from the static context. The resulting absolute URI Reference is promoted to an xs:string. If the discussed in provides a mapping from this string to a document node, the function returns that document node. If the provides no mapping for the string, an error is raised .

doc-available( xs:string ) as xs:boolean

Summary: If fn:doc($uri) returns a document node, this function returns true. If $uri is not a valid xs:anyURI, an error is raised . Otherwise, this function returns false.

document-uri( node() ) as xs:anyURI

Summary: Returns the value of the document-uri property for $arg as defined by the dm:document-uri accessor function defined in .

empty( item()* ) as xs:boolean

Summary: If the value of $arg is the empty sequence, the function returns true; otherwise, the function returns false.

encode-for-uri( xs:string ) as xs:string

Summary: This function encodes reserved characters in an xs:string that is intended to be used in the path segment of a URI. It is invertible but not idempotent. This function applies the URI escaping rules defined in section 2 of to the xs:string supplied as $uri-part. The effect of the function is to escape reserved characters. Each such character in the string is replaced with its percent-encoded form as described in .

ends-with( xs:string xs:string ) as xs:boolean

ends-with( xs:string xs:string xs:string ) as xs:boolean

Summary: Returns an xs:boolean indicating whether or not the value of $arg1 ends with a sequence of collation units that provides a minimal match to the collation units of $arg2 according to the collation that is used.

escape-html-uri( xs:string ) as xs:string

Summary: This function escapes all characters except printable characters of the US-ASCII coded character set, specifically the octets ranging from 32 to 126 (decimal). The effect of the function is to escape a URI in the manner html user agents handle attribute values that expect URIs. Each character in $uri to be escaped is replaced by an escape sequence, which is formed by encoding the character as a sequence of octets in UTF-8, and then representing each of these octets in the form %HH, where HH is the hexadecimal representation of the octet. This function must always generate hexadecimal values using the upper-case letters A-F.

exactly-one( item()* ) as item()

Summary: Returns $arg if it contains exactly one item. Otherwise, raises an error .

exists( item()* ) as xs:boolean

Summary: If the value of $arg is not the empty sequence, the function returns true; otherwise, the function returns false.

false( ) as xs:boolean

Summary: Returns the xs:boolean value false. Equivalent to xs:boolean("0").

floor( numeric ) as numeric

Summary: Returns the largest (closest to positive infinity) number with no fractional part that is not greater than the value of $arg. If type of $arg is one of the four numeric types xs:float, xs:double, xs:decimal or xs:integer the type of the result is the same as the type of $arg. If the type of $arg is a type derived from one of the numeric types, the result is an instance of the base numeric type.

hours-from-dateTime( xs:dateTime ) as xs:integer

Summary: Returns an xs:integer between 0 and 23, both inclusive, representing the hours component in the localized value of $arg.

hours-from-duration( xs:duration ) as xs:integer

Summary: Returns an xs:integer representing the hours component in the value of $arg. The result is obtained by casting $arg to an xs:dayTimeDuration (see ) and then computing the hours component as described in .

hours-from-time( xs:time ) as xs:integer

Summary: Returns an xs:integer between 0 and 23, both inclusive, representing the value of the hours component in the localized value of $arg.

id( xs:string* ) as element()*


id( xs:string* node() ) as element()*

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

idref( xs:string* ) as node()*


idref( xs:string* node() ) as node()*

Summary: Returns the sequence of element or attribute nodes with an IDREF value matching the value of one or more of the ID values supplied in $arg.

implicit-timezone( ) as xs:dayTimeDuration

Summary: Returns the value of the implicit timezone property from the dynamic context. Components of the dynamic context are discussed in .

in-scope-prefixes( element() ) as xs:string*

Summary: Returns the prefixes of the in-scope namespaces for $element. For namespaces that have a prefix, it returns the prefix as an xs:NCName. For the default namespace, which has no prefix, it returns the zero-length string.

index-of( xs:anyAtomicType* xs:anyAtomicType ) as xs:integer*

index-of( xs:anyAtomicType* xs:anyAtomicType xs:string ) as xs:integer*

Summary: Returns a sequence of positive integers giving the positions within the sequence $seqParam of items that are equal to $srchParam.

insert-before( item()* xs:integer item()* ) as item()*

Summary: Returns a new sequence constructed from the value of $target with the value of $inserts inserted at the position specified by the value of $position. (The value of $target is not affected by the sequence construction.)

iri-to-uri( xs:string ) as xs:string

Summary: This function converts an xs:string containing an IRI into a URI according to the rules spelled out in Section 3.1 of . It is idempotent but not invertible.

lang( xs:string ) as xs:boolean


lang( xs:string node() ) as xs:boolean

Summary: This function tests whether the language of $node, or the context item if the second argument is omitted, as specified by xml:lang attributes is the same as, or is a sublanguage of, the language specified by $testlang. The behavior of the function if the second argument is omitted is exactly the same as if the context item (.) had been passed as the second argument. The language of the argument node, or the context item if the second argument is omitted, is determined by the value of the xml:lang attribute on the node, or, if the node has no such attribute, by the value of the xml:lang attribute on the nearest ancestor of the node that has an xml:lang attribute. If there is no such ancestor, then the function returns false

last( ) as xs:integer

Summary: Returns the context size from the dynamic context. (See .) If the context item is undefined, an error is raised: .

local-name( ) as xs:string

local-name( node() ) as xs:string

Summary: Returns the local part of the name of $arg as an xs:string that will either be the zero-length string or will have the lexical form of an xs:NCName.

local-name-from-QName( xs:QName ) as xs:NCName

Summary: Returns an xs:NCName representing the local part of $arg. If $arg is the empty sequence, returns the empty sequence.

lower-case( xs:string ) as xs:string

Summary: Returns the value of $arg after translating every character to its lower-case correspondent as defined in the appropriate case mappings section in the Unicode standard . For versions of Unicode beginning with the 2.1.8 update, only locale-insensitive case mappings should be applied. Beginning with version 3.2.0 (and likely future versions) of Unicode, precise mappings are described in default case operations, which are full case mappings in the absence of tailoring for particular languages and environments. Every upper-case character that does not have a lower-case correspondent, as well as every lower-case character, is included in the returned value in its original form.

matches( xs:string xs:string ) as xs:boolean

matches( xs:string xs:string xs:string ) as xs:boolean

Summary: The function returns true if $input matches the regular expression supplied as $pattern as influenced by the value of $flags, if present; otherwise, it returns false.

max( xs:anyAtomicType* ) as xs:anyAtomicType

max( xs:anyAtomicType* string ) as xs:anyAtomicType

Summary: Selects an item from the input sequence $arg whose value is greater than or equal to the value of every other item in the input sequence. If there are two or more such items, then the specific item whose value is returned is .

min( xs:anyAtomicType* ) as xs:anyAtomicType

min( xs:anyAtomicType* string ) as xs:anyAtomicType

Summary: selects an item from the input sequence $arg whose value is less than or equal to the value of every other item in the input sequence. If there are two or more such items, then the specific item whose value is returned is .

minutes-from-dateTime( xs:dateTime ) as xs:integer

Summary: Returns an xs:integer value between 0 and 59, both inclusive, representing the minute component in the localized value of $arg.

minutes-from-duration( xs:duration ) as xs:integer

Summary: Returns an xs:integer representing the minutes component in the value of $arg. The result is obtained by casting $arg to an xs:dayTimeDuration (see ) and then computing the minutes component as described in .

minutes-from-time( xs:time ) as xs:integer

Summary: Returns an xs:integer value between 0 and 59, both inclusive, representing the value of the minutes component in the localized value of $arg.

month-from-date( xs:date ) as xs:integer

Summary: Returns an xs:integer between 1 and 12, both inclusive, representing the month component in the localized value of $arg.

month-from-dateTime( xs:dateTime ) as xs:integer

Summary: Returns an xs:integer between 1 and 12, both inclusive, representing the month component in the localized value of $arg.

months-from-duration( xs:duration ) as xs:integer

Summary: Returns an xs:integer representing the months component in the value of $arg. The result is obtained by casting $arg to an xs:yearMonthDuration (see ) and then computing the months component as described in .

name( ) as xs:string

name( node() ) as xs:string

Summary: Returns the name of a node, as an xs:string that is either the zero-length string, or has the lexical form of an xs:QName.

namespace-uri( ) as xs:anyURI

namespace-uri( node() ) as xs:anyURI

Summary: Returns the namespace URI of the xs:QName of $arg.

namespace-uri-for-prefix( xs:string element() ) as xs:anyURI

Summary: Returns the namespace URI of one of the in-scope namespaces for $element, identified by its namespace prefix.

namespace-uri-from-QName( xs:QName ) as xs:anyURI

Summary: Returns the namespace URI for $arg as an xs:string. If $arg is the empty sequence, the empty sequence is returned. If $arg is in no namespace, the zero-length string is returned.

nilled( node() ) as xs:boolean

Summary: Returns an xs:boolean indicating whether the argument node is . If the argument is not an element node, returns the empty sequence. If the argument is the empty sequence, returns the empty sequence.

node-name( node() ) as xs:QName

Summary: Returns an expanded-QName for node kinds that can have names. For other kinds of nodes it returns the empty sequence. If $arg is the empty sequence, the empty sequence is returned.

normalize-space( ) as xs:string


normalize-space( xs:string ) as xs:string

Summary: Returns the value of $arg with whitespace normalized by stripping leading and trailing whitespace and replacing sequences of one or more than one whitespace character with a single space, #x20.

normalize-unicode( xs:string ) as xs:string

normalize-unicode( xs:string xs:string ) as xs:string

Summary: Returns the value of $arg normalized according to the normalization criteria for a normalization form identified by the value of $normalizationForm. The effective value of the $normalizationForm is computed by removing leading and trailing blanks, if present, and converting to upper case.

not( item()* ) as xs:boolean

Summary: $arg is first reduced to an effective boolean value by applying the fn:boolean() function. Returns true if the effective boolean value is false, and false if the effective boolean value is true.

number( ) as xs:double

number( xs:anyAtomicType ) as xs:double

Summary: Returns the value indicated by $arg or, if $arg is not specified, the context item after atomization, converted to an xs:double

one-or-more( item()* ) as item()+

Summary: Returns $arg if it contains one or more items. Otherwise, raises an error .

position( ) as xs:integer

Summary: Returns the context position from the dynamic context. (See .) If the context item is undefined, an error is raised: .

prefix-from-QName( xs:QName ) as xs:NCName

Summary: Returns an xs:NCName representing the prefix of $arg. The empty sequence is returned if $arg is the empty sequence or if the value of $arg contains no prefix.

QName( xs:string xs:string ) as xs:QName

Summary: Returns an xs:QName with the namespace URI given in $paramURI. If $paramURI is the zero-length string or the empty sequence, it represents "no namespace"; in this case, if the value of $paramQName contains a colon (:), an error is raised . The prefix (or absence of a prefix) in $paramQName is retained in the returned xs:QName value. The local name in the result is taken from the local part of $paramQName.

remove( item()* xs:integer ) as item()*

Summary: Returns a new sequence constructed from the value of $target with the item at the position specified by the value of $position removed.

replace( xs:string xs:string xs:string ) as xs:string

replace( xs:string xs:string xs:string xs:string ) as xs:string

Summary: The function returns the xs:string that is obtained by replacing each non-overlapping substring of $input that matches the given $pattern with an occurrence of the $replacement string.

resolve-QName( xs:string element() ) as xs:QName

Summary: Returns an xs:QName value (that is, an expanded-QName) by taking an xs:string that has the lexical form of an xs:QName (a string in the form "prefix:local-name" or "local-name") and resolving it using the in-scope namespaces for a given element.

resolve-uri( xs:string ) as xs:anyURI


resolve-uri( xs:string xs:string ) as xs:anyURI

Summary: The purpose of this function is to enable a relative URI to be resolved against an absolute URI.

reverse( item()* ) as item()*

Summary: Reverses the order of items in a sequence. If $arg is the empty sequence, the empty sequence is returned.

root( ) as node()


root( node() ) as node()

Summary: Returns the root of the tree to which $arg belongs. This will usually, but not necessarily, be a document node.

round( numeric ) as numeric

Summary: Returns the number with no fractional part that is closest to the argument. If there are two such numbers, then the one that is closest to positive infinity is returned. If type of $arg is one of the four numeric types xs:float, xs:double, xs:decimal or xs:integer the type of the result is the same as the type of $arg. If the type of $arg is a type derived from one of the numeric types, the result is an instance of the base numeric type.

round-half-to-even( numeric ) as numeric


round-half-to-even( numeric xs:integer ) as numeric

Summary: The value returned is the nearest (that is, numerically closest) value to $arg that is a multiple of ten to the power of minus $precision. If two such values are equally near (e.g. if the fractional part in $arg is exactly .500...), the function returns the one whose least significant digit is even.

seconds-from-dateTime( xs:dateTime ) as xs:decimal

Summary: Returns an xs:decimal value greater than or equal to zero and less than 60, representing the seconds and fractional seconds in the localized value of $arg.

seconds-from-duration( xs:duration ) as xs:decimal

Summary: Returns an xs:decimal representing the seconds component in the value of $arg. The result is obtained by casting $arg to an xs:dayTimeDuration (see ) and then computing the seconds component as described in .

seconds-from-time( xs:time ) as xs:decimal

Summary: Returns an xs:decimal value greater than or equal to zero and less than 60, representing the seconds and fractional seconds in the localized value of $arg.

starts-with( xs:string xs:string ) as xs:boolean

starts-with( xs:string xs:string xs:string ) as xs:boolean

Summary: Returns an xs:boolean indicating whether or not the value of $arg1 starts with a sequence of collation units that provides a minimal match to the collation units of $arg2 according to the collation that is used.

static-base-uri( ) as xs:anyURI

Summary: Returns the value of the Base URI property from the static context. If the Base URI property is undefined, the empty sequence is returned. Components of the static context are discussed in .

string( ) as xs:string

string( item() ) as xs:string

Summary: Returns the value of $arg represented as a xs:string. If no argument is supplied, the context item (.) is used as the default argument. The behavior of the function if the argument is omitted is exactly the same as if the context item had been passed as the argument.

string-join( xs:string* xs:string ) as xs:string

Summary: Returns a xs:string created by concatenating the members of the $arg1 sequence using $arg2 as a separator. If the value of $arg2 is the zero-length string, then the members of $arg1 are concatenated without a separator.

string-length( ) as xs:integer


string-length( xs:string ) as xs:integer

Summary: Returns an xs:integer equal to the length in characters of the value of $arg.

string-to-codepoints( xs:string ) as xs:integer*

Summary: Returns the sequence of code points that constitute an xs:string. If $arg is a zero-length string or the empty sequence, the empty sequence is returned.

subsequence( item()* xs:double ) as item()*

subsequence( item()* xs:double xs:double ) as item()*

Summary: Returns the contiguous sequence of items in the value of $sourceSeq beginning at the position indicated by the value of $startingLoc and continuing for the number of items indicated by the value of $length.

substring( xs:string xs:double ) as xs:string

substring( xs:string xs:double xs:double ) as xs:string

Summary: Returns the portion of the value of $sourceString beginning at the position indicated by the value of $startingLoc and continuing for the number of characters indicated by the value of $length. The characters returned do not extend beyond $sourceString. If $startingLoc is zero or negative, only those characters in positions greater than zero are returned.

substring-after( xs:string xs:string ) as xs:string

substring-after( xs:string xs:string xs:string ) as xs:string

Summary: Returns the substring of the value of $arg1 that follows in the value of $arg1 the first occurrence of a sequence of collation units that provides a minimal match to the collation units of $arg2 according to the collation that is used.

substring-before( xs:string xs:string ) as xs:string

substring-before( xs:string xs:string xs:string ) as xs:string

Summary: Returns the substring of the value of $arg1 that precedes in the value of $arg1 the first occurrence of a sequence of collation units that provides a minimal match to the collation units of $arg2 according to the collation that is used.

sum( xs:anyAtomicType* ) as xs:anyAtomicType


sum( xs:anyAtomicType* xs:anyAtomicType ) as xs:anyAtomicType

Summary: Returns a value obtained by adding together the values in $arg. If $zero is not specified, then the value returned for an empty sequence is the xs:integer value 0. If $zero is specified, then the value returned for an empty sequence is $zero.

timezone-from-date( xs:date ) as xs:dayTimeDuration

Summary: Returns the timezone component of $arg if any. If $arg has a timezone component, then the result is an xs:dayTimeDuration that indicates deviation from UTC; its value may range from +14:00 to -14:00 hours, both inclusive. Otherwise, the result is the empty sequence.

timezone-from-dateTime( xs:dateTime ) as xs:dayTimeDuration

Summary: Returns the timezone component of $arg if any. If $arg has a timezone component, then the result is an xs:dayTimeDuration that indicates deviation from UTC; its value may range from +14:00 to -14:00 hours, both inclusive. Otherwise, the result is the empty sequence.

timezone-from-time( xs:time ) as xs:dayTimeDuration

Summary: Returns the timezone component of $arg if any. If $arg has a timezone component, then the result is an xs:dayTimeDuration that indicates deviation from UTC; its value may range from +14:00 to -14:00 hours, both inclusive. Otherwise, the result is the empty sequence.

tokenize( xs:string xs:string ) as xs:string*

tokenize( xs:string xs:string xs:string ) as xs:string*

Summary: This function breaks the $input string into a sequence of strings, treating any substring that matches $pattern as a separator. The separators themselves are not returned.

translate( xs:string xs:string xs:string ) as xs:string

Summary: Returns the value of $arg modified so that every character in the value of $arg that occurs at some position in the value of $mapString has been replaced by the character that occurs at position in the value of $transString.

true( ) as xs:boolean

Summary: Returns the xs:boolean value true. Equivalent to xs:boolean("1").

unordered( item()* ) as item()*

Summary: Returns the items of $sourceSeq in an order.

upper-case( xs:string ) as xs:string

Summary: Returns the value of $arg after translating every character to its upper-case correspondent as defined in the appropriate case mappings section in the Unicode standard . For versions of Unicode beginning with the 2.1.8 update, only locale-insensitive case mappings should be applied. Beginning with version 3.2.0 (and likely future versions) of Unicode, precise mappings are described in default case operations, which are full case mappings in the absence of tailoring for particular languages and environments. Every lower-case character that does not have an upper-case correspondent, as well as every upper-case character, is included in the returned value in its original form.

year-from-date( xs:date ) as xs:integer

Summary: Returns an xs:integer representing the year in the localized value of $arg. The value may be negative.

year-from-dateTime( xs:dateTime ) as xs:integer

Summary: Returns an xs:integer representing the year component in the localized value of $arg. The result may be negative.

years-from-duration( xs:duration ) as xs:integer

Summary: Returns an xs:integer representing the years component in the value of $arg. The result is obtained by casting $arg to an xs:yearMonthDuration (see ) and then computing the years component as described in .

zero-or-one( item()* ) as item()

Summary: Returns $arg if it contains zero or one items. Otherwise, raises an error .