[xsl] output node-set

Subject: [xsl] output node-set
From: 04083259@xxxxxxxxxxxxx
Date: Fri, 1 Apr 2005 19:49:27 +0100 (BST)
hi

i got the following xml database result from a privious transformation
which contains some  empty nodes :


<top>
   <dig></dig>
   <MTo><MTo>
   <dig></dig>
   <dig>06767</dig>
   <dig>3712</dig>
   <CCTo><CCTo>
   <dig></dig>
   <dig>40</dig>
   <dig>48</dig>
   <dig>120</dig>
   <nondig>-000</nondig>
   <nondig>87</nondig>
   <nondig>8768</nondig>
 </top>


and i am trying from the following template to transform the above
database to a form where we get red of all the empty <dig> elements only
but it has a problem which  i can not figure what was it




 <xsl:template match="path">
 <xsl:for-each select="*">
<xsl:choose>

 <xsl:when test="'self::dig'">
 <xsl:copy-of select="dig[node()]"/>
 </xsl:when>

<xsl:when test="'self::nondig'">
 <xsl:copy-of select="nondig[node()]""/>
 </xsl:when>

<xsl:when test="'self::CCTo'">
<CCTo />
  </xsl:when>


<xsl:when test="'self::MoTo'">
<MoToTo />
  </xsl:when>

</xsl:choose>

</xsl:for-each>

 </xsl:template>
 </xsl:stylesheet>

Current Thread