home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 May / CHIP_CD_2003-05.iso / software / jpspa / files / ppa400ev.exe / Data1.cab / single.xsl39 < prev    next >
Encoding:
Extensible Markup Language  |  2003-02-17  |  6.4 KB  |  155 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:template match="/">
  9.         <HTML>
  10.             <xsl:apply-templates/>
  11.         </HTML>
  12.     </xsl:template>
  13.     <xsl:template match="photos">
  14.         <xsl:apply-templates/>
  15.     </xsl:template>
  16.     <xsl:template match="album">
  17.         <xsl:apply-templates select="imagelist"/>
  18.     </xsl:template>
  19.     <xsl:template match="imagelist">
  20.         <xsl:apply-templates select="imageinfo"/>
  21.     </xsl:template>
  22.     <xsl:template match="imageinfo">
  23.         <xsl:element name="ixfile">
  24.             <xsl:attribute name="fname"><xsl:value-of select="html_info/@fname"/></xsl:attribute>
  25.             <head>
  26.         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  27.         <meta name="copyright" content="Copyright (C) 1995-2003 Jasc Software, Inc. and its licensors. All rights reserved."/>
  28.  
  29.                 <SCRIPT>
  30.                     <xsl:comment>
  31.  
  32.  
  33.  
  34.   function MM_swapImgRestore() { //v3.0
  35.   <![CDATA[var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
  36. }
  37.  
  38. function MM_preloadImages() { //v3.0
  39.   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  40.     var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  41.     if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  42. }
  43.  
  44. function MM_findObj(n, d) { //v3.0
  45.   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  46.     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  47.   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  48.   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
  49. }
  50.  
  51. function MM_swapImage() { //v3.0
  52.   var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  53.    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
  54. }]]>//</xsl:comment>
  55.                 </SCRIPT>
  56.             </head>
  57.             
  58. <body bgcolor="#ffccff" onLoad="MM_preloadImages('buttons/pinleft_over.gif','buttons/pinright_over.gif')">
  59.  
  60. <table width="770" border="0" cellspacing="3" cellpadding="3" bgcolor="#FFFFFF" align="center">
  61.   <tr>
  62.     <td width="200" valign="top"> 
  63.       <p><img src="graphics/mr.jpg" width="200" height="234"/></p>
  64.       <p align="center"><font face="Arial" size="3"><xsl:value-of select="title"/></font></p>
  65.       <table width="200" border="0" cellspacing="0" cellpadding="0">
  66.         <tr>
  67.           <td><div align="center"><xsl:apply-templates select="previous"/></div></td>
  68.           <td><div align="center"><xsl:apply-templates select="next"/></div></td>
  69.         </tr>
  70.       </table>
  71. <table width="200" border="0" cellspacing="0" cellpadding="0">
  72.         <tr>
  73.           <td><div align="center"><xsl:choose>
  74.                                                             <xsl:when test="audio_info/@fname[. != '']">
  75.                                                                 <div align="left"><xsl:apply-templates select="audio_info"/></div>
  76.                                                             </xsl:when>
  77.                                                             <xsl:otherwise>
  78.                                                                 <div align="left"><img border="0" src="graphics/transparenth120.gif" width="1" height="1"/></div>
  79.                                                             </xsl:otherwise>
  80.                                                         </xsl:choose></div></td>
  81.           <td><div align="center"><xsl:choose>
  82.                                                     <xsl:when test="movie_info/@fname[. != '']">
  83.                                                         <div align="right"><xsl:apply-templates select="movie_info"/></div>
  84.                                                     </xsl:when>
  85.                                                     <xsl:otherwise>
  86.                                                         <div align="right"><img border="0" src="graphics/transparenth120.gif" width="1" height="1"/></div>
  87.                                                     </xsl:otherwise>
  88.                                                 </xsl:choose></div></td>
  89.         </tr>
  90.       </table>
  91.  
  92.       <p align="center"><font face="Arial" size="2"><div align="center">
  93.               <xsl:apply-templates select="description">
  94.                                             <!-- recursively apply this template to them -->
  95.                                             <xsl:template>
  96.                                                 <xsl:copy>
  97.                                                     <xsl:apply-templates select="@* | * | comment() | pi() | text()"/>
  98.                                                 </xsl:copy>
  99.                                             </xsl:template>
  100.                                         </xsl:apply-templates></div></font></p></td>
  101.     <td><div align="center">
  102.         <table width="600" border="3" cellspacing="3" cellpadding="3" bordercolor="#336633" height="480">
  103.           <tr>
  104.             <td><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>
  105.                         <xsl:attribute name="height"><xsl:value-of select="imagesize/@height"/></xsl:attribute>
  106.                         <xsl:attribute name="alt"><xsl:value-of select="title"/></xsl:attribute></IMG></div></td>
  107.           </tr>
  108.         </table>
  109.       </div>
  110.     </td>
  111.   </tr>
  112. </table>
  113.  
  114.  
  115. </body>
  116.         </xsl:element>
  117.     </xsl:template>
  118.         <xsl:template match="previous">
  119.         <xsl:value-of/>
  120.         <xsl:choose>
  121.             <xsl:when match="previous[@fname != '']">
  122.                 <A onMouseOver="MM_swapImage('Image1','','buttons/pinleft_over.gif',1)" onMouseOut="MM_swapImgRestore()">
  123.                     <xsl:attribute name="href"><xsl:value-of select="@fname"/></xsl:attribute>
  124.                     <img src="buttons/pinleft.gif" name="Image1" width="93" height="52" border="0"/></A>
  125.             </xsl:when>
  126.             <xsl:otherwise>
  127.                 <img src="buttons/pinleft.gif" width="93" height="52" border="0"/>
  128.             </xsl:otherwise>
  129.         </xsl:choose>
  130.     </xsl:template>
  131.     <xsl:template match="next">
  132.         <xsl:value-of/>
  133.         <xsl:choose>
  134.             <xsl:when match="next[@fname != '']">
  135.                 <A onMouseOver="MM_swapImage('Image2','','buttons/pinright_over.gif',1)" onMouseOut="MM_swapImgRestore()">                    <xsl:attribute name="href"><xsl:value-of select="@fname"/></xsl:attribute>
  136.                     <img src="buttons/pinright.gif" name="Image2" width="93" height="52" border="0"/></A>
  137.             </xsl:when>
  138.             <xsl:otherwise>
  139.                 <img src="buttons/pinright.gif" width="93" height="52" border="0"/>
  140.             </xsl:otherwise>
  141.         </xsl:choose>
  142.     </xsl:template>
  143.     <xsl:template match="audio_info">
  144.         <xsl:if match="audio_info[@fname != '']">
  145.             <A><xsl:attribute name="href"><xsl:value-of select="@fname"/></xsl:attribute>
  146.                 <img border="0" src="graphics/sound.gif"/></A>
  147.         </xsl:if>
  148.     </xsl:template>
  149.     <xsl:template match="movie_info">
  150.         <A><xsl:attribute name="href"><xsl:value-of select="@fname"/></xsl:attribute>
  151.             <img border="0" src="graphics/movie.gif" width="24" height="28"/></A>
  152.     </xsl:template>
  153.  
  154. </xsl:stylesheet>
  155.