I've written the following stylesheet to copy an existing XML. during testing, i noticed that the DOCTYPE was not copied at all and the XML encoding defaultet to UTF-8 (though the original XML has ISO-8859-1). to fix this, i have to set the encoding and doctype-system hard coded:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- adjust doctype-system to generate a different DOCTYPE SYSTEM value: -->
<xsl:output method="xml" encoding="ISO-8859-1" doctype-system="mine.dtd"/>
<!-- copy nodes: -->
<xsl:template match="node()|@*" >
<xsl:copy>
<xsl:apply-templates select="node()|@*" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
but this results in a specialized copy-XSL. is there a generalized way to copy a XML with
all content (including <! and <? tags, etc.)? (of course,