开发者

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> 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