Please enable JavaScript to view this site.

Altova MapForce 2021 Professional Edition

Designing Mappings

Styling Mapping Output with StyleVision

Scroll Home Prev Top Next More

In mappings where the target component is XML , it is possible to preview and save the mapping output as HTML, RTF, PDF and Word 2007+ documents, provided that Altova StyleVision is installed on your computer. If you are using the Enterprise edition of StyleVision, then charts will also be rendered in these previews.


When a mapping supports preview in any of these formats, additional tabs become available next to the Output tab, for example:


StyleVision preview tabs (MapForce Enterprise Edition)

Note the following:


When StyleVision Professional is installed, it is possible to preview HTML and RTF output. With StyleVision Enterprise, it is possible to preview HTML, RTF, PDF, and Word 2007+ output.

Previewing 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 a non-embedded application.

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


In order to preview data from a mapping in this way, 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 to 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.


Assigning a StyleVision Power Stylesheet to a target component

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

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

3.On the Component Settings dialog box, next to StyleVision Power Stylesheet file, browse for the stylesheet file created previously.


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


Saving the StyleVision-generated output

You can save the StyleVision-generated HTML, PDF, RTF, or Word 2007+ output to a file in a similar way as saving the result of any other mapping. Namely, after previewing the mapping, do one of the following:


Click the Save generated output ( ic-save-sel-string ) toolbar button.

On the Output menu, click Save Output File.


Automating generation of HTML, PDF, RTF, Word 2007+ files with Altova product suite

If your mapping should generate HTML, PDF, RTF, and Word 2007+ files automatically (either on the same or on a different computer or even platform), this is possible with MapForce Server and StyleVision Server (these are separately licensed server products that extend the functionality of MapForce and StyleVision, respectively). In this scenario, each application plays the following distinct role:


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

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

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

StyleVision Server - runs the .sps stylesheet which transforms the mapping output to a target desired format. This happens at the command line or from an API (either 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, and thus be fully automated.

© 2015-2021 Altova GmbH