Altova MapForce 2025 Basic Edition

The next step is to create the file name of each output file. For this purpose, we will use the concat function that joins all the values supplied to it. When these values are joined together, they will create an output file name (e.g., Publication1.xml). To generate the file names using the concat function, take the steps described below.

 

Step 1: Add the concat function

Add the concat function (screenshot below) to the mapping area. By default, this function has two parameters when it is added to the mapping. In our example, we need three parameters. Click gui_add_function_parameter (Add parameter) inside the function component and add a third parameter to it. Note that clicking gui_delete_function_parameter (Delete parameter) deletes a parameter.

MF_Tut4_ConfigOutput1

 

Step 2: Insert a constant

The next step is to add a constant. When you are prompted to supply a value, enter publication and leave the String option unchanged. Connect the constant with value1 of the concat function, as shown in the screenshot below:

MF_Tut4_ConfigOutput2

 

Step 3: Supply IDs

Connect the id attribute of the source component with value2 of the concat function (screenshot below). The id attribute of the source XML file supplies a unique identifier value for each file. This helps prevent the files from being generated with the same name. The connection becomes red when you click on it.

MF_Tut4_ConfigOutput3

 

Step 4: Extract the file extension

Add the get-fileext function to the mapping area. Then create a connection from the top node of the source component (File: BookTitle*.xml) to the filepath parameter of this function (screenshot below).

 

The next step is to connect the extension parameter of the get-fileext function to value3 of the concat function. By doing this, you are extracting only the extension part (in this case, .xml) from the source file name and passing it to the output file name.

MF_Tut4_ConfigOutput4

 

© 2018-2024 Altova GmbH