Hi Henry,

Thank you for the help. I was able to do the same. I can use the class
transforming with only Xalan, but not from the FOP command line.

This is acceptable as I can write a batch file for each step.

Thanks for the help

Bones



Henry Zongaro wrote:
> 
> Hi, Philip.
> 
> Henry Zongaro/Toronto/[EMAIL PROTECTED] wrote on 2008-03-10 09:06:11 AM:
>> bonekrusher <[EMAIL PROTECTED]> wrote on 2008-03-08 11:36:13 AM:
>> > I am new to Java and XSLT Extensions. I am trying to implement an 
> extension
>> > which stores and receives information from a hash Table. I am trying 
> to do
>> > this with FOP 0.94:
>> > 
>> > http://www.ibm.com/developerworks/library/x-callbk/index.html?
>> > open&l=976,t=gr#download
>> > 
>> > I receive the following error:
>> > 
>> > Mar 8, 2008 7:46:57 AM org.apache.fop.cli.Main startFOP
>> > SEVERE: Exception
>> > javax.xml.transform.TransformerException: 
> java.lang.NoSuchMethodException:
>> > For e
>> > xtension function, could not find method
>> > java.lang.String.addString([ExpressionC
>> > ontext,] #STRING, #STRING).
>> > 
>> > I have added xalan in the classpath. e.g. java -classpath
>> > C:/XSL_Callbacks/lib/xalan.jar -jar 
>> > build/fop.jar Fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf 
>> > 
>> > 
>> > In my XSLT I declare the namespace:
>> > 
>> > <xsl:stylesheet version="1.0"
>> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>> > xmlns:fo="http://www.w3.org/1999/XSL/Format";
>> > xmlns:lookup="xalan://StringHash">
>> > 
>> > I orginally posted this in the FOP forum by I moved it to here. I 
> believe
>> > that I might be using an older version of Xalan...But I am not sure.
>> > I am a bit lost. Any help would be great. Thx
>> 
>> Can you show an example of the actual extension function call in 
>> your stylesheet?  A complete stand-alone test case that can be used 
>> to reproduce a problem always makes it much easier for a developer 
>> to be of assistance. 
> 
> I tried the sample you sent me privately, and I was only able to reproduce 
> the error if the StringHash class was not on my class path.  When 
> StringHash was on my class path, the stylesheet ran successfully.  I have 
> to admit that I ran Xalan directly through its own Process command, though 
> - I did not use the FOP command-line.
> 
> According to the documentation of the java command,[1] "When you use [the 
> -jar] option, the JAR file is the source of all user classes, and other 
> user class path settings are ignored."  So I suspect you've probably 
> placed your StringHash class inside C:/XSL_Callbacks/lib/xalan.jar, which 
> you've specified with the -classpath option, but the java command is 
> ignoring that, and looking for classes exclusively in your build/fop.jar, 
> which you specified with the -jar option.
> 
> I hope that helps.
> 
> Thanks,
> 
> Henry
> [1] http://java.sun.com/javase/6/docs/technotes/tools/windows/java.html
> ------------------------------------------------------------------
> Henry Zongaro
> XML Transformation & Query Development
> IBM Toronto Lab   T/L 313-6044;  Phone +1 905 413-6044
> mailto:[EMAIL PROTECTED]
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Hash-Tables-and-XSLT-extention-tp15912882p16024770.html
Sent from the Xalan - J - Users mailing list archive at Nabble.com.

Reply via email to