A RESTful browser for eXist Java-Based Function Modules


http://exist-db.org/xquery/util
A module for various utility extension functions.

util:base-to-integer($number as item(), $base as xs:integer) xs:integer
Converts the number $number from base $base to xs:integer.
$numberThe number to convert
$baseThe base of $number

Returns the xs:integer representation of $number in base $base

util:binary-doc($binary-resource as xs:string?) xs:base64Binary?
Retrieves the binary resource and returns its contents as a value of type xs:base64Binary. An empty sequence is returned if the resource could not be found or $binary-resource was empty.
$binary-resourceThe path to the binary resource

Returns the binary document

util:binary-doc-available($binary-resource as xs:string?) xs:boolean
Checks if the binary resource identified by $binary-resource is available.
$binary-resourceThe path to the binary resource

Returns true if the binary document is available

util:binary-to-string($binary-resource as xs:base64Binary?) xs:string?
Returns the contents of a binary resource as an xs:string value. The binary data is transformed into a Java string using the encoding specified in the optional second argument or the default of UTF-8.
$binary-resourceThe binary resource

Returns the string containing the encoded binary resource

util:binary-to-string($binary-resource as xs:base64Binary?, $encoding as xs:string) xs:string?
Returns the contents of a binary resource as an xs:string value. The binary data is transformed into a Java string using the encoding specified in the optional second argument or the default of UTF-8.
$binary-resourceThe binary resource
$encodingThe encoding type. i.e. 'UTF-8'

Returns the string containing the encoded binary resource

util:call($function-reference as function, $parameters as item()*, ...) item()*
Invokes a first-class function reference created by util:function. The function to be called is passed as the first argument. All remaining arguments are forwarded to the called function.
$function-referenceThe function to ba called
$parametersThe parameters to be passed into the function

Returns the results from the function called

util:catch($java-classnames as xs:string+, $try-code-blocks as item()*, $catch-code-blocks as item()*) item()*
This function corresponds to a try-catch statement in Java. The code block in $try-code-blocks will be put inside a try-catch statement. If an exception is thrown while executing $try-code-blocks, the function checks the name of the exception and calls $catch-code-blocks if it matches one of the fully qualified Java class names specified in $java-classnames. A value of "*" in $java-classnames will catch all java exceptions
$java-classnamesThe list of one or more fully qualified Java class names. An entry of '*' will catch all java exceptions.
$try-code-blocksThe code blocks that will be put inside of a the try part of the try-catch statement.
$catch-code-blocksThe code blocks that will be will called if the catch matches one of the $java-classnames

Returns the results from the try-catch

util:collations() xs:string*
Returns a sequence of strings containing all collation locales that might be specified in the '?lang=' parameter of a collation URI.

Returns the sequence of strings containing all collation locales that might be specified in the '?lang=' parameter of a collation URI.

util:collection-name($node-or-path-string as item()?) xs:string?
Returns the name of the collection from a passed node or path string. If the argument is a node, the function returns the name of the collection to which the node's document belongs. If the argument is a string, it is interpreted as path to a resource and the function returns the computed parent collection path for this resource.
$node-or-path-stringThe document node or a path string.

Returns the name of the collection.

util:compile($expression as xs:string) xs:string
Dynamically evaluates the XPath/XQuery expression specified in $expression within the current instance of the query engine.
$expressionThe XPath/XQuery expression.

Returns the results of the expression

util:declare-namespace($prefix as xs:string, $namespace-uri as xs:anyURI) empty()
Dynamically declares a namespace/prefix mapping for the current context.
$prefixThe prefix to be assigned to the namespace
$namespace-uriThe namespace URI

util:declare-option($name as xs:string, $option as xs:string) empty()
Dynamically declares a serialization option as with 'declare option'.
$nameThe serialization option name
$optionThe serialization option value

util:deep-copy($item as item()?) item()?
Performs a Deep Clone of the passed in item.
$itemThe item to be cloned

Returns the item clone

util:describe-function($function-name as xs:QName) node()
Describes a built-in function. Returns an element describing the function signature.
$function-nameThe name of the function to get the signature of

Returns the signature of the function

util:disable-profiling() empty()
Disable profiling output within the query.

util:doctype($doctype as xs:string+, ...) node()*
Returns the document nodes of the documents with the given DOCTYPE(s).
$doctypeThe DOCTYPE of the documents to find

Returns the document nodes

