xsl-list
[Top] [All Lists]

Re: Understanding Identity Transformations

2005-02-12 14:33:44
The things that make you say "Hmmmmm"...
Thanks for speaking up... this sort of experience shared here is invaluable!

Karl



On Sat, 12 Feb 2005 22:21:18 +0100, Joris Gillis <roac(_at_)pandora(_dot_)be> 
wrote:
Tempore 21:55:30, die 02/12/2005 AD, hinc in
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com scripsit Karl Stubsjoen 
<kstubs(_at_)gmail(_dot_)com>:

Wow.. that is easy except that I do not understand your notice
explanation... the difference between your not( ... ) and your !=.

"@cat != 'BLUE'": will be true if the context node has a 'cat' attribute
*and* if it has a 'cat' attribute not equal to 'BLUE'. So it's the same as
"boolean(@cat) and not(@cat='BLUE')"

"not(@cat='BLUE')": will be true if the context node has no 'cat'
attribute *or* if it has a 'cat' attribute not equal to 'BLUE'. So it's
equal to "not(@cat) or not(@cat='BLUE')"

Wow... so much boolean logic that it doesn't seem logical anymore...

So what is the difference then?  I don't get it.

The difference is that '!=' will work and 'not(...=...)' will not.
Now don't ask me why:)
The reason can probably found at http://www.w3.org/TR/xpath.html#booleans
, but I know it rather from experience than from any documentation.


regards,
--
Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041)
Gaudiam omnibus traderat W3C, nec vana fides

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--