forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject cvs commit: xml-forrest/src/resources/skins/common/xslt/html book2menu.xsl tab2menu.xsl
Date Sat, 16 Nov 2002 23:01:48 GMT
jefft       2002/11/16 15:01:48

  Modified:    src/resources/skins/common/xslt/html book2menu.xsl
                        tab2menu.xsl
  Log:
  - Remove duplicated tabs template
  - Make tab2menu.xsl work out the box in 'common' skin
  
  Revision  Changes    Path
  1.2       +12 -6     xml-forrest/src/resources/skins/common/xslt/html/book2menu.xsl
  
  Index: book2menu.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/common/xslt/html/book2menu.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- book2menu.xsl	16 Nov 2002 20:58:12 -0000	1.1
  +++ book2menu.xsl	16 Nov 2002 23:01:48 -0000	1.2
  @@ -10,6 +10,17 @@
   -->
   
   <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  +
  +  <xsl:template match="menu">
  +    <div class="menu">
  +      <xsl:call-template name="base-menu"/>
  +    </div>
  +  </xsl:template>
  +
  +  <xsl:template name="base-menu">
  +    <xsl:apply-templates/>
  +  </xsl:template>
  +
     <xsl:param name="path"/>
   
     <xsl:include href="pathutils.xsl"/>
  @@ -22,11 +33,6 @@
   
     <xsl:template match="book">
       <xsl:apply-templates select="menu"/>
  -  </xsl:template>
  -
  -  <xsl:template match="menu">
  -    <xsl:value-of select="@label"/>
  -    <xsl:apply-templates/>
     </xsl:template>
   
     <xsl:template match="menu-item">
  
  
  
  1.2       +19 -13    xml-forrest/src/resources/skins/common/xslt/html/tab2menu.xsl
  
  Index: tab2menu.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/common/xslt/html/tab2menu.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- tab2menu.xsl	16 Nov 2002 20:58:12 -0000	1.1
  +++ tab2menu.xsl	16 Nov 2002 23:01:48 -0000	1.2
  @@ -26,23 +26,15 @@
   <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   
     <!-- ================================================================ -->
  -  <!-- This template MUST be overridden                                 -->
  +  <!-- These templates SHOULD be overridden                             -->
     <!-- ================================================================ -->
   
     <xsl:template match="tabs">
  -    <xsl:call-template name="pre-separator"/>
  -    <xsl:for-each select="tab">
  -      <xsl:if test="position()!=1"><xsl:call-template name="separator"/></xsl:if>
  -      <xsl:apply-templates select="."/>
  -    </xsl:for-each>
  -    <xsl:call-template name="post-separator"/>
  +    <div class="tab">
  +      <xsl:call-template name="base-tabs"/>
  +    </div>
     </xsl:template>
   
  -
  -  <!-- ================================================================ -->
  -  <!-- These templates SHOULD be overridden                             -->
  -  <!-- ================================================================ -->
  -
     <!-- Called before first tag -->
     <xsl:template name="pre-separator">
     </xsl:template>
  @@ -102,6 +94,18 @@
       </xsl:call-template>
     </xsl:variable>
   
  +  <!-- Called from tabs, after it has written the outer 'div class=tabs' and
  +  any other HTML -->
  +  <xsl:template name="base-tabs">
  +    <xsl:call-template name="pre-separator"/>
  +    <xsl:for-each select="tab">
  +      <xsl:if test="position()!=1"><xsl:call-template name="separator"/></xsl:if>
  +      <xsl:apply-templates select="."/>
  +    </xsl:for-each>
  +    <xsl:call-template name="post-separator"/>
  +  </xsl:template>
  +
  +
     <xsl:template match="tab">
       <xsl:choose>
         <xsl:when test="@dir = $longest-dir or @href = $longest-dir">
  @@ -113,10 +117,12 @@
       </xsl:choose>
     </xsl:template>
   
  +  <!-- Called from 'selected' -->
     <xsl:template name="base-selected">
       <xsl:value-of select="@label"/>
     </xsl:template>
   
  +  <!-- Called from 'not-selected' -->
     <xsl:template name="base-not-selected">
       <a>
         <xsl:attribute name="href">
  
  
  

Mime
View raw message