How to Use a Third-Party Processor

You specify XSLT processors for stylesheets individually. You can, of course, create multiple scenarios for the same stylesheet, with each one using a different processor. When you use a third-party XSLT processor, output from the processor appears in the Preview window.

To use a third-party XSLT processor:
1. Open the stylesheet.
2. In the XSLT Editor, in the scenario name field, click the down arrow to display the scenarios associated with the stylesheet.
3. To use a third-party processor for an existing scenario, click the scenario name, and then click to display the Scenario Properties dialog box.

To create a new scenario, click Create Scenario. See Creating a Scenario.

4. In the Scenario Properties dialog box that appears, click the Processor tab.
5. Select the XSLT processor you want to use from the Processor drop-down list.

7. If you selected a standard XSLT processor, you are done. Click OK.

If you selected Use custom processor (%1 xml, %2 xslt, %3 output):

a. In the Command line field, type the command line for invoking the processor you want to run. You must specify the command line so that it is clear where to use the three arguments. Following are two examples:
b. In the Path field, specify any path that needs to be defined for the processor to run. Typically, this is the location of the processor.
c. In the Classpath field, type any directories the external processor needs to access that are not already specified in your CLASSPATH environment variable.
d. Click OK.
Using the Saxon Processor

Stylus Studio lets you execute XSLT transformations using either the Saxon-B (basic) or Saxon-SA (schema-aware) processor. You specify which processor you want to use with the Execution mode property in the Saxon XSLT Settings dialog box. Settings that have command line equivalents in Saxon show the command in parentheses following the property name. Some settings are available only if you are using Saxon-SA.

Stylus Studio's Sense:X syntax coloring and auto-completion provides full support for Saxon syntax, so long as the Saxon Logic XSLT processor is either associated with the current XSLT scenario or has been set as the default XSLT processor.

If you want to use the Saxon processor:

1. On the Processors tab, click Saxon.

The Settings button becomes active.

2. Click the Settings button.

The Saxon XSLT Settings dialog box appears.

4. Click OK.

Passing Parameters

To pass parameters to the Stylus Studio built-in XSLT processor or to the Microsoft .NET, Saxon, or MSXML processor, specify them in the Parameters tab of the Scenario Properties dialog box. To pass parameters to a custom external processor, you must specify them in the command line you enter.

 
Free Stylus Studio XML Training: