Upgrading to XHTML

It's 2003 and time to leave behind netscape 4.x. I decided to upgrade my entire site to XHTML 1.0 strict.

The advantages of XHTML are that it is the markup of choice for embedded browsers in handheld devices, phones etc. Although slightly more fiddly to write, it's easier to parse, verify and is likely to be around for ever.

Conversion was surprising easy as my site was already coded in HTML 4.01 strict. The right tool for the job is HTML tidy, this is available through a link on the w3c site,

#!/bin/bash

TIDYOPTS_XHTML="-latin1 -asxhtml -quiet -indent";
WEBFILEPATTERN="*.php"

find . -name $WEBFILEPATTERN -exec tidy $TIDYOPTS_XHTML -modify {} \; &> error.log