Developers Documentation

Setup JOMDoc

Download

JOMDoc source can be found here.

  • Main development is done in trunk
  • Tags of stable releases can be found in releases
  • Branches of JOMDoc where specific functionality is developed are in branches

If you need to modify JOMDoc source, then it's necessary to checkout trunk or some specific release in releases with subversion. However, if you don't need to modify the source, but just build your application on top of JOMDoc, then probably it is sufficient to only checkout an already built distribution in deploy. See installation for more info.

Building

We use  Apache Ant for building JOMDoc, so make sure you have Ant installed before you proceed. All Ant targets must be executed from the terminal in the root directory of JOMDoc, where the Ant build.xml file is, by executing ant target. A list of available targets can be obtained with ant help. Executing ant build will compile and build JOMDoc, producing

  • jomdoc.jar in build/lib
  • javadoc in docs/apidocs

Required libraries

JOMDoc depends on several third party libraries, all found here. If you are using JOMDoc in your project, you must make sure all these additional libraries are on the classpath. However, depending on the functionality you need from JOMDoc, probably you don't need to include all of them. A description for what is each library needed:

  • Core libs - these are absolutely needed for correct functioning of JOMDoc
    • xom-*.jar, commons-io-*.jar, collections-generic-*.jar, log4j-*.jar
  • XSLT libs - only needed if you want to apply XSLT transformations with JOMDoc
    • saxon9*
  • GUI libs - only required if you are using the JOMDoc GUI
    • AbsoluteLayout.jar, appframework-*.jar, swing-layout-*.jar, swing-worker-*.jar
  • CSS libs - only required if you are using the Cascading Context Files rendering option
    • sac.jar, cssparser-*.jar
  • RelaxNG validation
    • jing.jar
  • For running JUnit tests
    • junit-*.jar, xmlunit-*.jar
  • Generating abstract notation parser during compilation time
    • javacc.jar
  • Other
    • colapi.jar - coloring code when generating Javadoc API Documentation

Logging

JOMDoc uses  log4j for logging. By default log4j is not configured at all in JOMDoc, so before using JOMDoc in your code, the logging should be configured with:

  • JOMDocEnvironment.configureLogger() - use default configuration file bundled with JOMDoc
  • JOMDocEnvironment.configureLogger(URL/Properties) - specify your own configuration

Code structure

Description of the different modules in JOMDoc with use-cases.

Notations Module

The notations module in JOMDoc handles the rendering of OpenMath and Content MathML expressions to Presentation MathML. more

Abstract Documents Module

This module handles the concretion of documents, i.e., the substitution of variant elements with specific elements. more

Flattening

Flattening is the normalization of documents with respect to ref elements, variants and theory imports. It also includes the reverse process of contracting referenced content, i.e., introduction of references in the form of refs or variants. more

Validation and Transforming

This module performs various validation tasks on OMDoc documents, and transformations from one format to another. more

Resolving URIs

The code that handles the resolving of URI references.. more

OMDoc Java Objects

The org.omdoc.jomdoc.lang package contains Java objects for every OMDoc element. more

Command-Line Client

This is the command-line interface of JOMDoc. more

Utility Code

Utility functionality is usually defined in org.omdoc.jomdoc.util package. more

Unit Tests

Testing is very important part of the development. Unit tests are executed on every commit on the server. more

Other

Refactoring of the Notation and Variant Modules