Altova MapForce 2025 Professional Edition

In mappings where the target component is XML , it is possible to preview and save the mapping output as HTML, RTF, PDF, Word 2007+, and Text documents if Altova StyleVision is installed on your computer. If you are using StyleVision Enterprise Edition, charts will also be rendered in these previews. When a mapping supports preview in any of these formats, additional panes become available next to the Output pane (see screenshot below).

mf_stylevision_tabs

Important

 

When StyleVision Professional is installed, it is possible to preview HTML, RTF, and Text outputs.

With StyleVision Enterprise, it is possible to preview HTML, RTF, PDF, Word 2007+, and Text outputs.

Previewing the mapping output as PDF requires Java, Acrobat Reader, and FOP (Formatting Objects Processor) version 0.93 or 1.0. FOP is installed together with StyleVision unless you opted not to install it when installing StyleVision.

In the 64-bit edition of MapForce, the Word 2007+ and RTF previews are opened as non-embedded applications.

If your mapping contains components that act both as sources and targets (pass-through components), the StyleVision preview will be possible only for those components where the Preview button ic-preview of the component has been activated. For more information about such mappings, see Chained Mapping.  

 

To preview your mapping data in the StyleVision output panes, the following is required:

 

Altova StyleVision must be installed on your computer either as a standalone installation or as part of Altova MissionKit.

The target component must have a StyleVision Power Stylesheet (SPS) file associated with it. The stylesheet file can be created or edited with StyleVision. You cannot edit or change the stylesheet in MapForce directly, but you can open it via MapForce in StyleVision. Once the stylesheet is ready, you can assign it to a target MapForce component, as shown below.

 

StyleVision output panes configuration

The instructions below will help you set up StyleVision output panes.

 

Assign a StyleVision Power Stylesheet to a target component

To assign an SPS file to a target component, take the following steps:

 

1.In StyleVision, create the required stylesheet file. Make sure to use the same XML schema as a source as that of the MapForce component.

2.In MapForce, right-click the target XML component and select Properties.

3.In the Component Settings dialog box, next to StyleVision Power Stylesheet file, browse for the stylesheet file created previously (see screenshot below).

mf_assign_sps
Note:The path to the StyleVision Power Stylesheet file can be absolute or relative. For details, see Relative and Absolute Paths.

 

Save the StyleVision-generated output

You can save the StyleVision-generated output to a file in a similar way as saving the result of any other mapping: Click the ic-save-sel-string toolbar button (Save generated output) or go to the Output menu and click Save Output File.

 

Automate generation of different formats with Altova products

If you need your mapping to generate HTML, PDF, RTF, Word 2007+, and Text files automatically (either on the same or on a different computer or even platform), you can use MapForce Server or StyleVision Server. These are separately licensed server products that extend the functionality of MapForce and StyleVision, respectively. In this scenario, each application plays its own specific role:

 

MapForce enables you to design a mapping (.mfd) which defines the data transformation inputs and outputs (for example, database to XML)

MapForceServer runs the executable mapping (.mfx) from the command line or an API (on the same or a different operating system)

StyleVision enables you to design the stylesheet (.sps) required to transform the mapping output to HTML, PDF, RTF, Word 2007+, and Text files.

StyleVision Server runs the .sps stylesheet which transforms the mapping output to a desired format. This happens in the command line or from an API (on the same or a different operating system).

Both StyleVision Server and MapForce Server can optionally run under the management of FlowForce Server (licensed separately). In this scenario, MapForce mappings and StyleVision transformations can run as scheduled, triggered, or on-demand jobs. This means that these MapForce mappings and StyleVision transformations can be fully automated.

 

Examples

The example below (MapForceExamples\CompletePO.mfd) shows the output in the StyleVision output pane called HTML. This mapping produces a purchase order in XML format. Right-click the target component, select Properties, and notice that it has a .sps file assigned to it.

 

If you click the HTML pane, you will see the following output:

mf_stylevision_example1_zoom70

Another example is Tutorial\YearlySales.mfd. The stylesheet assigned to this mapping was designed in StyleVision in such a way that it is possible to control the type of the chart by changing the value of the ChartType element. This makes it possible to change the chart type directly from the mapping: You can change the default value of the constant to any value from 1 to 7. If you place the mouse cursor over the value-map component, you will see the possible values (see screenshot below).

yearly20

The default value of the constant is 2, which generates a 3D pie chart in the output. To display other chart types, change this value to any other allowed value and click the Output pane to see the changes.

 

© 2018-2024 Altova GmbH