The abs
function is part of XPath version 2.0 and as that supported in XSLT 2.0 processors like Saxon, AltovaXML and XMLPrime. Microsoft's XSLT processors (MSXML, XslTransform, XslCompiledTransform) are all XSLT 1.0 processors that only support the functions defined in XPath 1.0 and XSLT 1.0.
The following template implements the cacluation of an absolute value:
<xsl:template name="math-abs">
<xsl:param name="x"/>
<xsl:choose>
<xsl:when test="$x < 0">
<xsl:value-of select="$x * -1"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$x"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>