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 11:29:27 UTC