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

RE: When is an attribute an attribute?

  • From: Tim Bray <tbray@t...>
  • To: xml-dev@i...
  • Date: Thu, 09 Apr 1998 18:13:56 -0700

RE: When is an attribute an attribute?
At 10:35 AM 07/04/98 -0700, Rich Koehler wrote:
>I've become fond of the method that Tim Bray used to distinguish between
>elements and attributes in his discussion of MCF
>(http://www.textuality.com/mcf/MCF-tutorial.html).  He writes, "...when
>the property has a simple value like a string, we put that in the
>content of the element; when the property's value is another object, we
>put a pointer to it in an attribute value 

Hmm, recommendations do come back to haunt one.  I guess I'd
sign up for part of that statement - putting URL^HIs in attribute
values rather than element content seems to be a basic part of Web
culture, and has come to feel natural.

But I'm on the record as saying I've never heard a convincing universal
decision procedure for what should be an element and what an attribute.
There are *some* things where it's easy - if you need further internal
structure, use an element, for example.  But my beliefs on this are:

1. I have observed that humans doing document design are comfortable
   with having two ways of labeling content, and assign things to 
   elements or attributes for reasons that seem good to them.
2. It is often the case, after designers have done this, that they 
   change their minds.  I know I do.
3. For all of these reasons, if software needs to extract information
   from XML documents, it should be prepared to extract it either
   from character data or from attribute values, and not struggle
   against what the designer decided.
 -Tim


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


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.