W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2016

Re: a small document about XML Schema <sequence> vs <all> constructs

From: Ihe Onwuka <ihe.onwuka@gmail.com>
Date: Mon, 1 Aug 2016 08:13:03 -0400
Message-ID: <CALfs7+y_OC6UQx3w+5EzC=FF223U2fV6PWx4OV4vOZTKqjybmQ@mail.gmail.com>
To: "Henry S. Thompson" <ht@inf.ed.ac.uk>
Cc: Mukul Gandhi <gandhi.mukul@gmail.com>, "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
On Thu, Jul 28, 2016 at 4:04 AM, Henry S. Thompson <ht@inf.ed.ac.uk> wrote:

> Ihe Onwuka <ihe.onwuka@gmail.com> writes:
>
> > Forgive me if this does not apply to XSD 1.1 but contrary to your write
> up
> > sequence is not a subcase of xsd:all because xsd:all has severe
> cardinality
> > restrictions in that it is limited to 0 or 1 occurrence which would
> > prohibit it's use even where unordered semantics are explicitly desired.
>
> I _think_ you're confusing constraints on the xsd:all element itself
> with constraints on its content.  The latter are _not_ constrained wrt
> cardinality, as the following example (from section 3.8.4.1.3 of the
> spec [1]) makes clear:
>
>   <xs:all>
>    <xs:element name="a" minOccurs="0" maxOccurs="5"/>
>    <xs:element name="b" minOccurs="1" maxOccurs="1"/>
>    <xs:element name="c" minOccurs="0" maxOccurs="5"/>
>   </xs:all>
>
> ht
>
> [1] https://www.w3.org/TR/xmlschema11-1/#all-mg
> --
>


Useful to know.

Glad  I took the precaution of expressly excluding   XSD 1.1 (the source of
your example) from my comment.
Received on Monday, 1 August 2016 13:17:39 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:16:11 UTC