Vaska,

The answer is simple. Your URLs contain ampersands (&), which are a character which cannot be used directly in HTML. Why? Because it's used for entities, like & and © and —.

Without boring you with the details, you need to use "?month=4&year=2004&a=Home", not "?month=4&year=2004&a=Home" to pass validation (hence write well-formed HTML).

No, the validator is not broken or wrong.
Yes, I know every book tells you to use a plain ampersand.
Yes I know it works in most browsers and situations today, but plain ampersands are not correct :)


If it's a huge deal to re-write your application at this point, you might consider writing a quick function (in PHP, I'd use ob_start() with a call back function with a regex to replace all the problematic ampersands in URLs on the way to the browser), but your mileage may vary. You're better off getting it right now, rather than relying on such a beast.

Justin


On 13/05/2004, at 1:03 AM, Vaska.WSG wrote:


It's frustrating as it can be very difficult to find information about these things via Google.
Anyways, I'm getting alot of error messages when I validate - in particular I'm getting messages like this:


7. Line 50, column 40: cannot generate system identifier for general entity "year"
<td class="calndrHdr"><a href="?month=4&year=2004&a=Home">&laquo;</a></td>

[snip]


Oi vey, wondering what I'm doing with this stuff anymore...
Can somebody shed some light on these messages?

--- Justin French http://indent.com.au

*****************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
*****************************************************




Reply via email to