If you've been good and included your doctype at the top of your XML document, libxml will by default try to validate your document against it.
If you're transforming XHTML, you're going to need the XHTML W3C DTD. If you're using Ubuntu, you can download the catalogs by:
sudo apt-get install w3c-dtd-xhtml
If not you're going to have to understand a little bit about libxml.