xsl-list
[Top] [All Lists]

RE: for-each using a param

2002-10-28 14:28:41
[ 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



<Prev in Thread] Current Thread [Next in Thread>