W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2001

Re: duplicate element declaration

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 16 May 2001 17:48:57 +0100
To: Tinny Ng <tng-xml@ca.ibm.com>
Cc: xmlschema-dev@w3.org
Message-ID: <f5b66f1dyti.fsf@cogsci.ed.ac.uk>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:20 GMT