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. XMap
  7. Libraries
  8. Schema Object
  9. Command Line Interface
  10. Scripts
  11. Parsers
  12. Script Ports
  13. Document Processors
  14. Formats
  15. Data Holders
  16. Anchors
  17. Transformers
  18. Actions
  19. Serializers
  20. Mappers
  21. Locators, Keys, and Indexing
  22. Streamers
  23. Validators, Notifications, and Failure Handling
  24. Validation Rules
  25. Custom Script Components

Data Transformation User Guide

Data Transformation User Guide

Overview of Locators, Keys, and Indexing

Overview of Locators, Keys, and Indexing

In designing a transformation, a frequent issue is how to locate the data holders that you want to process. If the same data holders can occur multiple times in an XML structure, there can be ambiguities in identifying the occurrences. This chapter explains how to use the
Locator
and
Key
components to resolve the ambiguities.
The components described in this chapter let you identify the occurrences of multiple-occurrence data holders in three ways:
  • Sequentially. Each iteration of a component processes the next occurrence of the data holder.
  • By occurrence number. For example, a component can select the third occurrence of a data holder.
  • By a key such as an attribute or a nested element. The key uniquely identifies the occurrence of the data holder.
The sequential approach is the default. It is subject to some complexities that you can control by using the
Locator
component.
The occurrence number and key approaches are collectively known as indexing. The term is analogous to the index of a book, where you use a page number or a subject key to identify the location of information. You can implement the indexing by using components called
LocatorByOccurrence
,
LocatorByKey
, and
Key
.
You can use the locator and key components in parsers, serializers, or mappers. You can use the components to identify the occurrences of data holders in the input, the output, or both.
The locator components are nested in the
source
and
target
properties of various transformation components. The meaning and usage of the
source
and
target
properties is explained below.


Updated September 26, 2018