
Deciding what should be an element and what should be an attribute is a
hot debate in the XML community. We will revisit this topic in Chapter 10,
“Modeling for Flexibility,” but here are some guidelines:
• The main argument in favor of using attributes is that the DTD offers
more controls over the type of attributes; consequently, some people
argue that object properties should be mapped to attributes.
• The main argument for elements is that it is easier to edit and view
them in a document. XML editors and browsers in general have more
intuitive handling of elements than of attributes.
I try to be pragmatic. In most cases, I use element for “major” ...