This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Format number problem
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: "Ivan Pedruzzi" <ivan at exln dot com>
- Cc: xsl-list at lists dot mulberrytech dot com
- Date: Wed, 12 Jun 2002 22:47:52 +0100
- Subject: Re: [xsl] Format number problem
- Organization: Jeni Tennison Consulting Ltd
- References: <000301c21256$57fcd4f0$150d0d0a@zaz>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi Ivan,
> If it wasn't a typo I think it should be
>
> <xsl:value-of select = "format-number(@zne, '00')"/>
>
> single quote for the function parameter and double quote for the
> attribute value
That doesn't matter -- XML recognises both " and ' as attribute
delimiters, and XPath recognises both " and ' as string delimiters, so
you can use any mix you like (as long as you use entities if you use
the same delimiters for the attribute and the string):
<xsl:value-of select="format-number(@zne, '00')" />
<xsl:value-of select='format-number(@zne, "00")' />
<xsl:value-of select="format-number(@zne, "00")" />
<xsl:value-of select='format-number(@zne, '00')' />
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list