Hello people,
I thought I was fairly proficient in websearching, but I haven't found
a standard on how to
encode numerical values in an XML file in a standard way. XML docs do
specify character set encoding, but not a locale. So if I generate a
data file, should I use decimal commas or points?
Should I encode the locale in the document to ensure correct reading
of the values? Is there
some standard way to do this?
This probably doesn't belong to the XML issue in itself, but I suspect
this to be a fairly
popular problem.
Sorry if this is some FAQ - I haven't found it...
John 7 6454
On Jun 5, 1:03*pm, JohnC <john.copp...@gmail.comwrote:
Hello people,
I thought I was fairly proficient in websearching, but I haven't found
a standard on how to
encode numerical values in an XML file in a standard way. XML docs do
specify character set encoding, but not a locale. So if I generate a
data file, should I use decimal commas or points?
Should I encode the locale in the document to ensure correct reading
of the values? Is there
some standard way to do this?
You want to use <number-grouping-separatorand <decimal-separator>.
--
Ron
If you're using XML Schema to define your document's format, it has a
standard for this.
On Jun 5, 6:35 pm, Ron Peterson <r...@shell.core.comwrote:
On Jun 5, 1:03 pm, JohnC <john.copp...@gmail.comwrote:
Hello people,
I thought I was fairly proficient in websearching, but I haven't found
a standard on how to
encode numerical values in an XML file in a standard way. XML docs do
specify character set encoding, but not a locale. So if I generate a
data file, should I use decimal commas or points?
Should I encode the locale in the document to ensure correct reading
of the values? Is there
some standard way to do this?
You want to use <number-grouping-separatorand <decimal-separator>.
Hi Rob, Thanks for the hint. I did a search for both names, and found
_very_ few references.
Is this really a standard, or was this specified by Oracle (the first
references I found
pointed there)? Is there any document on this?
Thanks again.
John
On Jun 5, 7:24 pm, "Joseph J. Kesselman" <keshlam-nos...@comcast.net>
wrote:
If you're using XML Schema to define your document's format, it has a
standard for this.
Hi Joseph.
Thanks for the reply. As far as I can see in the W3C Schema
definition, things are simple -
decimal numbers use decimal points, and no option seems to be present
for allowing
decimal commas. ( at least the regular expression in the w3c docs is
definite about that).
It _is_ the simplest solution.
John
Thanks for the reply. As far as I can see in the W3C Schema
definition, things are simple -
decimal numbers use decimal points, and no option seems to be present
for allowing
decimal commas. ( at least the regular expression in the w3c docs is
definite about that).
It _is_ the simplest solution.
For data interchange purposes, you want to pick *one* convention. No
matter which one you pick it's going to disappoint someone, so the
question winds up being which one's natural for the folks writing the
spec. And since most spec authors are programmers and most programmers
(and languages) already expect . as the decimal separator... More
directly: There was an existing standard Schema could reference, so they
referenced it rather than reinventing the wheel.
Of course user interfaces are free to render the data in other ways. And
you can use the other convention in XML if you're willing to be
nonstandard or to simply treat it as text rather than expecting other
tools to recognize it as the intended number.
(Someday I should look up how , and . wound up with their functions
being swapped in some cultures, and check which convention is actually
older... just for historical interest.)
On Jun 5, 11:29*pm, JohnC <john.copp...@gmail.comwrote:
On Jun 5, 6:35 pm, Ron Peterson <r...@shell.core.comwrote:
You want to use <number-grouping-separatorand <decimal-separator>.
Hi Rob, Thanks for the hint. I did a search for both names, and found
_very_ few references.
Is this really a standard, or was this specified by Oracle (the first
references I found pointed there)? Is there any document on this?
The Oracle document is where I got that information. I was thinking
that entities would be a good approach but since Oracle has already
proposed a solution using tags, that seemed to have less conflict with
established practices.
I noticed that France uses spaces for number grouping separators
compared to Germany which uses commas. That makes the tagging method
best for document appearance where the W3C Schema omitting the
grouping separators is best for input to software.
--
Ron
Joseph J. Kesselman wrote:
>Thanks for the reply. As far as I can see in the W3C Schema definition, things are simple - decimal numbers use decimal points, and no option seems to be present for allowing decimal commas. ( at least the regular expression in the w3c docs is definite about that). It _is_ the simplest solution.
For data interchange purposes, you want to pick *one* convention. No
matter which one you pick it's going to disappoint someone, so the
question winds up being which one's natural for the folks writing the
spec. And since most spec authors are programmers and most programmers
(and languages) already expect . as the decimal separator... More
directly: There was an existing standard Schema could reference, so they
referenced it rather than reinventing the wheel.
Of course user interfaces are free to render the data in other ways. And
you can use the other convention in XML if you're willing to be
nonstandard or to simply treat it as text rather than expecting other
tools to recognize it as the intended number.
(Someday I should look up how , and . wound up with their functions
being swapped in some cultures, and check which convention is actually
older... just for historical interest.)
There is a good thread about the pros and cons of choosing one format
over others in the TEI discussions at: http://lists.village.virginia.edu/pi...05/005397.html
Joe is quite right: pick one, but *document* what you picked, so that
those who come after you can understand it.
///Peter This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Batista, Facundo |
last post by:
Here I send it.
Suggestions and all kinds of recomendations are more than welcomed.
If it all goes ok, it'll be a PEP when I finish writing/modifying the code.
Thank you.
.. Facundo
|
by: Kim Bundgaard |
last post by:
Hi
Any suggestion would be fine.
I have installed DB2 Connect EE V8.1 (fixpak 4) at two different Windows
2000 Servers, both have the same regional settings.
I am connecting to the same DB2...
|
by: Ahmad A. Rahman |
last post by:
Hi all,
I have a problem constructing a regular expression using .net.
I have a string, separated with comma, and I want to group the string
together but, I failed to group a numeric character...
|
by: ibiza |
last post by:
Hi all,
I've binded some data from a DB in a gridview and one of the values is
a float. Even if the flot is represented as 4.2 in the DB, it is
rendered as 4,2 in the gridview, with a comma....
|
by: Ntl News Group |
last post by:
I have a text box that contains the number 1234, I want the value form
the text box to display in a second text box so I used:
=
The problems is that this displays 1234 and I want it to display...
|
by: =?Utf-8?B?cGF0cmlja2RyZA==?= |
last post by:
Hi everyone!
I'm using greece - greek in my control panel's regional options,
and so, my decimal point is the comma (,),
while it is the dot (.) for the sql server db,
however, I'm facing...
|
by: FAQ server |
last post by:
-----------------------------------------------------------------------
FAQ Topic - How do I convert a Number into a String with
exactly 2 decimal places?...
|
by: Twanne |
last post by:
Hi,
I've got some code in VBA where I calculate some numbers. Now some of them are large decimal numbers like -6,3216324E03. So in scientific notations. Now I need to add them to a table with an...
|
by: Joza |
last post by:
Hi everybody!
I have question about setting decimal symbols... In some countries,
for example in my country we use comma for decimal symbol, but
in in some other countries it is decimal point....
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: isladogs |
last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, Mike...
| |