This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Format number problem


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]