Don Coyote has asked for the wisdom of the Perl Monks concerning the following question:
Hi.
Having some fun with CGI.pm html4 methods.
using CGI I do
use CGI qw/:html4 -no_xhtml/; print $q->(-dtd=>'//W3C//DTD HTML 4.01//EN');
1. Even though I import 4.01 in the dtd of the cgi object I still need to state -no_xhtml after importing CGI otherwise the xmlns namespace appears underneath the html4 strict dtd.
2. After excluding the xmlns namespace I cannot see how to append the html4 strict dtd url on to the dtd so that it reads as required that is
<"//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
If I try to print it by appending to the dtd like so
print $q->(-dtd=>"'//W3C//DTD HTML 4.01//EN' 'http://www.w3.org/TR/htm +l4/strict.dtd'");
then cgi.pm turns the dtd into the html4 transitional dtd. If I attempt to manually print the dtd prior to using cgi to construct the header the served html fails.
As I need to put this up onto a live server what I need to know is whether the address part of the dtd is important or not. And if it is is there a workaround (or method i'm missing), I kind of always assumed it was as important as the dtd declartion that precedes it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: cgi.pm -import strict html4 address into html4 strict dtd header
by Khen1950fx (Canon) on Nov 19, 2011 at 21:48 UTC | |
by MVS (Monk) on Nov 20, 2011 at 04:04 UTC | |
by Don Coyote (Hermit) on Nov 20, 2011 at 06:48 UTC | |
by Khen1950fx (Canon) on Nov 20, 2011 at 10:16 UTC | |
by Don Coyote (Hermit) on Nov 21, 2011 at 20:18 UTC | |
|
Re: cgi.pm -import strict html4 address into html4 strict dtd header
by ww (Archbishop) on Nov 19, 2011 at 21:04 UTC | |
|
Re: cgi.pm -import strict html4 address into html4 strict dtd header
by JavaFan (Canon) on Nov 19, 2011 at 19:09 UTC | |
by MidLifeXis (Monsignor) on Nov 20, 2011 at 02:02 UTC |