Your source document is not well-formed. I'm amazed you can get it past the XML parser, it should be rejected long before it reaches the XSLT processor. An XML declaration can appear only at the start of the file, and a processing instruction cannog have the name "xml" (See section 2.6 of the XML rec, production rule 17).
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference