Uniqueness of attribute names

In the element named 'schema' in the definition of XML Schema, there 
is a constraint:

    <key name="attribute">
     <selector>attribute</selector>
     <field>@name</field>
    </key>

which indicates that the 'name' attribute is a key for the element 
called attribute.

Why is there not a corresponding constraint within the element named 
'complexType' (and indeed in attributeGroup) in order to constrain 
all its attributes to have different names? According to XML 1.0 it 
is surely the case that whenever we have multiple attributes in an 
element definition, they can always be distinguished by their 'name' 
(which is an attribute in XML schema).

Therefore I would have thought that there would be a simile 
constraint as above within complexType (and attributeGroup).

Robin

-- -----------------------------------------------------------------
Robin La Fontaine, Monsell EDM Ltd
(R&D Project Management, Engineering Data Exchange using XML, EDIF)
Tel: +44 1684 592 144 Fax: +44 1684 594 504 or +44 870 054 2811
Email: robin@monsell.co.uk       http://www.monsell.co.uk

Received on Thursday, 10 August 2000 11:07:23 UTC