From af728813d39021644af62ee3c4bcf618fd2a6350 Mon Sep 17 00:00:00 2001 From: Clinton Graham Date: Fri, 10 Sep 2021 15:33:46 -0400 Subject: [PATCH] discoverygarden#68: Update README, avoid calling PHP from the XSL transform when not needed --- README.md | 8 ++++++++ theme/theme.inc | 2 ++ transforms/ead_to_html.xslt | 29 ++++++++++++++++++++++------- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 1917c91..97758ce 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,14 @@ In `charlie`, we have three logical containers: Do note that the code tries not to make any assumptions about the numbering of boxes or folders. Folders could either be numbered sequentially across boxes (in which case specifying a range of folders could make sense when specifying a range of boxes) or specific to a box. Additionally, pluralization of types is largely ignored. +### Q. How are links generated from the Finding Aid to digitized objects? + +A. Links will be generated from the EAD rendering to digitized objects in one or more of two ways: + +1) If the child objects have Solr metadata which points to the EAD object, box identifier, folder identifier, and component id, search queries will be formulated from the Finding Aid to the matching digital objects. This is configured in the settings form, under the heading "Link Objects by Query". + +2) If the DAOs in the EAD have links in the xlink namespace which point to paths identifying the digital objects, these URIs can be embedded (with an optional prefix) within the Finding Aid display. Examples could be where the DAO's href might point to a link resolver, a DOI, relative or absolute URI, or a Fedora PID. This is configured in the settings form, under the heading "Link Objects by DAO xlink". + ## Maintainers/Sponsors Current maintainers: diff --git a/theme/theme.inc b/theme/theme.inc index 856fd08..8a27fe1 100644 --- a/theme/theme.inc +++ b/theme/theme.inc @@ -96,6 +96,8 @@ function template_preprocess_islandora_manuscript_ead_display(&$variables) { $variables['xslt_parameters'][''] = (isset($variables['xslt_parameters']['']) ? $variables['xslt_parameters'][''] : array()) + array( "container_string" => t('Containers'), ); + $variables['xslt_parameters']['']['call_query_link'] = variable_get('islandora_manuscript_query_enable', true) ? 'true' : 'false'; + $variables['xslt_parameters']['']['call_direct_link'] = variable_get('islandora_manuscript_direct_enable', false) ? 'true' : false; $variables['doc'] = $doc = new DOMDocument(); $doc->loadXML($variables['object']['EAD']->content); diff --git a/transforms/ead_to_html.xslt b/transforms/ead_to_html.xslt index 1e2de94..6c59aa6 100644 --- a/transforms/ead_to_html.xslt +++ b/transforms/ead_to_html.xslt @@ -9,6 +9,9 @@ > Containers + + +