|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
2 | 2 | <!-- $Id$ -->
|
3 |
| -<xsl:stylesheet exclude-result-prefixes="t" |
4 |
| - xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
5 |
| - xmlns:t="http://www.tei-c.org/ns/1.0" |
6 |
| - version="2.0"> |
| 3 | +<xsl:stylesheet exclude-result-prefixes="t" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| 4 | + xmlns:t="http://www.tei-c.org/ns/1.0" version="2.0"> |
7 | 5 |
|
8 | 6 | <xsl:template match="t:facsimile">
|
9 |
| - <!-- Being concerned only with the images, ignore everything else. --> |
10 |
| - <div id="facsimile-images"> |
11 |
| - <h2>Facsimile Images</h2> |
12 |
| - |
13 |
| - <xsl:apply-templates select=".//t:graphic" /> |
14 |
| - </div> |
| 7 | + <xsl:param name="parm-edn-structure" tunnel="yes" required="no"/> |
| 8 | + <xsl:choose> |
| 9 | + <xsl:when test="$parm-edn-structure = 'medcyprus'"/> |
| 10 | + <xsl:otherwise> |
| 11 | + <!-- Being concerned only with the images, ignore everything else. --> |
| 12 | + <div id="facsimile-images"> |
| 13 | + <h2>Facsimile Images</h2> |
| 14 | + <xsl:apply-templates select=".//t:graphic"/> |
| 15 | + </div> |
| 16 | + </xsl:otherwise> |
| 17 | + </xsl:choose> |
15 | 18 | </xsl:template>
|
16 | 19 |
|
17 | 20 | <!-- Display a local image with thumbnail. -->
|
18 | 21 | <xsl:template match="t:graphic">
|
19 |
| - <xsl:param name="parm-image-loc" select="''" tunnel="yes" /> |
| 22 | + <xsl:param name="parm-image-loc" select="''" tunnel="yes"/> |
20 | 23 | <!-- Create a link to the full image and display a thumbnail
|
21 | 24 | image.
|
22 | 25 |
|
23 | 26 | The thumbnail image URL is constructed from the original URL
|
24 | 27 | via prefixing the final "." with "-thumb". This may lead to
|
25 | 28 | ugly URLs if the original URL does not include an extension
|
26 | 29 | suffix but does have a "." in it. -->
|
27 |
| - <xsl:variable name="url-parts" select="tokenize(@url, '\.')" /> |
28 |
| - <xsl:variable name="count-url-parts" select="count($url-parts)-1" /> |
| 30 | + <xsl:variable name="url-parts" select="tokenize(@url, '\.')"/> |
| 31 | + <xsl:variable name="count-url-parts" select="count($url-parts) - 1"/> |
29 | 32 | <a href="{concat($parm-image-loc, @url)}">
|
30 | 33 | <img title="{t:desc}">
|
31 | 34 | <xsl:attribute name="src">
|
32 |
| - <xsl:value-of select="$parm-image-loc" /> |
33 |
| - <xsl:value-of select="string-join(subsequence($url-parts, 1, $count-url-parts), '.')" /> |
| 35 | + <xsl:value-of select="$parm-image-loc"/> |
| 36 | + <xsl:value-of select="string-join(subsequence($url-parts, 1, $count-url-parts), '.')"/> |
34 | 37 | <xsl:text>-thumb.</xsl:text>
|
35 |
| - <xsl:value-of select="subsequence($url-parts, $count-url-parts)[last()]" /> |
| 38 | + <xsl:value-of select="subsequence($url-parts, $count-url-parts)[last()]"/> |
36 | 39 | </xsl:attribute>
|
37 | 40 | </img>
|
38 | 41 | </a>
|
39 | 42 | </xsl:template>
|
40 | 43 |
|
41 | 44 | <!-- Display an image. -->
|
42 | 45 | <xsl:template match="t:graphic[contains(@url, '://')]">
|
43 |
| - <img src="{@url}" title="{t:desc}" /> |
| 46 | + <img src="{@url}" title="{t:desc}"/> |
44 | 47 | </xsl:template>
|
45 | 48 |
|
46 | 49 | </xsl:stylesheet>
|
0 commit comments