Clarification of "Element Declarations Consistent"

Hello all, a question about the Element Declarations
Consistent rule.

The Element Declarations Consistent rule for model groups
rules out inconsistent element declarations like the
following two conflicting definitions of element <a>,
i.e., <a> cannot be both an "int" and a "string" in
the same group:

<xs:complexType name="example-1">
    <xs:element name="a" type="xs:int"/>
    <xs:element name="whatever"/>
    <xs:element name="a" type="xs:string"/>

In addition to explicit element declarations, the rule
also prevents conflicts between elements that appear
"either directly, indirectly, or implicitly", i.e., between
nested model groups or elements permitted via
substitution groups.

My question: consider the following "tricky" indirect case
involving a wildcard referencing a global element -

<xs:element name="a" type="xs:string"/>
<xs:complexType name="example-2">
    <xs:element name="a" type="xs:int"/>
    <xs:element name="whatever"/>
    <xs:any namespace="##targetNamespace" processContents="lax"/>

Clearly the local <a> and the indirect reference to the
global <a> are "inconsistent" with each other within the
content model of example-2, but I'm not sure if the
"directly, indirectly, or implicitly" language in the
ETC rule captures this case.

Is there a hole in the EDC rule language with respect to
example-2? Is this something that could be clarified in
an errata?

Thank you for any help!

David Bau

Received on Wednesday, 29 October 2003 10:45:27 UTC