Re: Update to XLink -> RDF mapping

> From: Ron Daniel (rdaniel@metacode.com)
> Date: Mon, Jun 26 2000
> 
> Hi all,
> 
> The XML Linking WG decided that they would not try to put
> the XLink to RDF mapping into the XLink spec as an
> appendix. Instead, it was decided that the mapping would
> be submitted as a NOTE.
> 
> Here's a draft of the text (both in HTML and the XML
> source). It has been revised to be a NOTE. It
> has also been updated to deal with linkbases, and some
> of the material on extracting the structure of an
> extended link into a Bag has been removed.
> 
> Any other member organizations who want to be in on
> the submission, let me know.
[...]
>    * text/html attachment: xlink2rdf1.html

an editorial nit: it says both

| The
| starting Resource of the simple link SHALL be mapped to the subject of
the RDF statement.

and

| The ending Resource of the simple link SHALL be mapped to the subject
of the RDF statement.

I presume you meant 'object' rather than 'subject' in the latter.


Anyway... I got about 1/10th of the way thru implementing it
as an XSLT transformation. I was able to convert your first
example:

... In a <x:extRef xlink:type="simple"
      xlink:href="http://www.foo.com/papers/crops.txt"
      xlink:arcrole="http://links.org/namespace/cite"
      xlink:role="http://links.org/namespace/screed"
   >recent paper</x:extRef>, Dr. Taylor assumes that ...

to

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xlink="http://www.w3.org/1999/xlink">
  <oops-predicate rdf:about="#xpointer-for-N8"
  rdf:resource="http://www.foo.com/papers/crops.txt"
  xmlns="http://links.org/namespace/cite"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" />

  <rdf:type rdf:about="http://www.foo.com/papers/crops.txt"
  rdf:resource="http://links.org/namespace/screed" />

  <rdf:Class rdf:about="http://links.org/namespace/screed" />
</rdf:RDF>

As you can see, I ran into some trouble already:

	* how do I compute a namespace name and a local name from
	the predicate http://links.org/namespace/cite? I suppose
	l:cite xmlns:l='http://links.org/namespace/' would work,
	but I couln't figure out how to implement that with XSLT ;-)

	But I don't see a general purpose algorithm, especially
	since URIs need not end with XML name characters
	(e.g. http://example.org/foo/).

	This is a generic RDF problem, not a problem with this
	xlink->rdf mapping; i.e. it's an issue with serializing
	RDF models in the general case.


Anyway... it's pretty feeble at this point, but share and enjoy:

http://www.w3.org/2000/06/xlrdf532/xlink2rdf.xsl
$Id: xlink2rdf.xsl,v 1.1 2000/06/28 03:43:31 connolly Exp $

see also: Makefile and examples.xml in:

	http://www.w3.org/2000/06/xlrdf532/

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/

Received on Tuesday, 27 June 2000 23:54:27 UTC