problem with empty block tag in xsl-fo and fop
hello,
i have the following template that goes through a text element and
preserves all breaking spaces.
<xsl:template name="nl2br">
<xsl:param name="StringToTransform"/>
<xsl:variable name="br">
<xsl:text>#xA;</xsl:text>
</xsl:variable>
<xsl:choose>
<xsl:when test="contains($StringToTransform,$br)">
<xsl:value-of select="substring-before$StringToTransform,$br)"/>
<br/>
<xsl:call-template name="nl2br">
<xsl:with-param name="StringToTransform">
<xsl:value-of select="substring-after($StringToTransform,$br)"/>
</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$StringToTransform"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
To alter this to be able to be used in xsl-fo i change the <br/> tag to a <fo:block/> tag. However when i use fop to render the page to create a pdf document the empty block tags are not being preserved.
Does anybody know if there is a problem with FOP and empty block tags?
I have searched other fop groups but found nothing.Or is there a fundamental flaw in my template??
Thanks in advance Thea.
|