home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 May / CHIP_CD_2003-05.iso / software / jpspa / files / ppa400ev.exe / Data1.cab / single.xsl36 < prev    next >
Encoding:
Extensible Markup Language  |  2003-02-17  |  4.5 KB  |  114 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.         
  24.         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  25.         <meta name="copyright" content="Copyright (C) 1995-2003 Jasc Software, Inc. and its licensors. All rights reserved."/>
  26.         
  27.     </head>            <BODY background="textures/b2_rock.jpg">
  28.                 <table align="center" border="2" bordercolor="#000000">
  29.                     <tr>
  30.                         <td><table align="center" cellspacing="15" border="0"><tr>
  31.                                     <td><div align="center"><BIG><B><xsl:value-of select="title"/></B></BIG></div></td>
  32.                                 </tr>
  33.                                 <tr>
  34.                                     <td align="center"><IMG><xsl:attribute name="src"><xsl:value-of select="@fname"/></xsl:attribute><xsl:attribute name="width"><xsl:value-of select="imagesize/@width"/></xsl:attribute>
  35.                         <xsl:attribute name="height"><xsl:value-of select="imagesize/@height"/></xsl:attribute>
  36.                         <xsl:attribute name="alt"><xsl:value-of select="title"/></xsl:attribute></IMG><br kludge=""/>
  37.                                         
  38.                                         <hr width="95%" size="2"/><xsl:choose>
  39.                                                             <xsl:when test="audio_info/@fname[. != '']">
  40.                                                                 <div align="center"><xsl:apply-templates select="audio_info"/></div>
  41.                                                             </xsl:when>
  42.                                                             <xsl:otherwise>
  43.                                                                 <div align="center"><img border="0" src="graphics/transparenth120.gif" width="1" height="1"/></div>
  44.                                                             </xsl:otherwise>
  45.                                                         </xsl:choose>
  46. <xsl:choose>
  47.                                                     <xsl:when test="movie_info/@fname[. != '']">
  48.                                                         <div align="center"><xsl:apply-templates select="movie_info"/></div>
  49.                                                     </xsl:when>
  50.                                                     <xsl:otherwise>
  51.                                                         <div align="center"><img border="0" src="graphics/transparenth120.gif" width="1" height="1"/></div>
  52.                                                     </xsl:otherwise>
  53.                                                 </xsl:choose></td>
  54.                                 </tr>
  55.                                 <tr>
  56.                                     <td align="center"><table width="480" border="0">
  57.                                             <tr>
  58.                                                 <td><div align="center"><b>
  59.                                                             <xsl:apply-templates select="description">
  60.                                                                 <!-- recursively apply this template to them -->
  61.                                                                 <xsl:template>
  62.                                                                     <xsl:copy>
  63.                                                                         <xsl:apply-templates select="@* | * | comment() | pi() | text()"/>
  64.                                                                     </xsl:copy>
  65.                                                                 </xsl:template>
  66.                                                             </xsl:apply-templates></b></div></td>
  67.                                             </tr>
  68.                                         </table></td>
  69.                                 </tr>
  70.                             </table></td>
  71.                     </tr>
  72.                 </table>
  73.                 <table align="center" cellspacing="10">
  74.                     <tr align="center">
  75.                         <xsl:apply-templates select="previous"/>
  76.                         <xsl:apply-templates select="next"/>
  77.                     </tr>
  78.                     <tr align="center">
  79.                         <td colspan="2"><b><A><xsl:attribute name="href">index.htm</xsl:attribute>Home</A></b></td>
  80.                     </tr>
  81.                 </table>
  82.             </BODY>
  83.         </xsl:element>
  84.     </xsl:template>
  85.     <xsl:template match="previous">
  86.         <td width="50%"><b><xsl:value-of/>
  87.                 <xsl:choose>
  88.                     <xsl:when match="previous[@fname != '']">
  89.                         <A><xsl:attribute name="href"><xsl:value-of select="@fname"/></xsl:attribute>Previous</A>
  90.                     </xsl:when>
  91.                     <xsl:otherwise>Previous</xsl:otherwise>
  92.                 </xsl:choose></b></td>
  93.     </xsl:template>
  94.     <xsl:template match="next">
  95.         <td width="50%"><b><xsl:value-of/>
  96.                 <xsl:choose>
  97.                     <xsl:when match="next[@fname != '']">
  98.                         <A><xsl:attribute name="href"><xsl:value-of select="@fname"/></xsl:attribute>Next</A>
  99.                     </xsl:when>
  100.                     <xsl:otherwise>Next</xsl:otherwise>
  101.                 </xsl:choose></b></td>
  102.     </xsl:template>
  103.     <xsl:template match="audio_info">
  104.         <xsl:if match="audio_info[@fname != '']">
  105.             <A><xsl:attribute name="href"><xsl:value-of select="@fname"/></xsl:attribute>
  106.                 <img border="0" src="graphics/sound.gif"/></A>
  107.         </xsl:if>
  108.     </xsl:template>
  109.     <xsl:template match="movie_info">
  110.         <A><xsl:attribute name="href"><xsl:value-of select="@fname"/></xsl:attribute>
  111.             <img border="0" src="graphics/movie.gif" width="24" height="28"/></A>
  112.     </xsl:template>
  113. </xsl:stylesheet>
  114.