Item description data in XML (XML)
noelc at OEB.HARVARD.EDU
Tue Nov 30 09:48:18 CET 1999
On Tue, 30 Nov 1999, Gregor Hagedorn wrote:
> General question: Is there any reason why attributes exist at all?
> What is the advantage of
> <leaf shape="obovate" length_mm="31"/>
In general a tag can provide the same function as an attribute, as in the
case you mention, but there are some situations where attributes are
useful. For example, in cases where text is being marked up and the text
itself cannot be altered, new data can be stored in attributes.
In this case country IDs can added without altering the text:
"They can be found in <country id="EN">England</country> and in
Also in cases where you don't want your tagged items to be rendered by a
browser. For example, if you add some RDF metadata:
The this case the word "Apiaceae" would be rendered in the page,
while in this case:
the word "Apiaceae" would not appear in the page.
There are probably more fundamental differences that Liegh, Bob, and
others could come up with -- these are just two that come to mind.
More information about the tdwg-content