+

Search Tips   |   Advanced Search

Use external functions

The XML API allows us to use external functions with XPath, XQuery, and XSLT.

We can define external functions when we want to use operations that are difficult or impossible to express directly by core functions defined in functions and operators, additional functions defined in the XSLT specification, constructor functions named after an atomic type, stylesheet functions defined using xsl:function declaration of XSLT, or user-defined functions in XQuery. Please note that external functions cannot be used to override built-in functions. For example, suppose we are using an external function, my:power(arg1 as xs:double, arg2 as xs:double), to calculate the value of the first argument raised to the power of the second argument; we could write a Java method taking two Java primitive double arguments that performs the calculation. The details of using external functions are presented in separate articles.


Tasks


Subtopics

  • Use external functions with XPath
  • Use external functions with XQuery
  • Use external functions with XSLT