This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: forwarding only existing parameter
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] forwarding only existing parameter
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Mon, 17 Sep 2001 14:47:07 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> I'm trying to forward parameters from a template to another,
> only if they are
> defined, in the most simple way.
>
> <choose>
> <when test="$bar">
> <apply-templates select=".">
> <with-param name="bar" select="$bar"/>
> </apply-templates>
> </when>
> <otherwise>
> <apply-templates select="."/>
> </otherwise>
> </choose>
> This one is OK, but really ugly. Isn't there any other way ?
There is no other way of doing what you want to do. But there are plenty of
other ways of solving your problem, without hitting your head against this
particular brick wall.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list