[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: When is an attribute an attribute?
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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|