www.php.net homepage no longer validates as strict.
| From: | Richard Quadling | Date: | Fri, 09 Mar 2007 15:01:26 +0000 |
| Subject: | www.php.net homepage no longer validates as strict. | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-34617@lists.php.net to get a copy of this message | ||
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:
<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.
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!"
Index: index.php =================================================================== RCS file: /repository/phpweb/index.php,v retrieving revision 1.875 diff -u -r1.875 index.php --- index.php 1 Mar 2007 08:48:16 -0000 1.875 +++ index.php 9 Mar 2007 15:00:47 -0000 @@ -217,7 +217,7 @@ // DO NOT REMOVE THIS COMMENT (the RSS parser is dependant on it) ?> -<a name="5"></a> +<a id="news5" name="5"></a> <h1>PHP 4.4.6 Released</h1> <p> <span class="newsdate">[01-Mar-2007]</span> @@ -236,7 +236,7 @@ <hr /> -<a name="4"></a> +<a id="news4" name="4"></a> <h1>PHP 5.2.1 and PHP 4.4.5 Released</h1> <p> <span class="newsdate">[14-Feb-2007]</span> @@ -315,7 +315,7 @@ posted in the <a href="/downloads.php">download section</a>.</p> <hr /> -<a name="3"></a> +<a id="news3" name="3"></a> <h1>The front page has changed</h1> <p> <span class="newsdate">[08-Feb-2007]</span> @@ -327,7 +327,7 @@ <hr /> -<a name="2"></a> +<a id="news2" name="2"></a> <?php news_image('http://php.net/manual/en/','php-logo.gif','The PHP Manual'); ?> <h1>PHP Manual Updates</h1> <p> @@ -352,7 +352,7 @@ <hr /> -<a name="1"></a> +<a id="news1" name="1"></a> <h1>PHP 5.2.0 Released</h1> <p> <span class="newsdate">[02-Nov-2006]</span>
Index: index.php =================================================================== RCS file: /repository/phpweb/index.php,v retrieving revision 1.875 diff -u -r1.875 index.php --- index.php 1 Mar 2007 08:48:16 -0000 1.875 +++ index.php 9 Mar 2007 15:00:47 -0000 @@ -217,7 +217,7 @@ // DO NOT REMOVE THIS COMMENT (the RSS parser is dependant on it) ?> -<a name="5"></a> +<a id="news5" name="5"></a> <h1>PHP 4.4.6 Released</h1> <p> <span class="newsdate">[01-Mar-2007]</span> @@ -236,7 +236,7 @@ <hr /> -<a name="4"></a> +<a id="news4" name="4"></a> <h1>PHP 5.2.1 and PHP 4.4.5 Released</h1> <p> <span class="newsdate">[14-Feb-2007]</span> @@ -315,7 +315,7 @@ posted in the <a href="/downloads.php">download section</a>.</p> <hr /> -<a name="3"></a> +<a id="news3" name="3"></a> <h1>The front page has changed</h1> <p> <span class="newsdate">[08-Feb-2007]</span> @@ -327,7 +327,7 @@ <hr /> -<a name="2"></a> +<a id="news2" name="2"></a> <?php news_image('http://php.net/manual/en/','php-logo.gif','The PHP Manual'); ?> <h1>PHP Manual Updates</h1> <p> @@ -352,7 +352,7 @@ <hr /> -<a name="1"></a> +<a id="news1" name="1"></a> <h1>PHP 5.2.0 Released</h1> <p> <span class="newsdate">[02-Nov-2006]</span>