Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - RE: Unique Particle Attribution [Thread Next] RE: Unique Particle AttributionTo: "'ht@---.--.--.--'" <--@---.--.--.-->, Veerappan Saravanan-ESV007 <esv007@--------.---> Date: 5/5/2004 8:13:00 AM
Thanks Henry, your solution worked perfectly for me.
Thanks for all replies.
-Saravanan
-----Original Message-----
From: xmlschema-dev-request@w... [mailto:xmlschema-dev-request@w...] On Behalf Of ht@i...
Sent: Wednesday, May 05, 2004 11:29 AM
To: Veerappan Saravanan-ESV007
Cc: noah_mendelsohn@u...; xmlschema-dev@w...
Subject: Re: Unique Particle Attribution
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 nobody@w... Wed May 5 15:01:45 2004
Return-Path: <nobody@w...>
X-Original-To: xm | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
