Re: [xsl] comparing a part of the XML tree

Subject: Re: [xsl] comparing a part of the XML tree
From: Jethro Borsje <jethro@xxxxxxxxxxxx>
Date: Mon, 16 Jul 2007 12:43:52 +0200
I can not manage to make the deep-equal function work with the node() function.

change node() (which is not a function) to *

deep-equal(body/selection/*, body/original/*)

This works well when I have 1 element as child of the "original" element, however when using the following input:
<z color="blue" flavor="vanilla">test 1</z>
<x color="red" flavor="chocolate">test 2</x>
<z color="blue" flavor="vanilla">test 1</z>

With this stylesheet:
<xsl:template match="/">
<xsl:when test="deep-equal(body/selection/*, body/original/*)">true</xsl:when>

It results in "false", while there is a node in <original> which is equal to the node in <selection>.

Best regards,
Jethro Borsje

Current Thread