Create a new instance of a patch command based on the given factory objects.
Arguments: |
|
---|
Usage example:
var resolverProfile = require('./lib/profiles/algo-resolver-xcc');
var docProfile = require('./lib/profiles/doc-tree-xml');
var deltaProfile = require('./lib/profiles/delta-tree-xml');
var patch = require('./lib/delta/patch');
var p = new patch.Patch(resolverProfile, docProfile, deltaProfile);
var doc = docProfile.loadOriginalDocument(document_content);
var fragadapter = docProfile.createFragmentAdapter(doc.type);
var delta = deltaProfile.loadDocument(patch_content, fragadapter);
p.patch(doc, delta);
var result = docProfile.serializeDocument(doc);
Arguments: |
|
---|---|
Returns Number: | The number of changes which were not resolved properly. |
Patch the doc using the operations found in deltadoc. Resolve all operations, install change handlers and activate all of them in one step.
Arguments: |
|
---|---|
Returns Number: | The number of changes which were not resolved properly. |
Resolve all operations in the given delta document and create an attached operation for each of them.