util:document-id($node-or-path as item()) xs:int?
Returns the internal integer id of a document. The argument can either be a node or a string path pointing to a resource in the database. If the resource does not exist or the node does not belong to a stored document, the empty sequence is returned.
$node-or-pathThe node or a string path pointing to a resource in the database.

Returns the ID of the document

util:document-name($node-or-path as item()) xs:string?
Returns the name of a document (excluding the collection path). The argument can either be a node or a string path pointing to a resource in the database. If the resource does not exist or the node does not belong to a stored document, the empty sequence is returned.
$node-or-pathThe node or a string path pointing to a resource in the database.

Returns the name of the document

util:enable-profiling($verbosity as xs:int) empty()
Enable profiling output within the query. The profiling starts with this function call and will end with a call to 'disable-profiling'. Argument $verbosity specifies the verbosity. All other profiling options can be configured via the 'declare option exist:profiling ...' in the query prolog.
$verbosityThe verbosity of the profiling

util:eval($expression as item()) node()*
Dynamically evaluates an XPath/XQuery expression.
$expressionThe expression to be evaluated. If it is of type xs:string, the function tries to execute this string as the query. If the first argument is of type xs:anyURI, the function will try to load the query from the resource to which the URI resolves. If the URI has no scheme, it is assumed that the query is stored in the db and the URI is interpreted as a database path. This is the same as calling util:eval(xs:anyURI('xmldb:exist:///db/test/test.xq')). The query inherits the current execution context, i.e. all namespace declarations and variable declarations are visible from within the inner expression. The function returns an empty sequence if a whitespace string is passed.

Returns the results of the evaluated XPath/XQuery expression

util:eval($expression as item(), $cache-flag as xs:boolean) node()*
Dynamically evaluates an XPath/XQuery expression.
$expressionThe expression to be evaluated. If it is of type xs:string, the function tries to execute this string as the query. If the first argument is of type xs:anyURI, the function will try to load the query from the resource to which the URI resolves. If the URI has no scheme, it is assumed that the query is stored in the db and the URI is interpreted as a database path. This is the same as calling util:eval(xs:anyURI('xmldb:exist:///db/test/test.xq')). The query inherits the current execution context, i.e. all namespace declarations and variable declarations are visible from within the inner expression. The function returns an empty sequence if a whitespace string is passed.
$cache-flagThe flag for whether the compiled query should be cached. The cached query will be globally available within the db instance.

Returns the results of the evaluated XPath/XQuery expression

util:eval-inline($inline-context as item()*, $expression as item()) item()*
Dynamically evaluates an XPath/XQuery expression.
$inline-contextThe inline context
$expressionThe expression to be evaluated. If it is of type xs:string, the function tries to execute this string as the query. If the first argument is of type xs:anyURI, the function will try to load the query from the resource to which the URI resolves. If the URI has no scheme, it is assumed that the query is stored in the db and the URI is interpreted as a database path. This is the same as calling util:eval(xs:anyURI('xmldb:exist:///db/test/test.xq')). The query inherits the current execution context, i.e. all namespace declarations and variable declarations are visible from within the inner expression. The function returns an empty sequence if a whitespace string is passed.

Returns the results of the evaluated XPath/XQuery expression

util:eval-with-context($expression as item(), $context as node()?, $cache-flag as xs:boolean) node()*
Dynamically evaluates an XPath/XQuery expression.
$expressionThe expression to be evaluated. If it is of type xs:string, the function tries to execute this string as the query. If the first argument is of type xs:anyURI, the function will try to load the query from the resource to which the URI resolves. If the URI has no scheme, it is assumed that the query is stored in the db and the URI is interpreted as a database path. This is the same as calling util:eval(xs:anyURI('xmldb:exist:///db/test/test.xq')). The query inherits the current execution context, i.e. all namespace declarations and variable declarations are visible from within the inner expression. The function returns an empty sequence if a whitespace string is passed.
$cache-flagThe flag for whether the compiled query should be cached. The cached query will be globally available within the db instance.

Returns the results of the evaluated XPath/XQuery expression

