Skip to content

Commit

Permalink
Moved display parameters for IIIF to the parameter stylesheet
Browse files Browse the repository at this point in the history
  • Loading branch information
tillgrallert committed Sep 10, 2020
1 parent 8da1203 commit 6169f9c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 2 additions & 0 deletions boilerplate/xslt/teibp_parameters.xsl
Expand Up @@ -31,6 +31,8 @@
<xsl:param name="p_display-line-breaks" select="false()"/>
<!-- select whether you want to display editorial changes; default: false() -->
<xsl:param name="p_display-editorial-changes" select="false()"/>
<!-- select image quality for facsimiles served through IIIF. To balance readability with bandwidth, images are currently set to a width of 800px and grayscale -->
<xsl:param name="p_iiif-settings-display" select="'/full/800,/0/gray.jpg'"/>
<!-- select whether you want to process XInclude; default: true() -->
<xsl:param name="p_process-xinclude" select="true()"/>
<!-- select whether you want to use inline CSS for the display; default: true() -->
Expand Down
11 changes: 5 additions & 6 deletions boilerplate/xslt/teibp_pb.xsl
Expand Up @@ -10,9 +10,8 @@
<!-- construct the image URL on the fly -->
<xsl:variable name="v_volume" select="$vgBiblStructSource/tei:monogr/tei:biblScope[@unit = 'volume']/@n"/>
<xsl:variable name="v_issue" select="$vgBiblStructSource/tei:monogr/tei:biblScope[@unit = 'issue']/@n"/>
<!-- IIIF URLs -->
<!-- IIIF URLs: establish the pattern to check for -->
<xsl:variable name="v_iiif-settings-max" select="'/full/2000,/0/default.jpg'"/>
<xsl:variable name="v_iiif-settings-display" select="'/full/800,/0/gray.jpg'"/>

<!-- could also select pb[@facs] -->
<xsl:template match="tei:pb[@ed = 'print']">
Expand Down Expand Up @@ -51,10 +50,10 @@
<!-- sequence of providers and protocolls is currently hardcoded and can be changed to taste -->
<!-- iiif -->
<xsl:when test="$v_graphic[contains(@url, $v_iiif-settings-max)]">
<xsl:value-of select="concat(substring-before($v_graphic[contains(@url, $v_iiif-settings-max)][1]/@url, $v_iiif-settings-max), $v_iiif-settings-display)"/>
<xsl:value-of select="concat(substring-before($v_graphic[contains(@url, $v_iiif-settings-max)][1]/@url, $v_iiif-settings-max), $p_iiif-settings-display)"/>
</xsl:when>
<xsl:when test="$v_graphic[@type='iiif']">
<xsl:value-of select="concat($v_graphic[@type='iiif'][1]/@url, $v_iiif-settings-display)"/>
<xsl:value-of select="concat($v_graphic[@type='iiif'][1]/@url, $p_iiif-settings-display)"/>
</xsl:when>
<xsl:when test="$v_graphic[starts-with(@url, 'https://eap.')]">
<xsl:value-of select="$v_graphic[starts-with(@url, 'https://eap.')][1]/@url"/>
Expand Down Expand Up @@ -130,10 +129,10 @@
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="contains(@url, $v_iiif-settings-max)">
<xsl:value-of select="concat(substring-before(@url, $v_iiif-settings-max), $v_iiif-settings-display)"/>
<xsl:value-of select="concat(substring-before(@url, $v_iiif-settings-max), $p_iiif-settings-display)"/>
</xsl:when>
<xsl:when test="@type='iiif'">
<xsl:value-of select="concat(@url, $v_iiif-settings-display)"/>
<xsl:value-of select="concat(@url, $p_iiif-settings-display)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@url"/>
Expand Down

0 comments on commit 6169f9c

Please sign in to comment.