[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 02:55:47 +0100
opposite of union
That worked well, but with one problem. I'm doing

			<xsl:apply-templates select="$x1[not(count(.|$x2)=count($x2))]"/>
			<xsl:apply-templates select="$2" mode="clicked"/>

but this alter the node sequence of the output tree relative to the input
tree

Say i have

<node type="1"/>
<node type="1"/>
<node type="2"/>
<node type="1"/>

and my templates change 1 to A and 2 to B, i'll get

<node type="A"/>
<node type="A"/>
<node type="A"/>
<node type="B"/>

and not what i need

<node type="A"/>
<node type="A"/>
<node type="B"/>
<node type="A"/>

so i guess i need a little of this solution along some if's and for-each's...

On 9/22/05, Antsnio Mota <amsmota@xxxxxxxxx> wrote:
> Damn, i was close to it, but i've used the not() without the count()
> so i got a error, something like "expression does not evaluate to a
> node-set" or something.
>
> I solved my problem with a lot of if and for-each and it's horrible,
> i'll use your expression right away.
>
> Thanks for the quick and concise response.
>
> On 9/22/05, David Carlisle <davidc@xxxxxxxxx> wrote:
> >
> > in xpath2 you use the except operator, in xpath 1
> > $x1 except $x2 is
> >
> > $x1[not(count(.|$x2)=count($x2))]
> >
> > David
> >
> > ________________________________________________________________________
> > This e-mail has been scanned for all viruses by Star. 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
> > ________________________________________________________________________

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.