|
Hello, I'm progressing nicely with my project in RoR, but I'm having a bit of trouble to fine tune the query needed to retrieve information about a specific city or town. I'm relying on DBPedia, and the two test cases are Manchester (in the UK) and OsnaBrück (in Germany) The idea is to make the query as generic as possible, because it's constructred through Ruby on Rails, so I need to be able to replace the search values later on through variables. The Query i'm trying to tune is this one:
The idea behind the query is the following:
I want to select any location that:
If I use the values 'Manchester' and <http://dbpedia.org/resource/United_Kingdom> I'm able to select the City of Manchester in the United Kingdom, but when I use the values 'Osnabrück' and <http://dbpedia.org/resource/Germany> I'm not able to select the town of Osnabrück, despite it having a page in dbpedia. Could someone point out what I'm missing in my SPARQL query? |
|
Think I found it:
Seems to do exactly what I want |


@NekoNova If you're posting SPARQL queries can you use code formatting (the little icon with 1s and 0s) rather than quote formatting as it makes it far more readable, thanks :-)
I did, I did, but I think it got a bit messed up with all the spaces & tabs in it :S