W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2012

Re: [whatwg] Sortable Tables

From: Cameron Jones <cmhjones@gmail.com>
Date: Thu, 8 Nov 2012 10:43:37 +0000
Message-ID: <CALGrgev69chXjoam4R=_GszR2BFfBbaP3jWP=4-cV0EQPqtMyg@mail.gmail.com>
To: Simon Pieters <simonp@opera.com>
Cc: whatwg@lists.whatwg.org, Jirka Kosek <jirka@kosek.cz>
On Wed, Nov 7, 2012 at 11:42 AM, Simon Pieters <simonp@opera.com> wrote:

> On Wed, 07 Nov 2012 10:54:19 +0100, Jirka Kosek <jirka@kosek.cz> wrote:
>
>  On 6.11.2012 23:18, Silvia Pfeiffer wrote:
>>
>>  * data-type: date, number, text etc which determines the comparison
>>> function used in sort
>>>
>>
>> It would be very difficult to support sorting on dates and numbers as in
>> HTML they are usually present formatted using specific locale. So there
>> should be additional attribute added to td/th which can hold sort key
>> which will override cell contents, something like
>>
>> <td sortas="2012-11-07">11. listopadu 2012</td>
>>
>
> <time> exists, and <data> exists for non-time machine-readable data; maybe
> they can be utilized in some way?
>
>
I have done some investigation in this area too and having concrete
datatypes would make this more utilizable, ie from the proposal for <data
type="" value=""/>

http://www.w3.org/wiki/User:Cjones/ISSUE-184

The other area of integration would be with BCP-47 language tags and the
CLDR which include i18n collation information, for example british numeric
collation:

en-GB-*u-kn-true*

The significant benefit with this is that this standard is already
universal across server\client and is of course fully internationalized.

The other aspect of this is that there is a distinction between server
pagination including sort ordering defining the content of a page and the
client-based sorting which would be more of a presentational customization
and outside the scope of pagination. As such, it may be better for the HTML
to markup the structure of the content with sorting and collation but for
this to be configurable through CSS without the structural DOM changes.

This could also apply to HTML lists: <ul> <ol>, <dl>.

Thanks,
Cameron Jones
Received on Thursday, 8 November 2012 10:56:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:11 GMT