Altova MapForce 2023 Enterprise 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.

 

When you add a schema, 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. In the properties of every source or target component, we can specify an XSD file and XML fie. The XSD file defines the structure of the document in that component. The XML file provides the data of that component (source or target) and must be valid by the schema of that component. If a component is created from an XSD file, then you are prompted for an XML file that will be used as the component’s data file. If a component is created from an XML file, then the XSD 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 exists, MapForce will ask you if it may generate an XSD file for this component.

 

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

Books in the title bar indicates the name of the component. The top level node represents the name of the XML instance file: File: Books.xml. 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.

 

Move and resize components

To move the component inside the mapping pane, click the component header and drag the mouse to a new position. To resize the component, drag the bottom right-hand corner of the component. You can also double-click this corner so that MapForce adjusts the size automatically.

 

© 2017-2023 Altova GmbH