Double-spacing <para/>

Here should go questions about transforming XML with XSLT and FOP.
dnedrow
Posts: 60
Joined: Wed Jan 28, 2004 10:51 pm

Double-spacing <para/>

Post by dnedrow »

I'm using a customization to handle a number of default parameters and formatting isntructions.

One thing I need to do is double-space paragraphs (<para/> only). Using the following double-spaces <para/>:

Code: Select all


    <xsl:attribute-set name="normal.para.spacing">
<xsl:attribute name="line-height">2.4</xsl:attribute>
</xsl:attribute-set>
Unfortunately, it also double-spaces the children of <para/>. Is there a way to limit my double spacing to just <para/> without including children?

-David
dnedrow
Posts: 60
Joined: Wed Jan 28, 2004 10:51 pm

Solution

Post by dnedrow »

Aha. I found a post by Bob Stayton that gives a work around for this.

Code: Select all


    <xsl:template match="para[not(ancestor::footnote|ancestor::bibliography)]">
<fo:block line-height="2.4">
<xsl:apply-imports/>
</fo:block>
</xsl:template>
The only drawback is that it requires providing a specific "override" for the elements you don't want double-spaced (eg. footnote and bibliography above).


-David
Post Reply