W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2007

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

From: Rikkert Koppes <rikkert@finalist.com>
Date: Thu, 04 Oct 2007 09:25:29 +0200
Message-ID: <47049569.1050309@finalist.com>
the addition sequence, step 14 states 
(http://www.whatwg.org/specs/web-forms/current-work/#addition):
---
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 
|repeat-start 
<http://www.whatwg.org/specs/web-forms/current-work/#repeat-start>| 
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() 
<http://www.whatwg.org/specs/web-forms/current-work/#addrepetitionblock>| 
method).
---

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?

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

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:37 UTC