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 document2html.xsl
Date Sat, 06 Sep 2003 12:32:41 GMT
jefft       2003/09/06 05:32:41

  Modified:    src/resources/skins/common/xslt/html document2html.xsl
  Log:
  Fix HTML validity:
   - minitoc correctly nests ul and li's
   - script has type attribute
  
  Revision  Changes    Path
  1.25      +18 -16    xml-forrest/src/resources/skins/common/xslt/html/document2html.xsl
  
  Index: document2html.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/common/xslt/html/document2html.xsl,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- document2html.xsl	4 Sep 2003 03:03:10 -0000	1.24
  +++ document2html.xsl	6 Sep 2003 12:32:41 -0000	1.25
  @@ -106,7 +106,7 @@
     <xsl:template name="printlink">
       <xsl:if test="$disable-print-link = 'false'"> 
       
  -<script Language="Javascript">
  +<script type="text/javascript" language="Javascript">
   
   function printit(){  
   if (window.print) {
  @@ -120,7 +120,7 @@
   </script>
               
   
  -<script Language="Javascript">  
  +<script type="text/javascript" language="Javascript">  
   var NS = (navigator.appName == "Netscape");
   var VERSION = parseInt(navigator.appVersion);
   if (VERSION > 3) {
  @@ -341,23 +341,26 @@
     <xsl:template name="minitoc">  
       <xsl:param name="tocroot"/>
       <xsl:param name="depth"/>     
  -    <ul class="minitoc">
  -      <xsl:for-each select="$tocroot/section">
  -        <xsl:call-template name="toclink"/>
  -        <xsl:if test="$depth&lt;$max-depth">
  -          <xsl:call-template name="minitoc">
  -            <xsl:with-param name="tocroot" select="."/>
  -            <xsl:with-param name="depth" select="$depth + 1"/>          
  -          </xsl:call-template>
  -        </xsl:if>      
  -      </xsl:for-each>
  -    </ul>
  +    <xsl:if test="count($tocroot/section) > 0">
  +      <ul class="minitoc">
  +        <xsl:for-each select="$tocroot/section">
  +          <li>
  +            <xsl:call-template name="toclink"/>
  +            <xsl:if test="$depth&lt;$max-depth">
  +              <xsl:call-template name="minitoc">
  +                <xsl:with-param name="tocroot" select="."/>
  +                <xsl:with-param name="depth" select="$depth + 1"/>          
  +              </xsl:call-template>
  +            </xsl:if>      
  +          </li>
  +        </xsl:for-each>
  +      </ul>
  +    </xsl:if>
     </xsl:template>
   
     <xsl:template name="toclink">
       <xsl:variable name="tocitem" select="normalize-space(title)"/>
       <xsl:if test="string-length($tocitem)>0">
  -      <li>
         <a>
           <xsl:attribute name="href">
             <xsl:text>#</xsl:text>
  @@ -367,7 +370,6 @@
           </xsl:attribute>
           <xsl:value-of select="$tocitem"/>
         </a>
  -      </li>
       </xsl:if>
     </xsl:template>
     
  
  
  

Mime
View raw message