Re: [xsl] select containing nested hard brackets?

Subject: Re: [xsl] select containing nested hard brackets?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sat, 21 Apr 2001 01:09:23 +0100
> Has anyone used a select statement with nested hard brackets:

but not 
can't have [ after [ need


actually that is the same as


in this case.

The former asks for all eleemnt children of something fro which the the
somethingA[somethingB] returns true (ie is non empty)
this is true if there is any somethingA for which the selection
somethingB is non empty.

That in turn is true just if somethingA/somethingB from the original
node will return a non empty node set, which leads to the second form I
give above.

To understand the nested [] forget you are inside any number of []
and just evaluate th eXpath expression as a boolean. Node set
will be coerced to boolean depending on whether the selected node set is
empty (false) or non empty (true)

so xsl:if test="a[b] and c[d[e]]"
is true if there's an a child that has a b child, and a c child that has
a d child that has an e child.


This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit

 XSL-List info and archive:

Current Thread