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

  1. <?xml version="1.0"?>
  2. <!-- Copyright (C) 1995-2003 Jasc Software, Inc. and its licensors. -->
  3. <!-- All rights reserved. -->
  4. <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
  5.     <xsl:template match="/">
  6.         <HTML>
  7.             <xsl:apply-templates/>
  8.         </HTML>
  9.     </xsl:template>
  10.     <xsl:template match="photos">
  11.         <xsl:apply-templates/>
  12.     </xsl:template>
  13.     <xsl:template match="album">
  14.         <xsl:apply-templates select="imagelist"/>
  15.     </xsl:template>
  16.     <xsl:template match="imagelist">
  17.         <xsl:apply-templates select="imageinfo"/>
  18.     </xsl:template>
  19.     <xsl:template match="imageinfo">
  20.         <xsl:element name="ixfile">
  21.             <xsl:attribute name="fname"><xsl:value-of select="html_info/@fname"/></xsl:attribute>
  22.             <head>
  23.                 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  24.                 <meta name="copyright" content="Copyright (C) 1995-2003 Jasc Software, Inc. and its licensors. All rights reserved."/>
  25.             </head>
  26.             <body bgcolor="#003366" text="#336633">
  27.                 <table align="center" background="graphics/background2.jpg" width="798" border="0" cellspacing="0" cellpadding="0" height="590">
  28.                     <tr>
  29.                         <td><table align="center" width="798" border="0" cellspacing="0" cellpadding="0" height="590" background="">
  30.                                 <tr>
  31.                                     <td height="80" width="300"><div align="center"><xsl:apply-templates select="previous"/></div></td>
  32.                                     <td width="198"><div align="center"><font face="Arial, Helvetica, sans-serif" size="4"><b><xsl:value-of select="title"/></b></font></div></td>
  33.                                     <td width="300"><div align="center"><xsl:apply-templates select="next"/></div></td>
  34.                                 </tr>
  35.                                 <tr>
  36.                                     <td colspan="3"><div align="center"><IMG border="2"><xsl:attribute name="src"><xsl:value-of select="@fname"/></xsl:attribute><xsl:attribute name="width"><xsl:value-of select="imagesize/@width"/></xsl:attribute>
  37.                         <xsl:attribute name="height"><xsl:value-of select="imagesize/@height"/></xsl:attribute>
  38.                         <xsl:attribute name="alt"><xsl:value-of select="title"/></xsl:attribute></IMG></div></td>
  39.                                 </tr>
  40.                                 <tr>
  41.                                     <td colspan="3"><div align="center"><table width="798" align="center" border="0" cellspacing="0" cellpadding="0" background="">
  42.                                                 <tr>
  43.                                                     <td width="200" height="60"><xsl:choose>
  44.                                                             <xsl:when test="audio_info/@fname[. != '']">
  45.                                                                 <div align="right"><xsl:apply-templates select="audio_info"/></div>
  46.                                                             </xsl:when>
  47.                                                             <xsl:otherwise>
  48.                                                                 <div align="right"><img border="0" src="graphics/transparenth120.gif" width="1" height="1"/></div>
  49.                                                             </xsl:otherwise>
  50.                                                         </xsl:choose></td>
  51.                                                     <td width="398"><div align="center">
  52.                                                             <font face="Arial, Helvetica, sans-serif" size="2" >
  53.                                                                 <xsl:apply-templates select="description">
  54.                                                                     <!-- recursively apply this template to them -->
  55.                                                                     <xsl:template>
  56.                                                                         <xsl:copy>
  57.                                                                             <xsl:apply-templates select="@* | * | comment() | pi() | text()"/>
  58.                                                                         </xsl:copy>
  59.                                                                     </xsl:template>
  60.                                                                 </xsl:apply-templates></font></div></td>
  61.                                                     <td width="200"><xsl:choose>
  62.                                                     <xsl:when test="movie_info/@fname[. != '']">
  63.                                                         <div align="center"><xsl:apply-templates select="movie_info"/></div>
  64.                                                     </xsl:when>
  65.                                                     <xsl:otherwise>
  66.                                                         <div align="left"><img border="0" src="graphics/transparenth120.gif" width="1" height="1"/></div>
  67.                                                     </xsl:otherwise>
  68.                                                 </xsl:choose></td>
  69.                                                 </tr>
  70.                                             </table></div></td>
  71.                                 </tr>
  72.                             </table></td>
  73.                     </tr></table>
  74.             </body>
  75.         </xsl:element>
  76.     </xsl:template>
  77.     <xsl:template match="audio_info">
  78.         <xsl:if match="audio_info[@fname != '']">
  79.             <A><xsl:attribute name="href"><xsl:value-of select="@fname"/></xsl:attribute>
  80.                 <img border="0" src="graphics/sound.gif"/></A>
  81.         </xsl:if>
  82.     </xsl:template>
  83.     <xsl:template match="movie_info">
  84.         <A><xsl:attribute name="href"><xsl:value-of select="@fname"/></xsl:attribute>
  85.             <img border="0" src="graphics/movie.gif" width="24" height="28"/></A>
  86.     </xsl:template>
  87.     <xsl:template match="previous">
  88.         <xsl:value-of/>
  89.         <xsl:choose>
  90.             <xsl:when match="previous[@fname != '']">
  91.                 <A><xsl:attribute name="href"><xsl:value-of select="@fname"/></xsl:attribute>
  92.                     <img src="buttons/pointleft.gif" border="0"/></A>
  93.             </xsl:when>
  94.             <xsl:otherwise>
  95.                 <img src="graphics/transparenth120.gif" width="1" height="1" border="0"/>
  96.             </xsl:otherwise>
  97.         </xsl:choose>
  98.     </xsl:template>
  99.     <xsl:template match="next">
  100.         <xsl:value-of/>
  101.         <xsl:choose>
  102.             <xsl:when match="next[@fname != '']">
  103.                 <A><xsl:attribute name="href"><xsl:value-of select="@fname"/></xsl:attribute>
  104.                     <img src="buttons/pointright.gif" border="0"/></A>
  105.             </xsl:when>
  106.             <xsl:otherwise>
  107.                 <img src="graphics/transparenth120.gif" width="1" height="1" border="0"/>
  108.             </xsl:otherwise>
  109.         </xsl:choose>
  110.     </xsl:template>
  111. </xsl:stylesheet>
  112.