dk.brics.automaton  |  dk.brics.grammar  |  dk.brics.schematools
Thor  |  TSCheck  |  JSRefactor  |  Artemis  |  TAJS  |  Java String Analyzer  |  XSLT Validator  |  WARlord  |  XSugar  |  Xact  |  JWIG
MONA  |  PALE

Xact - Type-Safe XML Transformation in Java

How to compile .xact files

(If you don't use the special Xact syntax for XML templates, you can skip this step and just use an ordinary Java compiler.)

Run the command below to convert all .xact files found in the src folder and subfolders to .java files. The Java files will be put in the generated folder.

java -cp xact-all.jar dk.brics.xact.compiler.Main -dir=src -out=generated
Specific files can be converted like this:
java -cp xact-all.jar dk.brics.xact.compiler.Main src/Foo.xact src/Bar.xact
Next, compile the generated .java files with an ordinary Java compiler.

How to analyze an Xact project

Run the command below to analyze all classes in the bin folder. The classpath used to run the analysis must contain the analyzed classes as well as the classes used by them. For example:
java -cp xact-all.jar:bin dk.brics.xact.analysis.Main -dir=bin

Example Eclipse project

This Eclipse project contains some .xact files and an Ant file for compiling them and analyzing the project. To compile and run the analysis in this project:
  1. Open the project in Eclipse
  2. Open the Ant view
  3. Add build.xml to the Ant view
  4. Run the xact-to-java target
  5. Refresh the generated folder (select it and press F5)
  6. Run the analyze target
There are some intentional errors in the source files so the analysis has some errors to report.

Note that the line numbers in the output refer to the generated .java files located in the generated folder, which (unfortunately) do not match the line numbers in the corresponding .xact file.