XML Component Settings
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:
•By double-clicking the component header
•By right-clicking the component header and selecting Properties
•By selecting the component in the mapping and clicking Properties in the Component menu
The available settings are described in the subsections below.
General settings
The component name is automatically generated when you create a component. However, you can change the name at any time. The component name can contain spaces and full stops. It may not contain slashes, backslashes, colons, double quotes, leading and 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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
Selecting this option inserts the standalone="yes" declaration into the XML declaration of your target XML file. For more information, see Standalone Document Declaration.
Note the following points:
•When you select the standalone="yes" check box and save your MFD file, the saved file becomes incompatible with older MapForce versions. •When the standalone="yes" option is selected, output generation is compatible with XSLT 1-3, Built-In, and generated code (C#, Java, C++ MSXML, C+ Xerces). The Built-In transformation language and generated code are available in Professional and Enterprise editions. •There is no support for XML embedded in database fields and Web service requests (Professional and Enterprise editions). •When you select the standalone="yes" check box and want to deploy your mapping to FlowForce Server, you must use MapForce Server 2023r2 or later (Professional and Enterprise editions).
|
This option allows you to define (i) whether the target XML schema types should be used in the mapping or (ii) whether 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.
|
Reformats the output XML document to give it a structured look. Each child node is offset from its parent by a single tab character.
|
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 to 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 section).
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
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.
|
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 Relative and Absolute Paths.
|