XPath/XQuery Functions: Miscellaneous
These miscellaneous extension functions can be used in XPath and XQuery expressions and provide additional functionality for the processing of data.
Altova extension functions can be used in XPath/XQuery expressions. They provide additional functionality to the functionality that is available in the standard library of XPath, XQuery, and XSLT functions.
•In order to distinguish Altova extension functions from functions in the standard library, Altova extension functions are named in this documentation with a suffix of [altova:]. For example: add-years-to-date [altova:].
•When using Altova extension functions in your XPath/XQuery expressions, however, you must use the function without any prefix or suffix, just as you would use any standard XPath/XQuery function. Use an Altova extension like this: add-years-to-date(xs:date("2014-01-15"), 10).
decode-string(Input as xs:base64Binary) as xs:string XP3.1 XQ3.1
decode-string(Input as xs:base64Binary, Encoding as xs:string) as xs:string XP3.1 XQ3.1
Decodes the submitted base64Binary input to a string using the specified encoding. If no encoding is specified, then the UTF-8 encoding is used. The following encodings are supported: US-ASCII, ISO-8859-1, UTF-16, UTF-16LE, UTF-16BE, ISO-10646-UCS2, UTF-32, UTF-32LE, UTF-32BE, ISO-10646-UCS4
encode-string(InputString as xs:string) as xs:base64Binaryinteger XP3.1 XQ3.1
encode-string(InputString as xs:string, Encoding as xs:string) as xs:base64Binaryinteger XP3.1 XQ3.1
Encodes the submitted string using, if one is given, the specified encoding. If no encoding is given, then the UTF-8 encoding is used. The encoded string is converted to base64Binary characters, and the converted base64Binary value is returned. Initially, UTF-8 encoding is supported, and support will be extended to the following encodings: US-ASCII, ISO-8859-1, UTF-16, UTF-16LE, UTF-16BE, ISO-10646-UCS2, UTF-32, UTF-32LE, UTF-32BE, ISO-10646-UCS4
generate-guid() as xs:string XP2 XQ1 XP3.1 XQ3.1
Generates a unique string GUID string.
high-res-timer() as xs:double XP3.1 XQ3.1
Returns a system high-resolution timer value in seconds. A high-resolution timer, when present on a system, enables high precision time measurements when these are required (for example, in animations and for determining precise code-execution time). This function provides the resolution of the system's high-res timer.
parse-html(HTMLText as xs:string) as node() XP3.1 XQ3.1
The HTMLText argument is a string that contains the text of an HTML document. The function creates an HTML tree from the string. The submitted string may or may not contain the HTML element. In either case, the root element of the tree is an element named HTML. It is best to make sure that the HTML code in the submitted string is valid HTML.
sleep(Millisecs as xs:integer) as empty-sequence() XP2 XQ1 XP3.1 XQ3.1
Suspends execution of the current operation for the number of milliseconds given by the Millisecs argument.
[ Top ]