- From: Robin Berjon <robin.berjon@expway.fr>
- Date: Tue, 21 Jan 2003 12:44:13 +0100
- To: Steven Pemberton <Steven.Pemberton@cwi.nl>
- CC: www-tag@w3.org
Steven Pemberton wrote: > From: "Robin Berjon" <robin.berjon@expway.fr> > >>What happens when a DTD declares attribute "name" to be of type ID and >>it occurs on the same element as xml:id with a different id, in a validated >>document? > > I have never understood this restriction in XML. I understand the problem of > having two elements with the same name, but not of having two names on one > element. > > Can anyone explain to me what breaks when an element has two (different) > names? Why does XML prevent you from having more than one attribute of type > ID on an element? I do not know the exact reasons behind that decision, but it would seem to me that having a garanteed one-to-one mapping between name and element could have some value. That way you are certain to have no duplicate elements in a set of IDs. Whether or not that is more important than the ability to give an element two names probably depends on your application. -- Robin Berjon <robin.berjon@expway.fr> Research Engineer, Expway http://expway.fr/ 7FC0 6F5F D864 EFB8 08CE 8E74 58E6 D5DB 4889 2488
Received on Tuesday, 21 January 2003 06:44:51 UTC