OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Newbie Q

[ Lists Home | Date Index | Thread Index ]
  • From: Robin Cover <robin@ACADCOMP.SIL.ORG>
  • To: xml-dev@ic.ac.uk
  • Date: Mon, 24 Aug 1998 18:05:03 -0500 (CDT)

Frank Blau <fblau@nina.snohomish.wa.gov> wrote:

> Is there a formal rule for the use of Atrributes vs Elements?

Some hints are recorded in the documents with these URLs:

   http://www.sil.org/sgml/elementAttr9804.html
   http://www.sil.org/sgml/elementsAndAttrs.html

These documents are referenced from the dedicated section:

 http://www.sil.org/sgml/topics.html#elementsAndAttrs
   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.


-robin

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS