ASP Error: 70
Description: Permission denied
Source: Microsoft VBScript runtime error
|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: calculate depth of an xml-tree
Florian Bauer wrote:
and now my 2nd (and hopefully last) question for today ...Forget about incrementing a variable, there is no such thing in XSLT. Sort all elements by number of ancestors and take the first one. <xsl:template match="/"> <xsl:for-each select="//*"> <xsl:sort select="count(ancestor::*)" data-type="number" order="descending"/> <xsl:if test="position() = 1"> <xsl:value-of select="count(ancestor::*)+1"/> </xsl:if> </xsl:for-each> </xsl:template> -- Oleg Tkachenko http://www.tkachenko.com/blog Multiconn Technologies, Israel 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