util:eval-with-context($expression as item(), $context as node()?, $cache-flag as xs:boolean, $eval-context-item as item()?) node()*
Dynamically evaluates an XPath/XQuery expression.
$expressionThe expression to be evaluated. If it is of type xs:string, the function tries to execute this string as the query. If the first argument is of type xs:anyURI, the function will try to load the query from the resource to which the URI resolves. If the URI has no scheme, it is assumed that the query is stored in the db and the URI is interpreted as a database path. This is the same as calling util:eval(xs:anyURI('xmldb:exist:///db/test/test.xq')). The query inherits the current execution context, i.e. all namespace declarations and variable declarations are visible from within the inner expression. The function returns an empty sequence if a whitespace string is passed.
$cache-flagThe flag for whether the compiled query should be cached. The cached query will be globally available within the db instance.
$eval-context-itemthe context item against which the expression will be evaluated

Returns the results of the evaluated XPath/XQuery expression

util:exclusive-lock($nodes as node()*, $expression as item()*) item()*
Puts an exclusive lock on the owner documents of all nodes in the first argument $nodes. Then evaluates the expressions in the second argument $expression and releases the acquired locks after their completion.
$nodesThe nodes whose owning documents will have exclusive locks set.
$expressionThe expression(s) that are to be evaluated before the acquired locks are released.

Returns the results of the evaluated expression(s)

util:eXist-version() xs:string
Returns the version of eXist running this query.

Returns the version string

Deprecated: Moved to system module and renamed to system:get-version. This function could be removed at anytime during the 1.5 development and will be removed in the 1.6 release.

util:expand($node as node()*) node()*
Creates an in-memory copy of the passed node set, using the specified serialization options. By default, full-text match terms will be tagged with <exist:match> and XIncludes will be expanded.
$nodeThe node(s) to create in-memory copies of.

Returns the results

util:expand($node as node()*, $serialization-parameters as xs:string) node()*
Creates an in-memory copy of the passed node set, using the specified serialization options. By default, full-text match terms will be tagged with <exist:match> and XIncludes will be expanded. Serialization parameters can be set in the second argument, which accepts the same parameters as the exist:serialize option.
$nodeThe node(s) to create in-memory copies of.
$serialization-parametersThe serialization parameters

Returns the results

util:extract-docs($uri as xs:string) node()?
Returns an XML document which describes the functions available in a given module. The module is identified through its module namespace URI, which is passed as an argument. The function returns a module documentation in XQDoc format.
$uriThe namespace URI of the function module

Returns the xqdocs for the function module

util:file-read($url as item()) xs:string?
Read the contents of a file as a string.
$urlThe URL of the file to read

Returns the contents of the file

Deprecated: Moved to the file extension module. See file:read() in the file extension module This function could be removed at anytime during the 1.5 development and will be removed in the 1.6 release.

util:file-read($url as item(), $encoding as xs:string) xs:string?
Read the contents of a file as a string.
$urlThe URL of the file to read
$encodingThe encoding of the file

Returns the contents of the file

Deprecated: Moved to the file extension module. See file:read() in the file extension module This function could be removed at anytime during the 1.5 development and will be removed in the 1.6 release.

util:function($name as xs:QName, $arity as xs:integer) function
Creates a reference to an XQuery function which can later be called from util:call. This allows for higher-order functions to be implemented in XQuery. A higher-order function is a function that takes another function as argument. The first argument represents the name of the function, which should bea valid QName. The second argument is the arity (number of parameters) of the function. If no function can be found that matches the name and arity, an error is thrown. Please note: the arguments to this function have to be literals or need to be resolvable at compile time at least.
$nameThe name of the function
$arityThe arity of the function

Returns the reference to the XQuery function

util:get-fragment-between($beginning-node as node()?, $ending-node as node()?, $make-fragment as xs:boolean?) xs:string
Returns an xml fragment or a sequence of nodes between two elements (normally milestone elements). The $beginning-node represents the first node/milestone element, $ending-node, the second one. The third argument, $make-fragment, is a boolean value for the path completion. If it is set to true() the result sequence is wrapped into a parent element node. Example call of the function for getting the fragment between two TEI page break element nodes: let $fragment := util:get-fragment-between(//pb[1], //pb[2], true())
$beginning-nodeThe first node/milestone element
$ending-nodeThe second node/milestone element
$make-fragmentThe flag make a fragment.

Returns the string containing the fragments between the two node/milestone elements.

util:get-module-description($namespace-uri as xs:string) xs:string
Returns a short description of the module identified by the namespace URI.
$namespace-uriThe namespace URI of the module

Returns the description of the active function module identified by the namespace URI

util:get-sequence-type($sequence-type as xs:anyType*) xs:string
Returns the string representation of the type of sequence.
$sequence-typeThe type of sequence

Returns the string representation of the type of sequence

util:hash($message as item(), $algorithm as xs:string) xs:string
Calculates a hashcode from a string based on a specified algorithm.
$messageThe string to generate the hashcode from
$algorithmThe algorithm used to generate the hashcode

Returns the hashcode

util:hash($message as item(), $algorithm as xs:string, $base64flag as xs:boolean) xs:string
Calculates a hashcode from a string based on a specified algorithm.
$messageThe string to generate the hashcode from
$algorithmThe algorithm used to generate the hashcode
$base64flagThe flag that specifies whether to return the result as Base64 encoded

Returns the hashcode

util:import-module($module-uri as xs:anyURI, $prefix as xs:string, $location as xs:anyURI) empty()
Dynamically imports an XQuery module into the current context. The parameters have the same meaning as in an 'import module ...' expression in the query prolog.
$module-uriThe namespace URI of the module
$prefixThe prefix to be assigned to the namespace
$locationThe location of the module

util:index-key-documents($nodes as node()*, $value as xdt:anyAtomicType) xs:integer?
Return the number of documents for an indexed value.
$nodesThe nodes whose content is indexed
$valueThe indexed value to search for

Returns the number of documents for the indexed value

util:index-key-documents($nodes as node()*, $value as xdt:anyAtomicType, $index as xs:string) xs:integer?
Return the number of documents for an indexed value.
$nodesThe nodes whose content is indexed
$valueThe indexed value to search for
$indexThe index in which the search is made

Returns the number of documents for the indexed value

util:index-key-occurrences($nodes as node()*, $value as xdt:anyAtomicType) xs:integer?
Return the number of occurrences for an indexed value.
$nodesThe nodes whose content is indexed
$valueThe indexed value to search for

Returns the number of occurrences for the indexed value

util:index-key-occurrences($nodes as node()*, $value as xdt:anyAtomicType, $index as xs:string) xs:integer?
Return the number of occurrences for an indexed value.
$nodesThe nodes whose content is indexed
$valueThe indexed value to search for
$indexThe index in which the search is made

Returns the number of occurrences for the indexed value

util:index-keys($node-set as node()*, $start-value as xdt:anyAtomicType, $function-reference as function, $max-number-returned as xs:int) item()*
Can be used to query existing range indexes defined on a set of nodes. All index keys defined for the given node set are reported to a callback function. The function will check for indexes defined on path as well as indexes defined by QName.
$node-setThe node set
$start-valueOnly index keys of the same type but being greater than $start-value will be reported for non-string types. For string types, only keys starting with the given prefix are reported.
$function-referenceThe function reference as created by the util:function function. It can be an arbitrary user-defined function, but it should take exactly 2 arguments: 1) the current index key as found in the range index as an atomic value, 2) a sequence containing three int values: a) the overall frequency of the key within the node set, b) the number of distinct documents in the node set the key occurs in, c) the current position of the key in the whole list of keys returned.
$max-number-returnedThe maximum number of returned keys

Returns the results of the eval of the $function-reference

util:index-keys($node-set as node()*, $start-value as xdt:anyAtomicType, $function-reference as function, $max-number-returned as xs:int, $index as xs:string) item()*
Can be used to query existing range indexes defined on a set of nodes. All index keys defined for the given node set are reported to a callback function. The function will check for indexes defined on path as well as indexes defined by QName.
$node-setThe node set
$start-valueOnly index keys of the same type but being greater than $start-value will be reported for non-string types. For string types, only keys starting with the given prefix are reported.
$function-referenceThe function reference as created by the util:function function. It can be an arbitrary user-defined function, but it should take exactly 2 arguments: 1) the current index key as found in the range index as an atomic value, 2) a sequence containing three int values: a) the overall frequency of the key within the node set, b) the number of distinct documents in the node set the key occurs in, c) the current position of the key in the whole list of keys returned.
$max-number-returnedThe maximum number of returned keys
$indexThe index in which the search is made

Returns the results of the eval of the $function-reference

util:index-type($set-of-nodes as node()*) xs:string?
Returns the range index type for a set of nodes or an empty sequence if no index is defined.
$set-of-nodesThe set of nodes

Returns the range index type

util:integer-to-base($number as xs:integer, $base as xs:integer) xs:string
Converts the xs:integer $number (unsigned) into base $base as xs:string. Bases 2, 8, and 16 are supported.
$numberThe number to convert
$baseThe base of $number

