This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: problem in using * as a default parameter in xsl:param


>
> 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@ntlworld.com
work: Michael.Kay@softwareag.com


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]