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
|
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).
|