W3C home > Mailing lists > Public > public-sparql-dev@w3.org > April to June 2009

Re: Why don't i have any result?

From: Paul Gearon <gearon@ieee.org>
Date: Tue, 23 Jun 2009 13:20:33 -0500
Message-ID: <a25ac1f0906231120q46e19995qec7db6f576f934a9@mail.gmail.com>
To: Richard Newman <rnewman@franz.com>
Cc: Samuel Pedro <samuelcpspam@gmail.com>, public-sparql-dev@w3.org
On Tue, Jun 23, 2009 at 1:17 PM, Richard Newman<rnewman@franz.com> wrote:
> On  23 Jun 2009, at 11:10 AM, Samuel Pedro wrote:
>
>> Why this query doens't return any result with jena and with protege does??
>
> Presumably because Protege considers
>
> x y "foo"^^xsd:string
>
> to entail
>
> x y "foo"
>
> while Jena does not?
>
> Try your query as
>
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> PREFIX owl: <http://www.w3.org/2002/07/owl#>
> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
> SELECT ?equivalentClass
> WHERE {
>  ?equivalentClass owl:equivalentClass ?Class .
>  ?Class rdfs:label "champinhons"^^xsd:string
> }

Alternatively, Jena does extend = to compare xsd:string and plain
literals, so you can say:

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?equivalentClass
WHERE {
 ?equivalentClass owl:equivalentClass ?Class .
 ?Class rdfs:label ?label FILTER ?label = "champinhons"
}


Paul
Received on Tuesday, 23 June 2009 18:21:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 23 June 2009 18:21:08 GMT