Scenario Settings

Stylus Studio generates Java code based on the scenarios you have defined for an XSLT document. The following tables summarizes the scenario settings that have an effect on Java code generation.

Tab
Comment
General
The Java Code Generation wizard uses only the Source XML URL, and the Output URL field, if specified. All other properties on this page are ignored.
Parameter Values
Default parameter values and parameters in the form of XPath expressions are ignored.
Processor
You must use a Saxon or XalanJ processor. The Stylus Studio URI Resolver is also used to resolve non-standard URIs if you select the check box on the Processor page.
Profiling Options
Ignored.
Validation
Validation is optional. If you choose to validate XSLT output, the Java Code Generation wizard always uses the Xerces-J processor, regardless of the validator you specify on the Validation tab. If you want to specify external schemas for validation purposes, click Use built-in validator. Note that the Xerces-J processor is used for validation even in this case.
Post-process
Only post-processing using Apache FOP is specified in the generated code. Resulting PDF is written to the output URL.
Table 35. Scenario Settings that Affect Java Code Generation

Choosing Scenarios

You can generate Java code for one or more of the scenarios defined for a single XSLT document. By default, the Java Code Generation wizard selects only the current scenario for generation, as shown in Figure 227.

Figure 227. The Current Scenario Is Selected for Code Generation

The generated code includes a setScenario method for every scenario you select for code generation, as shown in the following example.

// Uncomment the setScenario call for the scenario you want the code to run.
               
// All other scenarios must be commented out.
               
   app.setScenario_myScenario();
               
// app.setScenario_Scenario1();
               
// app.setScenario_Video_0032_Scenario_0032_1()
               

            

Only one setScenario method can be called at a time. Uncomment the setScenario method for the scenario you want the code to process, and make sure that all other setScenario methods are commented.

Using Relational Data in XML Applications

"Using Relational Data in XML Applications" By Dr. Michael Kay covers an overview of several common use cases and provides insight into the benefits and drawbacks of using the approaches available today including XQuery and SQL/XML.

JavaServer Pages IDE (JSP IDE)

The Stylus Studio JSP IDE provides syntax help and code completion for developing JSP 1.2 and JSP 2.0 applications.

WYSIWYG XSLT Designer

Stylus Studio's powerful and easy-to-use WYSIWYG ("What you see is what you get") XSLT Designer lets you create XSLT stylesheets without writing any code! Go from a blank slate to solid, robust XSLT in minutes, using simple drag-and-drop operations.

Apache XML Project

The Apache XML Project provides standards-based, open-source XML solutions for working with W3C XML technologies including XML, XSL, XSLT, XSL:FO XPath, Web services and more. Learn how Stylus Studio provides support for all Apache XML projects.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member