<Jarno(_dot_)Elovirta(_at_)nokia(_dot_)com> wrote in message
news:E392EEA75EC5F54AB75229B693B1B6A70529035D(_at_)esebe018(_dot_)ntc(_dot_)nokia(_dot_)com(_dot_)(_dot_)(_dot_)
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