home *** CD-ROM | disk | FTP | other *** search
/ 11 Top Anwendungen / CD_ROM_MAGAZIN.iso / MoneyMethod-Demo / MoneyMethod / Templates / green.xbt / XML / tabnav.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2000-05-06  |  4.1 KB  |  100 lines

  1. <!-- Written by Afonin Evgeny -->
  2. <!-- Table "navigation" controls template -->
  3.  
  4. <xsl:stylesheet
  5.   version="1.0"
  6.   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  7.   xmlns:xt="http://www.jclark.com/xt">
  8. <xsl:output method="html"/>
  9. <!--<xsl:strip-space elements='*'/>-->
  10.  
  11. <xsl:template name="tabnavi">
  12. <xsl:param name="tabnum"/>
  13. <xsl:param name="count"/>
  14. <xsl:param name="splitcount"/>
  15. <!-- execution context - category -->
  16.  
  17. <!--        <p align="left"><a href="orderlist.htm">Proceed with order</a></p>
  18.         <p align="right" hspace="20">-->
  19.  
  20. <table cellspacing="0" cellpadding="0" border="0" width="69"><!-- startofnav -->
  21.     <tr><td align="right"><img src="{concat($respath,'Images/clean.gif')}" name="caption" hspace="7"/></td></tr>
  22.      <tr><td align="right">
  23.         <a href="index.htm" target="_top"
  24.            onmouseover="if (loaded) img_act('a2', 'main'); return true;"
  25.            onmouseout ="if (loaded) img_inact('a2'); return true;">
  26.          <img src="{concat($respath, 'Images/main.gif')}" name="a2" border="0" alt="Hauptmenu"/>
  27.         </a>
  28.         </td></tr>
  29.  
  30.         <tr><td align="right">
  31.         <a href="orderlist.htm"
  32.              onmouseover = "if (loaded) img_act('a3','best'); return true;"
  33.              onmouseout  = "if (loaded) img_inact('a3'); return true;">
  34.            <img src="{concat($respath, 'Images/buy.gif')}" name="a3" border="0" alt="Bestellen"/>
  35.         </a>
  36.         </td></tr>
  37.  
  38.      <tr><td align="right">
  39.                         <!-- start of tables sequence -->
  40.         <xsl:choose>
  41.         <xsl:when test="$tabnum>1">
  42.                 <a href="{concat ('tcat', position(), number($tabnum)-1,'.htm')}"
  43.                  onmouseover = "if (loaded) img_act('a1','prev'); return true;"
  44.                  onmouseout  = "if (loaded) img_inact('a1'); return true;">
  45.                 <img src="{concat($respath, 'Images/prev.gif')}" border="0" alt="Vorher" name="a1"/>
  46.                 </a>
  47.         </xsl:when>
  48.                         <!-- link to previous category -->
  49.         <xsl:when test="preceding-sibling::category and $tabnum=1">
  50.                 <a href="{concat ('tcat', position()-1, ceiling( count(preceding-sibling::category[1]/row) div $splitcount), '.htm')}"
  51.                  onmouseover = "if (loaded) img_act('a1','prev'); return true;"
  52.                  onmouseout  = "if (loaded) img_inact('a1'); return true;">
  53.                 <img src="{concat($respath, 'Images/prev.gif')}" border="0" alt="Vorher" name="a1"/>
  54.                 </a>
  55.         </xsl:when>
  56.        <xsl:otherwise>
  57.                   <img src="{concat($respath, 'Images/prev.gif')}" border="0" alt="Vorher" name="a1"/>
  58.        </xsl:otherwise>
  59.       </xsl:choose>
  60.         </td></tr>
  61.  
  62.      <tr><td align="right">
  63.                         <!-- link to next table in category -->
  64.         <xsl:choose>
  65.         <xsl:when test="count(ancestor-or-self::category/row)>=$count+$splitcount">
  66.                 <a href="{concat ('tcat', position(), number($tabnum)+1,'.htm')}"
  67.                  onmouseover = "if (loaded) img_act('a4','next'); return true;"
  68.                  onmouseout  = "if (loaded) img_inact('a4'); return true;">
  69.                 <img src="{concat($respath, 'Images/next.gif')}" border="0" alt="Weiter" name="a4"/>
  70.                 </a>
  71.         </xsl:when>
  72.                         <!-- link to next category -->
  73.         <xsl:when test="$count+$splitcount>count(ancestor-or-self::category/row) and following-sibling::category">
  74.                 <a href="{concat ('tcat', position()+1, '1.htm')}"
  75.                  onmouseover = "if (loaded) img_act('a4','next'); return true;"
  76.                  onmouseout  = "if (loaded) img_inact('a4'); return true;">
  77.                 <img src="{concat($respath, 'Images/next.gif')}" border="0" alt="Weiter" name="a4"/>
  78.                 </a>
  79.         </xsl:when>
  80.  
  81.  
  82.         <xsl:otherwise>
  83.                 <img src="{concat($respath, 'Images/next.gif')}" border="0" alt="Weiter"/>
  84.         </xsl:otherwise>
  85.         </xsl:choose>
  86.  
  87.     </td>
  88.     </tr>
  89.  
  90.     <tr>
  91.     <td align="right">
  92.     <img src="{concat($respath, 'Images/bott.gif')}" border="0" alt=""/>
  93.     </td>
  94.     </tr>
  95. </table> <!-- endofnav -->
  96.  
  97. </xsl:template>
  98.  
  99. </xsl:stylesheet>
  100.