XML technologies / XSLT / XSLT Kochbuch / Extending and embedding XSLT / Xalan-Java 2 extension functions

(Excerpt from "XSLT Kochbuch" by Sal Mangano)

XSLT 1.0 (Xalan-Java 2.6.2)

Extension functions in Xalan-Java 2 are bound using two Xalan extensions, xalan:component and xalan:script, with the relevant Xalan namespace URI is "http://xml.apache.org/xslt".

The element xalan:component associates the extension namespace prefix with the names of extension functions or elements defined by the surrounding element xalan:script. The element xalan:script defines the language in which the extension is implemented and its associated implementation. Several options are available. Occasional users of Java-based extensions should note that Xalan supports a shorthand syntax requiring no xalan:component or xalan:script elements. Simply declare the namespace in one of the forms shown here and call the Java function with the appropriate syntax. This shorthand does not apply to scripting languages.

  

 

 

 

back to top