[whatwg] Re: several messages
mattraymond at earthlink.net
Thu Jul 1 06:47:25 PDT 2004
Ian Hickson wrote:
> On Thu, 1 Jul 2004, Matthew Raymond wrote:
>>My big question for this example is: "What markup ISN'T allowed in
>>the <datalist> element?"
> I intend to say that the content model of the <datalist> element is the
> same as the content model of its parent with the addition that <option>
> elements may be allowed as direct children, and that the <datalist>
> element is allowed anywhere that the <select> element is.
So it's kinda like the following:
<div type="hidden" use_options_from_select="true">
<!-- Whatever you want -->
<select id="something"><!-- Options --></select>
<!-- Whatever you want -->
> No, of course they will do that. Just like they do:
> <h6>(c) copyright 1999 by I Don't Understand HTML</h6>
> <blockquote> Look at me, I'm indented. </blockquote>
> <p> I want some <cite>italic text</cite> </p>
> <div>this is paragraph 1<br><br>this is paragraph 2</div>
> <body><font size=7>header</font><br><font size=3>body text
> The difference being that it seemed you _wanted_ them to abuse repetition
> blocks. :-)
Not really. I just want to limit the amount of new markup. If you'd
prefer a specific element for hiding markup intended for legacy UAs, see
my other message with regards to the <legacy> element.
>>Furthermore, what happens if the <select> element doesn't have the
>>same |name| as the <input>?
> <datalist> is ignored by legacy UAs. So what happens is the same as if you
> gave the markup to the UA without the <datalist> tags.
No, I was talking about how WF2 UAs would handle it. I presume you
mean that the options would be transferred to the <datalist>, and the
<select> value would never be submitted. Yeah, I guess that's okay...
>>Would it be valid in WF2 to include more than one <select> element in
>>What happens if multiple <selects> have the same |name|.
> Same as now.
I presume you mean that, because the <select> elements are ignored
in WF2 UAs, the options from different <select> elements just get
dropped to the <datalist> level and lumped together.
>>Not that this approach couldn't work if it had specific limitations and
>>rules. It's just that it seems to confusing for the web developers to be
>>workable. On the other hand, using a repetition template is powerful but
>>easy to understand. My example may have used it for an unintended
>>purpose, but there is no confusion about what works in a repetition
>>block and what doesn't.
> I don't see why. There's very little practical difference between <div
> repeat="template" repeat-start="0"> and <datalist>.
There's nothing about the name <datalist> that would tell me it
would behave in the manner you describe, whereas the word "template"
clearly suggests that the contents should not be rendered. Not that I'm
not open to an alternative to both, though.
>>On the other hand, I don't think I liked having my |list| property
>>reference a <select> in a repetition template. I was exploring all the
>>options, but that option raises too many question and just doesn't feel
>>right to me. Better to duplicate the list contents.
> Why? Duplication seems error prone at best.
It's a copy-paste, so it's less error prone than forgetting to put
in a </datalist> tag. Worst case scenario is that the webmaster does a
lot of indenting...
More information about the whatwg