xslt for-each = $variable
Posted on 2011-09-23
I would like to create a dynamic for each loop that only picks up the records that match a certain variable passed into the xsl.
So say I have a list of cars. I would like to do a for-each that picks up all cars that are red.
But set as a variable.
<xsl:for-each select="car[info/colour = $colour]">
Doesn't seem to be working. I can get it working for numbers though, say do it for price and the variable is 500.