Re: duplicate element declaration

Tinny Ng <tng-xml@ca.ibm.com> writes:

> According the schema spec, we are allowed to have duplicate element
> declaration within the same scope as long as they are of the same type,
> i.e.
> 
> <element name="root">
>  <complexType>
>   <sequence>
>    <element name="A" type="string"/>
>    <element name="A" type="string"/>
>   </sequence>
>  </complexType>
> </element>
> 
> But if the second has substitutionGroup specified, i.e.
> 
> <element name="root">
>  <complexType>
>   <sequence>
>    <element name="A" type="string"/>
>    <element name="A" type="string" substitutionGroup="ipo:comment"/>
>   </sequence>
>  </complexType>
> </element>
> 
> then
> 
> 1.  If this valid?

No, because 'substitutionGroup' is only allowed on top-level declarations.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/

Received on Wednesday, 16 May 2001 12:48:55 UTC