in reply to Re: Re: XHTML Strict?
in thread XHTML Strict?

Which version of CGI.pm do you have? With the latest version (2.89), I get this:

$ perl -MCGI=:standard -le 'print header, start_html' Content-Type: text/html; charset=ISO-8859-1 <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-U +S"><head><title>Untitled Document</title> </head><body>

which looks right to me.

The list of changes includes this:

Version 2.81

  1. Removed extraneous slash from end of stylesheet tags generated by start_html in non-XHTML mode.
  2. Changed behavior of CGI::Carp with respect to eval{} contexts so that output behaves properly in mod_perl environments.
  3. Fixed default DTD so that it validates with W3C validator.
--
<http://www.dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Replies are listed 'Best First'.
Re^4: XHTML Strict?
by CamelDung (Novice) on Jan 07, 2010 at 09:14 UTC
    Greetings Monks,
    While this thread is a bit dated, I'm trying to figure out how I might choose which version of XHTML get's produced. I've read (and searched), and experimented for quite some time. But haven't found the magic. As it is, I'm provided with Transitional. I have no reason not to choose Strict, except I don't know how. <sheepish grin>

    For the record:
    $CGI::VERSION='3.48';

    Thank you for all your time and consideration.

    EDIT:
    OK, I did a little more digging in my copy of CGI.pm, and found my own answer. Seems version 3.48 simply commented out XHTML Basic 1.0, and pasted in XHTML 1.0 Transitional, but that's it - as far as the "upgrade" goes.

    Solution:
    I simply commented XHTML 1.0 Transitional, and pasted my own upgrade in. :)
    Maybe v.3.49 will provide a "Strict" option. Till then, I'll live with my HACK.

    --
    use qw(:perl:always);
    use qw(:perlmonks:daily);
Re^4: XHTML Strict?
by Anonymous Monk on Nov 16, 2006 at 16:37 UTC
    It's realy old post, but I foun it now. "XHTML Strict" and "XHTML Transitional" DO NOT mean the same.