Subject: Re: [xsl] Find the node with maximum elements From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Sun, 04 Nov 2007 08:46:17 -0500 |
This solution is nice. But if the OP wants to do something else with the result (not just printing the result (sequence), as this solution demonstrates), then I think xsl:for-each loop will be necessary.
<xsl:template match="/"> <xsl:for-each select="/Sample/*[count(Car)=max(/Sample/*/count(Car))]"> <xsl:value-of select="name(.)"/> <xsl:text> </xsl:text> </xsl:for-each> </xsl:template>
-- Comprehensive in-depth XSLT2/XSL-FO1.1 classes: Austin TX,Jan-2008 World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and training G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Find the node with maximu, Mukul Gandhi | Thread | RE: [xsl] Find the node with maximu, Michael Kay |
Re: [xsl] Find the node with maximu, Mukul Gandhi | Date | RE: [xsl] Find the node with maximu, Michael Kay |
Month |