RE: [xsl] using parameters in a select

Subject: RE: [xsl] using parameters in a select
From: James Eberhardt <JEberhardt@xxxxxxxxxx>
Date: Tue, 24 Apr 2001 15:19:58 -0400
>>>>   Can I use parameters in the apply-templates select statement? 
> No.  Check out the FAQ at 

Actually, it's the reverse of what he is asking.  The variable that he would
need goes in the <xsl:apply-templates> part, not the <xsl:template> part,
like the FAQ is indicating.

The problem with his code is the XPath statement that he is using resolves
to nothing.
	<xsl:apply-templates select="ServicePlan[$servicePlanNames]" />

What is supposed to equal $servicePlanNames ??

If you had a bit of XML like:
	<ServicePlan type="default value" />

Then your xsl would have to look like this:
	<xsl:apply-templates select="ServicePlan[type=$servicePlanNames]" />

Hope this helps.


 XSL-List info and archive:

Current Thread