Group elements also include Header, Footer, First Found, and Repeating Group.Use Header and Footer elements to detect the beginning and the end of a document. Each may occur in a document only once.Repeating Group is a recurring Group element. A Labeled Field element can also be represented as a compound element.
How Group elements are detected
If required, you can specify the minimum number of subelements to be detected. If fewer subelements are detected when the FlexiLayout is applied, the compound element is deemed not detected. A Group element, just like a simple element, can be required, optional, or prohibited. If an optional Group element includes a required element, the failure to match this element with an object results in a null hypothesis for the Group element, and the program continues trying to match the FlexiLayout. Avoid keeping empty compound elements (that is, compound elements without any subelements). If the program encounters an empty compound element when compiling a FlexiLayout, it displays a warning message. Header and Footer elements are added by default. If your FlexiLayout does not use them, delete these redundant elements.When to use Group elements
Group elements are useful in the following cases:- To make testing independent parts of a FlexiLayout easier. For example, a FlexiLayout made up of 100 elements may include only 3 Group elements: the title, the body, and the bottom of the document. Each of these three Group elements contains Group elements that describe smaller portions of the document. This approach both limits the number of possible variants to consider and makes debugging the FlexiLayout easier, because each group can be edited and tested independently.
- To make navigation in the FlexiLayout tree easier.
- To reduce the number of possible element hypotheses, thereby speeding up the formulation of the final hypothesis. Grouping elements together lets the program consider a set of elements as one whole, for which a single hypothesis is formulated (albeit consisting of the hypotheses for subelements) and for which the quality can be calculated. Various combinations of subelement hypotheses are considered inside the group, and only a set number of the best group hypotheses are used in the search down the tree. The default number of best hypotheses for a Group element is 1.
- To specify a search constraint common to all of the subelements. The search area for a particular element will be calculated as an intersection of the search area specified in the subelement and the search area of the entire group.
