W3C home > Mailing lists > Public > www-rdf-interest@w3.org > January 2002

Re: how does existing RDF software handle this datatypes test?

From: Jeen Broekstra <jbroeks@cs.vu.nl>
Date: Thu, 31 Jan 2002 13:21:24 +0100 (CET)
To: Dan Connolly <connolly@w3.org>
cc: RDF Interest <www-rdf-interest@w3.org>, RDF Logic <www-rdf-logic@w3.org>
Message-ID: <Pine.GSO.4.40.0201311302300.27513-100000@flits.cs.vu.nl>
On 30 Jan 2002, Dan Connolly wrote:

> There's a lot to read about TDL and S,
> http://lists.w3.org/Archives/Public/www-rdf-interest/2002Jan/0164.html
> but I think it can be summarized with the following
> test case. If you develop (or use) any RDF software,
> please try it out on this test case and report
> your findings.

[snip]

> 	whatever that title is, let's call it X.
> 	Does that document also say that there's
> 	something with ex:age of that same X?
>
> If you have any sort of RDF API or query language or
> any sort of software in which this question can be posed,
> would you please ask your implementation and tell
> us its answer right now?

In Sesame RQL[1]:

    select Y1
    from   {} http://purl.org/dc/elements/1.1/title {Y1},
           {} http://example/vocab#age {Y2}
    where  Y1 = Y2

Result:

    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<rdf:Bag rdf:ID="rql_query_result">
	    <rdf:li>
		<rdf:Seq>
		    <rdf:li>10</rdf:li>
		</rdf:Seq>
	    </rdf:li>
	</rdf:Bag>
    </rdf:RDF>
    <!-- 1 results found in 40 ms -->

Sesame RQL currently supports only very simple datatyping.
The equality operators (<, <=, =, etc.), when used on
literal values, first try to coerce both operands to integer
values. If that fails, they try to coerce them both to real
values. If that also fails, they do a simple lexical
comparison.

In this case, integer values are compared and (obviously)
are found to be equal.

Hope that helps.

Regards,

Jeen

[1] http://sesame.aidministrator.nl/
-- 
Jeen Broekstra                                     Vrije Universiteit
jbroeks@cs.vu.nl              Dept. of Mathematics & Computer Science
                                 de Boelelaan 1081, 1081 HV Amsterdam
                                                      The Netherlands
Received on Thursday, 31 January 2002 07:21:27 GMT

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