OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: An approach to describing the relationships between units-of-measure

[ Lists Home | Date Index | Thread Index ]

Hi Folks,

Things are getting exciting!  

Jeni, I am trying to incorporate your work into this.
At the bottom of this message you will see where I 
am using it.  I have some questions for you there.

Dare, I understand your point about desiring to express
more than just equivalence.  The origin of this work was to
devise a way to express the relationship between UOMs.  
(RDF and OWL do not provide the cability to express
relationships which require a transformation between resources.)
At the moment, it appears that the best way to state the
relationship betwen UOMs is indirectly - by stating
the relationship between a UOM and its base (canonical)
UOM, and then comparing the resulting canonical forms.

/Roger

FACTS

There are 7 categories of units.  Each category has a basic unit:

Category                  Basic Unit       Abbreviation
---------------------------------------------------
Length                      metre              m
Mass                        kilogram           kg
Time                        second             s
Electric current            ampere             A
Temperature                 kelvin             K
Amount of substance         mole               mol
Luminous intensity          candela            cd

kilometre, mile, inches, yard, furlongs, etc are all Length units.

Each Length unit has a well-defined conversion formula to
the base unit (metre).  For example:

   - 1 kilometre = 1000 metres
   - 1 yard = 0.9144 metres
   - 1 mile = 1609.344 metres

USING THE FACTS

The 7 categories of units represents a class of UOMs. 
A property of this class is that there exists a unit 
conversion formula:

<Class id="UOM">
    <uom-conversion>
        <type resource="UOM-Conversion/>
    </uom-conversion>
</Class>

Length is a type of UOM.  The basic unit for all Length UOMs
is metre:

<Class id="Length">
    <subClassOf resource="#UOM"/>
    <baseUOM resource="#metre"/>
</Class>

A kilometre is an instance of the Length class.  There exists
a conversion formula from kilometre to the base (canonical)
metre unit:

<Length id="kilometre">
    <canonicalizer resource="#kilometre-to-metre"/>
</Length>

kilometre-to-metre is an instance of a UOM conversion:

<UOM-Conversion id="kilometre-to-metre">
    <cast from="#kilometre" to="#metre" 
          xmlns="http://www.jenitennison.com/datatypes";>
        <value-of select=". div 1000"/>
    </cast>
</UOM-Conversion>

Note that I am using Jeni's datatype work to express the
conversion.  It is not correct, i.e., what does "." mean in
an arbitrary context?  For example, one instance document
might use the kilometre UOM in this fashion:

<River id="Yangtze">
    <length>
        <value>6340</value>
        <units resource="#kilometre"/>
    </length>
</River>

and another instance document might use kilometre 
in this fashion:

<River id="Yangtze">
    <length units="#kilometer">6340</length>
</River>

The conversion formula that I list above:

    <value-of select=". div 1000"/>

works fine (I think) for the second instance but not the
first.  Jeni, do you have suggestions on how to make the
formula more generic?





 

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

Copyright 2001 XML.org. This site is hosted by OASIS