|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How do you count nesting level
> <xsl:param name="Depth" select="count(ancestor::*[section])" /> that counts (if you do not pass any other value as the parameter) the number of ancestors that have a section child. In your example this will be 0 for titles 1 to 4 and 1 for title 5. You said you wanted > Title 1 and 2 are at level 1. Title 3 and 4 are at level 1. Title 5 is at > level 2. which looks like count(ancestor::section) David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service. 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
|

Cart








