質問

The following resource has an Unicode character in the name: http://dbpedia.org/page/Marit_Bj%C3%B8rgen

The following query works for resource names without Unicode character but using name above it returns nothing:

select ?label { 
 dbpedia:Marit_Bjørgen
   dbpedia-owl:birthPlace
     [ a dbpedia-owl:Country ;
      rdfs:label ?label ]
  filter langMatches(lang(?label),"en")
 }

I have also tried various escaping:

dbpedia:Marit_Bj%C3%B8rgen

But this returns error. Anyone that knows how to do this?

役に立ちましたか?

解決

Remember that a QName like dbpedia:whatever is just an abbreviation for a complete URI. This works:

select ?label { 
  <http://dbpedia.org/resource/Marit_Bj%C3%B8rgen>
    dbpedia-owl:birthPlace
      [ a dbpedia-owl:Country ;
        rdfs:label ?label ]
  filter langMatches(lang(?label),"en")
}
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top