Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0"?>
- <?xml-stylesheet type="text/xsl" href="myxml.xsl"?>
- <Account>
- <Amount>12345.67</Amount>
- </Account>
- <?xml version="1.0"?>
- <xsl:stylesheet version="2.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:test="http://test.net">
- <xsl:function name="test:formatDecimal">
- <xsl:param name="string1"/>
- <xsl:value-of select="format-number($string1,'###,###.##')"/>
- </xsl:function>
- <xsl:output method="html" encoding="UTF-8" indent="yes"/>
- <xsl:template match="/">
- <html>
- <head>
- <style type="text/css">
- p { font-family: sans-serif; font-style: italic; }
- </style>
- </head>
- <body>
- <xsl:for-each select="/Account">
- <p>Amount: <xsl:value-of select="test:formatDecimal(Amount)"/></p>
- </xsl:for-each>
- </body>
- </html>
- </xsl:template>
- </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement