Thank you all,
Some replies on different points
I have improved performance by using an xsl:variable at the top of my
xslt
and give it the value of document(...). Later on you just refer to the
variable.
It's a Xalan problem, it got a bugzilla id, but it's scheduled to be fixed
at
For the same problem I'm using this pure XSL solution
xsl:template match=* priority=-1 mode=copy
xsl:element name={name()}
xsl:copy-of select=@*/
xsl:apply-templates mode=copy/
/xsl:element
/xsl:template
xsl:template match=text() mode=copy