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

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 March 18, 2021