Output and Error Message Control # """validate_w3(FILE, ERRS): validate FILE using validator.w3Print errors and warnings to the stream ERRS (which defaults to sys.stderr) using gcc's "brief format": "FILE: LINE: COLUMN: MESSAGE".
Luckily a few programmers out there have already tackled the problem, with Will Holcomb’s Multipart Post (as modified by Brian Schneider to support Unicode) the best of the solutions I looked at.
So with that in hand, the rest of it is a straightforward application of # # USAGE # # FILE # # Uploads FILE to the World Wide Web Consortium's validation service, # parses the results, and writes out errors and warnings on stderr in # gcc's "brief format"  for easy parsing by the "next-error" # command in Emacs.
A program to allow you to run your XHTML document through the W3C validator and step through the errors and warnings conveniently in Emacs, and a brief discussion of why someone might want to do this.
If, like me, you often write documents directly in , then you probably find that it’s hard to write correct markup.
The first thing I do when checking for the source of a site's errors is to 'rule out' possible sources.
As I know in the case of a site with a Joomlashack template that the template is not the cause, I check that one off.But if you want to do automated processing on your documents, or care about other people’s ability to do automated processing on your documents (for example, people using screen readers) it helps if they are valid.Or you might just care about the quality of your work.# # NOTES # # Uses Multipart Post [2,3] to encode the file using # the MIME type multipart/form-data  for upload.# # REFERENCES # #  "GNAT User's Guide", section 3.2.1.The Validation Services runs the presented 'page' against the standards and outlines the errors on the presented 'page', but in our instance the items on our 'page' could come from any number of sources.