W3C home > Mailing lists > Public > www-style@w3.org > March 2001

Re: Determining if an XSLT template has run

From: Sampo Syreeni <decoy@iki.fi>
Date: Fri, 30 Mar 2001 16:05:53 +0300 (EEST)
To: Jeffrey Yasskin <jyasskin@appcomp.com>
cc: <www-style@w3.org>
Message-ID: <Pine.SOL.4.30.0103301603140.217-100000@kruuna.Helsinki.FI>
On Thu, 29 Mar 2001, Jeffrey Yasskin wrote:

>	<xsl:template match="/">
>		<h1>Header</h1>
>		<xsl:apply-templates />
>		<xsl:if test="$fired">
>			NO RESULTS!!
>		</xsl:if>
>	</xsl:template>
>	<xsl:template match="row[lots-of-conditions]">
>		<xsl:variable name="fired" select="true">
>		<p>Stuff</p>
>	</xsl:template>

Try <xsl:variable name="fired" select="//row[lotsa-conditions]/> (or
something faster with a more explicit path, or with keys) at the top level
instead. You just need to worry about variable scoping. No need for new
features in XSLT.

Sampo Syreeni <decoy@iki.fi>, aka decoy, student/math/Helsinki university
Received on Friday, 30 March 2001 08:06:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:08 GMT