|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] AW: how to get node with maximum child nodes ??
Hi Dipesh, you have 2 <CLASS NAME="Client_Agent> elements in your XML. For each, you find the maximum ATTRIBUTE element count in OBJECT elements. So you get 2 values. If you want to get the overall maximum, do: <xsl:for-each select="//CLASS[normalize-space(@NAME)='Client_Agent']/OBJECT"> <xsl:sort select="count(ATTRIBUTE)" order="descending"/> <xsl:if test="position()=1"> <xsl:value-of select="generate-id(.)"/> </xsl:if> </xsl:for-each> Regards, Markus __________________________ Markus Abt Comet Computer GmbH http://www.comet.de ---------- Von: Dipesh Khakhkhar Gesendet: Donnerstag, 28. August 2003 17:38 An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Betreff: how to get node with maximum child nodes ?? [...] <xsl:for-each select="//CLASS"> <xsl:choose> <xsl:when test="normalize-space(@NAME)='Client_Agent'"> <xsl:for-each select="OBJECT"> <xsl:sort select="count(ATTRIBUTE)" order="descending"/> <xsl:if test="position()=1"> <xsl:value-of select="generate-id(.)"/> </xsl:if> </xsl:for-each> </xsl:when> </xsl:choose> </xsl:for-each> [...] 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








