XML.com FAQs > D. Developers and Implementors (including WebMasters and server operators)
Question:  D.3 Which should I use in my DTD, attributes or elements?

There is no single answer to this: a lot depends on what you are designing the document type for.

Traditional editorial practice is to put the real text (what would be printed) as character data content, and keep the metadata (information about the text) in attributes, from where they can more easily be isolated for analysis or special treatment like display in the margin or in a mouseover:

<l n="184"><sp>Portia</sp><text>The quality of mercy is not strain'd,</text></l>

But from the systems point of view, there is nothing wrong with storing the data the other way round, especially where the volume of text data on each occasion is relatively small:

<line speaker="Portia" text="The quality of mercy is not strain'd,">184</line>

A lot will depend on what you want to do with the information and which bits of it are easiest accessed by each method. A rule of thumb for conventional text documents is that if the markup were all stripped away, the bare text should still be readable and usable, even if unformatted and inconvenient. For database output, however, or other machine-generated documents like e-commerce transactions, human reading may not be meaningful, so it is perfectly possible to have documents where all the data is in attributes, and the document contains no character data in content models at all. See http://xml.coverpages.org/elementsAndAttrs.html for more information.

This FAQ is from The XML FAQ, maintained by Peter Flynn