The spec says that it's not allowed to read and write from the same URI during a single transformation. This is basically because the order of execution is undefined, so you don't know whether your reading before writing or after writing.
If you want to, you can cheat: you can use different URIs that refer to the same resource, for example file:///c:/doc.xml and file:///C:/DOC.XML.
But why would you want to? Just write the document to a variable before doing the xsl:result-document, and then you can read it from the variable.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference