Descending Order in Repeat

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Descending Order in Repeat

srikanth.prodigy

Hello All,

 

I am trying to display values in descending order in xforms:repeat using exforms:sort

 

<xforms:repeat id="event-repeat"  nodeset="exforms:sort(instance('events-instance')/Event[CreatedAt&lt;=now() and(ExpirationDate='' or ExpirationDate &gt; current-date())],'CreatedAt','text','descending','lower-first')[position() gt xs:integer(instance('positions')/positionst) and position() le xs:integer(instance('positions')/positionen)]" >

 

But the values are displaying in descending order

 

Thanks,

Srikanth A

 

 

 



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Descending Order in Repeat

Markku Laine
> I am trying to display values in descending order in xforms:repeat  

> using exforms:sort
>
> <xforms:repeat id="event-repeat"  
> nodeset="exforms:sort(instance('events-instance')/
> Event[CreatedAt&lt;=now() and(ExpirationDate='' or ExpirationDate  
> &gt; current-date())],'CreatedAt','text','descending','lower-first')
> [position() gt xs:integer(instance('positions')/positionst) and  
> position() le xs:integer(instance('positions')/positionen)]" >
>
> But the values are displaying in descending order
In one of my Web applications, I do the sorting like this:
<xforms:repeat nodeset="exforms:sort( instance( 'pim-instance' )/
contacts/contact, 'name', 'text', instance( 'util-instance' )/
contactorder )" id="pim-contacts-contact-repeat">

Where the "util-instance" looks like this:
<xforms:instance id="util-instance">
   <util xmlns="">
     <contactorder>ascending</contactorder>
   </util>
</xforms:instance>

The value of the "contactorder" element is either "descending" or  
"ascending".

Hope this helps.


-Markku


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws