BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


XSLT
Re: ABS function implemented as a single XPath expression
ABS function implemented as a single XPath expression
XML to HTML text editor
Dynamically Selecting Which Element To Sort On Using Parameters
Avoid NaN in XPath sum() function
JScript Super Class To Handle XML Transformations
Test if a bit is on
Web Methodology (Layout Management)
Grouping an XML Node by First Letter
Dependent ComboBox in HTML build with XSLT
Re: How to use XSL function sum() to sum 2 XML fields
Re: How to use XSL function sum() to sum 2 XML fields
How to use XSL function sum() to sum 2 XML fields
Helpful XSLT ""break"" template
Support automatic transformation using XSLT in IE in side by side mode
Displaying XML data in Pages
Repeated search and replace in XSLT
DVC Algorithms in XSLT
Another way of avoiding XSLT processor crash
Re: DVC Algorithms in XSLT


 
 

<< XQuery.NET and XML >>


By Sara
First Posted 04/25/2001
Times viewed 244

Re: Re: ABS function implemented as a single XPath expression


Summary Although the the soluted hosted before works good, i also have a solution for those who are not interested in using string functions in xpath

-($num < 0) will return -1 and ($num > 0) will return 0 for -ve numbers -($num < 0) will return 0 and ($num > 0) will return 1 for +ve numbers so the expression (-($num < 0) + ($num > 0) would result -1 for -ve numbers and +1 for +ve numbers. hope this is useful

Additional information


Rate this article on a scale of 1 to 10 (0 votes, average 0)

Your vote :  

<< XQuery.NET and XML >>





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML