Lists Home |
Date Index |
- From: Robin Cover <robin@ACADCOMP.SIL.ORG>
- To: email@example.com
- Date: Mon, 24 Aug 1998 18:05:03 -0500 (CDT)
Frank Blau <firstname.lastname@example.org> wrote:
> Is there a formal rule for the use of Atrributes vs Elements?
Some hints are recorded in the documents with these URLs:
These documents are referenced from the dedicated section:
Elements versus attributes - How do I decide?
> that Attributes are
> best used to communicate information to the browser/application, and
> Elements are best used for actual Data. Is this a valid assumption?
I do not think this assumption has any basis whatever in the XML 1.0
specification, and it certainly has no basis in the parent standard,
ISO 8879. There is some basis in HTML browser behavior, but that is
(in my opinion) a Bad Thing, and not to be perpetuated as a standard
agreement. It is dangerous for all the same reasons as in "HTML":
the industry got stuck with hard-coded application processing semantics.
XML encoding itself should used with the semantic opacity that the
specification implies, in my judgment; styles and other (separate)
processing specifications should determine how/whether certain (character)
data in an XML document is acted upon (displayed, suppressed, etc.).
The distinction between "information [for the browser/application]"
and "actual Data" is specious, at least from the perspective of
XML itself. Why? because what you think is your "metadata" (today)
will become your data tomorrow; your metadata is someone else's data
even today. "Metadata" does not map conceptually to attribute - for
many reasons, the most obvious of which is that some metadata is highly
complex, and cannot be structured using SGML/XML attributes (flat
strings). And, of course, we know that XML is now being designed
for use in all kinds of ('Internet') applications which do not involve
any "browser" or human viewing of the data in its tagged format;
DTDs are generated from database schemas, and tagged data is passed
between applications (then discarded) without being seen by humans.
My 2 cents. The documents referenced above contain excellent
summaries of considerations that might be taken into account when
deciding how to model your data in a markup representation.
xml-dev: A list for W3C XML Developers. To post, mailto:email@example.com
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:firstname.lastname@example.org the following message;
To subscribe to the digests, mailto:email@example.com the following message;
List coordinator, Henry Rzepa (mailto:firstname.lastname@example.org)