Well I pretty soon discovered that the code that PayPal supplies does not validate out of the box.
But after a bit of massaging I finally got it to validate just fine, using some of the tips in this thread.
Sharing my experience in general use of Internet and the web and web 2.0 applications.