I’m working on a project using sparql & dbpedia.
I ‘m currently having an issue with a textuel property with a slash on it.
Here is a working query with the property “discharge” which express the amount of water per time of a river:
PREFIX dbp: <http://dbpedia.org/property/>
SELECT ?discharge
WHERE
{
<http://dbpedia.org/resource/Nile> dbp:discharge ?discharge .
FILTER(ISLITERAL(?discharge))
}
LIMIT 200
This request is working fine.
Still if use, a similar property called “discharge_m3/s”, it”s not working anymore and I got this error which increminates the slash on the property name:
Virtuoso 37000 Error SP030: SPARQL compiler, line 3: syntax error at
‘/’ before ‘s’
Any idea to go through this ?
Do you mean you are trying to use the property in prefixed name form i.e.
dbp:discharge_m3/s?If that is the case you can’t do that because that is not a valid prefixed name according to the SPARQL grammer hence the compiler error.
You would have to include the full URI instead of the prefixed name form e.g.
<http://dbpedia.org/property/discharge_m3/s>