Hi Tony, Perhaps that the functx:distinct-deep function is of use to you:
http://www.xqueryfunctions.com/xq/functx_distinct-deep.html A snapshot version of the complete functx library is shipped with MarkLogic Server 4.1+. Just put the following above your query and you can use the functions straight-away: import module namespace functx = "http://www.functx.com" at "/MarkLogic/functx/functx-1.0-nodoc-2007-01.xqy"; Kind regards, Geert > Drs. G.P.H. Josten Consultant http://www.daidalos.nl/ Daidalos BV Source of Innovation Hoekeindsehof 1-4 2665 JZ Bleiswijk Tel.: +31 (0) 10 850 1200 Fax: +31 (0) 10 850 1199 http://www.daidalos.nl/ KvK 27164984 De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend. > From: [email protected] > [mailto:[email protected]] On Behalf Of > Tony Mariella > Sent: vrijdag 9 oktober 2009 13:15 > To: [email protected] > Subject: [MarkLogic Dev General] De-dupe Results > > If I have results that look like this: > <item> > <if> > <name>Test</name> > <date>01-Oct-2009</date> > <id>ID 1</id> > <address>2345</address> > </if> > <if> > <name>Test</name> > <date>01-Oct-2009</date> > <id>ID 2</id> > <address>3456</address> > </if> > <if> > <name>Test</name> > <date>01-Oct-2009</date> > <id>ID 1</id> > <address>2345</address> > </if> > <if> > <name>Test</name> > <date>01-Oct-2009</date> > <id>ID 2</id> > <address>3456</address> > </if> > </item> > > And I want to de-dupe the results so that I get this: > <item> > <if> > <name>Test</name> > <date>01-Oct-2009</date> > <id>ID 1</id> > <address>2345</address> > </if> > <if> > <name>Test</name> > <date>01-Oct-2009</date> > <id>ID 2</id> > <address>3456</address> > </if> > </item> > > How would I do it ? > > Tony Mariella > Raytheon Company > > > _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
