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