DeskClient Authoring

Merge of Document Content

Find out how to transfer content of a document into another one.

Sophora offers the option to let you decide which content of fields and childnodes of a source document should be merged into a target document. For this purpose, merge information needs to be available that describes which content can be transferred into a document. Then you can choose or reject the mergeable content via a comfortable dialog.

There is also the possibility to call the merge dialog via client scripts. With that, you can adopt content from a previously specified document, which already exists in your database. You can find further information here or ask an administrator.

Transferring content into a document

Documents containing merge information are marked with a corresponding icon which is being displayed in the editor's upper right area next to the status icon (see opposite illustration). By clicking on this icon the merge dialog will be opened. The dialog allows to transfer particular content into the opened target document easily.

zusammenfuehren von dokumenten
zusammenfuehren von dokumenten (Image: subshell/CC BY)

Available content for merge is shown in the right half of the dialog. The corresponding original content which is currently in the target document, is displayed in the left half of the dialog. After selecting content for adoption within the dialog, the new state of the fields is shown in the left half. Text passages deferring between the two versions will be marked yellow for reasons of clarity.

zusammenfuehren von dokumenten
zusammenfuehren von dokumenten (Image: subshell/CC BY)

By pressing the button Replace All, every available content from the right side will be selected for adoption. The button Adopt none removes the selection from the content. You can also select specific fields for adopting their content by clicking on the buttons that are displayed between the left and right column of the dialog.

  • The content of the target document's properties will be replaced with the provided content from the merge information entirely.
  • For component lists, the dialog additionally delivers the possibility to prepend or append the components of the source document.
  • Copytext content can be replaced or appended.

By pressing the OK button, the selected content will be transferred into the target document.

Creating merge information

Via document import

Before importing a document, users can specify in the Sophora-XML which properties or child nodes should be included in the merge information by using the merge attribute (for an example see the documentation about the composition of the Import XML). These elements will not be imported, but will be written into the sophora:mergeXml property. Only the following elements consider the new attribute:

  • Properties at document level
  • Copytext child node at document level
  • Reference child nodes (component lists) at document level

In case the merge attribute has been set on other elements than the previously named, the attribute will be ignored. If a document already contains merge information, the information will be overwritten by the new one (only if elements have been marked as mergeable content in the Sophora-XML).

Last modified on 10/16/20

The content of this page is licensed under the CC BY 4.0 License. Code samples are licensed under the MIT License.

Icon