Units of measurement?

Arnold, Curt Curt.Arnold at hyprotech.com
Thu Jul 15 18:28:33 BST 1999


And to actually respond to the initial question instead of rambling.  There
is not a mechanism in the current XML Schema Working Group Grafts to specify
the units for a particular data type, though I would assume that that could
be included in the textual description of the data type that should come
when they address documentation elements (which was a to be addressed issue
in the first draft).

Something like

<datatype name="velocity">
	<basetype name="real"/>
	<description>
		This datatype represents a unit expressed in meters per
second.	</description>
</datatype>


I definitely do not think that it should be up to the XML parser to try to
make sense of a string like "300 mph" and come up with an SI value.

I have expressed in a message on the XML Schema email archive (sorry don't
have URL, dated July 1 with the subject "Datatype comments") a desire to
have a mechanism to associate a data type with extended information that
might include unit related information.

If unit information was to be included in schemas, it would only be used by
documentation engines and applications, not by parsers.  I'd see something
like

<datatype name="velocity">
	<basetype name="real"/>
	<!--  this element says that element is expressed in the unit 
		with this url.  If you interpreted the URL, you could get to
		the other units that could be used to render the value to
the user -->
	<unitRef href="#ms-1"/>
	<description>
		This datatype represents a unit expressed in meters per
second.	</description>
</datatype>

If this is thought to be a reasonable and desirable addition to schemas, I
wouldn't mind putting together a message on the dimensional units schema
that I use.

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)





More information about the Xml-dev mailing list