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: yes but not select="something/[somethingA[somethingB]]" can't have [ after [ need select="something/*[somethingA[somethingB]]" actually that is the same as select="something/*[somethingA/somethingB]" in this case. The former asks for all eleemnt children of something fro which the the XPath 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 expressions 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. 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] select containing nested hard, Dan Diebolt | Thread | RE: [xsl] select containing nested , Patrick Moore |
Re: [xsl] XML source with DOCTYPE d, David Carlisle | Date | Re: [xsl] union/intersection on att, David Carlisle |
Month |