- From: <sujen.chen@verizon.com>
- Date: Fri, 21 Sep 2001 13:03:29 -0400 (EDT)
- To: xmlschema-dev@w3.org
Hi,
Does XML handles conditional structure?
In otherwords, can the use of a type be conditional?
Please see the following example.
<xsd:complexType name="BindType">
<xsd:attribute name="type" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="BridgedEthernet"/>
<xsd:enumeration value="PPPOE"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<!-- the following item is required if value of above attribute "type"
is "BridgeEthernet" : can this be done ???? -->
<xsd:attribute name="BrEthernetIP" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="7"/>
<xsd:maxLength value="16"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
Please advise.
Thanks,
Daniel
Verizon CSM Team
Received on Friday, 21 September 2001 16:36:19 UTC