[xsl] Getting dropped tags...

Subject: [xsl] Getting dropped tags...
From: Buddhi Dananjaya <buddhi@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 24 Sep 2007 16:33:18 +0530
I am using following XSL file, for transformation. Under <VisualObject> node I have many nodes, Some need to be changed /added after transformation. But I need to preserve existing ones. But Once I transformed using following XSL, I am getting only the tags which are newly added or changed.. (which are in betwwen <xsl:copy> and </xsl:copy>). Transformation has dropped some tags which are not defined between <xsl:copy> and </xsl:copy>

How I can get dropped onces into new xml doc.

XSL
--------
<xsl:template match="/"> <xsl:apply-templates select="*"/>
</xsl:template>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template> <xsl:template match="VisualObject">
<xsl:choose>
<xsl:when test="@xsi:type='CTextEx' or @xsi:type='CTextRingEx'">
<xsl:copy>
<IsOutlinesFirst>false</IsOutlinesFirst>
<IsNoOutlines>false</IsNoOutlines>
<IsCustomFont>true</IsCustomFont>
<ReferenceY>
<Variable />
<Value><xsl:value-of select="Y/Value"/></Value>
</ReferenceY>
</xsl:copy>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="." />
</xsl:otherwise>
</xsl:choose>
</xsl:template>


Part of XML
------------
<VisualObject xsi:type="CTextRingEx">
             <maxQSwitch>500</maxQSwitch>
             <Address>LaserJob.Layer.Text Ring1</Address>
             <Name>Text Ring1</Name>
             <Override>true</Override>
             <IsMark>true</IsMark>
             <Visible>true</Visible>
             <Guid>2ff72930-8880-4dea-be49-61c3cace0a12</Guid>
             <Speed>
               <Variable />
               <Value>12</Value>
             </Speed>
             <Current>
               <Variable />
               <Value>14</Value>
             </Current>
             <QSwitch>
               <Variable />
               <Value>6</Value>
             </QSwitch>
             <LineWidth>
               <Variable />
               <Value>0</Value>
             </LineWidth>
             <GST0>
               <Variable />
               <Value>1200</Value>
             </GST0>
             <GST1>
               <Variable />
               <Value>0</Value>
             </GST1>
             <GST2>
               <Variable />
               <Value>700</Value>
             </GST2>
             <GST3>
               <Variable />
               <Value>500</Value>
             </GST3>
             <GST4>
               <Variable />
               <Value>100</Value>
             </GST4>
             <GST5>
               <Variable />
               <Value>500</Value>
             </GST5>
             <GST6>
               <Variable />
               <Value>500</Value>
             </GST6>

.....

</VisualObject>

Current Thread