I have XSLT like:
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions">
.......
<xsl:value-of select="format-number(abs(QUANTITY), '#')"/>
....
which works perfectly with tools like Altova XMLSpy, but when I am trying to do transformation from .Net:
XslTransform myXslTransform = new XslTransform();
myXslTransform.Load("some.xls");
myXslTransform.Transform(@"inputxml", @"c:\out.csv");
It throws exception
System.Xml.Xsl.XsltException was unhandled
Message='abs()' is an unknown XSLT function.
Source=System.Data.SqlXml
I know ABS is a simple-enough function to implement, but question is why it happens with .Net?
Does anybody have any thoughts?