Skip to content

Commit

Permalink
Merge pull request #326 from srophe/main
Browse files Browse the repository at this point in the history
Updates for minor bug fixes
  • Loading branch information
wsalesky authored May 27, 2024
2 parents b5e8add + 15e3ed5 commit 7363dd7
Show file tree
Hide file tree
Showing 8 changed files with 419 additions and 351 deletions.
272 changes: 213 additions & 59 deletions documentation/schema/Syriacamsdesc.odd

Large diffs are not rendered by default.

423 changes: 145 additions & 278 deletions documentation/schema/out/Syriacamsdesc.rng

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion expath-pkg.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://expath.org/ns/pkg" name="http://syriaca.org/britishLibrary" abbrev="britishLibrary" version="2.43" spec="1.0">
<package xmlns="http://expath.org/ns/pkg" name="http://syriaca.org/britishLibrary" abbrev="britishLibrary" version="2.44" spec="1.0">
<title>Syriac Manuscripts in the British Library</title>
<dependency package="http://exist-db.org/apps/shared"/>
</package>
6 changes: 5 additions & 1 deletion modules/app.xql
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import module namespace templates="http://exist-db.org/xquery/templates" ;
(: Import Srophe application modules. :)
import module namespace config="http://srophe.org/srophe/config" at "config.xqm";
import module namespace data="http://srophe.org/srophe/data" at "lib/data.xqm";
import module namespace facet="http://expath.org/ns/facet" at "lib/facet.xqm";
import module namespace sf="http://srophe.org/srophe/facets" at "lib/facets.xql";
import module namespace global="http://srophe.org/srophe/global" at "lib/global.xqm";
import module namespace maps="http://srophe.org/srophe/maps" at "lib/maps.xqm";
Expand Down Expand Up @@ -148,6 +147,7 @@ declare function app:h1($node as node(), $model as map(*)){
(:~
: Data formats and sharing
: to replace app-link
github-mark
:)
declare %templates:wrap function app:other-data-formats($node as node(), $model as map(*), $formats as xs:string?){
let $id := (:replace($model("hits")/descendant::tei:idno[contains(., $config:base-uri)][1],'/tei',''):)request:get-parameter('id', '')
Expand Down Expand Up @@ -185,6 +185,10 @@ return
(<a href="{concat(replace($id,$config:base-uri,$config:nav-base),'.tei')}" class="btn btn-default btn-xs" id="teiBtn" data-toggle="tooltip" title="Click to view the TEI XML data for this record." >
<span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span> TEI/XML
</a>, '&#160;')
else if($f = 'github') then
(<a href="{concat('https://github.com/srophe/britishLibrary-data/blob/main/data/tei/',tokenize($id,'/')[last()],'.xml')}" class="btn btn-default btn-xs" id="teiBtn" data-toggle="tooltip" title="Click to view the TEI XML data for this record." >
<img src="{$config:nav-base}/resources/images/github-mark.png" height="18px"/>
</a>, '&#160;')
else if($f = 'text') then
(<a href="{concat(replace($id,$config:base-uri,$config:nav-base),'.txt')}" class="btn btn-default btn-xs" id="teiBtn" data-toggle="tooltip" title="Click to view the plain text data for this record." >
<span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span> Text
Expand Down
2 changes: 1 addition & 1 deletion record.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude" data-template="templates:surround" data-template-with="templates/bl.html" data-template-at="content">
<div data-template="app:fix-links" class="record">
<div class="interior-content">
<div data-template="app:other-data-formats" data-template-formats="print,tei,rdf,text" class="otherFormats"/>
<div data-template="app:other-data-formats" data-template-formats="print,github,tei,rdf,text" class="otherFormats"/>
<div class="row">
<div class="col-md-12 col-lg-12">
<div data-template="app:display-nodes" data-template-paths="descendant-or-self::tei:TEI"/>
Expand Down
Binary file added resources/images/github-mark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 17 additions & 2 deletions resources/xsl/helper-functions.xsl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:t="http://www.tei-c.org/ns/1.0" xmlns:x="http://www.w3.org/1999/xhtml" xmlns:saxon="http://saxon.sf.net/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:local="http://syriaca.org/ns" exclude-result-prefixes="xs t x saxon local" version="2.0">
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml" xmlns:saxon="http://saxon.sf.net/" xmlns:local="http://syriaca.org/ns" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:t="http://www.tei-c.org/ns/1.0" xmlns:x="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs t x saxon local" version="2.0">

<!-- =================================================================== -->
<!-- Helper Functions -->
Expand Down Expand Up @@ -288,6 +287,22 @@
<xsl:param name="lang" as="xs:string"/>
<xsl:param name="type" as="xs:string"/>
<xsl:choose>
<!-- BL values from https://github.com/srophe/britishLibrary/issues/310 -->
<xsl:when test="$lang='ar'">Unspecified Arabic script</xsl:when>
<xsl:when test="$lang='ar-Syrc'">Arabic Garshuni script</xsl:when>
<xsl:when test="$lang='cop'">Unspecified Coptic script</xsl:when>
<xsl:when test="$lang='fr'">Unspecified French script</xsl:when>
<xsl:when test="$lang='grc'">Unspecified Greek script</xsl:when>
<xsl:when test="$lang='he'">Unspecified Hebrew script</xsl:when>
<xsl:when test="$lang='hy'">Unspecified Armenian script</xsl:when>
<xsl:when test="$lang='la'">Unspecified Latin script</xsl:when>
<xsl:when test="$lang='syr'">Unspecified Syriac script</xsl:when>
<xsl:when test="$lang='syr-Syre'">Estrangela script</xsl:when>
<xsl:when test="$lang='syr-Syrj'">West Syriac script</xsl:when>
<xsl:when test="$lang='syr-Syrn'">East Syriac script</xsl:when>
<xsl:when test="$lang='syr-x-syrm'">Melkite Syriac script</xsl:when>
<xsl:when test="$lang='qhy-x-cpas'">Christian Palestinian Aramaic script</xsl:when>
<xsl:when test="$lang='mixed'">Mixed scripts</xsl:when>
<xsl:when test="$lang='la'">
<xsl:text>Latin</xsl:text>
</xsl:when>
Expand Down
46 changes: 37 additions & 9 deletions resources/xsl/manuscripts.xsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:s="http://syriaca.org" xmlns:t="http://www.tei-c.org/ns/1.0" xmlns:x="http://www.w3.org/1999/xhtml" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:saxon="http://saxon.sf.net/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:local="http://syriaca.org/ns" exclude-result-prefixes="xs t s saxon" version="2.0">
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml" xmlns:saxon="http://saxon.sf.net/" xmlns:local="http://syriaca.org/ns" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:s="http://syriaca.org" xmlns:t="http://www.tei-c.org/ns/1.0" xmlns:x="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs t s saxon" version="2.0">

<!-- ==================================================================
Copyright 2013 New York University
Expand Down Expand Up @@ -99,17 +99,37 @@
<xsl:if test="count(//t:msDesc/t:msPart) &gt; 1 and self::t:msPart">
<div>URI: <xsl:apply-templates select="t:msIdentifier/t:idno[@type='URI']"/></div>
</xsl:if>
<xsl:if test="t:msIdentifier/t:altIdentifier/t:idno[@type='Wright-BL-Roman']">
<xsl:if test="t:msIdentifier/t:altIdentifier/t:idno[@type='Wright-BL-Roman']">
<div>
<xsl:choose>
<xsl:when test="t:additional/t:listBibl/t:bibl/t:ref[@target != '']">
<a href="{string(t:additional/t:listBibl/t:bibl/t:ref/@target)}" target="_blank">
Description based on Wright <xsl:apply-templates select="t:msIdentifier/t:altIdentifier/t:idno[@type='Wright-BL-Roman']"/> (<xsl:apply-templates select="t:additional/t:listBibl/t:bibl/t:citedRange[@unit='pp']"/>)
Description based on Wright
<xsl:choose>
<xsl:when test="t:additional/t:listBibl/t:bibl/tei:citedRange/@unit='entry'">
<a href="#" data-toggle="tooltip" title="This entry number is from Wright's printed catalogue. Due to renumbering, Wright's entry numbers do not match the numbering used in this digital catalogue.">
<xsl:apply-templates select="t:msIdentifier/t:altIdentifier/t:idno[@type='Wright-BL-Roman']"/>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="t:msIdentifier/t:altIdentifier/t:idno[@type='Wright-BL-Roman']"/>
</xsl:otherwise>
</xsl:choose>
(<xsl:apply-templates select="t:additional/t:listBibl/t:bibl/t:citedRange[@unit='pp']"/>)
<a href="{string(t:additional/t:listBibl/t:bibl/t:ref/@target)}" target="_blank">
<img src="$nav-base/resources/images/ialogo.jpg" alt="Link to Archive.org Bibliographic record" height="18px"/>
</a>
</xsl:when>
<xsl:otherwise>
Description based on Wright <xsl:apply-templates select="t:msIdentifier/t:altIdentifier/t:idno[@type='Wright-BL-Roman']"/> (<xsl:apply-templates select="t:additional/t:listBibl/t:bibl/t:citedRange[@unit='pp']"/>)
Description based on Wright <xsl:choose>
<xsl:when test="t:additional/t:listBibl/t:bibl/tei:citedRange/@unit='entry'">
<a href="#" data-toggle="tooltip" title="This entry number is from Wright's printed catalogue. Due to renumbering, Wright's entry numbers do not match the numbering used in this digital catalogue.">
<xsl:apply-templates select="t:msIdentifier/t:altIdentifier/t:idno[@type='Wright-BL-Roman']"/>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="t:msIdentifier/t:altIdentifier/t:idno[@type='Wright-BL-Roman']"/>
</xsl:otherwise>
</xsl:choose> (<xsl:apply-templates select="t:additional/t:listBibl/t:bibl/t:citedRange[@unit='pp']"/>)
</xsl:otherwise>
</xsl:choose>
</div>
Expand Down Expand Up @@ -418,7 +438,7 @@
</xsl:template>
<xsl:template match="t:decoNote">
<div name="{string(@xml:id)}">
<span class="msItem"><span class="inline-h4">Decoration<xsl:if test="@type"> (<xsl:value-of select="concat(upper-case(substring(@type,1,1)),substring(@type,2))"/> )</xsl:if><xsl:if test="@medium"> [Medium: <xsl:value-of select="@medium"/>]</xsl:if>:</span> <xsl:apply-templates mode="plain"/></span>
<span class="msItem"><span class="inline-h4">Decoration<xsl:if test="@type"> (<xsl:value-of select="concat(upper-case(substring(@type,1,1)),substring(@type,2))"/>)</xsl:if><xsl:if test="@medium"> [Medium: <xsl:value-of select="@medium"/>]</xsl:if>:</span> <xsl:apply-templates mode="plain"/></span>
</div>
</xsl:template>
<xsl:template match="t:msItem">
Expand Down Expand Up @@ -537,14 +557,22 @@
<xsl:template name="script">
<xsl:param name="node"/>
<xsl:choose>
<!-- BL values from https://github.com/srophe/britishLibrary/issues/310 -->
<xsl:when test="$node/@script = 'ar'">Unspecified Arabic script</xsl:when>
<xsl:when test="$node/@script = 'ar-Syrc'">Arabic Garshuni script</xsl:when>
<xsl:when test="$node/@script = 'cop'">Unspecified Coptic script</xsl:when>
<xsl:when test="$node/@script = 'fr'">Unspecified French script</xsl:when>
<xsl:when test="$node/@script = 'grc'">Unspecified Greek script</xsl:when>
<xsl:when test="$node/@script = 'he'">Unspecified Hebrew script</xsl:when>
<xsl:when test="$node/@script = 'hy'">Unspecified Armenian script</xsl:when>
<xsl:when test="$node/@script = 'la'">Unspecified Latin script</xsl:when>
<xsl:when test="$node/@script = 'syr'">Unspecified Syriac script</xsl:when>
<xsl:when test="$node/@script = 'syr-Syre'">Estrangela script</xsl:when>
<xsl:when test="$node/@script = 'syr-Syrj'">West Syriac script</xsl:when>
<xsl:when test="$node/@script = 'syr-Syrn'">East Syriac script</xsl:when>
<xsl:when test="$node/@script = 'syr-x-syrm'">Melkite Syriac script</xsl:when>
<xsl:when test="$node/@script = 'grc'">Greek</xsl:when>
<xsl:when test="$node/@script = 'ar-Syrc'">Arabic Garshuni script</xsl:when>
<xsl:when test="$node/@script = 'ar'">Unspecified Arabic script</xsl:when>
<xsl:when test="$node/@script = 'qhy-x-cpas'">Christian Palestinian Aramaic script</xsl:when>
<xsl:when test="$node/@script = 'mixed'">Mixed scripts</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template match="t:title">
Expand Down

0 comments on commit 7363dd7

Please sign in to comment.