From 81d178bdac8b76ebd4ba67573cfd767e2e01e7f1 Mon Sep 17 00:00:00 2001 From: lauml Date: Tue, 22 Jun 2021 15:02:15 +0200 Subject: [PATCH 1/3] add skos as standard index --- modules/config.xqm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/modules/config.xqm b/modules/config.xqm index cf466bd..5664cd4 100644 --- a/modules/config.xqm +++ b/modules/config.xqm @@ -17,6 +17,11 @@ declare namespace functx = "http://www.functx.com"; declare namespace dc="http://purl.org/dc/elements/1.1/"; declare namespace owl="http://www.w3.org/2002/07/owl#"; +(:Für das SKOS-Anbindung als Standard Register:) +declare namespace skos="http://www.w3.org/2004/02/skos/core#"; +declare namespace rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; + + (: Determine the application root collection from the current module load path. :) declare variable $config:app-root := let $rawPath := system:get-module-load-path() @@ -95,6 +100,13 @@ declare variable $config:ediarum-indexes := [ "id": "comments", "label": "Anmerkungsregister", "active": "false" + }, + map { + "id": "concepts", + "label": "Konzepte", + "file": "Register/Thesaurus.xml", + "collection": "Register/Thesaurus", + "active": "true" }]; declare function functx:escape-for-regex($arg as xs:string?) as xs:string { @@ -675,6 +687,26 @@ declare function config:get-ediarum-index-with-params($project-name as xs:string } return $ul + ) + case "concepts" return ( + let $ul := + element ul { + for $concept in $entries//skos:Concept + let $title := $concept//normalize-space() + return + try { + element li { + attribute xml:id { $concept/substring-after(@rdf:about,'#')}, + element span { + $title + } + } + } catch * { + error((), "Error in file: "||document-uri(root($concept))||" in entry: "||serialize($concept)) + } + } + return + $ul ) default return () From 9718dceca58371c8f8e9f967fc3207627a133567 Mon Sep 17 00:00:00 2001 From: lauml Date: Tue, 27 Jul 2021 14:18:56 +0200 Subject: [PATCH 2/3] Update config.xqm --- modules/config.xqm | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/modules/config.xqm b/modules/config.xqm index 5664cd4..3c44759 100644 --- a/modules/config.xqm +++ b/modules/config.xqm @@ -17,7 +17,7 @@ declare namespace functx = "http://www.functx.com"; declare namespace dc="http://purl.org/dc/elements/1.1/"; declare namespace owl="http://www.w3.org/2002/07/owl#"; -(:Für das SKOS-Anbindung als Standard Register:) +(:Für das SKOS-Anbindung als projektspezifisches Register:) declare namespace skos="http://www.w3.org/2004/02/skos/core#"; declare namespace rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; @@ -100,13 +100,6 @@ declare variable $config:ediarum-indexes := [ "id": "comments", "label": "Anmerkungsregister", "active": "false" - }, - map { - "id": "concepts", - "label": "Konzepte", - "file": "Register/Thesaurus.xml", - "collection": "Register/Thesaurus", - "active": "true" }]; declare function functx:escape-for-regex($arg as xs:string?) as xs:string { @@ -687,26 +680,6 @@ declare function config:get-ediarum-index-with-params($project-name as xs:string } return $ul - ) - case "concepts" return ( - let $ul := - element ul { - for $concept in $entries//skos:Concept - let $title := $concept//normalize-space() - return - try { - element li { - attribute xml:id { $concept/substring-after(@rdf:about,'#')}, - element span { - $title - } - } - } catch * { - error((), "Error in file: "||document-uri(root($concept))||" in entry: "||serialize($concept)) - } - } - return - $ul ) default return () From 880d899f0761bc6a019e680940ce5c26eadab946 Mon Sep 17 00:00:00 2001 From: lauml Date: Tue, 27 Jul 2021 14:19:56 +0200 Subject: [PATCH 3/3] Update config.xqm add namespaces for skos api --- modules/config.xqm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/config.xqm b/modules/config.xqm index 3c44759..d46ae4a 100644 --- a/modules/config.xqm +++ b/modules/config.xqm @@ -17,7 +17,7 @@ declare namespace functx = "http://www.functx.com"; declare namespace dc="http://purl.org/dc/elements/1.1/"; declare namespace owl="http://www.w3.org/2002/07/owl#"; -(:Für das SKOS-Anbindung als projektspezifisches Register:) +(:Für SKOS-Anbindung als projektspezifisches Register:) declare namespace skos="http://www.w3.org/2004/02/skos/core#"; declare namespace rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";