Compiling Generated Code

In order to compile the Java code generated for XQuery, you need to make sure that the following JAR files are in the Stylus Studio classpath:

  • CustomFileSystem.jar
  • Saxon8.jar

These files are in in the \bin directory where you installed Stylus Studio.

How to Modify the Stylus Studio Classpath

To modify the Stylus Studio classpath:
1. Select Tool > Options from the Stylus Studio menu.
2. Click Java Virtual Machine under General.
3. Click the browse button alongside the Classpath field.

The Add Directory or JAR File to Classpath dialog box appears.

4. Click the browse folders ( ) button.

A new entry field appears in the Locations list box. Two buttons appear to the right of the entry field.

Figure 342. Entry Field for JAR File Classpath

5. Click the browse jar files button ( ).

Stylus Studio displays the Browse for JAR Files dialog box.

Figure 343. Browse for JAR Files Dialog Box

6. Navigate to the Stylus Studio \bin directory, select the CustomFileSystem.jar file, then click Open.
7. Repeat step 6, this time selecting the Saxon8.jar file.
8. Click OK to close the Add Directory or JAR File to Classpath dialog box.

How to Compile and Run Java Code in Stylus Studio

To compile Java code in Stylus Studio:
1. Make sure the Java Editor is the active window.
2. Click the Compile button ( ).

Alternatives: Press Ctrl + F7, or select Java > Compile from the Stylus Studio menu.

Stylus Studio compiles the Java code. Results are displayed in the Output window.

To run Java code in Stylus Studio:
1. Make sure the Java Editor is the active window.
2. Click the Run button ( ).

Alternatives: Press Ctrl + F5, or select Java > Run from the Stylus Studio menu.

If the code has not been compiled, Stylus Studio displays a prompt asking if you want to compile the code now. Otherwise, Stylus Studio runs the Java code. Results are displayed in the Output window.

XML-DEV Discussion Forum

XML-DEV is a leading technical forum for XML discussion and a valuable free XML learning resource. Subscribe to the XML-DEV email discussion forum today to help further your XML education.

XSLT Editor

Stylus Studio's XSLT Editor is the most advanced XSLT development tool on the market. This powerful tool provides backmapping, XSLT transformation preview, debugging, peformance profiling, and more!

XML Applications

XML Applications are software applications that process data using standard XML technologies like XML, XML Schema, XSLT and XQuery. Using Stylus Studio XML Pipeline, learn how to model, edit, test and deploy an XML Application with ease.

Xerces - Parsing and Validating XML with the Apache Xerces Parser

The Xerces Parser supports the XML 1.0 recommendation and W3C's XML Schema recommendation version 1.0, DOM and SAX. Learn how easy it is to use Apache Xerces directly in Stylus Studio to parse and validate XML with ease.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member