Named type definitions inside element declarations?

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