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.comReceived on Thursday, 1 June 2006 16:50:24 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:44:53 GMT