|
Subject: Re: to extract the longest string (fwd) From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx> Date: Fri, 18 Aug 2000 10:53:18 +0100 |
Rajagopal, Oliver Becker wrote: >The following works similar to a solution recently posted by Jeni: > ><xsl:template match="table"> > <xsl:for-each select="row"> > <xsl:sort select="count(col)" > data-type="number" order="descending" /> > <xsl:if test="position()=1"> > <xsl:for-each select="col"> > <xsl:value-of select="@align" /> > </xsl:for-each> > </xsl:if> > </xsl:for-each> ></xsl:template> Yes, sorry - I overlooked the data-type="number" from the sort, which means that something with 10 cols would be counted as shorter than something with 9 cols. Cheers, Jeni XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: to extract the longest string (, Oliver Becker | Thread | Re: to extract the longest string (, C.V. Radhakrishnan |
| Is XSL suitable for batch processin, Loz | Date | Re: to extract the longest string (, C.V. Radhakrishnan |
| Month |