Skip to content

Commit

Permalink
update database variable
Browse files Browse the repository at this point in the history
and update output options
  • Loading branch information
peterstadler committed Dec 7, 2023
1 parent 8d88658 commit aa2dabc
Show file tree
Hide file tree
Showing 18 changed files with 105 additions and 43 deletions.
10 changes: 6 additions & 4 deletions modules/tools/batch_transform.xq
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
xquery version "1.0" encoding "UTF-8";

import module namespace login="http://kb.dk/this/login" at "../login.xqm";
import module namespace config="https://github.com/edirom/mermeid/config" at "../config.xqm";

declare namespace request="http://exist-db.org/xquery/request";
declare namespace response="http://exist-db.org/xquery/response";
declare namespace transform="http://exist-db.org/xquery/transform";
Expand All @@ -12,11 +9,16 @@ declare namespace util="http://exist-db.org/xquery/util";
declare namespace ft="http://exist-db.org/xquery/lucene";
declare namespace ht="http://exist-db.org/xquery/httpclient";
declare namespace xdb="http://exist-db.org/xquery/xmldb";
declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";

declare namespace local="http://kb.dk/this/app";
declare namespace m="http://www.music-encoding.org/ns/mei";

declare option exist:serialize "method=xml media-type=text/html";
import module namespace login="http://kb.dk/this/login" at "../login.xqm";
import module namespace config="https://github.com/edirom/mermeid/config" at "../config.xqm";

declare option output:method "xhtml5";
declare option output:media-type "text/html";

declare variable $coll := request:get-parameter("coll", "") cast as xs:string;
declare variable $query := request:get-parameter("query","") cast as xs:string;
Expand Down
8 changes: 5 additions & 3 deletions modules/tools/batch_transform_list.xq
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
xquery version "1.0" encoding "UTF-8";

import module namespace config="https://github.com/edirom/mermeid/config" at "../config.xqm";

declare namespace xl="http://www.w3.org/1999/xlink";
declare namespace request="http://exist-db.org/xquery/request";
declare namespace response="http://exist-db.org/xquery/response";
Expand All @@ -10,11 +8,15 @@ declare namespace file="http://exist-db.org/xquery/file";
declare namespace util="http://exist-db.org/xquery/util";
declare namespace ft="http://exist-db.org/xquery/lucene";
declare namespace ht="http://exist-db.org/xquery/httpclient";
declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";

declare namespace local="http://kb.dk/this/app";
declare namespace m="http://www.music-encoding.org/ns/mei";

declare option exist:serialize "method=xml media-type=text/html";
import module namespace config="https://github.com/edirom/mermeid/config" at "../config.xqm";

declare option output:method "xhtml5";
declare option output:media-type "text/html";

declare variable $coll := request:get-parameter("coll","") cast as xs:string;
declare variable $query := request:get-parameter("query","") cast as xs:string;
Expand Down
4 changes: 3 additions & 1 deletion modules/tools/batch_transform_settings.xq
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
xquery version "1.0" encoding "UTF-8";

declare namespace request="http://exist-db.org/xquery/request";
declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";

import module namespace config="https://github.com/edirom/mermeid/config" at "../config.xqm";

declare option exist:serialize "method=xml media-type=text/html;charset=UTF-8";
declare option output:method "xhtml5";
declare option output:media-type "text/html";

declare variable $coll := request:get-parameter("coll", "") cast as xs:string;
declare variable $query := request:get-parameter("query","") cast as xs:string;
Expand Down
8 changes: 6 additions & 2 deletions modules/tools/list_incipit_graphics.xq
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ declare namespace file="http://exist-db.org/xquery/file";
declare namespace util="http://exist-db.org/xquery/util";
declare namespace ft="http://exist-db.org/xquery/lucene";
declare namespace ht="http://exist-db.org/xquery/httpclient";
declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";

declare namespace local="http://kb.dk/this/app";
declare namespace m="http://www.music-encoding.org/ns/mei";

declare option exist:serialize "method=xml media-type=text/html";
import module namespace config="https://github.com/edirom/mermeid/config" at "../config.xqm";

declare variable $database := "/db/dcm";
declare option output:method "xhtml5";
declare option output:media-type "text/html";

