- From: <Faisal.Alkhateeb@inrialpes.fr>
- Date: Mon, 27 Mar 2006 17:04:45 +0200
- To: public-rdf-dawg-comments@w3.org
----- Forwarded message from "Seaborne, Andy" <andy.seaborne@hp.com> -----
Date: Mon, 27 Mar 2006 13:39:37 +0100
From: "Seaborne, Andy" <andy.seaborne@hp.com>
Reply-To: "Seaborne, Andy" <andy.seaborne@hp.com>
Subject: RE: Comments on STRING [OK?][closed]
To: Faisal.Alkhateeb@inrialpes.fr
Could you send this to the comments list, please? That way it will get noted
by the chair (and his scripts :-).
Thanks
Andy
-------- Original Message --------
> From: Faisal.Alkhateeb@inrialpes.fr <mailto:Faisal.Alkhateeb@inrialpes.fr>
> Date: 27 March 2006 12:52
>
> Quoting "Seaborne, Andy" <andy.seaborne@hp.com>:
>
> >
> >
> > Faisal.Alkhateeb@inrialpes.fr wrote:
> > > Hello,
> > >
> > > Regadring the string in sparql, if we have the following DATA:
> > >
> > > DATA:
> > > @prefix foaf: <http://xmlns.com/foaf/0.1/> .
> > >
> > > _:a foaf:name "Robert"@EN.
> > > _:a foaf:name "Roberto"@ES.
> > > _:a foaf:mbox <mailto:bob@work.example> .
> > >
> > > And the following query:
> > >
> > > PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?name ?mbox WHERE
> > > { ?x foaf:name ?name ; foaf:mbox ?mbox .
> > > FILTER ( lang(?name) = "es" ) }
> > >
> > > I think that this query fails to match "es" in the FILTER.
> > >
> > > And what about if we have 'ES' or '''ES''', does the query match
> > > the DATA
> > or
> > > not?
> > > Should we transform the literals to a normal form?
> > >
> > >
> > > Best regards,
> > > Faisal
> > > INRIA Rhône-Alpes
> >
> > SPARQL has a specific function to match language tags. It follows
> > the rules
> >
> > of RFC3066.
> >
> > http://www.w3.org/2001/sw/DataAccess/rq23/#func-langMatches
> >
> > FILTER ( langMatches( lang(?name), "es" )
> >
> > Other examples:
> >
> > langMatches( "ES", "es" ) ==> true
> > langMatches( "EN-gb", "en" ) ==> true
> > langMatches( "EN-gb", "en-g" ) ==> false
> >
> >
> > I hope this responds to your comment - please let us know if it does.
> >
> > Andy
> > ----
> >
> > There is a new mailing list public-sparql-dev@w3.org for general
> > questions on
> >
> > SPARQL.
----- End forwarded message -----
Received on Monday, 27 March 2006 15:05:00 UTC