W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2000

Named type definitions inside element declarations?

From: Peter Canning <canning@vitria.com>
Date: Tue, 16 May 2000 18:36:47 -0700
Message-Id: <>
To: www-xml-schema-comments@w3.org
Can a (simple or complex) type definition inside an element declaration 
have a name attribute?  I can't find anything in the structure 4/7/2000 
that disallows it.

For example (a slight modification from the Primer):

<xsd:element name='internationalPrice'>
     <xsd:complexType name='myEmptyType' content='empty'>
         <xsd:attribute name='currency' type='xsd:string' />
         <xsd:attribute name='value'    type='xsd:decimal' />

If that is legal, am I correct in assuming its illegal to have two type 
definitions with the same name inside different element declarations?

         Peter Canning

PS: References to the text in 4/7/2000 spec to confirm the answers would be 
Received on Tuesday, 16 May 2000 21:36:55 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:08:47 UTC