declare variable $database := $config:data-root;
declare variable $collection := request:get-parameter("c","");
(: desired resolution; MerMEId supports values "lowres", "hires", and "print" :)
declare variable $resolution := request:get-parameter("res","lowres");
Expand Down
8 changes: 6 additions & 2 deletions modules/tools/list_source_provenance.xq
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ declare namespace file="http://exist-db.org/xquery/file";
declare namespace util="http://exist-db.org/xquery/util";
declare namespace ft="http://exist-db.org/xquery/lucene";
declare namespace ht="http://exist-db.org/xquery/httpclient";
declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";

declare namespace local="http://kb.dk/this/app";
declare namespace m="http://www.music-encoding.org/ns/mei";

declare option exist:serialize "method=xml media-type=text/html";
import module namespace config="https://github.com/edirom/mermeid/config" at "../config.xqm";

declare variable $database := "/db/dcm";
declare option output:method "xhtml5";
declare option output:media-type "text/html";

declare variable $database := $config:data-root;
declare variable $collection := request:get-parameter("c","");


Expand Down
8 changes: 6 additions & 2 deletions modules/tools/list_text_incipits.xq
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ declare namespace file="http://exist-db.org/xquery/file";
declare namespace util="http://exist-db.org/xquery/util";
declare namespace ft="http://exist-db.org/xquery/lucene";
declare namespace ht="http://exist-db.org/xquery/httpclient";
declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";

declare namespace local="http://kb.dk/this/app";
declare namespace m="http://www.music-encoding.org/ns/mei";

declare option exist:serialize "method=xml media-type=text/html";
import module namespace config="https://github.com/edirom/mermeid/config" at "../config.xqm";

declare variable $database := "/db/dcm";
declare option output:method "xhtml5";
declare option output:media-type "text/html";

declare variable $database := $config:data-root;
declare variable $collection := request:get-parameter("c","");
(: desired resolution; MerMEId supports values "lowres", "hires", and "print" :)
declare variable $resolution := "lowres";
Expand Down
10 changes: 7 additions & 3 deletions modules/tools/location_index.xq
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@ declare namespace util="http://exist-db.org/xquery/util";
declare namespace ft="http://exist-db.org/xquery/lucene";
declare namespace ht="http://exist-db.org/xquery/httpclient";
declare namespace marc="http://www.loc.gov/MARC21/slim";
declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";

declare namespace local="http://kb.dk/this/app";
declare namespace m="http://www.music-encoding.org/ns/mei";

declare option exist:serialize "method=xml media-type=text/html";
import module namespace config="https://github.com/edirom/mermeid/config" at "../config.xqm";

declare variable $database := "/db/dcm";
declare variable $rism_dir := "/db/rism_sigla";
declare option output:method "xhtml5";
declare option output:media-type "text/html";

declare variable $database := $config:data-root;
declare variable $rism_dir := $config:app-root || "/rism_sigla";
declare variable $country_codes := doc(concat($rism_dir,'/RISM_country_codes.xml'));
declare variable $collection := request:get-parameter("c","");

Expand Down
8 changes: 6 additions & 2 deletions modules/tools/name_index.xq
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ declare namespace file="http://exist-db.org/xquery/file";
declare namespace util="http://exist-db.org/xquery/util";
declare namespace ft="http://exist-db.org/xquery/lucene";
declare namespace ht="http://exist-db.org/xquery/httpclient";
declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";

declare namespace local="http://kb.dk/this/app";
declare namespace m="http://www.music-encoding.org/ns/mei";

declare option exist:serialize "method=xml media-type=text/html";
import module namespace config="https://github.com/edirom/mermeid/config" at "../config.xqm";

declare variable $database := "/db/dcm";
declare option output:method "xhtml5";
declare option output:media-type "text/html";

declare variable $database := $config:data-root;
declare variable $collection := request:get-parameter("c","");


Expand Down
8 changes: 6 additions & 2 deletions modules/tools/name_index_step1.xq
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ declare namespace file="http://exist-db.org/xquery/file";
declare namespace util="http://exist-db.org/xquery/util";
declare namespace ft="http://exist-db.org/xquery/lucene";
declare namespace ht="http://exist-db.org/xquery/httpclient";
declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";

declare namespace local="http://kb.dk/this/app";
declare namespace m="http://www.music-encoding.org/ns/mei";

declare option exist:serialize "method=xml media-type=text/html";
import module namespace config="https://github.com/edirom/mermeid/config" at "../config.xqm";

