xsl-list
[Top] [All Lists]

Re: Testing 2 XML documents for equality - a solution

2005-03-30 19:36:23
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/ 

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--