> -----Original Message-----
> From: [email protected] [mailto:public-sparql-dev-
> [email protected]] On Behalf Of Paul Gearon
> Sent: 23 June 2009 19:21
> To: Richard Newman
> Cc: Samuel Pedro; [email protected]
> Subject: Re: Why don't i have any result?
>
> On Tue, Jun 23, 2009 at 1:17 PM, Richard Newman<[email protected]> 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