W3C home > Mailing lists > Public > www-rdf-interest@w3.org > October 2000

Re: Querying Syntax

From: Arnold deVos <adv@langdale.com.au>
Date: Thu, 12 Oct 2000 11:46:45 +1100
Message-ID: <009001c033e5$ef0edd30$ea01a8c0@cockatoo>
To: "Ross Judson" <ross@ManagedObjects.com>, "Ashok Malhotra/Watson/IBM" <petsa@us.ibm.com>
Cc: <www-rdf-interest@w3.org>

we implemented an RDF query language inspired by XSLT.   The queries take
the form of an XML document or an RDF model.   See
http://www.langdale.com.au/RDF/NexusQueryLanguage.pdf for a description of
the XML form of the query.

As you say, the XML expression of the query is a bit painful to work with.
However, the same could be said of XSLT.   We parse the queries into an RDF
model before executing them. So, in future we might create queries directly
as RDF models using  a visualization and editing tool.

The purpose of our query language is to map statements -> XML, and not
statements -> statements.  At some point an RDF engine has to produce
output.  If the only output mechanism is RDF syntax then this is a bit
limiting.  The ultimate target might be a specific XML language or HTML.
Depending on how the RDF syntax is generated, there may or may not be a
reasonable XSLT transform to the target language.

Our query  language tries to solve this problem by generating the target
language directly from the RDF model, or generating an intermediate language
that is simple to transform to the target with XSLT.

The query language cannot actually be the same as XSLT, of course, because
it operates on an RDF model not an XML document. However, the various XSLT
ideas, such as template matching,  have proved usefull in an RDF context.

Arnold deVos
Langdale Consultants

----- Original Message -----
From: "Ashok Malhotra/Watson/IBM" <petsa@us.ibm.com>
To: "Ross Judson" <ross@ManagedObjects.com>
Cc: <www-rdf-interest@w3.org>
Sent: Thursday, October 12, 2000 5:39 AM
Subject: Re: Querying Syntax

> Its true that XML syntax is verbose and not I'm crazy about it.
> The advantage is that it can be easily embedded in an XML
> document and can be parsed by an XML parser.
> As far as I know, there has been no followup on this.  Neel and
> I were planning an implementation but we got distracted.
> All the best, Ashok
> "Ross Judson" <ross@ManagedObjects.com> on 10/11/2000 02:12:19 PM
> To:   <www-rdf-interest@w3.org>
> cc:   Ashok Malhotra/Watson/IBM@IBMUS
> Subject:  Re: Querying Syntax
> I've read this before, and I hope you won't mind a little cautious
> criticism.  First, XML doesn't seem to make a very good query language by
> itself; specialized syntaxes are tighter and, if properly designed, more
> readable.  XPath is an example of this.
> Here's a quick comparison:
> <rdfq:rdfquery>
>   <rdfq:From eachResource="http://www.research.ibm.com/people/">
>   <rdfq:Select>
>     <rdfq:Property name="BelongTo" />
>     <rdfq:Select>
>       <rdfq:Condition>
>         <rdfq:greaterThan>
>           <rdfq:Property name="Budget" />
>           <rdf:Integer>1000000</rdf:Integer>
>         </rdfq:greaterThan>
>       </rdfq:Condition>
>     </rdfq:Select>
>   </rdfq:Select>
>  </rdfq:From>
> </rdfq:rdfquery>
> becomes (further extended to ensure that "BelongTo" is actually a
> department):
> subjects ((department : startsWith(department,
> http://www.research.ibm.com/departments/", "budget", dollars : ge(dollars,
> 1000000))
> (person : startsWith(person, ""http://www.research.ibm.com/people/),
> "BelongTo", department))
> I note also that the XML-based syntax is not orthogonal with respect to
> querying and navigation amongst all three parts of the triples.
> You do have coverage of certain query concepts I have not integrated, like
> Quantification and Sorting.
> I come at this problem from the perspective of an implementor -- I have an
> RDF engine that I want to perform complex queries against.  I needed a
> syntax that was conducive to cost optimization.
> Your paper was presented during the query language workshop; have there
> been
> other such papers?  Is there any other movement on the RDF query front?
> RJ
> ----- Original Message -----
> From: "Ashok Malhotra/Watson/IBM" <petsa@us.ibm.com>
> To: "Ross Judson" <ross@ManagedObjects.com>
> Cc: <www-rdf-interest@w3.org>
> Sent: Wednesday, October 11, 2000 12:28 PM
> Subject: Re: Querying Syntax
> >
> > Neel Sunderesan and I wrote a paper on RDF Query for the XML Query
> Workshop
> > in December 1998.  Some of you may find it interesting.  You can access
> it
> > at
> > http://www.w3.org/TandS/QL/QL98/pp/rdfquery.html
> > If you have trouble getting to this I can send you a copy.
> >
> > All the best, Ashok
Received on Wednesday, 11 October 2000 20:47:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:44 GMT