Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Can XML Schema represent this? [Thread Next] Re: Can XML Schema represent this?To: NULL Date: 6/2/2004 11:00:00 AM Richard Tobin wrote: > You would have to use a regular expression. Something like > > "(apples|oranges|bananas|pears) (OR|AND) (apples|oranges|bananas|pears)" I was trying to avoid this, as it gets more an more unwieldy the more items there are in the enumeration. >> <xs:restriction base="myAttributeValues"> >> >> <!-- WHAT GOES HERE TO ALLOW BOOLEAN EXPRESSIONS >> OF THE ENUMERATED TYPE VALUES? --> >> >> </xs:restriction> > > This is not going to work, since it's not a restriction of the base > type. If a type R is a restriction of a type B, then all legal R values > are legal B values. But "apples OR oranges" is not a legal value for > myAttributeValues. Would an extension work then? That would define a superset rather than a subset. I take it there is no way to indicate a token from some enumeration in a regular expression pattern? Is there any other facet that I could extend to achieve this? If not, I'll either have to use the regular expression workaround or else just leave it type="xs:string" and call it a day. Thanks, Steve | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
