Re: element name/ref uniqueness

> > <schema>
> >     <element name="inner"/> <!-- Top-level declaration -->
> >     <element name="outer"> <!-- Top-level declaration -->
> >         <complexType>
> >             <sequence>
> >                 <!-- Reference to Top-level declaration -->
> >                 <element ref="inner"/>
> >                 <!-- Local declaration -->
> >                 <element name="inner"/>
> >             </sequence>
> >         </complexType>
> >     </element>
> > </schema>
>
> For me it looks like the <element name="inner"/> has both
> a top-level declaration and a local declaration and that makes
> this schema invalid (at least that's how I read the spec:
> in absence of the clarification of the matter in XMLSchema.xsd
> such an interpretation is possible, even if it contradicts
> the intensions of the document authors ;-)
>
> Would you please elaborate a little bit more on the [1] to [2] relations.

Hmm, after rereading the relevant sections in the spec I believe that you are
correct. It does actually look like the <element name="inner"/> has both a
top-level declaration and a local declaration. Hopefully someone with a better
understanding of the spec can help us out here...

Cheers,
/Eddie

Received on Thursday, 17 May 2001 02:03:38 UTC