I need to transform the following xml doc:
<a>
<b/>
<c/>
myText
</a>
into this:
<a>
<b/>
<c/>
differentText
</a>
So, i wrote this XSLT document
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" version="1.0" omit-xml-declaration="no" />
<xsl:template match="/a/text()">
<a>
<b/>
<c/>
differentText
</a>
</xsl:template>
</xsl:stylesheet>
This way, i get the following result:
<?xml version="1.0" encoding="utf-8"?>
<a>
<b /><c />
differentText
</a>
<a>
<b /><c />
differentText
</a>
<a>
<b /><c />
differentText
</a>
The result appears repeated 3 times because 3 matches are being done.. Why? I could i fix it? Thanks