W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2000

Re: xsd:all and xsd:element with max(min)occurs

From: Miloslav Nic <nicmila@idoox.com>
Date: Wed, 11 Oct 2000 14:14:31 +0200
Message-ID: <39E459A7.1C3095EF@idoox.com>
To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
> The primer [1] is very formal about the fact that maxOccurs cannot be
> greater than 1 for elements appearing within "all" particles...
> [1] http://www.w3.org/TR/xmlschema-0/#ref18

I have noticed in:
.3.2 XML Representation of Element Declaration Schema Components :

XML Representation Summary:  element Element Information Item

maxOccurs = for maxOccurs : 1

then it says after few lines:

if the element element information item has complexType or group as an
ancestor and the ref
                 [attribute] is absent, the corresponding schema
components are as follows (unless minOccurs=maxOccurs=0,
                 in which case the item corresponds to no component at


{max occurs} : unbounded, if the maxOccurs [attribute] equals unbounded,
otherwise the numeric normalized
                               value of the maxOccurs [attribute], if
present, otherwise 1.

So according to me:
xsd:all has xsd:complexType as a parent and therefore xsd:element have
xsd:complexType as an ancestor,
and so there is no limit on the use of maxOccurs on xsd:element and it
is legitimite to use 
maxOccurs on the element inside xsd:all

I found the mentioned text in the primer:

The all group (which provides a simplified version of the SGML
&-Connector) is limited to the top-level of any
        content model. Moreover, the group's children must all be
individual elements (no groups), and no element in the content model may
        more than once, i.e. the permissible values of minOccurs and
maxOccurs are 0 and 1.

But where is this condition contained in the spec?

I was trying to find it last 10 minutes, I just cannot

<firstName> Miloslav </firstName>    
<surname>   Nic      </surname>     

<mail>    nicmila@idoox.com    </mail>   
<support> http://www.zvon.org  </support>
Received on Wednesday, 11 October 2000 08:14:34 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:47 UTC