Transforming RDF with XSLT from Dan Connolly on 2000-05-02 (www-rdf-interest@w3.org from May 2000) (original) (raw)
Somebody suggested more people might be interested in this hack, so I wrote a little explanation, and here you go...
========= Transforming RDF with XSLT http://www.w3.org/XML/2000/04rdf-parse/
I'm trying to flesh out some of the details of TimBL's semantic web toolbox... to build some layers on top of RDF such as horn clauses ala SHOE (see SHOE->RDF materials which so far just xhtml-ize SHOE).
In order to connect RDF with other tools to work on practical examples, I needed a parser. XSLT is the hammer I'm using for nails of all shapes and sizes lately, and I figured that once I understand what the output of an RDF parser needs to look like, XSLT is a good platform for experimenting with various input syntaxes.
One of the more quick-and-dirty hacks I've seen in a while is DanBri's JS RDF thingy, based on Jan's tinyprolog, whence comes the output syntax of this parser. There are quite a few other RDF/prolog hacks in the RDF interest group) lately, though I'd rather avoid the closed-world assumption ala Algernon and access-limited logic.
Also, a representation for proofs is an important layer (see Edinborough Logical Framework (larch trait))
What: Contents
rdfp.xsl the parser itself.
Try it out (if you're feeling lucky; this depends on an XSLT
servlet that runs on an as-is, no-warranties basis):
Address of RDF input:
Makefile instructions for how to invoke it
example 1 from the RDF spec, parsed output
Bugs and Limitations
These are the sort of dull engineering issues that have straightfoward, if tedious, answers...
no support for collections
no support for quoted (reified) statements
no support for parsetype="literal" nor parsetype="resource"
only does about 1/3 of the job of reporting bad syntax
doesn't expande URI references w.r.t. the base
Issues raised
These are issues that came up while I was working on this...
One of the reasons for developing this thing was for testing the RDF spec, i.e. to answer some of my own questions about how well-specified RDF is. I found at least one bug, and several interesting corner cases
suffers from a lack of declared URIs for XML Schema datatypes
What URI to use for anonymous nodes? (noodling on skolem
functions...)
Dan Connolly Revision:1.1Revision: 1.1 Revision:1.1 of Date:2000/05/0204:52:47Date: 2000/05/02 04:52:47 Date:2000/05/0204:52:47 by Author:connollyAuthor: connolly Author:connolly
=========
-- Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Tuesday, 2 May 2000 01:02:02 UTC