[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xs:group/xs:choice[@minOccurs | @maxOccurs]
Bob Foster <bob@o...> writes: > I'm a bit puzzled by this. I can see why he can't have a > minOccurs/maxOccurs on the group item as specified but why not on the > choice nested in the group. This looks legal to me and I am curious > what processors do not accept it. On balance the reasoning the XML Schema WG went with was roughly this: 1) Named model groups will be most useful if different references to them can have different min/max values; 2) Allowing min/max on both references _and_ on the top level group in the named group definition, e.g. . . . <xs:group ref="myGroup" minOccurs="1" maxOccurs="10"/> . . . <xs:group name="myGroup"> <xs:choice minOccurs="2" maxOccurs="4"> . . . </xs:choice> </xs:group> would be _very_ confusing and difficult to explain; 3) So we rule out min/max on the top group in a named model group defn. Note also that <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element name="e1"/> <xs:element name="e2"/> <xs:element name="e3"/> </xs:choice> means something _quite_ different from <xs:choice> <xs:element name="e1" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="e2" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="e3" minOccurs="0" maxOccurs="unbounded"/> </xs:choice> For example, the first allows e1 e2 e1 The second does not. 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]
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|