Or when you need to compare the nodes deeply: let $s := <a><b>1</b><b>2</b><b>3</b></a> let $t := <a><b>2</b><b>3</b></a>
for $b in $s/b where not($t/b[deep-equal(., $b)]) return $b 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 > Danny Sokolsky > Sent: donderdag 21 januari 2010 18:36 > To: General Mark Logic Developer Discussion > Subject: RE: [MarkLogic Dev General] intersect? nodes > > How about something like: > > > > xquery version "1.0-ml"; > > let $s := <a><b>1</b><b>2</b><b>3</b></a> > > let $t := <a><b>2</b><b>3</b></a> > > for $b at $i in $s/b > > return > > (<res> > > <i>{$i}</i> > > <matches>{$b eq $t/b}</matches> > > </res>) > > > > Which returns: > > > > <res><i>1</i><matches>false</matches></res> > > <res><i>2</i><matches>true</matches></res> > > <res><i>3</i><matches>true</matches></res> > > > > -Danny > > > > From: [email protected] > [mailto:[email protected]] On Behalf Of Paul M > Sent: Thursday, January 21, 2010 9:24 AM > To: [email protected] > Subject: [MarkLogic Dev General] intersect? nodes > > > > let $s := <a><b>1</b><b>2</b><b>3</b></a> let $t := > <a><b>2</b><b>3</b></a> > > I want <b>1</b> node returned...??? > I want to know that $t is missing <b>1</b>. $s is always > larger set. $s should always include all of $t. > > for and let with where is only thing I could see. > > > > _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
