Scenario Properties General Tab (XSLT)

By default, Stylus Studio displays the Scenario Properties dialog box when you create a new stylesheet using File > New > XSLT Stylesheet. You can display the Scenario Properties dialog box from the XSLT editor XSLT Source tab or Mapper tab by clicking Browse next to the down arrow in the scenario name field.

A scenario allows you to preview the results of applying a stylesheet. Each scenario is for a particular group of settings. These settings include the name of an XML source document, the values of any parameters in the stylesheet, the values of any encoding settings, and the type of performance metrics you want Stylus Studio to capture, if any.

A scenario can be associated with only one stylesheet and only one XML source document. However, you can associate any number of scenarios with a stylesheet, and you can associate any number of scenarios with an XML source document.

Fields

Existing Scenarios

Lists the scenarios that have already been defined for the current stylesheet. To view the settings for a scenario, click the name of the scenario. Stylus Studio displays the settings in the General tab.

To add a new scenario, click Add. If Add is not active, type information in the fields in the General tab and click OK.

To copy an existing scenario, click the scenario you want to copy and click Clone. A new scenario is created with a default name in the Scenario Name field. All other settings are the same as those of the scenario on which you based the copy.

To delete a scenario, click it and then click Delete.

Scenario Name

The name of the new scenario. You can use the default name, or create one of your own. You can specify any characters that are allowed in Windows file names.

Source XML URL

Specify the absolute path for the source XML document you want to apply the stylesheet to in this scenario. If you want, click Browse to the right of the field to select to the path.

Output URL

Optionally specify or select an absolute path for the file that contains the result of applying the stylesheet. Each time you click Preview XSLT Result, Stylus Studio automatically updates the contents of this file, as well as displaying the result in the XSLT Preview window. If you specify a file that does not exist, Stylus Studio creates it.

Base URL For HTML Links Resolution

Specify the absolute path that Stylus Studio must use to resolve any links in your XML source document.

Store Paths Relative to XSLT Document Path

Select this option when you want all paths related to this scenario to be relative to the XSLT document. This is often convenient; however, you might want to always keep, for example, your XML source files in a particular location. In such a situation, do not select this option. This allows you to reference your XML files with an absolute path. You can move your stylesheet to a different directory and the absolute path for the source file is still correct.

Preview result in an external application

Displays the result in the default application for the output method specified for the stylesheet. For example, if the output method for the scenario is HTML and if Internet Explorer is the default application for displaying HTML files, Stylus Studio displays the resulting HTML in Internet Explorer, as well as in the XSLT Preview window.

Buttons

Add creates a new scenario.

Clone copies the selected scenario except for the scenario name.

Delete removes the selected scenario.

Browse the file system to select the source XML document.

For More Information

Applying Stylesheets

Creating a Scenario

Cloning Scenarios

 
Free Stylus Studio XML Training: