Altova MapForce 2022 Professional Edition

After you add an XML component to the mapping area, you can configure its settings in the Component Settings dialog box (see screenshot below). You can open the Component Settings dialog box in one of the following ways:

 

Double-click the component header.

Right-click the component header and select Properties.

Select the component in the mapping and click Properties in the Component menu.

xml_component_settings_dialog_box

The available settings are described in the subsections below.

 

General settings

Component name

The component name is automatically generated when you create the component. However, you can change the name at any time.

 

The component name can contain spaces and full stop characters. It may not contain slashes, backslashes, colons, double quotes, leading or trailing spaces. If you want to change the name of the component, be aware of the following:

 

If you intend to deploy the mapping to FlowForce Server, the component name must be unique.

It is recommended to use only characters that can be entered at the command line. National characters may have a different encoding in Windows and at the command line.

 

Schema File

Specifies the name or path of the XML schema file used by MapForce to validate and map data. To change the schema file, click Browse and select a new file. To edit the file in Altova XMLSpy, click Edit.

 

Input XML File

Specifies the XML instance file from which MapForce will read data. This field is meaningful for a source component and is filled when you first create the component and assign an XML instance file to this component. In a source component, the instance file name is also used to detect the XML root element and the referenced schema, and to validate against the selected schema. To change the schema file, click Browse and select a new file. To edit the file in Altova XMLSpy, click Edit.

 

Output XML File

Specifies the XML instance file to which MapForce will write data. This field is meaningful for a target component. To change the schema file, click Browse and select a new file. To edit the file in Altova XMLSpy, click Edit.

 

Prefix for target namespace

Allows you to enter a prefix for the target namespace. Before assigning the prefix, make sure the target namespace is defined in the target schema.

 

Add schema/DTD reference

Adds the path of the referenced XML schema file to the root element of the XML output. The path of the schema entered in this field is written into the generated target instance file(s) in the xsi:schemaLocation attribute or into the DOCTYPE declaration if a DTD is used.

 

MapForce Professional and Enterprise editions: If you generate code in XQuery or C++, adding the DTD reference is not supported.

 

Entering a path in this field allows you to define where the schema file referenced by the XML instance file is to be located. This ensures that the output instance can be validated at the mapping destination when the mapping is executed. You can enter an http:// address as well as an absolute or relative path in this field.

 

Deactivating this option allows you to disconnect the XML instance from the referenced XML schema or DTD. This may be useful, for example, if you want to send the XML output to someone who does not have access to the underlying XML schema.

 

Write XML declaration

By default, the option is enabled, which means that the XML declaration is written to the output. The table below shows how this feature is supported in MapForce target languages and execution engines.

 

Target language/Execution engine

When output is a file

When output is a string

Built-in (Professional and Enterprise editions)

Yes

Yes

MapForce Server (Professional and Enterprise editions)

Yes

Yes

XSLT, XQuery

Yes

No

Code generator (C++, C#, Java) (Professional and Enterprise editions)

Yes

Yes

 

Cast values to target types

This option allows you to define if the target XML schema types should be used when in the mapping or if all data mapped to the target component should be treated as string values. By default, this setting is enabled. Deactivating this option allows you to retain the precise formatting of values. For example, this is useful to satisfy a pattern facet in a schema that requires a specific number of decimal digits in a numeric value. You can use mapping functions to format the number as a string in the required format, and then map this string to the target.

 

Note that disabling this option will also disable the detection of invalid values, e.g. writing letters into numeric fields.

 

Pretty print output

Reformats the output XML document to give it a structured look. Each child node is offset from its parent by a single tab character.

 

Create digital signature (Enterprise Edition only)

Allows you to add a digital signature to the XML output instance file. Adding a digital signature is possible when you select Built-in as a transformation language.

 

Output Encoding

Allows you specify the following settings of the output instance file:

 

Encoding name

Byte order

Whether the byte order mark (BOM) character should be included.

 

By default, any new components have the encoding defined in the Default encoding for new components option. You can access this option from Tools | Options, General tab.

 

If the mapping generates XSLT 1.0/2.0, activating the Byte Order Mark check box does not have any effect, as these languages do not support Byte Order Marks.

 

StyleVision Power Stylesheet file

This option allows you to select or create an Altova StyleVision stylesheet file. Such files enable you to output data from the XML instance file to a variety of formats suitable for reporting, such as HTML, RTF, and others. See also Using Relative Paths on a Component.

 

Other settings

Enable input processing optimizations based on min/maxOccurs

This option allows special handling for sequences that are known to contain exactly one item, such as required attributes or child elements with minOccurs and maxOccurs="1". In this case, the first item of the sequence is extracted, then the item is directly processed as an atomic value (and not as a sequence).

 

If the input data is not valid against the schema, an empty sequence might be encountered in a mapping, which stops the mapping with an error message. To allow the processing of such invalid input, disable this check box.

 

Save all file paths relative to MFD file

When this option is enabled, MapForce saves the file paths displayed on the Component Settings dialog box relative to the location of the MapForce Design (.mfd) file. See also Using Relative Paths on a Component.

 

© 2016-2022 Altova GmbH