Re: XSLT and XPath-like functions in RDF/OWL ?

On Mon, 2005-09-19 at 08:58 -0400, Ian Emmons wrote:
> Hans,
> 
> SPARQL is well along in the standardization process, so that is your 
> clear choice for a query/path language.

...

> * RDF/OWL --> XML:  I was originally inclined to recommend XSLT for 
> this, but a colleague of mine (Mike Dean) pointed out that XSLT is 
> really a poor choice.  This is because the RDF/XML (which is the 
> serialization of RDF information in XML format) has no canonical 
> representation.  In other words, it supports many ways to say the same 
> thing.  For instance, rdf:ID vs. rdf:about, typed node elements vs. 
> rdf:type, property attributes, rdf:parseType="Resource", and so on.
> 
> If you can tolerate brittle code (i.e., code that is easily broken by 
> external changes), you could use XSLT to translate the output from a 
> specific RDF serialization tool, such as Jena.  But this would 
> definitely break if you switched to some other tool, and it would also 
> be sensitive to anything that perturbed Jena's output, such as upgrading 
> to a new version.

I'd suggest that you use SPARQL for this too.  There's an XML format for
the variable bindings results of SPARQL (which I edit) that allows you
to extract the data you want out of the RDF graph - you don't need to
care about what syntax or system it was stored in.  Then write the
results as XML and transform them to another XML form with your
favourite XML transformer.  This XML format was designed to be regular
to enable this kind of thing to happen.

The draft:
  http://www.w3.org/TR/rdf-sparql-XMLres/
already includes XSLT and XQuery examples of how to do that:
  http://www.w3.org/TR/rdf-sparql-XMLres/#examples
and you can grab some implementations at
  http://esw.w3.org/topic/SparqlImplementations
and see some demos at
  http://esw.w3.org/topic/DawgShows
to try it out.

Dave

Received on Monday, 19 September 2005 13:38:10 UTC