Date: Mon, 26 Jul 1999 19:19:37 -0400 (EDT) From: "Russell Steven Shawn O'Connor" <email@example.com> To: firstname.lastname@example.org Message-ID: <Pine.SOL.3.95q.990726190909.382Eemail@example.com> Subject: Re: doctype placement The validator can in general handle comments before the the doctype. Try this out yourself. It works fine. What the validator can't handle is the existance of the string matching the regex /<[a-z]/i. before the doctype So in the example given of <http://bumppo.net/lists/macperl/1999/07/msg00316.html> the problem lies in line <!--X-From: Charles Metz <firstname.lastname@example.org> --> ^^ Here This is obviously a known issue with the validator, because from the source code last if ( $line =~ /<[a-z]/i ); # found an element # @@ this needs to be fixed to handle commented-out markup # which appears before the doctype I was working on setting up nsgmls to automatically assume HTML 4.0 by adding the line DOCTYPE HTML4.dtd to my catalog. I can't remember how sucessful I was at this. Assuming it did work, with careful use of multiple catalog files at the commandline, I think you can get nsgmls to complain about the missing DOCTYPE and inserting it itself according to whatever heristic you want to use to choose the DOCTYPE. If I have time and I remember, I'll try to look into this tomorrow. -- Russell O'Connor email@example.com <http://www.undergrad.math.uwaterloo.ca/~roconnor/> ``And truth irreversibly destroys the meaning of its own message'' -- Anindita Dutta, ``The Paradox of Truth, the Truth of Entropy''