[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Wath is the opposite of the union operator?

Subject: Re: Wath is the opposite of the union operator?
From: António Mota <amsmota@xxxxxxxxx>
Date: Thu, 22 Sep 2005 13:02:11 +0100
opposite of union
Thanks, that's go directly to my personal archive...

On 9/22/05, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> > Subject:  Wath is the opposite of the union operator?
> >
> > Or puting it in another way, how do i select a group of nodes selected
> > by some xpath expression EXCEPT the ones that are selected by another
> > xpath expression?
>
> The operation you are referring to is usually called "set difference". In
> XPath 2.0, the operator is spelt "except".  There is also a set
intersection
> operator spelt "intersect". There's no equivalent to these in XSLT 1.0,
> though some processors support the EXSLT set:difference() and
> set:intersection() functions. You can expensively code
>
> A except B =>
>
>    A[count(.|B) != count(B)]
>
> A intersect B =>
>
>    A[count(.|B) = count(B)]
>
> Michael Kay
> http://www.saxonica.com/

Current Thread

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