|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] How is satisfies different from where ?David dlee at calldei.comSat May 22 12:04:25 PDT 2010
I've embarised to admit I've never used the sum/satisfies expressions in
XQuery.
Im trying to grok this recently posted pastebin
http://pastebin.com/7GGQxpYH
quote----
let $result1 := ( some $i in (1 to 5), $j in (5 to 10)
satisfies $j - $i = 0 )
let $result2 := ( some $i in (1 to 5), $j in (6 to 10)
satisfies $j - $i = 0 )
return
<test>
<result1>{$result1}</result1>
<result2>{$result2}</result2>
</test>
----
How is this different from
--------
<test>
<result1>{ exists(
for $i in (1 to 5) , $j in (5 to 10)
where $j - $i = 0 return $i
)}</result1>
<result2>{
exists(
for $i in (1 to 5) , $j in (6 to 20)
where $j - $i = 0 return $i
)}</result2>
</test>
---------------
More generaly what does satisfies/sum do differently then for/where ?
Is it simply a shorter version of the same ? or is there a operaitonal
difference ?
Where would I want to use some/satisfies where for/where is either
inappropreate or clumbsy ?
Thanks for any insight
--
-------------------------
David A. Lee
http://x-query.com/mailman/listinfo/talk
http://www.calldei.com
http://www.xmlsh.org
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






