Subject: | XHTML should be auto-disabled for HTML 4 too, not just 2 and 3 |
Hi, Lincoln. The documentation for -no_xhtml includes "If
start_html()'s -dtd parameter specifies an HTML 2.0 or 3.2 DTD, XHTML
will automatically be disabled without needing to use this pragma.".
Why does that only occur for HTML 2 and 3? It should occur for HTML 4
as well. Otherwise you get HTML validation errors for the
xmlns="http://www.w3.org/1999/xhtml" and xml:lang="en-US" attributes of
the <html> tag. Those attributes ought to only appear if you're
actually using an XHTML DTD (either as the default, or explicitly).
I have a script I make available to others to use on their sites, and
I'm trying to write it so that users can select their desired HTML
output type via a DTD setting, but I'm forced to disallow XHTML because
I have to use the "use CGI qw(-no_xhtml)" pragma to allow HTML 4 to
validate...