[Home] [By Thread] [By Date] [Recent Entries]


I'd suggest something closer to the math definition of abs(x):

  x*(x >= 0) - x*(x < 0)


Cheers,
Dimitre Novatchev

"David Carlisle" <davidc@n...> wrote in message 
200607061633.k66GX2Tt028633@e...">news:200607061633.k66GX2Tt028633@e......
>
>> I would like to suggest a simple way
>> to implement abs() functionality in XSLT 1.0
>
> or even just select="number(translate(number(.),'-',''))"
>
> David
>
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://www.oasis-open.org/mlmanage/index.php>
>
> 




Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member