p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 (http://p2p.wrox.com/forumdisplay.php?f=398)
-   -   calling functions in java.lang.Math (http://p2p.wrox.com/showthread.php?t=77159)

micha_dienert November 24th, 2009 01:26 PM

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

mhkay November 24th, 2009 01:47 PM

This facility is not available in Saxon Home Edition: you will either need to upgrade to Saxon Professional Edition, or stick with the old Saxon-B release. Sorry about that.


All times are GMT -4. The time now is 08:06 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.