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

Re: Performance versus legibility

Subject: Re: Performance versus legibility
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 24 Nov 2000 14:45:00 GMT
Re: Performance versus legibility
>   not(string(.))	string-length(.)=0
>   not(x)		count(x)=0
>   not(x=y)	        x!=y
> 
> 
>   I always use the expressions in the second column for maintainability,

I usually find the first forms are clearer not(@id) seems to say "no id
attribute" clearer than count(@id)=0. But beware while the first two
pairs are equivalent, not(x=y) is not the same thing as x!=y and I find
it's really dangerous to use != as usually I want not (  = ).
If either x or y is a node set containing nodes with different values
then  x!=y is always true.

David


_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp


 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.