This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
apply-templates - wrap
- From: Eric Smith <Eric dot Smith at fruitcom dot com>
- To: xsl List <xsl-list at lists dot mulberrytech dot com>
- Date: Tue, 20 Nov 2001 09:38:57 +0100
- Subject: [xsl] apply-templates - wrap
- Reply-to: xsl-list at lists dot mulberrytech dot com
Silly description, but I want a template to wrap a fo:inline (or
should than be _an_ fo:inline) that does not have a parent:: which
is a block. This is to avoid that fo: error of "inline cannot be
directly under flow".
So in all templates like the example for italics below and friends
bold, underline etc, I want to call a template that checks
for test="not(parent::para)", anid if found, will add a
<block> above the <xsl:apply-templates/> and a </block> below/
i.e. wrap the inline with a block.
<xsl:template match="i">
<fo:inline font-style="italic">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
--
Eric Smith - currently using xalan and fop on linux
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list