[Home] [By Thread] [By Date] [Recent Entries]

  • From: David Megginson <ak117@f...>
  • To: xml-dev@i...
  • Date: Sun, 21 Dec 1997 06:55:42 -0500

Ray Waldin writes:

 > In other words, when should data be contained by elements?  Or
 > conversely, when should data be an attribute of an element instead
 > of contained by that element?

Here's a good, general distinction:

* use elements for structurally-significant information; and

* use attributes for meta-data.

One problem, that will become more obvious when more XML tools are
available, is that most WYSIWYMG (M="might" or "may") XML editing
software will like show character data (element content) on the screen
by default, but will show attributes only on request, possible in a
pop-up dialog.  It makes sense to have the most important information
(the real content) inside elements, then, and to have the meta-data
out of the way in attributes.

(Peter: how do you display attributes in Jumbo?)

Of course, what is and isn't meta-data will vary depending on the
document type, but here are some common examples:

* a unique identifier
* a security level
* a revision or release level
* rendition information (yech)
* configuration information
* the preferred unit of measurement


All the best,


David

-- 
David Megginson                 ak117@f...
Microstar Software Ltd.         dmeggins@m...
      http://home.sprynet.com/sprynet/dmeggins/

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...)


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member