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

Is this derivation correct (in schema for schemas)?

From: Stefan Wachter <Stefan.Wachter@gmx.de>
Date: Sun, 11 Aug 2002 15:56:22 -0400 (EDT)
To: xmlschema-dev@w3.org
Message-ID: <25544.1029095749@www3.gmx.net>

Hi all,

in the schema for schemas the complexType "all" is derived from the
complexType "explicitGroup" by restriction. The content models of these two types are
as follows:


<sequence minOccurs="1" maxOccurs="1">
    <element name="annotation" minOccurs="0" maxOccurs="1"/>
    <choice minOccurs="0" maxOccurs="unbounded">
        <element name="element" minOccurs="1" maxOccurs="1"/>
        <element name="group" minOccurs="1" maxOccurs="1"/>
        <element name="choice" minOccurs="1" maxOccurs="1"/>
        <element name="sequence" minOccurs="1" maxOccurs="1"/>
        <element name="any" minOccurs="1" maxOccurs="1"/>


<sequence minOccurs="1" maxOccurs="1">
    <element name="annotation" minOccurs="0" maxOccurs="1"/>
    <element name="element" minOccurs="0" maxOccurs="unbounded"/>

The restriction looks valid but the rules for validating an element as a
restriction of a choice group demands that the element is a valid restriction of
one of the particles in the choice group. This is not the case in the above
example because of the occurence constraints! (maxOccurs is unbounded in the
restricting element.)

Maybe another normalization step (like replacing possible substitutions by
choices removing pointless groups) is needed for adjusting occurence

Received on Tuesday, 13 August 2002 12:01:18 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:04 UTC