http://www.w3.org/2005/xpath-functions
This module is statically bound to the prefix "fn".
- Description
XPath and XQuery built-in functions.
The optional function
fn:transformis not implemented and will throw errorerr:FOXT0001when used.The functions
fn:available-environment-variablesandfn:environment-variablewill only return values if the application configuration valueenvironment_accessis set totrue.- Functions
-
- abs
- adjust-date-to-timezone
- adjust-dateTime-to-timezone
- adjust-time-to-timezone
- analyze-string
- apply
- available-environment-variables
- avg
- base-uri
- boolean
- ceiling
- codepoint-equal
- codepoints-to-string
- collation-key
- collection
- compare
- concat
- contains
- contains-token
- count
- current-date
- current-dateTime
- current-time
- data
- dateTime
- day-from-date
- day-from-dateTime
- days-from-duration
- deep-equal
- default-collation
- default-language
- distinct-values
- doc
- doc-available
- document-uri
- element-with-id
- empty
- encode-for-uri
- ends-with
- environment-variable
- error
- escape-html-uri
- exactly-one
- exists
- false
- filter
- floor
- fold-left
- fold-right
- for-each
- for-each-pair
- format-date
- format-dateTime
- format-integer
- format-number
- format-time
- function-arity
- function-lookup
- function-name
- generate-id
- has-children
- head
- hours-from-dateTime
- hours-from-duration
- hours-from-time
- id
- idref
- implicit-timezone
- in-scope-prefixes
- index-of
- innermost
- insert-before
- iri-to-uri
- json-doc
- json-to-xml
- lang
- last
- load-xquery-module
- local-name
- local-name-from-QName
- lower-case
- matches
- max
- min
- minutes-from-dateTime
- minutes-from-duration
- minutes-from-time
- month-from-date
- month-from-dateTime
- months-from-duration
- name
- namespace-uri
- namespace-uri-for-prefix
- namespace-uri-from-QName
- nilled
- node-name
- normalize-space
- normalize-unicode
- not
- number
- one-or-more
- outermost
- parse-ietf-date
- parse-json
- parse-xml
- parse-xml-fragment
- path
- position
- prefix-from-QName
- QName
- random-number-generator
- remove
- replace
- resolve-QName
- resolve-uri
- reverse
- root
- round
- round-half-to-even
- seconds-from-dateTime
- seconds-from-duration
- seconds-from-time
- serialize
- sort
- starts-with
- static-base-uri
- string
- string-join
- string-length
- string-to-codepoints
- subsequence
- substring
- substring-after
- substring-before
- sum
- tail
- timezone-from-date
- timezone-from-dateTime
- timezone-from-time
- tokenize
- trace
- transform
- translate
- true
- unordered
- unparsed-text
- unparsed-text-available
- unparsed-text-lines
- upper-case
- uri-collection
- xml-to-json
- year-from-date
- year-from-dateTime
- years-from-duration
- zero-or-one
fn:abs
- Signature
fn:abs($arg as xs:numeric?) as xs:numeric?- Description
Returns the absolute value of
$arg.
fn:adjust-date-to-timezone
- Signature
fn:adjust-date-to-timezone($arg as xs:date?) as xs:date?
fn:adjust-date-to-timezone($arg as xs:date?, $timezone as xs:dayTimeDuration?) as xs:date?- Description
Adjusts an
xs:datevalue to a specific timezone, or to no timezone at all; the result is the date in the target timezone that contains the starting instant of the supplied date.
fn:adjust-dateTime-to-timezone
- Signature
fn:adjust-dateTime-to-timezone($arg as xs:dateTime?) as xs:dateTime?
fn:adjust-dateTime-to-timezone($arg as xs:dateTime?, $timezone as xs:dayTimeDuration?) as xs:dateTime?- Description
Adjusts an
xs:dateTimevalue to a specific timezone, or to no timezone at all.
fn:adjust-time-to-timezone
- Signature
fn:adjust-time-to-timezone($arg as xs:time?) as xs:time?
fn:adjust-time-to-timezone($arg as xs:time?, $timezone as xs:dayTimeDuration?) as xs:time?- Description
Adjusts an
xs:timevalue to a specific timezone, or to no timezone at all.
fn:analyze-string
- Signature
fn:analyze-string($input as xs:string?, $pattern as xs:string) as element(fn:analyze-string-result)
fn:analyze-string($input as xs:string?, $pattern as xs:string, $flags as xs:string) as element(fn:analyze-string-result)- Description
Analyzes a string using a regular expression, returning an XML structure that identifies which parts of the input string matched or failed to match the regular expression, and in the case of matched substrings, which substrings matched each capturing group in the regular expression.
fn:apply
- Signature
fn:apply($function as function(*), $array as array(*)) as item()*- Description
Makes a dynamic call on a function with an argument list supplied in the form of an array.
fn:available-environment-variables
- Signature
fn:available-environment-variables() as xs:string*- Description
Returns a list of environment variable names that are suitable for passing to
fn:environment-variable, as a (possibly empty) sequence of strings.
fn:avg
- Signature
fn:avg($arg as xs:anyAtomicType*) as xs:anyAtomicType?- Description
Returns the average of the values in the input sequence
$arg, that is, the sum of the values divided by the number of values.
fn:base-uri
- Signature
fn:base-uri() as xs:anyURI?
fn:base-uri($arg as node()?) as xs:anyURI?- Description
Returns the base URI of a node.
fn:boolean
- Signature
fn:boolean($arg as item()*) as xs:boolean- Description
Computes the effective boolean value of the sequence
$arg.
fn:ceiling
- Signature
fn:ceiling($arg as xs:numeric?) as xs:numeric?- Description
Rounds
$argupwards to a whole number.
fn:codepoint-equal
- Signature
fn:codepoint-equal($comparand1 as xs:string?, $comparand2 as xs:string?) as xs:boolean?- Description
Returns true if two strings are equal, considered codepoint-by-codepoint.
fn:codepoints-to-string
- Signature
fn:codepoints-to-string($arg as xs:integer*) as xs:string- Description
Returns an
xs:stringwhose characters have supplied codepoints.
fn:collation-key
- Signature
fn:collation-key($key as xs:string) as xs:base64Binary
fn:collation-key($key as xs:string, $collation as xs:string) as xs:base64Binary- Description
Given a string value and a collation, generates an internal value called a collation key, with the property that the matching and ordering of collation keys reflects the matching and ordering of strings under the specified collation.
fn:collection
- Signature
fn:collection() as item()*
fn:collection($arg as xs:string?) as item()*- Description
Returns a sequence of items identified by a collection URI; or a default collection if no URI is supplied.
fn:compare
- Signature
fn:compare($comparand1 as xs:string?, $comparand2 as xs:string?) as xs:integer?
fn:compare($comparand1 as xs:string?, $comparand2 as xs:string?, $collation as xs:string) as xs:integer?- Description
Returns -1, 0, or 1, depending on whether
$comparand1collates before, equal to, or after$comparand2according to the rules of a selected collation.
fn:concat
- Signature
fn:concat($arg1 as xs:anyAtomicType?, $arg2 as xs:anyAtomicType?) as xs:string- Description
Returns the concatenation of the string values of the arguments.
fn:contains
- Signature
fn:contains($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean
fn:contains($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:boolean- Description
Returns true if the string
$arg1contains$arg2as a substring, taking collations into account.
fn:contains-token
- Signature
fn:contains-token($input as xs:string*, $token as xs:string) as xs:boolean
fn:contains-token($input as xs:string*, $token as xs:string, $collation as xs:string) as xs:boolean- Description
Determines whether or not any of the supplied strings, when tokenized at whitespace boundaries, contains the supplied token, under the rules of the supplied collation.
fn:count
- Signature
fn:count($arg as item()*) as xs:integer- Description
Returns the number of items in a sequence.
fn:current-date
- Signature
fn:current-date() as xs:date- Description
Returns the current date.
fn:current-dateTime
- Signature
fn:current-dateTime() as xs:dateTimeStamp- Description
Returns the current date and time (with timezone).
fn:current-time
- Signature
fn:current-time() as xs:time- Description
Returns the current time.
fn:data
- Signature
fn:data() as xs:anyAtomicType*
fn:data($arg as item()*) as xs:anyAtomicType*- Description
Returns the result of atomizing a sequence. This process flattens arrays, and replaces nodes by their typed values.
fn:dateTime
- Signature
fn:dateTime($arg1 as xs:date?, $arg2 as xs:time?) as xs:dateTime?- Description
Returns an
xs:dateTimevalue created by combining anxs:dateand anxs:time.
fn:day-from-date
- Signature
fn:day-from-date($arg as xs:date?) as xs:integer?- Description
Returns the day component of an
xs:date.
fn:day-from-dateTime
- Signature
fn:day-from-dateTime($arg as xs:dateTime?) as xs:integer?- Description
Returns the day component of an
xs:dateTime.
fn:days-from-duration
- Signature
fn:days-from-duration($arg as xs:duration?) as xs:integer?- Description
Returns the number of days in a duration.
fn:deep-equal
- Signature
fn:deep-equal($parameter1 as item()*, $parameter2 as item()*) as xs:boolean
fn:deep-equal($parameter1 as item()*, $parameter2 as item()*, $collation as xs:string) as xs:boolean- Description
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, or maps with matching entries, or arrays with matching members.
fn:default-collation
- Signature
fn:default-collation() as xs:string- Description
Returns the value of the default collation property from the static context.
fn:default-language
- Signature
fn:default-language() as xs:language- Description
Returns the value of the default language property from the dynamic context.
fn:distinct-values
- Signature
fn:distinct-values($arg as xs:anyAtomicType*) as xs:anyAtomicType*
fn:distinct-values($arg as xs:anyAtomicType*, $collation as xs:string) as xs:anyAtomicType*- Description
Returns the values that appear in a sequence, with duplicates eliminated.
fn:doc
- Signature
fn:doc($uri as xs:string?) as document-node()?- Description
Retrieves a document using a URI supplied as an
xs:string, and returns the corresponding document node.
fn:doc-available
- Signature
fn:doc-available($uri as xs:string?) as xs:boolean- Description
The function returns true if and only if the function call
fn:doc($uri)would return a document node.
fn:document-uri
- Signature
fn:document-uri() as xs:anyURI?
fn:document-uri($arg as node()?) as xs:anyURI?- Description
Returns the URI of a resource where a document can be found, if available.
fn:element-with-id
- Signature
fn:element-with-id($arg as xs:string*) as element()*
fn:element-with-id($arg as xs:string*, $node as node()) as element()*- Description
Returns the sequence of element nodes that have an
IDvalue matching the value of one or more of theIDREFvalues supplied in$arg.
fn:empty
- Signature
fn:empty($arg as item()*) as xs:boolean- Description
Returns true if the argument is the empty sequence.
fn:encode-for-uri
- Signature
fn:encode-for-uri($uri-part as xs:string?) as xs:string- Description
Encodes reserved characters in a string that is intended to be used in the path segment of a URI.
fn:ends-with
- Signature
fn:ends-with($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean
fn:ends-with($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:boolean- Description
Returns true if the string
$arg1contains$arg2as a trailing substring, taking collations into account.
fn:environment-variable
- Signature
fn:environment-variable($name as xs:string) as xs:string?- Description
Returns the value of a system environment variable, if it exists.
fn:error
- Signature
fn:error() as none
fn:error($code as xs:QName?) as none
fn:error($code as xs:QName?, $description as xs:string) as none
fn:error($code as xs:QName?, $description as xs:string, $error-object as item()*) as none- Description
Calling the
fn:errorfunction raises an application-defined error.
fn:escape-html-uri
- Signature
fn:escape-html-uri($uri as xs:string?) as xs:string- Description
Escapes a URI in the same way that HTML user agents handle attribute values expected to contain URIs.
fn:exactly-one
- Signature
fn:exactly-one($arg as item()*) as item()- Description
Returns
$argif it contains exactly one item. Otherwise, raises an error.
fn:exists
- Signature
fn:exists($arg as item()*) as xs:boolean- Description
Returns true if the argument is a non-empty sequence.
fn:false
- Signature
fn:false() as xs:boolean- Description
Returns the
xs:booleanvaluefalse.
fn:filter
- Signature
fn:filter($seq as item()*, $f as function(item()) as xs:boolean) as item()*- Description
Returns those items from the sequence
$seqfor which the supplied function$freturns true.
fn:floor
- Signature
fn:floor($arg as xs:numeric?) as xs:numeric?- Description
Rounds
$argdownwards to a whole number.
fn:fold-left
- Signature
fn:fold-left($seq as item()*, $zero as item()*, $f as function(item()*, item()) as item()*) as item()*- Description
Processes the supplied sequence from left to right, applying the supplied function repeatedly to each item in turn, together with an accumulated result value.
fn:fold-right
- Signature
fn:fold-right($seq as item()*, $zero as item()*, $f as function(item(), item()*) as item()*) as item()*- Description
Processes the supplied sequence from right to left, applying the supplied function repeatedly to each item in turn, together with an accumulated result value.
fn:for-each
- Signature
fn:for-each($seq as item()*, $action as function(item()) as item()*) as item()*- Description
Applies the function item
$actionto every item from the sequence$seqin turn, returning the concatenation of the resulting sequences in order.
fn:for-each-pair
- Signature
fn:for-each-pair($seq1 as item()*, $seq2 as item()*, $action as function(item(), item()) as item()*) as item()*- Description
Applies the function item
$actionto successive pairs of items taken one from$seq1and one from$seq2, returning the concatenation of the resulting sequences in order.
fn:format-date
- Signature
fn:format-date($value as xs:date?, $picture as xs:string) as xs:string?
fn:format-date($value as xs:date?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $place as xs:string?) as xs:string?- Description
Returns a string containing an
xs:datevalue formatted for display.
fn:format-dateTime
- Signature
fn:format-dateTime($value as xs:dateTime?, $picture as xs:string) as xs:string?
fn:format-dateTime($value as xs:dateTime?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $place as xs:string?) as xs:string?- Description
Returns a string containing an
xs:dateTimevalue formatted for display.
fn:format-integer
- Signature
fn:format-integer($value as xs:integer?, $picture as xs:string) as xs:string
fn:format-integer($value as xs:integer?, $picture as xs:string, $lang as xs:string?) as xs:string- Description
Formats an integer according to a given picture string, using the conventions of a given natural language if specified.
fn:format-number
- Signature
fn:format-number($value as xs:numeric?, $picture as xs:string) as xs:string
fn:format-number($value as xs:numeric?, $picture as xs:string, $decimal-format-name as xs:string?) as xs:string- Description
Returns a string containing a number formatted according to a given picture string, taking account of decimal formats specified in the static context.
fn:format-time
- Signature
fn:format-time($value as xs:time?, $picture as xs:string) as xs:string?
fn:format-time($value as xs:time?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $place as xs:string?) as xs:string?- Description
Returns a string containing an
xs:timevalue formatted for display.
fn:function-arity
- Signature
fn:function-arity($func as function(*)) as xs:integer- Description
Returns the arity of the function identified by a function item.
fn:function-lookup
- Signature
fn:function-lookup($name as xs:QName, $arity as xs:integer) as function(*)?- Description
Returns the function having a given name and arity, if there is one.
fn:function-name
- Signature
fn:function-name($func as function(*)) as xs:QName?- Description
Returns the name of the function identified by a function item.
fn:generate-id
- Signature
fn:generate-id() as xs:string
fn:generate-id($arg as node()?) as xs:string- Description
This function returns a string that uniquely identifies a given node.
fn:has-children
- Signature
fn:has-children() as xs:boolean
fn:has-children($node as node()?) as xs:boolean- Description
Returns true if the supplied node has one or more child nodes (of any kind).
fn:head
- Signature
fn:head($arg as item()*) as item()?- Description
Returns the first item in a sequence.
fn:hours-from-dateTime
- Signature
fn:hours-from-dateTime($arg as xs:dateTime?) as xs:integer?- Description
Returns the hours component of an
xs:dateTime.
fn:hours-from-duration
- Signature
fn:hours-from-duration($arg as xs:duration?) as xs:integer?- Description
Returns the number of hours in a duration.
fn:hours-from-time
- Signature
fn:hours-from-time($arg as xs:time?) as xs:integer?- Description
Returns the hours component of an
xs:time.
fn:id
- Signature
fn:id($arg as xs:string*) as element()*
fn:id($arg as xs:string*, $node as node()) as element()*- Description
Returns the sequence of element nodes that have an
IDvalue matching the value of one or more of theIDREFvalues supplied in$arg.
fn:idref
- Signature
fn:idref($arg as xs:string*) as node()*
fn:idref($arg as xs:string*, $node as node()) as node()*- Description
Returns the sequence of element or attribute nodes with an
IDREFvalue matching the value of one or more of theIDvalues supplied in$arg.
fn:implicit-timezone
- Signature
fn:implicit-timezone() as xs:dayTimeDuration- Description
Returns the value of the implicit timezone property from the dynamic context.
fn:in-scope-prefixes
- Signature
fn:in-scope-prefixes($element as element()) as xs:string*- Description
Returns the prefixes of the in-scope namespaces for an element node.
fn:index-of
- Signature
fn:index-of($seq as xs:anyAtomicType*, $search as xs:anyAtomicType) as xs:integer*
fn:index-of($seq as xs:anyAtomicType*, $search as xs:anyAtomicType, $collation as xs:string) as xs:integer*- Description
Returns a sequence of positive integers giving the positions within the sequence
$seqof items that are equal to$search.
fn:innermost
- Signature
fn:innermost($nodes as node()*) as node()*- Description
Returns every node within the input sequence that is not an ancestor of another member of the input sequence; the nodes are returned in document order with duplicates eliminated.
fn:insert-before
- Signature
fn:insert-before($target as item()*, $position as xs:integer, $inserts as item()*) as item()*- Description
Returns a sequence constructed by inserting an item or a sequence of items at a given position within an existing sequence.
fn:iri-to-uri
- Signature
fn:iri-to-uri($iri as xs:string?) as xs:string- Description
Converts a string containing an IRI into a URI according to the rules of [RFC 3987].
fn:json-doc
- Signature
fn:json-doc($href as xs:string?) as item()?
fn:json-doc($href as xs:string?, $options as map(*)) as item()?- Description
Reads an external resource containing JSON, and returns the result of parsing the resource as JSON.
fn:json-to-xml
- Signature
fn:json-to-xml($json-text as xs:string?) as document-node()?
fn:json-to-xml($json-text as xs:string?, $options as map(*)) as document-node()?- Description
Parses a string supplied in the form of a JSON text, returning the results in the form of an XML document node.
fn:lang
- Signature
fn:lang($testlang as xs:string?) as xs:boolean
fn:lang($testlang as xs:string?, $node as node()) as xs:boolean- Description
This function tests whether the language of
$node, or the context item if the second argument is omitted, as specified byxml:langattributes is the same as, or is a sublanguage of, the language specified by$testlang.
fn:last
- Signature
fn:last() as xs:integer- Description
Returns the context size from the dynamic context.
fn:load-xquery-module
- Signature
fn:load-xquery-module($module-uri as xs:string) as map(*)
fn:load-xquery-module($module-uri as xs:string, $options as map(*)) as map(*)- Description
Throws error FOQM0006 when used.
Provides access to the public functions and global variables of a dynamically-loaded XQuery library module.
fn:local-name
- Signature
fn:local-name() as xs:string
fn:local-name($arg as node()?) as xs:string- Description
Returns the local part of the name of
$argas anxs:stringthat is either the zero-length string, or has the lexical form of anxs:NCName.
fn:local-name-from-QName
- Signature
fn:local-name-from-QName($arg as xs:QName?) as xs:NCName?- Description
Returns the local part of the supplied QName.
fn:lower-case
- Signature
fn:lower-case($arg as xs:string?) as xs:string- Description
Converts a string to lower case.
fn:matches
- Signature
fn:matches($input as xs:string?, $pattern as xs:string) as xs:boolean
fn:matches($input as xs:string?, $pattern as xs:string, $flags as xs:string) as xs:boolean- Description
Returns true if the supplied string matches a given regular expression.
fn:max
- Signature
fn:max($arg as xs:anyAtomicType*) as xs:anyAtomicType?
fn:max($arg as xs:anyAtomicType*, $collation as xs:string) as xs:anyAtomicType?- Description
Returns a value that is equal to the highest value appearing in the input sequence.
fn:min
- Signature
fn:min($arg as xs:anyAtomicType*) as xs:anyAtomicType?
fn:min($arg as xs:anyAtomicType*, $collation as xs:string) as xs:anyAtomicType?- Description
Returns a value that is equal to the lowest value appearing in the input sequence.
fn:minutes-from-dateTime
- Signature
fn:minutes-from-dateTime($arg as xs:dateTime?) as xs:integer?- Description
Returns the minute component of an
xs:dateTime.
fn:minutes-from-duration
- Signature
fn:minutes-from-duration($arg as xs:duration?) as xs:integer?- Description
Returns the number of minutes in a duration.
fn:minutes-from-time
- Signature
fn:minutes-from-time($arg as xs:time?) as xs:integer?- Description
Returns the minutes component of an
xs:time.
fn:month-from-date
- Signature
fn:month-from-date($arg as xs:date?) as xs:integer?- Description
Returns the month component of an
xs:date.
fn:month-from-dateTime
- Signature
fn:month-from-dateTime($arg as xs:dateTime?) as xs:integer?- Description
Returns the month component of an
xs:dateTime.
fn:months-from-duration
- Signature
fn:months-from-duration($arg as xs:duration?) as xs:integer?- Description
Returns the number of months in a duration.
fn:name
- Signature
fn:name() as xs:string
fn:name($arg as node()?) as xs:string- Description
Returns the name of a node, as an
xs:stringthat is either the zero-length string, or has the lexical form of anxs:QName.
fn:namespace-uri
- Signature
fn:namespace-uri() as xs:anyURI
fn:namespace-uri($arg as node()?) as xs:anyURI- Description
Returns the namespace URI part of the name of
$arg, as anxs:anyURIvalue.
fn:namespace-uri-for-prefix
- Signature
fn:namespace-uri-for-prefix($prefix as xs:string?, $element as element()) as xs:anyURI?- Description
Returns the namespace URI of one of the in-scope namespaces for
$element, identified by its namespace prefix.
fn:namespace-uri-from-QName
- Signature
fn:namespace-uri-from-QName($arg as xs:QName?) as xs:anyURI?- Description
Returns the namespace URI part of the supplied QName.
fn:nilled
- Signature
fn:nilled() as xs:boolean?
fn:nilled($arg as node()?) as xs:boolean?- Description
Returns true for an element that is nilled.
fn:node-name
- Signature
fn:node-name() as xs:QName?
fn:node-name($arg as node()?) as xs:QName?- Description
Returns the name of a node, as an
xs:QName.
fn:normalize-space
- Signature
fn:normalize-space() as xs:string
fn:normalize-space($arg as xs:string?) as xs:string- Description
Returns the value of
$argwith leading and trailing whitespace removed, and sequences of internal whitespace reduced to a single space character.
fn:normalize-unicode
- Signature
fn:normalize-unicode($arg as xs:string?) as xs:string
fn:normalize-unicode($arg as xs:string?, $normalizationForm as xs:string) as xs:string- Description
Returns the value of
$argafter applying Unicode normalization.
fn:not
- Signature
fn:not($arg as item()*) as xs:boolean- Description
Returns
trueif the effective boolean value of$argisfalse, orfalseif it istrue.
fn:number
- Signature
fn:number() as xs:double
fn:number($arg as xs:anyAtomicType?) as xs:double- Description
Returns the value indicated by
$argor, if$argis not specified, the context item after atomization, converted to anxs:double.
fn:one-or-more
- Signature
fn:one-or-more($arg as item()*) as item()+- Description
Returns
$argif it contains one or more items. Otherwise, raises an error.
fn:outermost
- Signature
fn:outermost($nodes as node()*) as node()*- Description
Returns every node within the input sequence that has no ancestor that is itself a member of the input sequence; the nodes are returned in document order with duplicates eliminated.
fn:parse-ietf-date
- Signature
fn:parse-ietf-date($value as xs:string?) as xs:dateTime?- Description
Parses a string containing the date and time in IETF format, returning the corresponding
xs:dateTimevalue.
fn:parse-json
- Signature
fn:parse-json($json-text as xs:string?) as item()?
fn:parse-json($json-text as xs:string?, $options as map(*)) as item()?- Description
Parses a string supplied in the form of a JSON text, returning the results typically in the form of a map or array.
fn:parse-xml
- Signature
fn:parse-xml($arg as xs:string?) as document-node(element(*))?- Description
This function takes as input an XML document represented as a string, and returns the document node at the root of an XDM tree representing the parsed document.
fn:parse-xml-fragment
- Signature
fn:parse-xml-fragment($arg as xs:string?) as document-node()?- Description
This function takes as input an XML external entity represented as a string, and returns the document node at the root of an XDM tree representing the parsed document fragment.
fn:path
- Signature
fn:path() as xs:string?
fn:path($arg as node()?) as xs:string?- Description
Returns a path expression that can be used to select the supplied node relative to the root of its containing document.
fn:position
- Signature
fn:position() as xs:integer- Description
Returns the context position from the dynamic context.
fn:prefix-from-QName
- Signature
fn:prefix-from-QName($arg as xs:QName?) as xs:NCName?- Description
Returns the prefix component of the supplied QName.
fn:QName
- Signature
fn:QName($paramURI as xs:string?, $paramQName as xs:string) as xs:QName- Description
Returns an
xs:QNamevalue formed using a supplied namespace URI and lexical QName.
fn:random-number-generator
- Signature
fn:random-number-generator() as map(xs:string, item())
fn:random-number-generator($seed as xs:anyAtomicType?) as map(xs:string, item())- Description
Returns a random number generator, which can be used to generate sequences of random numbers.
fn:remove
- Signature
fn:remove($target as item()*, $position as xs:integer) as item()*- Description
Returns a new sequence containing all the items of
$targetexcept the item at position$position.
fn:replace
- Signature
fn:replace($input as xs:string?, $pattern as xs:string, $replacement as xs:string) as xs:string
fn:replace($input as xs:string?, $pattern as xs:string, $replacement as xs:string, $flags as xs:string) as xs:string- Description
Returns a string produced from the input string by replacing any substrings that match a given regular expression with a supplied replacement string.
fn:resolve-QName
- Signature
fn:resolve-QName($qname as xs:string?, $element as element()) as xs:QName?- Description
Returns an
xs:QNamevalue (that is, an expanded-QName) by taking anxs:stringthat has the lexical form of anxs:QName(a string in the form "prefix:local-name" or "local-name") and resolving it using the in-scope namespaces for a given element.
fn:resolve-uri
- Signature
fn:resolve-uri($relative as xs:string?) as xs:anyURI?
fn:resolve-uri($relative as xs:string?, $base as xs:string) as xs:anyURI?- Description
Resolves a relative IRI reference against an absolute IRI.
fn:reverse
- Signature
fn:reverse($arg as item()*) as item()*- Description
Reverses the order of items in a sequence.
fn:root
- Signature
fn:root() as node()
fn:root($arg as node()?) as node()?- Description
Returns the root of the tree to which
$argbelongs. This will usually, but not necessarily, be a document node.
fn:round
- Signature
fn:round($arg as xs:numeric?) as xs:numeric?
fn:round($arg as xs:numeric?, $precision as xs:integer) as xs:numeric?- Description
Rounds a value to a specified number of decimal places, rounding upwards if two such values are equally near.
fn:round-half-to-even
- Signature
fn:round-half-to-even($arg as xs:numeric?) as xs:numeric?
fn:round-half-to-even($arg as xs:numeric?, $precision as xs:integer) as xs:numeric?- Description
Rounds a value to a specified number of decimal places, rounding to make the last digit even if two such values are equally near.
fn:seconds-from-dateTime
- Signature
fn:seconds-from-dateTime($arg as xs:dateTime?) as xs:decimal?- Description
Returns the seconds component of an
xs:dateTime.
fn:seconds-from-duration
- Signature
fn:seconds-from-duration($arg as xs:duration?) as xs:decimal?- Description
Returns the number of seconds in a duration.
fn:seconds-from-time
- Signature
fn:seconds-from-time($arg as xs:time?) as xs:decimal?- Description
Returns the seconds component of an
xs:time.
fn:serialize
- Signature
fn:serialize($arg as item()*) as xs:string
fn:serialize($arg as item()*, $params as item()?) as xs:string- Description
This function serializes the supplied input sequence
$argas described in [XSLT and XQuery Serialization 3.1], returning the serialized representation of the sequence as a string.
fn:sort
- Signature
fn:sort($input as item()*) as item()*
fn:sort($input as item()*, $collation as xs:string?) as item()*
fn:sort($input as item()*, $collation as xs:string?, $key as function(item()) as xs:anyAtomicType*) as item()*- Description
Sorts a supplied sequence, based on the value of a sort key supplied as a function.
fn:starts-with
- Signature
fn:starts-with($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean
fn:starts-with($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:boolean- Description
Returns true if the string
$arg1contains$arg2as a leading substring, taking collations into account.
fn:static-base-uri
- Signature
fn:static-base-uri() as xs:anyURI?- Description
This function returns the value of the static base URI property from the static context.
fn:string
- Signature
fn:string() as xs:string
fn:string($arg as item()?) as xs:string- Description
Returns the value of
$argrepresented as anxs:string.
fn:string-join
- Signature
fn:string-join($arg1 as xs:anyAtomicType*) as xs:string
fn:string-join($arg1 as xs:anyAtomicType*, $arg2 as xs:string) as xs:string- Description
Returns a string created by concatenating the items in a sequence, with a defined separator between adjacent items.
fn:string-length
- Signature
fn:string-length() as xs:integer
fn:string-length($arg as xs:string?) as xs:integer- Description
Returns the number of characters in a string.
fn:string-to-codepoints
- Signature
fn:string-to-codepoints($arg as xs:string?) as xs:integer*- Description
Returns the sequence of codepoints that constitute an
xs:stringvalue.
fn:subsequence
- Signature
fn:subsequence($sourceSeq as item()*, $startingLoc as xs:double) as item()*
fn:subsequence($sourceSeq as item()*, $startingLoc as xs:double, $length as xs:double) as item()*- Description
Returns the contiguous sequence of items in the value of
$sourceSeqbeginning at the position indicated by the value of$startingLocand continuing for the number of items indicated by the value of$length.
fn:substring
- Signature
fn:substring($sourceString as xs:string?, $start as xs:double) as xs:string
fn:substring($sourceString as xs:string?, $start as xs:double, $length as xs:double) as xs:string- Description
Returns the portion of the value of
$sourceStringbeginning at the position indicated by the value of$startand continuing for the number of characters indicated by the value of$length.
fn:substring-after
- Signature
fn:substring-after($arg1 as xs:string?, $arg2 as xs:string?) as xs:string
fn:substring-after($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:string- Description
Returns the part of
$arg1that follows the first occurrence of$arg2, taking collations into account.
fn:substring-before
- Signature
fn:substring-before($arg1 as xs:string?, $arg2 as xs:string?) as xs:string
fn:substring-before($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:string- Description
Returns the part of
$arg1that precedes the first occurrence of$arg2, taking collations into account.
fn:sum
- Signature
fn:sum($arg as xs:anyAtomicType*) as xs:anyAtomicType
fn:sum($arg as xs:anyAtomicType*, $zero as xs:anyAtomicType?) as xs:anyAtomicType?- Description
Returns a value obtained by adding together the values in
$arg.
fn:tail
- Signature
fn:tail($arg as item()*) as item()*- Description
Returns all but the first item in a sequence.
fn:timezone-from-date
- Signature
fn:timezone-from-date($arg as xs:date?) as xs:dayTimeDuration?- Description
Returns the timezone component of an
xs:date.
fn:timezone-from-dateTime
- Signature
fn:timezone-from-dateTime($arg as xs:dateTime?) as xs:dayTimeDuration?- Description
Returns the timezone component of an
xs:dateTime.
fn:timezone-from-time
- Signature
fn:timezone-from-time($arg as xs:time?) as xs:dayTimeDuration?- Description
Returns the timezone component of an
xs:time.
fn:tokenize
- Signature
fn:tokenize($input as xs:string?) as xs:string*
fn:tokenize($input as xs:string?, $pattern as xs:string) as xs:string*
fn:tokenize($input as xs:string?, $pattern as xs:string, $flags as xs:string) as xs:string*- Description
Returns a sequence of strings constructed by splitting the input wherever a separator is found; the separator is any substring that matches a given regular expression.
fn:trace
- Signature
fn:trace($value as item()*) as item()*
fn:trace($value as item()*, $label as xs:string) as item()*- Description
Provides an execution trace intended to be used in debugging queries.
fn:transform
- Signature
fn:transform($options as map(*)) as map(*)- Description
Throws error FOXT0004 when invoked.
Invokes a transformation using a dynamically-loaded XSLT stylesheet.
fn:translate
- Signature
fn:translate($arg as xs:string?, $mapString as xs:string, $transString as xs:string) as xs:string- Description
Returns the value of
$argmodified by replacing or removing individual characters.
fn:true
- Signature
fn:true() as xs:boolean- Description
Returns the
xs:booleanvaluetrue.
fn:unordered
- Signature
fn:unordered($sourceSeq as item()*) as item()*- Description
Returns the items of
$sourceSeqin an implementation-dependent order.
fn:unparsed-text
- Signature
fn:unparsed-text($href as xs:string?) as xs:string?
fn:unparsed-text($href as xs:string?, $encoding as xs:string) as xs:string?- Description
The
fn:unparsed-textfunction reads an external resource (for example, a file) and returns a string representation of the resource.
fn:unparsed-text-available
- Signature
fn:unparsed-text-available($href as xs:string?) as xs:boolean
fn:unparsed-text-available($href as xs:string?, $encoding as xs:string) as xs:boolean- Description
Because errors in evaluating the
fn:unparsed-textfunction are non-recoverable, these two functions are provided to allow an application to determine whether a call with particular arguments would succeed.
fn:unparsed-text-lines
- Signature
fn:unparsed-text-lines($href as xs:string?) as xs:string*
fn:unparsed-text-lines($href as xs:string?, $encoding as xs:string) as xs:string*- Description
The
fn:unparsed-text-linesfunction reads an external resource (for example, a file) and returns its contents as a sequence of strings, one for each line of text in the string representation of the resource.
fn:upper-case
- Signature
fn:upper-case($arg as xs:string?) as xs:string- Description
Converts a string to upper case.
fn:uri-collection
- Signature
fn:uri-collection() as xs:anyURI*
fn:uri-collection($arg as xs:string?) as xs:anyURI*- Description
Returns a sequence of
xs:anyURIvalues representing the URIs in a URI collection.
fn:xml-to-json
- Signature
fn:xml-to-json($input as node()?) as xs:string?
fn:xml-to-json($input as node()?, $options as map(*)) as xs:string?- Description
Converts an XML tree, whose format corresponds to the XML representation of JSON defined in this specification, into a string conforming to the JSON grammar.
fn:year-from-date
- Signature
fn:year-from-date($arg as xs:date?) as xs:integer?- Description
Returns the year component of an
xs:date.
fn:year-from-dateTime
- Signature
fn:year-from-dateTime($arg as xs:dateTime?) as xs:integer?- Description
Returns the year component of an
xs:dateTime.
fn:years-from-duration
- Signature
fn:years-from-duration($arg as xs:duration?) as xs:integer?- Description
Returns the number of years in a duration.
fn:zero-or-one
- Signature
fn:zero-or-one($arg as item()*) as item()?- Description
Returns
$argif it contains zero or one items. Otherwise, raises an error.