[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Duplicates

Subject: Re: Duplicates
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Tue, 3 Jun 2003 23:10:30 +0200
xpath filter duplicates
<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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.