Sorting

One of the items we still have on our list is sorting, and which function 
we should use.

It occurred to me recently that we are approaching the problem wrong from 
an XForms point of view: being sorted is a property of a structure, and not 
a computation per se.

Completely strawman-based example:

 <instance>
  <purchases xmlns="">
   <item>
    <what>Computer</what>
    <price>1200</price>
    <date>2024-01-01</date>
   </item>
   etc.
  </purchases>
 </instance>

 <bind ref="item" sorted="date"/>
 ...
 <insert ref="item" origin="instance('new")"/>

Any insert in a sorted structure would ensure that it be inserted at the 
correct location.

This is of course a first stab at the issue, and I realise that there are 
other issues to resolve, such as multiple sorting keys, dynamic keys, and 
so on that we need to discuss, but I feel that this is a more 
XForms-oriented approach to a fundamental issue.

I'll put it on the agenda for tomorrow.

Steven

Received on Thursday, 18 January 2024 11:25:49 UTC