Two texts can be diffed against each other, generating a list of patches. These patches can then be applied against a third text. If the third text has edits of its own, this version of patch will apply its changes on a best-effort basis, reporting which patches succeeded and which failed.
In this scenario Shakespeare wrote Hamlet in Early Modern English, the source document. Then two derivative works were created. One is Hamlet updated to Modern English. The other is a Star Trek parody in Early Modern English. This demonstrantion creates a list of patches between the source and the Modern English version. Then it applies those patches onto the Star Trek parody, thus creating a Star Trek parody in Modern English.