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: <4.2.2.20000516182635.00ac6300@icarus.vitria.com>
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' />
     </xsd:complexType>
</xsd:element>

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

         thanks,
         Peter Canning

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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:49:52 UTC