by MikeGale » Fri Nov 10, 2006 5:45 pm
I have developed content generation code that emits valid XHTML. This is not too hard when you do it from the start of a project.
I have also simply not used pre-developed code and rolled my own, several times. This to avoid importing foul mark-up.
Having said the negative things there may be some hope. I suggest:
1) Get to know the code and check whether tag generation is easily fixable. (I have in the past taken large bodies of code, written by others, and transformed it within a few hours. This achieved using multipage search and replace including RegEx search and replace. What is now called refactoring.) It may be that this is all you need to fix the majority of the issues.
2) If you do that and find it does a lot of the job, it is worth contacting the core developers and trying to roll your changes into the master distribution.
3) An approach that I know works is to use tools that scan markup and fix it, before sending it to the browser. I've only done this with .NET and performance might make it impractical for PHP. My obervation is that even with a tool like Chris Lovett's SGMLReader, some custom code is needed.
4) I haven't seen the CSS you're using. With some CSS I have been able to fix it without changing the markup at all, and quickly. With others I've decided the work is just too much and left the bad design. (A widespread problem is CSS that uses fixed font sizes which cannot be changed by the user. These can be time consuming to fix.)