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

RE: Why don't i have any result?

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Tue, 23 Jun 2009 20:18:58 +0000
To: Paul Gearon <gearon@ieee.org>, Richard Newman <rnewman@franz.com>
CC: Samuel Pedro <samuelcpspam@gmail.com>, "public-sparql-dev@w3.org" <public-sparql-dev@w3.org>
Message-ID: <B6CF1054FDC8B845BF93A6645D19BEA3646D2152F7@GVW1118EXC.americas.hpqcorp.net>


> -----Original Message-----
> From: public-sparql-dev-request@w3.org [mailto:public-sparql-dev-
> request@w3.org] On Behalf Of Paul Gearon
> Sent: 23 June 2009 19:21
> To: Richard Newman
> Cc: Samuel Pedro; public-sparql-dev@w3.org
> Subject: Re: Why don't i have any result?
> 
> 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

I get:

--------------------
| equivalentClass  |
====================
| <D.rdf#Cogumelo> |
--------------------

Using Jena 2.6.0 / ARQ 2.7.0 when using an in-memory model where plain literals with no lang tag and xsd;Strings are considered equivalent.  They are not in some persistent storage subsystems.

Samuel - are you using a database? If not, maybe the namespace declarations in the RDF/XML that aren't shown have a typo in.

	Andy

Received on Tuesday, 23 June 2009 20:20:08 GMT

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