cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gunter D'Hondt <gunter.dho...@sofico.be>
Subject Re: decimal formatting
Date Fri, 28 Jan 2005 07:41:53 GMT
Isn't anybody who knows how I can change the general decimal and thousand 
seperator in a Cocoon application? How to switch them?

I've tried the LocaleAction but this only gives you the locale as a 
parameter in your sitemap so that no use for decimal formatting

Any help is welcome!

Regards,
Gunter D'Hondt


 



Gunter D'Hondt <gunter.dhondt@sofico.be> 
27-01-2005 14:24
Please respond to
users@cocoon.apache.org


To
users@cocoon.apache.org
cc

Subject
decimal formatting






Hi,

Currenlty I've got a Cocoon pipeline that generates HTML output by using a 

XSLT transformer where I'm using the following:
<xsl:value-of select="format-number(round(field), '##,##0.00')"/>

this all works fine and displays for example 12,345.99 but how can I setup 

this that it uses my country locale where the decimal separator is a comma 

and the thousand separator is a point? So the result would be 12.345,99

is there a way to set this for the whole Cocoon application? something 
like setting the locale for the xslt-transformer?

and what with the woody field convertors? for example i've got the 
following widget declaration:
  <wd:output id="price">
    <wd:label/>
    <wd:datatype base="decimal">
      <wd:convertor variant="number">
        <wd:patterns>
          <wd:pattern>#0.00</wd:pattern>
        </wd:patterns>
      </wd:convertor>
    </wd:datatype>
  </wd:output>

Any help is welcome!

Regards,
Gunter D'Hondt
Sofico NV Belgium

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message