xsl-list
[Top] [All Lists]

Re: for-each using a param

2002-10-28 13:43:25
Raphael,

At 03:47 PM 10/28/2002, you wrote:
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>

If the parameter is bound to a node set, you can do this.

If your parameter is, however, a string that happens to be XPath, such as "//*", which you wish to be *evaluated* to return a node set to be traversed ... no luck. But some processors have an extension function for this, such as saxon:evaluate (I think he calls it).

Cheers,
Wendell


======================================================================
Wendell Piez                            
mailto:wapiez(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


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



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