home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 May / CHIP_CD_2003-05.iso / software / jpspa / files / ppa400ev.exe / Data1.cab / toc.xsl7 < prev    next >
Encoding:
Extensible Markup Language  |  2003-02-17  |  5.4 KB  |  134 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 = 9;
  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) % 9) == 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="#ffffff" leftmargin="0" topmargin="10" marginwidth="0" marginheight="0">
  32.                         <table border="0" cellspacing="0" cellpadding="0"><tr><td height="95" background="graphics/redbar.gif"><br kludge=""/></td><td  width="740" height="95" background="graphics/redbar.gif"><div align="center">
  33.                                                                         <font face="Arial, Helvetica, sans-serif" size="5">
  34.                                                 <xsl:eval>GetAlbumTitle()</xsl:eval>
  35.                                             </font>
  36.                                         </div></td><tr><td width="52" background="graphics/lights.jpg"><br kludge=""/></td><td><br kludge=""/>
  37.                         <table width="500" border="4" cellspacing="4" cellpadding="4" bgcolor="#ffffff" align="center" bordercolor="#ff0000">
  38.                             <tr>
  39.                                 <td>
  40.                                     <div align="center">
  41.                                         <A>
  42.                                             <xsl:attribute name="href"><xsl:value-of select="html_info/@fname"/></xsl:attribute>
  43.                                             <xsl:apply-templates select="thumbinfo"/></A></div></td>
  44.                                 <xsl:apply-templates select="../imageinfo[index() $gt$ context()!index()][0]"/>
  45.                                 <xsl:apply-templates select="../imageinfo[index() $gt$ context()!index()][1]"/>
  46.                                 
  47.                             </tr>
  48.                             <tr><xsl:apply-templates select="../imageinfo[index() $gt$ context()!index()][2]"/>
  49.                                 <xsl:apply-templates select="../imageinfo[index() $gt$ context()!index()][3]"/>
  50.                                 <xsl:apply-templates select="../imageinfo[index() $gt$ context()!index()][4]"/>
  51.                                 
  52.                                 
  53.                             </tr>
  54.                             <tr>
  55.                             <xsl:apply-templates select="../imageinfo[index() $gt$ context()!index()][5]"/>
  56.                                 <xsl:apply-templates select="../imageinfo[index() $gt$ context()!index()][6]"/>
  57.                                 <xsl:apply-templates select="../imageinfo[index() $gt$ context()!index()][7]"/>
  58.                             </tr>
  59.                         </table>
  60.                         <br kludge=""/>
  61.                         </td></tr></tr><tr><td height="95" background="graphics/redbar.gif"><br kludge=""/></td><td background="graphics/redbar.gif" width="740"><table width="450" border="1" cellspacing="6" cellpadding="6" bgcolor="#006600" align="center" bordercolor="#FFFFFF">
  62.                             <tr>
  63.                                 <div align="center">
  64.                                     <td bgcolor="#FFFFFF" width="33%" background="">
  65.                                         <xsl:choose>
  66.                                             <xsl:when expr="IsFirstPage(this)">
  67.                                                 <div align="center">
  68.                                                     <font face="Arial, Helvetica, sans-serif" size="2">
  69.                                                         Previous
  70.                                                     </font>
  71.                                                 </div>
  72.                                             </xsl:when>
  73.                                             <xsl:otherwise>
  74.                                                 <div align="center">
  75.                                                     <a><xsl:attribute name="href"><xsl:eval>GetPrevPage(this)</xsl:eval></xsl:attribute><font face="Arial, Helvetica, sans-serif" size="2">
  76.                                                             Previous
  77.                                                         </font></a>
  78.                                                 </div>
  79.                                             </xsl:otherwise>
  80.                                         </xsl:choose>
  81.                                     </td>
  82.                                     <td bgcolor="#006600" width="33%" border="0" background="">
  83.                                         <div align="center">
  84.                                             <img src="graphics/dot.gif" width="1" height="1"/>
  85.                                         </div>
  86.                                     </td>
  87.                                     <td bgcolor="#FFFFFF" width="33%" background="">
  88.                                         <xsl:choose>
  89.                                             <xsl:when expr="IsLastPage(this)">
  90.                                                 <div align="center">
  91.                                                     <font face="Arial, Helvetica, sans-serif" size="2">
  92.                                                         More
  93.                                                     </font>
  94.                                                 </div>
  95.                                             </xsl:when>
  96.                                             <xsl:otherwise>
  97.                                                 <div align="center">
  98.                                                     <a><xsl:attribute name="href"><xsl:eval>GetNextPage(this)</xsl:eval></xsl:attribute><font face="Arial, Helvetica, sans-serif" size="2">
  99.                                                             More
  100.                                                         </font></a>
  101.                                                 </div>
  102.                                             </xsl:otherwise>
  103.                                         </xsl:choose>
  104.                                     </td>
  105.                                 </div>
  106.                             </tr>
  107.                         </table></td></tr></table>
  108.                     </body>
  109.                     
  110.                     
  111.                 </xsl:element>
  112.             </xsl:if>
  113.         </xsl:for-each>
  114.     </xsl:template>
  115.     <xsl:template match="imageinfo">
  116.         <td>
  117.             <div align="center">
  118.                 <A>
  119.                     <xsl:attribute name="href"><xsl:value-of select="html_info/@fname"/></xsl:attribute>
  120.                     <xsl:apply-templates select="thumbinfo"/></A>
  121.             </div>
  122.         </td>
  123.     </xsl:template>
  124.     <xsl:template match="title">
  125.         <xsl:value-of/>
  126.     </xsl:template>
  127.     <xsl:template match="thumbinfo">
  128.         <IMG border="0" vspace="2" hspace="2">
  129.             <xsl:attribute name="src"><xsl:value-of select="@fname"/></xsl:attribute>
  130.         <xsl:attribute name="width"><xsl:value-of select="thumbsize/@width"/></xsl:attribute>
  131.             <xsl:attribute name="height"><xsl:value-of select="thumbsize/@height"/></xsl:attribute>
  132.             <xsl:attribute name="alt"><xsl:value-of select="../title"/></xsl:attribute></IMG></xsl:template>
  133. </xsl:stylesheet>
  134.