[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: select containing nested hard brackets?

Subject: Re: select containing nested hard brackets?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sat, 21 Apr 2001 01:09:23 +0100
asp select with 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.