Commit 1c305751 authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

add Deutsche Biografie

parent 364758e2
......@@ -31,6 +31,7 @@ declare variable $f-indexproc:dataPath := '/db/sade-projects/textgrid/data/xml/d
declare variable $f-indexproc:dataCollection := collection($f-indexproc:dataPath);
declare variable $f-indexproc:BeaconMap := map:merge((
local:beacon-parser(xs:anyURI("http://www.historische-kommission-muenchen-editionen.de/beacon_db_register.txt")),
local:beacon-parser(xs:anyURI("http://www.historische-kommission-muenchen-editionen.de/beacon_ndb.txt")),
local:beacon-parser(xs:anyURI("http://www.historische-kommission-muenchen-editionen.de/beacon_adb.txt"))
));
......@@ -232,7 +233,7 @@ return
attribute href { string($idno/@xml:base) || $str },
<xhtml:i title="Link zu externer Ressource" class="fa fa-external-link"></xhtml:i>
},
(: ADB :)
(: Deutsche Biografie :)
if($idno/parent::tei:person and $f-indexproc:BeaconMap($str))
then
(",&#160;",
......@@ -242,12 +243,16 @@ return
attribute title {
if(ends-with($url, "adbcontent"))
then "ADB-Eintrag basierend auf GND"
else "NDB-Eintrag basierend auf GND"
else if (ends-with($url, "ndbcontent"))
then "NDB-Eintrag basierend auf GND"
else "Eintrag in Deutscher Biografie basierend auf GND"
},
attribute href {$url},
if(ends-with($url, "adbcontent"))
then "ADB"
else "NDB"
else if (ends-with($url, "ndbcontent"))
then "NDB"
else "DB"
})
else ()
}
......@@ -1172,7 +1177,7 @@ as map(*) {
$beacon := httpclient:get($url, $persist, $request-headers)//httpclient:body/node()
=> xmldb:decode() => tokenize("&#x0A;")
let $target := $beacon[starts-with(., "#TARGET")] => substring-after(": ")
let $target := $beacon[starts-with(., "#TARGET:")] => substring-after(": ")
(: should return something like "http://www.deutsche-biographie.de/pnd{ID}.html#adbcontent"
: where «{ID}» is to be replaced by the GND ID :)
let $replacement := "\{ID\}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment