W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2003

RE: restrict attribute value

From: Rahul Srivastava <rsrivastava@firstam.com>
Date: Fri, 4 Apr 2003 12:08:29 +0530
To: xmlschema-dev@w3.org
Message-ID: <DCEOINHBBGNKKGDNCMDNAEDBCCAA.rsrivastava@firstam.com>

Hi Sam,

 > Sam wrote...
 >
 > Is there a way to restrict the value of one attribute
 > based on the value of another attribute.

Yes, there is a way, but not in XMLSchema. You can embed Schematron rules
with XMLSchema to do such validation based on values.

Cheers,
Rahul.



 >
 > For instance I have an attribute called Type and
 > another attribute called Units.
 >
 > If type is equal to distance, then units can be
 > ft/meters.
 > However if Type is equal to time, then units can be
 > min/sec.
 >
 > __________________________________________________
 > Do you Yahoo!?
 > Yahoo! Tax Center - File online, calculators, forms, and more
 > http://tax.yahoo.com
 >
 >
Received on Friday, 4 April 2003 01:28:19 GMT

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