Subject: [xsl] XSL nodes evaluation on the fly From: Ivanco Maros <ivancoma@xxxxxxxxxx> Date: Mon, 25 Feb 2002 15:23:10 +0100 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Using number in an expres, Jeni Tennison | Thread | Re: [xsl] XSL nodes evaluation on t, Jeni Tennison |
[xsl] Using number in an expression, Rick Quatro | Date | [xsl] import href vaule set using X, Aedemar Cooke |
Month |