I'm passing a result tree fragment that holds multiple strings
(fieldnames, in this case) and in the called template I wan't to test if
a certain string contains any of those names.
I have this:
<xsl:apply-templates select="field">
<xsl:with-param name="element-names">
<names>
<name>foo</name>
<name>bar</name>
</names>
</xsl:with-param>
</xsl:apply-templates>
....
<xsl:template match="field">
<xsl:param name="element-names" />
<xsl:variable name="search-element-names">
<result>
<xsl:for-each select="$elemen t-names/names/name">
<xsl:if test="contains( 'foobar', text())">.</xsl:if>
</xsl:for-each>
</result>
</xsl:variable>
<xsl:variable name="search-condition" select="$search-element-names =
''" />
I get this:
Can not convert #RTREEFRAG to a NodeList!
What is the parser trying to say to me?
Any ideas how to fix it?