declare variable $database := "/db/dcm";
declare option output:method "xhtml5";
declare option output:media-type "text/html";

declare variable $database := $config:data-root;
declare variable $collection := request:get-parameter("c","");


Expand Down
8 changes: 6 additions & 2 deletions modules/tools/name_index_step2.xq
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ declare namespace file="http://exist-db.org/xquery/file";
declare namespace util="http://exist-db.org/xquery/util";
declare namespace ft="http://exist-db.org/xquery/lucene";
declare namespace ht="http://exist-db.org/xquery/httpclient";
declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";

declare namespace local="http://kb.dk/this/app";
declare namespace m="http://www.music-encoding.org/ns/mei";

declare option exist:serialize "method=xml media-type=text/html";
import module namespace config="https://github.com/edirom/mermeid/config" at "../config.xqm";

declare variable $database := "/db/dcm";
declare option output:method "xhtml5";
declare option output:media-type "text/html";

declare variable $database := $config:data-root;
declare variable $collection := request:get-parameter("c","");

declare variable $names :=
Expand Down
8 changes: 6 additions & 2 deletions modules/tools/opus_index.xq
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ declare namespace file="http://exist-db.org/xquery/file";
declare namespace util="http://exist-db.org/xquery/util";
declare namespace ft="http://exist-db.org/xquery/lucene";
declare namespace ht="http://exist-db.org/xquery/httpclient";
declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";

declare namespace local="http://kb.dk/this/app";
declare namespace m="http://www.music-encoding.org/ns/mei";

declare option exist:serialize "method=xml media-type=text/html";
import module namespace config="https://github.com/edirom/mermeid/config" at "../config.xqm";

declare variable $database := "/db/dcm";
declare option output:method "xhtml5";
declare option output:media-type "text/html";

declare variable $database := $config:data-root;
declare variable $collection := request:get-parameter("c","");
(: the separator used for opus sub-numbers, e.g. Opus 27:2 :)
declare variable $separator := request:get-parameter("separator",":");
Expand Down
8 changes: 6 additions & 2 deletions modules/tools/performance_city_index.xq
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ declare namespace util="http://exist-db.org/xquery/util";
declare namespace ft="http://exist-db.org/xquery/lucene";
declare namespace ht="http://exist-db.org/xquery/httpclient";
declare namespace marc="http://www.loc.gov/MARC21/slim";
declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";

declare namespace local="http://kb.dk/this/app";
declare namespace m="http://www.music-encoding.org/ns/mei";

declare option exist:serialize "method=xml media-type=text/html";
import module namespace config="https://github.com/edirom/mermeid/config" at "../config.xqm";

declare variable $database := "/db/dcm";
declare option output:method "xhtml5";
declare option output:media-type "text/html";

declare variable $database := $config:data-root;
declare variable $collection := request:get-parameter("c","");


Expand Down
8 changes: 6 additions & 2 deletions modules/tools/provenance_index.xq
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ declare namespace file="http://exist-db.org/xquery/file";
declare namespace util="http://exist-db.org/xquery/util";
declare namespace ft="http://exist-db.org/xquery/lucene";
declare namespace ht="http://exist-db.org/xquery/httpclient";
declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";

declare namespace local="http://kb.dk/this/app";
declare namespace m="http://www.music-encoding.org/ns/mei";

declare option exist:serialize "method=xml media-type=text/html";
import module namespace config="https://github.com/edirom/mermeid/config" at "../config.xqm";

declare variable $database := "/db/dcm";
declare option output:method "xhtml5";
declare option output:media-type "text/html";

declare variable $database := $config:data-root;
declare variable $collection := request:get-parameter("c","");
declare variable $invert := request:get-parameter("invert","false");

Expand Down
10 changes: 6 additions & 4 deletions modules/tools/select.xq
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,24 @@ xquery version "1.0" encoding "UTF-8";

declare namespace loop="http://kb.dk/this/getlist";

import module namespace config="https://github.com/edirom/mermeid/config" at "../config.xqm";

declare namespace request="http://exist-db.org/xquery/request";
declare namespace response="http://exist-db.org/xquery/response";
declare namespace fn="http://www.w3.org/2005/xpath-functions";
declare namespace file="http://exist-db.org/xquery/file";
declare namespace util="http://exist-db.org/xquery/util";
declare namespace ft="http://exist-db.org/xquery/lucene";
declare namespace ht="http://exist-db.org/xquery/httpclient";
declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";