Returns the xs:string representation of $number in base $base

util:is-binary-doc($binary-resource as xs:string?) xs:boolean
Checks if the resource identified by $binary-resource is a binary resource.
$binary-resourceThe path to the binary resource

Returns true if the resource is a binary document

util:is-module-registered($namespace-uri as xs:string) xs:boolean
Returns a Boolean value if the module identified by the namespace URI is registered.
$namespace-uriThe namespace URI of the module

Returns true if the namespace URI is registered as an active function module

util:log($priority as xs:string, $message as item()*) empty()
Logs the message to the current logger.
$priorityThe logging priority: 'error', 'warn', 'debug', 'info', 'trace'
$messageThe message to log

util:log-app($priority as xs:string, $logger-name as xs:string, $message as item()*) empty()
Logs the message to the named logger
$priorityThe logging priority: 'error', 'warn', 'debug', 'info', 'trace'
$logger-nameThe name of the logger, eg: my.app.log
$messageThe message to log

util:log-system-err($message as item()*) empty()
Logs the message to System.err.
$messageThe message to log

util:log-system-out($message as item()*) empty()
Logs the message to System.out.
$messageThe message to log

util:md5($arg as item()) xs:string
Generates an MD5 key from a string.
$argThe input string

Returns the MD5 key

Deprecated: Use the hash($a, "MD5") function instead. SHA-1 is supported as more secure message digest algorithm. This function could be removed at anytime during the 1.5 development and will be removed in the 1.6 release.

util:md5($arg as item(), $base64encoded as xs:boolean) xs:string
Generates an MD5 key from a string. $b specifies whether to return result Base64 encoded
$argThe input string
$base64encodedThe flag to determine if the result is Base64 encoded

Returns the MD5 key

Deprecated: Use the hash($a, "MD5") function instead. SHA-1 is supported as more secure message digest algorithm. This function could be removed at anytime during the 1.5 development and will be removed in the 1.6 release.

util:node-by-id($document as node(), $node-id as xs:string) node()
Retrieves a node by its internal node-id. The document is specified via the first argument. It may either be a document node or another node from the same document from which the target node will be retrieved by its id. The second argument is the internal node-id, specified as a string. Please note: the function does not check if the passed id does really point to an existing node. It just returns a pointer, which may thus be invalid.
$documentThe document whose node is to be retrieved by its id
$node-idThe internal node id

Returns the node

util:node-id($node as node()) xs:string
Returns the internal node-id of a node. The internal node-id uniquely identifies a node within its document. It is encoded as a long number.
$nodeThe node to get the internal node-id from

Returns the internal node-id

util:node-xpath($node as node()) xs:string?
Returns the XPath for a Node.
$nodeThe node to retrieve the XPath to

Returns the XPath expression of the node

util:parse($to-be-parsed as xs:string?) node()*
Parses the passed string value into an XML fragment. The string has to be well-formed XML. An empty sequence is returned if the argument is an empty string or sequence.
$to-be-parsedThe string to be parsed

Returns the XML fragment parsed from the string

util:parse-html($to-be-parsed as xs:string?) node()*
Parses the passed string value into an XML fragment. The HTML string may not be well-formed XML. It will be passed through the Neko HTML parser to make it well-formed. An empty sequence is returned if the argument is an empty string or sequence.
$to-be-parsedThe string to be parsed

Returns the XML fragment parsed from the string

util:qname-index-lookup($qname as xs:QName, $comparison-value as xdt:anyAtomicType) node()*
Can be used to query existing qname indexes defined on a set of nodes.
$qnameThe QName
$comparison-valueThe comparison value

Returns the result

util:random($max as xs:integer) xs:integer
Returns a random number between 0 and $max
$maxThe maximum value for the random number.

Returns a random number between 0 and $max

util:random() xs:double
Returns a random number between 0.0 and 1.0

Returns a random number between 0.0 and 1.0

util:registered-functions($namespace-uri as xs:string) xs:string+
Returns a sequence containing the QNames of all functions declared in the module identified by the specified namespace URI. An error is raised if no module is found for the specified URI.
$namespace-uriThe namespace URI of the function module

Returns the sequence of function names

util:registered-functions() xs:string+
Returns a sequence containing the QNames of all functions currently known to the system, including functions in imported and built-in modules.

Returns the sequence of function names

util:registered-modules() xs:string+
Returns a sequence containing the namespace URIs of all modules currently known to the system, including built in and imported modules.

