You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Neil Archer <ne...@viewgate.com> on 2000/08/18 11:38:54 UTC
Multiple attribute values
Hi,
I am relatively new to XML and I am trying to validate documents using XML
schemas.
So far I have used the schema to limit the selections that can be
legitimately used for the values of the attribute, but I can't find a way of
being able to use one or more of values at any one time.
For example, the attribute holds the formats available for a music record,
it can be either on CD, tape or vinyl. How do I change the schema to allow
the selection of both CD and tape for instance?
So far the schema looks like:
<xsd:attribute name="format">
<xsd:simpleType base="xsd:string">
<xsd:enumeration value="cd"/>
<xsd:enumeration value="tape"/>
<xsd:enumeration value="vinyl"/>
</xsd:simpleType>
</xsd:attribute>
I know I can enumerate all possible combinations but this seems a bit like
overkill.
Cheers,
Neil