forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject svn commit: rev 35672 - forrest/trunk/src/core/context/skins/common/xslt/fo
Date Wed, 04 Aug 2004 04:59:59 GMT
Author: crossley
Date: Tue Aug  3 21:59:59 2004
New Revision: 35672

Modified:
   forrest/trunk/src/core/context/skins/common/xslt/fo/document2fo.xsl
Log:
List items in PDF have incorrect vertical offset when first child element is <p>
Issue: FOR-243
Submitted by: Rick Tessner


Modified: forrest/trunk/src/core/context/skins/common/xslt/fo/document2fo.xsl
==============================================================================
--- forrest/trunk/src/core/context/skins/common/xslt/fo/document2fo.xsl	(original)
+++ forrest/trunk/src/core/context/skins/common/xslt/fo/document2fo.xsl	Tue Aug  3 21:59:59
2004
@@ -460,14 +460,24 @@
   </xsl:template>
 
   <xsl:template match="p">
-    <fo:block
-      space-before="4pt"
-      space-after="4pt"
-      font-family="serif">
-      <xsl:apply-templates/>
-    </fo:block>
+    <xsl:choose>
+      <xsl:when test="ancestor::li and not(preceding-sibling::*)">
+        <fo:block
+          space-after="4pt"
+          font-family="serif">
+          <xsl:apply-templates/>
+        </fo:block>
+      </xsl:when>
+      <xsl:otherwise>
+        <fo:block
+          space-before="4pt"
+          space-after="4pt"
+          font-family="serif">
+          <xsl:apply-templates/>
+        </fo:block>
+      </xsl:otherwise>
+    </xsl:choose>
   </xsl:template>
-
 
   <xsl:template match="source">
     <fo:block

Mime
View raw message