Re: [xsl] Assigning Values to Global Parameter

Subject: Re: [xsl] Assigning Values to Global Parameter
From: Brook Ellingwood <brook@xxxxxxxxxxx>
Date: Tue, 23 Sep 2003 13:24:47 -0700
Easy. <xsl:with-param/>. You can only use it inside <xsl:apply-templates/>
or <xsl:call-template>, but that's not really much of a problem in terms of
design.

For consistency, I always declare my global parameters like this:
<xsl:parameter select="'optional_default_value'"></xsl:parameter>. A value
assigned later with <xsl:with-param/> takes precedence over the value of the
"select" attribute.

It sounds like you may be confusing global parameters with global variables,
which can only have the initial assigned value.

-- Brook

> From: "James Paul" <jpaul@xxxxxxxxxxx>
> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Date: Tue, 23 Sep 2003 14:31:33 -0500
> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
> Subject: [xsl] Assigning Values to Global Parameter
> 
> If I set up a global parameter and the value is blank, how do I assign a
> value later in my mapping?  And if you can't is there a better way to do
> the above scenario.
> 
> Thanks,
> James Paul
> 
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 


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


Current Thread