Subject: Re: Duplicates
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Tue, 3 Jun 2003 23:10:30 +0200
|
<Jarno.Elovirta@xxxxxxxxx> wrote in message
news:E392EEA75EC5F54AB75229B693B1B6A70529035D@xxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> > Can anybody help me. I want to filter duplicates without use
> > of keys and
> > preceding-sibling
>
> ($x | $x)
>
> If that doesn't remove duplicates the way you need, could you elaborate on
your problemn and why keys and preceding-sibling
> solutions are out of the question. In any case, it is more than likely
that not using keys or even preceding-sibling will just make
> the solution slow and really hard to debug.
Both in set theory and in XSLT
aSet | aSet = aSet
and (if I remember well) this is an axiom -- this is part of the definition
of a set.
Probably (any XSLT 2 experts here? I think a sequence can contain the same
node multiple times.)
aSeq | aSeq
will construct from two *sequences* a set, and by virtue of being a set it
will not contain any duplicates.
The above will also work if you have a "|" operator with "value semantics"
as opposed to the XPath "|" operator, which has "node identity semantics".
But then you must find another symbolic representation (name) for this
operator.
=====
Cheers,
Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
Jarno . Elovirta - Tue, 3 Jun 2003 03:36:28 -0400 (EDT)
- Dimitre Novatchev - Tue, 3 Jun 2003 16:57:36 -0400 (EDT) <=
|
|