%@ page language="C#" masterpagefile="~/templates/Documentation.master"
inherits="Page"
pagetitle="Configuring a Custom Document Wizard"
keywords="Configuring a Custom Document Wizard"%> Home >Online Product Documentation >Table of Contents >Configuring a Custom Document Wizard
This section provides information and procedures for configuring a custom document wizard. It covers the following topics:
You use the Custom Document Wizards page of the Options dialog box to work with custom document wizards in Stylus Studio.
This section describes how to display the Custom Document Wizards page and information about its fields.
The Options dialog box appears.
The Custom Document Wizards page appears.
Stylus Studio provides macros for some fields to help speed creation of custom document wizards. Available macros vary based on the field for which they are being used. To display macros available for a given field, click
Predefined macros include
In addition, Stylus Studio creates argument variable macros for any arguments you define and displays them with other Command field macros.
When you click the New button (
You should replace the default name (
The Document type field displays a drop-down list of available document types when you click it:
The document type is the type of output generated by the custom document wizard (XML Schema, XQuery, and so on). The value you select determines
You use the Icon bitmap field to specify the path for the icon you want to represent the custom document wizard. This icon, along with the name you give the custom document wizard, is displayed in the Document Wizards dialog box. Click
If you leave the Icon bitmap field blank, Stylus Studio uses the following default icon for the custom document wizard:
You use the Command line field to specify a command line template. Stylus Studio uses this template to compose the command line that invokes the custom document wizard. Variables, such as
Consider the following example:
This command line template allows Stylus Studio to start the specified Java class with a command line that includes the
Argument variables can appear anywhere in the command. They must be in the form
You must specify the
As with the Icon bitmap field, you can click
You use the Initial directory field to specify the directory you want Stylus Studio to use as the current directory when the custom document wizard is run. Click
You use the Path field to define paths to any files required by the custom document wizard. You do not have to define any paths that are already defined in your
Click
If the custom document wizard you are configuring outputs processing information (error messages, stack traces, and so on), you can use the Trace execution feature to display this information in the Output Window of the Stylus Studio editor used to display the custom document wizard's generated document.
You must define any arguments required by the custom document wizard using the Custom Document Wizard Arguments dialog box.
Stylus Studio uses the arguments you define here to
Every variable used in the command line template must be defined in the Custom Document Wizard Arguments dialog box.
There are two ways to display the Custom Document Wizard Arguments dialog box:
Stylus Studio creates an
By default, the arguments you define in the Custom Document Wizard Arguments dialog box are displayed to users in the order in which they are created. Arguments are displayed in a simple two-column grid, with the argument description in the first column, and an entry field for the argument value in the other. (See Figure 544 for an illustration of a custom document wizard dialog box.)
Also by default, the
You can specify the following attributes for each argument you define:
A new argument is displayed in the Custom Document Wizard Arguments dialog box, with a default name and other default values.
Configuring a Custom Document Wizard
The Custom Document Wizards Page
How to display
To display the Custom Document Wizards page:
About macros
.
${StylusDir}, which indicates that the path you are specifying is relative to the Stylus Studio installation directory.${PATH}, which specifies the PATH environment variable.${OutputFile}, which is used to specify the output generated by the document wizard. This macro is available in the Command field only.
Name
)to create a new custom document wizard, Stylus Studio displays an entry field for the name.DocumentWizard1, for example) with the name you want to associate with the custom document wizard. The name you enter is
Document type
Icon bitmap
to browse for the file you want to specify or to insert the ${StylusDir} macro.
![]()
Command line
${InputFile}, are used in place of actual arguments. Users specify argument values when they run the custom document wizard.
QuoteChar, InputFile, and OutputFile arguments.
${name}. For example:${OutputFile} argument variable in every command line template. Stylus Studio always generates the name of the file it opens as the value for the ${OutputFile} argument variable.
to display a menu that provides shortcuts that help you specify the command line template. This menu lets you
${StylusDir} macro.
Initial directory
to browse for the file you want to specify or to insert the ${StylusDir} macro.
Path
PATH environment variable. Separate multiple paths with a semicolon.
to display a menu that provides shortcuts that help you specify the PATH field. From this menu you can
Trace execution
Defining Arguments
How to display
. You can use this procedure if you want to define arguments while composing the command line.
OutputFIle argument
OutputFile argument for each custom document wizard. You cannot delete this argument. You can change its order, if necessary, as described in the following section.
Argument order
OutputFile argument appears first.
You can change the argument order by
Argument attributes
-v, or simply - or /, for example). When Stylus Studio composes the command line for the custom document wizard, it uses the flag value as a prefix to the argument value supplied by the user.true or false.
How to define an argument
To define an argument:
).
Before performing this procedure, you should be familiar with the information in The Custom Document Wizards Page and Defining Arguments.