I am working on XSLT v1.0 and I have to replace these 5 key words with their ASCII values. Using replace function, I am able to replace other characters like Ñ, Ç but I am not able to replace
&
<
>
"
'
Working statement
<xsl:value-of select="translate(translate(translate(translate(InstructionGrouping/Payer/LegalEntityName,'Ñ','N'),'ñ','n'),'Ç','C'),'ç','c')"/>
Not working
<xsl:value-of select="translate(translate(translate(translate(translate(InstructionGrouping/Payer/LegalEntityName,'Ñ','N'),'ñ','n'),'Ç','C'),'ç','c'),'&','&')"/>
Input XML would be something like this -->
<LegalEntityName>Legal & entity Beach & Resort LLC</LegalEntityName>
Expected Output -->
Legal & entity Beach & Resort LLC
You can't use XSLT to convert ill-formed XML into well-formed XML: the input to an XSLT processor has to be well-formed XML.
Ideally you should never need to do this job, it's the job of any program generating XML to make sure it is well-formed. But if you have no other options, you will need to use non-XML tools for processing non-XML input.