[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] xslt 1.0 duplicates refresher

Subject: Re: [xsl] xslt 1.0 duplicates refresher
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 12 Nov 2015 16:31:00 -0000

Forming a union of two sets requires being able to compare the members of the
set for equality. For the union operation in XPath, the relevant equality
comparison operator is "is", that is comparing nodes by identity. Two
different nodes with the same content are different nodes.

Michael Kay

> On 12 Nov 2015, at 12:03, Ihe Onwuka ihe.onwuka@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> If a nodeset contains multiple elements with the same value then unioning
the nodeset with itself will not eradicate those duplicates.
> If I have a nodeset containing
> <a>1</a>
> <a>2</a>
> which I use as a lookup, then a nodeset created just by looking up the value
1, 5 times will not contain <a>1</a> once and not 5 times.
> The latter case is because a nodeset cannot contain multiple copies of the
same node.
> Please correct my thinking here.
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <-list/293509> (by email <>)

Current Thread