Forum OpenACS Development: We should make OpenACS comply with an HTML/XHTML document type

To be able to be validated, each HTML document should have a leading doc type declaration. Jeff has set the doc type in our default master to be 4.01 transitional in response to this bug report by Vinod Kurup.

So on the 4.6 branch our doc type is 4.01 transitional by default, but I doubt that anyone has actually checked that all pages are compliant. I'm also not sure we will put effort into enforcing such compliance on that branch.

On cvs head (OpenACS 5.0) I changed the default master to take a doc_type argument so that packages can choose a stricter document type. For the Logger I am experimenting with enforcing XHTML 1.0 strict.

I am posting primarily because I wanted to remind developers of the issue of web standards compliance (HTML/CSS) and to encourage them to use the W3C validator on their pages now and then.

Ideally I would like to make Tclwebtest use the W3C validator and set up test cases to crawl all pages in an installation and make sure that all our core packages and supported applications are at least compliant with HTML 4.01 transitional. The question of course is if we shouldn't shoot for XHTML 1.0 strict while we're at it... That's at least what I will be doing for the applications I develop.

If you're going to take the XHTML plunge (which I heartily recommend), you may as well plunge as far as XHTML 1.1. The differences from XHTML 1.0 (Strict) are almost too minimal to worry about:
http://www.w3.org/TR/xhtml11/changes.html#a_changes
Peter, you are propably already aware of the fact that tclwebtest can run the validator 'tidy' on the result pages. I just saw this thread and added a -tidy switch to the tclwebtest commandline (in cvs).

Example output:

tils@tp:~/tclwebtest$ ./tclwebtest -tidy selftest/select_many.test

----- START: selftest/select_many.test at [30/May/2003:21:20:52] -----
--- do_request for file://selftest/select_many.html
--- TIDY START                  ---
line 12 column 5 - Warning: <form> attribute "action" lacks value
line 28 column 6 - Warning: <form> attribute "action" lacks value
line 58 column 6 - Warning: <form> attribute "action" lacks value
--- TIDY FINISH. WARNINGS. URL: file://selftest/select_many.html ---
V: {second option} 1
----- SUCCESS: selftest/select_many.test (took 0s)               -----

DURATION: 0
tils@tp:~/tclwebtest$

If you're considering switching to XHTML, this may be worth your while reading. http://www.hixie.ch/advocacy/xhtml