From: michael libby Date: 2002-08-08T08:54:01+09:00 Subject: Re: XHTML output -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday 07 August 2002 15:54, Wakou Aoyama wrote: > On Wed, Aug 07, 2002 at 10:14:53PM +0900, > Francois GORET wrote: > > I would like to have CGI.rb outputs XHTML 1.0 code. Anybody did it > > already ? > I am testing it. > http://www.ruby-lang.org/~wakou/lib/test/ [snip] > require "html/xhtml1" > html = HTML::XHtml1.new(:check=>$DEBUG, :pretty=>$DEBUG, :cgi=>cgi) do > html do > head{ title{"TITLE"} } > body do > h1{"head 1"} > p do > "some text" > end > p do > pcdata(:escape){" is "} [snip] > $ cat test.rb > require "html/xhtml1" > > HTML::XHtml1.new(:check=>true) do > html do > p do > end > end > end > > $ ruby test.rb > test.rb:6 > undefined method `p' for # > You can use these elements here. > head, body I love all this-- especially the validation against the DTD! Is it something that can/will be rolled into the core CGI module when the testing is complete, so that those of us using CGI can simply change from cgi = CGI.new("html4") to cgi = CGI.new("xhtml1") ? side question: is there any way to force the existing CGI module to output tags and attributes in lowercase? - -michael ++++++++++++++++++++++++++++++++++++++++++ Michael C. Libby public key: http://www.ichimunki.com/public_key.txt web site: http://www.ichimunki.com ++++++++++++++++++++++++++++++++++++++++++ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9UbCk4ClW9KMwqnMRAixDAJoD9lvFf/ShiegMFGldRpH5vaXPCACglIf7 k81KYvxJUYkxI6Qi4Y1wMZY= =yF0G -----END PGP SIGNATURE-----