[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook] XML/XSL Revision Control/ Source Code Versioning: Ideas, Methods, Tools for Specific scenario as a Content Writer?
Hi Alex, Am Samstag, 8. Dezember 2012, 21:55:59 schrieb Alex S: > Thank you for your time & responses. I remember reading somewhere that a > pure text/ linear comparison based tool/ system may not be ideal to compare > & merge XML tree structure based documents. Right. In some cases. > Are there any that are more XML aware? Well, all the version control system that I know uses a line-based diff algorithm. As such, XML is for them just ordinary text. However, I don't think this is really a problem. There are two options: 1. Delegate the Diff Process If I'm not mistaken, you can define a separate diff program for your VCS. That would give you (at least theoretically) the opportunity to delegate the diff process to a separate program which is able to do a tree-based diff instead of a line-based diff. 2. Normalize it before diffing Tree-based diffs are rather complex and there are not many open source tools available. Does anybody know one? However, line-based diffs are well-known and "cheap". Why not use that as a solution? The only problem is to "normalize" your XML before diffing. "Normalize" in this context means, making all indendation the same. You can do that by using a "XML pretty print program" which indents all the tags and attributes correctly. In most cases, this is enough and shows you only the lines which are affected. > Also, I was wondering if I wanted to do compare/ merges visually using > Altova Diffdog or similar tools then which source control systems would > allow me to access/ load the individual versions into such a tool to merge > into the newer or create a newer version? > > Are some of these systems XML tree structure aware? I have the feeling we are talking about different things. :) In regards to XML, it means, it's not the task of the VCS to do a "XML tree merge". No VCS tool has that feature. Actually, no VCS knows how to handle XML -- it's just ordinary text. As such, a VCS operates on text files and knows how to change lines. However, every VCS allows you to get the changes from one version to another. There are even graphical user interfaces who can display that for you. The oXygen XML editor, for example, has a Subversion client which does exactly this. But these changes are line-based. I work with VCS and XML for some years now. There were few situations where I would liked to have a XML diffing tool. Usually, it was enough to use the VCS' diff tool. Or, sometimes, I used oXygen's XML diff. Well, that worked for _me_, your situation may vary. -- Gruß/Regards Thomas Schraitle
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]