Scenario Settings

Stylus Studio generates Java code based on the scenarios you have defined for an XQuery 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 Main input and Output URL fields, if specified.
Processor
You must use the Saxon or DataDirect XQuery processor. The Stylus Studio URI Resolver is also used to resolve non-standard URIs if you select the check box on the Processor page.
Parameter Values
Any parameter values you specify are processed by the Java Code Generation wizard.
Profiling Options
Ignored.
Validation
Validation is optional. If you choose to validate XQuery 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.
Table 77. 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 XQuery document. By default, the Java Code Generation wizard selects only the current scenario for generation, as shown in Figure 352.

Figure 352. 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_books(); 
               
//			app.setScenario_books_public(); 
               
//			app.setScenario_books_validation(); 
               
			app.setScenario_myBooks(); 
               

            

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.

XML Whitepapers

Learn how XML can help you meet your business objectives by reading free XML Whitepapers covering XML, XML Schema, XQuery, SQL/XML, and FIXML technolgies employed in real world case studies.

Learn XSLT

Free online video demonstrations for learning XSLT and how to design XSLT stylesheets to convert XML to HTML in publishing applications, or how to convert HTML to XML.

Airlines, Aerospace and Defense

Want to know what airlines, aerospace and defense companies are soaring high with Stylus Studio 2006? Well now you can! Come check out these leading companies and soar with Stylus Studio 2006 yourself.

XMLSCHEMA-DEV Blog

XML Schema-DEV is an active community for XML Schema-releated development - join the discussion on XML Schema standards, tools, implementations and more. Bookmark this RSS or ATOM feed today!

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member