RE: Why don't i have any result?



> -----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 UTC