Hi,
I'm new XSLT but i want to be able compare to XMLs using XSL. The problem the nodes may be changed so i need to make it using lacal-name().
But i can't seem to be able to do it. Please check the below and help me thanks.
<xsl:output method="xml" indent="yes"/>
<xsl:param name="Doc1" select="Root/items/*" />
<xsl:param name="Doc2" select="Root/items/*" />
<xsl:variable name="Second" select="$Doc2/Root/items/*"/>
<xsl:template match="/">
<xsl:apply-templates select="$Doc1/*"/>
</xsl:template>
<xsl:template match="items">
<Root>
<xsl:for-each select="item">
<xsl:variable name="Names" select="$Second/local-name()"/>
<xsl:choose>
<xsl:when test="$Names!=$Names">
<xsl:value-of select="$Second/current()"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="current()"/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</Root>
</xsl:template>
</xsl:stylesheet>