Altova MapForce 2025 Basic Edition

At this stage, we want to add an XSD file that will be the structure of the first component and an XML file that will provide the data for this component. The source file called Books.xsd can be added to the mapping in one of the following ways:

 

Click ic-new-schema (Insert XML Schema/File) in the toolbar.

In the Insert menu, click XML Schema/File.

Drag Books.xsd from the Windows Explorer into the mapping area.

 

If you select one of the first two options, the Insert XML Schema File dialog will suggest choosing between a prepackaged schema or a local or remote file. In our tutorials, all the files are local. For more information about how to add XML files, see XML and XML Schema.

 

If a component is created from an XSD file, you will be prompted to supply an XML file that will be used as the component’s data file. If a component is created from an XML file, the XSD file that is referenced from the XML file will be used to define the structure of the component’s data. If no reference to an XSD file exists, MapForce will suggest generating an XSD file for this component.

 

Since we add the schema file first, MapForce suggests adding a sample XML file. Click Browse and search for Books.xml that is located in the same folder. Thus, our source file contains both a schema and content.

 

View the structure

Now that the source file has been added to the mapping area, you can see its structure. In MapForce, this structure is known as a mapping component or simply a component. You can expand elements in the component by clicking the gui_expand icon. Alternatively, you can press the + key on the numeric keypad. The screnshot below illustrates the source component:

MF_Tut1_AddSource1

The name of the header (Books) only refers to the name of the component and not the name of the schema this file is based on. To see the name of the schema and other properties of the component, double-click the component's header. This will open the Component Settings dialog box.

 

The top-level node of the component (File: Books.xml) represents the name of the XML instance file. The XML elements in the structure are represented by the component_element icon. XML attributes are represented by the component_attribute icon. The small triangles, displayed on both sides of the component, represent data inputs on the left side and outputs on the right side. In MapForce, these triangles are called input connectors and output connectors, respectively.

 

For more information about components, connections, general procedures and features, see Mapping Fundamentals.

 

© 2018-2024 Altova GmbH