title: XSLT match all nodes & Ignore a specific node
body: <p>I have an XSLT and i wanted to copy all the elements under a specific node with the exception of one particular node. The reason i am ignoring this node is, i need to check if node exists in xml &amp; if it doesn't then i need to set a default value. Here is the code snipette i have &amp; it doesn't seem to work</p>
  
  <p>I have couple other templates in XSLT &amp;  i included mode so i can specifically use this for a particular node</p>
  
  <pre><code>&lt;xsl:template match="*" mode="copyexcludingDL"&gt;
       &lt;xsl:copy&gt;
      &lt;xsl:apply-templates select="@*|node()[not(self::DriversLicense)]"/&gt;
    &lt;/xsl:copy&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>Here is the Node &amp; the logic</p>
  
  <pre><code>&lt;xsl:for-each select="Vehicle"&gt;
    &lt;xsl:apply-templates mode="copyexcludingDL" select="."&gt;
      &lt;xsl:choose&gt;
          &lt;xsl:when test="DriversLicense"&gt;
              &lt;xsl:apply-templates mode="copy" select="DriversLicense" /&gt;
          &lt;/xsl:when&gt;
          &lt;xsl:otherwise&gt;
              &lt;xsl:element name="DriversLicense"&gt;
                  &lt;xsl:text&gt;None&lt;/xsl:text&gt;
              &lt;/xsl:element&gt;
          &lt;/xsl:otherwise&gt;
      &lt;/xsl:choose&gt;
    &lt;/xsl:apply-templates&gt;
  &lt;/xsl:for-each&gt;
  </code></pre>