[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

absolute value function in XSL, cant get it working.

Subject: absolute value function in XSL, cant get it working.
From: "Carter, Will" <WCarter@xxxxxxxxxxxxxxxx>
Date: Wed, 2 Oct 2002 12:33:30 -0500
xsl absolute value
Hi,

I am trying to compute an absolute value in my stylesheet using exslt extension function but I cant get it working.

here is my stylesheet:
-------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 	xmlns:xalan="http://xml.apache.org/xalan" exclude-result-prefixes="xalan" 	xmlns:math="http://www.exslt.org/math" extension-element-prefixes="math">

<xsl:import href="math.abs.xsl" />

<xsl:template match="/">
<xsl:value-of select="math:abs(-13)"/>
</xsl:template>
</xsl:stylesheet>
-------------------------------------------------

I am using xalan to transform.  At the command line I get this error:

(Location of error unknown)XSLT Error (javax.xml.transform.TransformerException)
: java.lang.NoSuchMethodException: For extension function, could not find method
 java.lang.Double.abs([ExpressionContext,] ).

these files are in the same dir as my stylesheet:

math.abs.js       
math.abs.msxsl.xsl
math.abs.xml     
math.abs.xsl

Thanks for any help, this is the first time I have tried to use an EXSLT extension function.

thanks,
will

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.