Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Is it possible to format a number as hexadecimal? >Thread Next - Re: Is it possible to format a number as hexadecimal? Re: Is it possible to format a number as hexadecimal?To: NULL Date: 2/12/2008 3:35:00 PM David Lowndes wrote: >> Or use an extension function. >> Which XSLT processor are you targetting? > > I'm currently using the MS .Net XSLT facilities You could use an extension function then implemented in C# e.g. <msxsl:script implements-prefix="mf" language="C#"> public string toHex (double n) { return ((int)n).ToString("X"); } </msxsl:script> <xsl:template match="some-element" xmlns:mf="http://example.com/2008/functions"> <xsl:value-of select="mf:toHex(number(.))"/> </xsl:template> -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
