RE: [xsl] Need an efficient function to determine if two XML trees are the same (same markup, same values)

Subject: RE: [xsl] Need an efficient function to determine if two XML trees are the same (same markup, same values)
From: "Costello, Roger L." <costello@xxxxxxxxx>
Date: Sat, 1 Sep 2012 20:01:42 +0000
Ah, upon closer read of deep-equal() I see that it does exactly what I
desire.

Thanks Ken.

/Roger

-----Original Message-----
From: G. Ken Holman [mailto:g.ken.holman@xxxxxxxxx] On Behalf Of G. Ken
Holman
Sent: Saturday, September 01, 2012 2:34 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx; xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Need an efficient function to determine if two XML trees
are the same (same markup, same values)

At 2012-09-01 18:22 +0000, Costello, Roger L. wrote:
>I need an efficient XSLT 2.0 function that, given two XML trees, it
>returns true if they are the same, false otherwise.
>
>By "they are the same" I mean the trees have the same elements and
>attributes, with the same values.
>
>Do you have an efficient function that does this?

I don't, but the standard library has deep-equal() which does that:

http://www.w3.org/TR/2007/REC-xpath-functions-20070123/#func-deep-equal

Do you need something more than what is already standardized?

I hope this helps.

. . . . . . . . Ken


--
Public XSLT, XSL-FO, UBL and code list classes in Europe -- Oct 2012
Contact us for world-wide XML consulting and instructor-led training
Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/s/
G. Ken Holman                   mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal

Current Thread