On 12/21/13 4:11 PM, Michael Kay wrote:
> Attributes betray the origins of XML as a document markup language.
> The text nodes contain the content, the attributes contain the
> information used for formatting the text.
This is broadly right. I'm not sure that "betray" is the right word,
and I wouldn't limit it to formatting. However, the presence of
additional information within the element structure certainly makes it
easier to annotate a flow of text without having to modify the original
flow.
> For a language designed for data interchange, the attribute/element
> split would be nonsense. But for a document markup language, it makes
> eminent sense.
Yes. I can imagine cases where the attribute/element split could be
useful for data, but they are, well, more fanciful, mostly about
annotation after other patterns of use are established.
Thanks,
--
Simon St.Laurent
http://simonstl.com/