Warning, /graphics/digikam/core/dplugins/generic/tools/htmlgallery/themes/simplerounded/template.xsl is written in an unsupported language. File is not indexed.

0001 <?xml version="1.0" encoding="UTF-8" ?>
0002 
0003 <!--
0004  * ============================================================
0005  *
0006  * This file is a part of digiKam project
0007  * https://www.digikam.org
0008  *
0009  * Date        : 2009-02-01
0010  * Description : A rounded corner theme for the digiKam html gallery tool.
0011  *
0012  * SPDX-FileCopyrightText: 2009 by Franz Dietrich <enaut dot w at googlemail dot com>
0013  *
0014  * SPDX-License-Identifier: GPL-2.0-or-later
0015  *
0016  * ============================================================
0017  -->
0018 
0019 <!-- Documentatione of the parameters:
0020 
0021 titlebar - The String that will appear in the titlebar.
0022 thumbnailsPerPage - The maximum number of thumbnails per page.
0023 homepage - The name of the Homepage you want to go back to.
0024 homepageUrl - The Url to the Homepage.
0025 
0026 Colors:
0027 background - The Background of the page.
0028 thumbBorderColor - The border of the thumbnails.
0029 navigationColor - The background of the navigation box.
0030 urlColor - The color ofactive urls.
0031 content-bgc - The color of the contentbox.
0032 listBackground - The Color of the Thumb list.
0033 -->
0034  
0035 <!DOCTYPE stylesheet [
0036 <!ENTITY raquo "&#187;">
0037 <!ENTITY auml "&#x00e4;">
0038 <!ENTITY Uuml "&#220;">
0039 <!ENTITY uuml "&#252;">
0040 <!ENTITY nbsp "&#160;">
0041 <!ENTITY middot "&#183;">
0042 ]>
0043 
0044 
0045 <xsl:transform version="1.0"
0046         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
0047         xmlns:exsl="http://exslt.org/common"
0048         extension-element-prefixes="exsl">
0049         <xsl:output
0050                         method="xml"
0051                         doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
0052                         doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
0053                         version="1.0"
0054                         media-type="text/html"
0055                         encoding="UTF-8"
0056                         indent="yes" />
0057                         
0058         <!-- Setting some variables to keep the theme flexible.-->
0059         <xsl:variable name="cssname" select='"layout.css"' /><!-- caution! that file will be overwritten! -->
0060         <xsl:variable name="styledir" select='"simplerounded/"' /><!-- This can usually be any directory available. It has to contain: the css specified above, the niftyCube.js and the niftyCorners.css -->
0061         <xsl:variable name="keywords" select='"generated gallery images"' />
0062         <xsl:variable name="description" select='"a gallery generated by digiKam"' />
0063                         
0064         <!-- Setting some variables to keep the code more readable. -->
0065         <xsl:variable name="numberOfCollections" select="count(collections/collection)" />
0066         <xsl:variable name="numberOfListPages" select="number(ceiling($numberOfCollections div $thumbnailsPerPage))" />
0067         
0068         <!-- Generation of the Header. -->
0069         <xsl:template name="head">
0070                 <xsl:param name="relPath" /><!-- the path to the root of the generated galery -->
0071                 <head>
0072                         <meta
0073                                 http-equiv="Content-Type"
0074                                 content="text/html; charset=UTF-8" />
0075                         <meta
0076                                 http-equiv="Content-Script-Type"
0077                                 content="text/javascript" />
0078                         <meta
0079                                 http-equiv="Content-Style-Type"
0080                                 content="text/css" />
0081                         <meta
0082                                 name="description">
0083                                 <xsl:attribute name="content"> <xsl:value-of select="$description" /></xsl:attribute>
0084                         </meta>
0085                         <meta
0086                                 name="keywords">
0087                                 <xsl:attribute name="content"> <xsl:value-of select="$keywords" /></xsl:attribute>
0088                         </meta>
0089                         <link rel="stylesheet" type="text/css" href="{$relPath}{$styledir}layout.css" />
0090                         <link rel="stylesheet" type="text/css" href="{$relPath}{$styledir}niftyCorners.css" />
0091                         <title>
0092                                 <xsl:value-of select="$titlebar"/>
0093                                 &nbsp;
0094                                 <xsl:value-of select="fileName" />
0095                                 <xsl:value-of select="substring(title, 0, string-length(title) - 3)"/>
0096                         </title>
0097                         <script
0098                                 type="text/javascript"
0099                                 src="{$relPath}{$styledir}niftycube.js"></script>
0100                         <script
0101                                 type="text/javascript">
0102                                         window.onload = function()
0103                                         {
0104                                                 Nifty("div.header", "big transparent");
0105                                                 Nifty("ul.menu a", "same-height transparent");
0106                                                 Nifty("ul.menu", "big transparent");
0107                                                 Nifty("div.round", "big transparent");
0108                                                 Nifty("div.thumb li", "same-height big transparent");
0109                                                 Nifty("div.thumb", "big fixed-height transparent");
0110                                         }
0111                         </script>
0112                 </head>
0113         </xsl:template>
0114         
0115         
0116 <!-- Decide, whether there are more than one collections or not. -->                    
0117         <xsl:template match="/">
0118                 <xsl:choose>
0119                         <xsl:when test="$numberOfCollections = 1">
0120                                 <!-- DEBUG <xsl:value-of select="$numberOfCollections" /> -->
0121                                 <xsl:for-each select="collections/collection[number(1)]">
0122                                         <xsl:call-template name="collectionOverviewPage">
0123                                                 <xsl:with-param name="workingDir" select="concat(//collection[1]/fileName, '/')"/>
0124                                                 <xsl:with-param name="currentPage" select="0" />
0125                                                 <xsl:with-param name="relPath" select="''" />
0126                                                 <xsl:with-param name="collectionPageCount" select="ceiling(count(//image) div $thumbnailsPerPage)" />
0127                                         </xsl:call-template>
0128                                 </xsl:for-each>
0129                         </xsl:when>
0130                         <xsl:otherwise>
0131                                 <xsl:call-template name="collectionListPage">
0132                                         <xsl:with-param name="currentPage" select="number(0)" />
0133                                 </xsl:call-template>
0134                         </xsl:otherwise>
0135                 </xsl:choose>
0136                 <exsl:document
0137                         href="{$styledir}{$cssname}"
0138                         method="text"
0139                         version="1.0"
0140                         encoding="UTF-8"
0141                         media-type="text/css"
0142                         indent="yes">
0143                         <xsl:call-template name="cssstyle" />
0144                 </exsl:document>
0145         </xsl:template>
0146         
0147 <!-- This template generates in an recursive fashion the overviewpages for each collection. If one page is full it calls itself again to create a new page. -->
0148         <xsl:template name="collectionOverviewPage">
0149                 <xsl:param name="workingDir" /> <!-- The directory where the images are stored relative to the working directory. -->
0150                 <xsl:param name="relPath" /> <!-- The directions to the root of the gallery. -->
0151                 <xsl:param name="currentPage" /> <!-- The current Page -->
0152                 <xsl:param name="collectionPageCount" /> <!-- The total count of pages -->
0153                 <html>
0154                         <!-- Include the header -->
0155                         <xsl:call-template name="head">
0156                                 <xsl:with-param name="relPath" select="$relPath" />
0157                         </xsl:call-template>
0158                         
0159                         <body id="collectionPage">
0160                                 <div class="round" id="content">
0161                                         <h1><xsl:value-of select="name" /></h1>
0162                                         <div class="thumb" id="mainpage">
0163                                                 <ul>
0164                                                         <!-- Call the single thumbnail generation template. -->
0165                                                         <xsl:call-template name="collectionOverviewListItem">
0166                                                                 <xsl:with-param name="iterator" select="1" />
0167                                                                 <xsl:with-param name="workingDir" select='$workingDir' />
0168                                                                 <xsl:with-param name="offset" select="number($thumbnailsPerPage * $currentPage)" />
0169                                                         </xsl:call-template>
0170                                                 </ul>
0171                                                 <div class="clear">&nbsp;</div>
0172                                         </div>
0173                                         <!-- Generate the Navigation below the thumblist. -->
0174                                         <div class="round" id="imageNavigationBox">
0175                                                 <div id="block"> <!-- A workaround for the IE boxmodell. -->
0176                                                         <p>
0177                                                                 <xsl:if test="$homepage != ''">
0178                                                                         <a href="{$homepageUrl}"><xsl:value-of select="$homepage" /></a>
0179                                                                         &raquo;
0180                                                                 </xsl:if>
0181                                                                 <xsl:if test="$numberOfCollections != 1">
0182                                                                         <a href="../index.html"><xsl:value-of select="$i18nCollectionList" /></a>
0183                                                                 &raquo;
0184                                                                 </xsl:if>
0185                                                                 <a class="inactive" href="#"><xsl:value-of select="name" /></a>
0186                                                         </p>
0187                                                         <xsl:if test="$collectionPageCount != 1">
0188                                                                 <p>
0189                                                                         <!-- The "Previous" link -->
0190                                                                         <xsl:choose>
0191                                                                                 <xsl:when test="$currentPage = 0">
0192                                                                                         <a class="inactive" href="#"><xsl:value-of select="$i18nPrevious" /></a>
0193                                                                                 </xsl:when>
0194                                                                                 <xsl:when test="$currentPage = 1">
0195                                                                                         <a href="index.html"><xsl:value-of select="$i18nPrevious" /></a>
0196                                                                                 </xsl:when>
0197                                                                                 <xsl:otherwise>
0198                                                                                         <a href="{fileName}Page{$currentPage}.html"><xsl:value-of select="$i18nPrevious" /></a>
0199                                                                                 </xsl:otherwise>
0200                                                                         </xsl:choose>
0201                                                                         &middot;
0202                                                                         <!-- The pagenumber links. -->
0203                                                                         <xsl:call-template name="pageLink">
0204                                                                                 <xsl:with-param name="currentPosition" select="number(1)" />
0205                                                                                 <xsl:with-param name="collectionPageCount" select="$collectionPageCount" />
0206                                                                                 <xsl:with-param name="baseName" select="fileName" />
0207                                                                                 <xsl:with-param name="currentPage" select="$currentPage" />
0208                                                                         </xsl:call-template>
0209                                                                         <!-- The "Next" link.-->
0210                                                                         <xsl:choose>
0211                                                                                 <xsl:when test="$currentPage = ($collectionPageCount - 1)">
0212                                                                                         <a class="inactive" href="#"><xsl:value-of select="$i18nNext" /></a>
0213                                                                                 </xsl:when>
0214                                                                                 <xsl:otherwise>
0215                                                                                         <a href="{fileName}Page{$currentPage + 2}.html"><xsl:value-of select="$i18nNext" /></a>
0216                                                                                 </xsl:otherwise>
0217                                                                         </xsl:choose>
0218                                                                 </p>
0219                                                         </xsl:if>
0220                                                 </div> <!-- End of IE borderworkaround -->
0221                                         </div><!-- End of imageNavigationBox -->
0222                                 </div><!-- End of content. -->
0223                         </body>
0224                 </html>
0225                 <!-- recursive call for the next page. -->
0226                 <xsl:if test="$currentPage &lt; ($collectionPageCount - 1)">
0227                         <exsl:document
0228                                 href="{fileName}Page{$currentPage + 2}.html"
0229                                 method="xml"
0230                                 version="1.0"
0231                                 encoding="UTF-8"
0232                                 doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
0233                                 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
0234                                 media-type="text/html" 
0235                                 indent="yes">
0236                                 <xsl:call-template name="collectionOverviewPage">
0237                                                 <xsl:with-param name="workingDir" select="$workingDir"/>
0238                                                 <xsl:with-param name="relPath" select="$relPath"/>
0239                                                 <xsl:with-param name="currentPage" select="number($currentPage + 1)" />
0240                                                 <xsl:with-param name="collectionPageCount" select="$collectionPageCount" />
0241                                 </xsl:call-template>
0242                         </exsl:document>
0243                 </xsl:if>
0244         </xsl:template>
0245 
0246 <!-- Generate the thumbnail lists by adding one item and call itself recursively. -->
0247         <xsl:template name="collectionOverviewListItem">
0248                 <xsl:param name="iterator" />
0249                 <xsl:param name="workingDir" /><!-- The location of the files -->
0250                 <xsl:param name="offset" /><!-- The number of thumbnails that has already been worked on. -->
0251                 
0252                 <xsl:if test="number($iterator) &lt; number($thumbnailsPerPage + 1)">
0253                         <xsl:for-each select="image[number($iterator + $offset)]">
0254                                 <li>
0255                                         <a href='{$workingDir}{full/@fileName}.html'>
0256                                                 <img src="{$workingDir}{thumbnail/@fileName}" width="{thumbnail/@width}" height="{thumbnail/@height}" alt="{full/description}"/>
0257                                         </a>
0258                                 </li>
0259                                 <exsl:document
0260                                         href='{$workingDir}{full/@fileName}.html'
0261                                         method="xml"
0262                                         version="1.0"
0263                                         encoding="UTF-8"
0264                                         doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
0265                                         doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
0266                                         media-type="text/html"
0267                                         indent="yes">
0268                                         <xsl:call-template name="imagePage">
0269                                                 <xsl:with-param name="iterator" select="number($iterator + $offset)" />
0270                                         </xsl:call-template>
0271                                 </exsl:document>
0272                         </xsl:for-each>
0273                         <!-- The recursion -->
0274                         <xsl:call-template name="collectionOverviewListItem">
0275                                 <xsl:with-param name="iterator" select="$iterator + 1" />
0276                                         <xsl:with-param name="workingDir" select="$workingDir" />
0277                                         <xsl:with-param name="offset" select="$offset" />
0278                         </xsl:call-template>
0279                 </xsl:if>
0280         </xsl:template>
0281 
0282 <!-- Generation of the pagenumbers for each Page. -->
0283         <xsl:template name="pageLink">
0284                 <xsl:param name="currentPosition" /><!-- The current position iterator. -->
0285                 <xsl:param name="collectionPageCount" /><!-- The total num of pages -->
0286                 <xsl:param name="currentPage" /><!-- The current page. -->
0287                 <xsl:param name="baseName" /> <!-- The basic name for the pages. -->
0288                 <xsl:choose>
0289                         <xsl:when test="$currentPosition = ($currentPage + 1)">
0290                                 <a class="inactive" href="#"><xsl:value-of select="$currentPosition"/></a>
0291                                 &middot;
0292                         </xsl:when>
0293                         <xsl:when test="$currentPosition = 1">
0294                                 <a href="index.html"><xsl:value-of select="$currentPosition"/></a>
0295                                 &middot;
0296                         </xsl:when>
0297                         <xsl:otherwise>
0298                                 <a href="{$baseName}Page{$currentPosition}.html"><xsl:value-of select="$currentPosition"/></a>
0299                                 &middot;
0300                         </xsl:otherwise>
0301                 </xsl:choose>
0302                 <xsl:if test="$currentPosition &lt; $collectionPageCount">
0303                         <xsl:call-template name="pageLink">
0304                                 <xsl:with-param name="currentPosition" select="number($currentPosition + 1)" />
0305                                 <xsl:with-param name="collectionPageCount" select="$collectionPageCount" />
0306                                 <xsl:with-param name="currentPage" select="$currentPage" />
0307                                 <xsl:with-param name="baseName" select="$baseName" />
0308                         </xsl:call-template>
0309                 </xsl:if>
0310         </xsl:template>
0311         
0312 
0313 <!-- ############################ The Template to generate every single image page. ############################ -->
0314         <xsl:template name="imagePage">
0315                 <xsl:param name="iterator" /><!-- The position to generate the navigation. -->
0316                 <html>
0317                         <!-- Include the header information -->
0318                         <xsl:call-template name="head">
0319                                 <xsl:with-param name="relPath" select="'../'" />
0320                         </xsl:call-template>
0321                         
0322                         <body id="imagePage">
0323                                 <div class="round" id="content">
0324                                         <div class="round" id="image">
0325                                                 <!-- Include the Image. -->
0326                                                 <img src="{full/@fileName}" width="{full/@width}" height="{full/@height}" alt="{full/description}"/>
0327                                                 <xsl:if test="description != ''"><!-- Check for original file -->
0328                                                         <p><!-- Add the comment. -->
0329                                                                 <xsl:value-of select="description"/>
0330                                                         </p>
0331                                                 </xsl:if>
0332                                                 <xsl:if test="original/@fileName != ''"><!-- Check for original file -->
0333                                                         <p>
0334                                                                 <a href="{original/@fileName}"><xsl:value-of select="$i18nOriginalImage"/></a>
0335                                                                 (<xsl:value-of select="original/@width"/>x<xsl:value-of select="original/@height"/>)
0336                                                         </p>
0337                                                 </xsl:if>
0338                                         </div>
0339                                         <div class="round" id="imageNavigationBox"><!-- Create the navigation -->
0340                                                 <div id="block"> <!-- A workaround for the IE boxmodell. -->
0341                                                         <p><!-- Create the path -->
0342                                                                 <xsl:if test="$homepage != ''">
0343                                                                         <a href="{$homepageUrl}"><xsl:value-of select="$homepage" /></a>
0344                                                                         &raquo;
0345                                                                 </xsl:if>
0346                                                                 <xsl:choose>
0347                                                                         <xsl:when test="$numberOfCollections &gt; 1">
0348                                                                                         <a href="../index.html">
0349                                                                                                 <xsl:value-of select="$i18nCollectionList"/>
0350                                                                                         </a>
0351                                                                                         &raquo;
0352                                                                                         <a href="index.html">
0353                                                                                                 <xsl:value-of select="../name" />
0354                                                                                         </a>
0355                                                                         </xsl:when>
0356                                                                         <xsl:otherwise>
0357                                                                                         <a      href="../index.html">
0358                                                                                         <xsl:value-of select="../name"/>
0359                                                                                         </a>
0360                                                                         </xsl:otherwise>
0361                                                                 </xsl:choose>
0362                                                                 &raquo;
0363                                                                 <a href="#" class="inactive"><xsl:value-of select="substring(title, 0, string-length(title) - 3)"/></a>
0364                                                         </p>
0365                                                         <!-- create the navigation bar -->
0366                                                         <p>
0367                                                                 <xsl:choose>
0368                                                                         <xsl:when test="$iterator &gt; 1">
0369                                                                                         <a href="{preceding-sibling::image[position()=1]/full/@fileName}.html">
0370                                                                                                 <xsl:value-of select="$i18nPrevious" />
0371                                                                                         </a>
0372                                                                         </xsl:when>
0373                                                                         <xsl:otherwise>
0374                                                                                         <a href="#" class="inactive">
0375                                                                                                 <xsl:value-of select="$i18nPrevious" />
0376                                                                                         </a>
0377                                                                         </xsl:otherwise>
0378                                                                 </xsl:choose>
0379                                                                 &nbsp;
0380                                                                 <a href="#" class="inactive">(<xsl:value-of select="$iterator"/>/<xsl:value-of select="count(../image)"/>)</a>
0381                                                                 &nbsp;
0382                                                                 <xsl:choose>
0383                                                                         <xsl:when test="$iterator &lt; count(../image)">
0384                                                                                         <a href="{following-sibling::image[position()=1]/full/@fileName}.html">
0385                                                                                                 <xsl:value-of select="$i18nNext"/>
0386                                                                                         </a>
0387                                                                         </xsl:when>
0388                                                                         <xsl:otherwise>
0389                                                                                         <a href="#" class="inactive">
0390                                                                                                 <xsl:value-of select="$i18nNext"/>
0391                                                                                         </a>
0392                                                                         </xsl:otherwise>
0393                                                                 </xsl:choose>
0394                                                         </p>
0395                                                 </div>
0396                                         </div>
0397                                 </div>
0398                         </body>
0399                 </html>
0400         </xsl:template>
0401 
0402 <!-- ############################ Collections list - the collection thumbnailpage ############################ -->
0403         <xsl:template name="collectionListPage">
0404                 <xsl:param name="currentPage" /><!-- The position to generate the navigation. -->
0405                 
0406                 <xsl:variable name="offset" select="number($thumbnailsPerPage  * $currentPage)"/> <!-- The offset of the current page. -->
0407                 
0408                                 <html>
0409                                         <!-- Include the header information -->
0410                                         <xsl:call-template name="head">
0411                                                 <xsl:with-param name="relPath" select="''" />
0412                                         </xsl:call-template>
0413                                         
0414                                         <body id="collectionPage">
0415                                                 <div class="round" id="content">
0416                                                         <h1><xsl:value-of select="$i18nCollectionList" /></h1>
0417                                                         <div class="thumb" id="mainpage">
0418                                                                 <ul>
0419                                                                         <!-- Call the single thumbnail generation template. -->
0420                                                                         <xsl:call-template name="collectionListItem">
0421                                                                                 <xsl:with-param name="iterator" select="1" />
0422                                                                                 <xsl:with-param name="offset" select="$offset" />
0423                                                                         </xsl:call-template>
0424                                                                 </ul>
0425                                                                 <div class="clear">&nbsp;</div>
0426                                                         </div>
0427                                                         <xsl:if test="$numberOfListPages != 1">
0428                                                                 <!-- The navigation. -->
0429                                                                 <div class="round" id="imageNavigationBox">
0430                                                                         <div id="block"> <!-- A workaround for the IE boxmodell. -->
0431                                                                                 <xsl:if test="$homepageUrl != ''">
0432                                                                                         <p><!-- Create the path -->
0433                                                                                                 <a href="{$homepageUrl}"><xsl:value-of select="$homepage" /></a>
0434                                                                                                 &raquo;
0435                                                                                                 <a class="inactive" href="#"><xsl:value-of select="$i18nCollectionList" /></a>
0436                                                                                         </p>
0437                                                                                 </xsl:if>
0438                                                                                 <p>
0439                                                                                         <!-- The "Previous" link -->
0440                                                                                         <xsl:choose>
0441                                                                                                 <xsl:when test="$currentPage = 0">
0442                                                                                                         <a class="inactive" href="#"><xsl:value-of select="$i18nPrevious" /></a>
0443                                                                                                 </xsl:when>
0444                                                                                                 <xsl:when test="$currentPage = 1">
0445                                                                                                         <a href="index.html"><xsl:value-of select="$i18nPrevious" /></a>
0446                                                                                                 </xsl:when>
0447                                                                                                 <xsl:otherwise>
0448                                                                                                         <a href="{$i18nCollectionList}Page{$currentPage}.html"><xsl:value-of select="$i18nPrevious" /></a>
0449                                                                                                 </xsl:otherwise>
0450                                                                                         </xsl:choose>
0451                                                                                         &middot;
0452                                                                                         <!-- The pagenumber links. -->
0453                                                                                         <xsl:call-template name="pageLink">
0454                                                                                                 <xsl:with-param name="currentPosition" select="number(1)" />
0455                                                                                                 <xsl:with-param name="collectionPageCount" select="$numberOfListPages" />
0456                                                                                                 <xsl:with-param name="baseName" select="$i18nCollectionList" />
0457                                                                                                 <xsl:with-param name="currentPage" select="$currentPage" />
0458                                                                                         </xsl:call-template>
0459                                                                                         <!-- The "Next" link.-->
0460                                                                                         <xsl:choose>
0461                                                                                                 <xsl:when test="$currentPage = ($numberOfListPages - 1)">
0462                                                                                                         <a class="inactive" href="#"><xsl:value-of select="$i18nNext" /></a>
0463                                                                                                 </xsl:when>
0464                                                                                                 <xsl:otherwise>
0465                                                                                                         <a href="{$i18nCollectionList}Page{$currentPage + 2}.html"><xsl:value-of select="$i18nNext" /></a>
0466                                                                                                 </xsl:otherwise>
0467                                                                                         </xsl:choose>
0468                                                                                 </p>
0469                                                                         </div>
0470                                                                 </div>
0471                                                         </xsl:if>
0472                                                 </div>
0473                                         </body>
0474                                 </html>
0475                         <!-- Recursion call of this template. -->
0476                         <xsl:if test="($currentPage + 1) &lt; $numberOfListPages">
0477                                 <exsl:document
0478                                         href='{$i18nCollectionList}Page{number($currentPage + 2)}.html'
0479                                         method="xml"
0480                                         version="1.0"
0481                                         encoding="UTF-8"
0482                                         doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
0483                                         doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
0484                                         media-type="text/html"
0485                                         indent="yes">
0486                                         <xsl:call-template name="collectionListPage">
0487                                                 <xsl:with-param name="currentPage" select="number($currentPage + 1)" />
0488                                         </xsl:call-template>
0489                                 </exsl:document>
0490                         </xsl:if>
0491         </xsl:template>
0492         
0493         <!-- The thumnails for each single collection. -->
0494         <xsl:template name="collectionListItem">
0495                 <xsl:param name="iterator" />
0496                 <xsl:param name="offset" /><!-- The number of thumbnails that has already been worked on. -->
0497 
0498                         <xsl:for-each select="/collections/collection[$iterator + $offset]">
0499                                 <li>
0500                                         <a href='{fileName}/index.html'>
0501                                                 <img src="{fileName}/{image[1]/thumbnail/@fileName}" width="{image[1]/thumbnail/@width}" height="{image[1]/thumbnail/@height}" alt="{image[1]/full/description}"/>
0502                                                 <br />
0503                                                 <xsl:value-of select="name" />
0504                                         </a>
0505                                 </li>
0506                                 <exsl:document
0507                                         href='{fileName}/index.html'
0508                                         method="xml"
0509                                         version="1.0"
0510                                         encoding="UTF-8"
0511                                         doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
0512                                         doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
0513                                         media-type="text/html"
0514                                         indent="yes">
0515                                         <xsl:call-template name="collectionOverviewPage">
0516                                                 <xsl:with-param name="workingDir" select="''" />
0517                                                 <xsl:with-param name="relPath" select="'../'" />
0518                                                 <xsl:with-param name="currentPage" select="0" />
0519                                                 <xsl:with-param name="collectionPageCount" select="ceiling(count(image) div $thumbnailsPerPage)" />
0520                                         </xsl:call-template>
0521                                 </exsl:document>
0522                         </xsl:for-each>
0523 
0524                 <!-- The recursion -->
0525                 <xsl:if test="($iterator &lt; $thumbnailsPerPage) and ($iterator &lt;= $numberOfCollections)">
0526                         <xsl:call-template name="collectionListItem">
0527                                 <xsl:with-param name="iterator" select="$iterator + 1" />
0528                                 <xsl:with-param name="offset" select="$offset" />
0529                         </xsl:call-template>
0530                 </xsl:if>
0531         </xsl:template>
0532         
0533         <!-- Generate the stylesheet -->
0534         <xsl:template name="cssstyle">@CHARSET "UTF-8";
0535         
0536         * {
0537             margin:0;
0538             padding:0;
0539         }
0540         
0541         body {
0542                 padding: 20px;
0543                 background-color: <xsl:value-of select="$background" />;
0544         }
0545         
0546         div.clear {
0547                 clear: both;
0548                 height: 0;
0549                 width: 0;
0550         }
0551         
0552         
0553         /**
0554          * Headdings
0555          */
0556         h1,h2,h3,h4,h5,h6 {
0557                 font-variant: small-caps;
0558                 text-decoration: underline;
0559                 font-weight: bold;
0560         }
0561         
0562         h1 {
0563                 font-size: 28px;
0564                 padding: 0 0 15px 0;
0565         }
0566         
0567         #imageNavigationBox {
0568                 font-size: 20px;
0569                 margin: 7px 0 0 0;
0570                 padding: 10px;
0571                 text-align: center;
0572                 font-variant: small-caps;
0573                 font-weight: bold;
0574                 background-color: <xsl:value-of select="$navigationColor" />;
0575         }
0576         
0577         #block{
0578                 display: block;
0579                 width: 100%;
0580         }
0581         
0582         #imageNavigationBox a{
0583                 color: <xsl:value-of select="$urlColor" />;
0584         }
0585         
0586         #imageNavigationBox a.inactive{
0587                 color: #000;
0588         }
0589         
0590         /**
0591          * Texts
0592          */
0593         p {
0594                 padding: 5px 0;
0595         }
0596         
0597         p:first-letter {
0598                 font-size: 1.3em;
0599         }
0600         
0601         /**
0602          * Divboxes
0603          */
0604         div.round, #content {
0605                 margin: 7px 0;
0606                 padding: 25px 25px 10px 25px;
0607                 font-size: 18px;
0608                 text-align: center;
0609                 background-color: <xsl:value-of select="$content-bgc" />;
0610         }
0611         
0612         /**
0613          * Images
0614          */
0615         img {
0616                 border: none;
0617         }
0618         
0619         div.thumb {
0620                 background-color: <xsl:value-of select="$listBackground" />;
0621                 margin: 7px 0;
0622                 padding: 10px;
0623         }
0624         
0625         div.thumb li {
0626                 display: block;
0627                 background-color:<xsl:value-of select="$thumbBorderColor" />;
0628                 padding: 12px;
0629                 margin: 4px;
0630                 width: <xsl:value-of select="//image[1]/thumbnail/@width" />px;
0631                 _width:<xsl:value-of select="((//image[1]/thumbnail/@width) + 28)" />px;
0632                 list-style: none;
0633         }
0634         
0635         div#mainpage {
0636                 text-align: center;
0637         }
0638         
0639         div#mainpage li {
0640                 float: left;
0641                 display: block;
0642                 font-size: 15px;
0643         }
0644         
0645         div.thumb a:link {
0646                 color: <xsl:value-of select="$urlColor" />;
0647                 text-decoration: none;
0648         }
0649         
0650         div.thumb a:visited {
0651                 color: <xsl:value-of select="$urlColor" />;
0652                 text-decoration: none;
0653         }
0654         </xsl:template>
0655                         
0656 </xsl:transform>