Hi all,
it shall be really kind if someone might have a look into my following
matching issue:
I am trying to filter out a language-specific XMLLiteral using SPARQL,
cannot get the literals language property matched by the filter – and
don't have a clue why so.
Any suggestions welcome !!
This is the RDF.
<rdf:RDF xmlns:rdf= "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs= "http://www.w3.org/2000/01/rdf-schema#"
xmlns:xsd= "http://www.w3.org/2001/XMLSchema#"
xmlns:xliff= "urn:oasis:names:tc:xliff:document:1.2"
xmlns:timed= "http://namespaces.semaworx.org/timed#"
>
<rdf:Description rdf:about=
"http://resources.semaworx.eu/timed/elements/contentincrediblyuniqueid003">
<rdf:type rdf:resource=
"http://namespaces.semaworx.org/timed#versionedPayload" />
<xliff:target rdf:parseType="Literal" xml:lang="de-de"><i18n21:message
key="cityAPI_teaser_subhead">Airlines, Kneipen, U-Bahn, Coffee Shops, Beauty-Stores, Heimdekor-Läden,
Sportveranstaltungen…</i18n21:message></xliff:target>
</rdf:Description>
And this the SPARQL trying to match the literal as a whole:
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd:<http://www.w3.org/2001/XMLSchema#>
PREFIX timed:<http://namespaces.semaworx.org/timed#>
PREFIX xliff:<urn:oasis:names:tc:xliff:document:1.2>
CONSTRUCT{
?versionPayload rdf:type timed:versionedPayload .
?versionPayload xliff:target ?nationalString .
}
WHERE{
?versionPayload rdf:type timed:versionedPayload .
?versionPayload xliff:target ?nationalString .
FILTER ( isLiteral(?nationalString) && langMatches( lang(?nationalString),
"de-de" ) )
}
The query as above delivers no result at all.
Despite that, besides the language-matching, the rest of the query
appers to work properly:
As soon as I remove the language filter, I get a proper result; though
including matching XMLLiterals for *all* available languages – which of
course is not intended.
What am I missing !??
– Bardo