From: Seaborne, A. <and...@hp...> - 2005-05-23 08:22:44
|
-------- Original Message -------- > From: Charles Nepote <> > Date: 21 May 2005 01:00 >=20 > Hi, >=20 > I am trying to query the label of a resource in a particular language. >=20 > SELECT ?z WHERE (<http://example.org/ex#id>, rdfs:label, ?z@fr) USING > rdfs FOR <http://www.w3.org/2000/01/rdf-schema#>=20 >=20 > --> error >=20 >=20 > SELECT ?z WHERE (<http://example.org/ex#id>, rdfs:label, ?z) AND ?z = =3D~ > "/@fr/"=20 > USING rdfs FOR <http://www.w3.org/2000/01/rdf-schema#> >=20 > --> "no match" >=20 > Any ideas ? > See the discussion here : > http://ilrt.org/discovery/chatlogs/swig/2005-05-20.html#T23-24-35 >=20 > --- > Charles Nepote It's "langeq" - it was added very late to RDQL and I don't know how widely it is implemented. AND ?z langeq "fr" Which extracts the lang tag and does a language match: AND "foo"@en-gb langeq "en"=20 In SPARQL, it is approximately (the regex could be better): FILTER regex(lang(?z), "^fr", "i") And better still FILTER ext:lang(?z, "fr") for a custom extension. Andy |