문제

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