Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Enum Tuple in XSD? >Thread Next - Re: Enum Tuple in XSD? Re: Enum Tuple in XSD?To: NULL Date: 7/3/2008 1:21:00 PM Martin Eckart wrote: > I want to create a simple Type which has an enum of values as restriction > similar to this: > > <xs:simpleType name="UnitType"> > <xs:restriction base="xs:string"> > <xs:enumeration value="min"/> > <xs:enumeration value="sec"/> > <xs:enumeration value="hrs"/> > </xs:restriction> > </xs:simpleType> > > I have another simpleType which contains another enum as restriction: > <xs:simpleType name="ParamName"> > <xs:restriction base="xs:string"> > <xs:enumeration value="A"/> > <xs:enumeration value="B"/> > <xs:enumeration value="C"/> > </xs:restriction> > </xs:simpleType> > > > Now I want to combine those two lists and allow only certain combinations > e.g. "A min", "A sec", "B hrs", "C min". Is there any possibility to achieve > that in a Schema? If you want to do that by somehow using/reusing the existing simple type definitions then I don't think it is possible. It is certainly possible however to define those four enumerations in a type of its own. -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
