- From: Jukka K. Korpela <jkorpela@cs.tut.fi>
- Date: Mon, 12 Jan 2015 12:01:29 +0200
- To: www-validator@w3.org
2015-01-11, 13:33, WHP.Metselaar@planet.nl ẃrote: > Validating http://www.flyingred.nl/FRgames_programma.php > Error [338]: "cannot generate system identifier for general entity X" > > LS > In general the validator should not check any content in a href > parameter after the ? within a php-script. No, by definition it *must* treat the href attribute value according to general HTML principles, when performing XHTML 1.0 or XHTML 1.1 validation. In XHTML 1.0 and XHTML 1.1, the href attribute is declared with CDATA content, so a validator must treat it as an arbitraty string, checking only generic XML attribute syntax. This means that it must not contain any “&” character except as part of a character reference or an entity reference. Note that your DOCTYPE is in error, as the validator describes: “This document uses an inconsistent DOCTYPE declaration. The System Identifier http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd declares the XHTML 1.0 Transitional document type, but the associated Public Identifier -//W3C//DTD XHTML 1.1 Transitional//EN does not match this document type.” There is no XHTML 1.1 Transitional. The validator’s initial message “Errors found while checking this document as -//W3C//DTD XHTML 1.1 Transitional//EN!” is misleading. It echoes the Public Identifier in the DOCTYPE, even though it has ignored it and used the URL instead. > Often these parameters are provided by an external party or provided by > the designer. That’s irrelevant to what a validator must do, by definition. By XHTML rules, the only solution is to replace any occurrence of “&” in those attributes by “&” (or by an equivalent character reference). These rules also apply in XHTML linearization of HTML5. > Out of 111 errors and 47 warnings in script > http://www.flyingred.nl/FRgames_programma.php > at least 50% of remarks were related to the above mentioned cause. > This makes is very confusing to analyze and correct ones source and does > not encourage the upgrade to HTML5 If you intend to “upgrade to HTML5”, you have a long way to go and probably nothing to achieve. Consider using HTML5 if you ever *rewrite* the page. Editing pages to change their syntax from, say, an attempt at using XHTML 1.0 or XHTML 1.1 to either flavor (HTML or XHTML) of HTML5 is really an exercise in futility. But if you are going to do that, my practical advice is to change the DOCTYPE to <!DOCTYPE html> and to use http://validator.w3.org/nu/ which has a nice message filtering feature. You can selectively silence some messages, including the messages about “&” (which are rather irrelevant and formal) and messages about “obsolete” features, focusing on problems that may really matter (like nested <a> elements, wrong <table> structures, etc.). You can then deal with things like the “&” issue later, or simply decide to ignore it. Yucca
Received on Monday, 12 January 2015 10:01:59 UTC