This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: topological sort
- To: xsl-list at mulberrytech dot com
- Subject: Re: topological sort
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Wed, 8 Nov 2000 17:45:06 GMT
- References: <3A086D4C.CB0E23D0@powerup.com.au> <3A097568.150B9037@powerup.com.au>
- Reply-To: xsl-list at mulberrytech dot com
> When I started to think of
> "count(...)=0" as a kind of a NOT, things became a bit clearer. See
>below.
It's clearer still if you write it as not() rather than using count()
field[count(type/ref)>0 and ... )
could more clearly be written
field[type/ref and ... )
and
field[count(type/ref)=0 or ...
could be written
field[not(type/ref) or ...
If you use a node set in a boolean contextthen it is true if it is non
empty, so it can be used directly rather than counting it and then
testing the value against 0.
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