W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2001

Re: The <Value>_<Unit> problem

From: Simon Cox <Simon.Cox@dem.csiro.au>
Date: Thu, 02 Aug 2001 15:57:13 +0800
Message-ID: <3B6907D9.8BD02E30@dem.csiro.au>
To: Eddie Robertsson <eddie@allette.com.au>
CC: XSD <xmlschema-dev@w3.org>
Eddie Robertsson wrote:
> I want the value of productCost
> to be a space separated pair of values like:
> <productCost>20 AUD</productCost>
> <productCost>10 USD</productCost>
> etc.

Wouldn't it be better to encode the components in their own tags, 



<productCost currency="AUD">20</productCost>
<productCost currency="USD">10</productCost>

I guess you need these compound strings for some purpose (display?). 
But this is a /styling/ issue - i.e. for an XSLT transformation -
and should not be embedded in the data ...  i.e. I would only ever 
expect to see a "human readable string" containing a compound value 
like this in a presentation language like XHTML, not in the data.  

Also, the "currency" should be a reference (probably an anyURI) 
to a definitive list or even a service which can give conversions.  

Simon.Cox@csiro.au    CSIRO Exploration & Mining
T:+61 8 9284 8443 F:+61 8 9389 1906 C:+61 403 302 672

We're moving 20th August 2001 to

  Australian Resources Research Centre
  26 Dick Perry Avenue
  T: +61 8 6436 8500

Postal Address: 
  PO Box 1130 
  Bentley WA 6102 
Received on Thursday, 2 August 2001 03:57:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:23 GMT