forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject svn commit: r632734 - in /forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets: document-to-fo.xsl helper-pdfoutline.xsl
Date Sun, 02 Mar 2008 10:44:02 GMT
Author: crossley
Date: Sun Mar  2 02:44:01 2008
New Revision: 632734

URL: http://svn.apache.org/viewvc?rev=632734&view=rev
Log:
Fix warning about missing "__toc__". Remove some useless width properties on fo:block.
Contributed by: Jeremias Maerki
Issue: FOR-1072

Modified:
    forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
    forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-pdfoutline.xsl

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl?rev=632734&r1=632733&r2=632734&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
(original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
Sun Mar  2 02:44:01 2008
@@ -357,7 +357,6 @@
             text-align="center"
             space-before="20pt"
             space-after="25pt"
-            width="7.5in"
             font-family="serif"
             font-style="italic">
       <xsl:call-template
@@ -371,7 +370,6 @@
             font-size="10pt"
             text-align="left"
             space-before="20pt"
-            width="7.5in"
             font-family="serif"
             border-top="0.25pt solid"
             border-bottom="0.25pt solid"
@@ -412,13 +410,13 @@
   <xsl:template match="body[count(//section) != 0]">
     <xsl:if test="$disable-toc != 'true' and $toc-max-depth > 0">
       <fo:block font-family="sans-serif" font-size="12pt" font-weight="bold"
-        space-after="5pt" space-before="5pt" text-align="justify" width="7.5in" id="__toc__">
+        space-after="5pt" space-before="5pt" text-align="justify" id="__toc__">
         <xsl:call-template name="insertPageBreaks"/>
         <!-- insert i18n stuff here -->
         <xsl:text>Table of contents</xsl:text>
       </fo:block>
       <fo:block font-family="serif" font-size="12pt" space-after="5pt"
-        space-before="0pt" text-align="justify" width="7.5in">
+        space-before="0pt" text-align="justify">
         <xsl:if test="$page-break-top-sections">
           <xsl:attribute name="break-after">page</xsl:attribute>
         </xsl:if>

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-pdfoutline.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-pdfoutline.xsl?rev=632734&r1=632733&r2=632734&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-pdfoutline.xsl
(original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-pdfoutline.xsl
Sun Mar  2 02:44:01 2008
@@ -22,19 +22,21 @@
   <xsl:template
         match="document"
         mode="outline">
-    <fo:bookmark-tree>
-      <xsl:if test="$disable-toc != 'true' and $toc-max-depth > 0">
-        <fo:bookmark internal-destination="__toc__">
-          <fo:bookmark-title>
-            <!-- insert i18n stuff here -->
-            <xsl:text>Table of contents</xsl:text>
-          </fo:bookmark-title>
-        </fo:bookmark>
-      </xsl:if>
-      <xsl:apply-templates
-            select="body/section"
-            mode="outline" />
-    </fo:bookmark-tree>
+    <xsl:if test="count(body/section) &gt; 0">
+      <fo:bookmark-tree>
+        <xsl:if test="$disable-toc != 'true' and $toc-max-depth > 0">
+          <fo:bookmark internal-destination="__toc__">
+            <fo:bookmark-title>
+              <!-- insert i18n stuff here -->
+              <xsl:text>Table of contents</xsl:text>
+            </fo:bookmark-title>
+          </fo:bookmark>
+        </xsl:if>
+        <xsl:apply-templates
+          select="body/section"
+          mode="outline" />
+      </fo:bookmark-tree>
+    </xsl:if>
   </xsl:template>
   <xsl:template
         match="section"



Mime
View raw message