Re: XSLT RDF Parser

On Mon, 11 Sep 2000, Jason Diamond wrote:

> Hello.
> 
> As an intellectual exercise and also so that I could help myself gain a
> better understanding of the RDF Model & Syntax, I've developed an XSLT
> script that extracts the statements from an RDF file into the following
> format:
> 
> <model>
>    <statement>
>       <subject>http://www.w3.org/Home/Lassila</subject>
>       <predicate>http://description.org/schema/Creator</predicate>
>       <object type="literal">Ora Lassila</object>
>    </statement>
> </model>
> 
> It can handle all of the examples in Section 2 of the M&S spec. If anybody's
> interested in taking a look at it, it's attached. Any comments or
> suggestions for improvement would be greatly appreciated.

Nice work!

For reference, your XSLT attachment was extracted by the W3C mail
archiver and has its own URI:
http://lists.w3.org/Archives/Public/www-rdf-interest/2000Sep/att-0097/01-rdf.xsl

It'd be handy if you had a 'latest version' URL for the XSLT on your own
site btw. Not least since Web-based XSLT services, like the
_experimental_ one used by http://www.w3.org/2000/06/dc-extract/form.html
could then invoke it and be sure to have the most recent version of your
work. (Mobile code in action... ;-)

To give this a try, simple enter in the XSLT's URI to the form at 
http://www.w3.org/2000/06/dc-extract/form.html
ie.

XSLfile=http://lists.w3.org/Archives/Public/www-rdf-interest/2000Sep/att-0097/01-rdf.xsl

...and supply a reference to some XML/RDF data, eg.
XMLfile=http://purl.org/dc/index.htm.rdf

Seems to work pretty well :-)

So... question time:

Dan Connolly and yourself have both independently come up with XSLT
parsers for RDF 1.0 Syntax. How do they compare? Are the differences (if
any) differences of XSLT coding style or interpretation of the spec?
	http://www.w3.org/RDF/#parsers
	RDF parser in XSLT (early release) by Dan Connolly. 
	http://lists.w3.org/Archives/Public/www-rdf-interest/2000May/0009.html
	-> http://www.w3.org/XML/2000/04rdf-parse/
	(uses bad URI for the experimental XSLT service; I might fix this later)

Dan lists a bunch of bugs and limitations of his parser. I'd really like
to see one of both of these efforts finished to completion, as part of
our attempt to pin down the various issues/problems with the spec.
(see http://lists.w3.org/Archives/Public/www-rdf-interest/2000Sep/0025.html)

In particular, Bag/Seq/Alt handling seems crucial if the XSLT parser are
ever going to be used in anger. 

Talking of which, does anyone have a sense for how this approach
performs? (in Java, in C, in Perl...). 

Anyhow, cool stuff!

Dan

Received on Monday, 11 September 2000 05:28:16 UTC