I hit a small issue the other day, which was clarified by the DBpedia folks. I guess others may have, or will hit a similar issue; it may be worth therefore to document it.
The question I had: what URI should I use for J.S. Bach’s Well-Tempered Clavier? This is a non-trivial question if one wants to use, say, the Music Ontology in cataloging one’s music: indeed there is nothing like, say, ISBN-s in classical music. I am not sure who suggested in the past that using the corresponding Wikipedia URI might be the best option we have. Well, now that we have DBpedia, I thought that the corresponding DBpedia URI (the non-informational resource one, that is) should be a much better choice. But what is the URI?
I typed in “Well tempered clavier” in my Wikipedia search box, and this led directly to
http://en.wikipedia.org/wiki/Well_Tempered_Clavier
which displayed the corresponding article. Fine, so I thought by using a simple replacement, yielding
http://dbpedia.org/resource/Well_Tempered_Clavier
would give me the URI. Wrong, 404…
The issue (and that is where I was wrong) is that Wikipedia uses a funny, non-HTTP based redirection. It displays the right content for the search result, it keeps a kind of phony URI in the browser’s address bar, it just puts a small note into the article saying “(Redirected from XYZ)”. DBpedia does noe keep track of all possible search possibilities, so a URI minted from the redirected page (“redirected” in the Wikipedia sense) is not the right answer.
What to do? Here is what Richard Cyganiak proposed as a general approach:
- Get your search term, have your article displayed
- If the wikipedia in use is not the English one, click on the English link in the left sidebar (a Richard put it: if there is no English link, you are out of luck…
- If the page is redirected (look for the note like the one I referred to), hit the “Article” button on the top of the page. This will redisplay the same article content, but with the “canonical” URI in the browser’s address bar.
- Take that URI, and replace the leading
http://en.wikipedia.org/wikibyhttp://dbpedia.org/resource
Voilà! You then get to
http://dbpedia.org/resource/Well-Tempered_Clavier
which can be used as a non-informational resource for this piece of music (note the difference in a hyphen in the URI!).
Thanks to Richard, Sören, and Georgi for enlightening me…

