W3C home > Mailing lists > Public > semantic-web@w3.org > September 2005

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

From: Ian Emmons <iemmons@bbn.com>
Date: Mon, 19 Sep 2005 08:58:27 -0400
Message-ID: <432EB5F3.2070701@bbn.com>
To: Hans Teijgeler <hans.teijgeler@quicknet.nl>
CC: semantic-web@w3.org

Hans,

SPARQL is well along in the standardization process, so that is your 
clear choice for a query/path language.

Transformation is a bit murkier, but now that I know better what you are 
trying to accomplish, I can make the following recommendations:

* XML --> RDF/OWL:  XSLT is a clear winner.

* RDF/OWL --> RDF/OWL:  This is commonly required for translation of 
instance data from one ontology to another.  XSLT is a poor match for 
this -- use a rule language instead.  Of the many choices, SWRL appears 
to be the front-runner in the standardization track, though it isn't as 
far along as SPARQL.

* 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.

The preferred (and relatively easy) solution for translating from 
RDF/OWL to XML, (X)HTML, or text is to write a program using Jena or a 
similar API.

Cheers,

Ian

----- Original Message -----
From:    Hans Teijgeler <hans.teijgeler@quicknet.nl>
To:      semantic-web-request@w3.org
CC:      semantic-web@w3.org, damian.steer@hp.com, iemmons@bbn.com, 
emmanuel.pietriga@inria.fr, djpowell@djpowell.net, norman.walsh@sun.com
Sent:    Saturday, September 17, 2005 9:56:11 AM
Subject: XSLT and XPath-like functions in RDF/OWL ?

> Hi,
>
> I thank Damian, Ian, Emmanuel, and David for their responses!
>
> It is good to have standards, but not too many, please! I get the
> impression that this is a fragmenting world (I may be wrong, though, but
> ten RDF Path languages, for example, seems a bit high).
>
> As an implementer I need a clear framework of what to use in what
> circumstances. An example: a couple of months ago I read about Trix and
> I liked the idea. I worked out how to implement that. Then I asked the
> authors of Trix whether or not it would reach Recommendation status,
> which seems not likely to happen. So my work turned out to be of
> academic value only.
>
> I need XSLT-like functionality for two reasons:
>
> - for mapping data of any application (say a 3D plant design
> system), that conforms a system-specific XML schema, to an RDF/XML file
> that conforms with a particular OWL ontology (so it's deterministic);
>
> - for HTML-based presention (on screen or on paper) of
> information, stored in a triple store, in conformance with an OWL
> ontology for document types
>
> I need XPath-like functionality to be able to fetch a particular literal
> related with a particular object, where that literal is hidden somewhere
> deep in the triple clouds around that object, as stored in a triple store.
>
> I am transferring from the world of XML Schema to the OWL world because
> the latter fits better with our data modelling requirements, but I start
> to miss all the standard goodies like XSLT, XPath, XQuery, etc. But
> perhaps I am dead wrong, and all of this can be used in the RDF/OWL
> environment as well (because RDF/XML is a kind of XML?).
>
> Is there any WG in W3C that deals with implementation requirements in
> the RDF/OWL environment?
>
> Regards,
>
> Hans
Received on Monday, 19 September 2005 12:58:49 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 07:41:47 UTC