Friday, November 16th, 2007...8:56 am
Validate HTML On Your Mac Localy
If you are new to the site, sign up for the RSS Feed. All new sign ups get punch and pieRSS feed. Thanks for visiting!
Although it is easy to find sites that can validate your HTML code, sometimes you might not want to use them. Maybe the page cannot go outside a firewall, or your company doesn’t allow you to submit the code to an external site.
Apple suggests an easy way to validate your HTML, just like you would anywhere else, except that the services will be hosted within your network. Here’s how you can achieve this:
Source: www.mactips.org
1. Install Xcode Tools 1.5 or higher, if you don’t have it already.
2. Download the following files: http://validator.w3.org/validator.tar.gz, http://validator.w3.org/sgml-lib.tar.gz
3. Decompress the files inside a new folder–> /Library/WebServer/Documents/validator/
4. Edit the validator.conf file: write your e-mail address on line 73, your URL on line 77, /Library/WebServer/Documents/validator on line 24, and change ‘SGML Parser’ from ‘/usr/bin/onsgmls’ to ‘/sw/bin/onsgmls’ on line 37.
5. Copy it to this location:
macosx:~ macosx$ cd /etc
macosx:/etc macosx$ sudo mkdir w3c
macosx:/etc macosx$ cd w3c
macosx:/etc/w3c macosx$ sudo cp /Library/WebServer/Documents/validator/htdocs/config/*.* .
6. Add to the httpd.conf file:
<Directory /Library/WebServer/Documents/validator/htdocs>
Options ExecCGI IncludesNOEXEC Indexes MultiViews
AllowOverride None
AddHandler server-parsed .html
AddCharset utf-8 .html
</Directory>
<Location “/validator/htdocs/check”>
SetHandler cgi-script
</Location>
7. Install Fink and OpenSP.
Done. Your working validator is now at http://localhost/validator/htdocs/
Html code, HTML validator, Mac Faqs, Mac Tips, mac websites
Leave a Reply