Is RDF just an XML-link application?
Henry S. Thompson

7 October 1998

1. The underlying model

RDF is, as the model and syntax draft is perfectly clear, really about labelled directed graphs. At its core, therefore, is the notion of a labelled, directed edge. (You could define this either in terms of a single ternary relation link(from,label,to) or in terms of a collection of nonsymmetric, irreflexive, intransitive binary relations, one for each label type.) I will ignore second-order issues for now, except to observe that although the ternary approach allows quantification over labels without going second order, as labels are just constants, it would still have to go second order to handle e.g. link([robin],believes,link([hamlet],author,"marlow")), or any other intentional label type.

Again, in RDF the nodes of the graph are resources, that is, loci in hyperspace, or strings.

Now the relevant observation is clear: In the XML-link draft, links include, although they are not limited to, labelled directed connections between resources.

In the interests of avoiding the unnecessary proliferation of W3C recommendations with overlapping domains, I think it is appropriate to then ask why RDF is not first recognised and then presented as an XML-link application, rather than an independent standard.

2. A preliminary example

Consider the following example, taken from the RDF Model and Syntax draft recommendation (August 1998 version):


<rdf:RDF>
    <rdf:Description about='http://www.w3.org/Home/Lassila'>
      <s:Creator resource='http://www.w3.org/staffId/85740'/>
    </rdf:Description>

    <rdf:Description about='http://www.w3.org/staffId/85740'>
      <v:Name>Ora Lassila</v:Name>
      <v:Email>lassila@w3.org</v:Email>
    </rdf:Description>
</rdf:RDF>

The first description above can be accommodated to XML-Link with minimal restructing, as follows:


<!ATTLIST rdf:Description xml:link CDATA #FIXED "extended"
                          role CDATA #FIXED "metadata"
                          inline CDATA #FIXED "false">
<!ATTLIST rdf:about xml:link CDATA #FIXED "locator"
                    role CDATA #FIXED "about">
<!ATTLIST s:Creator xml:link CDATA #FIXED "locator"
                    role CDATA #FIXED "s:Creator"
                    xml:attributes CDATA #FIXED "href resource">
<rdf:Description>
 <rdf:about href='http://www.w3.org/Home/Lassila'/>
 <s:Creator resource='http://www.w3.org/staffId/85740'/>
</rdf:Description>

Slightly more restructuring makes things a bit simpler in the DTD, but maybe that's a red herring:


<!ATTLIST rdf:Description xml:link CDATA #FIXED "extended"
                          role CDATA #FIXED "metadata"
                          inline CDATA #FIXED "false">
<!ATTLIST rdf:about xml:link CDATA #FIXED "locator"
                    role CDATA #FIXED "about">
<!ATTLIST rdf:property xml:link CDATA #FIXED "locator"
                    xml:attributes CDATA
                      #FIXED "href resource role type">
<rdf:Description>
 <rdf:about href='http://www.w3.org/Home/Lassila'/>
 <rdf:property type='s:Creator'
               resource='http://www.w3.org/staffId/85740'/>
</rdf:Description>

The obvious advantage of this is it means you can have multiple properties with no additional work in the DTD.

3. What about strings?

One obvious problem here is that although complex things (i.e. resource-valued properties) are easy, simple things (i.e. string-valued properties) are ridiculously hard. The best you could do as things stand would be:


  <rdf:property type='s:Creator' id='p37'
     resource='#p37'>Ora Lassila</rdf:property>

which is less than wonderful.

The obvious solution to this is to allow the inline attribute on locator link elements, with the obvious meaning: no href allowed, link end is the locator element itself.

Now we can do the whole example:


<!ATTLIST rdf:Description xml:link CDATA #FIXED "extended"
                          role CDATA #FIXED "metadata"
                          inline CDATA #FIXED "false">
<!ATTLIST rdf:about xml:link CDATA #FIXED "locator"
                    role CDATA #FIXED "about">
<!ATTLIST rdf:property xml:link CDATA #FIXED "locator"
                    xml:attributes CDATA
                      #FIXED "href resource role type">
<!ATTLIST rdf:atomic-property xml:link CDATA #FIXED "locator"
                    inline CDATA #FIXED "true"
                    xml:attributes CDATA #FIXED "content-role type">
<rdf:Description>
 <rdf:about href='http://www.w3.org/Home/Lassila'/>
 <rdf:property type='s:Creator'
               resource='http://www.w3.org/staffId/85740'/>
</rdf:Description>

<rdf:Description>
 <rdf:about href='http://www.w3.org/staffId/85740'>
 <rdf:atomic-property type='v:Name'>Ora Lassila</rdf:atomic-property>
 <rdf:atomic-property
type='v:Email'>lassila@w3.org</rdf:atomic-property>
</rdf:Description>

Everything else (except for second-order stuff, which I'll return to in a subsequent note) is syntactic sugar, a fit subject for negotiation between the XML Schema, XLink and RDF Schema groups.