W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > April to June 2004

RE: XSRQL proposal

From: Howard Katz <howardk@fatdog.com>
Date: Mon, 28 Jun 2004 11:10:45 -0700
To: "Eric Prud'hommeaux" <eric@w3.org>
Cc: <public-rdf-dawg@w3.org>

On Sun, Jun 27, 2004 at 01:40:14PM -0700, Howard Katz wrote:
> I've finished my XSRQL proposal, which can be found at
> http://www.fatdog.com/xsrql.html. You'll notice I've shortened the acronym
> slightly: XSRQL stands for XQuery-style RDF Query Language. I hope this

	[ snip ... ]

> To make the bootstrapping process a bit shorter, could you contrast
> this approach with XQuery with Functional Accessors [4] and
> TreeHugger [5]? I'm looking for short, broad statements like
> where XQueryFA gets to the graph via functions, XSRQL uses syntactic
> XPath extensions, or XSRQL favors the letter 'e' less than TreeHugger.
> > [1] http://www.fatdog.com/xsrql.html#Introduction
> >
> > [2]  http://www.fatdog.com/xsrql.html#Path%20language
> >
> > [3] http://www.fatdog.com/xsrql.html#Examples
> [4] http://www.w3.org/2001/11/13-RDF-Query-Rules/#XQueryFA
> [5] http://www.w3.org/2001/11/13-RDF-Query-Rules/#TreeHugger

Short and broad first, somewhat expanded afterward:

[1] XsRQL vs.TreeHugger
TreeHugger uses XSLT to query RDF/XML. XsRQL uses a native implementation of
an XPath-like language to query the underlying triples directly. TreeHugger
knows about XML; XsRQL doesn't know anything about XML.

[2] XsRQL vs XQueryFA
XQueryFA uses XQuery to query RDF/XML and not triples. It abstracts the
knowledge of how to traverse the RDF graph structure embedded in the XML to
user-defined functions. XsRQL looks a lot like XQuery but again doesn't know
how to operate on XML.

Somewhat expanded:

[1] XsRQL vs. TreeHugger
TreeHugger uses XSLT and XPath to query the RDF/XML serialization of a graph
(which means it can't query into an RDF triplestore), while XsRQL uses a
native implementation of an XQuery-like language with an XPath-like
sublanguage to query the underlying RDF graph directly (which means it can't
query into RDF/XML). TreeHugger understands and requires XML; XsRQL doesn't.

Given the query, "What is the name of the person that the person named with
mailbox pldms@mac.com knows" and the following RDF/XML serialization:

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   <foaf:name>Damian Steer</foaf:name>
   <foaf:mbox rdf:resource="mailto:pldms@mac.com"/>
       <foaf:name>Libby Miller</foaf:name>

TreeHugger uses XSLT and the following XPath to return "Libby Miller":


Given the triples formulation:

_:jARP65578  <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://xmlns.com/foaf/0.1/Person> .
_:jARP65578  <http://xmlns.com/foaf/0.1/name>  "Damian Steer" .
_:jARP65578  <http://xmlns.com/foaf/0.1/mbox>  <mailto:pldms@mac.com> .
_:jARP65580  <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://xmlns.com/foaf/0.1/Person> .
_:jARP65580  <http://xmlns.com/foaf/0.1/name>  "Libby Miller" .
_:jARP65578  <http://xmlns.com/foaf/0.1/knows> _:jARP65580 .

XsRQL says:

 declare prefix f:= <http://xmlns.com/foaf/0.1/>;
 *[ @f:mbox = "mailto:pldms@mac.com" ]/@f:knows/*/@f:name/*

[2] XsRQL vs XQuery with Functional Accessors

XQuery with Functional Accessors (XQueryFA), like TreeHugger, requires an
RDF/XML serialization of the graph, but in this case the query is done
directly in XQuery (as opposed to XSLT in the case of TreeHugger, and a
native implementation in the case of XsRQL), and the knowledge of how to
traverse the RDF graph that's represented in the XML is abstracted out to
user-defined functions. For both XsRQL and XQueryFA, the full syntactic
power of XQuery (the real thing in the case of XQueryFA; a syntactic clone
in the case of XsRQL) is available for further transformation and
manipulation on the results.

Received on Monday, 28 June 2004 14:09:51 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:19 GMT