Wednesday, November 14, 2007

Return the XML input document

This XSLT document will return a copy of the input, usefull if you do not know the structure of the XML which you need to transform:


<?xml version="1.0" encoding="UTF-8"?>
<?xml:namespace prefix = xsl /><xsl:stylesheet fo="http://www.w3.org/1999/XSL/Format" xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output declaration="yes" encoding="utf-8" indent="yes" method="html">
<xsl:template match="/">
<xsl:apply-templates select="*@*node()comment()processing-instruction()">
</xsl:template>
<xsl:template match="*@*node()comment()processing-instruction()">
<xsl:copy>
<xsl:apply-templates select="*@*node()comment()processing-instruction()">
</xsl:copy>
</xsl:template>
</xsl:stylesheet></p>
</xsl:apply-templates></xsl:apply-templates></xsl:output>

No comments: