Q:

xslt skip branches based on specific attribute being empty

fairly new to xlst and trying to get my head around things.. 
Here is a sample of the source data (heavily trimmed as there is MB)
    <Chemical id="000023950" displayFormula="" displayName="">
    </Chemical>
    <Chemical id="000035676" displayFormula="C39-H45-N2-O6" displayName="Dimethyltubocurarine">
    </Chemical>
    <Chemical id="000036282" displayFormula="" displayName="INDEX NAME NOT YET ASSIGNED">
    </Chemical>

What I am trying to do is extract the displayname and the id of each chemical into a csv
Right now I can extract them using the below code - its pretty crude to be honest
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="text" />
  <xsl:variable name="FS">
    <!-- Field seperator -->
    <xsl:text>;</xsl:text>
  </xsl:variable>
  <xsl:variable name="LT">
    <!-- Line terminator -->
    <xsl:text>&#10;</xsl:text>
  </xsl:variable>
  <xsl:strip-space elements="*" />
  <xsl:template match="/">
    <xsl:for-each select="//Chemical">
        <xsl:text>&#34;</xsl:text>
      <xsl:value-of select="@displayName" />
      <xsl:text>&#34;</xsl:text>
      <xsl:text>&#44;</xsl:text>
      <xsl:text>&#34;</xsl:text>https://chem.nlm.nih.gov/chemidplus/sid/startswith/<xsl:value-of select="@id" />
      <xsl:text>&#34;</xsl:text>
      <xsl:text>&#44;&#34;nlm&#34;</xsl:text>
      <xsl:value-of select="$LT" />
    </xsl:for-each>
  </xsl:template>
</xsl:stylesheet>

My question is..
How can I skip branches that have the displayName attribute as "" or as "INDEX NAME NOT YET ASSIGNED"?
Thanks

A:

The <xsl:for-each> can be modified to 
<xsl:for-each select="//Chemical[@displayName != '' and @displayName != 'INDEX NAME NOT YET ASSIGNED']">

This will filter out the values of @displayName as required and just produce the output
Dimethyltubocurarine

