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: [xml-dev] ANN: a portable data component -- length

Distances are obviously simple scalar conversions and are fixed, but consider the issue of prices and currency conversion:

<price currency="USD">34.52</price>

In this case, if I wanted to convert the same price into pounds sterling, it's not in fact a straightforward fixed conversion rate, but will depend upon multiple factors - the date that the transaction took place, any conversion charges that may apply and so forth.

<price currency="USD">34.52</price>
<price currency="UKP">18.32</price>

If this is in fact recording a transaction, and the conversion rate is not in fact discoverable (and that's perhaps the biggest issue here) the idea of incorporating the units into the instance makes sense - the transaction costs involved in discovering the equivalences are higher than the cost of carrying the data in the first place. To me that should be the bigger decision determinant when talking about replication of information - is the cost of replication less than the cost of computation when the data is re-referenced.

I've seen that recently on specific MarkLogic projects. Certain information was in fact derivable from other information, but the derivation costs were pretty dramatic and couldn't be indexable. In that particular case, it made more sense to derive the relevant values and store them with the calling data as a key, even though such a field meant that the dataset was not formally normalized.

Of course, what this means in practice is that there really is no best practice with regards to units and conversions; it depends upon your requirements as to whether you derive or replicate.

Kurt Cagle
Invited Expert, XForms Working Group, W3C
Managing Editor, XMLToday.org

On Sat, Apr 9, 2011 at 3:57 PM, John Cowan <cowan@mercury.ccil.org> wrote:
Amelia A Lewis scripsit:

> Or, to quote the storied wisdom of the ancients: a man with one clock
> always knows what time it is. A man with two is never sure.

There's an opposite point of view, though:  "Sure, what would we be wanting
with two clocks if they both told the same time?"

Kill Gorgun!  Kill orc-folk!            John Cowan
No other words please Wild Men.         cowan@ccil.org
Drive away bad air and darkness         http://www.ccil.org/~cowan
with bright iron!   --Ghan-buri-Ghan    http://www.ccil.org/~cowan


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