xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florent Georges <darkman_s...@yahoo.fr>
Subject Re: Body overlapping over the footnotes
Date Thu, 09 Feb 2006 00:04:10 GMT
Jeremias Maerki wrote:

> I need to verify first but I think I know what's wrong. For those who
> know the technical details: I think the list layout managers ignore
> padding-top and padding-bottom when they produce the combined element
> list. I had to fix a similar problem for tables and it may be that I
> didn't also check lists back when I did that. I'll look into it
> tomorrow.

  I don't exactly know the technical details, but I can imagine the
source of the problem.  And the solution below tends to confirm your
intuition, IMHO.

> The immediate work-around would be to replace padding-top and
> padding-bottom with space-before and space-after
> (conditionality="retain")
> on the child elements of the list items. But that's an ugly hack. I
> better fix this.

  Sure.  But it works.  Hopefully: I have a deadline soon (all
deadlines are soon ;-p).  Because I'm using XSLT 2.0, I still have a
"clear work aroud":

     <xsl:template match="/">
       <xsl:variable name="first.pass">
         <xsl:apply-templates/>
       </xsl:variable>
       <xsl:variable name="second.pass">
         <xsl:apply-templates select="$first.pass"
                              mode="post.process"/>
       </xsl:variable>
       <fo:root>
         <xsl:apply-templates select="$second.pass"
                              mode="fop.0.91beta.bug"/>
       </fo:root>
     </xsl:template>
     <xsl:template match="node()|@*" mode="post.process">
       ...
     </xsl:template>
     <xsl:template match="@*|node()" mode="fop.0.91beta.bug">
       <xsl:copy>
         <xsl:apply-templates select="@*|node()"
                              mode="fop.0.91beta.bug"/>
       </xsl:copy>
     </xsl:template>
     <xsl:template match="fo:list-item" mode="fop.0.91beta.bug">
       <xsl:copy>
         <xsl:apply-templates
             select="node()|@*[not(name() eq 'padding-bottom'          
                                         
                                   or name() eq 'padding-top')]"
             mode="fop.0.91beta.bug"/>
       </xsl:copy>
     </xsl:template>
     <xsl:template match="fo:list-item-label/*|fo:list-item-body/*"
                   mode="fop.0.91beta.bug">
       <xsl:variable name="top"
                     select="../../@padding-top"/>
       <xsl:variable name="bottom"
                     select="../../@padding-bottom"/>
       <xsl:copy>
         <xsl:if test="$top">
           <xsl:attribute name="space-before" select="$top"/>
         </xsl:if>
         <xsl:if test="$bottom">
           <xsl:attribute name="space-after" select="$bottom"/>
         </xsl:if>
         <xsl:apply-templates select="@*|node()"
                              mode="fop.0.91beta.bug"/>
       </xsl:copy>
     </xsl:template>

  Thanks for this rapid solution.

  Regards,

--drkm




















	

	
		
___________________________________________________________________________ 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels
pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message