set:difference() using two different node sets
| Newsgroups | gmane.text.xml.xslt.extensions |
|---|---|
| Message-ID | <24C001EDFDA8504185EC3FFE7481621654AFF9@lnxseamail01.internal.courtlink.com> |
We're trying to use set:difference() to compare two separate node-sets that
we create in variables.
Most of the examples I see for this use partial node-sets from the same
parent node and compare those to get the difference (See the example found
at: http://www.exslt.org/set/functions/difference/index.html). My question
is do the two node sets need to have the same parent, or can they be from
two separate sources?
In effect we are doing something like:
<xsl:variable name="v1">
<xsl:for-each select="document('set1.xml')/*">
<node id="@someId"/>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="v2">
<xsl:for-each select="document('set2.xml')/*">
<node id="@id"/>
</xsl:for-each>
</xsl:variable>
<xsl:copy-of select="set:difference(
msxsl:node-set($v1), msxsl:node-set($v2))"/>
We are always getting the complete list found in $v1. We're not sure if it
is by design or a problem with the implementation of set:difference.
PS: We're using the EXSLT.NET 1.1.1 as the implementor of the EXSLT
functions.
Thanks.
--
Kipp E. Howard
Sr. Software Engineer, LexisNexis File & Serve
Phone: 425.372.1837 or 800.774.7317 ext 1837
Email: [email protected]