Not sure what to do here. Sorry. Looks like some side-effects from our
line-breaking algorithm.

On 16.08.2006 17:10:05 Buckman Ekow wrote:
> > Hello,
> > 
> > I'm working with FOP 0.92 and trying to use fo:leader.
> > I've got problem when i'm using two fo:leader in one fo:block.
> > 
> > FOP generates :
> > Text one fisrt line ....................................................
> > ....................................................................text
> >                                                                         on 
> > second line
> > 
> > or
> > 
> > Text one fisrt line ....................................................
> >         .....................Several text on second line with fdkdlkllkf
> >                                             fdjkldflklkllklllsddss fjdks
> > 
> > I'd like to generate:
> > 
> > Text one fisrt line ....................................................
> > .....................................................text on second line
> > 
> > or
> > 
> > Text one fisrt line ....................................................
> > ......Several text on second line with fdkdlkllkf fdjkldflklkllklllsddss
> >                                                                        fjdks
> > 
> > 
> > Following the XSL sample:
> > <xsl:template name="GEN-tmpl-generate-leader">
> >     <!-- Parameters definition -->
> >     <xsl:param name="param-left" select="''"/>
> >     <xsl:param name="param-right" select="''"/>
> >     <xsl:param name="param-wide" select="$PAGEL-var-at4-flow-width"/>
> > 
> >     <!--Variables definition-->
> >     <!-- Maximum length of the addition of the 2 variables-->
> >     <xsl:variable name="var-len-max">
> >             <xsl:if test="$QRL-var-solution-current-style-name='default'">
> >                     <xsl:value-of select="($param-wide - 10) "/>
> >             </xsl:if>
> >             <xsl:if test="$QRL-var-solution-current-style-name='smoke'">
> >                     <xsl:value-of select="($param-wide - 10)"/>
> >             </xsl:if>
> >     </xsl:variable>
> >     <xsl:variable name="var-average-character-size">
> >             <xsl:if test="$QRL-var-solution-current-style-name='default'">
> >                     <xsl:value-of select="3"/>
> >             </xsl:if>
> >             <xsl:if test="$QRL-var-solution-current-style-name='smoke'">
> >                     <xsl:value-of select="4"/>
> >             </xsl:if>
> >     </xsl:variable>
> >     <!-- Calculate length of two params -->
> >     <xsl:variable name="var-left">
> >             <xsl:value-of select="$param-left"/>
> >     </xsl:variable>
> >     <xsl:variable name="var-right">
> >             <xsl:value-of select="$param-right"/>
> >     </xsl:variable>
> >     <!-- We consider that in helvetica, the characters " " , "I", "1", "/" =
> > have a length equals to zero.
> >             , we replace them by an empty space.-->
> >     <xsl:variable name="var-len-left" =
> > select=3D"string-length(translate($var-left,' I/1.',''))"/>
> >     <xsl:variable name="var-len-right" =
> > select=3D"string-length($var-right)"/>
> >     <!--xsl:variable name="var-len-right" =
> > select=3D"string-length(translate($var-right,' I/1.',''))"/-->
> >     <xsl:variable name="var-len">
> >             <xsl:value-of select="$var-len-left + $var-len-right"/>
> >     </xsl:variable>
> > 
> >     <!-- following length, use one block or two blocks-->
> >     <xsl:choose>
> >             <xsl:when test="$var-len*$var-average-character-size &lt; =
> > $var-len-max">
> >                     <fo:block text-align="justify">
> >                             <xsl:copy-of select="$param-left"/>
> >                             <fo:leader leader-pattern="dots"  
> > leader-length.maximum="100%" =
> > leader-length.optimum="{$param-wide}mm"/>
> >                             <xsl:copy-of select="$param-right"/>
> >                     </fo:block>
> >             </xsl:when>
> >             <xsl:when test="$var-len-right*$var-average-character-size &gt; 
> > =
> > $var-len-max">
> >                     <fo:block text-align="justify">
> >                             <xsl:copy-of select="$param-left"/>
> >                             <fo:leader leader-pattern="dots"  
> > leader-length.maximum="100%" =
> > leader-length.optimum="{$param-wide}mm"/>
> >                     </fo:block>
> >                     <fo:block text-align="justify" text-align-last="right">
> >                             <fo:leader leader-pattern="dots"  
> > leader-length.maximum="0%" =
> > leader-length.minimum="{$param-wide - ($var-len-right + 10)}mm" =
> > leader-length.optimum="{$param-wide - ($var-len-right + 10)}mm"/>
> >                             <xsl:copy-of select="$param-right"/>
> >                     </fo:block>     =09
> >             </xsl:when>     =09
> >             <xsl:otherwise>
> >                     <fo:block text-align="justify">
> >                             <xsl:copy-of select="$param-left"/>
> >                             <fo:leader leader-pattern="dots"  
> > leader-length.maximum="100%" => 
> > leader-length.optimum="{$param-wide}mm"/>
> >                     </fo:block>
> >                     <fo:block text-align="justify">
> >                             <fo:leader leader-pattern="dots"  
> > leader-length.maximum="100%" =
> > leader-length.optimum="{$param-wide - $var-len-right -10}mm"/>
> >                             <xsl:copy-of select="$param-right"/>
> >                     </fo:block>
> >             </xsl:otherwise>
> >     </xsl:choose>
> > </xsl:template>
> > 
> > 
> > Somebody have any idea ?
> > Thanks and reguards.
> > 
> > Cordialement.
> >  
> > Ekow Buckman
> > Sopra group 
> > Division Midi-Pyrénées
> > Agence Aéronautique & Spatial
> > Tel.: +33 (0)5 34 56 73 61
> > email : [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> > 
> > 



Jeremias Maerki

Attachment: leader.fo
Description: Binary data

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to