DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14497>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14497

String to double conversion does not respect "XMLSchema" standard





------- Additional Comments From [EMAIL PROTECTED]  2002-11-23 10:47 -------
Hi,

take a look at this one http://www.w3.org/TR/xpath#numbers, you will the same 
as in the XMLSchema.
And at this one http://www.w3.org/TR/xpath#section-Number-Functions you will 
find the following note:

NOTE: The number function should not be used for conversion of numeric data 
occurring in an element in an XML document unless the element is of a type that 
represents numeric data <B>in a language-neutral format</B> (which would 
typically be transformed into a language-specific format for presentation to a 
user). In addition, the number function cannot be used unless the language-
neutral format used by the element is consistent with the XPath syntax for a 
Number.

A number in XPATH use a '.' as decimal separator not the locale separator. A 
user can store a number in locale format BUT NOT IF HE WHANT XPATH to treat it 
like a number...


What you done is perfect in a perfect world in which any country can use it's 
specific language, numbers, dates and time. But the XSLT, XPATH and so on have 
to be cross country compliant.

To do so, WE CAN'T localize that kind of syntax.

This is what I think, what I believe, and what I understand reding the 
specifications.

Maybe you / we have to discuss the problem with many person involved in the 
Xalan project and with W3C representant to understand what Xalan and other 
processor have to do.


For what I knwo, XMLSpy 5.0, one of the most used commercial XML IDE does not 
accept any number in another syntax thant the english one. He respect the W3C 
specifications strictly.
With it, you have to store numbers in XML files in IEEE format (with a .) and 
to format them for user display with the numberFormat XSLT funtion using the 
correct decimal separator.

If Xalan stay in a locale mode, and a French developer make an XML file with an 
XMLSchema saying that the for_example attribute is FLOAT. He will store floats 
in its XML file like this "556,9887665". The actual Xalan will say during the 
validation of the XML file "OK, the locale separator is ",", so this is a 
float" (after ure fixing of the problem.).
But what if he send the file to a US friend????
His friend will try to run Xalan on a US/English computer with a locale saying 
the decimal separator is ".". So Xalan will say "OOOPS, you give 
me "556,9887665" where I'm witing "556.9887665", this is not a float". The file 
validation will failed.

So these guys have to make an XSLT to convert the XML file from FRENCH to 
ENGLISH....And to run the transformation ON the french computer...

For my project I solved the problem changing the locale before running Xalan 
and setting it back to the correct one after. So I can use the actual Xalan.

But if the Xalan community decide to stay in locale mode for this kind of 
specifications formats, the Xalan communtity HAS to inform the user that they 
are not supporting strictly the XML, XSLT, XPATH.... specifications and that 
they localized EACH part of them.
The community should also give the way-around to solve localization problem 
like mine. 

Best egards.
Walter

Reply via email to