Java Code Generation

 

The Java Code Generation wizard is available only in Stylus Studio XML Enterprise Suite.

You use the Java Code Generation dialog box to specify the package and class names and other options for generating Java code from XQuery and XSLT.

Fields

Target directory

The directory to which you want to write the code generated from the XQuery or XSLT. You can type a directory path by hand, or use the browse button ( ) to select a file system directory. The default is a \sources directory, which is created where you installed Stylus Studio when you generate the code, c:\Program Files\Stylus Studio\sources, for example.

Package name

The name you want to use for the Java package generated from the XQuery or XSLT. Left blank by default.

Class name

The name you want to use for the Java class generated from the XQuery or XSLT. By default, this is the name of the XQuery or XSLT document for which you are generating Java code.

Options

These options affect the content of the generated code and whether or not the generated code is added to the current project.

Make the class public - Whether or not you want to make the generated classes public. By default, all classes are generated as public.

Include main(String[ ] args) method - Whether or not you want to include the main method in the generated code. If you will be calling the generated code from another application, you do not need to select this option.

Add generated code to the current project - Whether or not you want to add the generated code to the current project. If you select this option (it is on by default), the package structure ( com.mycompany.payroll, for example) is used to create a series of project folders at the current project's root ( com\mycompany\payroll, for example). If you use the default package (none), the name .java file is added under the project's root.

Generate code for these scenarios

List box displaying the scenarios associated with the source XQuery or XSLT document. Only those scenarios that use a processor that supports Java code generation are displayed in this list box. By default, only the current scenarios is selected for generation.

For More Information

Generating Java Code for XQuery

Generating Java Code for XSLT

 
Free Stylus Studio XML Training: