I have the response below from an WS
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="XX" xmlns:ns2="XX">
<SOAP-ENV:Body>
<ns2:entregarManifestacaoProcessualResposta>
<ns1:sucesso>true</ns1:sucesso>
<ns1:mensagem>Some strange error messafe</ns1:mensagem>
<ns1:protocoloRecebimento>XXXXXXXX</ns1:protocoloRecebimento>
<ns1:dataOperacao>XXXXXXX</ns1:dataOperacao>
<ns1:recibo/>
</ns2:entregarManifestacaoProcessualResposta>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
They haven't implemented according to the contract expressed, and in this situation the success must be false because the tag <ns1:recibo> is empty.
So I need to make an XSLT to check is recibo is empty and change the sucesso node to false.
I've started with the example below, that I've found here in SO, but when I try to change the sucesso node it never changes.
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="Envelope/Body/sucesso">
<sucesso>false</sucesso>
</xsl:template>
</xsl:stylesheet>