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

Mapper

Mapper

A
Mapper
performs XML-to-XML transformations. It converts a source XML document to an output document that has a different XML structure.
The following table describes the properties of the
Mapper
component:
Property
Description
example_source
Defines a sample XML source document. When you run the Mapper in the Developer tool, it operates on the sample document. You can choose one of the following options:
  • Empty. You are prompted for a source document when you run the Script.
  • InputPort. Defines an input port.
  • LocalFile. Defines a file on the local filesystem.
  • Text. Defines a string.
  • URL. Defines a URL.
Default is empty.
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.
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.
remark
A user-defined comment that describes the purpose or action of the component.
root_tag
Defines the name of a root XML element that is not defined in the schema.
For example, if the top-level element of the schema is
Person
, but the XML input nests
Person
in an element called
InputWrapper
, set
root_tag
to
InputWrapper
.
source
Defines a locator component that defines an XML data holder. The data holder contains the root of the XML source for the mapping. For more information, see Overview of Locators, Keys, and Indexing.
target
Defines a locator component that defines an XML data holder. The data holder contains the root of the output XML for the mapping. For more information, see Overview of Locators, Keys, and Indexing.
validate_source_document
Determines the level of source XML validation that the serializer performs. You can choose one of the following options:
  • Partial. Permits some deviations from the schema.
  • Strict. Enforces the schema strictly.
Default is Partial.
You must use the
source
and
target
properties to identify the root elements of the XML documents. For example, if the document element of the source is
Persons
, and the document element of the output is
SummaryData
, set the
source
and
target
as follows:
global level Mapper1 = Mapper >> level 2 source = level 3 Locator >> level 4 data_holder = /Persons level 3 ... level 2 target = level 3 Locator >> level 4 data_holder = /SummaryData level 3 ...


Updated September 26, 2018