Hi All,
I have a XSLT code which works fine and it is as follows :
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl

utput method="xml" indent="yes"/>
<xsl:template match="/">
<PERIODIC_TABLE><xsl:apply-templates/></PERIODIC_TABLE>
</xsl:template>
<xsl:template match="PERIODIC_TABLE/node()">
<xsl:copy-of select="."/>
</xsl:template>
<xsl:template match="PERIODIC_TABLE/ATOM[NAME='Swarup']">
<xsl:element name="ATOM">
<xsl:copy-of select="@*"/>
<xsl:copy-of select="node()"/>
<xsl:element name="NAME">
<xsl:attribute name="b">x</xsl:attribute>Swap</xsl:element>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
Now on the same lines if i use this code IT DOES NOT WORK as the DEPTH (i.e company/companyDetails/classificationInfo) increases it gives problem....
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl

utput method="xml" indent="yes"/>
<xsl:template match="/">
<company><xsl:apply-templates/></company>
</xsl:template>
<xsl:template match="company/node()">
<xsl:copy-of select="."/>
</xsl:template>
<xsl:template match="company/companyDetails/classificationInfo[naics='333412']">
<xsl:element name="classificationInfo">
<xsl:copy-of select="@*"/>
<xsl:copy-of select="node()"/>
<xsl:element name="naics">
<xsl:attribute name="naics">007</xsl:attribute>77777</xsl:element>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
Thanks in Advance...