Re: www.php.net homepage no longer validates as strict.
| From: | Hannes Magnusson | Date: | Wed, 14 Mar 2007 14:19:05 +0000 |
| Subject: | Re: www.php.net homepage no longer validates as strict. | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-34684@lists.php.net to get a copy of this message | ||
On 3/9/07, Richard Quadling <rquadling@googlemail.com> wrote:
Well, it does via http://validator.w3.org/check?uri=http%3A%2F%2Fwww.php.net&charset=%28detect+automatically%29&doctype=XHTML+1.0+Strict&outline=1&No200=1&verbose=1, but in FF with HTML Validation I get ... Result: 0 errors / 5 warnings line 219 column 1 - Warning: <a> cannot copy name attribute to id line 238 column 1 - Warning: <a> cannot copy name attribute to id line 317 column 1 - Warning: <a> cannot copy name attribute to id line 329 column 1 - Warning: <a> cannot copy name attribute to id line 353 column 1 - Warning: <a> cannot copy name attribute to id Info: Doctype given is "-//W3C//DTD XHTML 1.0 Strict//EN" Info: Document content looks like XHTML 1.0 Strict and the information against the warnings is ... ... cannot copy name attribute to id Cause: In XHTML, the "name" attribute has been deprecated and replaced by the "id" attribute. If you want to keep both tags for compatibility reason, name and id, the values should be the same. This error is generated when only the name exists and that tidy try to copy the value of the name in the id attribute. But an "id" must begin with a letter ([A-Za-z]). Example: Bad:What exactly is wrong with the feed? AFAIK 99% browsers implement fragments for name attributes, but only a couple of them support ids as fragments, even when served as xhtml strict....<a name="123456">...</a> <a id="123456">...</a>Good:<a id="my_link">...</a> <a id="my_link" name="my_link">...</a>Solution: Use "id" instead of "name" or use both with same values. References: XHTML W3c spec: name attribute: http://www.w3.org/TR/xhtml1/#h-4.10 XHTML W3c spec: name and id http://www.w3.org/TR/xhtml1/#C_8 ID W3C spec: http://www.w3.org/TR/html4/types.html#h-6.2 So, whilst the names are OK, they fail to become IDs. I have a patch for the index.php, but I can't see what generates news.rss to be able to provide a patch for that.
Either the names become ID friendly, or IDs are added which are valid (id="news1" name="1" sort of thing). If the IDs are added, then no other changes are required. If the names are changed, then I expect the rss generator to have to be updated to be aware of the new name format.The current RSS generator (and "news system") are about to be removed and replaced with more logical structure. I appreciate the heads up though and will fix it in the 'new version'. -Hannes
Regards, Richard Quadling. -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!"