In your snippet, there is no attribute named the same thing as the element.
The word 'category' in combination with <!ATTLIST here means 'the following
is the list of attributes that can be used with the category element'.
'Value', 'display-value', 'proportion', and 'missing' are the attributes in
I don't know, though, if a parser would get confused if an element has an
attribute with exactly the same name. I think it's a bit strange to do so...
From: Tim Brogdon [mailto:[log in to unmask]]
Sent: Wednesday, August 25, 1999 12:45 AM
To: [log in to unmask]
Subject: Element/Attribute naming
I have a question regarding the following DTD snippet:
<!ELEMENT category EMPTY>
value CDATA #REQUIRED
display-value CDATA #IMPLIED
proportion CDATA #IMPLIED
missing (true | false) "false"
What are the advantages/disadvantages of having an attribute named the same
thing as the element? For some reason, I was under the impression that this
might possibly lead to parser confusion.
DSN: 882-4637 COMM: (901) 874-4637
FAX: DSN 882-2720 or (901) 874-2720
E-mail: [log in to unmask]