[whatwg] [wf2] repetition model addition step 14 issue

the addition sequence, step 14 states 
If the first argument to the method was null, then the template once 
again crawls through its previous siblings, this time stopping at the 
first node (possibly the template itself) whose previous sibling is a 
repetition block (regardless of what that block's template is) or the 
first node that has no previous sibling, whichever comes first. The new 
element is the inserted into the parent of the template, immediately 
before that node. Mutation events are fired if appropriate.

Furthermore, as I interpret correctly, this is also the case at 
initialisation, i.e. the addRepetitionBlock() method is invoked with 
null as it's argument 
(http://www.whatwg.org/specs/web-forms/current-work/#initial). (not 
quite sure whether this is indeed correct interpreted, see further)
For each element that has a |repeat 
<http://www.whatwg.org/specs/web-forms/current-work/#repeat>| attribute 
with the literal value |template 
<http://www.whatwg.org/specs/web-forms/current-work/#template>|, the UA 
must invoke the template's replication behaviour as many times as the 
attribute on the same element specifies (just once, if the attribute is 
missing or has an invalid value).[...] (Invoking the template's 
replication behaviour means calling its |addRepetitionBlock() 

If this is the case, at initialisation, when there are no repetition 
blocks, the first block is added as the very first child of the 
template's parent, which is not necessarily before the template. This 
doesn't seems to be desired very often. Picture a fieldset with a legend 
where the first replicated block ends up before the legend. Should the 
initial replication behaviour maybe call the addRepetitionBlock with the 
template's previous sibling as argument?

Rikkert Koppes

Received on Thursday, 4 October 2007 00:25:29 UTC