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

 


Help: OASIS Mailing Lists Help | MarkMail Help

ebxml-core message

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


Subject: Units of Measure


Hisanao

To keep things simpler I will respond on our areas of "disagreement" (really "lack of understanding") in separate messages so that we can separate out the key issiues

I said 
> >The forms still contain no Unit of Measure entry. The new Basic Data Type 
> >field is the nearest, but it is based on the basic data types of XML 
> >Schemas, so I am not completely sure that this is what is meant by this 
> >field (which has always confused me). See if you think this is a good 
> >match for what you intended, or if this property is no longer relevant to 
> >the model.

You said
> -> Disagree. When we introduce the class "height", we'd like to know it's 
> by "meter" or "feet".  There are bunch of unit of measures defined in 
> UN/EDIFACT recommendations.

Yes, but they are defined in EDIFACT as a "code set" of permitted qualiifers, not as a separate object type.
Actually, there should probably be two code sets, one for metric (SI) units of measure and one for impereial units of measure. The interesting thing about these code sets is their behaviour under the mathematical operations of multiplication and division, e.g. km/s and pounds per sq. inch. It is in this area that there could be an argument for a separate object called Unit of Measure.

I know of no computer language that allows measurements as primitives that are subject to mathematical operations. Certainly such facilities will not be supported by XML Schemas in their first release, so will not be available off-the-shelf to ebXML applications. The best we can hope for there is the use of patterns to control strings defining measurements. For example,  most SI units that are used for electronic business could be managed using the following XML Schema simpleType definition:

<xsd:simpleType name="SI-Measurement" base="string>
 <xsd:pattern value="\d{1-8}(.\d{1-4})?[TGMkhdcmnp]?[mgsAVWJN](^[2-3])?(/[mgsAVWJN])?"/>
</xsd:simpleType>

(This does not allow for measurement of temperatures as C is the SI unit for Coulomb and not temperature, while F is used for farads of capacitence. Temperature would need to be a separate simpleType!)

For imperial units you need to rely on having a code list of permitted values. You could then use this as part of a complexType definition of the following form:
<xsd:complexType name="imperial-measurement">
   <xsd:simpleType base="xsd:decimal"/>
   <xsd:attribute name="units" type="imperial-units"/>
</ xsd:complexType>

A particular element could be assigned these two "standardized measurement properties" by addition of a single attribute:
  <MyMeasurement xsi:type="imperial-measurement" units="foot">23.4</MyMeasurement>
or you can define another complexType based on this complexType:
  <xsd:complexType name="width" base="imperial-measurement"/>
  <xsd:complexType name="height" base="SI-Measurement"/>

Note that in the case of SI-Measurements what I have defined is a simple Data Format. In the case of imperial-measurement I have defined a representation based on combination of a DataFormat for the element content and a Code List for the qualifiying attribute value. (How we capture this second using the currently defined set of forms is another issue, and one I don't propose to go into here.)

As you can see from the above, I'm still not convinced that UnitOfMeasurement needs special treatment in the definition of representations.

Martin Bryan



=======================================================================
= This is ebxml-core, the general mailing list for the ebXML          =
= Core Components project team. The owner of this list is             =
= owner-ebxml-core@oasis-open.org                                     =
=                                                                     =
= To unsubscribe, send mail to majordomo@lists.oasis-open.org with    =
= the following in the body of the message:                           =
=      unsubscribe ebxml-core                                         =
= If you are subscribed using a different email address, put the      =
= address you subscribed with at the end of the line; e.g.            =
=      unsubscribe ebxml-core myname@company.com                      =
=======================================================================


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

Search: Match: Sort by:
Words: | Help


Powered by eList eXpress LLC