[PATCH] DOCTYPE Override

From: Terje Bless (link@tss.no)
Date: Tue, Oct 10 2000

  • Next message: Terje Bless: "Re: sugggestion: HTML 4.01 as default"

    From: Terje Bless <link@tss.no>
    To: W3C Validator <www-validator@w3.org>
    Date: Tue, 10 Oct 2000 06:21:50 +0200
    Message-ID: <20001010062314-r01010600-ab5e0e29@10.0.0.2>
    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[0] 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[1] 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... :-(
    
    
    
    [0] - And when I say "all" I really mean *all*. :-)
    [1] - 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 <sweh@spuddy.mew.co.uk> in asr.