On Jul 19, 2005, at 1:35 PM, Russ Allbery wrote:
Scott R Godin <[EMAIL PROTECTED]> writes:
Sending XHTML as text/html means the browser is expecting tag-soup.
NOT
XHTML..
This is not true if you use XHTML 1.0. Try it in Firefox. You'll see
that the browser reports that it's in standards compliance mode.
I recommend Appendix C of the XHTML spec:
HTML Compatibility Guidelines
<http://www.w3.org/TR/xhtml1/#guidelines>
That being said, there really isn't much of a reason to use XHTML
rather
than HTML 4.0 unless one just wants to for personal reasons. I use it
for
my own reasons, but it's primarily as a science experiment, and it's
probably not the right mode to run general software in.
I've been developing an HTML output library that I use with mod_perl
for my work. Its usage rather resembles the functional interface of
CGI, but the output is a hierarchical structure of Perl 5 objects.
Calling the root's (or any node's) Print method pretty-prints the
entire document (or just that node). Currently it generates XHTML, but
it would be trivial to adjust it to produce HTML 4 instead. This
decision could be made at runtime through a parameter to Print.
This would be a way to separate the production of an HTML document
structure from the actual markup generation. If somebody's interested,
I'll post it.
Josh
--
Joshua Juran
Metamage Software Creations - Mac Software and Consulting
http://www.metamage.com/
* Creation at the highest state of the art *