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