Please enable JavaScript to view this site.

Altova MapForce 2020 Professional Edition

Functions

Importing Custom XQuery 1.0 Functions

Scroll Home Prev Top Next More

When XQuery is selected as mapping transformation language, MapForce displays the built-in function libraries available for XQuery in the Libraries window. If necessary, you can extend this list with custom XQuery functions, by importing custom XQuery 1.0 library modules into MapForce.

 

To be eligible for import into MapForce, an XQuery file must satisfy the following requirements:

 

It must be a valid library module according to XQuery specification. In other words, it must start with a module declaration such as module namespace <prefix>="<namespace name"

All functions declared in the imported library module must return atomic data types (for example, xs:string, xs:boolean, xs:integer, etc). Function parameters must also have atomic types.

To import an XQuery library module:

1.Click the Add/Remove Libraries button at the base of the Libraries window. The Manage Libraries window opens.

mf_manage_libraries_window_empty

2.Do one of the following:

 

To import functions as a local library (in the scope of the current document only), click the Add button under the current mapping name.

To import functions as a global library (at program level), click the Add button adjacent to Global Library Imports.

 

Note:When you import a library locally, you can set the path of the library file to be relative to the mapping file. With globally imported libraries, the path of the imported library is always absolute.

 

3.Browse for the .xq or .xquery library file, and click Open.

 

The imported library modules appear in the Libraries window, and then you can drag specific functions into the mapping area and use them like any other MapForce function component, see also Add a Function to the Mapping.

 

If you do not see the imported XQuery library module, make sure that XQuery is selected as transformation language.

 

See also:

XQuery engine implementation

© 2020 Altova GmbH