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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: When is an attribute an attribute?

[ Lists Home | Date Index | Thread Index ]
  • From: Rich Koehler <RKoehler@able-inc.com>
  • To: xml-dev@ic.ac.uk
  • Date: Tue, 7 Apr 1998 10:35:38 -0700


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 and leave the element
decribing the property empty."

This allows the creation of a directed linked graph, where objects refer
to other objects, and the links can have attributes of their own.  In
your case it might look like this:

<BOOK ID="The Call of the Wild">
   <AUTHOR UNIT="Jack London"/>
</BOOK>

Which allows you to define something like this:

<PERSON ID="Jack London">
   <FIRST>Jack</FIRST>
   <LAST>London</LAST>
   <PHONE>(206) 555-3423</PHONE>
   <WORK UNIT="The Call of the Wild"/>
   <WORK UNIT="Love those Wolves"/>
</PERSON>

Where the ID attributes are unique tokens for each object, and the UNIT
attributes point to other objects.  In this case we see that Jack London
is a PERSON, who in the context of the book "The Call of the Wild" is an
AUTHOR.  Jack may appear in other objects, in other contexts, like:

<STORE ID="Wal-Mart">
   <CUSTOMER UNIT="Jack London"/>
....

I think RDF will eventually address this.  Anyway, that's my personal
preference.

Rich

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