La mia necessità è solo di ripetere il valore dell'attributo di "nome". Se questo attributo ha valore "predefinito" come valore, dovrebbe essere cambiato in "Nuovo". Resto tutto dovrebbe essere copia dell'ingresso xml. ho provato con il sotto xsl tuttavia non funziona.Modificare il valore di un attributo specifico
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="SORRegion[@name='default']">
<xsl:attribute name="name">
<xsl:value-of select="'New'"/>
</xsl:attribute>
<xsl:copy-of select="child::*"/>
</xsl:template>
</xsl:stylesheet>
XML di input
<RoutingDetails>
<Service ServiceName="StatementIndicatorsService">
<SOR SORname="Globestar">
<CountryCode Ctrycd="124">
<SORRegion name="Test">
<ConsumerName name="MYCA">
<AutomationIds>
<PreAutoId>
<AutomationId>XA1146A</AutomationId>
<AutomationId>XA1146A</AutomationId>
</PreAutoId>
<DefaultAutoId>
<AutomationId>XA1146A</AutomationId>
</DefaultAutoId>
</AutomationIds>
</ConsumerName>
<QueueDetails>
<QueueManager>MAO1</QueueManager>
<ReplyQueueManager>MAO1</ReplyQueueManager>
<RequestQueue>GSTAR.ICS.DP.DHIPO211.REQUEST</RequestQueue>
<ReplyQueue>ICS.DP.REPLY</ReplyQueue>
</QueueDetails>
</SORRegion>
<SORRegion name="default">
<ConsumerName name="MYCA">
<AutomationIds>
<PreAutoId>
<AutomationId>XA1146A</AutomationId>
<AutomationId>XA1146A</AutomationId>
</PreAutoId>
<DefaultAutoId>
<AutomationId>XA1146A</AutomationId>
</DefaultAutoId>
</AutomationIds>
</ConsumerName>
<QueueDetails>
<QueueManager>MAO1</QueueManager>
<ReplyQueueManager>MAO1</ReplyQueueManager>
<RequestQueue>DEFAULT.REQUEST</RequestQueue>
<ReplyQueue>ICS.DP.REPLY</ReplyQueue>
</QueueDetails>
</SORRegion>
</CountryCode>
</SOR>
</Service>
</RoutingDetails>