« Return to Thread: How can I not include empty elements?

Re: How can I not include empty elements?

by Լեւոն Մկրտչյան :: Rate this Message:

Reply to Author | View in Thread


In reply to David A's comments, he has made a slight mistake in his reply when he says the text() function returns nodes that have text. This function will actually return to text node. You would probably want to do something like this:

<xsl:for-each select="//artits/artist">
        <xsl:if test="text()">
                <td><xsl:value-of select="node()" /></td>
        </xsl:if>
</xsl:for-each>
 
           .-.                    
                .-'``(|||)                                     Լեւոն Մկրտչյան
      ,`     `-`.                http://altjira.co.uk/
     /    '``-.   `
   .-.  ,       `___:
  (:::) :        ___
   `-`  `       ,   :
        / ,..-`   ,
      `./ /    .-.`
         `-..-(   )
               `-`



 « Return to Thread: How can I not include empty elements?