removing empty attributes

XSLT template to remove empty attributes from the xml.

<xsl:template match="/">
  <xsl:copy>
     <xsl:apply-templates>
       <xsl:for-each select="@*">
          <xsl:if test=".!=''">
             <xsl:copy-of select="." />
          </xsl:if>
       </xsl:for-each>
     </xsl:apply-templates>
   </xsl:copy> 
</xsl:template>


About this entry


0 comments: