- From: Veerappan Saravanan-ESV007 <esv007@motorola.com>
- Date: Wed, 5 May 2004 12:12:59 -0400
- To: "'ht@inf.ed.ac.uk'" <ht@inf.ed.ac.uk>, Veerappan Saravanan-ESV007 <esv007@motorola.com>
- Cc: noah_mendelsohn@us.ibm.com, xmlschema-dev@w3.org
Thanks Henry, your solution worked perfectly for me.
Thanks for all replies.
-Saravanan
-----Original Message-----
From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org] On Behalf Of ht@inf.ed.ac.uk
Sent: Wednesday, May 05, 2004 11:29 AM
To: Veerappan Saravanan-ESV007
Cc: noah_mendelsohn@us.ibm.com; xmlschema-dev@w3.org
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@inf.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Wednesday, 5 May 2004 12:14:01 UTC