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

Re: Content v. attribute

  • From: Joe Lapp <jlapp@w...>
  • To: xml-dev@i...
  • Date: Mon, 26 Oct 1998 15:09:54 -0500

content attribute
At 08:24 PM 10/26/98 MET, Elaine Brennan wrote:
>[...]If there's one thing I've learned in the SGML/XML universe, it's that
>once I've got data carefully and clearly described, I can transform it
>into another representation with relatively little trouble.  [...]

My primary issue is with minimizing the number of different document types
we have flying around.  We'll create attributes now and two or six months
later decide that going forward we actually need a structured value.

Sure, we could migrate the unstructured values to the structured values,
but we don't want our users having to constantly unlearn old syntax to
learn new syntax.  The idea behind starting with element content rather
than attributes is to design an extensible document type to which we can
add new element types without having to keep changing old element types.

So our experience is that we've been burned by making something an
attribute that ultimately needed to be element content, but we haven't yet
been burned by making something element content that should have been an
attribute.

Besides, the attribute normalization rules that XML specifies have
occassionally caught our engineers off guard.  Sometimes we need whitespace
to be significant in attribute values.

But the conciseness of attributes in elements remains very enticing, so
whenever we're certain that a value will forever fit into an attribute,
we'll put it there.

I'll grant that if you new that a document type would not evolve -- if you
knew that the requirements were fixed and unchanging -- then you could
partition data among attributes and content using whatever criteria you desire.
--
Joe Lapp, Senior Engineer | jlapp@w...
webMethods, Inc.          | Voice: 703-267-1726
http://www.webMethods.com |   Fax: 703-352-0370

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.