I have an xml document(This xml is not well formed) as follows
<ads>
<adv>
<a>BURGER & BROWN ENGINEERING</a>
<b>123*3491</b>
<adv>
<adv>
<x>Roster Service</x>
<y>BROWN & BURGER ENGINEERING</y>
<z>905*3490</z>
<adv>
<ads>
I would like to have an XSLT to transform the XML to this.
i) ampersand(&) should be replaced with " and "
ii) * should be replaced with " "
<ads>
<adv>
<a>BURGER and BROWN ENGINEERING</a>
<b>123 3491</b>
<adv>
<adv>
<x>Roster Service</x>
<y>BROWN and BURGER ENGINEERING</y>
<z>905 3490</z>
<adv>
<ads>
I have an xsl as follows but this does not satisfy my requirement.
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="text()">
<xsl:value-of select="translate(., '&', ' and ')" />
<xsl:value-of select="translate(., '*', ' ')" />
</xsl:template>