diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-03-01 19:17:32 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-03-01 19:17:32 +0000 |
commit | e38d2351b83fa65c66ccde443777647ef5cb6cff (patch) | |
tree | 1897fc20e9f73a81c520a5b9f76f8ed042124883 /xslt/report-templates/Title_Listing_(Horizontal).xsl | |
download | tellico-e38d2351b83fa65c66ccde443777647ef5cb6cff.tar.gz tellico-e38d2351b83fa65c66ccde443777647ef5cb6cff.zip |
Added KDE3 version of Tellico
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1097620 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'xslt/report-templates/Title_Listing_(Horizontal).xsl')
-rw-r--r-- | xslt/report-templates/Title_Listing_(Horizontal).xsl | 146 |
1 files changed, 146 insertions, 0 deletions
diff --git a/xslt/report-templates/Title_Listing_(Horizontal).xsl b/xslt/report-templates/Title_Listing_(Horizontal).xsl new file mode 100644 index 0000000..30b9c95 --- /dev/null +++ b/xslt/report-templates/Title_Listing_(Horizontal).xsl @@ -0,0 +1,146 @@ +<?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:tc="http://periapsis.org/tellico/" + xmlns:exsl="http://exslt.org/common" + extension-element-prefixes="exsl" + exclude-result-prefixes="tc" + version="1.0"> + +<!-- + =================================================================== + Tellico XSLT file - Title List Report + + Copyright (C) 2005-2006 Robby Stephenson - robby@periapsis.org + + This XSLT stylesheet is designed to be used with the 'Tellico' + application, which can be found at http://www.periapsis.org/tellico/ + + =================================================================== +--> + +<!-- import common templates --> +<!-- location depends on being installed correctly --> +<xsl:import href="../tellico-common.xsl"/> + +<xsl:output method="html" + indent="yes" + doctype-public="-//W3C//DTD HTML 4.01//EN" + doctype-system="http://www.w3.org/TR/html4/strict.dtd" + encoding="utf-8"/> + +<xsl:param name="filename"/> +<xsl:param name="cdate"/> + +<!-- Sort using user's preferred language --> +<xsl:param name="lang"/> + +<xsl:param name="num-columns" select="3"/> + +<xsl:template match="/"> + <xsl:apply-templates select="tc:tellico"/> +</xsl:template> + +<xsl:template match="tc:tellico"> + <html> + <head> + <style type="text/css"> + body { + font-family: sans-serif; + background-color: #fff; + color: #000; + } + #header-left { + margin-top: 0; + float: left; + font-size: 80%; + font-style: italic; + } + #header-right { + margin-top: 0; + float: right; + font-size: 80%; + font-style: italic; + } + h1.colltitle { + margin: 0px; + padding-bottom: 5px; + font-size: 2em; + text-align: center; + } + table { + margin-left: auto; + margin-right: auto; + } + td { + margin-left: 0px; + margin-right: 0px; + padding-left: 10px; + padding-right: 5px; + border: 1px solid #eee; + text-align: left; + } + tr.r0 { + background-color: #fff; + } + tr.r1 { + background-color: #eee; + } + </style> + <title>Tellico</title> + </head> + <body> + <xsl:apply-templates select="tc:collection"/> + </body> + </html> +</xsl:template> + +<xsl:template match="tc:collection"> + <p id="header-left"><xsl:value-of select="$filename"/></p> + <p id="header-right"><xsl:value-of select="$cdate"/></p> + <h1 class="colltitle"> + <xsl:value-of select="@title"/> + </h1> + + <!-- first, build sorted list --> + <xsl:variable name="sorted-entries"> + <xsl:for-each select="tc:entry"> + <xsl:sort lang="$lang" select=".//tc:title[1]"/> + <xsl:copy-of select="."/> + </xsl:for-each> + </xsl:variable> + + <table> + <tbody> + +<!-- + <xsl:variable name="nrows" + select="ceiling(count(tc:entry) div $num-columns)"/> +--> + <xsl:for-each select="exsl:node-set($sorted-entries)/tc:entry[position() mod $num-columns = 1]"> + <tr class="r{position() mod 2}"> + <xsl:apply-templates select=".|following-sibling::tc:entry[position() < $num-columns]"/> + </tr> + </xsl:for-each> + + </tbody> + </table> + +</xsl:template> + +<xsl:template match="tc:entry"> + <td> + <xsl:for-each select=".//tc:title"> + <xsl:value-of select="."/> + <xsl:if test="position() < last()"> + <xsl:text>; </xsl:text> + <br/> + </xsl:if> + </xsl:for-each> +</td> +</xsl:template> + +</xsl:stylesheet> +<!-- Local Variables: --> +<!-- sgml-indent-step: 1 --> +<!-- sgml-indent-data: 1 --> +<!-- End: --> |