You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by "alapati.sasi" <al...@gmail.com> on 2007/04/30 19:07:10 UTC

Math.abs() in xsl

Hi ,

i am using Math.abs(inumber) in my xsl to get the absolute value . This
works fine with xalan.

If i want to move any other engine which supports transformations does this
Math.abs works with that Engine .

Is this is specific to xalan or its common functionality of xsl . I am using
this Math.abs() inside a js function extension .
like <lxslt:component>
<lxslt:script language="javascript"> function fnabsolute(inum){ return
Math.abs(iNum) }.</lxslt:script></lxslt:component>

This works with xalan . What is the Math exactly here . Is the specific to
xalan xsl standard so that any engine should support that .

I am new to xsl so that i am asking this doubt .

Thanks,
Sasi.A
-- 
View this message in context: http://www.nabble.com/Math.abs%28%29-in-xsl-tf3670785.html#a10257060
Sent from the Xalan - J - Users mailing list archive at Nabble.com.


Re: Math.abs() in xsl

Posted by Erin Harris <eh...@ca.ibm.com>.
Hi,

Everything inside <lxslt:script language="javascript"> ... </lxslt:script 
language="javascript"> is actually JavaScript not XSLT.  So the processor 
you are using must support JavaScript extensions in order for this to 
work.  There is an EXSLT extension for getting the absolute value.  See 
http://exslt.org/ under the math module.  However EXSLT is also an 
extension to the XSLT language so different processors may not support it. 
 If it is not in the language specification for XSLT or XPath (
http://www.w3.org/TR/xslt, http://www.w3.org/TR/xpath) then it is an 
extension.  Please see http://xml.apache.org/xalan-j/ which has a lot of 
information about extensions and which extensions are supported by the 
Xalan interpreter and XSLTC.

Thanks.


Erin Harris





"alapati.sasi" <al...@gmail.com> 
30/04/2007 01:07 PM

To
xalan-j-users@xml.apache.org
cc

Subject
Math.abs() in xsl







Hi ,

i am using Math.abs(inumber) in my xsl to get the absolute value . This
works fine with xalan.

If i want to move any other engine which supports transformations does 
this
Math.abs works with that Engine .

Is this is specific to xalan or its common functionality of xsl . I am 
using
this Math.abs() inside a js function extension .
like <lxslt:component>
<lxslt:script language="javascript"> function fnabsolute(inum){ return
Math.abs(iNum) }.</lxslt:script></lxslt:component>

This works with xalan . What is the Math exactly here . Is the specific to
xalan xsl standard so that any engine should support that .

I am new to xsl so that i am asking this doubt .

Thanks,
Sasi.A
-- 
View this message in context: 
http://www.nabble.com/Math.abs%28%29-in-xsl-tf3670785.html#a10257060
Sent from the Xalan - J - Users mailing list archive at Nabble.com.