Monday, March 5, 2012

XSLT development– display XML

While working on a xslt project, got to know about this xslt file which lets you output the xml as is. This is excellent for debugging purposes to see what xml the xslt file gets to work on.

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >

<xsl:output method="xml" indent="yes" />

<xsl:template match="/ | @* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>