OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Newbie Q

[ Lists Home | Date Index | Thread Index ]
  • From: "James Tauber" <jtauber@jtauber.com>
  • To: "Frank Blau" <fblau@nina.snohomish.wa.gov>, <xml-dev@ic.ac.uk>
  • Date: Tue, 25 Aug 1998 18:22:37 +0800

>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@jtauber.com      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@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS