- From: T. V. Raman <tvraman@us.ibm.com>
- Date: Mon, 18 Apr 2005 14:22:00 -0700
- To: Leigh.Klotz@xerox.com
- Cc: mark.birbeck@x-port.net, tvraman@almaden.ibm.com, suzan.foster@nerocmediaware.nl, www-forms@w3.org
A good comprehensive list.
Finally, and perhaps the most complex, a sort whose sort
predicate is a function of user input into another control.
Having this would create some very fluid end-user experiences.
>>>>> "Klotz," == Klotz, Leigh <Leigh.Klotz@xerox.com> writes:
Klotz,> Mark's point about the controls presenting views on
Klotz,> data is clear enough and I don't think anyone was
Klotz,> disagreeing with that premise. I might agree with
Klotz,> Raman's comment that simple attributes might not be
Klotz,> enough, but I am not sure yet. I do note, though,
Klotz,> that presenting sorting without author control brings
Klotz,> up the question of what's being sorted; i.e., what is
Klotz,> the sort key accessor function, and what is the
Klotz,> comparator? There are many options, and I think that
Klotz,> the ability to express the (needed) options from the
Klotz,> list below will give a test of whether the simple
Klotz,> attribute (or simple child element) case is good
Klotz,> enough.
Klotz,>
Klotz,> 1. Sort key is label. - If I show a list of airport
Klotz,> codes with city names as the labels, presumably I
Klotz,> want to sort by city name, not by airport code.
Klotz,> Otherwise we'll get complaints from all the Canadians
Klotz,> about YOW and YYV appearning at the bottom of the
Klotz,> list ;-) 2. Sort key is value - What if value is
Klotz,> complex, in the case of select? 3. Sort key is some
Klotz,> computed expression. - Useful in the above case of
Klotz,> select1 and complex value. 4. Sort key is one of the
Klotz,> above, but comparison function is elsehow specified.
Klotz,> One possibility is to use the XML Schema type -
Klotz,> Lexicographic ascending/descending (xsd:string) -
Klotz,> Numeric or date-based ascending or descending --
Klotz,> (xsd:number, xsd:dateTime) - Other more complicated
Klotz,> user-defined Schema types But then what if there's no
Klotz,> Schema or the processor doesn't support it (XForms
Klotz,> Basic)?
Klotz,>
Klotz,> Leigh.
Klotz,>
Klotz,>
Klotz,> -----Original Message----- From: Mark Birbeck
Klotz,> [mailto:mark.birbeck@x-port.net] Sent: Monday, April
Klotz,> 18, 2005 11:26 AM To: tvraman@almaden.ibm.com Cc:
Klotz,> Klotz, Leigh; suzan.foster@nerocmediaware.nl;
Klotz,> www-forms@w3.org Subject: RE: How to change the order
Klotz,> of repeat-items?
Klotz,>
Klotz,> Raman,
Klotz,>
>> The idea of putting sort attrs on the ui layer is
>> enticing, but I am afraid it will run into a wall fairly
>> quickly.
Klotz,>
Klotz,> I disagree ;)
Klotz,>
Klotz,> As you know -- since you are a strong advocate for it
Klotz,> -- there are many situations where the UI does not
Klotz,> *directly* reflect the model. For example, take
Klotz,> xf:select1; its purpose is for the user to choose an
Klotz,> item from a list, but it is possible for the list to
Klotz,> not be 'in view', even though the list is obviously
Klotz,> in the model. The list might be limited because the
Klotz,> author has used:
Klotz,>
Klotz,> @appearance="minimal"
Klotz,>
Klotz,> or it might be limited because the user has collapsed
Klotz,> a node in a tree, or whatever.
Klotz,>
Klotz,> Other examples would be the use of date pickers to
Klotz,> both select and render dates, check-boxes that look
Klotz,> nothing like the word 'true' or 'false', colour
Klotz,> pickers that obviously don't look like #ab7f34, a
Klotz,> number like "100" stored in the model but rendered as
Klotz,> "$100.00", and so on.
Klotz,>
Klotz,> So, my view is that *some* (not all) of the use cases
Klotz,> for sorting fall into this domain -- the user might
Klotz,> be able to control them and the author might be able
Klotz,> to hint at them, but either way, the model doesn't
Klotz,> care. (To put it in terms of the MVC architecture, we
Klotz,> are simply allowing the creation of an ordered 'view'
Klotz,> of a set of nodes, without touching the underlying
Klotz,> nodes.)
Klotz,>
Klotz,>
Klotz,> I would say that the sortable columns of email or
Klotz,> contacts falls into the category of a 'user sort' --
Klotz,> this can be done with no mark-up at all, since it's
Klotz,> just a more complex version of the button next to a
Klotz,> drop-box that shows you the list of options, and is
Klotz,> not under the control of XForms, but under the
Klotz,> control of the user agent.
Klotz,>
Klotz,> In the category of an 'author-hint sort' would be the
Klotz,> rendering of the selections in a selection list; the
Klotz,> names of the countries would be in one order in one
Klotz,> language, and in another order in another language,
Klotz,> for example.
Klotz,>
Klotz,> And in the category of a 'model sort' might be the
Klotz,> list of items in a flowchart, since in this case the
Klotz,> order in the model really does matter.
Klotz,>
Klotz,> The 'model sort' is more accurately a proper
Klotz,> re-ordering of nodes, that should be permanent, and
Klotz,> would therefore be achieved through an action or
Klotz,> extension function. The second one is more like a
Klotz,> 'filter' -- a different 'view' on the same underlying
Klotz,> nodes, but with those nodes left completely intact.
Klotz,>
Klotz,> Regards,
Klotz,>
Klotz,> Mark
Klotz,>
Klotz,>
Klotz,> Mark Birbeck CEO x-port.net Ltd.
Klotz,>
Klotz,> e: Mark.Birbeck@x-port.net t: +44 (0) 20 7689 9232 w:
Klotz,> http://www.formsPlayer.com/ b:
Klotz,> http://internet-apps.blogspot.com/
Klotz,>
Klotz,> Download our XForms processor from
Klotz,> http://www.formsPlayer.com/
Klotz,>
Klotz,>
Klotz,>
--
Best Regards,
--raman
------------------------------------------------------------
T. V. Raman: PhD (Cornell University)
IBM Research: Human Language Technologies
Architect: RDC --- Conversational And Multimodal WWW Standards
Phone: 1 (408) 927 2608 T-Line 457-2608
Fax: 1 (408) 927 3012 Cell: 1 650 799 5724
Email: tvraman@us.ibm.com
WWW: http://almaden.ibm.com/u/tvraman (google:raman+labrador)
AIM: emacspeak
GPG: http://www.almaden.ibm.com/cs/people/tvraman/raman-almaden.asc
Snail: IBM Almaden Research Center,
650 Harry Road
San Jose 95120
Received on Monday, 18 April 2005 21:21:54 UTC