[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: When is an attribute an attribute?

  • From: Rich Koehler <RKoehler@a...>
  • To: xml-dev@i...
  • Date: Tue, 7 Apr 1998 10:35:38 -0700

directed linked graph

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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.