[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: ANN: a portable data component -- length
On Sat, 09 Apr 2011 12:00:20 -0400, Liam R E Quin wrote: > On Sat, 2011-04-09 at 11:10 -0400, Costello, Roger L. wrote: >> Here is the altitude of an aircraft, expressed in both feet and meters: >> >> <altitude> >> <feet>12000</feet> >> <meters>3657.6</meters> >> </altitude> >> >> It is important that the two length values are consistent: > > The right way to mark this up in most cases is to store only one value > and convert as needed. > > See Normal Form in database theory: information should never be > duplicated. That way it can't get out of sync. Agreed. My initial thought, on seeing the base post, was that this was "How to generate problems in data synchronization", not "portable data structures". By including two values in different units, rather than a single value and relying upon the *well-known* formulae for conversion, all that is achieved is to create doubt as to the accuracy of any reported value. As for the claim that the assertions will ensure that the data never gets out of sync, poppycock. The initial statement is that the information is 'portable', and yet this allegedly portable information relies upon some external code that enforces assertion validity? And what good do assertions do when these values *are* out of sync? Once they've gotten out of sync (that is, at any stage of the process at which someone fails to verify the assertions, or even any stage at which someone uses a different degree of confidence, or uses a different chain of conversions to generate values), *you don't know which one is correct*. The following is valid: <altitude> <feet>12000</feet> <meters>4000</meters> </altitude> ... within a certain degree of confidence. 1 m equals one yard (rounding up; in some applications this is a perfectly valid conversion). Now, it's highly unlikely that such an application envisions measurements in thousands (at which point the less-than-ten-percent conversion error has made for very large differences), but ... in the above example, *which value is correct*? 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. Amy! -- Amelia A. Lewis amyzing {at} talsever.com And now someone's on the telephone, desperate in his pain; someone's on the bathroom floor, doing her cocaine; someone's got his finger on the button in some room-- no one can convince me we aren't gluttons for our doom. -- Indigo Girls
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|