home *** CD-ROM | disk | FTP | other *** search
/ 11 Top Anwendungen / CD_ROM_MAGAZIN.iso / MoneyMethod-Demo / Beispiel / source / XML / cardnav.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2000-05-29  |  4.0 KB  |  132 lines

  1. <xsl:stylesheet
  2.   version="1.0"
  3.   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  4.   xmlns:xt="http://www.jclark.com/xt">
  5. <xsl:strip-space elements="*"/>
  6. <xsl:output method="html"/>
  7.  
  8.  
  9. <xsl:template name="cardnav">
  10.    <xsl:param name="splitcount"/>
  11.  
  12.    <xsl:variable name="catpos"><xsl:number count="//category"/></xsl:variable>
  13.  
  14. <table width="100%" cellspacing="0" cellpadding="0" border="0">
  15. <tr>
  16. <td width="70%">
  17.         <table cellspacing="0" cellpadding="0" border="0" width="100%">
  18.         <tr>
  19.         <td height="20">
  20.      <nobr>
  21.             <font face="arial" size="3" color="#382574">
  22.                 <p align="left">
  23.                     <xsl:value-of select="@name"/>
  24.                 </p>
  25.             </font>
  26.     </nobr> </td>
  27.         </tr>
  28.     <tr>
  29.     <td>
  30.           <table width="100%" height="1" bgcolor="#6865A8" cellspacing="0" cellpadding="0" border="0">
  31.           <tr><td><img src="{concat ($respath, 'Images/pixel.gif')}"/>
  32.           </td></tr></table>
  33.         </td>
  34.     </tr>
  35.         <tr>
  36.     <td height="20"><img src="{concat ($respath, 'Images/pixel.gif')}"/></td>
  37.     </tr>    
  38.         </table>
  39.     </td>
  40.     <td>
  41.  
  42.  
  43.     <table cellspacing="0" cellpadding="0" border="0">
  44.     <tr>
  45.     <td>
  46.     <img src="{concat($respath,'Images/left.gif')}"/>
  47.     </td>
  48.     <td>
  49.       <a href="index.htm" target="_top"
  50.        onMouseOver="if (loaded) img_act('a2','main'); return true"
  51.        onMouseOut ="if (loaded) img_inact('a2'); return true">
  52.        <img src="{concat($respath, 'Images/main.gif')}" name="a2" border="0" alt="Hauptmenu"/>
  53.      </a>
  54.         </td>
  55.     <td>
  56.        <!-- go top -->
  57.        <a href="{concat('tcat', $catpos, ceiling(position() div $splitcount),'.htm')}"
  58.          onMouseOver="if (loaded)img_act('a5','totop'); return true"
  59.          onMouseOut ="if (loaded)img_inact('a5'); return true">
  60.             <img src="{concat($respath, 'Images/top.gif')}" border="0" alt="Hoch" name="a5"/>
  61.        </a>
  62.         </td>
  63.     <td>
  64.                            <!-- link to previous card -->
  65.        <xsl:choose>
  66.        <xsl:when test="preceding::row">
  67.             <a href="{concat ('card', @number - 1, '.htm')}"
  68.             onMouseOver="if (loaded)img_act('a1','prev'); return true"
  69.             onMouseOut= "if (loaded)img_inact('a1'); return true"         
  70.             >
  71.             <img border="0" src="{concat($respath, 'Images/prev.gif')}" name="a1"/>
  72.             </a>
  73.        </xsl:when>
  74.        <xsl:otherwise>
  75.             <img border="0" src="{concat($respath, 'Images/prev.gif')}"/>
  76.        </xsl:otherwise>
  77.        </xsl:choose>
  78.     </td>
  79.  
  80.     <td>
  81.        <!-- link to next card -->
  82.        <xsl:choose>
  83.        <xsl:when test="following::row">
  84.             <a href="{concat ('card', @number + 1,'.htm')}"              
  85.               onMouseOver="if (loaded) img_act('a4', 'next'); return true;"
  86.               onMouseOut=" if (loaded) img_inact('a4'); return true">
  87.              <img src="{concat($respath, 'Images/next.gif')}" border="0" name="a4"/>
  88.             </a>
  89.        </xsl:when>
  90.        <xsl:otherwise>
  91.             <img src="{concat($respath, 'Images/next.gif')}" border="0"/>
  92.        </xsl:otherwise>
  93.        </xsl:choose>
  94.     </td>
  95.     <td>
  96.     <img src="{concat($respath,'Images/right.gif')}"/>
  97.     </td>
  98.     </tr>
  99.     </table>
  100.     </td>
  101.     <td width="20%">
  102.  
  103.     <table cellspacing="0" cellpadding="0" width="100%" border="0">
  104.     <tr>
  105.     <td><img src="{concat($respath,'Images/clean.gif')}" name="caption"/></td>
  106.     </tr>
  107.     <tr>
  108.     <td>        
  109.     <table width="100%" height="1" bgcolor="#6865A8" cellspacing="0" cellpadding="0" border="0">
  110.     <tr><td><img src="{concat ($respath, 'Images/pixel.gif')}"/></td></tr></table>
  111.     </td>
  112.     </tr>
  113.     <tr>
  114.     <td><img src="{concat($respath,'Images/clean.gif')}"/></td>
  115.     </tr>
  116.     </table>
  117.  
  118. </td>
  119. </tr>
  120. </table>
  121. <p><br/></p>
  122. </xsl:template>
  123.  
  124. <xsl:template match="cell|linkcell" mode="card">
  125.   <xsl:variable name="cellnum"><xsl:number count="//cell|linkcell"/></xsl:variable>
  126.   <p>
  127.     <xsl:value-of select="ancestor::table/colnames/colname[position()=$cellnum]"/>:
  128.     <xsl:value-of select='.'/>
  129.   </p>
  130. </xsl:template>
  131.  
  132. </xsl:stylesheet>