This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
XSL nodes evaluation on the fly
- From: Ivanco Maros <ivancoma at gratex dot com>
- To: <XSL-List at lists dot mulberrytech dot com>
- Date: Mon, 25 Feb 2002 15:23:10 +0100
- Subject: [xsl] XSL nodes evaluation on the fly
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi,
Is XSL nodes evaluation on the fly possible?
I would like to create set of "standard" templates which have only different body (something like FUNCALL in LISP or function template in C++).
For instance:
<xsl:template name="for.loop">
<xsl:param name="i"/>
<xsl:param name="count"/>
<xsl:param name="body"/>
<xsl:if test="$i <= $count">
<!-- the body of the loop I am trying to evaluate on the fly; does not work.
<xsl:eval><xsl:value-of select="$body"/></xsl:eval>
-->
</xsl:if>
<xsl:if test="$i < $count">
<xsl:call-template name="for.loop">
<xsl:with-param name="i" select="$i + 1"/>
<xsl:with-param name="count" select="$count"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
and I would love to use it like:
<xsl:call-template name="for.loop">
<xsl:with-param name="i" select="1"/>
<xsl:with-param name="count" select="count(BODY/ROW)"/>
<xsl:with-param name="body">
<![CDATA[
<TR>
<TD height="$i"/>
</TR>
]]>
</xsl:with-param>
</xsl:call-template>
Thanks in advance,
Maros Ivanco.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list