Open vhf opened 4 years ago
Probably related to this issue is this problematic SPARQL query:
# https://trifid-lindas.test.cluster.ldbar.ch/query
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX qb: <http://purl.org/linked-data/cube#>
PREFIX dc11: <http://purl.org/dc/elements/1.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT DISTINCT ?value ?label FROM <https://linked.opendata.swiss/graph/blv/animalpest>
WHERE {
?observation rdf:type qb:Observation;
<http://ld.zazuko.com/animalpest/attribute/canton> ?value;
qb:dataSet <http://ld.zazuko.com/animalpest/dataset>.
OPTIONAL {
?value (rdfs:label|skos:prefLabel) ?label_de.
# comment next line
FILTER(LANGMATCHES(LANG(?label_de), "de"^^xsd:string))
}
BIND(COALESCE(?label_de, ""^^xsd:string) AS ?label)
}
As expected, querying a datacube (A) without specifying a language and (B) with specifying
""
as language do not behave the same way.A
B
At the moment, B is correct but A isn't properly handled and instead outputs the following, which will always evaluate to the empty string as label: