Re: Uniqueness of attribute names

Dan,

Thanks for your response. As this appears to be a bug, here is my 
full list of what is missing, and if you have any 
comments/disagreements please let me know! The background is that I 
am writing a comparator for XML Schemas, that is software to compare 
two schemas and indicate the differences. So it needs to know when 
items are ordered and what their keys are.

I will assume that you will circulate this to 
www-xml-schema-comments@w3.org as soon as our discussion is concluded.

Within ELEMENT all:

<key name="all.element">
  <selector>element</selector>
  <field>@name|@ref</field>
</key>
<key name="all.group">
  <selector>group</selector>
  <field>@name|@ref</field>
</key>


Within ELEMENT attributeGroup:

<key name="attributeGroup.attribute">
  <selector>attribute</selector>
  <field>@name|@ref</field>
</key>
<key name="attributeGroup.attributeGroup">
  <selector>attributeGroup</selector>
  <field>@name|@ref</field>
</key>


Within ELEMENT choice:

<key name="choice.element">
  <selector>element</selector>
  <field>@name|@ref</field>
</key>
<key name="choice.group">
  <selector>group</selector>
  <field>@name|@ref</field>
</key>

Within ELEMENT complexType:

<key name="complexType.attribute">
  <selector>attribute</selector>
  <field>@name|@ref</field>
</key>
<key name="complexType.attributeGroup">
  <selector>attributeGroup</selector>
  <field>@name|@ref</field>
</key>

Robin

At 1:13 pm -0500 10/8/00, Dan Connolly wrote:
>Robin LaFontaine wrote:
> >
> > 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?
>
>Looks like an oversight, i.e. a bug in the spec. I'm copying
>www-xml-schema-comments@w3.org.
>
>
>--
>Dan Connolly, W3C http://www.w3.org/People/Connolly/

-- -----------------------------------------------------------------
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 Friday, 11 August 2000 07:31:21 UTC