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

AddHeaderModifier

AddHeaderModifier

In an
XmlStreamer
, the
AddHeaderModifier
component adds the header of the current segment to the segment. The component adds closing tags as required to ensure that the result is well-formed XML.
You can use
AddHeaderModifier
to pass a segment to a transformation, in the context of its header.
The following table describes the properties of the
AddHeaderModifier
component:
Property
Description
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.
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.
remark
A user-defined comment that describes the purpose or action of the component.
In the following example,
<segment1>
is a repeating segment, preceded by a header and followed by a footer.
<stream> <headerline1>...</headerline1> <segments> <segment1>...</segment1> <segment1>...</segment1> <segment1>...</segment1> </segments> <footerline1>...</footerline1> </stream>
You can configure an
XmlStreamer
that returns the following header, which is not well-formed XML:
<stream> <headerline1>...</headerline1> <segments>
If you apply
AddHeaderModifier
to
<segment1>
, the modifier prefixes each instance of
<segment1>
with the header. It adds closing tags to ensure that the XML is well-formed. The result is the following segment:
<stream> <headerline1>...</headerline1> <segments> <segment1>...</segment1> </segments> </stream>
If you apply
AddHeaderModifier
to a header segment, the modifier adds the header of the parent element to the segment. Do not apply
AddHeaderModifier
to the initial header of the
XmlStreamer
input, because the initial header does not itself have a parent element.


Updated September 26, 2018