Forum Moderators: open

Message Too Old, No Replies

Counter problems with html 4.01 Strict

         

vkaryl

11:42 pm on Feb 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm hoping someone here will know either a definitive fix or a least a usable workaround for this problem.

I'm in the process of re-coding all my various websites' various pages (numbers in the hundreds all told) to 4.01 Strict, and will probably go on to re-coding the websites totally in CSS in the next few months (as I have the time - day jobs are the PITS!) I'm not actually having much real trouble with this - BUT. There's always one, isn't there?

I've used Muhammed A. Muquit's counters (http://www.muquit.com/muquit/software/Count/Count.html) for years - free, fast, easy to install, easy to configure, easy to customize. However, in the newer html specs such as I'm trying to migrate to, the <img> that is the counter itself produces a HOST of errors, and there seems to be no way around it. Here's one error-list....

Line 53, column 161: cannot generate system identifier for general entity "ff"
Line 72, column 54: cannot generate system identifier for general entity "dd"
Line 72, column 59: cannot generate system identifier for general entity "trgb"
Line 72, column 71: cannot generate system identifier for general entity "srgb"
Line 72, column 83: cannot generate system identifier for general entity "prgb"
Line 72, column 95: cannot generate system identifier for general entity "ft"

... and here's the code which generated it: <img src="http://www.example.com/cgi-bin/Count.cgi?df=uhrcount.dat&dd=F&trgb=000000&srgb=ffffff&prgb=303D33&ft=0">

With the counter in place, pages will NOT validate to 4.01 Strict, and in some cases will not validate to 4.01 Transitional either (and in any case, that's not a spec I'm interested in).

I've tried various "javascript" counters, most of which either are far less usable than Muquit's, or have validation problems of their own. BTW, I did email Mr. Muquit regarding the problem: his response was basically that it was stupid of W3C to cause this situation.... *sigh*

I'd be perfectly happy to pay something for a counter that didn't cause me these problems! Any ideas, anyone?

[edited by: tedster at 6:58 am (utc) on Feb. 2, 2004]

encyclo

11:59 pm on Feb 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try replacing each instance of & with &amp; in the URL - that should fix the validation problem. If you don't use &amp; the validator thinks you're using a character entity such as &copy; or &eacute; and it chokes because it doesn't recognise the entity as being valid.

It is not the W3C's fault, either - ampersands have a specific use in HTML and should not be used for other purposes without using &amp; to indicate that you are not declaring a character entity.

vkaryl

12:37 am on Feb 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



OHMIGOSH. How simple can one person be? I didn't even TUMBLE to the fact that the ampersand was the problem! Jeez.... brain rot....

Though I actually had to use "¦" instead of the ampersand etc. But it works like a charm, counts properly, AND validates, so I am ONE HAPPY CAMPER!

(I didn't even consider that it WAS W3C's fault - that was a quote from the other "counterguy"....)

Thanks. You are a PRINCE, and I certainly hope your princess arrives shortly!