XES - User Guide

Loading and running the program

If you have not already downloaded the program you can get it from Sourceforge here, both the source code and the runtime is available, all you need to load is the runtime file xes_runtime.zip. (If you want to compile the program yourself the source code is in xes_src_alpha_04.zip).

The program requires Java runtime 1.4 or better to be installed on your computer, you can get this here.

Unzip the xes_runtime_alpha_04.zip file into the \xes directory, this contains:

You should be able to run the program by double clicking on xes.jar but, on my computer, I found that this would not work because the class path was not set, if you find the same you can click on run.bat, this sets the class path and then runs the jar.

When you run the program you will see the following:

Opening a Java program

Once the program is running you can load some java source to work on. To load in your source code click on the 'load java code' button at the bottom of the read tab, alternatively you can use the menu (under file menu). Either of these will bring up a file dialog from which you can select the source code you want to work on.

Tokeniser Symbol Table

Once the source code is loaded you will see all the tokens and symbols under the tokeniser symbol table tab.

Quickest way to create xes code

If all you want to do is create an xes output file then you can do this immediately by clicking on the 'save xes' option under the Options menu. This will bring up a file save dialog.

Modifying the Symbol Table

If the symbol is very long you can select the 'Properties' tab in the right hand plane. When you select a symbol in the table it will then be displayed fully in the right hand plane. If you want to modify a symbol you can either edit the properties pane or the symbol column in the table.

For instance, if you want to change each occurrence of 'String' to 'string' but you don't want to change it where it occurs as part of a longer word such as 'StringBuffer' or when it occurs as part of a string constant or a comment. All you need to do is find the entry which contains just 'String' and change it to 'string'.

Displaying the file structure

Select the 'parser tree' pane in the left hand window and the 'properties' pane in the right hand window. You can then look down through the file structure and when you click on a node you can see its properties in the right hand pane.

Generating XES

Select the 'XES file' tab, to generate xes you can now click on the 'generate xes' button at the bottom.

Saving XES

If this looks correct you can click on the 'save to XES file' button which brings up the file dialog. Note, you need to enter the full file name including the extension.

Generating Java source output

The java source output is generated using an XSLT script, this is done so that to can modify the script to produce output in any other language.

To work with XSLT scripts click on the 'transform' tab in the left window and the 'results' tab in the right window, you should then see the following:

The first thing to do is to open the script, click on 'Load XSLT' then select the 'toJava.xsl' file in the dialog.

(alternativly you could select the 'toXes.xsl' which is a sort of do nothing script which outputs to XES).

If required you can make changes to the script in the left hand window:

Once you are happy with the script you can click on the 'transform' button to generate the source code in the right hand window:

Once you are happy with the java source code you can save it by clicking on the 'save to XES button' (misleading name - I should really rename that button)

metadata block
see also:

Using XML with java

Correspondence about this page

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2023 Martin John Baker - All rights reserved - privacy policy.