Forum OpenACS Development: Re: Checks for HTML standard compliance
The WDG html validator meets the FOSS requirement and might meet the other requirements, too.
The previous link explains difference between W3C html validator and WDG one.
Here is a link to the license message and code:
Since it is written in perl, perhaps it will work with nscgi.