[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

Need some theory help

Florent Georges lists at fgeorges.org
Mon Sep 8 15:08:53 PDT 2008


  Need some theory help
Michael Kay wrote:

  Hi Michael,

> Given general expressions E,F,G, I believe it is true that
> the following two expressions are equivalent:

> E/F union E/G <=> E/(F union G)

> (That is, union distributes through "/")

> But this is not true for "except".

> $a/descendant::*/child::b except $a/descendant::*/(child::c/child::b)

> is not the same as

> a/descendant::*/(child::b except child::c/child::b)

> (easily seen because child::c/child::b will not select any
> nodes that are selected by child::b).

  I am not really a theoretician, but I feel this problem is
related to the descendant axis rather than the set operations
(union, except...)

  Intuitively, I would say that "E//F x E//G" (for some
operator x) is not the same as "E//(F x G)" because in the
later "F x G" is 'anchored' at particular nodes, where in the
former two sequences are built then the operator is applied.

  For the union, I guess this leads into the same result
(intuitively again), but it doesn't with the difference (the
except operator.)

  Maybe using only a subset of axises to try to prove your
assertions could help find the way?

  Regards,

--drkm





















      


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-2011 All Rights Reserved.