[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XML Guidelines -06
From: "Tim Bray" <tbray@xxxxxxxxxxxxxx>
> - I disagree mildly with the assertion; attributes, as this section
> points out in gory detail, can be used for pretty well anything and
> you'd be hard-put to find any normative text to back up the assertion of
> general intent
In ISO 8879 SGML, there is non-normative text that "The GI" (element type name)
"is normally a noun; the attributes are nouns or adjectives that describe
significant characteristics of the GI" (and notes that verbs are procedural and
so "defeat the purpose of generalized markup".) B5.
The normative text says an attribute is "A characteristic quality, other than type
or content." 4.9 So there is indeed general intent, but it is so general that it really
doesn't provide much of a constraint. As Tim points out, "meta data" may not
be broad enough. Especially since an attribute may be conveying significant
information, whereas "metadata" may suggest something peripheral or merely
annotational: the src attribute on an html img element is certainly a characteristic
quality of an img, but it is not metadata in the way that many people would view it.
It is not a big point, but I think readers of the RFC would be helped with some
guidance in this area. The question "when do I use elements and when do
I use attributes?" is frequently asked, and the answer ("it depends on your
concepts of the status of different information items", or "it depends
on whether the reveiving process needs the information at its head
to process the element's contents", etc) are often regarded as being evasive,
as if there should be something more to it than that.
Perhaps it would be better to say "attributes are best thought of as
describing simple characteristics of an element, for example, metadata,
class, subtype, unique identifiers, or hypertext links".
Also, I think there should be a much stronger recommendation that if
some data is free text rather than formal text it should be in element
content. This is alluded to, but the reason is that best practice internationalization
requires that directionality and annotation elements can be allowed,
so using element content is more future-proof.
Cheers
Rick Jelliffe