OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Help: Using enumeration that disregards case

[ Lists Home | Date Index | Thread Index ]
  • To: <xml-dev@lists.xml.org>
  • Subject: Help: Using enumeration that disregards case
  • From: "Davis, Nathan" <ndavis@jtac.IN.gov>
  • Date: Tue, 24 Feb 2004 15:13:31 -0500
  • Thread-index: AcP7EqwHhCfbVUQIRnGecuL2GIizCQ==
  • Thread-topic: Help: Using enumeration that disregards case

Hi all,

 

This question is about XML Schema.

 

I want to create a simpleType > restriction > enumeration such as the following:

 

<xs:element name="pet-type">                                                       

  <xs:simpleType>                                                

    <xs:restriction base="xs:string">

      <xs:enumeration value="dog" />

      <xs:enumeration value="cat" />

      <xs:enumeration value="fish" />

      <xs:enumeration value="other" />                                             

    </xs:restriction>                                            

  </xs:simpleType>                                                     

</xs:element>

 

However, I also want to make it so that the instance document can have upper or lower case values, so that the following would all be valid:

 

<pet-type>CAT</pet-type>

<pet-type>Cat</pet-type>

<pet-type>cat</pet-type>

<pet-type>fiSh</pet-type>

<pet-type>Other</pet-type>

 

How can I do this with XML Schema?

 

Thanks,


Nathan Davis
Web Programmer
Division of State Court Administration
Judicial Technology and Automation Committee

 





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS