Clarification: Thanks for the suggestions of tools for validating XHTML. I'm primarily looking for a solution that will run server side (or on the client with jQuery) so i can set it and forget it during development - and get told when I have issues without having to run a tool all the time.
All this tag soup stuff scares me with ASP.NET MVC !!
I'd be less scared if I could validate each and every view coming out of my view generator for XHTML compliance. This is especially important with the amount of jQuery I am planning on writing. i dont want to spend hours debugging something just to find out I had an unclosed tag somewhere that prevented a selector from working.
What options are there for this. Off the top of my head I'm looking for solutions like the following, but not sure which of these are practical:
- JQuery XHTML checker
- IIS filter
- Browser plugin (I assume theres something for Firebug plugin to do this)
- Doing something clever with the MVC View classes (I'm not sure if this is possible or worthwhile persuing).
- Modifying the HTML writer to check on 'flush()' and throw an exception if the output is not XHTML.
- ASP.NET configuration option I'm not aware of to validate the page.
All options welcome answers !
I'd prefer a server side technology so during debugging I can throw a hard exception, and in production I can log any errors. It must validate the full page after the master page has been applied. Looking for warnings in the IDE is not a good enough solution!