Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fontane-notizbuecher
SADE-Project
Commits
9c983c68
Commit
9c983c68
authored
Apr 07, 2020
by
Mathias Goebel
Browse files
existdb 5 compatibility
parent
56c0f9df
Pipeline
#130487
passed with stages
in 11 minutes and 15 seconds
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
deutsche-biographie-get.xq
View file @
9c983c68
...
...
@@ -16,11 +16,11 @@ 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\}"
return
map
:
new
(
return
map
:
merge
(
for
$i
in
$beacon
[
not
(
starts-with
(
.,
"#"
))][
not
(
starts-with
(
.,
"("
))][
.
!=
""
]
return
map
:
entry
(
$i
,
replace
(
$target
,
$replacement
,
$i
))
)
)
let
$merge
:=
map
:
merge
(
$maps
)
return
...
...
index-create-mentions.xq
View file @
9c983c68
...
...
@@ -52,7 +52,7 @@ let $cleanup := local:remove-old-stuff($dataPath)
let
$prefixes
:=
(
//
tei:listPrefixDef
[(
.//
@replacementPattern
/
contains
(
.,
"textgrid:"
))
=
true
()])
/
tei:prefixDef
let
$map
:=
map
:
new
(
map
:
merge
(
$prefixes
!
map
:
entry
(
string
(
./
@ident
)
,
$dataPath
||
substring
(
./
@replacementPattern
,
10
,
5
)
||
".xml"
)
)
...
...
index/create.xq
View file @
9c983c68
...
...
@@ -42,7 +42,7 @@ let $cleanup := update delete //tei:linkGrp//comment()[contains(., "Notizbuch ")
(: map prefixes to index documents :)
let
$prefixes
:=
(
//
tei:listPrefixDef
[(
.//
@replacementPattern
/
contains
(
.,
"textgrid:"
))
=
true
()])
/
tei:prefixDef
let
$map
:=
map
:
new
(
map
:
merge
(
$prefixes
!
map
:
entry
(
string
(
./
@ident
)
,
$dataPath
||
substring
(
./
@replacementPattern
,
10
,
5
)
||
".xml"
)
)
...
...
index/remove.xq
View file @
9c983c68
...
...
@@ -14,9 +14,9 @@ let $dataPath := "/db/sade-projects/textgrid/data/xml/data/"
(: map prefixes to index documents :)
let
$prefixes
:=
(
//
tei:listPrefixDef
[(
.//
@replacementPattern
/
contains
(
.,
"textgrid:"
))
=
true
()])
/
tei:prefixDef
let
$map
:=
map
:
new
(
map
:
merge
(
$prefixes
!
map
:
entry
(
string
(
./
@ident
)
,
$dataPath
||
substring
(
./
@replacementPattern
,
10
,
5
)
||
".xml"
)
map
{
string
(
./
@ident
)
:
$dataPath
||
substring
(
./
@replacementPattern
,
10
,
5
)
||
".xml"
}
)
(: collect available entities from the index :)
...
...
index/toPreserve.xq
View file @
9c983c68
...
...
@@ -14,7 +14,7 @@ let $collection := collection($dataPath)
(: map prefixes to index documents :)
let
$prefixes
:=
(
$collection
//
tei:listPrefixDef
[(
.//
@replacementPattern
/
contains
(
.,
"textgrid:"
))
=
true
()])
/
tei:prefixDef
let
$map
:=
map
:
new
(
map
:
merge
(
$prefixes
!
map
:
entry
(
string
(
./
@ident
)
,
$dataPath
||
substring
(
./
@replacementPattern
,
10
,
5
)
||
".xml"
)
)
...
...
index/transform.xq
View file @
9c983c68
...
...
@@ -126,7 +126,7 @@ let $login := xmldb:login("/db", "admin", "")
(: map prefixes to index documents :)
let
$prefixes
:=
(
$collection
//
tei:listPrefixDef
[(
.//
@replacementPattern
/
contains
(
.,
"textgrid:"
))
=
true
()])
/
tei:prefixDef
let
$map
:=
map
:
new
(
map
:
merge
(
$prefixes
!
map
:
entry
(
string
(
./
@ident
)
,
$dataPath
||
substring
(
./
@replacementPattern
,
10
,
5
)
||
".xml"
)
)
...
...
post-install.xq
View file @
9c983c68
...
...
@@ -80,9 +80,11 @@ declare variable $credentialInjection :=
declare
variable
$configdoc
:=
doc
(
"/db/sade-projects/textgrid/config.xml"
);
declare
variable
$config
:=
map
:
new
(
for
$param
in
$configdoc
/
config
/
param
return
map
:
entry
(
string
(
$param
/
@key
)
,
string
(
$param
))
);
declare
variable
$config
:=
map
:
merge
(
for
$param
in
$configdoc
/
config
/
param
return
map
:
entry
(
string
(
$param
/
@key
)
,
string
(
$param
))
);
declare
variable
$postinstall-log
:=
util:log-system-out
(
"webauth: "
||
$config
(
"textgrid.webauth"
));
...
...
sade-projects/textgrid/data/xml/anno.xq
View file @
9c983c68
...
...
@@ -25,7 +25,7 @@ declare variable $img := request:get-parameter("img", "textgrid:164h2.1");
declare
variable
$surfaces
:=
collection
(
'/db/sade-projects/textgrid/data/xml/data/'
)
//
tei:sourceDoc
/
tei:surface
[
ends-with
(
@facs
,
substring-before
(
$img
,
"."
))];
declare
variable
$xywh
:=
map
:
new
(
map
:
merge
(
for
$surface
in
$surfaces
let
$iiifUrlArr
:=
fontaneTransfo:digilib
(
$surface
)
=>
tokenize
(
'/'
)
let
$pctArr
:=
$iiifUrlArr
[
starts-with
(
.,
'pct:'
)]
=>
substring
(
5
)
=>
tokenize
(
','
)
...
...
trigger-publish.xql
View file @
9c983c68
...
...
@@ -6,9 +6,10 @@ import module namespace tgclient="http://textgrid.info/namespaces/xquery/tgclien
declare namespace tgmd="http://textgrid.info/namespaces/metadata/core/2010";
declare variable $configdoc := doc( "/db/sade-projects/textgrid/config.xml" );
declare variable $config := map:new(for $param in $configdoc//param
return map:entry(string($param/@key), string($param))
);
declare variable $config :=
map:merge( for $param in $configdoc//param
return map:entry(string($param/@key), string($param))
);
declare variable $sid :=
tgclient:getSid(
$config("textgrid.webauth"),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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