- From: Christopher Milton <cmiltonperl@yahoo.com>
- Date: Mon, 23 Aug 2004 15:01:10 -0700 (PDT)
- To: xmlschema-dev@w3.org
What about using a substitution group with each member receiving
a different pair of enumerations?
--- Bob Schloss <rschloss@us.ibm.com> wrote:
> W3C XML Schema 1.0 does not permit you to say this.
>
> You are asking for one case of what are known as "co-occurence
> constraints": depending upon one field's value, the permitted values for a
> different field may be different.
>
> It is possible that in several years, the W3C Schema WG may permit some of
> this in W3C XML Schema 2.0 (if such a spec is created) because many people
> ask about this.
>
> For now, you'd have to supplement XML Schema Validation with another
> system, based on technologies like XSLT, in order to enforce your
> constraint.
>
> Good Luck,
> Bob Schloss
>
> Scalable XML Infrastructure
> IBM Thomas J Watson Research Center
> Yorktown Heights, New York, USA
>
> Shashikala
> Shamarao
> <shashikala_shama To
> rao@yahoo.com> xmlschema-dev@w3.org
> Sent by: cc
> xmlschema-dev-req
> uest@w3.org Subject
> dynamic enumeration definition
>
> 08/23/2004 04:02
> PM
>
> Hi All,
>
> I have a very strange problem regarding enumerations. I have 2 fields which
> have enumeration values associated with them. But the problem is based on
> first field's value, the second fields enumeration changes,
>
> for example let us say I have 2 fields like below with their overall
> enumerations
>
> field1 - road - {Pedestrain, Cycle Way, Bus-Taxi}
> field2 - carriage - {Single Carriage, Dual Carriage, Single track}
>
> if field1 is associated with a value of Cycle field2 can have only {Single
> Track and Dual Carriage}
> but if field2 is associated with Bus-Taxi, field can have all of the valid
> values.
>
> How do I represent such filtered enumerations using XML Schema?
>
> Any help would be appreciated.
>
> Thanks,
> Shashi
>
>
> Do you Yahoo!?
> Win 1 of 4,000 free domain names from Yahoo! Enter now.
>
>
>
>
>
=====
Christopher Milton <==||==> cmiltonperl@yahoo.com
"What appears to be coming at you is coming from you."
--Jack Flanders (Meatball Fulton, ZBS)
There's an evil monkey in my closet.
Received on Monday, 23 August 2004 22:01:15 UTC