|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








