You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by rg...@apache.org on 2006/02/14 12:45:20 UTC

svn commit: r377702 - in /forrest/trunk/main/webapp/skins: common/xslt/fo/document-to-fo.xsl common/xslt/html/document-to-html.xsl common/xslt/html/site-to-xhtml.xsl pelt/xslt/html/site-to-xhtml.xsl

Author: rgardler
Date: Tue Feb 14 03:45:15 2006
New Revision: 377702

URL: http://svn.apache.org/viewcvs?rev=377702&view=rev
Log:
force TOC (workaround for FOR-559, thaks to Jeremias Maerki)

Modified:
    forrest/trunk/main/webapp/skins/common/xslt/fo/document-to-fo.xsl
    forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl
    forrest/trunk/main/webapp/skins/common/xslt/html/site-to-xhtml.xsl
    forrest/trunk/main/webapp/skins/pelt/xslt/html/site-to-xhtml.xsl

Modified: forrest/trunk/main/webapp/skins/common/xslt/fo/document-to-fo.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/skins/common/xslt/fo/document-to-fo.xsl?rev=377702&r1=377701&r2=377702&view=diff
==============================================================================
--- forrest/trunk/main/webapp/skins/common/xslt/fo/document-to-fo.xsl (original)
+++ forrest/trunk/main/webapp/skins/common/xslt/fo/document-to-fo.xsl Tue Feb 14 03:45:15 2006
@@ -750,7 +750,7 @@
       padding-after="3pt">
       <xsl:apply-templates/>
     </fo:block>
-  </xsl:template>
+  </xsl:template>                 
 
   <xsl:template match="link|fork|jump">
     <xsl:variable name="color" select="//skinconfig/colors/color[@name = 'body']/@link"/>

Modified: forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl?rev=377702&r1=377701&r2=377702&view=diff
==============================================================================
--- forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl (original)
+++ forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl Tue Feb 14 03:45:15 2006
@@ -367,6 +367,9 @@
 
   <xsl:template match="body" mode="toc">
     <tocitems>
+      <xsl:if test="../header/meta[@name='forrest.force-toc'] = 'true'">
+        <xsl:attribute name="force">true</xsl:attribute>
+      </xsl:if>
       <xsl:apply-templates select="section" mode="toc">
         <xsl:with-param name="level" select="1"/>
       </xsl:apply-templates>

Modified: forrest/trunk/main/webapp/skins/common/xslt/html/site-to-xhtml.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/skins/common/xslt/html/site-to-xhtml.xsl?rev=377702&r1=377701&r2=377702&view=diff
==============================================================================
--- forrest/trunk/main/webapp/skins/common/xslt/html/site-to-xhtml.xsl (original)
+++ forrest/trunk/main/webapp/skins/common/xslt/html/site-to-xhtml.xsl Tue Feb 14 03:45:15 2006
@@ -288,7 +288,7 @@
   <xsl:template match="div[@id='skinconf-toc-page']">
     <xsl:if test="$config/toc">
       <xsl:if test="contains($minitoc-location,'page')">
-        <xsl:if test="count(//tocitems/tocitem) >= $config/toc/@min-sections">
+        <xsl:if test="(count(//tocitems/tocitem) >= $config/toc/@min-sections) or (//tocitems/@force = 'true')">
           <xsl:call-template name="minitoc">
             <xsl:with-param name="tocroot" select="//tocitems"/>
           </xsl:call-template>
@@ -299,7 +299,7 @@
 
   <xsl:template name="minitoc">
     <xsl:param name="tocroot"/>
-    <xsl:if test="count($tocroot/tocitem) >= $config/toc/@min-sections">
+    <xsl:if test="(count($tocroot/tocitem) >= $config/toc/@min-sections) or ($tocroot/@force = 'true')">
     <xsl:if test="contains($config/toc/@location,'page')">
       <ul class="minitoc">
         <xsl:for-each select="$tocroot/tocitem">

Modified: forrest/trunk/main/webapp/skins/pelt/xslt/html/site-to-xhtml.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/skins/pelt/xslt/html/site-to-xhtml.xsl?rev=377702&r1=377701&r2=377702&view=diff
==============================================================================
--- forrest/trunk/main/webapp/skins/pelt/xslt/html/site-to-xhtml.xsl (original)
+++ forrest/trunk/main/webapp/skins/pelt/xslt/html/site-to-xhtml.xsl Tue Feb 14 03:45:15 2006
@@ -743,7 +743,7 @@
 
     <xsl:if test="$config/toc">
       <xsl:if test="contains($minitoc-location,'page')">
-        <xsl:if test="count(//tocitems/tocitem) >= $config/toc/@min-sections">
+        <xsl:if test="(count(//tocitems/tocitem) >= $config/toc/@min-sections) or (//tocitems/@force = 'true')">
 			<div id="minitoc-area">
     			<xsl:call-template name="minitoc">
         		    <xsl:with-param name="tocroot" select="//tocitems"/>