I'm a web developer who is increasingly using Vim to code web sites. Are there any HTML validation utilities (or techniques) out there that will take whatever file I'm working on and validate against its DOCTYPE without leaving the shell?
T
I'm a web developer who is increasingly using Vim to code web sites. Are there any HTML validation utilities (or techniques) out there that will take whatever file I'm working on and validate against its DOCTYPE without leaving the shell?
T
Try an XML validator with the appropriate Schema/DTD.
Here's a validator: http://xmlstar.sourceforge.net/
Various DTDs available here: http://www.w3.org/TR/xhtml1/dtds.html
You can write a script that wget the response from validator service (see http://validator.w3.org/docs/api.html for parameters). You can either just check the header of the response or parse the xml response and output the way you want it.
I'm interested in a solution that works in the shell, too. At the moment I use Firefox and the HTML Validator Plugin.
Get yourself tidy from sourceforge and execute it on the shell
tidy -errors -q -f error_file.txt the_file.html