- From: Danny Ayers <danny.ayers@gmail.com>
- Date: Thu, 1 Jun 2006 18:47:33 +0200
- To: "Dan Brickley" <danbri@danbri.org>
- Cc: "Cl?udio Fernandes" <cff@di.uevora.pt>, "Chris Dollin" <chris.dollin@hp.com>, semantic-web@w3.org
On 6/1/06, Dan Brickley <danbri@danbri.org> wrote: > > Right now I'm doing it with the expat lib. I parse the document and > > forward a big term to Prolog, which will generate the desired .pl. > > However, it seems that if I could do this with xslt, my life would be > > easier :) > > OK, look around for one of the XSLT parsers that generates 'n-triples' > or N3 format. These are prolog-like. It can be done... Here's one: http://www.semanticplanet.com/library/Main/RdfToTriplesStylesheet Another approach that might be worth investigating is to load the RDF/XML into one of the many RDF APIs, run a SPARQL SELECT query against it, then apply XSLT to the results. Though there's an obvious increase in the system complexity, it might well make managing the stuff easier - the query could translate the RDF into a structure broadly like Prolog, then the XSLT finish up the syntax details. http://www.w3.org/TR/rdf-sparql-query/ Note too that there are RDF/XML tools available for Prolog, probably a parser available. Funnily enough a quick google yielded this old xml.com article from Bijan Parsia, in which he compares DCGs to XSLT in ther context of RDF with Prolog: http://www.xml.com/lpt/a/2001/07/25/prologrdf.html Cheers, Danny. -- http://dannyayers.com
Received on Thursday, 1 June 2006 16:50:24 UTC