On this Page
Combine the Form and Data
When combining data with dynamic forms, the following steps occur:
- If Merge is processing a Summary document, only Panes marked as Job Section "Summary" or "All" are enabled. Otherwise, Panes marked "Main" or "All" are enabled.
- Load the Data DOM from the data file (.xml).
- Create an empty Document DOM to build the "printed" document into. This contains only the root node to start with.
- Run through the Form DOM identifying objects (pages and panes) that are mandatory. As one is identified, it is added to the Document DOM to ensure that it ends up as a part of the final document. A pane is included if it and all of its ancestor panes are flagged as mandatory.
- Set the Document DOMs context as its root node.
- Set the Form DOMs context as its root node.
- Start processing by pointing to the first data item of the Data DOM.
- For each data item in the Data DOM do the following:
- Get the next data item from the Data DOM.
- If end of the Data DOM, return to step 5.4 in The Merge Algorithm.
- Establish the item's fully qualified name from the Data DOM. For information _data (The Data DOM).
- Look for the fully qualified name in the Document DOM.
- If NOT found, look through the entire Document DOM for a match on the fully qualified name.
- If found:
- If the pane does not have data yet, then set the Document DOM's context and place data in all fields and return to step 8.1.
- If the pane may be instantiated multiple times, insert another copy of the pane immediately after the last copy in the Document DOM. Set the Document DOM's context and place data in all fields. Return to step 8.1.
- Toss this piece of data. Return to step 8.1. Assume there is no available place for this data in this document.
- Look in the Form DOM for a match on the fully qualified name.
- If found:
- Instantiate the pane identified by the fully qualified name along with its ancestors in the Document DOM
- Set the Document DOM's context and place data in all fields.
- Return to step 8.1.
- If not found, clear the data node and all its descendants. There is no place for this data.
- Return to step 8.1.
Static Forms
When a form has no containers, DocOrigin considers this form "static" (as opposed to "dynamic") and instantiates all pages regardless of whether the Page property setting "Mandatory" is checked or unchecked.