Re: [xsl] working with multiple files

Subject: Re: [xsl] working with multiple files
From: RahilQ <qamar_rahil@xxxxxxxxxxx>
Date: Fri, 22 Apr 2005 09:55:24 +0100
Hi

Michael Kay wrote:

There's been a lot of discussion on comparing documents on this list a
couple of weeks ago.

Here's one approach: use the XPath 2.0 expression

deep-equal(doc('result1.xml'), doc('result2.xml'))

If that doesn't meet your needs, you'll have to explain your needs.



deep-equal() wont be a solution in my case as I dont have two versions of the same .xml with minor differences.


Instead what I have is two .xml files which contain information on the same topic albeit in a different style. I have done some XSLT to make their structures look similar though.

So if I carry forward the recipe example that was discussed in an earlier thread, then I have two different chefs writing out the recipe for a particular dish. In such a case, there will be a lot of similarities between the two recipes but there will be some differences as well because the two chefs havent been communicating with each other earlier. Also the position at which common information is contained in the two recipes may differ i.e. its there but not at the same structural level !

I have to therefore use one .xml file as the source and then hunt through the entire second .xml file to see if the information exists in it as well. In addition, I also have to highlight features that are not present in the source xml but there in the second xml. Ive tried to make my search easier by having similar xml structures for the two files.

Sorry for such a verbose explanation but didnt know a better way to explain my requirement.

Thanks
Rahil

Current Thread