I am new to xslt and hoping to get answer for this.
I have a xslt file and use it to write a csv. First time writing to csv, i would like to have a header. But when I append for next content of csv, I would like to remove the header.
Below is the current xsl. How do I make the xsl template to be optional to display?
<xsl:template name="Header" match="/">
<xsl:text>Id,Barcode,Name</xsl:text>
<xsl:apply-templates select="abc:Info/Panel" />
</xsl:template>
<xsl:template name="Panel" match="abc:Info/Panel">
<xsl:for-each select="Board/Component">
<xsl:value-of select="../../../../../@Id"/>
<xsl:text>,</xsl:text>
<xsl:value-of select="../../../../../@Barcode"/>
<xsl:text>,</xsl:text>
<xsl:value-of select="../../../../../@Name"/>
<xsl:text>,</xsl:text>
</xsl:for-each>
</xsl:template>