We'll contain each slide in a [fo:]block:
<xsl:template match="s:slides/s:slide"> <fo:block> <xsl:if test="following-sibling::s:slide"> <xsl:attribute name="break-after">page</xsl:attribute> </xsl:if> <xsl:apply-templates/> </fo:block> </xsl:template>
[fo:]block can contain other [fo:]block much like XHTML's div can contain p elements.
The break-after attribute tells the page to break after the slide.
We only want a page break between slides.