Martin Bialasinski wrote: > On 11/1/06, Fred <[EMAIL PROTECTED]> wrote: [...] > > According to the W3C specification, the name attribute is *required* > > for map and param elements only. > > <URL: http://www.w3.org/TR/html4/index/attributes.html> > > The DTD seems to disagree. http://www.w3.org/TR/html401/sgml/dtd.html > > <!-- attribute name required for all but submit and reset -->
I assume that since it is in the area for forms, it refers to the fact that input elements need a value for the name attribute if they are to be successful. > <!ELEMENT INPUT - O EMPTY -- form control --> > > I believe you cannot model the implication of the comment in the DTD, > so they did not make the field #REQUIRED. That argument can't be sustained when the map element described as: <!ELEMENT MAP - - ((%block;) | AREA)+ -- client-side image map --> <!ATTLIST MAP %attrs; -- %coreattrs, %i18n, %events -- name CDATA #REQUIRED -- for reference by usemap -- > which clearly indicates that the name attribute is required and that the condition can be accommodated in the DTD. > The attributes page might be > auto-generated from the DTD. Maybe, but that doesn't make it wrong - I cited it as a convenient summary. For many elements, the name attribute is #IMPLIED, which means that the browser must include it, but the HTML does not have to supply a value. Therefore: <input> is perfectly valid HTML, however when generating a document, the browser must include a name attribute, even if it has no value. -- Fred --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
