Getting the Absolute Value of a number using native Xslt functions
One way of doing it in Xslt 1.0.
Here is an example of one way of getting the Absolute Value of some amount in Xslt. This uses the Xslt function format-number(num) to change the numerical value to a string, ignoring any negating hyphens. Once done, XPath function number(string) is called to return to a numerical value.