You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ah...@apache.org on 2005/08/14 22:30:07 UTC

svn commit: r232639 - in /maven/maven-1/plugins/trunk/pdf: src/plugin-resources/fo-body.xslt src/plugin-resources/fo-toc.xslt xdocs/changes.xml

Author: aheritier
Date: Sun Aug 14 13:30:02 2005
New Revision: 232639

URL: http://svn.apache.org/viewcvs?rev=232639&view=rev
Log:
MPPDF-33 : Fix some "contents overflows area" errors.

Modified:
    maven/maven-1/plugins/trunk/pdf/src/plugin-resources/fo-body.xslt
    maven/maven-1/plugins/trunk/pdf/src/plugin-resources/fo-toc.xslt
    maven/maven-1/plugins/trunk/pdf/xdocs/changes.xml

Modified: maven/maven-1/plugins/trunk/pdf/src/plugin-resources/fo-body.xslt
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/pdf/src/plugin-resources/fo-body.xslt?rev=232639&r1=232638&r2=232639&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/pdf/src/plugin-resources/fo-body.xslt (original)
+++ maven/maven-1/plugins/trunk/pdf/src/plugin-resources/fo-body.xslt Sun Aug 14 13:30:02 2005
@@ -67,14 +67,14 @@
       <xsl:value-of select="$maxBodyWidth"/>
     </xsl:variable>
     <fo:block>
-      <fo:list-block provisional-distance-between-starts="{$leftMargin}in" provisional-label-separation="{$gutter}in">
+      <fo:list-block>
         <fo:list-item>
-          <fo:list-item-label end-indent="{$bodyWidth + $gutter}in">
+          <fo:list-item-label start-indent="{0 -$leftMargin}in" end-indent="{$bodyWidth + $gutter}in">
             <fo:block xsl:use-attribute-sets="outdented.number.style">
               <xsl:value-of select="normalize-space($chapterNumber)"/>
             </fo:block>
           </fo:list-item-label>
-          <fo:list-item-body>
+          <fo:list-item-body start-indent="0in" end-indent="{$rightMargin}in">
             <fo:block xsl:use-attribute-sets="chapter.title">
               <xsl:value-of select="normalize-space($chapter)"/>
             </fo:block>
@@ -104,7 +104,7 @@
     <xsl:param name="chapterNumber"/>
     <xsl:param name="fileName"/>
     <xsl:param name="transLink">
-        <xsl:value-of select="translate(@name,' ','_')"/>
+      <xsl:value-of select="translate(@name,' ','_')"/>
     </xsl:param>
     <fo:block xsl:use-attribute-sets="body.h1" id="{$fileName}#{$transLink}">
       <xsl:value-of select="@name"/>
@@ -124,7 +124,7 @@
     <xsl:param name="chapterNumber"/>
     <xsl:param name="fileName"/>
     <xsl:param name="transLink">
-        <xsl:value-of select="translate(@name,' ','_')"/>
+      <xsl:value-of select="translate(@name,' ','_')"/>
     </xsl:param>
     <fo:block xsl:use-attribute-sets="body.h2" id="{$fileName}#{$transLink}">
       <xsl:value-of select="@name"/>
@@ -200,7 +200,6 @@
       </xsl:apply-templates>
     </fo:block>
   </xsl:template>
-
   <xsl:template match="img[@src]">
     <xsl:param name="fileName"/>
     <xsl:param name="dirName">
@@ -212,34 +211,34 @@
     <!-- Resolve the location of the image source relative to the location of the current document -->
     <xsl:param name="ref" select="translate(normalize-space(@src),'\','/')"/>
     <xsl:variable name="source">
-        <xsl:choose>
-            <xsl:when test="starts-with($ref, './')">
-                <xsl:choose>
-                    <xsl:when test="string-length($dirName) = 0">
-                        <xsl:value-of select="substring-after($ref,'./')"/>
-                    </xsl:when>
-                    <xsl:otherwise>
-                        <xsl:value-of select="concat($dirName, '/', substring-after($ref,'./'))"/>
-                    </xsl:otherwise>
-                </xsl:choose>
+      <xsl:choose>
+        <xsl:when test="starts-with($ref, './')">
+          <xsl:choose>
+            <xsl:when test="string-length($dirName) = 0">
+              <xsl:value-of select="substring-after($ref,'./')"/>
             </xsl:when>
-            <xsl:when test="starts-with($ref, '../')">
-                <xsl:call-template name="resolveLink">
-                    <xsl:with-param name="dirName" select="$dirName"/>
-                    <xsl:with-param name="href" select="$ref"/>
-                </xsl:call-template>
+            <xsl:otherwise>
+              <xsl:value-of select="concat($dirName, '/', substring-after($ref,'./'))"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:when>
+        <xsl:when test="starts-with($ref, '../')">
+          <xsl:call-template name="resolveLink">
+            <xsl:with-param name="dirName" select="$dirName"/>
+            <xsl:with-param name="href" select="$ref"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:choose>
+            <xsl:when test="string-length($dirName) = 0">
+              <xsl:value-of select="$ref"/>
             </xsl:when>
             <xsl:otherwise>
-                <xsl:choose>
-                    <xsl:when test="string-length($dirName) = 0">
-                        <xsl:value-of select="$ref"/>
-                    </xsl:when>
-                    <xsl:otherwise>
-                        <xsl:value-of select="concat($dirName, '/', $ref)"/>
-                    </xsl:otherwise>
-                </xsl:choose>
+              <xsl:value-of select="concat($dirName, '/', $ref)"/>
             </xsl:otherwise>
-        </xsl:choose>
+          </xsl:choose>
+        </xsl:otherwise>
+      </xsl:choose>
     </xsl:variable>
     <xsl:variable name="width">
       <xsl:value-of select="substring-before(concat(normalize-space(@width),'p'),'p') div $imageDpi"/>
@@ -290,8 +289,8 @@
             <xsl:value-of select="$chapterNumber"/>
           </xsl:with-param>
           <xsl:with-param name="fileName">
-          <xsl:value-of select="$fileName"/>
-        </xsl:with-param>
+            <xsl:value-of select="$fileName"/>
+          </xsl:with-param>
         </xsl:apply-templates>
       </fo:inline>
     </fo:basic-link>
@@ -324,34 +323,34 @@
     <!-- Resolve the location of the link relative to the location of the current document -->
     <xsl:param name="ref" select="translate(normalize-space(@href),'\','/')"/>
     <xsl:param name="href">
-        <xsl:choose>
-            <xsl:when test="starts-with($ref, './')">
-                <xsl:choose>
-                    <xsl:when test="string-length($dirName) = 0">
-                        <xsl:value-of select="substring-after($ref,'./')"/>
-                    </xsl:when>
-                    <xsl:otherwise>
-                        <xsl:value-of select="concat($dirName, '/', substring-after($ref,'./'))"/>
-                    </xsl:otherwise>
-                </xsl:choose>
+      <xsl:choose>
+        <xsl:when test="starts-with($ref, './')">
+          <xsl:choose>
+            <xsl:when test="string-length($dirName) = 0">
+              <xsl:value-of select="substring-after($ref,'./')"/>
             </xsl:when>
-            <xsl:when test="starts-with($ref, '../')">
-                <xsl:call-template name="resolveLink">
-                    <xsl:with-param name="dirName" select="$dirName"/>
-                    <xsl:with-param name="href" select="$ref"/>
-                </xsl:call-template>
+            <xsl:otherwise>
+              <xsl:value-of select="concat($dirName, '/', substring-after($ref,'./'))"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:when>
+        <xsl:when test="starts-with($ref, '../')">
+          <xsl:call-template name="resolveLink">
+            <xsl:with-param name="dirName" select="$dirName"/>
+            <xsl:with-param name="href" select="$ref"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:choose>
+            <xsl:when test="string-length($dirName) = 0">
+              <xsl:value-of select="$ref"/>
             </xsl:when>
             <xsl:otherwise>
-                <xsl:choose>
-                    <xsl:when test="string-length($dirName) = 0">
-                        <xsl:value-of select="$ref"/>
-                    </xsl:when>
-                    <xsl:otherwise>
-                        <xsl:value-of select="concat($dirName, '/', $ref)"/>
-                    </xsl:otherwise>
-                </xsl:choose>
+              <xsl:value-of select="concat($dirName, '/', $ref)"/>
             </xsl:otherwise>
-        </xsl:choose>
+          </xsl:choose>
+        </xsl:otherwise>
+      </xsl:choose>
     </xsl:param>
     <fo:basic-link internal-destination="{$href}">
       <fo:inline xsl:use-attribute-sets="href.internal">
@@ -366,35 +365,33 @@
       </fo:inline>
     </fo:basic-link>
   </xsl:template>
-
   <xsl:template name="resolveLink">
     <xsl:param name="dirName"/>
     <xsl:param name="href"/>
     <xsl:choose>
-        <xsl:when test="starts-with($href, '../')">
-           <xsl:call-template name="resolveLink">
-               <xsl:with-param name="dirName">
-                    <xsl:call-template name="substring-before-last">
-                      <xsl:with-param name="text" select="$dirName"/>
-                      <xsl:with-param name="chars">/</xsl:with-param>
-                    </xsl:call-template>
-               </xsl:with-param>
-               <xsl:with-param name="href" select="substring-after($href,'../')"/>
-           </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:choose>
-            <xsl:when test="string-length($dirName) = 0">
-              <xsl:value-of select="$href"/>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:value-of select="concat($dirName, '/', $href)"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:otherwise>
+      <xsl:when test="starts-with($href, '../')">
+        <xsl:call-template name="resolveLink">
+          <xsl:with-param name="dirName">
+            <xsl:call-template name="substring-before-last">
+              <xsl:with-param name="text" select="$dirName"/>
+              <xsl:with-param name="chars">/</xsl:with-param>
+            </xsl:call-template>
+          </xsl:with-param>
+          <xsl:with-param name="href" select="substring-after($href,'../')"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:choose>
+          <xsl:when test="string-length($dirName) = 0">
+            <xsl:value-of select="$href"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="concat($dirName, '/', $href)"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
-
   <xsl:template name="substring-before-last">
     <xsl:param name="text"/>
     <xsl:param name="chars"/>
