IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

xslt1.0 sum up european numbers Options · View
valensa
Posted: Wednesday, December 20, 2017 12:31:09 PM
Rank: Newbie

Joined: 12/15/2017
Posts: 1
Location: Vienna
Hello,
I can't figure out how to sum up european numbers in XSLT 1.0. My input XML file has european numbers (the decimal symbol is comma). In XSLT 2.0 in Stylevision is displayed correct and I can sum up all the translated strings like this: sum(../..//number(translate(.,',','.')). But in XSLT 1.0 I receive an error "unexpected token number(translate". Can somebody give me a direction how to achieve this?
e.g

<?xml version="1.0" encoding="UTF-8"?>
<DOCUMENT>
<ROWSET>
<ROW>
<TEXT>Gehalt</TEXT>
<F>32055,50</F>
<N>0</N>
</ROW>
<ROW>
<TEXT>Haftung</TEXT>
<F>3144,43</F>
<N>0</N>
</ROW>
<ROW>
<TEXT>Haftung1</TEXT>
<F>15565,35</F>
<N>0</N>
</ROW>
<ROW>
<TEXT>Zahlung</TEXT>
<F>81774,36</F>
<N>34,12</N>
</ROW>
</ROWSET>
</REGION>
</DOCUMENT>



Thanks for your help
Valentina
K101
Posted: Friday, December 22, 2017 9:05:44 AM
Rank: Advanced Member

Joined: 2/27/2009
Posts: 563
See the attached example which implements the “Pure XSLT 1.0” solution described here.

File Attachment(s):
sum up european numbers.zip (2kb) downloaded 378 time(s).


Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.