This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: using parameters in a select
- To: xsl-list at lists dot mulberrytech dot com
- Subject: RE: [xsl] using parameters in a select
- From: James Eberhardt <JEberhardt at extend dot com>
- Date: Tue, 24 Apr 2001 15:19:58 -0400
- Reply-To: xsl-list at lists dot mulberrytech dot com
>>>> Can I use parameters in the apply-templates select statement?
> No. Check out the FAQ at http://www.dpawson.co.uk/xsl/nono.html#d44e8531
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.
James
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list