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

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