skip to main content
10.1145/1030397.1030399acmconferencesArticle/Chapter ViewAbstractPublication PagesdocengConference Proceedingsconference-collections
Article

A three-way merge for XML documents

Published:28 October 2004Publication History

ABSTRACT

Three-way merging is a technique that may be employed for reintegrating changes to a document in cases where multiple independently modified copies have been made. While tools for three-way merge of ASCII text files exist in the form of the ubiquitous diff and patch tools these are of limited applicability to XML documents.

We present a method for three-way merging of XML which is targeted at merging XML formats that model human-authored documents as ordered trees (e.g. rich text formats structured text drawings etc.). To this end we investigate a number of use cases on XML merging (collaborative editing propagating changes across document variants) from which we derive a set of high-level merge rules. Our merge is based on these rules.

We propose that our merge is easy to both understand and implement yet sufficiently expressive to handle several important cases of merging on document structure that are beyond the capabilities of traditional text-based tools. In order to justify these claims we applied our merging method to the merging tasks contained in the use cases. The overall performance of the merge was found to be satisfactory.

The key contributions of this work are: a set of merge rules derived from use cases on XML merging a compact and versatile XML merge in accordance with these rules and a classification of conflicts in the context of that merge.

References

  1. S. Balasubramaniam and Benjamin C. Pierce. What is a file synchronizer? In Fourth Annual ACM/IEEE International Conference on Mobile Computing and Networking (MobiCom '98) pages 98--108. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Sudarshan S. Chawathe and Hector Garcia-Molina. Meaningful change detection in structured data. In Proceedings of the 1997 ACM SIGMOD international conference on Management of data pages 26--37. ACM Press 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Sudarshan S. Chawathe Anand Rajaraman Hector Garcia-Molina and Jennifer Widom. Change detection in hierarchically structured information. In ACM SIGMOD International Conference on Management of Data (SIGMOD) pages 493--504 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. S. Horwitz J. Prins and T. Reps. Integrating noninterfering versions of programs. ACM Transactions on Programming Languages and Systems 11(3):345--387 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Guibas L. J. and Sedgewick R. A dichromatic framework for balanced trees. In Proceedings of the 19th Annual IEEE Symposium on Foundations of Computer Science pages 8--21 October 1978.Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Michael K. Johnson. Diff patch and friends. Linux Journal 1996(28es) August 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. R. la Fontaine. Merging XML files: a new approach providing intelligent merge of XML data sets. In Proceedings of XML Europe 2002 Barcelona Spain.Google ScholarGoogle Scholar
  8. G. W. Manger. A generic algorithm for merging SGML/XML-instances. In Proceedings of XML Europe 2001 Berlin Germany.Google ScholarGoogle Scholar
  9. Tom Mens. A state-of-the-art survey on software merging. IEEE Transactions on Software Engineering 28(5):449--462 May 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Eugene W. Myers. An O(ND) difference algorithm and its variations. Algorithmica 1(2):251--266 1986.Google ScholarGoogle ScholarCross RefCross Ref
  11. Sun Microsystems. OpenOffice.org XML File Format 1.0 December 2002. http://xml.openoffice.org/xml_specification.pdf.Google ScholarGoogle Scholar
  12. Asklund U. Identifying conflicts during structural merge. In Proceedings of the Nordic Workshop on Programming Environment Research '94 pages 231--242 Lund Sweden June 1994.Google ScholarGoogle Scholar
  13. W3C. Extensible Markup Language (XML) 1.0 3rd edition October 2000. http://www.w3.org/TR/REC-xml/.Google ScholarGoogle Scholar
  14. W3C. XHTML 1.0 Specification January 2000. http://www.w3.org/TR/xhtml1/.Google ScholarGoogle Scholar
  15. W3C. Scalable Vector Graphics (SVG) 1.1 Specification January 2003. http://www.w3.org/TR/SVG/.Google ScholarGoogle Scholar
  16. W3C. XML Information Set 2nd edition February 2004. http://www.w3.org/TR/xml-infoset/.Google ScholarGoogle Scholar
  17. Bernhard Westfechtel. Structure-oriented merging of revisions of software documents. In Proceedings of the 3rd International Workshop on Software Configuration. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A three-way merge for XML documents

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          DocEng '04: Proceedings of the 2004 ACM symposium on Document engineering
          October 2004
          252 pages
          ISBN:1581139381
          DOI:10.1145/1030397

          Copyright © 2004 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 28 October 2004

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • Article

          Acceptance Rates

          Overall Acceptance Rate178of537submissions,33%

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader