How to Test XSLT Maps that Use XREF Functions

You can use the local dvm lookup file, called UnitTestXrefFunctionReturn.dvm to emulate the test. This file is automatically generated when you run the XSLT test for the first time.

The UnitTestXrefFunctionReturn.dvm file includes default responses for all the XREF functions. This simulates the expected responses when the functions execute correctly. You may modify the default responses. You can also create different return values for different calls of the same function when the parameter values are different.

The following figure shows the initial DVM file.

Figure 41-41 The UnitTestXrefFunctionReturn.dvm File

Description of Figure 41-41 follows
Description of "Figure 41-41 The UnitTestXrefFunctionReturn.dvm File"

The functionName column specifies the name of the function. To start with, there is only one entry for each function with the default behavior defined. All XREF functions execute with this default information. You can optionally create more entries for a given function, and enter different return values for the function based on the input parameters.

The returnValue column specifies the return value from the function. This defines what you would like to see returned from the function.

The other columns define qualifiers that you can use to differentiate one function call from another, based on the value of a given parameter. Each of these columns define a parameter available in a given function call. Not all parameters are available in all functions. When a parameter is not available, it is marked as NA (Not Available) in the original table.