W3C home > Mailing lists > Public > www-forms@w3.org > February 2004

RE: Sort

From: Mark Birbeck <mark.birbeck@x-port.net>
Date: Mon, 23 Feb 2004 12:00:49 -0000
To: "'Dominique ARNOU'" <dominique.arnou@edfgdf.fr>
Cc: <www-forms@w3.org>
Message-ID: <003801c3fa04$ada76db0$6b01a8c0@W100>

Hi Dominique,

> Is there anyway that I can sort elements into an instance
> without submit it to server ? I understand that xslt can do
> that, but I want to stay on the same form after sorting my
> array... can xforms does that ?

There are plans to add such features to the core of XForms. In the
meantime, if your implementation allows it, you could use extension
functions as a temporary solution:

  <model functions="sort:bubble">
    <instance src="http://www.somedata.com/x.xml" />
    <bind id="nsSorted" nodeset="sort:bubble(/a/b, order)" />
  </model>
  .
  .
  .
  <select1 ref="order">
    <label>What order ...</label>
    <item>
      <label>Ascending</label>
      <value>asc</value>
    </item>
    <item>
      <label>Descending</label>
      <value>desc</value>
    </item>
  </select1>

  <repeat bind="nsSorted">
    ...
  </repeat>


Regards,

Mark


Mark Birbeck
CEO and CTO
x-port.net Ltd.

http://www.formsPlayer.com/
Received on Monday, 23 February 2004 07:00:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:21:57 GMT