Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Number Conversion [Thread Next] Re: Number ConversionTo: NULL Date: 3/1/2005 4:29:00 AM Thank you, I will try your solution!
Lorenzo
"Joris Gillis" ha scritto:
> Tempore 18:23:03, die Monday 28 February 2005 AD, hinc in foro {microsoft.public.xsl} scripsit Lorenzo <Lorenzo@d...>:
>
> > <xsl:variable name="Importo" select="translate(@MyNumber,',','.')"/>
> > <xsl:value-of select="format-number($MyNumber,' #.##0,00','nseparator')"/>
> >
> > But how to do this automatically every time the @MyNumber attribute appears?
> > Can I create a template to do this? I tried it but I didn't found a way.
> > Someone can help me?
> Hi,
>
> try something like:
>
> <xsl:template match="some_element">
> <xsl:apply-templates select="@MyNumber"/>
> </xsl:template>
>
> <xsl:template match="@MyNumber[contains(.,',')]">
> <xsl:variable name="MyNumber" select="translate(.,',','.')"/>
> <xsl:value-of select="format-number($MyNumber,' #.##0,00','nseparator')"/>
> </xsl:template>
>
>
> regards,
> --
> Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041)
> Fiat W3C in tenebris
>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
