Skip to main content
A distinguishing feature of semi-structured documents is that sets of fields may vary from one document to another. When creating an element, remember that the object or objects it describes may be absent from some images and therefore will not be detected. Image information may also be lost if incorrect scanning produces dark or bright patches on an image. Objects located in such patches will not be detected either. For FlexiLayout Studio to continue matching the FlexiLayout even when a particular object is not detected, mark that object as optional.

Required elements

Objects described by required elements must always be present on the images and the program must find them when matching the FlexiLayout with images. If the object is not detected, FlexiLayout Studio stops matching the FlexiLayout. Use required elements to find identifier objects. An identifier object prevents matching the FlexiLayout with a document that belongs to a different type not described by the current FlexiLayout. You can also use required elements to describe objects whose absence means that any further search would be useless.

Optional elements

In all other cases, use optional elements to describe image objects. Objects described by such elements need not be present on the image or the program may not detect them when matching the FlexiLayout. The matching will still continue and the program will detect the objects described by other elements. By default, all simple elements are optional.
Unlike simple elements, all Group elements are required by default.

Prohibited elements

The presence of a certain element in a chain of hypotheses may mean that the chain is not correct and should be discarded. These elements are termed prohibited elements. When the program encounters a prohibited element, it stops generating hypotheses in that branch. Thus, elements may be used to identify a document (required elements), to detect blocks (required and optional elements), and to discard incorrect hypotheses (prohibited elements). Prohibited elements may be used, for example, to prevent false FlexiLayout matching.

Specify how an element is used

You can specify how an element should be used in its Properties dialog box (General tab). Required and prohibited elements are indicated as follows:
  • Required elements are marked with a green marker: Required element marker
  • Prohibited elements are marked with a red marker: Prohibited element marker