W3C home > Mailing lists > Public > www-rdf-interest@w3.org > May 2000

RDF and XLink

From: Eve L. Maler <Eve.Maler@east.sun.com>
Date: Wed, 10 May 2000 16:09:43 -0400
Message-Id: <>
To: www-rdf-interest@w3.org
[Please copy w3c-xml-linking-ig@w3.org on any followups.]

The XML Linking WG is coming close to finalizing the XLink spec.  Some have 
noticed that there is a lot of similarity between XLink and RDF, in that 
XLink links assert relations between resources.  In fact, some recent 
design tweaks explicitly borrowed some RDF concepts in this area, which has 
raised the question of whether links truly can be harvested and 
automatically converted into RDF statements.

This message summarizes some earlier offline conversations I've had with 
RDFers and proposes such a mapping.  If we can iron out the details, there 
is still time (barely) to add back the XLink spec appendix on the RDF 
mapping, as was originally intended.  All of the following material is 
based on the most recent (members-only) version of the XLink spec, which is at:


Many thanks to Sergey Melnick, Stefan Decker, and Ron Daniel for material 
and ideas provided in this message.  And thanks to the Linking and RDF IGs 
in advance for reading and commenting.

			*		*		*

XLink allows you to set up an extended link with as many "local" resources 
as you want (subelements inside the link), as many "remote" resources as 
you want (hrefs to other things outside), and as many "arcs" as you want 
(pairs of resources and a direction, so that you can traverse from one to 
the other with XLink-dictated behavior if you want).

Any resource, local or remote, can have a "role" (indicated by a URI).  A 
role means "this resource has this property," where "property" corresponds 
to the RDF notion.  Similarly, an extended link can have a role, where it 
means "this link has this property."  Any arc can also have a role, which 
means "starting resource X has ending resource Y with property Z"; this is 
equivalent to RDF Property Types (informally known to RDFers as arc labels).

What the spec doesn't say explicitly about the RDF mapping, but I think it 
needs to, is that when a resource has a role, the property that's been 
pointed to should be understood to have its *own* property: that of being a 
"class" in the RDF schema sense.

This RDF-ish stuff is entirely apart from actual traversal; XLink is 
primarily meant for traversal, not description.  But it's perfectly capable 
of being used for pure description, and in fact XLink allows you to leave 
off traversal behavior specifications entirely.

Here's the main example that now appears in the XLink spec (the post-Last 
Call version cited above).  Sample (non-normative) DTD declarations are as 

<!ELEMENT courseload ((tooltip|person|course|gpa|go)*)>
<!ATTLIST courseload
             xmlns:xlink     CDATA           #FIXED
             xlink:type      (extended)      #FIXED "extended"
             xlink:role      CDATA           #IMPLIED
             xlink:title     CDATA           #IMPLIED>

<!ELEMENT tooltip ANY>
<!ATTLIST tooltip
             xlink:type      (title)         #FIXED "title"
             xml:lang        CDATA           #IMPLIED>

<!ATTLIST person
             xlink:type      (locator)       #FIXED "locator"
             xlink:href      CDATA           #REQUIRED
             xlink:role      CDATA           #IMPLIED
             xlink:title     CDATA           #IMPLIED
             xlink:label     NMTOKEN         #IMPLIED>

<!ATTLIST course
             xlink:type      (locator)       #FIXED "locator"
             xlink:href      CDATA           #REQUIRED
             xlink:role      CDATA           #FIXED
             xlink:title     CDATA           #IMPLIED
             xlink:label     NMTOKEN         #IMPLIED>

             xlink:type      (resource)      #FIXED "resource"
             xlink:role      CDATA           #FIXED
             xlink:title     CDATA           #IMPLIED
             xlink:label     NMTOKEN         #IMPLIED>

             xlink:type      (arc)           #FIXED "arc"
             xlink:arcrole   CDATA           #IMPLIED
             xlink:title     CDATA           #IMPLIED
             xlink:show      (new
                             |none)          #IMPLIED
             xlink:actuate   (onLoad
                             |none)          #IMPLIED
             xlink:from      NMTOKEN         #IMPLIED
             xlink:to        NMTOKEN         #IMPLIED>

Here's a sample instance conforming to these declarations:

<courseload xlink:title="Course Load for Pat Jones">

     xlink:title="Pat Jones" />

     xlink:title="Dr. Jay Smith" />
   <!-- more remote resources for professors, TAs, etc. -->

     xlink:title="CompSci 101" />
   <!-- more remote resources for courses, seminars, etc. -->

   <gpa xlink:label="PatJonesGPA">3.5</gpa>

     xlink:title="Pat Jones's GPA" />
     xlink:title="Pat Jones, auditing the course" />
     xlink:title="Dr. Jay Smith, advisor" />


The last two <go> examples above, in pseudo-English, would be read as
follows in order to express their RDF nature:

- "Course CS101 has Pat Jones as an auditor," or "course CS101 has
   auditor Pat Jones," or "Pat Jones is auditing course CS101, or "Pat
   Jones is an auditor of course CS101."  The course resource doesn't
   have an official role set, but software could infer that the <course>
   element has a certain role, or the vocabulary in which <course>
   appears may already have an official role.  But as far as XLink is
   concerned, it's un-roled.  So technically you'd want to take the word
   "course" out of these English statements.

- "Student Pat Jones has professor Dr. Jay Smith as an advisor," or
   "student Pat Jones has advisor professor Dr. Jay Smith," or "Professor
   Dr. Jay Smith is advising Pat Jones," or "Professor Dr. Jay Smith is
   an advisor to Pat Jones."  In this case, the "student" and "professor"
   roles are actually set, such that the relevant instances of <person>
   read "Pat Jones is in the class 'student'" and "Dr. Jay Smith is in
   the class 'professor'".  If there were a role on the whole link, it
   would read "This link is in the class 'courseload'" or similar.

Note that there is nothing that stops you from addressing <go> elements as 
resources in another link, putting roles on them, and making them take part 
in arcs that have arc roles.  So it is possible to make "meta-assertions" 
about XLink "assertions."

I'll save some other issues and comments for a follow-on message.

Eve Maler                                    +1 781 442 3190
Sun Microsystems XML Technology Center    elm @ east.sun.com
Received on Wednesday, 10 May 2000 16:07:37 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:07:29 UTC