Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - RE: Unique Particle Attribution [Thread Next] Re: Unique Particle AttributionTo: Veerappan Saravanan-ESV007 <esv007@--------.---> Date: 5/5/2004 5:29:00 PM
Not sure what you actually want.
If what you wrote is really what you mean, which I _think_ is that all
and only the following are allowed
aaaaab
aaaab
aaab
aab
ab
abb
abbb
abbbb
abbbbb
then all you need is
<xs:sequence>
<xs:element ref="a"/>
<xs:choice>
<xs:element ref="b" maxOccurs="5"/>
<xs:sequence>
<xs:element ref="a" maxOccurs="4"/>
<xs:element ref="b"/>
</xs:sequence>
</xs:choice>
</xs:sequence>
If only
abbbbb
ab
aaaaab
are allowed, that can be done as
<xs:sequence>
<xs:element ref="a"/>
<xs:choice>
<xs:sequence>
<xs:element ref="b"/>
<xs:sequence minOccurs="0">
<xs:element ref="b" maxOccurs="4" minOccurs="4"/>
</xs:sequence>
</xs:sequence>
<xs:sequence>
<xs:element ref="a" maxOccurs="4" minOccurs="4"/>
<xs:element ref="b"/>
</xs:sequence>
</xs:choice>
</xs:sequence>
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@i...
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
From priscilla@w... Wed May 5 11:30:30 2004
Return-Path: <priscilla@w...>
X-Orig | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
