![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - RE: Non-restrictive XSD Enumeration Non-restrictive XSD EnumerationTo: NULL Date: 11/6/2006 12:12:00 PM
Hello,
I have an XML file with an XSD schema file behind it, so my users that edit
the XML directly [in VS 2005] receive Intellisense dropdowns for all
enumerations.
How can I make some of these enumerations flexible enough, so that the doc
won't fail schema validation when text is entered that is not an enumerated
value?
For example, this would mimic how the maxOccurs attribute has the
"unbounded" enumeration, but it permits you to add an integer value.
Here is a snippet of the offending XSD:
<xs:element name="PhoneType" maxOccurs="1" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Home" />
<xs:enumeration value="Office" />
</xs:restriction>
</xs:simpleType>
</xs:element>
How can I make both of these pass schema validation?
<PhoneType>Home</PhoneType>
<PhoneType>Cell</PhoneType>
Thank you,
Eric
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
