When is an attribute an attribute?

Rich Koehler RKoehler at able-inc.com
Tue Apr 7 19:33:32 BST 1998

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"/>

Which allows you to define something like this:

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

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


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)

More information about the Xml-dev mailing list