You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by BRAHMA <br...@emis-intl.com> on 2002/01/15 19:44:57 UTC
Formatting Money values###
Hi List,
Again a question...
I need to format the money value...
For example:-
<?xml version="1.0"?>
<root>
<money>
<net_amount>50000</net_amount>
<vatrate>16%</vatrate>
<vat>8000</vat>
<total_amount>58000</total_amount>
<currency_symbol>DM</currency_symbol>
<ratio>100</ratio>
</money>
</root>
And I want to format with FOP...like below...
tootal_amount /ratio
ie..
58000/100 ==>580,00
Is it possible with FOP...
If any of you know please write me and even suggestions are most welcome..
thanks + regards
brahma
---------------------------------------------
Brahmaiah Kurabalakota
Software Developer
eMIS eMerging Information Systems GmbH
Am Friedrichsbrunnen
D-24782 B�delsdorf
Tel.: +49 (4331) 447 1520
Mobile: +49 (172) 5372297
mailto: brahmaiah.kurabalakota@emis-intl.com
www.emis-intl.com
Re: Tabulations in XSL-FO
Posted by Patrick Andries <pa...@videotron.ca>.
Jeremias Maerki wrote:
>You should use fo:table.
>
Yes, this is a good idea. I finally did do so yesterday night.
Patrick A.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org
Re: Tabulations in XSL-FO
Posted by Jeremias Maerki <je...@outline.ch>.
You should use fo:table.
On Tue, 15 Jan 2002 16:17:19 -0500 Patrick Andries wrote:
>
> Since everybody is candid and willing to admit his own ignorance, let me
> have a go at it:
>
> Is it possible in XSL-FO to define tabulations at set positions, I know
> how to set two tabs (with list-item-label and list-item-body), but how
> do I generalize this to <i>n</i> tabulations? Embedding list-items in
> list-item-bodies? Any other way?
>
> Patrick Andries
Cheers,
Jeremias Märki
mailto:jeremias.maerki@outline.ch
OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029
Internet http://www.outline.ch
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org
Tabulations in XSL-FO
Posted by Patrick Andries <pa...@videotron.ca>.
Since everybody is candid and willing to admit his own ignorance, let me
have a go at it:
Is it possible in XSL-FO to define tabulations at set positions, I know
how to set two tabs (with list-item-label and list-item-body), but how
do I generalize this to <i>n</i> tabulations? Embedding list-items in
list-item-bodies? Any other way?
Patrick Andries
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org
Re: Formatting Money values###
Posted by Nicola Ken Barozzi <ba...@nicolaken.com>.
----- Original Message -----
From: "BRAHMA" <br...@emis-intl.com>
To: <fo...@xml.apache.org>
Sent: Tuesday, January 15, 2002 7:44 PM
Subject: Formatting Money values###
> Hi List,
>
> Again a question...
>
> I need to format the money value...
> For example:-
> <?xml version="1.0"?>
> <root>
> <money>
> <net_amount>50000</net_amount>
> <vatrate>16%</vatrate>
> <vat>8000</vat>
> <total_amount>58000</total_amount>
> <currency_symbol>DM</currency_symbol>
> <ratio>100</ratio>
> </money>
> </root>
>
> And I want to format with FOP...like below...
>
> tootal_amount /ratio
> ie..
>
> 58000/100 ==>580,00
>
> Is it possible with FOP...
> If any of you know please write me and even suggestions are most
welcome..
You can use this template in the xsl (put decimal-format as first elements):
<xsl:decimal-format name="us" decimal-separator="."
grouping-separator=","/>
<xsl:decimal-format name="european" decimal-separator=","
grouping-separator="."/>
<xsl:template name="formatPrice">
<xsl:param name="price"/>
<xsl:if test="boolean($price) and $price!=''">
<xsl:value-of
select="format-number(number($price),'#.##0,00','european')"/>
</xsl:if>
</xsl:template>
--
Nicola Ken Barozzi xml-cocoon@nicolaken.com
These are the days of miracle and wonder...
...so don't cry baby, don't cry...
Paul Simon
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org
AW: Formatting Money values###
Posted by Stefan Schmied <sc...@neissware.de>.
Hi!
If you want to use german-style (otherwise you can ignore the following
row):
<xsl:decimal-format name="numfrmt" decimal-separator=","
grouping-separator="." />
Now you can format a node containing a number as follows :
<xsl:value-of
select="format-number($result,'#.###,00','numfrmt')"></xsl:value-of>
regards
Stefan Schmied
Neissware S&N GmbH
Frankfurter-Str 181
D-63263 Neu-Isenburg
-----Ursprüngliche Nachricht-----
Von: BRAHMA [mailto:brahmaiah.kurabalakota@emis-intl.com]
Gesendet: Dienstag, 15. Januar 2002 19:45
An: fop-dev@xml.apache.org
Betreff: Formatting Money values###
Hi List,
Again a question...
I need to format the money value...
For example:-
<?xml version="1.0"?>
<root>
<money>
<net_amount>50000</net_amount>
<vatrate>16%</vatrate>
<vat>8000</vat>
<total_amount>58000</total_amount>
<currency_symbol>DM</currency_symbol>
<ratio>100</ratio>
</money>
</root>
And I want to format with FOP...like below...
tootal_amount /ratio
ie..
58000/100 ==>580,00
Is it possible with FOP...
If any of you know please write me and even suggestions are most welcome..
thanks + regards
brahma
---------------------------------------------
Brahmaiah Kurabalakota
Software Developer
eMIS eMerging Information Systems GmbH
Am Friedrichsbrunnen
D-24782 Büdelsdorf
Tel.: +49 (4331) 447 1520
Mobile: +49 (172) 5372297
mailto: brahmaiah.kurabalakota@emis-intl.com
www.emis-intl.com
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org