[xsl] xpath expression restriction

Subject: [xsl] xpath expression restriction
From: ac <ac@xxxxxxxxxxxxx>
Date: Fri, 04 Mar 2011 00:52:39 -0500
Hi,

There must be a reason why I can write

<xsl:variable name="x" select="if ($cond) then 1 else 0"/>
<xsl:copy-of select="abc[position() gt $x]"/>

but not

<xsl:copy-of select="abc[position() gt if ($cond) then 1 else 0]"/>

What is the reason? Is there any way to avoid having to declare the variable?

Thank you,

Regards,
Andre

Current Thread