Returns the sequence of all of the active function modules namespace URIs

util:serialize($a as node()*, $b as xs:string, $c as xs:string*) xs:boolean?
Writes the node set passed in parameter $a into a file on the file system. The full path to the file is specified in parameter $b. $c contains a sequence of zero or more serialization parameters specified as key=value pairs. The serialization options are the same as those recognized by "declare option exist:serialize". The function does NOT automatically inherit the serialization options of the XQuery it is called from. False is returned if the specified file can not be created or is not writable, true on success. The empty sequence is returned if the argument sequence is empty.

Deprecated: Use the file:serialize() function in the file extension module instead! This function could be removed at anytime during the 1.5 development and will be removed in the 1.6 release.

util:serialize($node-set as node()*, $parameters as xs:string*) xs:string?
Returns the Serialized node set passed in parameter $node-set. $parameters contains a sequence of zero or more serialization parameters specified as key=value pairs. The serialization options are the same as those recognized by "declare option exist:serialize". The function does NOT automatically inherit the serialization options of the XQuery it is called from.
$node-setThe node set to serialize
$parametersThe serialization parameters

Returns the string containing the serialized node set.

util:shared-lock($nodes as node()*, $expression as item()*) item()*
Puts a shared lock on the owner documents of all nodes in the first argument $nodes. Then evaluates the expressions in the second argument $expression and releases the acquired locks aftertheir completion.
$nodesThe nodes that the shared lock will be placed on their owning documents.
$expressionThe expression to be evaluated before the acquired locks are released.

Returns the results of the evaluation of the expression(s)

util:string-to-binary($encoded-string as xs:string?) xs:base64Binary?
Returns the contents of a binary resource as an xs:string value. The binary data is transformed into a Java string using the encoding specified in the optional second argument or the default of UTF-8.
$encoded-stringThe string containing the encoded binary resource

Returns the binary resource

util:string-to-binary($encoded-string as xs:string?, $encoding as xs:string) xs:base64Binary?
Returns the contents of a binary resource as an xs:string value. The binary data is transformed into a Java string using the encoding specified in the optional second argument or the default of UTF-8.
$encoded-stringThe string containing the encoded binary resource
$encodingthe encoding type. i.e. 'UTF-8'

Returns the binary resource

util:system-date() xs:date
Returns the current xs:date (with timezone) as reported by the Java method System.currentTimeMillis(). Contrary to fn:current-date, this function is not stable, i.e. the returned xs:date will change during the evaluation time of a query and can be used to measure time differences.

Returns the current xs:date (with timezone)

util:system-dateTime() xs:dateTime
Returns the current xs:dateTime (with timezone) as reported by the Java method System.currentTimeMillis(). Contrary to fn:current-dateTime, this function is not stable, i.e. the returned xs:dateTime will change during the evaluation time of a query and can be used to measure time differences.

Returns the current xs:dateTime (with timezone)

util:system-property($property-name as xs:string) xs:string?
Returns the value of a system property. Similar to the corresponding XSLT function. Predefined properties are: vendor, vendor-url, product-name, product-version, product-build, and all Java system properties.
$property-nameThe name of the system property to retrieve the value of.

Returns the value of the named system property

util:system-time() xs:time
Returns the current xs:time (with timezone) as reported by the Java method System.currentTimeMillis(). Contrary to fn:current-time, this function is not stable, i.e. the returned xs:time will change during the evaluation time of a query and can be used to measure time differences.

Returns the current xs:time (with timezone)

util:unescape-uri($escaped-string as xs:string, $encoding as xs:string) xs:string
Returns an un-escaped URL escaped string with the encoding scheme (e.g. "UTF-8"). Decodes encoded sensitive characters from a URL, for example "%2F" becomes "/", i.e. does the oposite to escape-uri()
$escaped-stringThe escaped string to be un-escaped
$encodingThe encoding scheme to use in the un-escaping of the string

Returns the un-escaped string

util:uuid($name as item()) xs:string
Generate a version 3 universally unique identifier (UUID) string, e.g. 154ad200-9c79-44f3-8cff-9780d91552a6
$nameThe input value for UUID calculation.

Returns a generated UUID string

util:uuid() xs:string
Generate a version 4 (random) universally unique identifier (UUID) string, e.g. 154ad200-9c79-44f3-8cff-9780d91552a6

Returns a generated UUID string
Return to list of all modules