RE: [xsl] forwarding only existing parameter

Subject: RE: [xsl] forwarding only existing parameter
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Mon, 17 Sep 2001 14:47:07 +0100
> 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


Current Thread