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

Reply via email to