- From: Ralph R. Swick <swick@w3.org>
- Date: Tue, 21 Sep 1999 12:55:07 -0400
- To: "John McKeown" <mckeowj@cs.tcd.ie>
- Cc: <www-rdf-comments@w3.org>
At 06:44 PM 8/30/1999 +0100, John McKeown wrote: http://lists.w3.org/Archives/Public/www-rdf-comments/1999JulSep/0035 >In section 2.2.2 (Basic Abbreviated Syntax), after the explanation and >example of the second abbreviation syntax the following line appears: "Using >the second basic abbreviation syntax, the inner Description element and its >contained property expressions can be written as attributes of the Creator >element:" > >I believe this should read "Using the first basic abbreviation...." Well no, not exactly John. The first and second abbreviation forms do both permit the transformation of XML element tags into XML attributes but they have different interpretations with respect to the subject, and object of the respective RDF statements. This could have been made clearer by adding an additional step to the second example given in 2.2.2. Starting with the form: <r:RDF xmlns:r="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:s="http://description.org/schema/"> <r:Description about="http://www.w3.org/Home/Lassila"> <s:Creator> <r:Description about="http://www.w3.org/staffId/85740"> <v:Name>Ora Lassila</v:Name> <v:Email>lassila@w3.org</v:Email> </r:Description> </s:Creator> </r:Description> </r:RDF> Because the v:Name and v:Email statements give only strings (literals) as their values, the first abbreviation option would let us write this as: <r:RDF xmlns:r="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:s="http://description.org/schema/"> <r:Description about="http://www.w3.org/Home/Lassila"> <s:Creator> <r:Description about="http://www.w3.org/staffId/85740" xmlns:v="http://fiction.org/schema/vcard" v:Name="Ora Lassila" v:Email="lassila@w3.org" /> </s:Creator> </r:Description> </r:RDF> That is, the first abbreviation applies to the Subject of RDF statements that are expressed in a Description element; i.e. the subject of the statement 'X has v:Name "Ora Lassila"'. The practical effect of this abbreviation on a parser is small since the Description element explicitly signals the presence of a node in the graph. That node is the subject of the RDF statements whether they are expressed in attribute form or element form. The second abbreviation option applies to the Object of the statement "M has s:Creator N". The form above clearly states that N is the resource http://www.w3.org/staffId/85740. (Whether this is a reasonable statement to make is a separate issue.) The second abbreviation applies to property values that are given as nested Description elements. In this case, the value of the property (the Object of the statement) is a resource -- a node in the graph. This second abbreviation allows us to further transform the RDF/XML above into <r:RDF xmlns:r="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:s="http://description.org/schema/"> <r:Description about="http://www.w3.org/Home/Lassila"> <s:Creator r:resource="http://www.w3.org/staffId/85740" xmlns:v="http://fiction.org/schema/vcard" v:Name="Ora Lassila" v:Email="lassila@w3.org" /> </r:Description> </r:RDF> Some might say that it is less apparent in this syntactic form that the value of the s:Creator property is a node and v:Name and V:Email are in turn properties of that node. The parser must in this case recognize that the node must be created in the graph without an explicit XML element to signal this event. The identification of the node is in this case given by the r:resource attribute but this attribute is not required to be present in every RDF/XML instance. This was a rather lengthy answer to a simple comment about a possible typo. I hope it clarified more things than it complicated. -Ralph
Received on Tuesday, 21 September 1999 12:55:54 UTC