- From: Ron Daniel <rdaniel@metacode.com>
- Date: Tue, 11 Jul 2000 11:45:55 -0700
- To: Dan Connolly <connolly@w3.org>
- Cc: www-rdf-interest@w3.org
- Message-ID: <0D611E39F997D0119F9100A0C931315CA88006@datafusionnt1>
Hi Dan, Thought I had sent a response earlier but don't see it, so here's the old response plus some new stuff... Dan Connolly said: > 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. > Yep, thanks for catching that. I've updated it in the XML source of the NOTE and it will go out with the next version. > 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. > To be perfectly honest, I had been assuming that the harvesting would happen through something like XSLT extension functions that directly poked statements into an RDF store, rather than converting to RDF's serialization syntax. How to serialize a RDF model that never kept info about the namespace URI vs. local part is, as you point out, a thorny issue for all RDF implementations. But your sample motivated me to actually try and write a proof-of-concept. Here's a XSLT stylesheet and a mockup of the extension function. Barring errors, I think the stylesheet handles all the cases with simple links. I have not done anything with extended links yet. This particular stylesheet works with saxon's version of extension functions. It should not be hard to make it work with XT but I have not tried. (BTW - people who see 'Radix.java' should not get their hopes up. This is nothing more than one call.) <<map_simple.xsl>> <<Radix.java>> <<ex1.xml>> Regards, Ron Daniel Jr. Metacode Technologies, Inc. 139 Townsend Street, Suite 100 San Francisco, CA 94107 415.836.7813 fax 415.222.0150 rdaniel@metacode.com
Attachments
- application/octet-stream attachment: map_simple.xsl
- application/octet-stream attachment: Radix.java
- application/octet-stream attachment: ex1.xml
Received on Tuesday, 11 July 2000 14:44:54 UTC