Please enable JavaScript to view this site.

Altova MapForce 2021 Basic Edition

Functions

Managing Function Libraries

Scroll Home Prev Top Next More

In MapForce, you can import and use the following kinds of libraries in a mapping:

 

Any mapping design files (*.mfd) that contain user-defined functions (UDFs). This specifically refers to mapping files that contain UDFs created with MapForce, using the MapForce built-in functions and components as building blocks. For further information, see Creating User-Defined Functions.

Custom XSLT files that contain functions. This refers to XSLT functions written outside of MapForce that qualify for import into MapForce as described in Importing Custom XSLT 1.0 or 2.0 Functions.

 

Manage Libraries window

You can view and manage all libraries used by a mapping file from the Manage Libraries window. This includes UDFs and custom libraries.

 

By default, the Manage Libraries window is not visible. To display it, do one of the following:

 

On the View menu, click Manage Libraries.

Click Add/Remove Libraries at the base of the Libraries window.

mf_bas_manage_libraries_window

You can choose to view UDFs and libraries only for the mapping document (.mfd file) that is currently in focus (active), or for all open mapping documents. To view imported functions and libraries for all of the currently open mapping documents, right-click inside the window and select Show Open Documents from the context menu.

 

To display the path of the open mapping document instead of the name, right-click inside the window and select Show File Paths from the context menu.

 

Data displayed in the Manage Libraries window is organized as a tree hierarchy as follows:

 

Any currently open mapping documents are displayed as top-level entries. Each entry has two branches: User-Defined Functions and Own Library Imports.

oThe User-Defined Functions branch displays any UDFs contained in that document.

oThe Own Library Imports branch displays libraries imported locally into the current mapping document. The term "libraries" means other mapping documents (.mfd files that contain user-defined functions) or custom external libraries written in XSLT 1,0 XSLT 2.0, XQuery 1.0*, Java*, C#*, or .mff files mentioned previously. Note that the Own Library Imports structure could be several levels deep, since any mapping document may import any other mapping document as a library.

The Global Library Imports entry encloses any custom libraries that you have imported globally at application level. Again, in case of .mfd files, the structure could be several levels deep, for the reasons mentioned above.

 

* These languages are supported only in MapForce Professional or Enterprise edition.

 

Note:The XSLT, XQuery, C#, and Java libraries may have dependencies of their own. Such dependencies are not displayed in the Libraries window.

 

 

Context menu commands

You can quickly perform various operations against objects in the Manage Libraries window by right-clicking an object and selecting one of the following context menu options:

 

Command

Description

Applicable for

Open

Opens the mapping.

Mappings

Add

Opens a dialog box where you can browse for a custom library of functions.

Own Library Imports

Locate Function in Libraries Window

Changes focus to the Libraries window, and selects the function.

Functions

Cut, Copy, Delete

These standard Windows commands are applicable only to MapForce user-defined functions. You cannot copy-paste functions from external XSLT files or other library kinds.

User-defined functions

Paste

Lets you paste a user-defined function that was previously copied to clipboard into the current library.

Libraries (UDF)

Options

Opens a dialog box where you can set or change options for the current library.

Libraries

Show All Open Documents

When this option is switched on, the Manage Libraries window will display all currently open mappings. This is typically useful if you need to copy-paste functions between mappings. Otherwise, only the mapping that is currently in focus is shown.

Always

Show File Paths

When this option is switched on, objects in the Manage Libraries window are displayed with their full path. Otherwise, only the object name is shown.

Always

© 2020 Altova GmbH