Subject: [xsl] Custom function and Saxon From: adrien.dauchez@xxxxxxxxx Date: Mon, 3 May 2004 16:42:20 -0400 |
Hi, I'm trying to use several java custom functions i wrote. First, I've put the java class in a jar file (function.jar) and include the following code in my xsl file : <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version=" 1.0" xmlns:java="http://xml.apache.org/xslt/java" xmlns:pfx="java:Custom"> Here is the code i use in order to print a trimmed data : <IdFamily><xsl:value-of select="pfx:trim(' Test ')"/></ IdFamily> When i execute the Saxon processor, it works well ! Now, i want to include all the classes contained in the same jar file. Let's say i have twos classes names example1.class and example2.class in my jar file. How can i use all the functions specified in the two class files without naming all this classes ? For example i would be able to write : <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version=" 1.0" xmlns:java="http://xml.apache.org/xslt/java" xmlns:pfx="http://<anything i want>"> I will be able to use this specific namespace that will refere to my jar file. (i don't know if it's possible !) Let's say trim() is in the com.example class and trim2() is in the com.example2.class. (both of those two classes are included in the jar file function.jar) <IdFamily><xsl:value-of select="pfx:trim(' Test ')"/></ IdFamily> <IdFamily><xsl:value-of select="pfx:trim2(' Test ')"/></ IdFamily> Thanks for your help. Adrien Dauchez ************************************************************************* This message and any attachments (the "message") are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. *************************************************************************
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] serialization exception, shadab | Thread | RE: [xsl] Custom function and Saxon, Michael Kay |
RE: [xsl] Inserting White Space (&n, Wendell Piez | Date | [xsl] date:difference function in x, Ravi Chayanam |
Month |