element name/ref uniqueness

http://www.w3.org/TR/xmlschema-1/#section-Constraints-on-XML-Representations
-of-Particles says:

3.9.4 Particle Validation Rules
Validation Rule: Element Sequence Locally Valid (Particle)

...
2.3 For each element information item in the sequence one of the following
must be true:
2.3.1 The element declaration is local ...
2.3.2 The element declaration is top-level ...

Does it mean that the following schema is invalid?

<schema>
    <element name="inner"/>
    <element name="outer">
        <complexType>
            <sequence>
                <element ref="inner"/>
                <element name="inner"/>
            </sequence>
        </complexType>
    </element>
</schema>

Is the following schema valid?

<schema>
    <element name="outer">
        <complexType>
            <sequence>
                <element name="inner"/>
                <element name="inner"/>
            </sequence>
        </complexType>
    </element>
</schema>

Where in the "A Schema for Schemas (normative)" such constraints are
specified (uniqueness?, key/keyref pair?)?
Or this is described only in nn 3.4.9 ?

Thanks for your help,
Michael Shapiro

Received on Tuesday, 15 May 2001 15:47:14 UTC