Skip to content

Commit

Permalink
corrected code for selection of local facsimiles
Browse files Browse the repository at this point in the history
This had been done on the basis of the position of the tei:graphic
child of tei:surface and not its @url attribute
  • Loading branch information
tillgrallert committed Jan 9, 2017
1 parent cc2a60c commit ff0986a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions xslt-boilerplate/teibp_pb.xsl
Expand Up @@ -10,9 +10,6 @@

<!-- could also select pb[@facs] -->
<xsl:template match="tei:pb[@ed = 'print']">
<!--<xsl:param name="pn">
<xsl:number count="//tei:pb" level="any"/>
</xsl:param>-->
<xsl:choose>
<xsl:when test="$p_display-page-breaks = true()">
<!-- add @lang="en" to ensure correct ltr rendering -->
Expand All @@ -29,7 +26,6 @@
</xsl:template>
<xsl:template name="t_handler-pb">
<xsl:param name="p_pb"/>
<!-- <xsl:variable name="v_n" select="@n"/>-->
<xsl:variable name="v_facs" select="$p_pb/@facs"/>
<xsl:variable name="v_id">
<xsl:choose>
Expand Down Expand Up @@ -62,6 +58,9 @@
<xsl:when test="$v_graphic[starts-with(@url, 'http://babel.hathitrust.org')]">
<xsl:value-of select="$v_graphic[starts-with(@url, 'http://babel.hathitrust.org')][1]/@url"/>
</xsl:when>
<xsl:when test="$v_graphic[starts-with(@url, 'https')]">
<xsl:value-of select="$v_graphic[starts-with(@url, 'https')][1]/@url"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$v_graphic[starts-with(@url, 'http')][1]/@url"/>
</xsl:otherwise>
Expand All @@ -73,8 +72,9 @@
<xsl:when test="starts-with($v_facs, '#')">
<!-- Preference: -->
<xsl:choose>
<!-- display of local facsimiles -->
<xsl:when test="$p_display-online-facsimiles = false()">
<xsl:value-of select="$v_graphic[@mimeType = $v_mimetype][1]/@url"/>
<xsl:value-of select="$v_graphic[not(starts-with(@url,'http'))][@mimeType = $v_mimetype][1]/@url"/>
</xsl:when>
<!-- select the online copy as default -->
<xsl:otherwise>
Expand Down

0 comments on commit ff0986a

Please sign in to comment.