View Single Post
  #1 (permalink)  
Old November 24th, 2009, 01:26 PM
micha_dienert micha_dienert is offline
Registered User
 
Join Date: Nov 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default calling functions in java.lang.Math

hello everybody,

my question is concerning the sqrtr-example on page 960 of the book.

to invoke the transformation i tried the following variants:

Code:
java -cp saxon9he.jar net.sf.saxon.Transform sqrt.xml  sqrt.xsl
java -cp saxon9he.jar:/Library/Java/Home/lib/ net.sf.saxon.Transform sqrt.xml  sqrt.xsl
java -cp saxon9he.jar:$CLASSPATH net.sf.saxon.Transform sqrt.xml  sqrt.xsl
java -cp saxon9he.jar:$CLASSPATH:. net.sf.saxon.Transform sqrt.xml  sqrt.xsl
java -cp saxon9he.jar:. net.sf.saxon.Transform sqrt.xml  sqrt.xsl
java  net.sf.saxon.Transform sqrt.xml  sqrt.xsl
java  net.sf.saxon.Transform sqrt.xml  sqrt.xsl
java  -cp $CLASSPATH net.sf.saxon.Transform sqrt.xml  sqrt.xsl
but i constantly get errors like
Code:
 Error at xsl:value-of on line 18 column 51 of sqrt.xsl:
  XPST0017: XPath syntax error at char 24 on line 18 in {Math:sqrt(xs:double (.))}:
    Cannot find a matching 1-argument function named {java:java.lang.Math}sqrt()
Failed to compile stylesheet. 1 error detected.
java-version:
Code:
java version "1.5.0_16"
now from my understanding, the java-vm will find the static methods in java.lang.Math without any CLASSPATH-settings. am i right?

how do i have to run the example?

many thanks in advance

michael
Reply With Quote