XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: Re: [xml-dev] What is this principle called: "I' send data in myUOM and you convert it, as needed, to your UOM"?

It may be worth considering the limit to the accuracy that is implied by the encoding's precision.  Units conversions are not context-free when applied to real-world processes and sometimes you simply cannot get from one to another (light years to angstroms, USD to IDR) in a way that does not require knowledge of the  real-world use of the measurement.  1/3m is implicitly plus or minus some amount that may not be the one part in 10,000,000 that is implied by the decimal number.  You can make the associated characteristics of the measurement explicit (precision, temperature, material that is being meaaured etc, or in the case of money, dollars, rupiah, date, time, place of exchange) but where do you stop?  

On Sat, Sep 10, 2011 at 4:53 PM, rjelliffe <rjelliffe@allette.com.au> wrote:


I think the main principle is grouped under the head "information preservation" (or "information retention"): you don't throw away anything until you can prove some-one won't need it. (Being "conservative' in what you send means being conservative in what you thow away, in this case.)

This does not mean that you cannot *also* send the data in a converted format:
 <width cm="33.33333">1/3m</width>
The recipient can choose which it likes. If in doubt, do both (if this won't cause integrity problems for later editing.)

In commercial publishing systems, the most common way to handle this situation, however, is neither to preserve the information as a fraction nor to convert it to decimal. It is to re-express the value as integers values against some very small common unit which is some reasonably accurate fraction of all the bases and demonimators desired. See EMUs (http://www.oreillynet.com/xml/blog/2007/04/what_is_an_emu.html) for example.


Cheers
Rick Jelliffe



_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS