This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Merging two XML Documents


Hi,

there's been a request on xml-dev last friday for a tool that "merges" two XML 
documents (see http://lists.xml.org/archives/xml-dev/200007/msg00584.html )

This inspired me to write an XSLT transformation sheet that does such
job tolerably well:

http://www.informatik.hu-berlin.de/~obecker/XSLT/#merge

Another sensible usage could be comparing two documents:
If they only differ in namespace prefixes, attribute node order,
and white spaces, the output will be a copy of the first document.

Admittedly, finding the differences is not as simple as one might think.
If the root nodes of the documents differ, the stylesheet outputs each 
node completely. Any child nodes won't be compared.

As always: feedback appreciated!
Cheers
Oliver


/-------------------------------------------------------------------\
|  ob|do        Dipl.Inf. Oliver Becker                             |
|  --+--        E-Mail: obecker@informatik.hu-berlin.de             |
|  op|qo        WWW:    http://www.informatik.hu-berlin.de/~obecker |
\-------------------------------------------------------------------/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]