1 <?xml version="1.0" encoding="UTF-8" ?>
3 <!ENTITY raquo "»">
6 <xsl:transform version="1.0"
7 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
8 xmlns:exsl="http://exslt.org/common"
9 extension-element-prefixes="exsl">
11 <xsl:template name="linkTagsImagePage">
12 <link rel="first" href="{../image[position()=1]/full/@fileName}.html"></link>
13 <link rel="last" href="{../image[position()=last()]/full/@fileName}.html"></link>
14 <xsl:if test="position() > 1">
15 <link rel="prev" href="{preceding-sibling::image[position()=1]/full/@fileName}.html"></link>
17 <xsl:if test="position() < last()">
18 <link rel="next" href="{following-sibling::image[position()=1]/full/@fileName}.html"></link>
21 <xsl:when test="count(/collections/collection) > 1">
22 <link rel="up" href="../{../fileName}.html"></link>
23 <link rel="top" href="../index.html"></link>
26 <link rel="up" href="../index.html"></link>
31 <xsl:template name="linkTagsCollectionPage">
32 <xsl:if test="count(/collections/collection) > 1">
33 <link rel="up" href="index.html"></link>
37 <xsl:template name="style">
38 <style type='text/css'>
40 color: <xsl:value-of select="$fgColor"/>;
41 background: <xsl:value-of select="$bgColor"/>;
42 font-family: /*param*/Helvetica, sans-serif;
43 font-size: <xsl:value-of select="$fontSize"/>pt;
48 color: <xsl:value-of select="$fgColor"/>;
58 color: <xsl:value-of select="$fgColor"/>;
63 border: <xsl:value-of select="$imgBorderSize"/>px solid <xsl:value-of select="$imgBorderColor"/>;
67 color: <xsl:value-of select="$linkColor"/>;
71 color: <xsl:value-of select="$visitedLinkColor"/>;
76 <xsl:template name="imagePage">
77 <xsl:param name="index" select="1"/>
80 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
81 <title><xsl:value-of select="title"/></title>
82 <xsl:call-template name="style"/>
83 <xsl:call-template name="linkTagsImagePage"/>
87 <xsl:if test="$index > 1">
88 <xsl:for-each select="../image[$index - 1]">
89 <a href="{full/@fileName}.html">
90 <img class="photo" src="{thumbnail/@fileName}" alt="{$i18nPrevious}" title="{$i18nPrevious}" height="{thumbnail/@width}" width="{thumbnail/@height}"/>
97 <xsl:when test="count(/collections/collection) > 1">
98 <a href="../{../fileName}.html"><img src="../classic/up.png" border="0" title="{../description}" alt="{../description}"/></a>
99 | <a href="../index.html"><img src="../classic/gohome.png" border="0" alt="{$i18nCollectionList}" title="{$i18nCollectionList}"/></a>
102 <a href="../index.html"><img src="../classic/up.png" border="0" title="{$i18nCollectionList}" alt="{$i18nCollectionList}"/></a>
106 <xsl:if test="$index < count(../image)">
108 <xsl:for-each select="../image[$index + 1]">
109 <a href="{full/@fileName}.html">
110 <img class="photo" src="{thumbnail/@fileName}" alt="{$i18nNext}" title="{$i18nNext}" height="{thumbnail/@width}" width="{thumbnail/@height}"/>
118 <img class="photo" src="{full/@fileName}" width="{full/@width}" height="{full/@height}" alt="{description}" title="{description}"/>
119 <xsl:if test="original/@fileName != ''">
121 <a href="{original/@fileName}"><xsl:value-of select="$i18nOriginalImage"/></a>
122 (<xsl:value-of select="original/@width"/>x<xsl:value-of select="original/@height"/>)
125 <!-- FIXME title="description, imageSize, fileSize" -->
130 <!-- FIXME footer -->
136 <xsl:template name="collectionPage">
139 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
140 <title><xsl:value-of select="name"/></title>
141 <xsl:call-template name="style"/>
142 <xsl:call-template name="linkTagsCollectionPage"/>
145 <xsl:if test="count(/collections/collection) > 1">
146 <a href="index.html"><img src="classic/gohome.png" border="0" alt="{$i18nCollectionList}" title="{$i18nCollectionList}"/></a>
148 <h1>"<xsl:value-of select="name"/>"</h1>
149 <!-- FIXME: Album info -->
152 <xsl:call-template name="thumbnailTable"/>
156 <!-- FIXME: Footer -->
162 <!-- Called only once per table, use recursion to generate every row -->
163 <xsl:template name="thumbnailTable">
164 <xsl:param name="index" select="1"/>
166 <xsl:if test="$index < count(image)+1">
168 <xsl:call-template name="thumbnailTableCell">
169 <xsl:with-param name="index" select="$index"/>
170 <xsl:with-param name="counter" select="$index + $thumbnailPerRow - 1"/>
174 <xsl:call-template name="thumbnailTable">
175 <xsl:with-param name="index" select="$index + $thumbnailPerRow"/>
181 <!-- Called for every cell, use recursion to generate every cell -->
182 <xsl:template name="thumbnailTableCell">
183 <xsl:param name="index" select="1"/>
184 <xsl:param name="counter" select="1"/>
186 <xsl:if test="$index < count(image) + 1">
188 <xsl:variable name="folder" select='fileName'/>
189 <xsl:for-each select="image[$index]">
190 <a href='{$folder}/{full/@fileName}.html'>
191 <img class="photo" src="{$folder}/{thumbnail/@fileName}" width="{thumbnail/@width}" height="{thumbnail/@height}" />
192 <div><xsl:value-of select="title"/></div>
193 <!--FIXME image size and file size -->
196 <exsl:document href='{$folder}/{full/@fileName}.html'>
197 <xsl:call-template name="imagePage">
198 <xsl:with-param name="index" select="$index"/>
204 <xsl:if test="$counter > $index">
205 <xsl:call-template name="thumbnailTableCell">
206 <xsl:with-param name="index" select="$index + 1"/>
207 <xsl:with-param name="counter" select="$counter"/>
214 <xsl:template name="collectionListPage">
217 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
218 <title><xsl:value-of select="$i18nCollectionList"/></title>
219 <xsl:call-template name="style"/>
222 <h1><xsl:value-of select="$i18nCollectionList"/></h1>
226 <xsl:for-each select="collections/collection">
227 <xsl:variable name="title" select='concat(name, " [", count(image), "]")'/>
228 <a href="{fileName}.html">
229 <!-- Use first image as collection image -->
231 src="{fileName}/{image[1]/thumbnail/@fileName}"
232 width="{image[1]/thumbnail/@width}"
233 height="{image[1]/thumbnail/@height}"
237 <a href="{fileName}.html"><xsl:value-of select="$title"/></a>
239 <exsl:document href="{fileName}.html">
240 <xsl:call-template name="collectionPage"/>
246 <!-- FIXME: Footer -->
252 <xsl:template match="/">
254 <xsl:when test="count(collections/collection) > 1">
255 <xsl:call-template name="collectionListPage"/>
258 <xsl:for-each select="collections/collection">
259 <xsl:call-template name="collectionPage"/>