paul wrote:

I chose to do

<xsl:template match="a/b">
<xsl:for-each select="c">
<fo:block break-before="page">
(content)
</fo:block>
</xsl:for-each>
</xsl:templat

Hi Paul

I'm glad it worked out. In the xslt language it is usually best to let the processor do the work for you. Often people choose to use xsl:choose, xsl:if and xsl:for-each when a pure template approach would suffice. You can rewrite the above as follows:

<xsl:template match="a">
   <xsl:apply-templates select="b/c" />
</xsl:template>

<xsl:template match="c">
   <fo:block break-before="page">
        <xsl:apply-templates select="yourcontent" />
    </fo:block>
</xsl:template>

<xsl:template match="yourcontent">
    ...blocks for your content etc...
</xsl:template>


Trying to think XSLT and to consider using declarative style (xslt is a declarative programming language, as opposed to imperative, which is the type for Java, C#, VB etc; within declarative languages, you tell what you want and the processor defines the best execution path and decision logic), will increase your joy with the language and your speed of programming.

Cheers,
-- Abel Braaksma
  http://www.nuntia.nl

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to