Recipe14.4.Java Extension Function Using the Class Format Namespace


Recipe 14.4. Java Extension Function Using the Class Format Namespace

<xsl:stylesheet  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xslt" xmlns:Math="xalan://java.lang.Math">     <xalan:component prefix="Math" functions="sin cos tan atan">  <xalan:script lang="javaclass" src="/books/2/765/1/html/2/xalan://java.lang.Math"/> </xalan:component>     <xsl:variable name="pi" select="4.0 *"/> <!-- ... --> </xsl:stylesheet>

If you use this form and omit the xalan:component element, then your stylesheet can work with both Saxon and Xalan.




XSLT Cookbook
XSLT Cookbook: Solutions and Examples for XML and XSLT Developers, 2nd Edition
ISBN: 0596009747
EAN: 2147483647
Year: 2003
Pages: 208
Authors: Sal Mangano

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net