Re: Problem in search of solution

Subject: Re: Problem in search of solution
From: "Nikolai Grigoriev" <grig@xxxxxxx>
Date: Sat, 17 Jun 2000 00:33:08 +0400

> I'm trying to produce something such that only the last line will have the
> space-after.optimum attribute. Any ideas how can I do this?

You can either add an attribute conditionally:

 <xsl:for-each select="line">
   <fo:block font-weight="bold" font-size="12pt">

     <xsl:if test="not(following-sibling::line)">
       <xsl:attribute name="space-after.optimum">0.25in</xsl:attribute>

     <xsl:value-of select="." />

or change your XSL FO structure - wrap the whole thing into an extra block that
will bear the required space-after margin, and generate blocks with no margins
for every single line inside it.

<xsl:template match="section_head">
  <fo:block font-weight="bold" font-size="12pt"
    <xsl:aply-templates />

<xsl:template match="section_head/line">
  <fo:block><xsl:aply-templates /></fo:block>

This should work the same. IMO, this is a clearer solution.

Nikolai Grigoriev

 XSL-List info and archive:

Current Thread