I tried a dirt simple example.
package com.fujitsu.fnc.swda.extensions;
public class functions {
/** * constructor */ private functions () { } /** * test function * @return */ public static int test() { return 35; } /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub System.out.println(test()); }
}
I copied the resulting .class file to my CLASSPATH and I used this to call it:
<xsl:text>#x0A;</xsl:text> <xsl:text>Testing Processor Extensions</xsl:text> <xsl:text>#x0A;</xsl:text> <xsl:value-of select="swda:test()" xmlns:swda="java:com.fujitsu.fnc.swda.extensions.functions"> </xsl:value-of>
Only I get a
quote:SystemID: D:\mphare\Development\XMLTesting\extensions\test.xsl Location: 20:0 Description: XPath syntax error at char 11 on line 20 in {swda:test()}: Cannot find a matching 0-argument function named {java:com.fujitsu.fnc.swda.extensions.functions}test() URL: http://www.w3.org/TR/xpath20/#ERRXPST0003
I believe Michael Kay has pointed me in the right direction (and to this forum :)) by suggesting the CLASSPATH is ignored because I just a command line like:
java -jar C:\Programs\saxon\saxon8.jar
to get execute the processor.
Problem is, I'm not sure how to fix it.
Thanks,
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
Michael Hare
All is explained at
http://www.saxonica.com/documentation/using-xsl/commandline.html
Michael Kay Saxonica
Thanks Michael,
I'm getting a DNS Error on saxonica this morning, I'll try again a littler later, maybe a router is down somewhere.
So far so good. The extension is working and doing what I expected it to do.. which is not much, but it's doing it.
Thanks!
I tried a dirt simple example.
package com.fujitsu.fnc.swda.extensions;
public class functions {
}
I copied the resulting .class file to my CLASSPATH
and I used this to call it:
<xsl:text>#x0A;</xsl:text>
<xsl:text>Testing Processor Extensions</xsl:text>
<xsl:text>#x0A;</xsl:text>
<xsl:value-of select="swda:test()" xmlns:swda="java:com.fujitsu.fnc.swda.extensions.functions">
</xsl:value-of>
Only I get a
I believe Michael Kay has pointed me in the right direction (and to this forum :)) by suggesting the CLASSPATH is ignored because I just a command line like:
java -jar C:\Programs\saxon\saxon8.jar
to get execute the processor.
Problem is, I'm not sure how to fix it.
Thanks,
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
Michael Hare
All is explained at
http://www.saxonica.com/documentation/using-xsl/commandline.html
Michael Kay
Saxonica
Thanks Michael,
I'm getting a DNS Error on saxonica this morning, I'll try again a littler later, maybe a router is down somewhere.
So far so good.
The extension is working and doing what I expected it to do.. which is not much, but it's doing it.
Thanks!