XML technologies / XSLT / XSLT Kochbuch / Extending and embedding XSLT / Java extension function with a namespace in package format
(Excerpt from "XSLT Kochbuch" by Sal Mangano)
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xslt" xmlns:myJava="xalan://java.lang">
<xalan:component prefix="Math" functions="sin cos tan atan">
<xalan:script lang="javaclass" src="java.lang"/>
</xalan:component>
<xsl:variable name="pi" select="4.0 * myJava:Math.atan(1.0)"/>
<!-- ... -->
</xsl:stylesheet>This form is useful when you want to reference many classes in the same package.
Copyright © 2006 O'Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from "XSLT Kochbuch" is subject to the same terms as the printed edition: the work and all its parts are protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O'Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de
back to top