Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 19th, 2008, 12:50 AM
Authorized User
 
Join Date: Jul 2008
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default XSL: Ouput replaces dot as comma ??

[u]XSLT:</u> Version 1.0

[u]Requriement:</u> Converting xml to ascii files.

[u]AcutalOutput:</u>117,62 ( Why the output replacing the dot'.' as comma',' ???)
[u]Expected Output:</u> 117.62

[u]XSL:</u>
<xsl:value-of select="Charge[@Id='79' and @Type='5' and @PT='P']/@Amount"/>

[u]Input XML file:</u>
<Charge Id="79" Amount="117.62" CurrCode="EUR" Type="5" PT="P"/>

Regards,
Raja
 
Old August 19th, 2008, 04:14 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Seeing as XSLT 1.0 has no concept of data types I can see no reason why the output is as you say it is.

If this is really happening it must be happening somewhere else in the pipeline. What other processes have you got outside of your xslt processor? How are you viewing the output?

/- Sam Judson : Wrox Technical Editor -/
 
Old August 19th, 2008, 08:37 AM
Authorized User
 
Join Date: Apr 2008
Posts: 70
Thanks: 17
Thanked 1 Time in 1 Post
Send a message via Yahoo to iceandrews
Default

I'm not familiar with the entire pipeline, but my guess is that the there is language setting somewhere that outputing your number in another format. Many European countries swap the commas and periods compared to the American numerical standard. (1.000,00 = 1,000.00)Maybe the CurrCode="EUR" is being use further down the line to produce that.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Comma Versus Dot Wenggo Javascript 6 March 1st, 2011 03:37 AM
Ouput Error phungleon C++ Programming 0 June 7th, 2007 05:53 PM
Wiered ouput exstream ASP.NET 2.0 Basics 2 May 12th, 2006 04:59 PM
Importing Excel to SQL replaces values to NULLS smujib Classic ASP Basics 0 February 19th, 2006 09:02 PM
helpme ! query ouput categorize by group on asp eyesonly Classic ASP Databases 0 January 23rd, 2004 04:15 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.