[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Problem in search of solution
Carlos, > 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:if> <xsl:value-of select="." /> </fo:block> </xsl:for-each> 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" space-after.optimum="0.25in"> <xsl:aply-templates /> </fo:block> </xsl:template> <xsl:template match="section_head/line"> <fo:block><xsl:aply-templates /></fo:block> </xsl:template> This should work the same. IMO, this is a clearer solution. Regards, Nikolai Grigoriev RenderX XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|