[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Attributes v Elements

  • From: XML Everywhere <host@x...>
  • To: xml-dev@l...
  • Date: Thu, 17 May 2001 20:36:43 -0700

Re: Attributes v Elements
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@t...>
To: <xml-dev@l...>
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.



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.