Recipe 14.3. Xalan-Java 2 Extension Functions
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, where the relevant Xalan namespace
URI is http://xml.apache.org/xslt.
The xalan:component element associates the
extension namespace prefix with the names of extension functions or
elements that will be defined by the enclosing
xalan:script element. The
xalan:script element defines the language used to
implement the extension and its associated implementation. The
choices here vary. Casual users of Java-based extensions should note
that Xalan supports an abbreviated syntax that does not require the
use of the xalan:component or
xalan:script elements. Simply declare the
namespace in one of the forms shown here, and invoke the Java
function using the appropriate syntax. For scripting languages, this
shortcut does not apply.
|