[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: select containing nested hard brackets?
> 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
|
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
|