开发者

Hide blanks cells XSLT

开发者 https://www.devze.com 2023-02-21 17:47 出处:网络
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\" i

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

精彩评论

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

关注公众号