[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Attributes v Elements
- From: XML Everywhere <host@xmleverywhere.com>
- To: xml-dev@lists.xml.org
- Date: Thu, 17 May 2001 20:36:43 -0700
Tim Bray wrote:
"data the way it actually is"
-----
Data is abstract. You
can represent it however you like.
For example, if you only use attributes,
you avoid mixed content entirely.
Is mixed content "bad?" Are
attributes "bad?" It depends
on who you ask. There is no "yes" or
"no" here, only the author's preference which
XML will gladly oblige, leaving newbies
with more questions than they
started with. In Perl, "there is
more than one way to do it." With
XML we have the same thing.
However, it's pretty obvious when
a Perl program "works" but not
so obvious whether an XML
schema works. That's the
nature of models. There are many roads
to success, and stumbling blocks along
the way.
A memo is a representation of complex
data. We don't have to represent
the data in memo form but it is
sometimes convenient to do so.
Convenient for humans maybe,
but not for computers that might
have to operate on the data beyond
displaying it on a glass screen. Perhaps
some day, a mark-up language for
human language will exist. This has been
the subject of natual language processing
for quite some time. But I digress.
The decision to put text inside or outside
angle brackets or whether to
start an element in a text block is ... arbitrary.
These design decisions have
nothing to do with the data in its "real"
form, because data has no real form.
Data is not the thing itself.
Sometimes, such as the case with
XHTML, it depends on what you intend
to do with the data. But when it
comes to data modeling, seldom do
we have the luxury of knowing up front
the complete universe of data consumers.
To the author of this thread, my advice
is: experiment, explore, find what works
for you, and stick with it.
http://xmleverywhere.com
----- Original Message -----
From: "Tim Bray" <tbray@textuality.com>
To: <xml-dev@lists.xml.org>
Sent: Thursday, May 17, 2001 3:31 PM
Subject: Re: Attributes v Elements
doing XHTML in the absence of mixed content
would be horribly painful. One of the nice things about XML is that it
usually can model the data the way it actually is, not the way you want
to idealize it.