Specifying Stylus Studio Options

Stylus Studio allows you to set a variety of options that apply to your application, your Java implementation, and the Stylus Studio modules themselves. This section covers the following topics:

Associating File Type Extensions with Stylus Studio Tools

When you try to open a file type that Stylus Studio does not recognize, Stylus Studio prompts you to specify the module or editor you want to use to open the file.

Figure 105. Choose Module Dialog Box

When you respond to this dialog box, you establish an association between all files with that extension and the Stylus Studio module you select. If you prefer, you can establish file type-Stylus Studio module associations in advance of opening files peculiar to your application.

Adding an Association

Note

 

You do not need to specify the usual extensions, such as xml, xsl, and java. Use this procedure for file name extensions peculiar to your application.

To add an association:
1. From the Stylus Studio menu bar, select Tools > Options.

Stylus Studio displays the Options dialog box.

2. Under Application Settings, click File Types.
3. Stylus Studio displays File type - Stylus Studio module associations. This dialog box allows you to indicate the module you want Stylus Studio to use when it opens a file with the extension you specify.
4. To add a new association, click the Add button.

Figure 106. Associating File Types with Stylus Studio Editors

5. Type the new extension and press Enter.

Stylus Studio displays the list of Stylus Studio editors and modules.

6. Click the module that you want Stylus Studio to use to open files with the extension you specified and press Enter.
7. To add another association, repeat step 4 through step 6.
8. Click the OK button.

Deleting Associations

To delete an association:
1. Click the association you want to delete.
2. Click the Delete button.

When you have finished adding and deleting associations, click OK.

Registering Stylus Studio as the Default Application

You can register Stylus Studio as the default application to use to open files with certain extensions.

To register Stylus Studio as the default application:
1. From the Stylus Studio menu bar, select Tools > Options.

Stylus Studio displays the Options dialog box.

2. Under Application Settings, click Default Extensions.

Stylus Studio displays a list of file name extensions.

Figure 107. Setting Stylus Studio as the Default Application

3. In the list, click the box next to the file name extension if you want Stylus Studio to be the default application for opening files with that file name extension. Stylus Studio displays a check next to each file name extension you register.
4. Click the OK button.

Unregistering

You can unregister Stylus Studio as the default application by returning to the Default Extensions page of the Options dialog box and clicking the check to remove it. When you unregister Stylus Studio, Stylus Studio restores the previous application's registration for that file type.

Modifying Java Options

Stylus Studio allows you to modify settings for

  • Java virtual machine (JVM) used by Stylus Studio
  • Stylus Studio Java debugger. (See Debugging Java Files for more information on this topic.)
  • Java compiler
  • External Java virtual machine

If you do not make any changes to these settings, Stylus Studio looks in the registry to determine the locations of your Java components.

This section covers the following topics:

About Java Virtual Machine Options

When Stylus Studio needs to execute Java code as part of the application of a stylesheet, it loads the Java Virtual Machine (JVM) that is in the run-time library specified in the Java Virtual Machine options page. To open this page, select Tools > Options from the Stylus Studio menu bar, and then click Application Settings > Java Virtual Machine.

On the Java Virtual Machine page, you can modify the following options:

  • Enabled indicates whether Stylus Studio loads a JVM. If you do not need a JVM, you can disable this option so that Stylus Studio requires less memory.
  • Runtime Library location. To specify an alternate location, type a new path or click Browse .
  • JDK Home Directory for your Java Development Kit (JDK). To specify a new home directory, type the value or click Browse.
  • Classpath used by JVM in Stylus Studio. To add a directory or .jar file to this class path, click Browse. For Stylus Studio to be able to find a Java class, its location must be specified in this classpath.

Note

 

This value does not affect the CLASSPATH environment variable. The default value, $(classpath), specifies that you want to use the contents of the CLASSPATH environment variable. There is no requirement for this class path and the class path used by the Stylus Studio Java compiler to be identical. However, it is good practice for them to be the same.

  • Parameters specifies the parameters for starting the JVM in the context of Stylus Studio.

Note

 

As a rule, you should never change the default value. This option exists to accommodate unusual configurations. In such situations, Stylus Studio Technical Support might instruct you to change this value.

Resetting Options

If you modify the Stylus Studio Java Virtual Machine options and then decide you want to return to the default values, click Auto detect to reset the options.

About Java Compiler Options

When you use Stylus Studio to compile Java classes, you can specify a number of options on the Java Compiler page. To open this page, select Tools > Options from the Stylus Studio menu bar, and then click Module Settings > Java > Java Compiler.

On the Java Compiler page, you can modify the following options:

  • Java Compiler is the location of the Java compiler that Stylus Studio uses. To change the location, type a path in the field or click Browse to the right of the field.
  • ClassPath used by Java compiler in Stylus Studio. To add a directory or .jar file to this class path, click Browse to the right of the field. For Stylus Studio to be able to find a Java class, its location must be specified in this class path.

Note

 

This value does not affect the CLASSPATH environment variable. The default value, $(classpath), specifies that you want to use the contents of the CLASSPATH environment variable. There is no requirement for this class path and the class path used by the Stylus Studio JVM to be identical. However, it is good practice for them to be the same.

  • Parameters specifies the parameters for running the Java compiler. Typically, you want to specify the -g parameter, which instructs the compiler to add debugging information to the generated .class file.

About External JVM Options

