LISTSERV mailing list manager LISTSERV 15.5

Help for XML-L Archives


XML-L Archives

XML-L Archives


View:

Next Message | Previous Message
Next in Topic | Previous in Topic
Next by Same Author | Previous by Same Author
Chronologically | Most Recent First
Proportional Font | Monospaced Font

Options:

Join or Leave XML-L
Reply | Post New Message
Search Archives


Subject: Re: Element/Attribute naming
From: Linda van den Brink <[log in to unmask]>
Reply-To:General discussion of Extensible Markup Language <[log in to unmask]>
Date:Wed, 25 Aug 1999 08:35:42 +0200
Content-Type:text/plain
Parts/Attachments:
Parts/Attachments

text/plain (40 lines)


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
this case.

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...


-----Original Message-----
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


Hi all,

I have a question regarding the following DTD snippet:

<!ELEMENT category EMPTY>
<!ATTLIST category
    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.

Thank you,

Tim Brogdon
NPRST
DSN: 882-4637   COMM: (901) 874-4637
FAX:  DSN 882-2720 or (901) 874-2720
E-mail: [log in to unmask]

Back to: Top of Message | Previous Page | Main XML-L Page

Permalink



LISTSERV.HEANET.IE

CataList Email List Search Powered by the LISTSERV Email List Manager