- From: John Boyer <boyerj@ca.ibm.com>
- Date: Mon, 29 May 2006 09:25:44 -0700
- To: Mark Seaborne <m_seaborne@mac.com>
- Cc: David Landwehr <david.landwehr@solidapp.com>, www-forms <www-forms@w3.org>, www-forms-request@w3.org
- Message-ID: <OF8CB8B043.E75E1588-ON8825717D.005A0927-8825717D.005A3EE7@ca.ibm.com>
For what it's worth, you should be able to *write* a sort over data in XForms 1.1 due to the if and while attributes on actions. One might have to play with algorithms to find a reasonably efficient one. Doing insert into a sorted list should also be possible. Feasible, though not as nice as pre-built functions. Cheers, John M. Boyer, Ph.D. Senior Product Architect/Research Scientist Co-Chair, W3C XForms Working Group Workplace, Portal and Collaboration Software IBM Victoria Software Lab E-Mail: boyerj@ca.ibm.com http://www.ibm.com/software/ Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer Mark Seaborne <m_seaborne@mac.com> Sent by: www-forms-request@w3.org 05/29/2006 06:13 AM To David Landwehr <david.landwehr@solidapp.com> cc www-forms <www-forms@w3.org> Subject Re: Sorting the exforms way Hi David, Thanks for the clarification. you forgot the example of using event() in 1.1. All the best Mark On 29 May 2006, at 13:56, David Landwehr wrote: > Hi Mark > > There is both an element and a function because implementors > currently have both. It is possible with the function to change the > criteria of the sorting in a easier way than when the element is > used. But with many sorting criteria the function will be messy > because if has to nest one sorting within the other where the > elements will simply be a list of elements. I will try to make this > clearer. > > The sort element can be a child of bind/@nodeset (I have to > document this) and therefore be used in the model. It is not > possible to rearrange the instance DOM using this sorting. Using > other extensions from exforms it will be possible to sort an > instance before submission. It is also possible to always maintain > a sorted order in XForms 1.1 using the event() but it is less than > trivial (see attached example). > > The sort function will work in all cases, e.g. also for @ref, > @value and so on. The function has the greatest flexibility but as > said it could "obfuscate" forms (maybe this is also the reason XSLT > decided to use an element). > > Thanks for the feedback :) > David > > > > Mark Seaborne wrote: >> Hi David, >> >> Sorting was a bad miss for XForms 1.0 (I think anyway). >> >> Both an element and function are documented, I think it would be >> useful if the documentation explained why it is useful to have both. >> >> Is the sort element intended only for use in the UI (i.e. only >> affect the display sort order, not the document order), or could I >> use it as a child of a bind in a model to change document order >> (bind being an element that takes a node-set binding)? >> >> Alternatively, could the function be used in the model to change >> document order in the target node-set? >> >> Anyway, you will have guessed that I would like to be able to both >> sort the UI and sort within an XML document. >> >> All the best >> >> Mark >> >> On 29 May 2006, at 11:39, David Landwehr wrote: >> >>> >>> Hi, >>> >>> I have created a set of extensions for sorting on exforms.org >>> (http://exforms.org/sorting.html). Any feedback will be welcomed. >>> >>> Best regards, >>> David >>> >>> ---------------------------------------------- >>> David Landwehr (david.landwehr@solidapp.com) >>> Chief Executive Officer, SolidApp >>> Web: http://www.solidapp.com >>> Office: +45 48268212 >>> Mobile: +45 24275518 >>> -------------------------------------------- >>> >>> >> > > > -- > -------------------------------------------- > David Landwehr (david.landwehr@solidapp.com) > Chief Executive Officer, SolidApp > Web: http://www.solidapp.com > Office: +45 48268212 > Mobile: +45 24275518 > -------------------------------------------- >
Received on Monday, 29 May 2006 16:27:11 UTC