Re: [xsl] Format number problem

Subject: Re: [xsl] Format number problem
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Wed, 12 Jun 2002 22:47:52 +0100
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, &quot;00&quot;)" />
  <xsl:value-of select='format-number(@zne, &apos;00&apos;)' />

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread