From 9ebc274638c55cfac10fe0d6ff0e0568055a9cab Mon Sep 17 00:00:00 2001 From: mrodzis Date: Fri, 1 Nov 2019 09:44:11 +0100 Subject: [PATCH 1/3] Implement first draft for indicating Fontane's works (cf. #121) --- modules/fontane/index-processor.xqm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/fontane/index-processor.xqm b/modules/fontane/index-processor.xqm index e4901c43..968d7879 100644 --- a/modules/fontane/index-processor.xqm +++ b/modules/fontane/index-processor.xqm @@ -1396,7 +1396,11 @@ else ixp:entry-link($id), element xhtml:span { attribute class { "label-main" }, - $labelMain/text() + $labelMain/text(), + if($work/ancestor::tei:list[@type = "Fontane"]) then + " (Werk Fontanes)" + else + () }, element xhtml:ul { (: variant :) -- GitLab From e4637c47b2f320c71d9628410eccdfed3ec539d4 Mon Sep 17 00:00:00 2001 From: Michelle Weidling Date: Tue, 5 Nov 2019 12:32:34 +0100 Subject: [PATCH 2/3] Finalize draft --- modules/fontane/index-processor.xqm | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/modules/fontane/index-processor.xqm b/modules/fontane/index-processor.xqm index 968d7879..ba235cb3 100644 --- a/modules/fontane/index-processor.xqm +++ b/modules/fontane/index-processor.xqm @@ -1384,7 +1384,18 @@ else let $date := $work/tei:date let $note := $work/tei:note let $bibl := $work/tei:bibl - let $creator := $work/tei:linkGrp/tei:link[@corresp="http://purl.org/dc/terms/creator"] + let $creator := + if($work/ancestor::tei:list[@type = "Fontane"]) then + (: at this point we fake a tei:link to deal with the implicit creator + relation in case of Theodor Fontane's works. This is necessary to + achieve a reference to Fontane's index entry when having a look at + one of his works on register.html. :) + element tei:link { + attribute corresp {"http://purl.org/dc/terms/creator"}, + attribute target {"#" || $work/@xml:id/string() || " psn:Fontane_Theodor"} + } + else + $work/tei:linkGrp/tei:link[@corresp="http://purl.org/dc/terms/creator"] let $translationOf := $work/tei:linkGrp/tei:link[@corresp="http://purl.org/ontology/bibo/#translationOf"] let $formerCurrentLocation := $work/tei:linkGrp/tei:link[@corresp="http://erlangen-crm.org/current/P53_has_former_or_current_location"] let $links := $work/tei:linkGrp/tei:link[@corresp="https://schema.org/mentions"] @@ -1396,11 +1407,7 @@ else ixp:entry-link($id), element xhtml:span { attribute class { "label-main" }, - $labelMain/text(), - if($work/ancestor::tei:list[@type = "Fontane"]) then - " (Werk Fontanes)" - else - () + $labelMain/text() }, element xhtml:ul { (: variant :) -- GitLab From 8c4bdae054ed7cc31fbdb469c74e147ea15299a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20G=C3=B6bel?= Date: Wed, 6 Nov 2019 09:17:00 +0100 Subject: [PATCH 3/3] add support for multiple creator links --- modules/fontane/index-processor.xqm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/fontane/index-processor.xqm b/modules/fontane/index-processor.xqm index ba235cb3..21a65a67 100644 --- a/modules/fontane/index-processor.xqm +++ b/modules/fontane/index-processor.xqm @@ -14,7 +14,6 @@ import module namespace config="http://textgrid.de/ns/SADE/config" at "../config import module namespace f-misc="http://fontane-nb.dariah.eu/ns/SADE/misc" at "misc.xqm"; import module namespace functx="http://www.functx.com"; - declare namespace foaf="http://xmlns.com/foaf/0.1/"; declare namespace gndo="http://d-nb.info/standards/elementset/gnd#"; declare namespace ore="http://www.openarchives.org/ore/terms/"; @@ -1385,6 +1384,7 @@ else let $note := $work/tei:note let $bibl := $work/tei:bibl let $creator := + ( $work/tei:linkGrp/tei:link[@corresp="http://purl.org/dc/terms/creator"], if($work/ancestor::tei:list[@type = "Fontane"]) then (: at this point we fake a tei:link to deal with the implicit creator relation in case of Theodor Fontane's works. This is necessary to @@ -1394,8 +1394,7 @@ else attribute corresp {"http://purl.org/dc/terms/creator"}, attribute target {"#" || $work/@xml:id/string() || " psn:Fontane_Theodor"} } - else - $work/tei:linkGrp/tei:link[@corresp="http://purl.org/dc/terms/creator"] + else () ) let $translationOf := $work/tei:linkGrp/tei:link[@corresp="http://purl.org/ontology/bibo/#translationOf"] let $formerCurrentLocation := $work/tei:linkGrp/tei:link[@corresp="http://erlangen-crm.org/current/P53_has_former_or_current_location"] let $links := $work/tei:linkGrp/tei:link[@corresp="https://schema.org/mentions"] -- GitLab