declare namespace local="http://kb.dk/this/app";
declare namespace m="http://www.music-encoding.org/ns/mei";

declare option exist:serialize "method=xml media-type=text/html";
import module namespace config="https://github.com/edirom/mermeid/config" at "../config.xqm";

declare option output:method "xhtml5";
declare option output:media-type "text/html";

declare variable $database := $config:data-public-root;
declare variable $database := $config:data-root;
declare variable $coll := request:get-parameter("c","HartW");


Expand Down
10 changes: 6 additions & 4 deletions modules/tools/select_generator.xq
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ xquery version "1.0" encoding "UTF-8";
(: A script to generate select boxes for searching by keys such as opus numbers numbers or names. :)
(: The generated code needs to be cleaned manually, though :)

import module namespace config="https://github.com/edirom/mermeid/config" at "../config.xqm";

declare namespace loop="http://kb.dk/this/getlist";

declare namespace request="http://exist-db.org/xquery/request";
Expand All @@ -14,13 +12,17 @@ declare namespace file="http://exist-db.org/xquery/file";
declare namespace util="http://exist-db.org/xquery/util";
declare namespace ft="http://exist-db.org/xquery/lucene";
declare namespace ht="http://exist-db.org/xquery/httpclient";
declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";

declare namespace local="http://kb.dk/this/app";
declare namespace m="http://www.music-encoding.org/ns/mei";

declare option exist:serialize "method=xml media-type=text/html";
import module namespace config="https://github.com/edirom/mermeid/config" at "../config.xqm";

declare option output:method "xhtml5";
declare option output:media-type "text/html";

declare variable $database := $config:data-public-root;
declare variable $database := $config:data-root;
declare variable $coll := request:get-parameter("c","HartW");


Expand Down
8 changes: 6 additions & 2 deletions modules/tools/select_generator_cnw.xq
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ declare namespace file="http://exist-db.org/xquery/file";
declare namespace util="http://exist-db.org/xquery/util";
declare namespace ft="http://exist-db.org/xquery/lucene";
declare namespace ht="http://exist-db.org/xquery/httpclient";
declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";

declare namespace local="http://kb.dk/this/app";
declare namespace m="http://www.music-encoding.org/ns/mei";

declare option exist:serialize "method=xml media-type=text/html";
import module namespace config="https://github.com/edirom/mermeid/config" at "../config.xqm";

declare variable $database := "/db/cnw/data";
declare option output:method "xhtml5";
declare option output:media-type "text/html";

declare variable $database := $config:data-root;


declare function loop:clean-names ($key as xs:string) as xs:string
Expand Down
8 changes: 6 additions & 2 deletions modules/tools/text_author_index.xq
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ declare namespace file="http://exist-db.org/xquery/file";
declare namespace util="http://exist-db.org/xquery/util";
declare namespace ft="http://exist-db.org/xquery/lucene";
declare namespace ht="http://exist-db.org/xquery/httpclient";
declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";

declare namespace local="http://kb.dk/this/app";
declare namespace m="http://www.music-encoding.org/ns/mei";

declare option exist:serialize "method=xml media-type=text/html";
import module namespace config="https://github.com/edirom/mermeid/config" at "../config.xqm";

declare variable $database := "/db/dcm";
declare option output:method "xhtml5";
declare option output:media-type "text/html";

declare variable $database := $config:data-root;
declare variable $collection := request:get-parameter("c","");


Expand Down
8 changes: 6 additions & 2 deletions modules/tools/title_index.xq
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ declare namespace file="http://exist-db.org/xquery/file";
declare namespace util="http://exist-db.org/xquery/util";
declare namespace ft="http://exist-db.org/xquery/lucene";
declare namespace ht="http://exist-db.org/xquery/httpclient";
declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";

declare namespace local="http://kb.dk/this/app";
declare namespace m="http://www.music-encoding.org/ns/mei";

declare option exist:serialize "method=xml media-type=text/html";
import module namespace config="https://github.com/edirom/mermeid/config" at "../config.xqm";

declare variable $database := "/db/dcm";
declare option output:method "xhtml5";
declare option output:media-type "text/html";

declare variable $database := $config:data-root;
declare variable $collection := request:get-parameter("c","");


Expand Down

0 comments on commit aa2dabc

Please sign in to comment.