[Home] [By Thread] [By Date] [Recent Entries]
At 2011-09-16 18:17 +0100, Chris Booth wrote:
That I think you cannot have a generic solution matching nodes regardless of their name. Some of your XML constructs are block-level and some are inline-level. So you need something explicitly recognizing your block-level constructs along the lines of: <fo:flow ...>
<xsl:apply-templates/>
</fo:flow> <xsl:template match=" thisblock | thatblock | otherblock ">
<fo:block>
<xsl:apply-templates/>
</fo:block>
</xsl:template>You don't need a template rule for inline constructs, but you may want to introduce one if you want to decorate your inline content: <xsl:template match=" thisinline ">
<fo:inline ....>
<xsl:apply-templates/>
</fo:inline>
</xsl:template> <xsl:template match=" thatinline ">
<fo:inline ....>
<xsl:apply-templates/>
</fo:inline>
</xsl:template>I'm not sure of the utility of your one-cell, one-row table direction you were headed. And your nested <xsl:for-each> won't achieve what you are looking for because that pull approach of two constructs only goes two levels deep in your structure. The above push approach will address all the levels of your input XML. I hope this helps. . . . . . . . . . Ken
|

Cart



