XPath/XQuery Functions: Miscellaneous

www.altova.com Expand/Collapse All Print this Topic Previous Page Up One Level Next page

Home >  Appendices > Engine information > XSLT and XPath/XQuery Functions > Altova Extension Functions >

XPath/XQuery Functions: Miscellaneous

The following general purpose XPath/XQuery extension functions are supported in the current version of MapForce and can be used in (i) XPath expressions in an XSLT context, or (ii) XQuery expressions in an XQuery document.


Note about naming of functions and language applicability

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. Altova extension functions are in the Altova extension functions namespace, http://www.altova.com/xslt-extensions, and are indicated in this section with the prefix altova:, which is assumed to be bound to this namespace. Note that, in future versions of your product, support for a function might be discontinued or the behavior of individual functions might change. Consult the documentation of future releases for information about support for Altova extension functions in that release.


XPath functions (used in XPath expressions in XSLT):

XP1 XP2 XP3.1

XSLT functions (used in XPath expressions in XSLT):


XQuery functions (used in XQuery expressions in XQuery):

XQ1 XQ3.1



Click to expand/collapseget-temp-folder [altova:]

altova:get-temp-folder() as xs:string     XP2 XQ1 XP3.1 XQ3.1

This function takes no argument. It returns the path to the temporary folder of the current user.

altova:get-temp-folder() would return, on a Windows machine, something like C:\Users\<UserName>\AppData\Local\Temp\ as an xs:string.



Click to expand/collapsegenerate-guid [altova:]

altova:generate-guid() as xs:string     XP2 XQ1 XP3.1 XQ3.1

Generates a unique string GUID string.

altova:generate-guid() returns (for example) 85F971DA-17F3-4E4E-994E-99137873ACCD



Click to expand/collapsehigh-res-timer [altova:]

altova: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.

altova:high-res-timer() returns something like '1.16766146154566E6'



Click to expand/collapseparse-html [altova:]

altova: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.

altova:parse-html("<html><head/><body><h1>Header</h1></body></html>") creates an HTML tree from the submitted string  



Click to expand/collapsesleep[altova:]

altova: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.

altova:sleep(1000) suspends execution of the current operation for 1000 milliseconds.



[ Top ]


© 2019 Altova GmbH