Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0
This is the forum to discuss the Wrox book XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition by Michael Kay; ISBN: 9780470192740
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 24th, 2009, 12:26 PM
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
  #2 (permalink)  
Old November 24th, 2009, 12:47 PM
mhkay's Avatar
Wrox Author
Points: 18,410, Level: 59
Points: 18,410, Level: 59 Points: 18,410, Level: 59 Points: 18,410, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,949
Thanks: 0
Thanked 289 Times in 284 Posts
Default

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.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
java.lang.SecurityException: when calling a jsp mshah101 Apache Tomcat 2 November 9th, 2007 07:28 PM
Graphics Math Functions vb certified Pro VB.NET 2002/2003 2 January 1st, 2006 10:06 AM
Math functions-Please help! jroxit ASP.NET 2.0 Basics 5 December 28th, 2005 11:21 AM
Problem calling static Java functions from XSLT FraserS XSLT 6 October 10th, 2005 07:24 AM
Why are my math functions not being included? jkeen BOOK Beginning Linux Programming, 3rd Edition 4 October 22nd, 2004 05:29 AM



All times are GMT -4. The time now is 02:31 AM.


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