Is it possible to set an XPath expression as 'sort' tag value ?
I tried sort="number(value)" but it doesn't work.

Franck



> -----Message d'origine-----
> De : Oded Arbel [mailto:[EMAIL PROTECTED] 
> Envoyé : mardi 11 octobre 2005 10:05
> À : taglibs-user@jakarta.apache.org
> Cc : LANTRES Franck
> Objet : Re: xtags:forEach - integer sorting
> 
> On Tuesday, 11 בOctober 2005 09:56, LANTRES Franck wrote:
> > Hi,
> >
> > In a JSP, I use the xtags:forEach element and I would like to sort 
> > elements in descending order according to an integer value.
> 
> > And if I write :
> > <xtags:forEach select="/foo/list" sort="value" ascending="false"/>
> >
> > The result I get is :
> > 6
> > 56
> > 4
> > 2
> 
> Which is reasonable, as forEach does string sorting. You 
> might want to either pad numbers with zeros or white space, 
> or sort them yourself somehow.
> 
> --
> Oded Arbel
> m-Wise mobile solutions
> [EMAIL PROTECTED]
> 
> +972-9-9611212 (204)
> +972-54-7340014
> 
> ::..
> Never express yourself more clearly than you think. 
>       -- N. Bohr
> 

Reply via email to