Table of Contents

Search

  1. Preface
  2. Introduction to Data Transformation
  3. Data Processor Transformation
  4. Wizard Input and Output Formats
  5. Relational Input and Output
  6. Using the IntelliScript Editor
  7. XMap
  8. Libraries
  9. Schema Object
  10. Command Line Interface
  11. Scripts
  12. Parsers
  13. Script Ports
  14. Document Processors
  15. Formats
  16. Data Holders
  17. Anchors
  18. Transformers
  19. Actions
  20. Serializers
  21. Mappers
  22. Locators, Keys, and Indexing
  23. Streamers
  24. Validators, Notifications, and Failure Handling
  25. Validation Rules
  26. Custom Script Components

RepeatingGroup

RepeatingGroup

The
RepeatingGroup
anchor parses a region that contains repetitive segments. Each segment is called an iteration, and can be delimited by a
separator
. The
RepeatingGroup
contains a sequence of nested anchors and actions that parse each iteration in the same way.
The following table describes the properties of the
RepeatingGroup
anchor:
Property
Description
count
Defines a number or data holder that contains the number of iterations to run. If blank, the iterations continue until the search scope is exhausted.
If
count
is 0, the
RepeatingGroup
does not search for iterations. In this case, the
RepeatingGroup
succeeds but does not produce any output.
current_iteration
Defines a data holder where the
RepeatingGroup
outputs the number of the current iteration.
disabled
Determines whether the Script ignores the component and all of the child components. Use this property to test, debug, and modify a Script. You can choose one of the following options:
  • Selected. The Script ignores the component.
  • Cleared. The Script applies the component.
The default is cleared.
iteration_order
Defines the order in which the iterations are processed. You can choose one of the following options:
  • top-down. The iterations are processed in the sequence that is defined in the Script.
  • bottom-up. The iterations are processed in reverse order. Use this option if data from a later iteration affects how you process an earlier iteration.
marking
Determines whether an anchor is used as the start of the search scope for the succeeding anchor. You can choose one of the following options:
  • begin position. Place a reference point before the current anchor.
  • end position. Place a reference point after the current anchor.
  • full. Place a reference point before and after the current anchor.
  • none. Do not create a reference point.
For more information, see How a Parser Searches for Anchors.
name
A descriptive label for the component. This label appears in the log file and the
Events
view. Use the
name
property to identify the component that caused the event.
no_initial_phase
Determines whether the Script searches for nested anchors in the main phase. You can choose one of the following options:
  • Cleared. Search for nested anchors according to their individual properties.
  • Selected. Search for nested anchors in the main phase.
Default is cleared.
notifications
A list of
NotificationHandler
components that handle notifications from nested components. For more information, see Notifications.
on_fail
The action to take if the component fails. You can choose one of the following options:
  • Cleared. Take no action.
  • CustomLog. Write to the user log.
  • LogError. Write an error message to the engine log.
  • LogInfo. Write an information message to the engine log.
  • LogWarning. Write a warning message to the engine log.
  • NotifyFailure. Send a notification.
Default is cleared. For more information about handling component failures, see Failure Handling.
on_iteration_fail
Defines the action when a single iteration fails. You can choose one of the following options:
  • Cleared. No action.
  • CustomLog. Writes to the user log.
  • LogError. Writes an error message to the Engine log.
  • LogInfo. Writes an information message to the Engine log.
  • LogWarning. Writes a warning message to the Engine log.
  • NotifyFailure. Triggers a notification.
Use the
on_fail
property to write an entry if the entire
RepeatingGroup
fails. For more information, see Failure Handling.
on_partial_match
Defines the behavior when some, but not all, of the required anchors nested under the
RepeatingGroup
appear in the input. The
on_partial_match
property has the following options:
  • fail. The iteration fails.
  • skip.
    RepeatingGroup
    removes the area spanned by the successful nested anchors from its search scope and tries to find all the nested anchors again. The removal-retry procedure is repeated until the iteration succeeds or until there is no longer a partial match. If there is no partial match, the iteration fails.
optional
Determines whether a component failure causes the parent component to fail. You can choose one of the following options:
  • Selected. Component failure does not cause the parent component to fail.
  • Cleared. Component failure causes the parent component to fail.
Default is cleared. For more information about component failure, see Failure Handling.
phase
Determines when the Script processes the component. You can choose one of the following options:
  • initial. The Script processes the component during the initial phase.
  • main. The Script processes the component during the main phase.
  • final. The Script processes the component during the final phase.
For more information, see How a Parser Searches for Anchors.
Default is main.
remark
A user-defined comment that describes the purpose or action of the component.
search_order
Defines the order of processing the nested anchors within each iteration. You can choose one of the following options:
  • top-down. The nested anchors are processed in the sequence that is defined in the Script.
  • bottom-up. The nested anchors are processed in reverse order. Select this option if data from a later anchor affects how you process an earlier anchor.
separator
Defines an anchor that delimits the sections.
If you leave the
separator
property empty, the
RepeatingGroup
does not look for a delimiter between the iterations. Instead, it assumes that an iteration is finished when it has found all the nested anchors. It then starts to parse the next iteration from the top of the nested anchor sequence.
You can build a complex separator by inserting a
Group
in the
separator
property instead of a
Marker
.
separator_position
Defines the positioning of the
separator
relative to the sections. You can choose one of the following options:
  • after. There is a separator after each section, including the last section. For example,
    1|2|3|4|
  • around. There are separators before and after each section, including the first and last sections. For example,
    |1|2|3|4|
  • before. There is a separator before each section, including the first section. For example,
    |1|2|3|4
  • between. There is a separator between the successive sections, but not before the first section and not after the last section. For example,
    1|2|3|4
skip_failed_iterations
Determines whether failed iterations are skipped. You can choose one of the following options:
  • Selected.
    RepeatingGroup
    skips over a failed iteration and proceeds with the next iteration. If an iteration succeeds, the
    RepeatingGroup
    succeeds.
  • Cleared.
    RepeatingGroup
    fails if any iteration fails.
The
skip_failed_iterations
property has an effect only if
separator
is defined.
Default is selected.
source
Defines a sequence of data holders for input to the
RepeatingGroup
. Each data holder is identified by one of the following properties:
  • Locator. Identifies a single-occurrence or a multiple-occurrence data holder. For multiple-occurrence data holders, each iteration accesses a new occurrence.
  • LocatorByKey. Identifies a multiple-occurrence data holder by key.
  • LocatorByOccurence. Identifies a multiple-occurrence data holder by sequence number.
Use the
source
property when the
RepeatingGroup
is called by another component. For more information, see Source Property.
target
Defines a sequence of data holders for output from the
RepeatingGroup
. If a data holder does not yet exist, it is created. Each data holder is identified by one of the following properties:
  • Locator. Identifies a single-occurrence or a multiple-occurrence data holder. For multiple-occurrence data holders, each iteration creates a new occurrence.
  • LocatorByKey. Identifies a multiple-occurrence data holder by key.
  • LocatorByOccurence. Identifies a multiple-occurrence data holder by sequence number.
Use the
target
property when the output of the
RepeatingGroup
is used by another component. For more information, see Target Property.
To parse a region of sections that require differing treatment, use a
DelimitedSections
anchor.


Updated March 03, 2021