Re: element content vs. element attribute

Paul Prescod (papresco@technologist.com)
Sun, 21 Dec 1997 12:06:18 -0500


Probably the best forum for DTD questions is comp.text.sgml.
After all, XML DTDs are SGML DTDs and people there have been making them
for more than a decade.

In fact, this very topic was covered recently. Use dejanews and look for
the thread (mis!)named "Entities vs. Attributes" from around 1997/06/16
in the comp.text.sgml archive. Many of the points raised here are the
same as there.

This is a recurring question and perhaps deserves a section on the
special topics page [1] of the SGML Web Page, maybe as part of a DTD
design section. if its patron saint is willing. Here is what I am
thinking of:

<H3>On DTD Design</H3>
<P>There are many heuristics for and opinions on proper DTD design.
<UL>
<LI>A recurring question is when to use attributes or sub-elements.
This was discussed <A HREF="elements-attributes.html">in
comp.text.sgml</A> and <A HREF="">in XML-DEV</A>.

<LI>What constitutes an elegant DTD? In the summer of 1997, DTD
designers discussed this in the comp.text.sgml thread titled "The
Aesthetics of Document Type Design."
</UL>

Paul Prescod

[1]http://www.sil.org/sgml/topics.html