In an existing XSL stylesheet, I passed a string to a named template. Due to changing requirements, I now need to display four lines, the line that I showed, and her three siblings. Instead of passing four separate lines to a named template, I'm trying to pass their parent element (PETrailingFund in the code below),
<xsl:call-template name="row">
<xsl:with-param name="label">Price/Earnings Trailing</xsl:with-param>
<xsl:with-param name="formatMarker">x</xsl:with-param>
<xsl:with-param name="fund" select="PETrailingFund" />
<xsl:with-param name="benchmark">
<xsl:value-of select="benchmark/PETrailingBenchmark"/>
</xsl:with-param>
<xsl:with-param name="benchmark2">
<xsl:value-of select="benchmark2/PETrailingBenchmark"/>
</xsl:with-param>
</xsl:call-template>
but the transformation explodes when I try to work with the "fund" parameter in the named template:
<xsl:template name="row">
<xsl:param name="label" />
<xsl:param name="fund" />
<xsl:param name="benchmark">NOT PROVIDED</xsl:param>
<xsl:param name="benchmark2">NOT PROVIDED</xsl:param>
<xsl:param name="formatMarker"> </xsl:param>
<xsl:param name="useDecimalFormatter">yes</xsl:param>
<tr>
<td class="first popup">
<xsl:value-of select="$label" disable-output-escaping="yes"/>
</td>
<td>
<xsl:if test="$benchmark = 'NOT PROVIDED'">
<xsl:attribute name="class">last</xsl:attribute>
</xsl:if>
<xsl:value-of select="$fund/child::*" />
<xsl:value-of select="$formatMarker"/>
</td>
</tr>
</xsl:template>
From what I read, I really do not pass node, but a fragment of the result tree, and I need to return it back to node (or node-set). Is this accurate or am I doing something else wrong? How would I convert it (I work in a rather stock environment of PHP5, which I cannot change).
N.B., .