Re: Model Group Definition

Henry Thompson writes:

>> The logic is as follows:  min/max clearly _does_ make 
>> sense on a <xs:group ref='...'/> in a model.  So we 
>> give precedence to that min/max, and rule out any 
>> other min/max at the top levels of the referenced 
>> group.

I think the implicit question is, why doesn't it makes sense to allow 
min/max at both levels?  I am not quick enough to re-express the exact 
components requried, but I think it's basically that the combination:

        <group name="x" >
                <choice minOccurs="3" maxOccurs="5">
                        <element ref="a"/>
                </choice>
        </group


        <group ref="x" minOccurs="8" maxOccurs="10"/>

would mean

        <sequence  minOccurs="8" maxOccurs="10">
                <choice minOccurs="3" maxOccurs="5">
                        <element ref="a"/>
                </choice>
        </sequence>

where the outer sequence would be implicit in the repeating reference to 
the group.  I realize this represents a bit of invention, but it does the 
correct thing, I think, in the degenerate case where only one of the group 
definition or reference carries an occurrence constraint.  In any case, I 
find the current design to be very counterintuitive.  Thanks much!

------------------------------------------------------------------------
Noah Mendelsohn                                    Voice: 1-617-693-4036
Lotus Development Corp.                            Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------------







ht@cogsci.ed.ac.uk (Henry S. Thompson)
Sent by: www-xml-schema-comments-request@w3.org
12/02/00 01:56 PM

 
        To:     "Morris Matsa" <mmatsa@us.ibm.com>
        cc:     www-xml-schema-comments@w3.org, (bcc: Noah Mendelsohn/CAM/Lotus)
        Subject:        Re: Model Group Definition

You're right, this is a weakness in the spec., as Asir confirms: the
schema for schemas should (indeed I thought it already did) rule out
min/max on the top all/choice/sequence of a model group definition.

The schema for schemas already rules out min/max on the group
definition itself.

The logic is as follows:  min/max clearly _does_ make sense on a
<xs:group ref='...'/> in a model.  So we give precedence to that
min/max, and rule out any other min/max at the top levels of the
referenced group.

I'll fix the schema for schemas.
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of 
Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
                     Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
                                      URL: http://www.ltg.ed.ac.uk/~ht/

Received on Monday, 4 December 2000 17:23:59 UTC