I am trying to do something like this:
XSL
<xsl:variable name="setOfNodes" select="foo[@attr = 'bar']" />
<result>
<xsl:copy-of select="$setOfNodes/*" />
</result>
XML
<test>
<foo attr="bar" />
<foo attr="bar" />
<foo attr="different" />
<foo attr="bar" />
</test>
I want the result to look like this:
<result>
<foo attr="bar" />
<foo attr="bar" />
<foo attr="bar" />
</result>
But when I run the above xsl I get:
<result />
This seems like it should be pretty simple, I am probably just mixing something up. Does anyone have any ideas or suggestions for how to do this type of thing?