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]

Re: select="String" as opposed to select="node" when passing parameters with <xsl:call-template>


"Palaniappan, Krishnasamy" wrote:
> 
> Hi,
> I have a template with one parameter. When I call the template;
> <xsl:call-template name="tname">
>  <xsl:with-param name="var1" select="STRING"/>
> </xsl:call-template>
> 
> When i try to to do this, it returns an error because there is no <STRING> node. However, what I actually want is for the literal 'STRING' to be passed as an argument to the template.
> 
> Is this possible?

Yes, just do this:

<xsl:call-template name="tname">
 <xsl:with-param name="var1">STRING</xsl:with-param>
</xsl:call-template>
 
-- 
Mike.Moran@ee.ed.ac.uk 
                   Web: http://houseofmoran.com/
               AvantGo: http://houseofmoran.com/Lite/

 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]