Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
fontane-notizbuecher
SADE
Commits
1c305751
Commit
1c305751
authored
Aug 21, 2018
by
Mathias Goebel
🎠
Browse files
add Deutsche Biografie
parent
364758e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/fontane/index-processor.xqm
View file @
1c305751
...
...
@@ -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
(", ",
...
...
@@ -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("
")
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\}"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment