[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?

Michael Kay mike at saxonica.com
Mon Mar 31 18:08:16 PST 2008


  Incorrect Intersect and Except Output?
>    Yes, I admit that I have not grasped this.
>    According to what you said, are you implying that it is 
> not even possible to even do an "outer-join" to produce the 
> output from
> 
>   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/b union $b/b) except ($a/b except $b/b))}</foo>
> 
> to something like:
> 
> <foo>
> <b>What</b>
> <b>1</b>
> <b>4</b>
> </foo>?
> 

Of course it's possible. Just rewrite "X except Y" as "X[not(.=Y)]". You
need to test equality, not identity. The only difference is that this
doesn't eliminate duplicates - but you know how to do that from your
previous posts to this list.

Michael Kay
http://www.saxonica.com/



Purchase Stylus Studio Online Today!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.