Skip to content

Commit

Permalink
fixed a bug with multiple sameAs relations pointing at the GND
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstadler committed Oct 5, 2017
1 parent befc240 commit 8db377c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/wega-util.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,8 @@ declare function wega-util:viaf2gnd($viaf as xs:string) as xs:string* {
declare function wega-util:geonames2gnd($geonames-id as xs:string) as xs:string* {
let $dbpedia-rdf := wega-util:dbpedia-from-geonames($geonames-id)
return
if($dbpedia-rdf//owl:sameAs/@rdf:resource[starts-with(., 'http://d-nb.info/gnd/')]) then $dbpedia-rdf//owl:sameAs/@rdf:resource[starts-with(., 'http://d-nb.info/gnd/')]/substring-after(., 'http://d-nb.info/gnd/')
(: ther might be multiple sameAs relations to the GND, see e.g. Altona A130064 :)
if($dbpedia-rdf//owl:sameAs/@rdf:resource[starts-with(., 'http://d-nb.info/gnd/')]) then ($dbpedia-rdf//owl:sameAs/@rdf:resource[starts-with(., 'http://d-nb.info/gnd/')])[1]/substring-after(., 'http://d-nb.info/gnd/')
else ()
};

Expand Down

0 comments on commit 8db377c

Please sign in to comment.