Re: Sorting the exforms way

David,

why not having a function for sorting the UI as you suggest and a sort 
/action/ which affects the instance data ? This action could/should 
resemble XSLT sort semantics as your extension element already does. I 
think it would be most flexible for a form author to have an action for 
sorting.

Regards,
Uli.

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
>>> --------------------------------------------
>>>
>>>
>>
> 
> 


-- 
Ulrich Nicolas Lissé

Received on Wednesday, 31 May 2006 21:19:46 UTC