Hide blanks cells XSLT
I have the following input XML:
figure2 Support Support Support
I need to hide the PARTNUMBE开发者_如何学GoR column if the Table element has any column with "SPECIALMATERIAL" in its Class attribute; Secondly, I need to insert a new row just after the"figure" tag row. In this case new row should come at 2nd position.
Here is the code that does this (if I understood you request correctly):
<xsl:template match="table">
<xsl:for-each select="row[cell/@class = 'SPECIALMATERIAL']">
<tr>
<xsl:for-each select="cell[normalize-space(.)]">
<th><xsl:value-of select="."/></th>
</xsl:for-each>
</tr>
</xsl:for-each>
</xsl:template>
精彩评论