[whatwg] Interleaved repetition blocks
ian at hixie.ch
Wed Jun 30 15:01:58 PDT 2004
On Wed, 30 Jun 2004, Mark Schenk wrote:
> I've been reading my way through the chapter on repetition and there are
> a couple of things I think can be imporved upon, namely the ability to
> have templates interleave.
Sounds good. Other people have also requested this, so I've changed the
repeat model a little bit and now it copes with this case.
> (and I think it would be trivial to allow both stacked/interleaved with
> the changes I will suggest).
The spec now only supports interleaved. You can do stacked by using
different containers (e.g. put each stack in a separate <div>).
> It would now be necessary to introduce a new attribute to repetition
> blocks which indicates the parent-repetition-template, which I will
> henceforth call the parent attribute (for lack of better idea).
I used "repeat-template".
> You might even be able to create extra attributes to the add-button,
> namely add_stack (add after last occurence of the specific block) and
> add_interleave (add after last occurence of any repetion block) which
> would allow you to combine both methods. This might be too much of a
> good thing, but would give tremendous flexbility with little extra
> effort. For instance if you have the same sequence as the previous
> example (3,1,2,3,1,1,2) but the button types are interleave, stack and
> stack respectively, you would get:
I'm not sure I understand the use case for this.
> There is another tremendous advantage to introducing the parent
> attribute, which has to do with add buttons without a template attribute
> specified, but with an ancestor that is a repetition block. Currently
> this only works with repetition blocks that are not ancestor repetition
> blocks (because the template has to be found), which would result in Add
> buttons being cloned, which will subsequently not be effective. When
> using the parent attribute, a UA will always know which template is
> linked to the repitition block, so you can insert new repetition blocks
Not sure what you mean by "not ancestor repetition blocks" here.
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg