Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Re: XHTML Strict?

by peschkaj (Pilgrim)
on Nov 04, 2002 at 04:28 UTC ( [id://210121]=note: print w/replies, xml ) Need Help??


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

The Doctype is incorrect. CGI produces the XHTML-Basic Doctype, however it also places a lang attribute in the html tag, thus invalidating the XHTML-Basic doctype.

I would prefer to not have to install more modules on the system that I am on. I'm using HP-UX at work and every module that I need to install requires writing up a change request form and scheduling a migration date so that I can get a hold of root to do my installs.

If you make something idiot-proof, eventually someone will make a better idiot.
I am that better idiot.

Replies are listed 'Best First'.
Re: Re: Re: XHTML Strict?
by davorg (Chancellor) on Nov 04, 2002 at 09:43 UTC

    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

      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);
      It's realy old post, but I foun it now. "XHTML Strict" and "XHTML Transitional" DO NOT mean the same.
Re: Re: Re: XHTML Strict?
by thraxil (Prior) on Nov 04, 2002 at 04:41 UTC

    there's nothing stopping you from installing modules yourself. you just can't put them in the main library.

    tar zxvf SomeModule.tar.gz cd SomeModule perl Makefile.PL PREFIX=/some/directory/you/can/write/to make make install
    and then, in your code:
    use lib qw(/some/directory/you/can/write/to); use Some::Module;

    anyway, having HTML::Template or Template::Toolkit installed are probably well worth whatever paperwork you have to go through.

    anders pearson

Re: Re: Re: XHTML Strict?
by jryan (Vicar) on Nov 04, 2002 at 07:21 UTC
    If it really bothers you, you can always modify CGI.pm's source code. :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://210121]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-20 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found