C.5. About the TaskML Merge Process

The merge process facilitates reuse of wizard components from local or network locations.

The merge process is the first step in loading TaskML into the Mechanical Wizard. The process involves selectively copying information from a merged TaskML document into a parent TaskML document. The parent document includes a Merge element linking to the merged file. The merge process generates a composite TaskML document in memory; neither the parent or merged TaskML files are modified.

The merge process consists of the following steps:

  1. If the merged TaskML document contains Merge elements, this process is called recursively. That is, a TaskML document may merge a file that merges a file, and so on.

  2. Script elements are copied to the parent only if the src attribute is unique.

  3. object-group elements are copied to the parent only if the merged object-group has a unique name attribute.

  4. status elements are copied to the parent only if the merged status has a unique id.

  5. language collections (and contained string elements) are copied only if the language has a unique xml:lang attribute.

  6. string elements are copied only if the merged string has a unique id.

  7. task elements are copied only if the merged task has a unique id.

  8. If both the parent and the merged TaskML documents contain a group with the same id:

    • Attributes defined for the merged group but omitted in the parent group are copied to the parent group.

    • All children of the merged group are appended to the parent group.

For diagnostic purposes the merge process automatically adds a merged-from attribute to elements added to the parent TaskML file. The merged-from attribute contains the url of the TaskML file from which the element was obtained.