Subject: RE: problem in using * as a default parameter in xsl:param
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Mon, 29 Apr 2002 17:08:46 +0100
|
>
> this is what i did:
>
> <xsl:param name="param1" select="*"/>
> ....
> <xsl:for-each select="elementName[childName=$param1]">
> <xsl:copy-of select="elementName"/>
> </xsl:for-each>
> ...
>
You're straying into dynamic XPath expressions here. If you don't want to
use the xx:evaluate() extension, you can do:
<xsl:param name="childElement" select="'*'"/>
<xsl:for-each
select="element[$childElement!='*][childName=$childElement] |
element[$childElement='*']">
Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|