This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Finding node having maximum value for an attribute
- From: Joerg Heinicke <joerg dot heinicke at gmx dot de>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Fri, 31 May 2002 11:28:20 +0200
- Subject: Re: [xsl] Finding node having maximum value for an attribute
- References: <8987824ED22DD2118E3D00805F15192805E8A381@ex-ind-hu1.baan.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
<xsl:template match="Archives">
<xsl:value-of select="Archive[not(@ID <
preceding-sibling::Archive/@ID)]/@ID"/>
</xsl:template>
Joerg
Bagchi Ratul wrote:
> Hi,
> I have a XML which has the following structure :
> <Archives>
> <Archive ID="1">
> <somenode>somevalue</somenode>
> <someothernode>someothervalue</someothernode>
> </Archive>
> <Archive ID="2">
> <somenode>somevalue</somenode>
> <someothernode>someothervalue</someothernode>
> </Archive>
> </Archives>
>
> Now my question is, is it possible to wite a XPath query which will return
> me the highest ID attribute if Archive node in the whole file???
>
> Regards,
> Ratul.
--
System Development
VIRBUS AG
Fon +49(0)341-979-7419
Fax +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list