RE: When is an attribute an attribute?

Rich Koehler (RKoehler@able-inc.com)
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