W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2008

[Bug 3892] 3.4.1 ambiguous/erroneous wording - prohib. subst. relation to elem. decl.

From: <bugzilla@wiggum.w3.org>
Date: Fri, 08 Feb 2008 01:38:16 +0000
CC:
To: www-xml-schema-comments@w3.org
Message-Id: <E1JNIC0-0006LY-F3@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3892





------- Comment #1 from cmsmcq@w3.org  2008-02-08 01:38 -------
Thank you very much; good catch.  We will try to fix this problem.

The editors have thus far developed two proposed changes to the
paragraph in question; the originator of the issue (Daniel Barclay) or
others may have views on which to take, which would be helpful.

One relatively simple fix is to delete two phrases and insert two
others, so that instead of reading

    {prohibited substitutions} determine whether an element
    declaration appearing in a content model is prevented from
    additionally validating element items with an xsi:type (§2.6.1)
    attribute that identifies a complex type definition derived by
    extension or restriction from this definition, or element items in
    a ·substitution group· whose type definition is similarly derived:
    If {prohibited substitutions} is empty, then all such
    substitutions are allowed, otherwise, the derivation method(s) it
    names are disallowed.

it reads

    {prohibited substitutions} determine whether an element
    declaration ED having this complex type definition as its {type
    definition} is prevented from additionally validating element
    items with an xsi:type (§2.6.1) attribute that identifies a
    complex type definition derived by extension or restriction from
    this definition, or element items whose ·governing element
    declaration· is in ED's ·substitution group· with a {type
    definition} similarly derived: If {prohibited substitutions} is
    empty, then all such substitutions are allowed, otherwise, the
    derivation method(s) it names are disallowed.

A second fix restructures the paragraph and eliminates the suggestion
that valid substitutability of types is used only in the two cases
mentioned (since that is no longer true).

    The {prohibited substitutions} property of a complex type
    definition T determines whether type definitions derived from T
    are or are not ·validly substitutable· for T. Examples include
    (but are not limited to) the substitution of another type
    definition:

      - as the ·governing type definition· of an element instance E,
        when T is the ·selected type definition· of E (often, the
        declared {type definition} of E's ·governing element
        declaration·); this can occur when E specifies a type
        definition using the xsi:type attribute; see xsi:type (§2.6.1);

      - as the ·selected type definition· of an element instance E,
        when T is the declared {type definition} of E's ·governing
        element declaration·; this can occur when conditional type
        assignment is used; see Type Alternatives (§3.12);

      - as the ·governing type definition· of element instances
        whose ·governing element declaration· is included in a 
        model group only ·implicitly·, by virtue of being included 
        in the ·substitution group· of some element declaration 
        included directly or indirectly in the model group, 
        whose declared {type definition} is T.

    If {prohibited substitutions} is empty, then all such
    substitutions are allowed; if it contains the keyword restriction, 
    then no type definition is ·validly substitutable· for T if 
    its derivation from T involves any restriction steps; if {prohibited
    substitutions} contains the keyword extension, then no type definition 
    is ·validly substitutable· for T if its derivation from T involves
    any extension steps.

Unfortunately, the second change makes the text longer.  But at the 
moment, at least, I don't see errors in it.
Received on Friday, 8 February 2008 01:43:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:13:12 GMT