Subject: Re: [xsl] comparing a part of the XML tree From: Jethro Borsje <jethro@xxxxxxxxxxxx> Date: Mon, 16 Jul 2007 08:50:51 +0200 |
Calling deep-equal on every element would do the trick. It could potentially be quite expensive, but with luck deep-equal doesn't take very long when the arguments are obviously not equal, for example when they are elements with different names.For the example given, deep-equal would not find any pair of items that match. The 'selection' element has two children but does not itself appear in the 'original' so there is no item in the selection that can be deep-equal to any item in the 'original'.
The first child of 'selection' does seem to be deep-equal to an item in 'original' but the 'selection' item's following sibling - a text node - is not equal to the following sibling of the item in the 'original'. If spaces were to be normalised then the content of the 'selection' text node would be a prefix of the content of the 'original' text node.
> I was assuming a deep-equal comparison applied to the Target > element - but perhaps I didn't examine the problem > carefully enough.
-- Best regards, Jethro Borsje
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] comparing a part of the X, Michael Kay | Thread | Re: [xsl] comparing a part of the X, David Carlisle |
[xsl] dynamic grouping assignment, christoph . klocker | Date | [xsl] Looking for XSL consultants, Dan Ochs |
Month |