Transform Results
The
Transformer action allows you to change the structure and data from document results to a document structure you define.
To define the transformation
1. Connect document-type results from another block as input to
Transformer.
The Block Properties for this action displays three panes with the structure of the input document, a pane where you build the output structure, and a pane with properties you can assign to the currently selected output node or field.
Tip: It helps to maximize the Block Properties/Preview panel with the
button while you work with both structures.
Both the input and output structure can contain:
= a root or structure node that contains children but does not repeat. The root node completely wraps the entire document of the results.
= a repeating node, usually with children.
= a field (node) that contains data. If the node name begins with
@ this is an XML attribute. Otherwise it is an XML element.
2. Change the name for the root node, if desired, in the Ouptut Node Settings field.
3. Build the output structure under the root node and define what data should populate the results. To build the output structure and data:
Drag Input Nodes to Add Nodes to the Output: you can drag individual fields, entire structures or repeating nodes. You can then delete specific nodes from the output, rename output nodes or use node properties to transform the output data.
Delete output nodes: select the output node and click
.
Rename nodes: in the Output Node Settings pane.
Node names must be valid XML names, starting with a letter and containing only letters, numbers, periods(.), underscores (_) or dashes (-).
Copy/paste node property settings from one output node to another with the
and
buttons in the Output Structure toolbar.
4. Use
Run to preview the results as needed.