home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 November / PCWorld_2005-11_cd.bin / software / temacd / pixvue / PixVue.exe / PixVue.msi / _0CFB689276AB4BA68707215523821F6C < prev    next >
Encoding:
Extensible Markup Language  |  2005-02-13  |  3.9 KB  |  101 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet version="1.0" extension-element-prefixes="rdf iX x dc exif tiff pv" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pv="http://www.pixvue.com/namespace/webgallery/1.0/" xmlns:exif="http://ns.adobe.com/exif/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:tiff="http://ns.adobe.com/tiff/1.0/" xmlns:iX="http://ns.adobe.com/iX/1.0/" xmlns:x="adobe:ns:meta/" xmlns:dc="http://purl.org/dc/elements/1.1/">
  3.     <xsl:output method="html" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" omit-xml-declaration="yes" indent="yes"/>
  4.     <xsl:template match="/">
  5.         <xsl:variable name="title" select="/index/@title"/>
  6.         <xsl:variable name="columns" select="/index/@columns"/>
  7.         <html>
  8.             <head>
  9.                 <xsl:text disable-output-escaping="yes"><meta http-equiv="content-type" content="text/html;charset=iso-8859-1"></xsl:text>
  10.                 <xsl:text disable-output-escaping="yes"><meta name="generator" content="PixVue"></xsl:text>
  11.                 <title>
  12.                     <xsl:if test="$title">
  13.                         <xsl:value-of select="$title"/>
  14.                     </xsl:if>
  15.                 </title>
  16.                 <style type="text/css" media="screen">@import "media/gallery.css";</style>
  17.             </head>
  18.             <body>
  19.                 <center>
  20.                     <table width="64" border="0" cellspacing="0" cellpadding="0">
  21.                         <tr>
  22.                             <td>
  23.                                 <table align="center" cellspacing="25">
  24.                                     <thead>
  25.                                         <tr>
  26.                                             <td align="left" colspan="4">
  27.                                                 <h2>
  28.                                                     <xsl:if test="$title">
  29.                                                         <xsl:value-of select="$title"/>
  30.                                                     </xsl:if>
  31.                                                 </h2>
  32.                                             </td>
  33.                                         </tr>
  34.                                     </thead>
  35.                                     <tr>
  36.                                         <td class="group" colspan="4"/>
  37.                                     </tr>
  38.                                     <xsl:for-each select="index/thumbnails/image">
  39.                                         <xsl:if test="(position() mod $columns) = 1">
  40.                                             <tr>
  41.                                                 <xsl:call-template name="formatColumns">
  42.                                                     <xsl:with-param name="to" select="$columns"/>
  43.                                                 </xsl:call-template>
  44.                                             </tr>
  45.                                         </xsl:if>
  46.                                     </xsl:for-each>
  47.                                 </table>
  48.                             </td>
  49.                         </tr>
  50.                         <tr align="right">
  51.                             <td>
  52.                                 <span class="about">made with <a href="http://www.PixVue.Com/" target="_blank">PixVue</a>
  53.                                 </span>
  54.                             </td>
  55.                         </tr>
  56.                     </table>
  57.                 </center>
  58.             </body>
  59.         </html>
  60.     </xsl:template>
  61.     <xsl:template name="formatColumns">
  62.         <xsl:param name="from" select="0"/>
  63.         <xsl:param name="to" select="0"/>
  64.         <xsl:param name="step" select="1"/>
  65.         <xsl:if test="$from < $to">
  66.             <!-- thumbnail -->
  67.             <xsl:choose>
  68.                 <xsl:when test="$from = 0">
  69.                     <xsl:if test=".">
  70.                         <td align="center">
  71.                             <xsl:text disable-output-escaping="yes"><a href="</xsl:text>
  72.                             <xsl:value-of select="@target"/>
  73.                             <xsl:text disable-output-escaping="yes">"><img class="image" alt="" border="0" src="</xsl:text>
  74.                             <xsl:value-of select="."/>
  75.                             <xsl:text disable-output-escaping="yes">"></a></xsl:text>
  76.                         </td>
  77.                     </xsl:if>
  78.                 </xsl:when>
  79.                 <xsl:otherwise>
  80.                     <xsl:variable name="image" select="following-sibling::image[position()=$from]"/>
  81.                     <xsl:if test="$image">
  82.                         <td align="center">
  83.                             <xsl:text disable-output-escaping="yes"><a href="</xsl:text>
  84.                             <xsl:value-of select="following-sibling::image[position()=$from]/@target"/>
  85.                             <xsl:text disable-output-escaping="yes">"><img class="image" alt="" border="0" src="</xsl:text>
  86.                             <xsl:value-of select="$image"/>
  87.                             <xsl:text disable-output-escaping="yes">"></a></xsl:text>
  88.                         </td>
  89.                     </xsl:if>
  90.                 </xsl:otherwise>
  91.             </xsl:choose>
  92.             <!-- do it again -->
  93.             <xsl:call-template name="formatColumns">
  94.                 <xsl:with-param name="from" select="$from + $step"/>
  95.                 <xsl:with-param name="to" select="$to"/>
  96.                 <xsl:with-param name="step" select="$step"/>
  97.             </xsl:call-template>
  98.         </xsl:if>
  99.     </xsl:template>
  100. </xsl:stylesheet>
  101.