choices among attributes

This is a request for the next version of XML-Schema. Please give a way to 
specify a choice among different attributes. For example, to say that

             <E a= foo />      <E b= bar />

are allowed, but

             <E a= foo b= bar />

isn t.



An easy way to do this is to allow <xsd:choice> to be used in a attribute 
specification.



Ideally, it would just be possible to use all the current containers for 
elements for attributes also. Then one could express complex, useful rules, 
such as E may have either attribute a or b. If it has a, it may also have 
c. If it has b, it must also have d.



I realize that, but using a child element instead of an attribute, I could 
achieve an equivalent result with the current XML-Schema spec. Not all of 
us attempting to validate documents using XML-Schema, though, have the 
possibility of changing the schema used in constructing them. We need to be 
able to express a rule that existed in someone s else s head, to whom it 
never occurred that the rule might some day need to be expressed in XML-Schema.

Received on Thursday, 6 March 2003 13:34:59 UTC