Struts and XHTML
There's an interesting thread over on the struts-dev mailing list. It started out debating whether to use comments (<!-- -->) or CDATA (<![CDATA[ ]]>) to hide Javascript code. I think this discussion was started by something I suggested yesterday on the struts-user list. Craig McClanahan had this to say:
What I also don't understand is why anybody is worried about generating XHTML markup for the current generation of popular browsers, none of which implement it correctly ... but that's a different issue.
What do you think? I think the best reason for generating XHTML (at this point) is that adding an XHTML doctype at the top of a page makes IE and Mozilla "snap" to standards-compliant mode. Rather than writing tweeks for each browser - the same code works in both. This is a real lifesaver when doing CSS positioning and DOM-based Javascript in pages. It's also really nice to be able to validate code.