Need help on removing Empty Tags....

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hello I am looking for XSLT snippet that removes Home phone but not the Indicator.
<ns4:Type code="IN </ns4:Type><br/>
<ns4:Contact><br/>
<ns1:Indicator code="P </ns1:Indicator><br/>
<ns1:Name>CALEB</ns1:Name><br/>
<ns1:LName>ARNOLD</ns1:LName><br/>
<ns1:Contact><br/>
<ns1:HomePhone1></ns1:HomePhone1>
Right now i am using following xslt but its removing Indicator also.
<xsl:stylesheet version="1.0"<br/>
xmlns:xsl="http://www.w3.org/1999/XSL/Transform <br/>
<xsl:output omit-xml-declaration="yes" indent="yes"/><br/>
<xsl:strip-space elements="*"/><br/>
<xsl:template match="node()|@* <br/>
<xsl:copy><br/>
<xsl:apply-templates select="node()|@*"/><br/>
</xsl:copy><br/>
</xsl:template><br/>
<xsl:template match="*[not(*) and not(text()[normalize-space()])]"/><br/>
</xsl:stylesheet>

Thanks

View the full article
 
Back
Top