Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Can XML Schema represent this? Can XML Schema represent this?To: NULL Date: 6/2/2004 6:24:00 AM I would like to restrict the values of an attribute to boolean
expressions combining enumerated values. Is this possible?
An example instance document might look something like:
<myElement expression="apples OR oranges"/>
I thought I'd start with something like:
<xs:element name="myElement" type="myElementType"/>
<xs:complexType name="myElementType">
<xs:attribute name="expression" type="myAttributeType"/>
</xs:complexType>
<xs:simpleType name="myAttributeValues">
<xs:restriction base="xs:string">
<xs:enumeration value="apples"/>
<xs:enumeration value="oranges"/>
<xs:enumeration value="bananas"/>
<xs:enumeration value="pears"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="myAttributeType">
<xs:restriction base="myAttributeValues">
<!-- WHAT GOES HERE TO ALLOW BOOLEAN EXPRESSIONS
OF THE ENUMERATED TYPE VALUES? -->
</xs:restriction>
</xs:simpleType>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
