Hi All,
I am having a problem in XSLT. i am getting a
string as Input in the form of: String = Part1#@#Part2#@#Part3
<xsl:call-template name= "parts">
<xsl:with-param name="inputString" select="$String"/>
</xsl:call-template>
</xsl:template>
<xsl:template name="parts">
<xsl:param name="inputString"/>
<xsl:variable name="currentVal" select="substring-before($inputString, '#@#')"/>
<xsl:variable name="restOfString" select="substring-after($inputString, '#@#')"/>
<xsl:variable name = "URL">
<xsl:value-of select = "concat('/bmfsweb/testbrocade/image/PS Addendums/',$currentVal,'.pdf')" />
</xsl:variable>
<xsl:if
test = "$currentVal != '' " >
<xsl:call-template name="printablePDF">
<xsl:with-param name="insertURL" select="$URL"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="$restOfString != ''">
<xsl:call-template name= "parts">
<xsl:with-param name="inputString" select="$restOfString"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template name="printablePDF">
<xsl:param name="insertURL"/>
<fo:page-sequence content-width="90%" content-height="90%" background-image="{$insertURL}" background-repeat="paginate" master-reference="pdfPageSequence">
<fo:flow flow-name="xsl-region-body">
<fo:block />
</fo:flow>
</fo:page-sequence>
The problem is that once the "printablePDF" template is called, it never reaches restOfString code to call"Parts" template again, failing the recursion.
In printablePDF template, i am trying to get a file from a resource and append in existing docs. for first value it prints correctly but it never reaches the second and subsequent values from "String".
Please Help!
Thanks
Charu