I have an XML file with structure like this:
<parent>
<node>Text 1</node>
<node>Text 2</node>
<node>Text 3</node>
<node>Text 4</node>
<node>Text 5</node>
</parent>
I want to process this XML with XSL-FO to produce PDF output. I have following XSL-FO template:
<fo:block>
<xsl:for-each select="node[position() < last()]">
<xsl:value-of select="."/>
<xsl:if test="position() != last()">
<xsl:text>
</xsl:text>
</xsl:if>
</xsl:for-each>
</fo:block>
It seems that this doesn't work well. I get output inline, instead of each node in it's own line. How can I resolve this problem?
Thanks!