From: Terje Bless <email@example.com> To: W3C Validator <firstname.lastname@example.org> Date: Tue, 10 Oct 2000 06:21:50 +0200 Message-ID: <email@example.com> Subject: [PATCH] DOCTYPE Override('binary' encoding is not supported, stored as-is)
Well, since Peter just couldn't leave well enough alone but just /had/ get me started on this; here is a patch that adds a DOCTYPE override function to the Validator. :-) A couple of points: * This is seriously nasty code! Testing is essential before it should be used in production. It's also a quick hack and it will have to be completely rewritten at some point. You have been warned. * It requires HTML::Parser. The corollary being that I dump all the nitty details on HTML::Parser so if HTML::Parser chokes on something, we blow up too. * In addition to the patch, I've attached a necessary configuration file for mapping version names to DOCTYPE declarations. The flip side is that HTML::Parser looks to work great (for HTML!) so we can probably soon ditch all that skanky code that deals with content sniffing (charset, META elements, DOCTYPEs, you name it) and use HTML::Parser callbacks instead. We're fucked if we get fed XML, of course, but XML support isn't that great in any case. For starters we can disable the stuff for XML and then look at using XML::Parser to provide equivalent functionality. XML support needs to be revised as soon as I can find a decent XML parser that groks Schemas, but that's a whole new ball game. Anyways, gotta go. It's 6am up here on the North Pole and I'm supposed to be at work in two hours. I should know better then to start looking at interesting problems after 8pm... :-(  - And when I say "all" I really mean *all*. :-)  - For certain odd definitions of the word. :-) -- By definition there is *no*way* any problem can be my fault. Any problems you think you can find in my code are all in your imagination. If you continue with such derranged imaginings then I may be forced to perform corrective brain surgery... with an axe. - Stephen Harris <firstname.lastname@example.org> in asr.