RE: [xsl] for-each using a param

Subject: RE: [xsl] for-each using a param
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Mon, 28 Oct 2002 16:28:41 -0500
[ Raphael Bosshard ]
> 
> (this question probably got asked before, but since I didn't 
> find an answer in the faq, so I'll ask anyway)
> 
> Is there a way to use parameters containg xpath-expressions 
> for a for-each loop? I d'like to to something like that:
> 
> <xsl:for-each select="$xPathExpression">
> do anything
> </xsl:for-each> 
> 

It will work fine as long as the value of the parameter is actually a
nodeset.  You cannot do dynamic evaluation of a string that looks like
an xpath expresseion.  That is, you cannot do it with standard xslt 1.0,
although some processors may let you eval() that expression.

Tom P

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread