[redland-dev] Query literal values in a certain language (using SPARQL)
Martin Stricker
martin.stricker at gmail.com
Mon Jan 5 01:40:20 CET 2009
I think you are looking for FILTER and the LANG operator:
<http://www.w3.org/TR/rdf-sparql-query/#func-lang>
?
Am 05.01.2009 um 00:16 schrieb Wouter Bolsterlee:
> 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
> _______________________________________________
> redland-dev mailing list
> redland-dev at lists.librdf.org
> http://lists.librdf.org/mailman/listinfo/redland-dev
More information about the redland-dev
mailing list