home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 May / CHIP_CD_2003-05.iso / software / jpspa / files / ppa400ev.exe / Data1.cab / toc.xsl11 < prev    next >
Encoding:
Extensible Markup Language  |  2003-02-17  |  5.6 KB  |  148 lines

  1. <?xml version="1.0"?>
  2. <!-- Copyright (C) 1995-2003 Jasc Software, Inc. and its licensors. -->
  3. <!-- All rights reserved. -->
  4. <!DOCTYPE xsl:stylesheet [
  5.     <!ENTITY externalScript SYSTEM "../ScriptLib/common.xsl">
  6. ]>
  7. <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
  8.     <xsl:script><![CDATA[
  9.  var ImagesPerPage = 15;
  10. ]]></xsl:script>
  11. &externalScript;
  12.     <xsl:template match="/">
  13.         <HTML>
  14.             <xsl:apply-templates/>
  15.         </HTML>
  16.     </xsl:template>
  17.     <xsl:template match="photos">
  18.         <xsl:apply-templates select="album"/>
  19.     </xsl:template>
  20.     <xsl:template match="album">
  21.         <xsl:apply-templates select="imagelist"/>
  22.     </xsl:template>
  23.     <xsl:template match="imagelist">
  24.         <xsl:for-each select="imageinfo">
  25.             <xsl:if expr="(childNumber(this) % 15) == 1">
  26.                 <xsl:element name="ixfile">
  27.                     <xsl:attribute name="fname"><xsl:eval>GetTocName(this)</xsl:eval></xsl:attribute>
  28.                     <head>
  29.                         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  30.                     </head>
  31.                     <body bgcolor="#000000">
  32.                         <div align="center">
  33.                             <table width="140" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
  34.                                 <tr>
  35.                                     <td>
  36.                                         <div align="center">
  37.                                             <font face="Arial, Helvetica, sans-serif" size="2">
  38.                                                 <xsl:eval>GetAlbumTitle()</xsl:eval>
  39.                                             </font>
  40.                                         </div>
  41.                                     </td>
  42.                                 </tr>
  43.                             </table>
  44.                             <br kludge=""/>
  45.                         </div>
  46.                         <table width="750" border="6" cellspacing="6" cellpadding="6" bgcolor="#000000" align="center" bordercolor="#FFFFFF">
  47.                             <tr>
  48.                                 <td>
  49.                                     <div align="center">
  50.                                         <A>
  51.                                             <xsl:attribute name="href"><xsl:value-of select="html_info/@fname"/></xsl:attribute>
  52.                                             <xsl:apply-templates select="thumbinfo"/></A>
  53.                                     </div>
  54.                                 </td>
  55.                                 <xsl:apply-templates select="../imageinfo[index() $gt$ context()!index()][0]"/>
  56.                                 <xsl:apply-templates select="../imageinfo[index() $gt$ context()!index()][1]"/>
  57.                                 <xsl:apply-templates select="../imageinfo[index() $gt$ context()!index()][2]"/>
  58.                                 <xsl:apply-templates select="../imageinfo[index() $gt$ context()!index()][3]"/>
  59.                             </tr>
  60.                             <tr>
  61.                                 <xsl:apply-templates select="../imageinfo[index() $gt$ context()!index()][4]"/>
  62.                                 <xsl:apply-templates select="../imageinfo[index() $gt$ context()!index()][5]"/>
  63.                                 <xsl:apply-templates select="../imageinfo[index() $gt$ context()!index()][6]"/>
  64.                                 <xsl:apply-templates select="../imageinfo[index() $gt$ context()!index()][7]"/>
  65.                                 <xsl:apply-templates select="../imageinfo[index() $gt$ context()!index()][8]"/>
  66.                             </tr>
  67.                             <tr>
  68.                                 <xsl:apply-templates select="../imageinfo[index() $gt$ context()!index()][9]"/>
  69.                                 <xsl:apply-templates select="../imageinfo[index() $gt$ context()!index()][10]"/>
  70.                                 <xsl:apply-templates select="../imageinfo[index() $gt$ context()!index()][11]"/>
  71.                                 <xsl:apply-templates select="../imageinfo[index() $gt$ context()!index()][12]"/>
  72.                                 <xsl:apply-templates select="../imageinfo[index() $gt$ context()!index()][13]"/>
  73.                             </tr>
  74.                         </table>
  75.                         <br kludge=""/>
  76.                         <table width="450" border="1" cellspacing="6" cellpadding="6" bgcolor="#000000" align="center" bordercolor="#FFFFFF">
  77.                             <tr>
  78.                                 <div align="center">
  79.                                     <td bgcolor="#FFFFFF" width="33%">
  80.                                         <xsl:choose>
  81.                                             <xsl:when expr="IsFirstPage(this)">
  82.                                                 <div align="center">
  83.                                                     <font face="Arial, Helvetica, sans-serif" size="2">
  84.                                                         Previous
  85.                                                     </font>
  86.                                                 </div>
  87.                                             </xsl:when>
  88.                                             <xsl:otherwise>
  89.                                                 <div align="center">
  90.                                                     <a><xsl:attribute name="href"><xsl:eval>GetPrevPage(this)</xsl:eval></xsl:attribute><font face="Arial, Helvetica, sans-serif" size="2">
  91.                                                             Previous
  92.                                                         </font></a>
  93.                                                 </div>
  94.                                             </xsl:otherwise>
  95.                                         </xsl:choose>
  96.                                     </td>
  97.                                     <td bgcolor="#000000" width="33%" border="0">
  98.                                         <div align="center">
  99.                                             <img src="graphics/dot.gif" width="1" height="1"/>
  100.                                         </div>
  101.                                     </td>
  102.                                     <td bgcolor="#FFFFFF" width="33%">
  103.                                         <xsl:choose>
  104.                                             <xsl:when expr="IsLastPage(this)">
  105.                                                 <div align="center">
  106.                                                     <font face="Arial, Helvetica, sans-serif" size="2">
  107.                                                         More
  108.                                                     </font>
  109.                                                 </div>
  110.                                             </xsl:when>
  111.                                             <xsl:otherwise>
  112.                                                 <div align="center">
  113.                                                     <a><xsl:attribute name="href"><xsl:eval>GetNextPage(this)</xsl:eval></xsl:attribute><font face="Arial, Helvetica, sans-serif" size="2">
  114.                                                             More
  115.                                                         </font></a>
  116.                                                 </div>
  117.                                             </xsl:otherwise>
  118.                                         </xsl:choose>
  119.                                     </td>
  120.                                 </div>
  121.                             </tr>
  122.                         </table>
  123.                     </body>
  124.                 </xsl:element>
  125.             </xsl:if>
  126.         </xsl:for-each>
  127.     </xsl:template>
  128.     <xsl:template match="imageinfo">
  129.         <td>
  130.             <div align="center">
  131.                 <A>
  132.                     <xsl:attribute name="href"><xsl:value-of select="html_info/@fname"/></xsl:attribute>
  133.                     <xsl:apply-templates select="thumbinfo"/></A>
  134.             </div>
  135.         </td>
  136.     </xsl:template>
  137.     <xsl:template match="title">
  138.         <xsl:value-of/>
  139.     </xsl:template>
  140.     <xsl:template match="thumbinfo">
  141.         <IMG border="0" vspace="2" hspace="2">
  142.             <xsl:attribute name="src"><xsl:value-of select="@fname"/></xsl:attribute>
  143.             <xsl:attribute name="width"><xsl:value-of select="thumbsize/@width"/></xsl:attribute>
  144.             <xsl:attribute name="height"><xsl:value-of select="thumbsize/@height"/></xsl:attribute>
  145.             <xsl:attribute name="alt"><xsl:value-of select="../title"/></xsl:attribute>
  146.         </IMG></xsl:template>
  147. </xsl:stylesheet>
  148.