[whatwg] repetition model

Avi Bryant avi at beta4.com
Thu Jun 24 11:58:31 PDT 2004


On Jun 24, 2004, at 4:55 AM, Ian Hickson wrote:

> On Sat, 19 Jun 2004, Malcolm Rowe wrote:
>>
>> Personally, I'm not so sure. The logic required to support the
>> repetition model is extremely complex, compared to the rest of the
>> document, so it should need to provide a significant benefit to us
>> (users, authors) for it to be included.
>
> It looks complex because it is new and all described in the spec. But
> actually it's not really complex, it's just described in a detailed 
> way.
> I'm sure submission is a lot more complicated if you look at the actual
> details to the same level.

I have to agree with Malcolm here.  It's not so much that the 
repetition model is more complex than the rest of the spec, it's that 
it's complex in a new and different way.  Copying template pieces of 
DOM doesn't bother me in the slightest, but the [id] text replacement 
rings serious alarm bells.  Effectively you're upping the meta level: 
parts of the document are no longer HTML, but a description of how to 
produce HTML.  Attributes that were previously treated as opaque atomic 
strings now have to be parsed.  That means you have to deal with 
escaping issues, and the complexity bleeds all over the place 
(prefixing attributes with []? Come on...).  It's treading a fine line 
between markup and behavior (can we show that the repetition model is 
turing complete?), and I'd rather see anything that even approaches 
that line be in Ecmascript instead.

However, I think the model could still work fine without the macro 
expansion.  The main use case seems to be to give unique name 
attributes to each set of inputs.  If your server is handling the 
submission correctly, this shouldn't be necessary anyway: the values 
get submitted in order anyway, so the values from each row should be 
grouped, right?  The numbers are redundant.

Avi




More information about the whatwg mailing list