Contents

Creating mappings is as simple as dragging an input node and dropping it on a target structure node. The eMapper also provides few other options to manage mappings.

Exporting eMapper Project

To export the eMapper project, right-click on the project node and select Export. Select the destination file and the project will be exported as an archive.

Importing Project from the File

A eMapper project an be imported either from an existing .tmf file or from another eMapper project.

To import the project from an existing project:

  1. Right-click on the Mapper Projects node and choose Import. The Import wizard is displayed.
  2. Choose the zip file from which the projects are to be imported. The Import wizard is opened with a list of all available projects. Choose the required projects and click Finish to import the projects.

To import mappings from a .tmf file:

  1. Right click on Mapper projects node and click New.
  2. In the New eMapper Project wizard, provide a valid project name and select the Load from tmf file option.
  3. Load the tmf file using the browse button provided and click Finish.
  4. The new eMapper project with the Mappings from the provided .tmf is created in the workspace.

Copying functions in a Mapping

You can copy functions within a mapping project and across mapping projects. To copy a function

  1. Select the function in the funclet view and click Copy from the right-click menu.


    Figure 1: Copying a function
     
  2. Click Paste and the function is pasted in the funclet view and can be reused within or even across mappings.

Clearing All Mappings

To clear all the mappings between the Input and the Output Structure,

  1. Right-click on the line panel and select Clear Mappings.
  2. A warning dialog box is displayed showing a confirmation message. Click Yes to remove all the existing mappings between the input and output structures.

Managing XSLT Properties

You can also manage the XSLT properties of the output XSLT. To do this:

Click Tools > XSLT Properties. The XSLT Properties dialog box is displayed.


Figure 2: Viewing XSLT Properties

This dialog box contains the following components:

  • XSLT Version: The XSLT version [1.0 / 2.0] to be used while generating the XSL.
  • XSLT Engine: The XSLT Transformation Engine to be used for performing the transformation. The available implementations are Xalan, Saxon and XSLTC
  • XSLT Encoding: Specifies the encoding of the generated XSL.
  • Include DTD: Select this option to include the internal specified DTD in the transformation output. This option is disabled by default.
  • <xsl output: attributes>
    • Output Method: Select the method of output after transformation from the drop-down list. The method of output can be HTML, XML, or text.
    • Indent: Select this option to indent the output XML.
    • Output Encoding: Specifies the encoding of the generated output XSL.
    • Omit-xml-declaration: Specifies whether the output XML generated should contain XML declarations or not.
  • Create empty tags for unmapped output elements: Select this option to create empty tags for all unmapped elements of the output structure.
  • Add xsi:type attributes to elements: Selecting this option will add xsi:type attribute to all the elements in the output XML.
  • Suppress optional empty items: Select this option for defining a mapping to an output node, always generate the output nodes in output xml since event input xml has no matching nodes. It is sometimes desirable not to generate optional output nodes if no input matching node is found in input xml. This requires using conditional mapping. You can specify such conditional mapping by using "User XSL" feature. eMapper can generate such conditions automatically for optional elements if this option is selected.
  • Disable Output Escaping for xs:ANY elements in output: Selecting this option will disable output escaping for all the xs:ANY elements in the output xml.
  • Add xsi:type attributes to elements: Selecting this option will add an xsi:type attribute to all elements. The value of this attribute asserts the type of the element.
  • Namespaces: While generating the XSL, namespace prefixes are generated for all the namespaces included in the output and input structures of the mapper project. These generated prefixes are in the format 'ns<index>'.
    • Result Prefixes to be excluded: A space separated list of namespace prefixes that should be excluded from the output
    • Namespace prefixes: Custom namespace prefixes can be defined for some namespace URL's. These will be used in the generated XSL instead of auto-generated ones. It is advisable to add any namespaces used in User XSL here to avoid issues due to modified auto-generated namespaces. Namespace prefixes can be added or removed from the table using the Add and Remove buttons
    • The Fetch button at the bottom of the table fetches all the namespaces from all the input and output structures added in the mapper project to the Namespace prefixes table.
Adaptavist ThemeBuilder EngineAtlassian Confluence