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

Re: constructing the Node Sets

Subject: Re: constructing the Node Sets
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 29 Jan 2003 15:50:14 GMT
Re:  constructing the Node Sets
> I expected that the intersection of a and b will produce a count of 2,

ah. In that case you asked the wrong question.

Your node sets are disjoint, no node has both  @name='Asm' and @name='Cmp'
so the intersection of the sets $a and $b is empty.

You don't want the intesection of the sets, you want all elements of $a
that have a string value equal to some member of $b, that's easier than
the question you asked,

$a[.=$b]

except that if you have the possibility of duplicate obid values you may
need to remove duplicates as well.

Note that
$a[ count( . | $b ) = count( $b ) ]
is the same as 
$b[ count( . | $a ) = count( $a ) ]
it really is the nodes in both $a and $b,

but

$a[.=$b]

is not the same 
as


$b[.=$a]

one is the set of nodes in $a the other is the set in $b.


David


________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.