[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Sort by depth of leaf-nodes
Hello, I've got the following XSL which gives me, the element-names of the leaf nodes of the descendants of the first child of element Concat (I think thats how it goes in English !). <xsl:template match="Concat"> <xsl:for-each select="(*[1]//*[not(*)])"> <xsl:value-of select="name()"/> </xsl:for-each> </xsl:template> I need to get the names for the "deepest" node under Concat (ie. the element with the most leaf nodes) which is not necessarily the first (as above). I believe its a combination of taking the [1] out from the above xpath expression and building in xsl:sort combined with count but my feeble attempts come to nothing. Any help appreciated ! Rough XML snip: <Concat> <A> <B>1</B> </A> <A> <B>1</B> <C>2</C> </A> </Concat> output needed: BC 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
|