home *** CD-ROM | disk | FTP | other *** search
/ 11 Top Anwendungen / CD_ROM_MAGAZIN.iso / MoneyMethod-Demo / MoneyMethod / Templates / green.xbt / XML / tabpages.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2000-04-28  |  2.9 KB  |  90 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:output method="html"/>
  6. <!--<xsl:strip-space elements='*'/>-->
  7.  
  8.  
  9. <xsl:include href="tabbody.xsl"/>
  10. <xsl:include href="tabnav.xsl"/>
  11.  
  12.  
  13. <xsl:template name="generate-table-pages">
  14.   <xsl:param name="count"/>        <!-- starting row number -->
  15.   <xsl:param name="tabnum"/>       <!-- current table number -->
  16.   <xsl:param name="splitcount"/>   <!-- number of rows in each table -->
  17.   <xsl:param name="preview"/>      <!-- generate all pages or one page -->
  18. <!-- execution context - category -->
  19.  
  20.  
  21.      <xt:document href="{concat ($filepath, 'tcat', position(), $tabnum, '.htm')}" method="htm">
  22.        <html>
  23.          <head>
  24.            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
  25.            <meta name="GENERATOR" content=""/>
  26.            <title>Electronic shop model</title>
  27.          </head>
  28.        <script>
  29.     <xsl:text disable-output-escaping="yes">
  30.     var loaded=false;
  31.     function netscape()
  32.     {
  33.      var name = navigator.appName;
  34.  
  35.      if(name.indexOf("Netscape") > -1) return(true);
  36.      else return (false);
  37.         }
  38.     </xsl:text>
  39.        </script>
  40.        <xsl:element name="body" use-attribute-sets="page-style">
  41.  
  42.        <br/>
  43.  
  44.     <table cellspacing="0" cellpadding="10" border="0" align="{$table-align}">
  45.       <tr>
  46.     <td valign="top">
  47.        <!-- here comes the table navigation controls -->
  48.        <xsl:call-template name="tabnavi">
  49.           <xsl:with-param name="tabnum" select="$tabnum"/>
  50.           <xsl:with-param name="count" select="$count"/>
  51.           <xsl:with-param name="splitcount" select="$splitcount"/>
  52.        </xsl:call-template>
  53.        <!-- here ends the table navigation controls -->
  54.     </td>
  55.     <td>
  56.     <xsl:call-template name="tabbody">
  57.       <xsl:with-param name="count"><xsl:value-of select="$count"/></xsl:with-param>        <!-- starting row number -->
  58.       <xsl:with-param name="splitcount"><xsl:value-of select="$splitcount"/></xsl:with-param>   <!-- number of rows in each table -->
  59.     </xsl:call-template>
  60.     </td>
  61.     </tr>
  62.     </table>
  63.  
  64.        </xsl:element>  <!--body -->
  65.  
  66.        <script src="scripts/xslcheck.js">
  67.        <xsl:comment>Comment</xsl:comment>
  68.        </script>
  69.        <script src="scripts/images.js">
  70.        <xsl:comment>Comment</xsl:comment>
  71.        </script>
  72.        <script>
  73.        loaded = true;
  74.        </script>
  75.        </html>
  76.      </xt:document>
  77.   
  78.   <xsl:if test="$preview != 'yes'">
  79.   <xsl:if test="count(ancestor-or-self::category/row)>=$count+$splitcount">
  80.     <xsl:call-template name="generate-table-pages">
  81.        <xsl:with-param name="count" select="$count+$splitcount"/>
  82.        <xsl:with-param name="tabnum" select="$tabnum+1"/>
  83.        <xsl:with-param name="splitcount" select="$splitcount"/>
  84.     </xsl:call-template>
  85.   </xsl:if>
  86.   </xsl:if>
  87. </xsl:template> <!-- end generate-table-pages -->
  88.  
  89. </xsl:stylesheet>
  90.