RE: [PHP] php processing name vs. id field
| From: | Kirk dot Johnson at zootweb dot com | Date: | Fri, 02 Jul 2010 16:28:40 +0000 |
| Subject: | RE: [PHP] php processing name vs. id field | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-306642@lists.php.net to get a copy of this message | ||
"Bob McConnell" <rvm@CBORD.com> wrote on 07/02/2010 08:53:30 AM:
> > Arguments against using/dismissing the "name" attribute in tags is
> > simply nonsense.
>
> This discussion began when I pointed out that the name attribute is
> deprecated in XHTML. This was later confirmed when someone pointed to
> the actual specification at
> <http://www.w3.org/TR/xhtml1/>, however
> there may be some confusion about the scope of the change. The
> applicable section is shown below. Apparently HTML 5 is planning to take
> a different path. Of course, nobody knows that for sure since the spec
> is far from complete and will likely be undergoing major changes for
> several more years.
>
> Bob McConnell
>
> -----8<------------------------------------------------
> 4.10. The elements with 'id' and 'name' attributes
>
> HTML 4 defined the name attribute for the elements a, applet, form,
> frame, iframe, img, and map. HTML 4 also introduced the id attribute.
> Both of these attributes are designed to be used as fragment
> identifiers.
>
> In XML, fragment identifiers are of type ID, and there can only be a
> single attribute of type ID per element. Therefore, in XHTML 1.0 the id
> attribute is defined to be of type ID. In order to ensure that XHTML 1.0
> documents are well-structured XML documents, XHTML 1.0 documents MUST
> use the id attribute when defining fragment identifiers on the elements
> listed above. See the HTML Compatibility Guidelines for information on
> ensuring such anchors are backward compatible when serving XHTML
> documents as media type text/html.
>
> Note that in XHTML 1.0, the name attribute of these elements is formally
> deprecated, and will be removed in a subsequent version of XHTML.
At the risk of injecting a little light into this discussion ;) note the
list of elements in the excerpt Bob provided: a, applet, form, frame,
iframe, img, and map. Almost all replies to date have referred to the name
attribute of the *form elements*: input, select, and textarea. Two
different sets of elements.
As far as I am concerned, the "authorities" are free to remove the name
attribute from the first set. I think it is safe to say that the name
attribute will not be removed from the *form elements* anytime soon.
For all with a holiday coming up this weekend, have a good one!
Kirk