When Stylus Studio executes Java code as a standalone application, it uses the JVM that is specified in the External JVM options page. To open this page, select Tools > Options from the Stylus Studio menu bar, and then click Module Settings > Java > External JVM.

On the External JVM page, you can modify the following options:

  • External JVM identifies the location of the JVM you want to run.
  • Additional ClassPath used by this external JVM. To add a directory or .jar file to this class path, click Browse to the right of the field. For Stylus Studio to be able to find a Java class, its location must be specified in this class path.

Note

 

This value does not affect the CLASSPATH environment variable. The default value, $(classpath), specifies that you want to use the contents of the CLASSPATH environment variable. There is no requirement for this class path and the class path used by the Stylus Studio Java compiler to be identical. However, it is good practice for them to be the same.

  • Parameters specifies the parameters for starting this external JVM.

Note

 

As a rule, you should never change the default value. This option exists to accommodate unusual configurations. In such situations, Stylus Studio Technical Support might instruct you to change this value.

  • Display Console Window allows you to view processing information in a console window.
Resetting Options

If you modify the Stylus Studio External JVM options and then decide you want to return to the default values, click Auto detect to reset the options.

How to Modify Java Settings

To modify Java settings:
1. From the Stylus Studio menu bar, select Tools > Options.
2. Click one of the following:
3. Make your changes and click OK.

If the JVM is not already loaded, any changes you make take effect immediately. If the JVM is already loaded in Stylus Studio, you must restart Stylus Studio for the changes to take effect.

Setting Module Options

Stylus Studio allows you to set a variety of options for the Stylus Studio modules.

To change module options:
1. From the Stylus Studio menu bar, select Tools > Options.
2. In the Options dialog box that appears, expand Module Settings to display a list of choices.

XML Diff

You use the Engine and Presentation pages to define settings used by the XML Diff tool. See Diffing Folders and XML Documents for more information.

XML Editor

Click XML Settings to specify the following:

  • Refresh interval for Sense:X
  • Number of errors after which you want Stylus Studio to stop validation, and whether or not you want Stylus Studio to display a message when validation is complete

Click Custom Validation Engines to specify an alternate validation engine. See Custom XML Validation Engines for more information.

XSLT Editor

Module settings for the XSLT Editor let you specify external XSLT processors, settings used by the Mapper and WYSIWYG tabs, and general editor behavior.

Click External XSLT to specify default values for external XSLT processors. Note that Stylus Studio's backmapping and debugging features are not supported for all XSLT processors. The XSLT processors that support backmapping and debugging are identified on the Processor tab of the Scenario Properties dialog box.

In a scenario, you can specify that you want to use an external XSLT processor. If you use a particular XSLT processor frequently, specify default values here. Then, in the scenario properties, you just need to specify which external XSLT processor you want to use. If you specify default values and you then specify different values in a scenario's properties, the scenario properties override the defaults. You can specify the following external XSLT options:

  • Default additional path for Xalan-J processor
  • Default additional class path for Xalan-J processor
  • Additional JVM options for Xalan-J processor
  • Default custom processor command line
  • Default additional path for custom processor
  • Default additional class path for custom processor

Click Mapper to specify how xsl:for-each instructions should be rendered on the Mapper canvas, and to specify element creation for unlinked nodes. See Mapping Source and Target Document Nodes for more information on using the XSLT Mapper.

Click WYSIWYG to specify settings Stylus Studio uses to define tab stops and new lines in the HTML it generates. See Creating Stylesheets That Generate HTML for more information on using the XSLT WYSIWYG editor.

Click XSLT Settings to specify the following:

  • Whether Stylus Studio displays the Scenario Properties dialog box when you create a new stylesheet
  • Whether Stylus Studio saves scenario meta information in stylesheets
  • Whether Stylus Studio detects infinite loops
  • Maximum recursion level
  • Allocated stack size

Java

To modify Java settings, see Modifying Java Options.

Defining Custom Tools

Stylus Studio allows you to define custom tools to run alternative editors, processors, preprocessors, or postprocessors. For example, you can specify a custom tool that configures Internet Explorer to display the document you are working on.

After you define a custom tool, Stylus Studio adds an entry to its Tools menu - select Tools and then your tool. The order in which the tool names appear in the Custom Tools options page is the order in which the tool names appear in the Stylus Studio Tools menu.

To define a custom tool:
1. From the Stylus Studio menu bar, select Tools > Options.

Stylus Studio displays the Options dialog box.

2. Expand Application Settings and click Custom Tools to display the Custom Tools page.
3. In the Custom Tools page, click Define New Tool .

Stylus Studio displays an entry field for the tool name.

Figure 108. Defining a Custom Tool

4. Enter the name as you want it to appear in the Stylus Studio Tools menu.
5. In the Command field, specify or select the absolute path for the command that runs your tool. This must be a .exe, .bat, or .cmd file.
6. In the Arguments field, specify any arguments your tool requires. You can click to display a drop-down list that includes File Path, File Dir, File Name, File Extension, and Class Path.
7. In the Initial Directory field, type the absolute path for the directory that contains any files or directories needed by your custom tool.
8. In the Path field, type any paths that need to be defined and that are not already defined in your PATH environment variable.
9. If you want Stylus Studio to prompt for arguments before it runs your tool, click Prompt for Arguments.
10. If you want Stylus Studio to display output from your custom tool in its Output Window, select Use Output Window.
11. Click the OK button.
 
Free Stylus Studio XML Training: