Subject: Re: Testing 2 XML documents for equality - a solution
From: Mukul Gandhi <mukul_gandhi@xxxxxxxxx>
Date: Wed, 30 Mar 2005 18:36:23 -0800 (PST)
|
Hi Dimitre,
Please read my response below your comments..
> Two XML documents will be considered
> equal
> > if all their nodes are identical(i.e. element,
> text,
> > attribute, namespace etc).
>
> This is not a precise definition of "document
> equality".
oh! Please don't take my definition of "document
equality" from a pure mathematical view point. Its not
as in "is 2=3 ?" . Did you got that impression from my
definition? I meant that 2 XML documents will be equal
if they have identical node structure. i.e. abstract
structure of 2 documents should be identical and not
at byte stream level(this was not my goal).
Another definition for the problem I am trying to
solve would be, XML documents will be same if they
*look similar* in a text editor like nodepad..
so, document
<x>
<a i="1">
</x>
will be equivalent to
<x>
<a i="1">
</x>
but not to
<x>
<a i="2">
</x>
Yet another definition that applies to my problem
would be ! 2 documents will be equal if they produce
same output by an XSLT identity transform..
The "same, equivalent" are better words than "equal"
to the problem I was trying to solve..
> Trying to solve an imprecisely formulated problem is
> not a
> well-founded and understood activity.
True!
> Generally, there is no solution to incorrectly
> formulated problems,
> therefore lets return to solving real problems.
>
:) Of course
Regards,
Mukul
> Cheers,
> Dimitre Novatchev
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
|