W3C home > Mailing lists > Public > www-forms@w3.org > May 2007

Re: sorting and grouping in XForms?

From: David Landwehr <david.landwehr@picoforms.com>
Date: Thu, 31 May 2007 09:16:09 +0200
Message-ID: <465E7639.9060005@picoforms.com>
To: "C.M.Sperberg-McQueen" <cmsmcq@acm.org>
CC: www-forms@w3.org
Hi C.M.Sperberg-McQueen,

Sorting is not a core functionality in XForms...

There are an extension spec which has sorting functionality but I'm not 
sure how many implementations supports it 
(http://www.exforms.org/sorting.html).

It is possible using XForms 1.1 to implement some kind of sorting using 
the event function, I have attached an example for that. The example 
uses an action called duplicate which you have to rewrite as this action 
has been removed from 1.1 (it was in there at some point) and instead 
provided by using some hairy attribute mayham on the insert action.The 
idea should however be clear enough. Also the xforms-destroy event 
should be an xforms-insert action. The example works in the Novell 
implementation 
(http://forge.novell.com/modules/xfcontent/file.php/xforms-explorer/docs/nxsetup.msi), 
note that the implementation is no longer maintained.

You can do sorting in javascript if the Document is exposed and 
javascript is available in the implementation.

What implementation are you using?

Best regards,
David

C.M.Sperberg-McQueen skrev:
>
> After a few years' neglect, I'm brushing up my XForms knowledge.
>
> As an exercise, I'd like to write a number of XForms applications
> to manage relatively simple lists of things I maintain in XML:
> to-do lists and that kind of thing.
>
> One of the most important things I want to do with my to-do list
> is sort it in different ways:  by project, urgency, and importance;
> by size of task, importance, project, urgency; etc.  So far, I
> haven't figured out how to do this in an XForms interface.  I've
> searched the XForms spec and the tutorials I have had open recently
> for words like 'sort', 'order', 'sequence', and come up empty.
>
> Is there a convenient way to sort items dynamically in XForms?
> Is there a method that's inconvenient, but possible given willingness
> to grit one's teeth?  Can Javascript sort the items in an instance?
>
> Any pointers or advice gratefully received.
>
> C. M. Sperberg-McQueen
>
>



Received on Thursday, 31 May 2007 07:16:51 GMT

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