[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: What are units-of-measure? e.g., what's a "kilometer"?


length of a kilometer


At 17/07/2003 14:48:25, "Roger L. Costello" <costello@m...> wrote:
#  John Cowan wrote:
#
#  > > 2. Is kilometer a function? e.g., kilometer(Yangtze) --> 6300
#  > >    In general: kilometer(physical object) --> number
#  > >    "The kilometer function maps a physical object to a number."
#  >
#  > I think this view is the most nearly correct, but it needs
amplification:
#  > it doesn't capture that it's the *length* (rather than, say, the
#  > average depth) of the Yangzi that is 6300 km.  So we can rewrite it
#  > in terms of relations as follows:
#  >
#  > Yangzi length X
#  > X kilometer 6300
#  >
#  > where "kilometer" is a relation that maps a length (an abstract
property
#  > of a physical object) into a pure number.
#
#  So, kilometer is a function of this sort:
#
#  kilometer(length(Yangtze)) --> 6300
#
#  "kilometer is a function which maps the length of the Yangtze to 6300."
#
#  Another example:
#
#  kilometer(avg-depth(Yangtze)) --> 0.25
#
#  "kilometer is a function which maps the average depth of the Yangtze to
0.25."
#
#  The general case is:
#
#  kilometer(distance) --> number
#
#  where distance is an abstract dimension object.
#
#  How are functions represented syntactically in XML?  Given the above
#  viewpoint, this form no longer seems appropriate:
#
#  <River id="Yangtze">
#  <length units="kilometer">6300</length>
#  </River
#
#  Perhaps a more faithful representation of:
#
#  kilometer(length(Yangtze)) --> 6300
#
#  is this:
#
#  <River id="Yangtze">
#  <length>
#  <kilometer>6300</kilometer>
#  </length>
#  </River>
#

I'd go for:

  <River id="Yangtze">
     <length unit="kilometer">
       6300
     </length>
  </River>

Would you want a succession of tags marked in meters, centimetres, LSD etc?

but it's probably just personal preference.


Roger



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.