Removed possibile infinite recursion in <xsl:template match="graphic|inline-graphic|media">.
Fixes to XML wrapper to validate against http://www.mediawiki.org/xml/export-0.7.xsd
Fixed bug which added extra, empty xmlns attribute to child elements when transforming with xsltproc.
Escaped XML tags in references and footnotes for valid output.
Now output is valid against http://www.mediawiki.org/xml/export-0.8/, added <username>Daniel Mietchen</username> under contributor (username is not required by the schema, but Special:Import results in a blank article if you don't have it!).