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: using parameters in a select


>>>>   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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]