i'm not too sure why you've put up the php - it's not a php issue. If you go to your site and view the source, save that source code to your hard disk as a html file, guess what? It doesnt work.
All the PHP does is generate HTML - if html is generated (which it clearly is) and nothing happens on the browser, then it's not a php problem, it's a problem with your html.
Your doctype has to come before you tell it which version of xml you're trying to use. and then when you validate it you get (currently) 50 errors, which is probably why it's not working properly - you've specified that the conformance is "strict": you've set the bar, you're going to have to rise to it.