|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XSL Xalan extension problem
Hi,
I'm beginning with SXL extensions and I tried the example below but only got XSLT Error (javax.xml.transform.TransformerException): java.lang.NoSuchMethodException: For extension function, could not find method org.apache.xml.utils.NodeVector.convertDate([ExpressionContext,] ). I don't understand what it corresponds to or where I'm wrong. Could somebody help me please ? Many Thks, ------------- Java class : Converter ------------- package TestXalan; public class Converter
{ public Converter()
{
} public String convertDate(String aDate)
{
String aString ="";
// (...)
return aString;
}
}------------------ XLS sheet : ConvertCat002.xsl ----------------- <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xalan" xmlns:my-class="java:TestXalan.Converter"> <xalan:component prefix="my-class" functions="convertDate"> <xalan:script lang="javaclass" src="xalan://TestXalan.Converter"/> </xalan:component> <xsl:output method="xml"/> <xsl:template match="ReservationEffectiveDate|TicketingEffectiveDate|TravelEffectiveDate"> <xsl:variable name="date" select="."/> <xsl:value-of select="my-class:convertDate($date)"/> </xsl:template> </xsl:stylesheet> -------------- and I'm calling @java -classpath C:/xerces-2_6_0/xercesImpl.jar;C:/jwsdp-1.3/jaxp/lib/endorsed/xalan.jar;lib/bsf.jar;lib/bsfengines.jar;classes org.apache.xalan.xslt.Process -in Cat002.xml -xsl ConvertCat002.xsl -out ConvertedCat002.xml _________________________________________________________________ MSN Messenger http://g.msn.fr/FR1001/866 : dialoguez en direct et gratuitement avec vos amis !
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








