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

Re: Newbie Q

  • From: "James Tauber" <jtauber@j...>
  • To: "Frank Blau" <fblau@n...>, <xml-dev@i...>
  • Date: Tue, 25 Aug 1998 18:22:37 +0800

Re: Newbie Q
>Is there a formal rule for the use of Atrributes vs Elements? The
>assumption I am going on (per The XML Primer) is 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?
>
>In an EDI transaction, I was going to put the Header and Trailer
>information in attributes, with the actual Detail Segments as
>Elements...
>
>Any thoughts?

Definitely see Robin Cover's page on this [cited by another responder].

It seems to me that issue of Attributes vs Elements becomes trickier as the
thing you are marking up becomes more data-like and less document-like.

The value of attributes are technically markup rather than content (at least
by my reading of the spec) so the clearer the distinction is between what
should be content and what should be markup, the clearer the attribute vs
element issue is.

This isn't too bad when you are marking up already existing content but it
gets progressively worse as the markup language is used less and less for
'marking up' and more and more for other things.

As my paper at SGML/XML Asia Pacific (or is it XML Asia now?) will discuss,
one is always drawing the line between content and markup on an application
by application basis. Content generally contains (or perhaps *is*) markup
that's not XML. Consider spaces between words. They are a form of (non-XML)
markup. They are also a presentational style. In some applications (such as
corpus linguistics) word boundaries are marked up and it is a stylesheet
issue to display the spaces.
The moral is that even an important distinction like markup vs content vs
presentation depends on the application.

James
--
James Tauber / jtauber@j...      http://www.jtauber.com/
Lecturer and Associate Researcher
Electronic Commerce Network             ( http://www.xmlinfo.com/
Curtin Business School                  ( http://www.xmlsoftware.com/
Perth, Western Australia                ( http://www.schema.net/





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.