Simon St. Laurent went fishing in this post
and no one took the bait ... I thought xml-dev would go an entire year w/o the elements vs attributes permatopic ... how wrong I am.
Its the holidays so lets put some fuel to the fire;
Rule #1 - If you don't know how to use attributes, use an element ... an element can represent everything you need to use w/o the conceptual overload. Feel free to complain to anyone who will listen.
Rule #2 - If you have information that itself does not need to be marked up then you might have a candidate for an attribute. Alternately if you have content that you insist on having no structure/markup then an attribute might be for you.
Rule #3 - When you use attributes, you don't care about whitespace, you don't care about sorting ... in fact think of it as a magical place which lives out of band in a non dimensional space(I didnt say anything about ns right ...). There could be optimisation opportunities here if one cared about it.
I don't think of name value pairs as the right canonical example of attributes ... its looking at XML purely through the 'data prism', as a compromise it will do in a pinch ...
from the 'document prism' the commonplace anchor tag demonstrates succinctly why an attribute may be useful, but c'est la vie, others may argue otherwise.
To me XML does something interesting in that it roughly externalizes/mirrors a parse tree that would get built internally when you do anything with it (represent data, document or a programming language) ... attributes give you another leaf type to play with and there is where the sweet siren song can lead one astray when designing a markup language (and thinking too far ahead of how you are going to process it).
Anyhow lets see if we can push another 100+ thread out before the New Year!
Jim Fuller