Given this source XML document:
<p xmlns="http://example.com/one" xml:lang="de" author="Friedrich von Schiller">
Freude, schöner Götterfunken,<br/>
Tochter aus Elysium,<br/>
Wir betreten feuertrunken,<br/>
Himmlische, dein Heiligtum.</p>
I try to transform it with the following XSLT 3.0 transformation:
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output omit-xml-declaration="yes" indent="yes"/>
 <xsl:strip-space elements="*"/>
 <xsl:template match="/">
   <xsl:sequence select=
When run with axon-EE, the result is:
Saxon-EE from Saxonica
Java version 1.7.0_25
Using license serial number XXXXXXXXX
Generating byte code...
Stylesheet compilation time: 291 milliseconds
Processing file:C:/Program%20Files%20(x86)/Java/jre7/bin/marrowtr.xml
Using parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
Building tree for file:/C:/Program%20Files%20(x86)/Java/jre7/bin/marrowtr.xml using class net.sf.saxon.tree.tiny.TinyBuilder
Tree built in 3 milliseconds
Tree size: 10 nodes, 106 characters, 2 attributes
Error on line 1048575
  XTDE0420: Cannot create an attribute node (xml:lang) whose parent is a document node
Transformation failed: Run-time errors were reported
I understand that we cannot create an attribute node for a document node, however the transformation has far less than 1048575 lines.
In a larger transformation, it wouldn't be easy for the user to locate exactly where the reported error happens.
Hope it isn't too difficult to fix this issue.

Dimitre Novatchev
Truly great madness cannot be achieved without significant intelligence.
To invent, you need a good imagination and a pile of junk
Never fight an inanimate object
To avoid situations in which you might make mistakes may be the
biggest mistake of all
Quality means doing it right when no one is looking.
You've achieved success in your field when you don't know whether what you're doing is work or play
Facts do not cease to exist because they are ignored.
Typing monkeys will write all Shakespeare's works in 200yrs.Will they write all patents, too? :)
I finally figured out the only reason to be alive is to enjoy it.