Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Enum Tuple in XSD? >Thread Next - Re: Enum Tuple in XSD? Re: Enum Tuple in XSD?To: NULL Date: 7/3/2008 3:21:00 PM Would be fine to define an extra type since I don't expect those tuples ever changing. Can you quickly guide me how to do? Thanks, Martin "Martin Honnen" <mahotrash@y...> wrote in message news:OI%23dc7P3IHA.5112@T...... > 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 | |||
|
