|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XPatch: ancestor and count
> > <xsl:for-each select="child::menuitem"> > > <tr><td><xsl:value-of select="count(.//ancestor::*)"/></td><td> > > <xsl:value-of select="@title"/></td></tr> > > </xsl:for-each> > > > > > In this context, './/' means 'descendant-or-self::*', right? Well spotted, I missed that. .//ancestor::* means ./descendant-or-self::node()/ancestor::* so you are counting how many distinct ancestors you and all your descendants have. This is one for you, one for each of your ancestors, and one for each of your descendants that has at least one child. Michael Kay http://www.saxonica.com/
|
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








