I don't know much about xsl.
I have to compare 2 very large xmls which are practically the same, only that the attributes in their nodes are out of order and that is why the winmerge marks it as different
How would an xsl be that leaves everything the same and only orders the attributes in each node?
Currently I found this code on the internet, but it orders the entire document and I need it to be exactly the same as it is and only order the attributes alphabetically
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="@*">
<xsl:sort select="name()" />
</xsl:apply-templates>
<xsl:apply-templates select="node()">
<xsl:sort select="name()" />
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
<variable name="Invoke_Event_PCM_OP_AR_EVENT_ADJUSTMENT_OutputVariable" messageType="brm:PCM_OP_AR_EVENT_ADJUSTMENT_outmsg" xml:id="id_20" />
<variable messageType="brm:PCM_OP_AR_EVENT_ADJUSTMENT_outmsg" name="Invoke_Event_PCM_OP_AR_EVENT_ADJUSTMENT_OutputVariable" xml:id="id_20" />
For example, in the image winmerge detects differences, but the node is called the same, only that they have the attributes in a different order
I want to order only the attributes in alphabetical order so that winmerge detects that the lines are equal