W3C home > Mailing lists > Public > public-vocabs@w3.org > June 2014

RE: ItemList

From: Markus Lanthaler <markus.lanthaler@gmx.net>
Date: Sat, 14 Jun 2014 21:34:16 +0200
To: "'W3C Web Schemas Task Force'" <public-vocabs@w3.org>
Message-ID: <02a301cf8807$a25323e0$e6f96ba0$@gmx.net>
On 11 Jun 2014 at 00:43, Dan Brickley wrote:
> On 10 June 2014 22:36, Markus Lanthaler wrote:
>> On Tuesday, June 10, 2014 7:36 PM, Dan Brickley wrote:
>>>>> Re 'numberOfElements' maybe we can find an existing property to
>>>>> extend?
>> 
>> Very minor point but numberOfItems might be better given how the other
>> properties and the type itself is documented:
>> 
>> A list of *items* of any sort...
>> A single list item...
>> ListItem
>> ...
> 
> Perhaps, but we also use the word element, i.e. itemListElement.

True. But actually that's confusing as well IMO. Why not (re-)use "item"? ListItem is basically an indirection/proxy/wrapper for the entity you want to add to the list. It uses "item" to reference that entity. Couldn't we use item directly on ItemList as well? If not, probably it would still be better to use "item" on ItemList and change ListItem's "item" to "value" or something similar.


[...]

>> It would also be nice if an example using next and previous would be added as people
> will probably struggle referencing it both from the ItemList and from a ListItem at the same
> time if there isn't an example they can copy-paste.
> 
> Yes, more example suggestions welcomed.

I quite like the flexibility of having both next/previous and itemPosition. I just wonder what happens if they contradict each other (caching could easily lead to such situations). Should consumers reject such data? Or should one of the two mechanisms (probably itemPosition) be ignored in such cases?


--
Markus Lanthaler
@markuslanthaler
Received on Saturday, 14 June 2014 19:34:47 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:29:42 UTC