Compare two node-sets and get a new one with unique values only result
To be specific create nodeset3 where value is in nodeset1 but not in nodeset2 (so basically nodeset3=nodeset1-nodeset2 in set theory).
This is node set 1 with some values
<xsl:variable name="node1">
<footnotes>
<fn>a</fn>
<fn>b</fn>
<fn>c</fn>
<fn>d</fn>
</footnotes>
</xsl:variable>
<xsl:variable name="nodeset1" select="msxml:node-set($node1)" />
here is nodeset2
a b
result should be
nodeset3
<footnotes>
<fn>c</fn>
<fn>d</fn>
</footnotes>
I have tried this without success
<xsl:variable name="node3">
<xsl:for-each select="$nodeset1/fn">
<xsl:if test="$nodeset2 != ./text()">
<fn2>
<xsl:value-of select="."/>
</fn2>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="nodeset3" select="msxml:node-set($node3)" />
sorry took some time but got it