- From: Julie Schenk <schenkj@cisco.com>
- Date: Fri, 28 Sep 2001 19:03:51 -0400 (EDT)
- To: xmlschema-dev@w3.org
Hello~
Is there a way to do something like xsd:choice when dealing with
an element's value, other than enumeration? The reason I want to
do this is b/c I want the schema to proceed in different directions
depending on the element's value. For example:
<PolicyType>IP</PolicyType> where the PolicyType tag can have
many different values. So I tried:
<xsd:element name="PolicyType">
<xsd:complexType>
<xsd:choice>
<xsd:element name="IP" type="xsd:string"/>
<xsd:element ref="PPP"/>
<xsd:element ref="FrameRelay"/>
etc.
however this does not work b/c xsd:choice I believe examines tags.
Using enumeration doesn't work because each of the PolicyTypes is
actually itself an complexType. So, if the PolicyType is IP, the schema
will proceed to <xsd:element name="IP" type="blah">.
Any input will be appreciated!
Thanks.
Julie
Received on Saturday, 29 September 2001 07:05:50 UTC