Altova XMLSpy 2024 Professional Edition

The Global Resource dialog for Files (screenshot below) is accessed via the Add | File command in the Manage Global Resources dialog. In this dialog, you can define configurations of the alias that is named in the Resource Alias text box. After specifying the properties of the configurations as explained below, save the alias definition by clicking OK.

 

After saving an alias definition, you can add another alias by repeating the steps given above (starting with the Add | File command in the Manage Global Resources dialog).

 

Global Resource dialog

An alias is defined in the Global Resource dialog (screenshot below).

Click to expand/collapse

 

Global Resource dialog icons

 

ic_AddConfiguration

Add Configuration: Pops up the Add Configuration dialog in which you enter the name of the configuration to be added.

ic_AddConfigurationCopy

Add Configuration as Copy: Pops up the Add Configuration dialog in which you can enter the name of the configuration to be created as a copy of the selected configuration.

ic_DeleteConfig

Delete: Deletes the selected configuration.

ic_SaveAsFilePath

Open: Browse for the file to be created as the global resource.

 

 

Defining the alias

Define the alias (its name and configurations) as follows:

 

1.Give the alias a name: Enter the alias name in the Resource Alias text box.

2.Add configurations: The Configurations pane will have, by default, a configuration named Default (see screenshot above), which cannot be deleted or renamed. You can add as many additional configurations as you like by: (i) clicking the Add Configuration or Add Configuration as Copy icons, and (ii) giving the configuration a name in the dialog that pops up. Each added configuration will be shown in the Configurations list. In the screenshot above, two additional configurations, named Long and Short, have been added to the Configurations list. The Add Configuration as Copy command enables you to copy the selected configuration and then modify it.

3.Select a resource type for each configuration: Select a configuration from the Configurations list, and, in the Settings for Configuration pane, specify a resource for the configuration: (i) File, (ii) Output of an Altova MapForce transformation, or (iii) Output of an Altova StyleVision transformation. Select the appropriate radio button. If a MapForce or StyleVision transformation option is selected, then a transformation is carried out by MapForce or StyleVision using, respectively, the .mfd or .sps file and the respective input file. The result of the transformation will be the resource.

4.Select a file for the resource type: If the resource is a directly selected file, browse for the file in the Resource File Selection text box. If the resource is the result of a transformation, in the File Selection text box, browse for the .mfd file (for MapForce transformations) or the .sps file (for StyleVision transformations). Where multiple inputs or outputs for the transformation are possible, a selection of the options will be presented. For example, the output options of a StyleVision transformation are displayed according to what edition of StyleVision is installed (the screenshot below shows the outputs for Enterprise Edition).

DlgAltovaResourceOutputsSV

Select the radio button of the desired option (in the screenshot above, 'HTML output' is selected). If the resource is the result of a transformation, then the output can be saved as a file or itself as a global resource. Click the ic_SaveAsFilePath icon and select, respectively, Global Resource (for saving the output as a global resource) or Browse (for saving the output as a file). If neither of these two saving options is selected, the transformation result will be loaded as a temporary file when the global resource is invoked.

5.Define multiple configurations if required: You can add more configurations and specify a resource for each. Do this by repeating Steps 3 and 4 above for each configuration. You can add a new configuration to the alias definition at any time.

6.Save the alias definition: Click OK to save the alias and all its configurations as a global resource. The global resource will be listed under Files in the Manage Global Resources dialog.

 

 

Result of MapForce transformation

Altova MapForce maps one or more (existing) input document schemas to one or more (new) output document schemas. This mapping, which is created by a MapForce user, is known as a MapForce Design (MFD). XML files, text files, databases, etc, that correspond to the input schema/s can be used as data sources. MapForce generates output data files that correspond to the output document schema. This output document is the Result of MapForce Transformation file that will become a global resource.

 

If you wish to set a MapForce-generated data file as a global resource, the following must be specified in the Global Resource dialog (see screenshot below):

GRAddResMF2

A .mfd (MapForce Design) file. You must specify this file in the Resource will point to generated output of text box (see screenshot above).

One or more input data files. After the MFD file has been specified, it is analyzed and, based on the input schema information in it, default data file/s are entered in the Inputs pane (see screenshot above). You can modify the default file selection for each input schema by specifying another file.

An output file. If the MFD document has multiple output schemas, all these are listed in the Outputs pane (see screenshot above) and you must select one of them. If the output file location of an individual output schema is specified in the MFD document, then this file location is entered for that output schema in the Outputs pane. From the screenshot above we can see that the MFD document specifies that the Customers output schema has a default XML data file (CustomersOut.xml), while the Text file output schema does not have a file association in the MFD file. You can use the default file location in the Outputs pane or specify one yourself. The result of the MapForce transformation will be saved to the file location of the selected output schema. This is the file that will be used as the global resource

 

Note:The advantage of this option (Result of MapForce transformation) is that the transformation is carried out at the time the global resource is invoked. This means that the global resource will contain the most up-to-date data (from the input file/s).

 

Note:Since MapForce is used to run the transformation, you must have Altova MapForce installed for this functionality to work.

 

 

Result of StyleVision transformation

Altova StyleVision is used to create StyleVision Power Stylesheet (SPS) files. These SPS files generate XSLT stylesheets that are used to transform XML documents into output documents in various formats (HTML, PDF, RTF, Word 2007+, etc). If you select the option Result of StyleVision Transformation, the output document created by StyleVision will be the global resource associated with the selected configuration.

 

For the StyleVision Transformation option in the Global Resource dialog (see screenshot below), the following files must be specified.

GRAddResSV2

A .sps (SPS) file. You must specify this file in the Resource will point to generated output of text box (see screenshot above).

Input file/s. The input file might already be specified in the SPS file. If it is, it will appear automatically in the Inputs pane once the SPS file is selected. You can change this entry. If there is no entry, you must add one.

Output file/s. Select the output format in the Outputs pane, and specify an output file location for that format.

 

Note:The advantage of this option (Result of StyleVision transformation) is that the transformation is carried out when the global resource is invoked. This means that the global resource will contain the most up-to-date data (from the input file/s).

 

Note:Since StyleVision is used to run the transformation, you must have Altova StyleVision installed for this functionality to work.

 

© 2017-2023 Altova GmbH