|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] Incorrect Intersect and Except Output?Jonathan Robie jonathan.robie at redhat.comSun Mar 30 13:45:15 PST 2008
Wei, Alice J. wrote:
> let $a := <a><b>1</b><b>2</b><b>3</b></a>,
> $b := <c><b>What</b><b>2</b><b>3</b><b>4</b></c>,
> return
> <foo>{$a except $b}</foo>
>
> brings
>
> <foo>
> <a>
> <b>1</b>
> <b>2</b>
> <b>3</b>
> </a>
> </foo>
>
Except tests for node identity (you seem to expect it to test the node
values). If none of the nodes in $a are also in $b, then $a except $b is
the same as $a.
> If I use $a intersect $b, it brings me an empty node <foo/>
> Isn't intersect supposed to bring back what is contained in $b and $a?
>
Yes, but there are no nodes in $b that are also in $a, and vice versa.
Jonathan
|
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
|






