This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: problem in using * as a default parameter in xsl:param
- From: Oleg Tkachenko <olegt at multiconn dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 29 Apr 2002 19:02:10 +0200
- Subject: Re: [xsl] problem in using * as a default parameter in xsl:param
- Organization: Multiconn International
- References: <F233wxXSXI3acH0xxDE00004082@hotmail.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
ªL ¤lªä wrote:
>
> Hi, can somebody tell how could i set the default value of a parameter
> to all possible value (i.e. *)
>
> this is what i did:
>
> <xsl:param name="param1" select="*"/>
variables are not macros, they hold *evaluated* values.
> ....
> <xsl:for-each select="elementName[childName=$param1]">
> <xsl:copy-of select="elementName"/>
> </xsl:for-each>
<xsl:param name="param1" select="'*'"/>
<xsl:for-each select="elementName/*[name()=$param1]">
<xsl:copy-of select="elementName"/>
</xsl:for-each>
Or even local-name() for safety.
--
Oleg Tkachenko
Multiconn International, Israel
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list