Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Can XML Schema represent this?

From: Steven Burr <sburr@--------.--->
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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent