diff --git a/expath-pkg.xml b/expath-pkg.xml index 5fad03b..cd41994 100644 --- a/expath-pkg.xml +++ b/expath-pkg.xml @@ -1,5 +1,5 @@ - + Syriac Manuscripts in the British Library diff --git a/modules/app.xql b/modules/app.xql index 8768017..239c7ae 100644 --- a/modules/app.xql +++ b/modules/app.xql @@ -182,7 +182,7 @@ return , ' ') else if($f = 'email') then - ( + ( Corrections , ' ') else if($f = 'ghIssue') then diff --git a/modules/lib/data.xqm b/modules/lib/data.xqm index 00d22fe..4e856cd 100644 --- a/modules/lib/data.xqm +++ b/modules/lib/data.xqm @@ -291,6 +291,7 @@ declare function data:create-query($collection as xs:string?) as xs:string?{ data:element-search('idno',request:get-parameter('idno', '')), data:relation-search(), data:orginPlaceSearch(), + data:bl-shelfmark(), data:ref() ) (: @@ -679,22 +680,22 @@ let $limits := string-join( ( if(request:get-parameter('syrOtherLimit', '') = 'true') then - concat("ft:query(descendant::tei:quote[@xml:lang='syr'],'",($cleanString),"',data:search-options()) or ft:query(descendant::tei:foreign[@xml:lang='syr'],'",($cleanString),"',data:search-options())") + concat("[ft:query(descendant::tei:quote[@xml:lang='syr'],'",($cleanString),"',data:search-options()) or ft:query(descendant::tei:foreign[@xml:lang='syr'],'",($cleanString),"',data:search-options())]") else(), if(request:get-parameter('syrColophonsLimit', '') = 'true') then - concat("ft:query(descendant::tei:additions/descendant::tei:item[tei:label = 'Colophon'],'",($cleanString),"',data:search-options())") + concat("[ft:query(descendant::tei:additions/descendant::tei:item[tei:label = 'Colophon'],'",($cleanString),"',data:search-options())]") else(), if(request:get-parameter('syrExplicitsLimit', '') = 'true') then - concat("ft:query(descendant::tei:explicit,'",($cleanString),"',data:search-options())") + concat("[ft:query(descendant::tei:explicit,'",($cleanString),"',data:search-options())]") else(), if(request:get-parameter('syrIncipitsLimit', '') = 'true') then - concat("ft:query(descendant::tei:incipit,'",($cleanString),"',data:search-options())") + concat("[ft:query(descendant::tei:incipit,'",($cleanString),"',data:search-options())]") else(), if(request:get-parameter('syrFinalRubricsLimit', '') = 'true') then - concat("ft:query(descendant::tei:finalRubric,'",($cleanString),"',data:search-options())") + concat("[ft:query(descendant::tei:finalRubric,'",($cleanString),"',data:search-options())]") else(), if(request:get-parameter('syrRubricsLimit', '') = 'true') then - concat("ft:query(descendant::tei:title[@xml:lang='syr'],'",($cleanString),"',data:search-options()) or ft:query(descendant::tei:rubric,'",($cleanString),"',data:search-options())") + concat("[ft:query(descendant::tei:title[@xml:lang='syr'],'",($cleanString),"',data:search-options()) or ft:query(descendant::tei:rubric,'",($cleanString),"',data:search-options())]") else() ),' or ') return @@ -702,3 +703,12 @@ return concat("[",$limits,"]") else () }; + +declare function data:bl-shelfmark(){ +let $shelfmark := request:get-parameter('shelfmark', '') +let $cleanString := data:clean-string($shelfmark[1]) +return + if($cleanString != '') then + concat("[descendant::tei:idno[@type='BL-Shelfmark' or @type='BL-Shelfmark-simplified'][ft:query(.,'",($cleanString),"',data:search-options())]]") + else () +}; \ No newline at end of file diff --git a/modules/search/search.xqm b/modules/search/search.xqm index 883027c..ea74dd5 100644 --- a/modules/search/search.xqm +++ b/modules/search/search.xqm @@ -381,6 +381,17 @@ declare function search:bl-search-form($node as node(), $model as map(*)) { +
+ +
+
+ + {if(request:get-parameter('shelfmark', '') != '') then + attribute value {request:get-parameter('shelfmark', '')} + else()} +
+
+