Subject: Re: [xsl] Problem with "except" operator From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 11 Feb 2009 10:19:24 -0500 |
>> So the above are equivalent. > > I think not, Andrew ... Martin is correct.
yep... I've kind of blogged about this a while back:
http://ajwelch.blogspot.com/2007/08/when-b-and-b-both-return-true.html
...but it still always catches me out.
The rule I mention there is "never use != where both sides are sequences of more than one item" which is why I thought ". != x" would be ok... but it looks like that should be:
"never use != where one side is a sequence of more than one item"
Never use "=" because of this problem, always use "eq" and "ne" when dealing with singletons and always use "some ... in" and "every ... in" when dealing with sets.
-- Upcoming hands-on XSLT, UBL & code list hands-on training classes: Brussels, BE 2009-03; Prague, CZ 2009-03, http://www.xmlprague.cz Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Problem with "except" ope, Andrew Welch | Thread | Re: [xsl] Problem with "except" ope, David Carlisle |
Re: [xsl] most efficient way to get, Owen Rees | Date | RE: [xsl] most efficient way to get, Michael Kay |
Month |