[whatwg] WF2 Repitition Model
ian at hixie.ch
Sun Jun 27 09:30:54 PDT 2004
On Sun, 27 Jun 2004, Michael wrote:
> I think I missed something important, why is a template element is bad?
An element would confuse non-WF2 UAs a lot more than an element, and would
cause definite parsing problems for HTML-based WF2 UAs. For example, in
HTML4, the following:
...is three siblings. You can make the middle one into a template:
<p repeat="template"> ...
...without changing the parse rules. But what if you have:
<template> <p> ... </template>
...? Does the <template> element end the first <p>, or not?
What about if you really wanted:
<p> ... <template> ... </template>
The <ins> and <del> problems in HTML4 already have this problem, and it is
very confusing for authors who use them.
Also, the way the repetition model is defined at the moment, it could even
work in, e.g., XHTML2:
The following, however, would be a breach of the XHTML2 content model:
...since <ol> can only contain <li>s.
Finally, the main question: why is an element it better? The comment thing
to hide the element's children from legacy UAs is non-compliant (there is
no SGML construct that allows a comment-like node while still parsing
elemnts, and even if there was, it would mean you couldn't have comments
inside the template, which doesn't seem like a good thing).
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg