W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2006

XML Schema TypeLibrary Comments

From: Rob Grainger <rob_grainger2000@yahoo.co.uk>
Date: 31 Mar 2006 08:10:32 -0700
Message-ID: <000601c652a7$9e98ade0$2ec16f58@robblob>
To: <www-xml-schema-comments@w3.org>

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. 

Yahoo! Photos  NEW, now offering a quality print service from just 8p a photo http://uk.photos.yahoo.com
Received on Friday, 31 March 2006 15:12:03 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:05 UTC