code_junkie

XML format-number problems when using separators

Nov 14th, 2011
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. <?xml version='1.0' encoding='iso-8859-1'?>
  2.  
  3. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  4. xmlns:fo="http://www.w3.org/1999/XSL/Format"
  5. xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  6. xmlns:hsi="http://www.myfakecompany.com/fakey"
  7. extension-element-prefixes="msxsl hsi">
  8.  
  9. <xsl:decimal-format name="euro"
  10. decimal-separator=","
  11. grouping-separator="&#160;"/>
  12.  
  13. <xsl:template match="/">
  14.  
  15. <xsl:value-of select="format-number(1234567.89, '#&#160;###.##;(#&#160;###.##)', 'euro')"/>
  16.  
  17. </xsl:template>
  18. </xsl:stylesheet>
  19.  
  20. '#&#160;###,##;(#&#160;###,##)'
Add Comment
Please, Sign In to add comment