[redland-dev] Query literal values in a certain language (using SPARQL)

Wouter Bolsterlee uws at xs4all.nl
Mon Jan 5 00:16:49 CET 2009


Hi all,

Is it possible with librdf to query only literal values in a certain
language (using SPARQL or by other means)?

Something like this does not work (gives a SPARQL syntax error):

  SELECT * WHERE { ?x rdfs:label ?label at en . }

...and neither does this:

  SELECT * WHERE { ?x rdfs:label ?label .
                   ?label xml:lang "en" . }

The following SPARQL query works as expected, though:

  SELECT * WHERE { ?x rdfs:label "Foobar"@en }

Fwiw, my specific use case is this: I want to extract the rdfs:comment and
rdfs:label contents from RDF data (small RDF files from dbpedia.org), but
only the English versions. The files I'm using contain language tags, and
alternative rdfs:label and rdfs:comment nodes in languages besides English.

Thanks in advance. Any pointers are welcome!

    — Wouter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 245 bytes
Desc: Digital signature
Url : http://lists.librdf.org/pipermail/redland-dev/attachments/20090105/9abf0aab/attachment.pgp 


More information about the redland-dev mailing list