XML Schema TypeLibrary Comments

Hi,

Looking at the type library for quantities (TypeLibrary-nn-quantity.xsd), I note that the various measurement units are defined as enumeration values.

It may be nice if, instead, an abstract type was used whose content is a real of some form, with attributes for unit and scale. The unit could correspond to the measurement enum's values.

The scale attribute I envisage would list the scaling value of the unit - for example 1 for m, 1000 for km, 0.01 for cm.
Possibly also 1 for in, 1/72 for pt, 12 for ft, etc. Alternatively, these could relate to the standard scaling factors.

Then derived types, such as cm-quantity, could supply scaling values as a fixed attribute.
Substitution groups could be defined, associating related values - mm, cm, m, km, etc.

This would allow client applications to use logic of the form value = content-value * scale-attribute to manage all units uniformly.

Rob Grainger
Software Developer
Timeload Ltd. 
UK.

Received on Friday, 31 March 2006 15:12:03 UTC