forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject cvs commit: xml-forrest/src/resources/skins/common/xslt/html book2menu.xsl
Date Sun, 31 Aug 2003 12:15:53 GMT
jefft       2003/08/31 05:15:53

  Modified:    src/resources/skins/common/xslt/html book2menu.xsl
  Log:
  When comparing the path against book.xml node paths, ignore only the fragment
  id, not the whole extension.  This allows filenames with differing extensions
  (site.html, site.pdf) to be listed in the same menu.
  ----------------------------------------------------------------------
  
  Revision  Changes    Path
  1.11      +10 -10    xml-forrest/src/resources/skins/common/xslt/html/book2menu.xsl
  
  Index: book2menu.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/common/xslt/html/book2menu.xsl,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- book2menu.xsl	31 Aug 2003 11:59:38 -0000	1.10
  +++ book2menu.xsl	31 Aug 2003 12:15:53 -0000	1.11
  @@ -67,21 +67,21 @@
     <xsl:template match="menu-item">
       <!-- Use apply-imports when overriding -->
   
  -    <xsl:variable name="href-noext">
  -      <xsl:call-template name="path-noext">
  +    <xsl:variable name="href-nofrag">
  +      <xsl:call-template name="path-nofrag">
           <xsl:with-param name="path" select="@href"/>
         </xsl:call-template>
       </xsl:variable>
   
       <xsl:variable name="node-path">
         <xsl:call-template name="normalize">
  -        <xsl:with-param name="path" select="concat($dirname, $href-noext)"/>
  +        <xsl:with-param name="path" select="concat($dirname, $href-nofrag)"/>
         </xsl:call-template>
       </xsl:variable>
   
       <xsl:choose>
         <!-- Compare with extensions stripped -->
  -      <xsl:when test="$node-path = $path-noext">
  +      <xsl:when test="$node-path = $path-nofrag">
           <xsl:choose>
             <xsl:when test="contains(@href, '#')">
               <xsl:call-template name="selected-anchor"/>
  @@ -119,14 +119,14 @@
       </xsl:call-template>
     </xsl:variable>
   
  -  <xsl:variable name="filename-noext">
  -    <xsl:call-template name="filename-noext">
  +  <xsl:variable name="path-nofrag">
  +    <xsl:call-template name="path-nofrag">
         <xsl:with-param name="path" select="$path"/>
       </xsl:call-template>
     </xsl:variable>
   
  -  <xsl:variable name="path-noext">
  -    <xsl:call-template name="path-noext">
  +  <xsl:variable name="path-nofrag">
  +    <xsl:call-template name="path-nofrag">
         <xsl:with-param name="path" select="$path"/>
       </xsl:call-template>
     </xsl:variable>
  @@ -140,7 +140,7 @@
     <xsl:template match="external">
       <li>
         <xsl:choose>
  -        <xsl:when test="starts-with(@href, $filename-noext)">
  +        <xsl:when test="starts-with(@href, $path-nofrag)">
             <span class="externalSelected">
               <xsl:call-template name="print-external"/>
             </span>
  
  
  

Mime
View raw message