[
Lists Home |
Date Index |
Thread Index
]
Hi,
I am trying to define an element that does two things:
1 - Provides an enumerated list of valid text content items, allowing
multiple items
2 - Provides an attribute.
So far, I have the following, which satisfies #1, but I can't figure
out how to add an attribute. Any ideas?
Thanks in advance,
Russ
<xs:element name="ElemName">
<xs:complexType>
<xs:simpleContent>
<xs:restriction
base="xs:anyType">
<xs:simpleType>
<xs:list>
<xs:simpleType>
<xs:restriction
base="xs:string">
<xs:enumeration
value="Value1"></xs:enumeration>
<xs:enumeration value="Value2"></xs:enumeration>
<xs:enumeration
value="Value3"></xs:enumeration>
<xs:enumeration value="Value4"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:list>
</xs:simpleType>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
</xs:element>
I'd like to create a valid element in the XML
such as:
<ElemName attr="value">Value1
Value2</ElemName>
|