[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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
xsl aply template
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.