Subject: Re: AW: [xsl] Finding node having maximum value for an attribute From: Antonio Fiol Bonnín <fiol@xxxxxxxxxx> Date: Fri, 31 May 2002 11:57:46 +0200 |
Yes, you can. You can sort the Archive-nodes using the ID with xsl:sort and extract the first or last node of the sorted tree. <xsl:variable name="max"> <xsl:sort data-type="number" select="//Archive/@ID" order="descending"/> <xsl:value-of select="//Archive[1]/@ID"/> </xsl:variable>
JP
<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???
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
AW: [xsl] Finding node having maxim, Pfitzner, Jan | Thread | [xsl] calling a web service from XS, Francis Norton |
RE: [xsl] Less than comparison has , Michael Kay | Date | RE: [xsl] XALAN-C++ Performance..., Kevin Jones |
Month |