DeltaXML Support Forums
| new topic post reply | DeltaXML Products and Applications -> DeltaXML Core -> Determining if documents are equivalent with PipelinedComparator? |
Determining if documents are equivalent with PipelinedComparator? | ||
Posted:
07-April-2008 007:20 Can I determine if two filtered XML documents are equivelent using PipelinedComparator? PipelinedComparator doesn't appear to have an equivalent to the isEqual() method of XMLComparator and parsing the output file seems rather extreme. | ||
Re: Determining if documents are equivalent with PipelinedComparator? | ||
Posted:
07-April-2008 15:49 Hi, Firstly, thanks for taking the time to evaluate DeltaXML Core, I hope you are finding it useful. 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. In the meantime, I have outlined below details of how you can go about determining equality from the current output of PipelinedComparator. I hope you find this useful, please do let us know if you have any other questions. Many thanks, Tristan Changes-only delta If you produce a changes-only delta, the result of comparing two equal inputs will simply be:
where 'root' is the root element of your inputs. While this will not return as quickly as isEqual() does if the inputs are not the same, it does provide a simple way of determining equality. Full-context delta 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 deltaxml:delta attribute value on the root element. If the inputs are equal, the value will be 'unchanged', otherwise it will be 'WFmodify'. | ||
| new topic post reply |
To find out about new replies to this post as they occur please subscribe to one of these feeds: | ![]() ![]() | moderate |
Determining if documents are equivalent with PipelinedComparator?
