Integration Engine Solutions to Connect Anything to Anything

Log out?

Purpose:

To practice using the Tabular Mapping feature to convert values in XSLT in the Data Mapper.



Create a Route

    1. From the eiConsole File Management screen, select the Add Route button.
    2. In the dialog that appears, enter the name Tabular Mapping and select OK.
    3. The Route should now appear in the table on the screen. Double-click it to open it.

Document Source System

    1. Select the Source System stage in the Route Editing Grid. The configuration panel will appear at the bottom.
    2. Change the System Name to People XML File.
    3. Select the Choose Source Icon button, and scroll down to select one of the XML icons.

Configure the Listener

    1. Select the Listener stage in the Route Editing Grid. The configuration panel will appear at the bottom.
    2. Select Directory/File from the Listener Type selection box. Optionally, click the button to open the Module Search Dialog, which provides a faster way to find the module you’re looking for.
    3. Assign a polling directory, using the button to open the file selector. The polling directory should NOT be the directory with all the sample files, since files will be moved/deleted by the listening process.
    4. Go to Post-Process tab and select Delete from Postprocess Operation:

Add Source Format and Open Data Mapper

    1. Select the Source Transform stage in the Route Editing Grid. The configuration panel will appear at the bottom.
    2. Click the Add Format button. In the dialog that appears, name the Format People to Robots 1, and click OK. The transformation configuration panel will appear below.
    3. On the right-hand side, in the XSLT To XML configuration panel, uncheck the Use Direct Relay button. The options in that panel will now be enabled.
    4. Click the New button beneath the checkbox to open the Data Mapper.

Load Source and Target Formats

    1. Use the Open Source Format button above the Source Format panel to open the Select Format dialog. Choose XML from the Format Reader selection box.
    2. Click the Add button and in the File Selector navigate to where the the sample files are located. Choose the file people.xml. Click OK, and then click Read Format.
    3. Use the Open Target Format button above the Target Format panel to re-open the dialog. From the XML Format Reader, re-open the File Selector and select the file robots.xml. Click OK, and then click Read Format.
    4. The Source and Target format panels should now be populated.

Map the Root Nodes and Add Iteration

    1. Select the People Node that is the root of the tree in the Source panel to the left. Drag it onto the center panel and drop it on the stylesheet node that’s already there.
    2. Select the Robots node that is the root of the tree in the Target panel to the right. Drag it onto the center panel and drop it on the People node that was just dropped there. This creates the implicit default Template in the XSLT document.
    3. Above the center mapping panel is the extensions panel. The currently displayed tab, Filter by Pattern, has a text field called Pattern. Type for-each into that field.
    4. A single item should be present in the panel. This item should also be called for-each. Select it and drag it onto the Robots node in the center mapping panel.
    5. Select the Person node that is a child of the People node in the source format tree, and drag it onto the @select node beneath the for-each node in the center mapping panel.
    6. Select the Robot node that is a child of the Robots node in the target format tree and drag it onto the for-each node in the center mapping panel.Map the Root Nodes and Add Iteration

Finish the Mapping

    1. Select all of the nodes that are children of the Robot node in the target format panel and drag them onto the center panel and drop them onto the Robot node.
    2. Click the + button next to the Title, Vehicle, and Location Nodes in the Target format panel to expand them and show their child nodes.
    3. Select all the child nodes beneath Title in the Target format panel, and drag them onto the center panel and drop them onto the Title node there. Repeat this with the children of Vehicle and Location.
    4. Now that the whole Target format has been configured in the center panel, it’s time to map the Source format to it. Map the nodes in the following way:
      1. Source: Name/First -> Target: Title/One
      2. Source: Name/Middle -> Target: Title/Two
      3. Source: Name/Last -> Target: Title/Three
      4. Source: Gender -> Target: Type
      5. Source: SSN -> Target: ID
      6. Source: BirthDate -> Target: CreationDate
      7. Source: Occupation -> Target: Function
      8. Source: Vehicle/Make -> Target: Vehicle/Make
      9. Source: Vehicle/Model -> Target: Vehicle/Model
      10. Source: Vehicle/Year -> Target: Vehicle/Year
      11. Source: Address/Line1 -> Target: Address/Line1
      12. Source: Address/City -> Target: Address/City
      13. Source: Address/State -> Target: Address/State
      14. Source: Address/Zip -> Target: Address/Zip

Add Tabular Mapping

    1. In the top extensions panel, type Tabular Mapping into the Filter by Pattern field.
    2. A single item should be present in the panel. This item should also be called Tabular Mapping.
    3. Find the Gender source node in the center panel, which has been mapped to the target node Type. Drag the Tabular Mapping node from the extensions panel down to the center panel and drop it on the Gender node.
    4. The Please Choose Tabular Mapping dialog is now open. Click the Define New button to create a new mapping.
    5. Enter GenderCodes in the Mapping Name field.
    6. Click the Add button to open the Tabular Code Mapping dialog. In the dialog, input Male into the Source field and input 2 into the Target field. Click OK to save.
    7. Click the Add button to re-open the dialog. In the dialog, input Female into the Source field and input 1 into the Target field. Click OK to save.
    8. Click the Add button to re-open the dialog. In the dialog, input Other into the Source field and input 0 into the Target field. Click OK to save.
    9. Below the values table in the dialog, input -1 into the Default Value field.Configure Tabular Mapping
    10. Click OK to save the mapping. This will return to the original dialog, with the GenderCodes mapping now listed as an option in the main panel.
    11. To finish adding the Tabular Mapping, select the GenderCodes mapping from the list in the main panel and then click the Select button at the bottom of the dialog.finish adding the Tabular Mapping

Configure the Transport

    1. Select the Transport stage in the Route Editing Grid. The configuration panel will appear at the bottom.
    2. Select Directory/File from the Transport Type selection box. Optionally, click the button to open the Module Search Dialog, which provides a faster way to find the module you’re looking for.
    3. Select the Target Directory, using the button to open the file selector.
    4. Set robots-tabular-output as the Target File Name.
    5. Set xml as the Target File Extension.
    6. Now that the mapping is complete, click the Save icon in the toolbar above the tree. When prompted for a name, use the default, transform.
    7. Click the X button in the top-right corner to close the Data Mapper and return to the Route Editing Grid.

Document the Target System

    1. Select the Target System stage in the Route Editing Grid. The configuration panel will appear at the bottom.
    2. Change the System Name to Robots XML File
    3. Select the Choose Target Icon button, and scroll down to select one of the XML icons

Prepare to Test

    1. In the menu bar at the top, select Mode -> Testing Mode. Make sure the changes to the Route are saved.
    2. Copy the file people.xml from the Samples directory provided into the directory chosen as the polling directory.

Perform the Test

    1. At the top of the Testing Mode screen, select the Execute Test button.
    2. If the Route was configured successfully, all the Stages should light up with green checkmarks.
    3. In the OS File Explorer, open the directory selected as the Target Directory. The file robots-tabular-output.xml should be there, with the transformed contents produced by the XSLT.

Output Files

    1. Compare the results from the exercise with the following example output files to see if they are correct.
      1. robots-tabular-output.xml

This is a unique website which will require a more modern browser to work! Please upgrade today!