<?xml version="1.0" encoding="UTF-8"?><rss xmlns:xrl="http://1060.org/xrl" version="2.0"><channel><title>Determining if documents are equivalent with PipelinedComparator?</title><link>http://www.deltaxml.com/forum/topic/21</link><description>
					Entries: 8 Views: 264</description><generator>1060 NetKernel Standard Edition v2.x.x 1060 Forum v1.0.0</generator><language>en-us</language><ttl>60</ttl><item><title>Re: Determining if documents are equivalent with PipelinedComparator?</title><link>http://www.deltaxml.com/forum/topic/21</link><guid isPermaLink="true">http://www.deltaxml.com/forum/topic/21</guid><description>&lt;div&gt;Hi,&lt;br/&gt;&lt;br/&gt;Firstly, thanks for taking the time to evaluate DeltaXML Core, I hope you are finding it useful.&lt;br/&gt;&lt;br/&gt;The PipelinedComparator does not yet include an equivalent to the isEqual() method of XMLComparator. However, we will soon be releasing a new major version of DeltaXML Core (version 5.0) that is currently in beta testing. We will add the isEqual() method to the PipelinedComparator in the next beta version, which can be made available to you if you wish, or you could wait until the final release of 5.0. The isEqual() method would make use of any input filters defined on the PipelinedComparator and then perform a fast-fail comparison of the input documents in much the same way as the XMLComparator method. Obviously, output filters are not relevant in this case.&lt;br/&gt;&lt;br/&gt;In the meantime, I have outlined below details of how you can go about determining equality from the current output of PipelinedComparator.&lt;br/&gt;&lt;br/&gt;I hope you find this useful, please do let us know if you have any other questions.&lt;br/&gt;&lt;br/&gt;Many thanks,&lt;br/&gt;&lt;br/&gt;Tristan&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Changes-only delta&lt;/b&gt;&lt;br/&gt;If you produce a changes-only delta, the result of comparing two equal inputs will simply be:&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;table align="center" border="0" cellpadding="3" cellspacing="1" width="90%"&gt;&lt;tr&gt;&lt;td&gt;&lt;div class="forum-xml"&gt;&lt;div class="xmlverb-default codeblock"&gt;&amp;lt;&lt;span class="xmlverb-element-name"&gt;root&lt;/span&gt;&lt;span class="xmlverb-ns-name"&gt; xmlns:deltaxml&lt;/span&gt;="&lt;span class="xmlverb-ns-uri"&gt;http://www.deltaxml.com/ns/well-formed-delta-v1&lt;/span&gt;" &lt;span class="xmlverb-attr-name"&gt;deltaxml:delta&lt;/span&gt;="&lt;span class="xmlverb-attr-content"&gt;unchanged&lt;/span&gt;" /&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br/&gt;&lt;br/&gt;where 'root' is the root element of your inputs. While this will not return as quickly as isEqual() does if the inputs are &lt;i&gt;not&lt;/i&gt; the same, it does provide a simple way of determining equality.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Full-context delta&lt;/b&gt;&lt;br/&gt;If you produce a full-context delta, you don't need to read the whole result to determine whether the inputs are equal or not. All you need to test is the &lt;i&gt;deltaxml:delta&lt;/i&gt; attribute value on the root element. If the inputs are equal, the value will be '&lt;i&gt;unchanged&lt;/i&gt;', otherwise it will be '&lt;i&gt;WFmodify&lt;/i&gt;'.&lt;/div&gt;</description><pubDate>Mon, 007 Apr 2008 15:49:00 GMT</pubDate></item><item><title>Determining if documents are equivalent with PipelinedComparator?</title><link>http://www.deltaxml.com/forum/topic/21</link><guid isPermaLink="true">http://www.deltaxml.com/forum/topic/21</guid><description>&lt;div&gt;Can I determine if two filtered XML documents are equivelent using PipelinedComparator?&lt;br/&gt;&lt;br/&gt;PipelinedComparator doesn't appear to have an equivalent to the isEqual() method of XMLComparator and parsing the output file seems rather extreme.&lt;/div&gt;</description><pubDate>Mon, 007 Apr 2008 007:20:00 GMT</pubDate></item></channel></rss>