You just need to use the identity template (as you used), and then use the template corresponding to the DataSeriesBodyType, which does nothing.
The code:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" encoding="utf-8" indent="yes"/> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()" /> </xsl:copy> </xsl:template> <xsl:template match="DataSeriesBodyType" /> </xsl:stylesheet>
If you want to normalize the output to remove empty text nodes, add the following template to the previous stylesheet:
<xsl:template match="text()"> <xsl:value-of select="normalize-space()" /> </xsl:template>
Pablo poso
source share