xml spy
Previous  Top  Next

Assigning Files and Folders


In this section, we describe how file-type and folder-type global resources are assigned. File-type and folder-type global resources are assigned differently. In any one of the usage scenarios below, clicking the command to assign a resource from a global resource pops up the Choose Global Resource dialog (screenshot below).

 

DlgAltGlobalResChooseGlobalRes

 

Selecting a file-type global resource assigns the file. Selecting a folder-type global resource causes an Open dialog to open, in which you can browse for the required file. The path to the selected file is entered relative to the folder resource. So if a folder-type global resource were to have two configurations, each pointing to different folders, files having the same name but in different folders could be targeted via the two configurations. This could be useful for testing purposes.

 

 

Usage scenarios

File-type and folder-type global resources can be used in the following scenarios:

 

Adding and modifying schema sources and Working XML Files and Template XML Files
Creating a new SPS from a global resource
Adding modules and CSS files
Adding global resources to a project

 

 

Schema, Working XML File, Template XML File

In the Design Overview sidebar (screenshot below), the context menus for the Schema, Working XML File, Template XML File contains an entry for assigning the respective file via a global resource (highlighted in screenshot below). Clicking this command pops up a dialog with a list of all file-type global resources that are defined in the Global Resources XML File currently active in StyleVision. (How to set the currently active Global Resources XML File is described in the section Defining Global Resources.)

 

DesOviewConMenuGlobalRes

 

If a global resource has been selected as the file source, it is displayed in the relevant entry in the Design Overview sidebar (screenshot below).

 

DesOviewAliasSelected

 

 

Creating a new SPS from a global resource

The command File | New | New from Global Resource enables you to create an SPS from a global resource. If the global resource is a schema, you will be prompted for a Working XML File assignment. If the global resource is an XML file, you will be asked whether you wish to generate an XML Schema or to select a schema.

 

 

Adding modules and CSS files from a global resource

In the Design Overview sidebar, the Add New Module and Add New CSS File commands pop up a menu in which you can choose to assign the SPS file and CSS file, respectively, via global resources. Modules and CSS files can then be changed by changing the configuration.

 

 

Global Resources in projects

Global resources can also be added to the currently active project via the Project | Add Global Resource to Project command. This pops up a dialog listing the file-type global resources in the currently active Global Resources XML File. Select a global resource and click OK to add it to the project. The global resource appears in the Project sidebar and can be used like any other file.

 

 


See also:

 

 


 

 


Previous  Top  Next

© 2008 Altova