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/forrest-site/xslt/html book2menu.xsl document2html.xsl site2xhtml.xsl tab2menu.xsl
Date Sat, 16 Nov 2002 20:58:13 GMT
jefft       2002/11/16 12:58:13

  Modified:    .        status.xml
               src/resources/skins/avalon-tigris/xslt/html book2menu.xsl
                        document2html.xsl site2xhtml.xsl tab2menu.xsl
               src/resources/skins/forrest-site/xslt/html book2menu.xsl
                        document2html.xsl site2xhtml.xsl tab2menu.xsl
  Added:       src/resources/skins/common/xslt/html book2menu.xsl
                        document2html.xsl dotdots.xsl pathutils.xsl
                        renderlogo.xsl site2xhtml.xsl split.xsl
                        tab2menu.xsl tabutils.xsl
  Log:
  Factored out common structural stuff into reusable XSLTs, leaving just
  presentational XSLT in each skin.
  
  Revision  Changes    Path
  1.60      +4 -0      xml-forrest/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/status.xml,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- status.xml	16 Nov 2002 19:55:29 -0000	1.59
  +++ status.xml	16 Nov 2002 20:58:12 -0000	1.60
  @@ -200,6 +200,10 @@
    <changes>
      
      <release version="0.3-dev" date="unreleased">
  +    <action dev="JT" type="update" context="skins">
  +     Rewrite skins to share a common block of XSLT, which is used via
  +     &lt;xsl:import&gt;. This should make skin maintenance much easier.
  +     </action>
        <action dev="JT" type="remove" context="skins">
          Removed the 'basic' skin, to be shortly replaced with something much more
          maintainable.
  
  
  
  1.3       +19 -30    xml-forrest/src/resources/skins/avalon-tigris/xslt/html/book2menu.xsl
  
  Index: book2menu.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/avalon-tigris/xslt/html/book2menu.xsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- book2menu.xsl	9 Nov 2002 13:38:01 -0000	1.2
  +++ book2menu.xsl	16 Nov 2002 20:58:12 -0000	1.3
  @@ -1,14 +1,12 @@
   <?xml version="1.0"?>
  -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  -  <xsl:param name="path"/>
  +<!--
  +book2menu.xsl generates the HTML menu.  See the imported book2menu.xsl for
  +details.
  +-->
   
  -  <xsl:include href="pathutils.xsl"/>
  +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   
  -  <xsl:variable name="filename-noext">
  -    <xsl:call-template name="filename-noext">
  -      <xsl:with-param name="path" select="$path"/>
  -    </xsl:call-template>
  -  </xsl:variable>
  +  <xsl:import href="../../../common/xslt/html/book2menu.xsl"/>
   
     <xsl:template match="book">
       <div class="menuBar">
  @@ -19,38 +17,29 @@
     <xsl:template match="menu">
       <div class="menu">
         <span class="menuLabel"><xsl:value-of select="@label"/></span>
  -       <xsl:apply-templates/>
  +      <xsl:apply-templates/>
       </div>
     </xsl:template>
   
     <xsl:template match="menu-item">
       <div class="menuItem">
  -       <xsl:choose>
  -        <xsl:when test="starts-with(@href, $filename-noext)">
  -          <span class="menuSelected"><xsl:value-of select="@label"/></span>
  -        </xsl:when>
  -        <xsl:otherwise>
  -          <a href="{@href}"><xsl:value-of select="@label"/></a>
  -        </xsl:otherwise>
  -      </xsl:choose>
  +      <xsl:apply-imports/>
       </div>
     </xsl:template>
   
  -  <xsl:template match="external">
  -    <li>
  -       <xsl:choose>
  -        <xsl:when test="starts-with(@href, $filename-noext)">
  -         <span class="externalSelected"><xsl:value-of select="@label"/></span>
  -        </xsl:when>
  -        <xsl:otherwise>
  -          <a href="{@href}" target="_blank"><xsl:value-of select="@label"/></a>
  -        </xsl:otherwise>
  -      </xsl:choose>
  -    </li>
  +  <xsl:template name="selected">
  +    <span class="menuSelected">
  +      <xsl:value-of select="@label"/>
  +    </span>
     </xsl:template>
   
  -  <xsl:template match="menu-item[@type='hidden']"/>
  +  <xsl:template name="print-external">
  +    <font color="#ffcc00">
  +      <span class="externalSelected">
  +        <xsl:apply-imports/>
  +      </span>
  +    </font>
  +  </xsl:template>
   
  -  <xsl:template match="external[@type='hidden']"/>
   
   </xsl:stylesheet>
  
  
  
  1.3       +10 -229   xml-forrest/src/resources/skins/avalon-tigris/xslt/html/document2html.xsl
  
  Index: document2html.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/avalon-tigris/xslt/html/document2html.xsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- document2html.xsl	9 Nov 2002 11:37:44 -0000	1.2
  +++ document2html.xsl	16 Nov 2002 20:58:12 -0000	1.3
  @@ -1,246 +1,27 @@
   <?xml version="1.0"?>
  -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  -
  -  <xsl:include href = "split.xsl"/>
  -
  -  <xsl:param name="isfaq"/>
  -  <xsl:param name="resource"/> <!-- Filename part, eg 'index' from index.html' -->
  -  <xsl:param name="dir"/>
  -  <xsl:include href="dotdots.xsl"/>
  -
  -  <xsl:variable name="root">
  -    <xsl:call-template name="dotdots">
  -      <xsl:with-param name="path" select="$dir"/>
  -    </xsl:call-template>
  -  </xsl:variable>
  - 
  -  <xsl:variable name="skin-img-dir" select="concat(string($root), 'skin/images')"/>
  -
  -  <xsl:template match="document">
  -    <div class="content">
  -      <xsl:if test="normalize-space(header/title)!=''">
  -        <table class="title">
  -          <tr> 
  -            <td valign="middle"> 
  -              <h1>
  -                <xsl:value-of select="header/title"/>
  -              </h1>
  -            </td>
  -            <!--td align="center" width="80" nowrap><a href="" class="dida"><img src="images/singlepage.gif"><br>
  -              single page<br>
  -              version</a></td>
  -            <td align="center" width="80" nowrap="nowrap"><a href="{$resource}.pdf" class="dida"><img border="0" src="{$skin-img-dir}/printer.gif"/><br/>
  -              print-friendly<br/>
  -              version</a></td>-->
  -          </tr>
  -        </table>
  -      </xsl:if>
  -      <xsl:if test="normalize-space(header/subtitle)!=''">
  -        <h3>
  -          <xsl:value-of select="header/subtitle"/>
  -        </h3>
  -      </xsl:if>
  -      <xsl:if test="header/authors">
  -        <p>
  -          <font size="-2">
  -            <xsl:for-each select="header/authors/person">
  -              <xsl:choose>
  -                <xsl:when test="position()=1">by&#160;</xsl:when>
  -                <xsl:otherwise>,&#160;</xsl:otherwise>
  -              </xsl:choose>
  -              <xsl:value-of select="@name"/>
  -            </xsl:for-each>
  -          </font>
  -        </p>
  -      </xsl:if>
  -      <xsl:apply-templates select="body"/>
  -    </div>
  -  </xsl:template>
  +<!--
  +This stylesheet contains templates for converting documentv11 to HTML.  See the
  +imported document2html.xsl for details.
  +-->
   
  -  <xsl:template match="body">
  -    <xsl:if test="section and not($isfaq='true')">
  -      <ul class="minitoc">
  -        <xsl:for-each select="section">
  -          <li>
  -            <a href="#{generate-id()}">
  -              <xsl:value-of select="title"/>
  -            </a>
  -            <xsl:if test="section">
  -              <ul class="minitoc">
  -                <xsl:for-each select="section">
  -                  <li>
  -                    <a href="#{generate-id()}">
  -                      <xsl:value-of select="title"/>
  -                    </a>
  -                  </li>
  -                </xsl:for-each>
  -              </ul>
  -            </xsl:if>
  -          </li>
  -        </xsl:for-each>
  -      </ul>
  -    </xsl:if>
  -    <xsl:apply-templates/>
  -  </xsl:template>
  +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   
  +  <xsl:import href="../../../common/xslt/html/document2html.xsl"/>
   
  -  <!-- Generate a <a name="..."> tag for an @id -->
  -  <xsl:template match="@id">
  -    <xsl:if test="normalize-space(.)!=''">
  -      <a>
  -        <xsl:attribute name="name">
  -          <xsl:value-of select="."/>
  -        </xsl:attribute>
  -      </a>
  -    </xsl:if>
  +  <xsl:template name="pdflink">
  +    <!-- No PDFs thankyou -->
     </xsl:template>
   
  -  <!--  section handling
  -  - <a name/> anchors are added if the id attribute is specified
  -  - generated anchors are still included for TOC - what should we do about this?
  -  - FIXME: provide a generic facility to process section irrelevant to their
  -    nesting depth
  --->
     <xsl:template match="section">
  -    <a name="{generate-id()}"/>
  -    <xsl:apply-templates select="@id"/>
  -    <xsl:if test="normalize-space(@id)!=''">
  -      <a name="{@id}"/>
  -    </xsl:if>
       <div class="section">
  -    <h3>
  -      <xsl:value-of select="title"/>
  -    </h3>
  -    <xsl:apply-templates select="*[not(self::title)]"/>
  +      <xsl:apply-imports/>
       </div>
     </xsl:template>
   
     <xsl:template match="section/section">
  -    <a name="{generate-id()}"/>
  -    <xsl:apply-templates select="@id"/>
  -    <xsl:if test="normalize-space(@id)!=''">
  -      <a name="{@id}"/>
  -    </xsl:if>
       <div class="subsection">
  -    <h4>
  -      <xsl:value-of select="title"/>
  -    </h4>
  -    <xsl:apply-templates select="*[not(self::title)]"/>
  -    </div>
  -  </xsl:template>
  -
  -  <xsl:template match="note | warning | fixme">
  -    <xsl:apply-templates select="@id"/>
  -    <div class="frame {local-name()}">
  -      <div class="label">
  -        <xsl:choose>
  -          <xsl:when test="local-name() = 'note'">Note</xsl:when>
  -          <xsl:when test="local-name() = 'warning'">Warning</xsl:when>
  -          <xsl:otherwise>Fixme (
  -               <xsl:value-of select="@author"/>
  -
  -               )</xsl:otherwise>
  -        </xsl:choose>
  -      </div>
  -      <div class="content">
  -        <xsl:apply-templates/>
  -      </div>
  -    </div>
  -  </xsl:template>
  -
  -  <xsl:template match="link">
  -    <xsl:apply-templates select="@id"/>
  -    <a href="{@href}">
  -      <xsl:apply-templates/>
  -    </a>
  -  </xsl:template>
  -
  -  <xsl:template match="jump">
  -    <xsl:apply-templates select="@id"/>
  -    <a href="{@href}" target="_top">
  -      <xsl:apply-templates/>
  -    </a>
  -  </xsl:template>
  -
  -  <xsl:template match="fork">
  -    <xsl:apply-templates select="@id"/>
  -    <a href="{@href}" target="_blank">
  -      <xsl:apply-templates/>
  -    </a>
  -  </xsl:template>
  -
  -  <xsl:template match="p[@xml:space='preserve']">
  -    <xsl:apply-templates select="@id"/>
  -    <div class="pre">
  -      <xsl:apply-templates/>
  +      <xsl:apply-imports/>
       </div>
     </xsl:template>
   
  -  <xsl:template match="source">
  -    <xsl:apply-templates select="@id"/>
  -    <pre class="code">
  -<!-- Temporarily removed long-line-splitter ... gives out-of-memory problems -->
  -      <xsl:apply-templates/>
  -<!--
  -    <xsl:call-template name="format">
  -    <xsl:with-param select="." name="txt" /> 
  -     <xsl:with-param name="width">80</xsl:with-param> 
  -     </xsl:call-template>
  --->
  -    </pre>
  -  </xsl:template>
  -
  -  <xsl:template match="anchor">
  -    <a name="{@id}"/>
  -  </xsl:template>
  -
  -  <xsl:template match="icon">
  -    <xsl:apply-templates select="@id"/>
  -    <img src="{@src}" alt="{@alt}">
  -      <xsl:if test="@height">
  -        <xsl:attribute name="height"><xsl:value-of select="@height"/></xsl:attribute>
  -      </xsl:if>
  -      <xsl:if test="@width">
  -        <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
  -      </xsl:if>
  -    </img>
  -  </xsl:template>
  -
  -  <xsl:template match="code">
  -    <xsl:apply-templates select="@id"/>
  -    <span class="codefrag"><xsl:value-of select="."/></span>
  -  </xsl:template>
  -
  -  <xsl:template match="figure">
  -    <xsl:apply-templates select="@id"/>
  -    <div align="center">
  -      <img src="{@src}" alt="{@alt}" class="figure">
  -        <xsl:if test="@height">
  -          <xsl:attribute name="height"><xsl:value-of select="@height"/></xsl:attribute>
  -        </xsl:if>
  -        <xsl:if test="@width">
  -          <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
  -        </xsl:if>
  -      </img>
  -    </div>
  -  </xsl:template>
  -
  -  <xsl:template match="table">
  -    <xsl:apply-templates select="@id"/>
  -    <table cellpadding="4" cellspacing="1" class="ForrestTable">
  -      <xsl:if test="@cellspacing"><xsl:attribute name="cellspacing"><xsl:value-of select="@cellspacing"/></xsl:attribute></xsl:if>
  -      <xsl:if test="@cellpadding"><xsl:attribute name="cellpadding"><xsl:value-of select="@cellpadding"/></xsl:attribute></xsl:if>
  -      <xsl:if test="@border"><xsl:attribute name="border"><xsl:value-of select="@border"/></xsl:attribute></xsl:if>
  -      <xsl:if test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:if>
  -      <xsl:if test="@bgcolor"><xsl:attribute name="bgcolor"><xsl:value-of select="@bgcolor"/></xsl:attribute></xsl:if>
  -      <xsl:apply-templates/>
  -    </table>
  -  </xsl:template>
  -
  -  <xsl:template match="node()|@*" priority="-1">
  -    <xsl:copy>
  -      <xsl:apply-templates select="@*"/>
  -      <xsl:apply-templates/>
  -    </xsl:copy>
  -  </xsl:template>
   </xsl:stylesheet>
  
  
  
  1.3       +23 -27    xml-forrest/src/resources/skins/avalon-tigris/xslt/html/site2xhtml.xsl
  
  Index: site2xhtml.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/avalon-tigris/xslt/html/site2xhtml.xsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- site2xhtml.xsl	7 Nov 2002 16:05:53 -0000	1.2
  +++ site2xhtml.xsl	16 Nov 2002 20:58:12 -0000	1.3
  @@ -1,25 +1,28 @@
   <?xml version="1.0"?>
  +<!--
  +site2xhtml.xsl is the final stage in HTML page production.  It merges HTML from
  +document2html.xsl, tab2menu.xsl and book2menu.xsl, and adds the site header,
  +footer, searchbar, css etc.  As input, it takes XML of the form:
  +
  +<site>
  +  <div class="menu">
  +    ...
  +  </div>
  +  <div class="tab">
  +    ...
  +  </div>
  +  <div class="content">
  +    ...
  +  </div>
  +</site>
  +
  +$Id$
  +-->
  +
   <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  -   <!-- Default skinconf.xml in the skins/ directory -->
  -  <xsl:param name="config-file" select="'../../../../skinconf.xml'"/>
  -  <xsl:variable name="config" select="document($config-file)/skinconfig"/>
  -  <xsl:param name="path"/>
  -  <xsl:include href="pathutils.xsl"/>
  -  <xsl:include href="dotdots.xsl"/>
  -  <xsl:include href="renderlogo.xsl"/>
  -
  -  <xsl:variable name="root">
  -    <xsl:call-template name="dotdots">
  -      <xsl:with-param name="path" select="$path"/>
  -    </xsl:call-template>
  -  </xsl:variable>
  - 
  -  <xsl:variable name="filename">
  -    <xsl:call-template name="filename">
  -      <xsl:with-param name="path" select="$path"/>
  -    </xsl:call-template>
  -  </xsl:variable>
  -  
  +
  +  <xsl:import href="../../../common/xslt/html/site2xhtml.xsl"/>
  +
     <xsl:template match="site">
       <html>
         <head>
  @@ -165,13 +168,6 @@
   
         </body>
       </html>
  -    </xsl:template>
  -
  -    <xsl:template match="node()|@*" priority="-1">
  -      <xsl:copy>
  -        <xsl:apply-templates select="@*"/>
  -        <xsl:apply-templates/>
  -      </xsl:copy>
       </xsl:template>
   
   </xsl:stylesheet>
  
  
  
  1.2       +26 -76    xml-forrest/src/resources/skins/avalon-tigris/xslt/html/tab2menu.xsl
  
  Index: tab2menu.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/avalon-tigris/xslt/html/tab2menu.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- tab2menu.xsl	5 Nov 2002 07:36:49 -0000	1.1
  +++ tab2menu.xsl	16 Nov 2002 20:58:12 -0000	1.2
  @@ -1,89 +1,39 @@
   <?xml version="1.0"?>
  +<!--
  +This stylesheet generates 'tabs' at the top left of the screen.
  +See the imported tab2menu.xsl for details.
  +-->
  +
   <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  -  <xsl:param name="path"/>
  -  <xsl:param name="dir_index" select="'index.html'"/>
  -  <xsl:include href="dotdots.xsl"/>
  -  <xsl:include href="pathutils.xsl"/>
  -
  -  <!-- NOTE: Xalan has a bug (race condition?) where sometimes $root is only half-evaluated -->
  -  <xsl:variable name="root">
  -    <xsl:call-template name="dotdots">
  -      <xsl:with-param name="path" select="$path"/>
  -    </xsl:call-template>
  -  </xsl:variable>
  -
  -
  -  <!--
  -    The longest path of any tab, whose path is a subset of the current URL.  Ie,
  -    the path of the 'current' tab.
  -  -->
  -  <xsl:variable name="longest-dir">
  -    <xsl:for-each select="/tabs/tab[starts-with($path, @dir|@href)]">
  -      <xsl:sort select="string-length(@dir|@href)"
  -                data-type="number" order="descending"/>
  -      <xsl:if test="position()=1">
  -        <xsl:value-of select="@dir|@href"/>
  -      </xsl:if>
  -    </xsl:for-each>
  -  </xsl:variable>
   
  -  <xsl:template name="separator">|</xsl:template>
  +  <xsl:import href="../../../common/xslt/html/tab2menu.xsl"/>
   
  -  <xsl:template name="selected">
  -    <span class="selectedTab"><xsl:value-of select="@label"/></span>
  +  <xsl:template match="tabs">
  +    <div class="tab">
  +      <xsl:apply-imports/>
  +    </div>
     </xsl:template>
   
  -  <xsl:template name="not-selected">
  -    <span class="unselectedTab">
  -    <a>
  -      <xsl:attribute name="href">
  -        <xsl:if test="starts-with(@href, 'http')">
  -          <!-- Absolute URL -->
  -          <xsl:value-of select="@href"/>
  -        </xsl:if>
  -        <xsl:if test="not(starts-with(@href, 'http'))">
  -          <!-- Root-relative path -->
  -          <xsl:variable name="backpath">
  -            <xsl:value-of select="$root"/>
  -            <xsl:text>/</xsl:text>
  -            <xsl:value-of select="@dir|@href"/>
  -              <!-- If we obviously have a directory, add /index.html -->
  -            <xsl:if test="@dir or substring(@href, string-length(@href), string-length(@href)) = '/'">
  -              <xsl:text>/</xsl:text>
  -              <xsl:value-of select="$dir_index"/>
  -            </xsl:if>
  -          </xsl:variable>
  -          <xsl:value-of
  -                select="translate(normalize-space(translate($backpath, ' /', '/ ')), ' /', '/ ')"/>
  -
  -          <!-- Link to backpath, normalizing slashes -->
  -        </xsl:if>
  -      </xsl:attribute>
  -      <xsl:value-of select="@label"/>
  -    </a>
  -    </span>
  +  <xsl:template name="pre-separator">
     </xsl:template>
   
  -  <xsl:template match="tabs">
  -    <div class="tab">
  -      <xsl:for-each select="tab">
  -        <xsl:if test="position()!=1"><xsl:call-template name="separator"/></xsl:if>
  -        <xsl:text> </xsl:text>
  -        <xsl:apply-templates select="."/>
  -        <xsl:text> </xsl:text>
  -      </xsl:for-each>
  -    </div>
  +  <xsl:template name="post-separator">
  +  </xsl:template>
  +
  +  <xsl:template name="separator">
  +    <xsl:text> | </xsl:text>
  +  </xsl:template>
  +
  +  <xsl:template name="selected" mode="print">
  +    <span class="selectedTab">
  +      <xsl:call-template name="base-selected"/>
  +    </span>
     </xsl:template>
   
  -  <xsl:template match="tab">
  -    <xsl:choose>
  -      <xsl:when test="@dir = $longest-dir or @href = $longest-dir">
  -        <xsl:call-template name="selected"/>
  -      </xsl:when>
  -      <xsl:otherwise>
  -        <xsl:call-template name="not-selected"/>
  -      </xsl:otherwise>
  -    </xsl:choose>
  +  <xsl:template name="not-selected" mode="print">
  +    <span class="unselectedTab">
  +      <xsl:call-template name="base-not-selected"/>
  +    </span>
     </xsl:template>
   
   </xsl:stylesheet>
  
  
  
  1.1                  xml-forrest/src/resources/skins/common/xslt/html/book2menu.xsl
  
  Index: book2menu.xsl
  ===================================================================
  <?xml version="1.0"?>
  <!--
  book2menu.xsl generates the HTML menu. It outputs XML/HTML of the form:
    <div class="menu">
       ...
    </div>
  which is then merged with other HTML by site2xhtml.xsl
  
  $Id: book2menu.xsl,v 1.1 2002/11/16 20:58:12 jefft Exp $
  -->
  
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:param name="path"/>
  
    <xsl:include href="pathutils.xsl"/>
  
    <xsl:variable name="filename-noext">
      <xsl:call-template name="filename-noext">
        <xsl:with-param name="path" select="$path"/>
      </xsl:call-template>
    </xsl:variable>
  
    <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">
      <xsl:choose>
        <xsl:when test="starts-with(@href, $filename-noext)">
          <xsl:call-template name="selected"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:call-template name="unselected"/>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:template>
  
    <xsl:template name="selected">
      <xsl:value-of select="@label"/>
    </xsl:template>
  
    <xsl:template name="unselected">
      <a href="{@href}"><xsl:value-of select="@label"/></a>
    </xsl:template>
  
    <xsl:template name="print-external">
      <xsl:value-of select="@label"/>
    </xsl:template>
  
    <xsl:template match="external">
      <li>
        <xsl:choose>
          <xsl:when test="starts-with(@href, $filename-noext)">
            <span class="externalSelected">
              <xsl:call-template name="print-external"/>
            </span>
          </xsl:when>
          <xsl:otherwise>
            <a href="{@href}" target="_blank"><xsl:value-of select="@label"/></a>
          </xsl:otherwise>
        </xsl:choose>
      </li>
    </xsl:template>
  
    <xsl:template match="menu-item[@type='hidden']"/>
  
    <xsl:template match="external[@type='hidden']"/>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-forrest/src/resources/skins/common/xslt/html/document2html.xsl
  
  Index: document2html.xsl
  ===================================================================
  <?xml version="1.0"?>
  <!--
  This stylesheet contains the majority of templates for converting documentv11
  to HTML.  It renders XML as HTML in this form:
  
    <div class="content">
     ...
    </div>
  
  ..which site2xhtml.xsl then combines with HTML from the index (book2menu.xsl)
  and tabs (tab2menu.xsl) to generate the final HTML.
  
  Section handling
    - <a name/> anchors are added if the id attribute is specified
    - generated anchors are still included for TOC - what should we do about this?
    - FIXME: provide a generic facility to process section irrelevant to their
      nesting depth
  
  $Id: document2html.xsl,v 1.1 2002/11/16 20:58:12 jefft Exp $
  -->
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
    <!-- If non-blank, a PDF link for this page will not be generated -->
    <xsl:param name="nopdf"/>
    <xsl:param name="isfaq"/>
    <xsl:param name="path"/>
    <!-- <xsl:include href="split.xsl"/> -->
    <xsl:include href="dotdots.xsl"/>
    <xsl:include href="pathutils.xsl"/>
  
    <!-- Path to site root, eg '../../' -->
    <xsl:variable name="root">
      <xsl:call-template name="dotdots">
        <xsl:with-param name="path" select="$path"/>
      </xsl:call-template>
    </xsl:variable>
  
    <xsl:variable name="filename-noext">
      <xsl:call-template name="filename-noext">
        <xsl:with-param name="path" select="$path"/>
      </xsl:call-template>
    </xsl:variable>
   
    <xsl:variable name="skin-img-dir" select="concat(string($root), 'skin/images')"/>
  
    <xsl:template match="document">
      <div class="content">
        <xsl:if test="normalize-space(header/title)!=''">
          <table class="title">
            <tr> 
              <td valign="middle"> 
                <h1>
                  <xsl:value-of select="header/title"/>
                </h1>
              </td>
              <xsl:call-template name="pdflink"/>
            </tr>
          </table>
        </xsl:if>
        <xsl:if test="normalize-space(header/subtitle)!=''">
          <h3>
            <xsl:value-of select="header/subtitle"/>
          </h3>
        </xsl:if>
        <xsl:if test="header/authors">
          <p>
            <font size="-2">
              <xsl:for-each select="header/authors/person">
                <xsl:choose>
                  <xsl:when test="position()=1">by&#160;</xsl:when>
                  <xsl:otherwise>,&#160;</xsl:otherwise>
                </xsl:choose>
                <xsl:value-of select="@name"/>
              </xsl:for-each>
            </font>
          </p>
        </xsl:if>
        <xsl:apply-templates select="body"/>
      </div>
    </xsl:template>
  
    <!-- Generates the "printer friendly version" PDF link -->
    <xsl:template name="pdflink">
      <xsl:if test="$nopdf = ''"> <!-- nopdf flag unset -->
        <td align="center" width="80" nowrap="nowrap"><a href="{$filename-noext}.pdf" class="dida">
            <img border="0" src="{$skin-img-dir}/printer.gif"/><br/>
            print-friendly<br/>
            version</a>
        </td>
      </xsl:if>
    </xsl:template>
  
  
    <xsl:template match="body">
      <xsl:if test="section and not($isfaq='true')">
        <ul class="minitoc">
          <xsl:for-each select="section">
            <li>
              <a href="#{generate-id()}">
                <xsl:value-of select="title"/>
              </a>
              <xsl:if test="section">
                <ul class="minitoc">
                  <xsl:for-each select="section">
                    <li>
                      <a href="#{generate-id()}">
                        <xsl:value-of select="title"/>
                      </a>
                    </li>
                  </xsl:for-each>
                </ul>
              </xsl:if>
            </li>
          </xsl:for-each>
        </ul>
      </xsl:if>
      <xsl:apply-templates/>
    </xsl:template>
  
  
    <!-- Generate a <a name="..."> tag for an @id -->
    <xsl:template match="@id">
      <xsl:if test="normalize-space(.)!=''">
        <a name="{.}"/>
      </xsl:if>
    </xsl:template>
  
    <xsl:template match="section">
      <a name="{generate-id()}"/>
      <xsl:apply-templates select="@id"/>
      <h3>
        <xsl:value-of select="title"/>
      </h3>
      <xsl:apply-templates select="*[not(self::title)]"/>
    </xsl:template>
  
    <xsl:template match="section/section">
      <a name="{generate-id()}"/>
      <xsl:apply-templates select="@id"/>
      <h4>
        <xsl:value-of select="title"/>
      </h4>
      <xsl:apply-templates select="*[not(self::title)]"/>
    </xsl:template>
  
    <xsl:template match="note | warning | fixme">
      <xsl:apply-templates select="@id"/>
      <div class="frame {local-name()}">
        <div class="label">
          <xsl:choose>
            <xsl:when test="local-name() = 'note'">Note</xsl:when>
            <xsl:when test="local-name() = 'warning'">Warning</xsl:when>
            <xsl:otherwise>Fixme (
                 <xsl:value-of select="@author"/>
  
                 )</xsl:otherwise>
          </xsl:choose>
        </div>
        <div class="content">
          <xsl:apply-templates/>
        </div>
      </div>
    </xsl:template>
  
    <xsl:template match="link">
      <xsl:apply-templates select="@id"/>
      <a href="{@href}">
        <xsl:apply-templates/>
      </a>
    </xsl:template>
  
    <xsl:template match="jump">
      <xsl:apply-templates select="@id"/>
      <a href="{@href}" target="_top">
        <xsl:apply-templates/>
      </a>
    </xsl:template>
  
    <xsl:template match="fork">
      <xsl:apply-templates select="@id"/>
      <a href="{@href}" target="_blank">
        <xsl:apply-templates/>
      </a>
    </xsl:template>
  
    <xsl:template match="p[@xml:space='preserve']">
      <xsl:apply-templates select="@id"/>
      <div class="pre">
        <xsl:apply-templates/>
      </div>
    </xsl:template>
  
    <xsl:template match="source">
      <xsl:apply-templates select="@id"/>
      <pre class="code">
  <!-- Temporarily removed long-line-splitter ... gives out-of-memory problems -->
        <xsl:apply-templates/>
  <!--
      <xsl:call-template name="format">
      <xsl:with-param select="." name="txt" /> 
       <xsl:with-param name="width">80</xsl:with-param> 
       </xsl:call-template>
  -->
      </pre>
    </xsl:template>
  
    <xsl:template match="anchor">
      <a name="{@id}"/>
    </xsl:template>
  
    <xsl:template match="icon">
      <xsl:apply-templates select="@id"/>
      <img src="{@src}" alt="{@alt}">
        <xsl:if test="@height">
          <xsl:attribute name="height"><xsl:value-of select="@height"/></xsl:attribute>
        </xsl:if>
        <xsl:if test="@width">
          <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
        </xsl:if>
      </img>
    </xsl:template>
  
    <xsl:template match="code">
      <xsl:apply-templates select="@id"/>
      <span class="codefrag"><xsl:value-of select="."/></span>
    </xsl:template>
  
    <xsl:template match="figure">
      <xsl:apply-templates select="@id"/>
      <div align="center">
        <img src="{@src}" alt="{@alt}" class="figure">
          <xsl:if test="@height">
            <xsl:attribute name="height"><xsl:value-of select="@height"/></xsl:attribute>
          </xsl:if>
          <xsl:if test="@width">
            <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
          </xsl:if>
        </img>
      </div>
    </xsl:template>
  
    <xsl:template match="table">
      <xsl:apply-templates select="@id"/>
      <table cellpadding="4" cellspacing="1" class="ForrestTable">
        <xsl:if test="@cellspacing"><xsl:attribute name="cellspacing"><xsl:value-of select="@cellspacing"/></xsl:attribute></xsl:if>
        <xsl:if test="@cellpadding"><xsl:attribute name="cellpadding"><xsl:value-of select="@cellpadding"/></xsl:attribute></xsl:if>
        <xsl:if test="@border"><xsl:attribute name="border"><xsl:value-of select="@border"/></xsl:attribute></xsl:if>
        <xsl:if test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:if>
        <xsl:if test="@bgcolor"><xsl:attribute name="bgcolor"><xsl:value-of select="@bgcolor"/></xsl:attribute></xsl:if>
        <xsl:apply-templates/>
      </table>
    </xsl:template>
  
    <xsl:template match="node()|@*" priority="-1">
      <xsl:copy>
        <xsl:apply-templates select="@*"/>
        <xsl:apply-templates/>
      </xsl:copy>
    </xsl:template>
  </xsl:stylesheet>
  
  
  
  1.1                  xml-forrest/src/resources/skins/common/xslt/html/dotdots.xsl
  
  Index: dotdots.xsl
  ===================================================================
  <?xml version="1.0" encoding="utf-8"?>
  
  <!--
  Contains the 'dotdots' template, which, given a path, will output a set of
  directory traversals to get back to the source directory. Handles both '/' and
  '\' directory separators.
  
  Examples:
    Input                           Output 
      index.html                    ""
      dir/index.html                "../"
      dir/subdir/index.html         "../../"
      dir//index.html              "../"
      dir/                          "../"
      dir//                         "../"
      \some\windows\path            "../../"
      \some\windows\path\           "../../../"
      \Program Files\mydir          "../"
  
  Cannot handle ..'s in the path, so don't expect 'dir/subdir/../index.html' to
  work.
  
  jefft@apache.org
  -->
  
  <xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
    <xsl:template name="dotdots">
      <xsl:param name="path"/>
      <xsl:variable name="dirs" select="normalize-space(translate(concat($path, 'x'), ' /\', '_  '))"/>
      <!-- The above does the following:
         o Adds a trailing character to the path. This prevents us having to deal
           with the special case of ending with '/'
         o Translates all directory separators to ' ', and normalize spaces,
  		 cunningly eliminating duplicate '//'s. We also translate any real
  		 spaces into _ to preserve them.
      -->
      <xsl:variable name="remainder" select="substring-after($dirs, ' ')"/>
      <xsl:if test="$remainder">
        <xsl:text>../</xsl:text>
        <xsl:call-template name="dotdots">
          <xsl:with-param name="path" select="translate($remainder, ' ', '/')"/>
  		<!-- Translate back to /'s because that's what the template expects. -->
        </xsl:call-template>
      </xsl:if>
    </xsl:template>
  
  <!--
    Uncomment to test.
    Usage: saxon dotdots.xsl dotdots.xsl path='/my/test/path'
  
    <xsl:param name="path"/>
    <xsl:template match="/">
      <xsl:message>Path: <xsl:value-of select="$path"/></xsl:message>
      <xsl:call-template name="dotdots">
        <xsl:with-param name="path" select="$path"/>
      </xsl:call-template>
    </xsl:template>
   -->
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-forrest/src/resources/skins/common/xslt/html/pathutils.xsl
  
  Index: pathutils.xsl
  ===================================================================
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <!--
  PathUtils.xsl
  
  A set of XSLT templates useful for parsing URI paths:
  
  dirname: return the directory part of a path
  filename: return the file part of a path
  ext: return the last extension of the filename in a path
  filename-noext: return the file part of a path without its last extension
  
  @author Jeff Turner <jefft@apache.org>
  $Id: pathutils.xsl,v 1.1 2002/11/16 20:58:12 jefft Exp $
  -->
  
  <!-- Returns the directory part of a path.  Equivalent to Unix 'dirname'.
  Examples:
  '' -> ''
  'foo/index.html' -> 'foo/'
  -->
  <xsl:template name="dirname">
    <xsl:param name="path" />
    <xsl:if test="contains($path, '/')">
      <xsl:value-of select="concat(substring-before($path, '/'), '/')" />
      <xsl:call-template name="dirname">
        <xsl:with-param name="path"
          select="substring-after($path, '/')" />
      </xsl:call-template>
    </xsl:if>
  </xsl:template>
  
  
  <!-- Returns the filename part of a path.  Equivalent to Unix 'basename'
  Examples:
  'index.html'  ->  'index.html' 
  'foo/bar/'  ->  '' 
  'foo/bar/index.html'  ->  'index.html' 
  -->
  <xsl:template name="filename">
    <xsl:param name="path"/>
    <xsl:choose>
      <xsl:when test="contains($path, '/')">
        <xsl:call-template name="filename">
          <xsl:with-param name="path" select="substring-after($path, '/')"/>
        </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="$path"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  <!-- Returns the last extension of a filename in a path.
  Examples:
  'index.html'  ->  '.html' 
  'index.dtdx.html'  ->  '.html' 
  'foo/bar/'  ->  '' 
  'foo/bar/index.html'  ->  '.html' 
  'foo/bar/index'  ->  '' 
  -->
  <xsl:template name="ext">
    <xsl:param name="path"/>
    <xsl:param name="subflag"/> <!-- Outermost call? -->
    <xsl:choose>
      <xsl:when test="contains($path, '.')">
        <xsl:call-template name="ext">
          <xsl:with-param name="path" select="substring-after($path, '.')"/>
          <xsl:with-param name="subflag" select="'sub'"/>
        </xsl:call-template>
      </xsl:when>
      <!-- Handle extension-less filenames by returning '' -->
      <xsl:when test="not($subflag) and not(contains($path, '.'))">
        <xsl:text/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="concat('.', $path)"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  <!-- Returns a filename of a path stripped of its last extension.
  Examples:
  'foo/bar/index.dtdx.html' -> 'index.dtdx'
  -->
  <xsl:template name="filename-noext">
    <xsl:param name="path"/>
    <xsl:variable name="filename">
      <xsl:call-template name="filename">
        <xsl:with-param name="path" select="$path"/>
      </xsl:call-template>
    </xsl:variable>
    <xsl:variable name="ext">
      <xsl:call-template name="ext">
        <xsl:with-param name="path" select="$filename"/>
      </xsl:call-template>
    </xsl:variable>
    <xsl:value-of select="substring($filename, 1, string-length($filename) - string-length($ext))"/>
  </xsl:template>
  
  <!--
  Uncomment this to test.
  Usage: saxon pathutils.xsl pathutils.xsl path=foo/bar
  
  <xsl:param name="path" select="'/foo/bar/index.html'"/>
  <xsl:template match="/">
    <xsl:message>
      path= <xsl:value-of select="$path"/>
      dirname= <xsl:call-template name="dirname">
        <xsl:with-param name="path" select="$path"/>
      </xsl:call-template>
      filename= <xsl:call-template name="filename">
        <xsl:with-param name="path" select="$path"/>
      </xsl:call-template>
      ext= <xsl:call-template name="ext">
        <xsl:with-param name="path" select="$path"/>
      </xsl:call-template>
      filename-noext= <xsl:call-template name="filename-noext">
        <xsl:with-param name="path" select="$path"/>
      </xsl:call-template>
    </xsl:message>
  </xsl:template>
  -->
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-forrest/src/resources/skins/common/xslt/html/renderlogo.xsl
  
  Index: renderlogo.xsl
  ===================================================================
  <?xml version="1.0" encoding="utf-8"?>
  
  <!--
  A simple callable template that renders a logo for an entity. The logo will 
  be a hyperlink and may include an image (with width and height if specified)
  or else it will just include the specified text.
  
  Note that text and image are mandatory parts of the template.
  -->
  
  <xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
    <xsl:template name="renderlogo">
      <xsl:param name="name"/>
      <xsl:param name="url"/>
      <xsl:param name="logo"/>
      <xsl:param name="width"/>
      <xsl:param name="height"/>
      <xsl:param name="root"/>
      <a href="{$url}">
        <xsl:choose>
          <xsl:when test="$logo">
            <img alt="{$name}" class="logoImage" border="0">
              <xsl:attribute name="src">
  	      <xsl:if test="not(starts-with($logo, 'http://'))"><xsl:value-of select="$root"/></xsl:if>
                <xsl:value-of select="$logo"/>
              </xsl:attribute>
              <xsl:if test="$width">
                <xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute>
              </xsl:if>
              <xsl:if test="$height">
                <xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
              </xsl:if>
  	  </img>
          </xsl:when>
          <xsl:otherwise><xsl:value-of select="$name"/></xsl:otherwise>
        </xsl:choose>
      </a>
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-forrest/src/resources/skins/common/xslt/html/site2xhtml.xsl
  
  Index: site2xhtml.xsl
  ===================================================================
  <?xml version="1.0"?>
  <!--
  site2xhtml.xsl is the final stage in HTML page production.  It merges HTML from
  document2html.xsl, tab2menu.xsl and book2menu.xsl, and adds the site header,
  footer, searchbar, css etc.  As input, it takes XML of the form:
  
  <site>
    <div class="menu">
      ...
    </div>
    <div class="tab">
      ...
    </div>
    <div class="content">
      ...
    </div>
  </site>
  
  $Id: site2xhtml.xsl,v 1.1 2002/11/16 20:58:12 jefft Exp $
  -->
  
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
    <!-- Default skinconf.xml in the skins/ directory -->
    <xsl:param name="config-file" select="'../../../../skinconf.xml'"/>
    <xsl:variable name="config" select="document($config-file)/skinconfig"/>
    <xsl:param name="path"/>
  
    <xsl:include href="dotdots.xsl"/>
    <xsl:include href="pathutils.xsl"/>
    <xsl:include href="renderlogo.xsl"/>
  
    <!-- Path (..'s) to the root directory -->
    <xsl:variable name="root">
      <xsl:call-template name="dotdots">
        <xsl:with-param name="path" select="$path"/>
      </xsl:call-template>
    </xsl:variable>
  
    <!-- Source filename (eg 'foo.xml') of current page -->
    <xsl:variable name="filename">
      <xsl:call-template name="filename">
        <xsl:with-param name="path" select="$path"/>
      </xsl:call-template>
    </xsl:variable>
  
    <xsl:variable name="skin-img-dir" select="concat(string($root), 'skin/images')"/>
    <xsl:variable name="spacer" select="concat($root, 'skin/images/spacer.gif')"/>
  
    <xsl:template match="site">
      <html>
        <head>
          <title><xsl:value-of select="div[@class='content']/table/tr/td/h1"/></title>
        </head>
        <body>
          <xsl:if test="$config/group-url">
            <xsl:call-template name="renderlogo">
              <xsl:with-param name="name" select="$config/group-name"/>
              <xsl:with-param name="url" select="$config/group-url"/>
              <xsl:with-param name="logo" select="$config/group-logo"/>
              <xsl:with-param name="root" select="$root"/>
            </xsl:call-template>
          </xsl:if>
          <xsl:call-template name="renderlogo">
            <xsl:with-param name="name" select="$config/project-name"/>
            <xsl:with-param name="url" select="$config/project-url"/>
            <xsl:with-param name="logo" select="$config/project-logo"/>
            <xsl:with-param name="root" select="$root"/>
          </xsl:call-template>
          <xsl:comment>================= start Tabs ==================</xsl:comment>
          <xsl:apply-templates select="div[@class='tab']"/>
          <xsl:comment>================= end Tabs ==================</xsl:comment>
          <xsl:comment>================= start Menu items ==================</xsl:comment>
          <xsl:apply-templates select="div[@class='menu']"/>
          <xsl:comment>================= end Menu items ==================</xsl:comment>
          <xsl:comment>================= start Content==================</xsl:comment>
          <xsl:apply-templates select="div[@class='content']"/>
          <xsl:comment>================= end Content==================</xsl:comment>
  
          <xsl:comment>================= start Footer ==================</xsl:comment>
          Copyright &#169; <xsl:value-of select="$config/year"/>&#160;<xsl:value-of
            select="$config/vendor"/> All rights reserved.
          <script language="JavaScript" type="text/javascript"><![CDATA[<!--
            document.write(" - "+"Last Published: " + document.lastModified);
            //  -->]]></script>
          <xsl:if test="$config/host-logo and not($config/host-logo = '')">
            <a href="{$config/host-url}">
              <xsl:call-template name="renderlogo">
                <xsl:with-param name="name" select="$config/host-name"/>
                <xsl:with-param name="url" select="$config/host-url"/>
                <xsl:with-param name="logo" select="$config/host-logo"/>
                <xsl:with-param name="root" select="$root"/>
              </xsl:call-template>
            </a>
          </xsl:if>
          <xsl:if test="$filename = 'index.html' and $config/credits">
            <xsl:for-each select="$config/credits/credit">
              <xsl:call-template name="renderlogo">
                <xsl:with-param name="name" select="name"/>
                <xsl:with-param name="url" select="url"/>
                <xsl:with-param name="logo" select="image"/>
                <xsl:with-param name="root" select="$root"/>
                <xsl:with-param name="width" select="width"/>
                <xsl:with-param name="height" select="height"/>
              </xsl:call-template>
            </xsl:for-each>
          </xsl:if>
        </body>
      </html>
    </xsl:template>
  
    <xsl:template match="node()|@*" priority="-1">
      <xsl:copy>
        <xsl:apply-templates select="@*"/>
        <xsl:apply-templates/>
      </xsl:copy>
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-forrest/src/resources/skins/common/xslt/html/split.xsl
  
  Index: split.xsl
  ===================================================================
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
  <!--
   This stylesheet was taken from the XSLT FAQ http://www.dpawson.co.uk/xsl/
   
   Comments and adaption to be used without normalize-space()
    by Nicola Ken Barozzi nicolaken@apache.org
  --> 
  
  <!--
    Input:
  
  <doc>
  
  <para>
   123456 2345 343434 545454 43434 343 
   12345 343434 545454 43434 343 
   32345645 343434 545454 43434 343 
   3422222225 343434 545454 43434 343 
   llllllllllllllllllllllooooooooooooooonnnnnnnnnnnggggggggg
   345 343434 545454 43434 343 
  </para>
  
  </doc>
  
  Output:
  
  <HTML>
  <BODY>
  <PRE>123456 2345 343434 545454 
  43434 343 12345 343434 545454 
  43434 343 32345645 343434 
  545454 43434 343 3422222225 
  343434 545454 43434 343 
  lllllllllllllllllllllloooooooo
  ooooooonnnnnnnnnnnggggggggg 
  345 343434 545454 43434 
  343
  </PRE>
  </BODY>
  </HTML>
  
  Fragment ised: 
  
   <xsl:template match="/doc">
   <HTML><BODY><PRE>
      <xsl:call-template name="format">
      <xsl:with-param select="normalize-space(para)" name="txt" /> 
       <xsl:with-param name="width">30</xsl:with-param> 
       </xsl:call-template>
    </PRE></BODY></HTML>
    </xsl:template>
  
  
  -->
  
   <xsl:template match="/body">
     <body>
      <xsl:call-template name="format">
      <xsl:with-param select="source" name="txt" /> 
       <xsl:with-param name="width">40</xsl:with-param> 
       </xsl:call-template>
    </body>
    </xsl:template>
    
    <xsl:template name="format">
      <xsl:param name="txt" /> 
      <xsl:param name="width" /> 
  
      <!-- if there is still text left -->
      <xsl:if test="$txt">
      
      <xsl:variable name = "pretxt" select = "substring($txt,0, $width)" />
      
      <xsl:choose>
        <xsl:when test="contains($pretxt, '&#xA;')">
          <xsl:value-of select="substring-before($pretxt, '&#xA;')"/>
          <xsl:text>&#xA;</xsl:text> 
          <xsl:call-template name="format">
            <xsl:with-param name="txt" select="substring-after($txt,'&#xA;')"/>
            <xsl:with-param select="$width" name="width" />           
          </xsl:call-template>
        </xsl:when>
        
        <xsl:otherwise>
        <!-- get the width at which to break-->
        <xsl:variable name="real-width">
          <xsl:call-template name="tune-width">
            <xsl:with-param select="$txt" name="txt" /> 
            <xsl:with-param select="$width" name="width" /> 
            <xsl:with-param select="$width" name="def" /> 
          </xsl:call-template>
        </xsl:variable>
  
        <!-- output the first part of the broken string -->
        <xsl:value-of select="substring($txt, 1, $real-width)" /> 
  
        <!-- output a newline -->
        <xsl:text>&#xA;</xsl:text> 
  
        <!-- call itself with the remaining part of the text -->
        <xsl:call-template name="format">
         <xsl:with-param select="substring($txt,$real-width + 1)" name="txt" /> 
         <xsl:with-param select="$width" name="width" /> 
        </xsl:call-template>
        </xsl:otherwise>
        </xsl:choose>
      </xsl:if>
    </xsl:template>
    
     
    <!-- used by template "format", it calculates the width at the given def 
         
         It starts at def length and comes back till it finds a space -->
    <xsl:template name="tune-width">
      <xsl:param name="txt" /> 
      <xsl:param name="width" /> 
      <xsl:param name="def" /> 
  
      <xsl:choose>
        <xsl:when test="$width = 0">
         <xsl:value-of select="$def" /> 
        </xsl:when>
                   
        <xsl:when test="substring($txt, $width, 1 ) = ' '">
            <xsl:value-of select="$width" /> 
         </xsl:when>
         
         <xsl:otherwise>
           <!-- otherwise need to tune again, trying with $width - 1 -->
           <xsl:call-template name="tune-width">
             <xsl:with-param select="$width - 1" name="width" /> 
             <xsl:with-param select="$txt" name="txt" /> 
             <xsl:with-param select="$def" name="def" /> 
           </xsl:call-template>
         </xsl:otherwise>
       </xsl:choose>
  
    </xsl:template>
  
    </xsl:stylesheet>
  
  
  
  1.1                  xml-forrest/src/resources/skins/common/xslt/html/tab2menu.xsl
  
  Index: tab2menu.xsl
  ===================================================================
  <?xml version="1.0"?>
  <!--
  This stylesheet generates 'tabs' at the top left of the screen.  Tabs are
  visual indicators that a certain subsection of the URI space is being browsed.
  For example, if we had tabs with paths:
  
  Tab1:  ''
  Tab2:  'community'
  Tab3:  'community/howto'
  Tab4:  'community/howto/xmlform/index.html'
  
  Then if the current path was 'community/howto/foo', Tab3 would be highlighted.
  The rule is: the tab with the longest path that forms a prefix of the current
  path is enabled.
  
  The output of this stylesheet is HTML of the form:
      <div class="tab">
        ...
      </div>
  
  which is then merged by site2xhtml.xsl
  
  $Id: tab2menu.xsl,v 1.1 2002/11/16 20:58:12 jefft Exp $
  -->
  
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
    <!-- ================================================================ -->
    <!-- This template MUST 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"/>
    </xsl:template>
  
  
    <!-- ================================================================ -->
    <!-- These templates SHOULD be overridden                             -->
    <!-- ================================================================ -->
  
    <!-- Called before first tag -->
    <xsl:template name="pre-separator">
    </xsl:template>
  
    <!-- Called after last tag -->
    <xsl:template name="post-separator">
    </xsl:template>
  
    <!-- Called between tags -->
    <xsl:template name="separator">
      <xsl:text> | </xsl:text>
    </xsl:template>
  
    <!--
    Note: sub-stylesheets can't do apply-imports here, because it would choose
    the 'tags' template and infinitely recurse. Hence call-template used instead.
    -->
  
    <!-- Display a selected tab node -->
    <xsl:template name="selected">
      <xsl:call-template name="base-selected"/>
    </xsl:template>
  
    <!-- Display an unselected tab node -->
    <xsl:template name="not-selected">
      <xsl:call-template name="base-not-selected"/>
    </xsl:template>
  
  
  
  
    <!-- ================================================================ -->
    <!-- These templates SHOULD NOT be overridden                         -->
    <!-- ================================================================ -->
  
    <xsl:param name="path"/>
  
    <xsl:include href="dotdots.xsl"/>
    <xsl:include href="tabutils.xsl"/>
  
    <!-- NOTE: Xalan has a bug (race condition?) where sometimes $root is only half-evaluated -->
    <xsl:variable name="root">
      <xsl:call-template name="dotdots">
        <xsl:with-param name="path" select="$path"/>
      </xsl:call-template>
    </xsl:variable>
  
    <xsl:variable name="skin-img-dir" select="concat(string($root), 'skin/images')"/>
  
    <!--
      The longest path of any tab, whose path is a subset of the current URL.  Ie,
      the path of the 'current' tab.
    -->
    <xsl:variable name="longest-dir">
      <xsl:call-template name="longest-dir">
        <xsl:with-param name="tabfile" select="/"/>
      </xsl:call-template>
    </xsl:variable>
  
    <xsl:template match="tab">
      <xsl:choose>
        <xsl:when test="@dir = $longest-dir or @href = $longest-dir">
          <xsl:call-template name="selected"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:call-template name="not-selected"/>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:template>
  
    <xsl:template name="base-selected">
      <xsl:value-of select="@label"/>
    </xsl:template>
  
    <xsl:template name="base-not-selected">
      <a>
        <xsl:attribute name="href">
          <xsl:call-template name="unselected-tab-href">
            <xsl:with-param name="tab" select="."/>
            <xsl:with-param name="path" select="$path"/>
          </xsl:call-template>
        </xsl:attribute>
        <font face="Arial, Helvetica, Sans-serif" size="2">
          <xsl:value-of select="@label"/>
        </font>
      </a>
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-forrest/src/resources/skins/common/xslt/html/tabutils.xsl
  
  Index: tabutils.xsl
  ===================================================================
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
  
    <xsl:template name="unselected-tab-href">
  
      <xsl:param name="dir_index" select="'index.html'"/>
  
      <xsl:param name="tab"/> <!-- current 'tab' node -->
      <xsl:param name="path" select="$path"/>
  
      <xsl:if test="starts-with($tab/@href, 'http')">  <!-- Absolute URL -->
        <xsl:value-of select="$tab/@href"/>
      </xsl:if>
      <xsl:if test="not(starts-with($tab/@href, 'http'))">  <!-- Root-relative path -->
        <xsl:variable name="backpath">
          <xsl:call-template name="dotdots">
            <xsl:with-param name="path" select="$path"/>
          </xsl:call-template>
          <xsl:text>/</xsl:text>
          <xsl:value-of select="$tab/@dir | $tab/@href"/>
          <!-- If we obviously have a directory, add /index.html -->
          <xsl:if test="$tab/@dir or substring($tab/@href, string-length($tab/@href),
            string-length($tab/@href)) = '/'">
            <xsl:text>/</xsl:text>
            <xsl:value-of select="$dir_index"/>
          </xsl:if>
        </xsl:variable>
  
        <xsl:value-of
          select="translate(normalize-space(translate($backpath, ' /', '/ ')), ' /', '/ ')"/>
        <!-- Link to backpath, normalizing slashes -->
      </xsl:if>
    </xsl:template>
  
  
    <!--
      The longest path of any tab, whose path is a subset of the current URL.  Ie,
      the path of the 'current' tab.
    -->
    <xsl:template name="longest-dir">
      <xsl:param name="tabfile"/>
      <xsl:for-each select="$tabfile/tabs/tab[starts-with($path, @dir|@href)]">
        <xsl:sort select="string-length(@dir|@href)"
          data-type="number" order="descending"/>
        <xsl:if test="position()=1">
          <xsl:value-of select="@dir|@href"/>
        </xsl:if>
      </xsl:for-each>
    </xsl:template>
  
  
  </xsl:stylesheet>
  
  
  
  
  1.7       +18 -36    xml-forrest/src/resources/skins/forrest-site/xslt/html/book2menu.xsl
  
  Index: book2menu.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/forrest-site/xslt/html/book2menu.xsl,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- book2menu.xsl	9 Nov 2002 13:38:01 -0000	1.6
  +++ book2menu.xsl	16 Nov 2002 20:58:13 -0000	1.7
  @@ -1,24 +1,12 @@
   <?xml version="1.0"?>
   <!--
  -book2menu.xsl generates the HTML menu. It outputs XML/HTML of the form:
  -  <div class="menu">
  -     ...
  -  </div>
  -which is then merged with other HTML by site2xhtml.xsl
  -
  -$Id$
  +book2menu.xsl generates the HTML menu.  See the imported book2menu.xsl for
  +details.
   -->
   
   <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  -  <xsl:param name="path"/>
  -
  -  <xsl:include href="pathutils.xsl"/>
   
  -  <xsl:variable name="filename-noext">
  -    <xsl:call-template name="filename-noext">
  -      <xsl:with-param name="path" select="$path"/>
  -    </xsl:call-template>
  -  </xsl:variable>
  +  <xsl:import href="../../../common/xslt/html/book2menu.xsl"/>
   
     <xsl:template match="book">
       <div class="menu">
  @@ -39,28 +27,22 @@
   
     <xsl:template match="menu-item">
       <li>
  -       <xsl:choose>
  -         <xsl:when test="starts-with(@href, $filename-noext)">
  -            <span class="sel"><font color="#ffcc00"><xsl:value-of select="@label"/></font></span>
  -          </xsl:when>
  -          <xsl:otherwise>
  -            <a href="{@href}"><xsl:value-of select="@label"/></a>
  -          </xsl:otherwise>
  -        </xsl:choose>
  +      <xsl:apply-imports/>
       </li>
     </xsl:template>
  -  <xsl:template match="external">
  -    <li>
  -       <xsl:choose>
  -         <xsl:when test="starts-with(@href, $filename-noext)">
  -          <font color="#ffcc00"><xsl:value-of select="@label"/></font>
  -        </xsl:when>
  -        <xsl:otherwise>
  -          <a href="{@href}" target="_blank"><xsl:value-of select="@label"/></a>
  -        </xsl:otherwise>
  -      </xsl:choose>
  -    </li>
  +
  +  <xsl:template name="selected">
  +    <span class="sel">
  +      <font color="#ffcc00">
  +        <xsl:value-of select="@label"/>
  +      </font>
  +    </span>
  +  </xsl:template>
  +
  +  <xsl:template name="print-external">
  +    <font color="#ffcc00">
  +      <xsl:apply-imports/>
  +    </font>
     </xsl:template>
  -  <xsl:template match="menu-item[@type='hidden']"/>
  -  <xsl:template match="external[@type='hidden']"/>
  +
   </xsl:stylesheet>
  
  
  
  1.13      +4 -261    xml-forrest/src/resources/skins/forrest-site/xslt/html/document2html.xsl
  
  Index: document2html.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/forrest-site/xslt/html/document2html.xsl,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- document2html.xsl	9 Nov 2002 11:37:44 -0000	1.12
  +++ document2html.xsl	16 Nov 2002 20:58:13 -0000	1.13
  @@ -1,268 +1,11 @@
   <?xml version="1.0"?>
   <!--
  -This stylesheet contains the majority of templates for converting documentv11
  -to HTML.  It renders XML as HTML in this form:
  -
  -  <div class="content">
  -   ...
  -  </div>
  -
  -..which site2xhtml.xsl then combines with HTML from the index (book2menu.xsl)
  -and tabs (tab2menu.xsl) to generate the final HTML.
  -
  -$Id$
  --->
  -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  -
  -  <!-- If non-blank, a PDF link for this page will not be generated -->
  -  <xsl:param name="nopdf"/>
  -  <xsl:param name="isfaq"/>
  -  <xsl:param name="path"/>
  -
  -  <xsl:include href="split.xsl"/>
  -  <xsl:include href="dotdots.xsl"/>
  -  <xsl:include href="pathutils.xsl"/>
  -
  -  <!-- Path to site root, eg '../../' -->
  -  <xsl:variable name="root">
  -    <xsl:call-template name="dotdots">
  -      <xsl:with-param name="path" select="$path"/>
  -    </xsl:call-template>
  -  </xsl:variable>
  -
  -  <xsl:variable name="filename-noext">
  -    <xsl:call-template name="filename-noext">
  -      <xsl:with-param name="path" select="$path"/>
  -    </xsl:call-template>
  -  </xsl:variable>
  - 
  -  <xsl:variable name="skin-img-dir" select="concat(string($root), 'skin/images')"/>
  -
  -  <xsl:template match="document">
  -  <!--
  -    <xsl:message>
  -     ##  path = <xsl:value-of select="$path"/>
  -     ##  root = <xsl:value-of select="$root"/>
  -     ##  nopdf = '<xsl:value-of select="$nopdf"/>'
  -    </xsl:message>
  -  -->
  -    <div class="content">
  -      <xsl:if test="normalize-space(header/title)!=''">
  -        <table class="title">
  -          <tr> 
  -            <td valign="middle"> 
  -              <h1>
  -                <xsl:value-of select="header/title"/>
  -              </h1>
  -            </td>
  -            <!--td align="center" width="80" nowrap><a href="" class="dida"><img src="images/singlepage.gif"><br>
  -              single page<br>
  -              version</a></td-->
  -            <xsl:if test="$nopdf = ''"> <!-- nopdf flag unset -->
  -              <td align="center" width="80" nowrap="nowrap"><a href="{$filename-noext}.pdf" class="dida">
  -              <img border="0" src="{$skin-img-dir}/printer.gif"/><br/>
  -                print-friendly<br/>
  -                version</a>
  -              </td>
  -            </xsl:if>
  -          </tr>
  -        </table>
  -      </xsl:if>
  -      <xsl:if test="normalize-space(header/subtitle)!=''">
  -        <h3>
  -          <xsl:value-of select="header/subtitle"/>
  -        </h3>
  -      </xsl:if>
  -      <xsl:if test="header/authors">
  -        <p>
  -          <font size="-2">
  -            <xsl:for-each select="header/authors/person">
  -              <xsl:choose>
  -                <xsl:when test="position()=1">by&#160;</xsl:when>
  -                <xsl:otherwise>,&#160;</xsl:otherwise>
  -              </xsl:choose>
  -              <xsl:value-of select="@name"/>
  -            </xsl:for-each>
  -          </font>
  -        </p>
  -      </xsl:if>
  -      <xsl:apply-templates select="body"/>
  -    </div>
  -  </xsl:template>
  -
  -  <xsl:template match="body">
  -    <xsl:if test="section and not($isfaq='true')">
  -      <ul class="minitoc">
  -        <xsl:for-each select="section">
  -          <li>
  -            <a href="#{generate-id()}">
  -              <xsl:value-of select="title"/>
  -            </a>
  -            <xsl:if test="section">
  -              <ul class="minitoc">
  -                <xsl:for-each select="section">
  -                  <li>
  -                    <a href="#{generate-id()}">
  -                      <xsl:value-of select="title"/>
  -                    </a>
  -                  </li>
  -                </xsl:for-each>
  -              </ul>
  -            </xsl:if>
  -          </li>
  -        </xsl:for-each>
  -      </ul>
  -    </xsl:if>
  -    <xsl:apply-templates/>
  -  </xsl:template>
  -
  -  <!--  section handling
  -  - <a name/> anchors are added if the id attribute is specified
  -  - generated anchors are still included for TOC - what should we do about this?
  -  - FIXME: provide a generic facility to process section irrelevant to their
  -    nesting depth
  +This stylesheet contains templates for converting documentv11 to HTML.  See the
  +imported document2html.xsl for details.
   -->
   
  -  <xsl:template match="@id">
  -    <xsl:if test="normalize-space(.)!=''">
  -      <a>
  -        <xsl:attribute name="name">
  -          <xsl:value-of select="."/>
  -        </xsl:attribute>
  -      </a>
  -    </xsl:if>
  -  </xsl:template>
  -
  -  <xsl:template match="section">
  -    <a name="{generate-id()}"/>
  -    <xsl:apply-templates select="@id"/>
  -    <h3>
  -      <xsl:value-of select="title"/>
  -    </h3>
  -    <xsl:apply-templates select="*[not(self::title)]"/>
  -  </xsl:template>
  -
  -  <xsl:template match="section/section">
  -    <a name="{generate-id()}"/>
  -    <xsl:apply-templates select="@id"/>
  -    <h4>
  -      <xsl:value-of select="title"/>
  -    </h4>
  -    <xsl:apply-templates select="*[not(self::title)]"/>
  -  </xsl:template>
  -
  -  <xsl:template match="note | warning | fixme">
  -    <xsl:apply-templates select="@id"/>
  -    <div class="frame {local-name()}">
  -      <div class="label">
  -        <xsl:choose>
  -          <xsl:when test="local-name() = 'note'">Note</xsl:when>
  -          <xsl:when test="local-name() = 'warning'">Warning</xsl:when>
  -          <xsl:otherwise>Fixme (
  -               <xsl:value-of select="@author"/>
  -
  -               )</xsl:otherwise>
  -        </xsl:choose>
  -      </div>
  -      <div class="content">
  -        <xsl:apply-templates/>
  -      </div>
  -    </div>
  -  </xsl:template>
  -
  -  <xsl:template match="link">
  -    <xsl:apply-templates select="@id"/>
  -    <a href="{@href}">
  -      <xsl:apply-templates/>
  -    </a>
  -  </xsl:template>
  -
  -  <xsl:template match="jump">
  -    <xsl:apply-templates select="@id"/>
  -    <a href="{@href}" target="_top">
  -      <xsl:apply-templates/>
  -    </a>
  -  </xsl:template>
  -
  -  <xsl:template match="fork">
  -    <xsl:apply-templates select="@id"/>
  -    <a href="{@href}" target="_blank">
  -      <xsl:apply-templates/>
  -    </a>
  -  </xsl:template>
  -
  -  <xsl:template match="p[@xml:space='preserve']">
  -    <xsl:apply-templates select="@id"/>
  -    <div class="pre">
  -      <xsl:apply-templates/>
  -    </div>
  -  </xsl:template>
  -
  -  <xsl:template match="source">
  -    <xsl:apply-templates select="@id"/>
  -    <pre class="code">
  -<!-- Temporarily removed long-line-splitter ... gives out-of-memory problems -->
  -      <xsl:apply-templates/>
  -<!--
  -    <xsl:call-template name="format">
  -    <xsl:with-param select="." name="txt" /> 
  -     <xsl:with-param name="width">80</xsl:with-param> 
  -     </xsl:call-template>
  --->
  -    </pre>
  -  </xsl:template>
  -
  -  <xsl:template match="anchor">
  -    <a name="{@id}"/>
  -  </xsl:template>
  -
  -  <xsl:template match="icon">
  -    <xsl:apply-templates select="@id"/>
  -    <img src="{@src}" alt="{@alt}">
  -      <xsl:if test="@height">
  -        <xsl:attribute name="height"><xsl:value-of select="@height"/></xsl:attribute>
  -      </xsl:if>
  -      <xsl:if test="@width">
  -        <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
  -      </xsl:if>
  -    </img>
  -  </xsl:template>
  -
  -  <xsl:template match="code">
  -    <xsl:apply-templates select="@id"/>
  -    <span class="codefrag"><xsl:value-of select="."/></span>
  -  </xsl:template>
  -
  -  <xsl:template match="figure">
  -    <xsl:apply-templates select="@id"/>
  -    <div align="center">
  -      <img src="{@src}" alt="{@alt}" class="figure">
  -        <xsl:if test="@height">
  -          <xsl:attribute name="height"><xsl:value-of select="@height"/></xsl:attribute>
  -        </xsl:if>
  -        <xsl:if test="@width">
  -          <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
  -        </xsl:if>
  -      </img>
  -    </div>
  -  </xsl:template>
  +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   
  -  <xsl:template match="table">
  -    <xsl:apply-templates select="@id"/>
  -    <table cellpadding="4" cellspacing="1" class="ForrestTable">
  -      <xsl:if test="@cellspacing"><xsl:attribute name="cellspacing"><xsl:value-of select="@cellspacing"/></xsl:attribute></xsl:if>
  -      <xsl:if test="@cellpadding"><xsl:attribute name="cellpadding"><xsl:value-of select="@cellpadding"/></xsl:attribute></xsl:if>
  -      <xsl:if test="@border"><xsl:attribute name="border"><xsl:value-of select="@border"/></xsl:attribute></xsl:if>
  -      <xsl:if test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:if>
  -      <xsl:if test="@bgcolor"><xsl:attribute name="bgcolor"><xsl:value-of select="@bgcolor"/></xsl:attribute></xsl:if>
  -      <xsl:apply-templates/>
  -    </table>
  -  </xsl:template>
  +  <xsl:import href="../../../common/xslt/html/document2html.xsl"/>
   
  -  <xsl:template match="node()|@*" priority="-1">
  -    <xsl:copy>
  -      <xsl:apply-templates select="@*"/>
  -      <xsl:apply-templates/>
  -    </xsl:copy>
  -  </xsl:template>
   </xsl:stylesheet>
  
  
  
  1.13      +164 -108  xml-forrest/src/resources/skins/forrest-site/xslt/html/site2xhtml.xsl
  
  Index: site2xhtml.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/forrest-site/xslt/html/site2xhtml.xsl,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- site2xhtml.xsl	5 Nov 2002 21:33:13 -0000	1.12
  +++ site2xhtml.xsl	16 Nov 2002 20:58:13 -0000	1.13
  @@ -20,28 +20,13 @@
   -->
   
   <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  -   <!-- Default skinconf.xml in the skins/ directory -->
  -  <xsl:param name="config-file" select="'../../../../skinconf.xml'"/>
  -  <xsl:variable name="config" select="document($config-file)/skinconfig"/>
  -  <xsl:param name="path"/>
  -  <xsl:include href="dotdots.xsl"/>
  -  <xsl:include href="pathutils.xsl"/>
  -
  -  <xsl:variable name="root">
  -    <xsl:call-template name="dotdots">
  -      <xsl:with-param name="path" select="$path"/>
  -    </xsl:call-template>
  -  </xsl:variable>
  - 
  -  <xsl:variable name="filename">
  -    <xsl:call-template name="filename">
  -      <xsl:with-param name="path" select="$path"/>
  -    </xsl:call-template>
  -  </xsl:variable>
  -  
  -  <xsl:variable name="skin-img-dir" select="concat(string($root), 'skin/images')"/>
  -  <xsl:variable name="spacer" select="concat($root, 'skin/images/spacer.gif')"/>
  - 
  +
  +  <xsl:import href="../../../common/xslt/html/site2xhtml.xsl"/>
  +
  +  <xsl:variable name="header-color" select="'#294563'"/>
  +  <xsl:variable name="menu-border" select="'#4C6C8F'"/>
  +  <xsl:variable name="background-bars" select="'#CFDCED'"/>
  +
     <xsl:template match="site">
       <html>
         <head>
  @@ -49,130 +34,183 @@
           <link rel="stylesheet" href="{$root}skin/page.css" type="text/css"/>
         </head>
         <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  -      <!-- =========================== top line with navigation path ========================== -->
  +    <xsl:comment>================= start Navigation Path ==================</xsl:comment>
       <table cellspacing="0" cellpadding="0" border="0" width="100%" summary="navigation path">
         <tr>
  -        <td height="20" bgcolor="#CFDCED" valign="middle" nowrap="nowrap">
  +        <td height="20" bgcolor="{$background-bars}" valign="middle" nowrap="nowrap">
             <img src="{$spacer}" border="0" alt="" width="5" height="1" />
  -          <!-- breadcrumb trail (javascript-generated) -->
  +          <xsl:comment>===== breadcrumb trail (javascript-generated) ====</xsl:comment>
             <font face="Arial, Helvetica, Sans-serif" size="2">
  -              <script type="text/javascript" language="JavaScript" src="{$root}skin/breadcrumbs.js"></script>
  +              <script type="text/javascript" language="JavaScript" src="{$root}skin/breadcrumbs.js"/>
             </font>
           </td>
         </tr>
         <tr>
  -        <td height="2" bgcolor="#4C6C8F"><img src="{$spacer}" border="0" alt="" width="2" height="2" /></td>
  +        <td height="2" bgcolor="{$menu-border}"><img src="{$spacer}" border="0" alt="" width="2" height="2" /></td>
         </tr>
       </table>
  +    <xsl:comment>================= end Navigation Path ==================</xsl:comment>
  +
       <!-- ================================= top bar with logo's and search box ===================================  -->
  -        <table cellspacing="0" cellpadding="0" border="0" width="100%" summary="header with logos">
  +
  +    <xsl:comment>================= start Banner ==================</xsl:comment>
  +    <table cellspacing="0" cellpadding="0" border="0" width="100%" summary="header with logos">
         <tr>
  -        <td bgcolor="#294563">
  -        <xsl:if test="$config/group-url"><a href="{$config/group-url}"><img src="{$root}{$config/group-logo}" alt="{$config/group-name} logo" border="0"/></a></xsl:if></td>
  -        <td bgcolor="#294563" align="center" width="100%"><a href="{$config/project-url}"><img src="{$root}{$config/project-logo}" border="0" alt="{$config/project-name} site" /></a></td>
  -        <td bgcolor="#294563" rowspan="2" valign="top">
  -          <xsl:if test="not($config/disable-search) or $config/disable-search='false' and $config/searchsite-domain and $config/searchsite-name">
  -          <form method="get" action="http://www.google.com/search" onsubmit="q.value = query.value + ' site:{$config/searchsite-domain}'" target="_blank">
  -            <table bgcolor="#4C6C8F" cellpadding="0" cellspacing="0" border="0" summary="search">
  -              <tr>
  -                <td colspan="3"><img src="{$spacer}" alt="" width="1" height="10" /></td>
  -              </tr>
  -              <tr>
  -                <td><img src="{$spacer}" alt="" width="1" height="1" /></td>
  -                <td nowrap="nowrap">
  -                  <input type="hidden" name="q"/>
  -                  <input type="text" id="query" size="15"/><img src="{$spacer}" alt="" width="5" height="1" /><input type="submit" value="Search" name="Search"/>
  -                  <br />
  -                  <font color="white" size="2" face="Arial, Helvetica, Sans-serif">
  -                  the <xsl:value-of select="$config/searchsite-name"/> site
  -<!-- setting search options off for the moment -->
  -<!--
  -                    <input type="radio" name="web" value="web"/>web site&#160;&#160;<input type="radio" name="mail" value="mail"/>mail lists
  --->
  -                  </font>
  -                </td>
  -                <td><img src="{$spacer}" alt="" width="1" height="1" /></td>
  -              </tr>
  -              <tr>
  -                <td><img src="{$skin-img-dir}/search-left.gif" width="9" height="10" border="0" alt="" /></td>
  -                <td><img src="{$spacer}" alt="" width="1" height="1" /></td>
  -                <td><img src="{$skin-img-dir}/search-right.gif" width="9" height="10" border="0" alt="" /></td>
  -              </tr>
  -            </table>
  -          </form>
  +
  +        <xsl:comment>================= start Group Logo ==================</xsl:comment>
  +        <td bgcolor="{$header-color}">
  +          <xsl:if test="$config/group-url">
  +            <xsl:call-template name="renderlogo">
  +              <xsl:with-param name="name" select="$config/group-name"/>
  +              <xsl:with-param name="url" select="$config/group-url"/>
  +              <xsl:with-param name="logo" select="$config/group-logo"/>
  +              <xsl:with-param name="root" select="$root"/>
  +            </xsl:call-template>
  +          </xsl:if>
  +        </td>
  +        <xsl:comment>================= end Group Logo ==================</xsl:comment>
  +        <xsl:comment>================= start Project Logo ==================</xsl:comment>
  +        <td bgcolor="{$header-color}" align="center" width="100%">
  +          <xsl:call-template name="renderlogo">
  +            <xsl:with-param name="name" select="$config/project-name"/>
  +            <xsl:with-param name="url" select="$config/project-url"/>
  +            <xsl:with-param name="logo" select="$config/project-logo"/>
  +            <xsl:with-param name="root" select="$root"/>
  +          </xsl:call-template>
  +        </td>
  +        <xsl:comment>================= end Project Logo ==================</xsl:comment>
  +
  +        <xsl:comment>================= start Search ==================</xsl:comment>
  +        <td bgcolor="{$header-color}" rowspan="2" valign="top">
  +          <xsl:if test="not($config/disable-search) or
  +            $config/disable-search='false' and $config/searchsite-domain and
  +            $config/searchsite-name">
  +            <form method="get" action="http://www.google.com/search"
  +              onsubmit="q.value = query.value + 'site:{$config/searchsite-domain}'" target="_blank">
  +              <table bgcolor="{$menu-border}" cellpadding="0" cellspacing="0" border="0" summary="search">
  +                <tr>
  +                  <td colspan="3"><img src="{$spacer}" alt="" width="1" height="10" /></td>
  +                </tr>
  +                <tr>
  +                  <td><img src="{$spacer}" alt="" width="1" height="1" /></td>
  +                  <td nowrap="nowrap">
  +                    <input type="hidden" name="q"/>
  +                    <input type="text" id="query" size="15"/>
  +                    <img src="{$spacer}" alt="" width="5" height="1" />
  +                    <input type="submit" value="Search" name="Search"/>
  +                    <br />
  +                    <font color="white" size="2" face="Arial, Helvetica, Sans-serif">
  +                      the <xsl:value-of select="$config/searchsite-name"/> site
  +                      <!-- setting search options off for the moment -->
  +                      <!--
  +                      <input type="radio" name="web" value="web"/>web site&#160;&#160;<input type="radio" name="mail" value="mail"/>mail lists
  +                      -->
  +                    </font>
  +                  </td>
  +                  <td><img src="{$spacer}" alt="" width="1" height="1" /></td>
  +                </tr>
  +                <tr>
  +                  <td><img src="{$skin-img-dir}/search-left.gif" width="9" height="10" border="0" alt="" /></td>
  +                  <td><img src="{$spacer}" alt="" width="1" height="1" /></td>
  +                  <td><img src="{$skin-img-dir}/search-right.gif" width="9" height="10" border="0" alt="" /></td>
  +                </tr>
  +              </table>
  +            </form>
             </xsl:if>
           </td>
  -        <td bgcolor="#294563"><img src="{$spacer}" alt="" width="10" height="10" /></td>
  +        <xsl:comment>================= start Search ==================</xsl:comment>
  +
  +        <td bgcolor="{$header-color}"><img src="{$spacer}" alt="" width="10" height="10" /></td>
         </tr>
         <tr>
  -        <td colspan="2" bgcolor="#294563" valign="bottom">
  -            <xsl:apply-templates select="div[@class='tab']"/>
  +        <td colspan="2" bgcolor="{$header-color}" valign="bottom">
  +          <xsl:comment>================= start Tabs ==================</xsl:comment>
  +          <xsl:apply-templates select="div[@class='tab']"/>
  +          <xsl:comment>================= end Tabs ==================</xsl:comment>
           </td>
  -        <td bgcolor="#294563"><img src="{$spacer}" height="1" width="1" alt="" /></td>
  +        <td bgcolor="{$header-color}"><img src="{$spacer}" height="1" width="1" alt="" /></td>
         </tr>
         <tr>
  -        <td colspan="4" bgcolor="#4C6C8F"><img src="{$spacer}" alt="" height="10" width="1" /></td>
  +        <td colspan="4" bgcolor="{$menu-border}"><img src="{$spacer}" alt="" height="10" width="1" /></td>
         </tr>
       </table>
  -    <!-- ======================================  Menu and Content table ====================================== -->
  +    <xsl:comment>================= end Banner ==================</xsl:comment>
  +
  +    <xsl:comment>================= start Menu, NavBar, Content ==================</xsl:comment>
       <table cellspacing="0" cellpadding="0" border="0" width="100%" bgcolor="#ffffff" summary="page content">
         <tr>
           <td valign="top">
             <table cellpadding="0" cellspacing="0" border="0" summary="menu">
               <tr>
  +              <xsl:comment>================= start left top NavBar ==================</xsl:comment>
                 <td valign="top" rowspan="3">
                   <table cellspacing="0" cellpadding="0" border="0" summary="blue line">
  -                  <tr><td bgcolor="#294563"><img src="{$spacer}" alt="" height="1" width="10" /></td></tr>
  -                  <tr><td bgcolor="#CFDCED"><font face="Arial, Helvetica, Sans-serif" size="4" color="#4C6C8F">&#160;</font></td></tr>
  -                  <tr><td bgcolor="#294563"><img src="{$spacer}" alt="" height="1" width="10" /></td></tr>
  +                  <tr><td bgcolor="{$header-color}"><img src="{$spacer}" alt="" height="1" width="10" /></td></tr>
  +                  <tr><td bgcolor="{$background-bars}"><font face="Arial, Helvetica, Sans-serif" size="4" color="{$menu-border}">&#160;</font></td></tr>
  +                  <tr><td bgcolor="{$header-color}"><img src="{$spacer}" alt="" height="1" width="10" /></td></tr>
                   </table>
                 </td>
  -              <td bgcolor="#294563"><img src="{$spacer}" alt="" height="1" width="1" /></td>
  -              <td bgcolor="#4C6C8F" valign="bottom"><img src="{$spacer}" alt="" height="10" width="10" /></td>
  -              <td bgcolor="#4C6C8F" valign="top" nowrap="nowrap">
  -                  <xsl:apply-templates select="div[@class='menu']"/>
  +              <xsl:comment>================= end left top NavBar ==================</xsl:comment>
  +
  +              <td bgcolor="{$header-color}"><img src="{$spacer}" alt="" height="1" width="1" /></td>
  +              <td bgcolor="{$menu-border}" valign="bottom"><img src="{$spacer}" alt="" height="10" width="10" /></td>
  +              <td bgcolor="{$menu-border}" valign="top" nowrap="nowrap">
  +                <xsl:comment>================= start Menu items ==================</xsl:comment>
  +                <xsl:apply-templates select="div[@class='menu']"/>
  +                <xsl:comment>================= end Menu items ==================</xsl:comment>
                 </td>
  -              <td bgcolor="#4C6C8F" valign="bottom"><img src="{$spacer}" alt="" height="10" width="10" /></td>
  -              <td bgcolor="#294563"><img src="{$spacer}" alt="" height="1" width="1" /></td>
  +              <td bgcolor="{$menu-border}" valign="bottom"><img src="{$spacer}" alt="" height="10" width="10" /></td>
  +              <td bgcolor="{$header-color}"><img src="{$spacer}" alt="" height="1" width="1" /></td>
               </tr>
               <tr>
  -              <td bgcolor="#4C6C8F" rowspan="2" colspan="2" align="left" valign="bottom"><img src="{$skin-img-dir}/menu-left.gif" alt="" border="0" width="10" height="10" /></td>
  -              <td bgcolor="#4C6C8F"><img src="{$spacer}" alt="" border="0" width="10" height="10" /></td>
  -              <td bgcolor="#4C6C8F" rowspan="2" colspan="2" align="right" valign="bottom"><img src="{$skin-img-dir}/menu-right.gif" alt="" border="0" width="10" height="10" /></td>
  +              <!-- Menu: bottom left -->
  +              <td bgcolor="{$menu-border}" rowspan="2" colspan="2" align="left" valign="bottom">
  +                <img src="{$skin-img-dir}/menu-left.gif" alt="" border="0" width="10" height="10" />
  +              </td>
  +              <!-- Menu: bottom -->
  +              <td bgcolor="{$menu-border}">
  +                <img src="{$spacer}" alt="" border="0" width="10" height="10" />
  +              </td>
  +              <!-- Menu: bottom right -->
  +              <td bgcolor="{$menu-border}" rowspan="2" colspan="2" align="right" valign="bottom">
  +                <img src="{$skin-img-dir}/menu-right.gif" alt="" border="0" width="10" height="10" />
  +              </td>
               </tr>
               <tr>
  -              <td bgcolor="#294563" height="1"><img src="{$spacer}" alt="" height="1" width="1" /></td>
  +              <td bgcolor="{$header-color}" height="1"><img src="{$spacer}" alt="" height="1" width="1" /></td>
               </tr>
             </table>
           </td>
           <td width="100%" valign="top">
             <table cellspacing="0" cellpadding="0" border="0" width="100%" summary="content">
  -            <tr><td bgcolor="#294563" colspan="4"><img src="{$spacer}" alt="" height="1" width="10" /></td></tr>
  +
  +            <xsl:comment>================= start middle NavBar ==================</xsl:comment>
  +            <tr><td bgcolor="{$header-color}" colspan="4"><img src="{$spacer}" alt="" height="1" width="10" /></td></tr>
               <tr>
  -              <td bgcolor="#CFDCED" width="10" align="left"><img src="{$spacer}" alt="" height="1" width="10" /></td>
  -              <td bgcolor="#CFDCED" width="50%" align="left">
  -<!-- ========================================= Page number ===================================== -->
  -                <font face="Arial, Helvetica, Sans-serif" size="3" color="#4C6C8F">
  +              <td bgcolor="{$background-bars}" width="10" align="left"><img src="{$spacer}" alt="" height="1" width="10" /></td>
  +              <td bgcolor="{$background-bars}" width="50%" align="left">
  +                <!-- ============ Page number =========== -->
  +                <font face="Arial, Helvetica, Sans-serif" size="3" color="{$menu-border}">
                   &#160;
  -<!--
  -                  <b>Page 1 of 5</b>
  --->
  +                <!-- <b>Page 1 of 5</b> -->
                   </font>
                     <img src="{$spacer}" alt="" height="8" width="10" />
                 </td>
  -              <td bgcolor="#CFDCED" width="50%" align="right">
  -<!--  ====================================== page navigation ===================================== -->
  -                <font face="Arial, Helvetica, Sans-serif" size="3" color="#4C6C8F">
  +              <td bgcolor="{$background-bars}" width="50%" align="right">
  +                <!-- ============ Page navigation =========== -->
  +                <font face="Arial, Helvetica, Sans-serif" size="3" color="{$menu-border}">
                   &#160;
  -<!--
  -                  <b>&#171; prev&#160;&#160;<font size="4">[3]</font>&#160;&#160;next &#187;</b>
  --->
  +                <!-- <b>&#171; prev&#160;&#160;<font size="4">[3]</font>&#160;&#160;next &#187;</b> -->
                   </font>
                     <img src="{$spacer}" alt="" height="8" width="10" />
                 </td>
  -              <td bgcolor="#CFDCED" width="10"><img src="{$spacer}" alt="" height="1" width="10" /></td>
  +              <td bgcolor="{$background-bars}" width="10"><img src="{$spacer}" alt="" height="1" width="10" /></td>
               </tr>
  -            <tr><td bgcolor="#294563" colspan="4"><img src="{$spacer}" alt="" height="1" width="10" /></td></tr>
  +            <tr><td bgcolor="{$header-color}" colspan="4"><img src="{$spacer}" alt="" height="1" width="10" /></td></tr>
  +            <xsl:comment>================= end middle NavBar ==================</xsl:comment>
  +
  +
  +            <xsl:comment>================= start Content==================</xsl:comment>
               <tr>
                 <td width="10" align="left"><img src="{$spacer}" alt="" height="1" width="10" /></td>
                 <td width="100%" align="left">
  @@ -180,15 +218,30 @@
                 </td>
                 <td width="10"><img src="{$spacer}" alt="" height="1" width="10" /></td>
               </tr>
  +            <xsl:comment>================= end Content==================</xsl:comment>
  +
  +
             </table>
           </td>
         </tr>
       </table>
  -<!-- footer -->
  +    <xsl:comment>================= end Menu, NavBar, Content ==================</xsl:comment>
  +
  +    <xsl:comment>================= start Footer ==================</xsl:comment>
       <table border="0" height="20" width="100%" cellpadding="0" cellspacing="0" summary="footer">
  -      <tr><td bgcolor="#4C6C8F" height="1" colspan="2"><img src="{$spacer}" alt="" width="1" height="1" /><a href="{$skin-img-dir}/label.gif"></a><a href="{$skin-img-dir}/page.gif"></a><a href="{$skin-img-dir}/chapter.gif"></a><a href="{$skin-img-dir}/chapter_open.gif"></a><a href="{$skin-img-dir}/current.gif"></a><a href="/favicon.ico"></a></td></tr>
         <tr>
  -        <td align="center" class="copyright" bgcolor="#CFDCED" colspan="2">
  +        <td bgcolor="{$menu-border}" height="1" colspan="2">
  +          <img src="{$spacer}" alt="" width="1" height="1" />
  +          <a href="{$skin-img-dir}/label.gif"/>
  +          <a href="{$skin-img-dir}/page.gif"/>
  +          <a href="{$skin-img-dir}/chapter.gif"/>
  +          <a href="{$skin-img-dir}/chapter_open.gif"/>
  +          <a href="{$skin-img-dir}/current.gif"/>
  +          <a href="/favicon.ico"/>
  +        </td>
  +      </tr>
  +      <tr>
  +        <td align="center" class="copyright" bgcolor="{$background-bars}" colspan="2">
             <font face="Arial, Helvetica, Sans-Serif" size="2">Copyright &#169;
             <xsl:value-of select="$config/year"/>&#160;<xsl:value-of
             select="$config/vendor"/> All rights reserved.<script language="JavaScript" type="text/javascript"><![CDATA[<!--
  @@ -197,12 +250,12 @@
           </td>
         </tr>
         <tr>
  -      <td class="logos" bgcolor="#CFDCED" align="left">
  +      <td class="logos" bgcolor="{$background-bars}" align="left">
           <xsl:if test="$config/host-logo and not($config/host-logo = '')">
               <a href="{$config/host-url}"><img src="{$config/host-logo}" alt="{$config/host-name} logo" border="0"/></a>
           </xsl:if>
         </td>
  -      <td class="logos" bgcolor="#CFDCED" align="right">
  +      <td class="logos" bgcolor="{$background-bars}" align="right">
           <xsl:if test="$filename = 'index.html' and $config/credits">
             <div align="right">
             <xsl:for-each select="$config/credits/credit">
  @@ -228,13 +281,16 @@
           </td>
         </tr>
       </table>
  +    <xsl:comment>================= end Footer ==================</xsl:comment>
         </body>
       </html>
  -    </xsl:template>
  -    <xsl:template match="node()|@*" priority="-1">
  -      <xsl:copy>
  -        <xsl:apply-templates select="@*"/>
  -        <xsl:apply-templates/>
  -      </xsl:copy>
     </xsl:template>
  +
  +  <xsl:template match="node()|@*" priority="-1">
  +    <xsl:copy>
  +      <xsl:apply-templates select="@*"/>
  +      <xsl:apply-templates/>
  +    </xsl:copy>
  +  </xsl:template>
  +
   </xsl:stylesheet>
  
  
  
  1.7       +38 -103   xml-forrest/src/resources/skins/forrest-site/xslt/html/tab2menu.xsl
  
  Index: tab2menu.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/forrest-site/xslt/html/tab2menu.xsl,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- tab2menu.xsl	9 Nov 2002 11:37:44 -0000	1.6
  +++ tab2menu.xsl	16 Nov 2002 20:58:13 -0000	1.7
  @@ -1,136 +1,71 @@
   <?xml version="1.0"?>
   <!--
  -This stylesheet generates 'tabs' at the top left of the Forrest skin.  Tabs are
  -visual indicators that a certain subsection of the URI space is being browsed.
  -For example, if we had tabs with paths:
  -
  -Tab1:  ''
  -Tab2:  'community'
  -Tab3:  'community/howto'
  -Tab4:  'community/howto/xmlform/index.html'
  -
  -Then if the current path was 'community/howto/foo', Tab3 would be highlighted.
  -The rule is: the tab with the longest path that forms a prefix of the current
  -path is enabled.
  -
  -The output of this stylesheet is HTML of the form:
  -    <div class="tab">
  -      ...
  -    </div>
  -
  -which is then merged by site2xhtml.xsl
  -
  -$Id$
  +This stylesheet generates 'tabs' at the top left of the screen.
  +See the imported tab2menu.xsl for details.
   -->
   
   <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  -  <xsl:param name="path"/>
  -  <xsl:param name="dir_index" select="'index.html'"/>
  -  <xsl:include href="dotdots.xsl"/>
  -  <xsl:include href="pathutils.xsl"/>
  -
  -  <!-- NOTE: Xalan has a bug (race condition?) where sometimes $root is only half-evaluated -->
  -  <xsl:variable name="root">
  -    <xsl:call-template name="dotdots">
  -      <xsl:with-param name="path" select="$path"/>
  -    </xsl:call-template>
  -  </xsl:variable>
  -
  -  <xsl:variable name="skin-img-dir" select="concat(string($root), 'skin/images')"/>
  -
  -  <xsl:template name="spacer">
  -    <td width="8">
  -      <img src="{$root}skin/images/spacer.gif" width="8" height="8" alt=""/>
  -    </td>
  -  </xsl:template>
  -
  -  <!--
  -    The longest path of any tab, whose path is a subset of the current URL.  Ie,
  -    the path of the 'current' tab.
  -  -->
  -  <xsl:variable name="longest-dir">
  -    <xsl:for-each select="/tabs/tab[starts-with($path, @dir|@href)]">
  -      <xsl:sort select="string-length(@dir|@href)"
  -                data-type="number" order="descending"/>
  -      <xsl:if test="position()=1">
  -        <xsl:value-of select="@dir|@href"/>
  -      </xsl:if>
  -    </xsl:for-each>
  -  </xsl:variable>
   
  +  <xsl:import href="../../../common/xslt/html/tab2menu.xsl"/>
   
     <xsl:template match="tabs">
       <div class="tab">
         <table cellspacing="0" cellpadding="0" border="0" summary="tab bar">
           <tr>
  -          <xsl:apply-templates/>
  +          <xsl:apply-imports/>
           </tr>
         </table>
       </div>
     </xsl:template>
   
  -  <xsl:template match="tab">
  -    <xsl:call-template name="spacer"/>
  -    <xsl:choose>
  -      <xsl:when test="@dir = $longest-dir or @href = $longest-dir">
  -        <xsl:call-template name="selected"/>
  -      </xsl:when>
  -      <xsl:otherwise>
  -        <xsl:call-template name="not-selected"/>
  -      </xsl:otherwise>
  -    </xsl:choose>
  +  <xsl:template name="pre-separator">
  +    <xsl:call-template name="separator"/>
     </xsl:template>
   
  -  <xsl:template name="not-selected">
  +  <xsl:template name="post-separator">
  +  </xsl:template>
  +
  +  <xsl:template name="separator">
  +    <td width="8">
  +      <img src="{$root}skin/images/spacer.gif" width="8" height="8" alt=""/>
  +    </td>
  +  </xsl:template>
  +
  +  <xsl:template name="selected">
       <td valign="bottom">
  -      <table cellspacing="0" cellpadding="0" border="0" height="25" summary="non selected tab">
  +      <table cellspacing="0" cellpadding="0" border="0" height="30" summary="selected tab">
           <tr>
  -          <td bgcolor="#B2C4E0" width="5" valign="top"><img src="{$skin-img-dir}/tab-left.gif" alt="" width="5" height="5" /></td>
  -          <td bgcolor="#B2C4E0" valign="middle">
  -            <a>
  -              <xsl:attribute name="href">
  -                <xsl:if test="starts-with(@href, 'http')">  <!-- Absolute URL -->
  -                  <xsl:value-of select="@href"/>
  -                </xsl:if>
  -                <xsl:if test="not(starts-with(@href, 'http'))">  <!-- Root-relative path -->
  -                  <xsl:variable name="backpath">
  -                    <xsl:call-template name="dotdots">
  -                      <xsl:with-param name="path" select="$path"/>
  -                    </xsl:call-template>
  -                    <xsl:text>/</xsl:text>
  -                    <xsl:value-of select="@dir|@href"/>
  -                    <!-- If we obviously have a directory, add /index.html -->
  -                    <xsl:if test="@dir or substring(@href, string-length(@href),
  -                      string-length(@href)) = '/'">
  -                      <xsl:text>/</xsl:text>
  -                      <xsl:value-of select="$dir_index"/>
  -                    </xsl:if>
  -                  </xsl:variable>
  -
  -                  <xsl:value-of
  -                    select="translate(normalize-space(translate($backpath, ' /', '/ ')), ' /', '/ ')"/>
  -                  <!-- Link to backpath, normalizing slashes -->
  -                </xsl:if>
  -              </xsl:attribute>
  -              <font face="Arial, Helvetica, Sans-serif" size="2"><xsl:value-of select="@label"/></font>
  -            </a>
  +          <td bgcolor="#4C6C8F" width="5" valign="top">
  +            <img src="{$skin-img-dir}/tabSel-left.gif" alt="" width="5" height="5" />
  +          </td>
  +          <td bgcolor="#4C6C8F" valign="middle">
  +            <font face="Arial, Helvetica, Sans-serif" size="2" color="#ffffff">
  +              <b>
  +                <xsl:call-template name="base-selected"/>
  +              </b>
  +            </font>
             </td>
  -          <td bgcolor="#B2C4E0" width="5" valign="top"><img src="{$skin-img-dir}/tab-right.gif" alt="" width="5" height="5" />
  +          <td bgcolor="#4C6C8F" width="5" valign="top">
  +            <img src="{$skin-img-dir}/tabSel-right.gif" alt="" width="5" height="5" />
             </td>
           </tr>
         </table>
       </td>
     </xsl:template>
   
  -  <xsl:template name="selected">
  +  <xsl:template name="not-selected">
       <td valign="bottom">
  -      <table cellspacing="0" cellpadding="0" border="0" height="30" summary="selected tab">
  +      <table cellspacing="0" cellpadding="0" border="0" height="25" summary="non selected tab">
           <tr>
  -          <td bgcolor="#4C6C8F" width="5" valign="top"><img src="{$skin-img-dir}/tabSel-left.gif" alt="" width="5" height="5" /></td>
  -          <td bgcolor="#4C6C8F" valign="middle">
  -            <font face="Arial, Helvetica, Sans-serif" size="2" color="#ffffff"><b><xsl:value-of select="@label"/></b></font>
  +          <td bgcolor="#B2C4E0" width="5" valign="top">
  +            <img src="{$skin-img-dir}/tab-left.gif" alt="" width="5" height="5" />
  +          </td>
  +          <td bgcolor="#B2C4E0" valign="middle">
  +            <xsl:call-template name="base-not-selected"/>
  +          </td>
  +          <td bgcolor="#B2C4E0" width="5" valign="top">
  +            <img src="{$skin-img-dir}/tab-right.gif" alt="" width="5" height="5" />
             </td>
  -          <td bgcolor="#4C6C8F" width="5" valign="top"><img src="{$skin-img-dir}/tabSel-right.gif" alt="" width="5" height="5" /></td>
           </tr>
         </table>
       </td>
  
  
  

Mime
View raw message