Altova MapForce 2025 Enterprise Edition

This topic explains how global resources are used in generated code. For more information, see the subsections below.

 

Global Resources in XSLT, XSLT 2, XQuery

When you generate XSLT or XSLT2 code and the mapping uses global resources, this does not affect the generated XSLT stylesheet in any way. With or without global resources, you can flexibly specify the input and output files when you run the XSLT stylesheet in your XSLT processor. The same applies to generated XQuery code.

 

An exception is the DoTransform.bat file generated for RaptorXML execution. Global resources used by the mapping will be resolved in actual paths in DoTransform.bat. The configuration which is currently selected from the global resources drop-down list will be taken into account. For information about supplying global resources to RaptorXML, see the RaptorXML documentation.

 

Global Resources in C++, C#, Java

When you generate C#, C++, or Java program code, global resources used by the mapping will be resolved. For example, a file or folder alias defined as a global resource will be converted to a file or folder path. If a particular global resource configuration is selected from the global resources drop-down list, the code will be generated for the selected configuration. The Messages window shows information about how exactly a global resource was resolved (see screenshot below).

mf_globalresource_03

To generate code for a particular global resource configuration, select it from the global resources drop-down list before generating code. Alternatively, if you generate code from the command line, supply the GLOBALRESOURCEFILE and GLOBALRESOURCECONFIG parameters at the command line. For details, see MapForce Command Line Interface.

 

It is not possible to switch or refer to global resources from generated code. Instead, you can modify the code to change the input or output file path.

 

Note:        In C# or Java, you can change the path and the data type of input or output.

 

© 2018-2024 Altova GmbH