[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Using format-number() to display French currency
I finally got it to work. It was the second instance of   that was illegal. <xsl:decimal-format name="FrenchDecimalFormat" decimal-separator="," grouping-separator=" "/> <xsl:template name="FrenchCurrency"> <xsl:value-of select="format-number(., '## ##0,00 $', 'FrenchDecimalFormat')"/> </xsl:template> Thanks to Joris and David for your insight. Maria -----Original Message----- From: Joris Gillis [mailto:roac@xxxxxxxxxx] Sent: Monday, July 04, 2005 11:54 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: Using format-number() to display French currency Tempore 17:44:43, die 07/04/2005 AD, hinc in xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Maria Amuchastegui <mamuchastegui@xxxxxxxxxxx>: > I originally had the pattern '## ##0,00 $', but I got the > following error message: > > Malformed format string: ##a##0,00a$ The error message indicates that the format string was actually '## ##0,00 $'. This looks illegal: the space that separates the number from the currency unit is the same as the grouping separator. Try this template: <xsl:template name="FrenchCurrency"> <xsl:value-of select="format-number(., '## ##0,00', 'FrenchDecimalFormat')"/> <xsl:text> $</xsl:text> </xsl:template> > The dollar sign stands for the Canadian dollar. I see. I'd cConsider renaming the template... regards, -- Joris Gillis (http://users.telenet.be/root-jg/me.html) Spread the wiki (http://www.wikipedia.org)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|