[whatwg] repetition model

On Jun 25, 2004, at 1:51 PM, Hallvord Reiar Michaelsen Steen wrote:

> On 25 Jun 2004 at 11:01, Avi Bryant wrote:
>
>>> I do agree that the [id] stuff is somewhat dodgy. I really am at a 
>>> loss of
>>> how to do a better solution, though. And it does work quite well.
>>
>> In other words: it's a useful hack.  No argument there, as long as we
>> agree that it would be nice to find something that *isn't* dodgy.
>
> This complexity seems to be introduced simply because one wants to
> choose where in a "name" or "id" value the index goes.

<snip>

> To go with the "nested repetition" example in the spec there would be
> no way of telling whether
>
> <input name="planetmoon135"/>
>
> was the 35th moon of the 1st planet or the 5th moon of the 13th
> planet.

Instead of simply appending the number, append a "." and then the 
number.  So you'd get

<input name="planetmoon.13.5">

This follows the precedent set by <input type="image">.  I think this 
makes your indexposition attribute unnecessary.

I like it much, much better than the [id] expansion.

Avi

Received on Friday, 25 June 2004 14:05:36 UTC