This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

XSL nodes evaluation on the fly



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 &lt;= $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 &lt; $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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]