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

Re: Understanding Identity Transformations

Subject: Re: Understanding Identity Transformations
From: "Joris Gillis" <roac@xxxxxxxxxx>
Date: Sat, 12 Feb 2005 22:21:18 +0100
Re:  Understanding Identity Transformations
Tempore 21:55:30, die 02/12/2005 AD, hinc in xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Karl Stubsjoen <kstubs@xxxxxxxxx>:

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

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.