@@ -414,7 +411,6 @@
       </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
-
   <xsl:template name="substring-before-last-aux">
     <xsl:param name="text"/>
     <xsl:param name="chars"/>
@@ -436,7 +432,6 @@
       <xsl:otherwise/>
     </xsl:choose>
   </xsl:template>
-
   <xsl:template match="a[@name]">
     <xsl:param name="chapterNumber"/>
     <xsl:param name="fileName"/>
@@ -558,7 +553,7 @@
   <xsl:template match="code[@class='indent']">
     <xsl:param name="chapterNumber"/>
     <xsl:param name="fileName"/>
-<!--
+    <!--
     <fo:block xsl:use-attribute-sets="code.indent">
       <xsl:apply-templates>
         <xsl:with-param name="chapterNumber">
@@ -588,14 +583,14 @@
   <xsl:template match="div">
     <xsl:param name="chapterNumber"/>
     <xsl:param name="fileName"/>
-      <xsl:apply-templates>
-        <xsl:with-param name="chapterNumber">
-          <xsl:value-of select="$chapterNumber"/>
-        </xsl:with-param>
-        <xsl:with-param name="fileName">
-          <xsl:value-of select="$fileName"/>
-        </xsl:with-param>
-      </xsl:apply-templates>
+    <xsl:apply-templates>
+      <xsl:with-param name="chapterNumber">
+        <xsl:value-of select="$chapterNumber"/>
+      </xsl:with-param>
+      <xsl:with-param name="fileName">
+        <xsl:value-of select="$fileName"/>
+      </xsl:with-param>
+    </xsl:apply-templates>
   </xsl:template>
   <xsl:template match="big">
     <xsl:param name="chapterNumber"/>
@@ -639,8 +634,8 @@
               <xsl:value-of select="$chapterNumber"/>
             </xsl:with-param>
             <xsl:with-param name="fileName">
-          <xsl:value-of select="$fileName"/>
-        </xsl:with-param>
+              <xsl:value-of select="$fileName"/>
+            </xsl:with-param>
           </xsl:apply-templates>
         </fo:block>
       </fo:list-item-body>
@@ -678,8 +673,8 @@
               <xsl:value-of select="$chapterNumber"/>
             </xsl:with-param>
             <xsl:with-param name="fileName">
-          <xsl:value-of select="$fileName"/>
-        </xsl:with-param>
+              <xsl:value-of select="$fileName"/>
+            </xsl:with-param>
           </xsl:apply-templates>
         </fo:block>
       </fo:list-item-body>
@@ -701,8 +696,8 @@
               <xsl:value-of select="$chapterNumber"/>
             </xsl:with-param>
             <xsl:with-param name="fileName">
-          <xsl:value-of select="$fileName"/>
-        </xsl:with-param>
+              <xsl:value-of select="$fileName"/>
+            </xsl:with-param>
           </xsl:apply-templates>
         </fo:block>
       </fo:list-item-body>

Modified: maven/maven-1/plugins/trunk/pdf/src/plugin-resources/fo-toc.xslt
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/pdf/src/plugin-resources/fo-toc.xslt?rev=232639&r1=232638&r2=232639&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/pdf/src/plugin-resources/fo-toc.xslt (original)
+++ maven/maven-1/plugins/trunk/pdf/src/plugin-resources/fo-toc.xslt Sun Aug 14 13:30:02 2005
@@ -16,7 +16,6 @@
  * limitations under the License.
  */
  -->
-
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
     <!-- Templates for handling the TOC -->
     <xsl:template name="fo-toc">
@@ -35,7 +34,7 @@
                     <xsl:with-param name="chapter">Table of Contents</xsl:with-param>
                 </xsl:call-template>
                 <fo:table table-layout="fixed">
-                    <fo:table-column column-width="0.25in"/>
+                    <fo:table-column column-width="0.45in"/>
                     <fo:table-column column-width="0.4in"/>
                     <fo:table-column column-width="0.4in"/>
                     <fo:table-column column-width="{$maxBodyWidth - 1.25}in"/>

Modified: maven/maven-1/plugins/trunk/pdf/xdocs/changes.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/pdf/xdocs/changes.xml?rev=232639&r1=232638&r2=232639&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/pdf/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/pdf/xdocs/changes.xml Sun Aug 14 13:30:02 2005
@@ -25,6 +25,7 @@
   <body>
     <release version="2.3.1-SNAPSHOT" date="In SVN">
       <action dev="aheritier" type="fix" issue="MPPDF-39" due-to="Lukas Theussl">Missing patch for MPPDF-24 ( it defines a missing attribute for &lt;code style="indent"&gt; tags and cleans up some layout issues with definition lists).</action>
+      <action dev="aheritier" type="fix" issue="MPPDF-33" due-to="Valerie Nyre">Fix some "contents overflows area" errors.</action>
       <action dev="aheritier" type="fix" issue="MPPDF-22" due-to="Lukas Theussl">Allow copy and paste from pdf to text editor.</action>
     </release>
     <release version="2.3" date="2005-06-16">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org