[whatwg] Web Forms 2.0 Substantive - Section 3
fantasai
fantasai.lists at inkedblade.net
Wed Jun 23 08:12:00 PDT 2004
Ian Hickson wrote:
> On Tue, 15 Jun 2004, fantasai wrote:
>>3.5.1. Addition
>>---------------
>>
>># 6. If the new repetition block has an ID attribute (that is, an attribute
>># specifying an ID, regardless of the attribute's namespace or name), then
>># that attribute's value is used as the template name in the following steps.
>>#
>># 8. The attribute from which the template's name was derived, if any, is
>># removed from the new repetition block element. (See the previous two
>># steps.)
>>
>>Step 8 leaves the repetition block element without an ID. Instead of removing
>>the attribute, append the repetition index to it instead. A repetition block
>>derived from a template with id="tmpl" would thus have an id like id="tmpl8".
>
> Why? There's no guarentee that ID isn't already used.
True.
> What's the use case?
Can't think of anything specific off the top of my head, but I do remember
trawling through some Javascript that dealt with numbered divs.
> If the author really wanted that, he could just put an element inside the
> repetition template with id="tmpl[id]", and navigate from that. Much more
> likely is that the author wants one of the controls _inside_ the template,
> and so that is what would have the ID attribute with [id].
Being able to navigate from a control inside the element doesn't really help
if you're writing style sheet rules.
~fantasai
--
http://fantasai.inkedblade.net/contact
More information about the whatwg
mailing list