XMLMill - convert xml to pdf with java. Generate PDF from xml/xsl.

XMLMill User Guide

Version: 3.00 Date: January 2nd, 2008
This tutorial is opened in a separate window in order to maximize the legibility of this tutorial.
To return to XMLMill, close this browser window

This page as PDFPrinter friendly pageThis guide (!) as PDF

Installation

Prerequisites

XMLMill for Java is developed 100% in Java and needs as such a 'Java enabled' environment. Following need to be installed:

Installation

Unzip the XMLMill Distribution

  1. Unzip (untar) the downloaded distribution in a directory (for example: /xmlmill).
  • The lib/ directory includes by default the JAXP 1.2 compliant Xerces parser (xercesImpl.jar) and the JAXP 1.2 compliant Xalan transformer (xalan.jar, xml-apis.jar). It also includes the commons-logging-1.1.jar library.

Add a logging implementation

XMLMill uses Apache's common logging mechanism to 'talk' to any logging implementation you use in your environment.

Following situations can occur:

Use of the default com.xmlmill.log.FileLogger class.

In this be sure to have the commons-logging-1.1.jar on the classpath.

Use of the Log4j implementation

In this case be sure to have both the commons-logging-1.1.jar and the log4j.jar included on your classpath.

Use of the default java.util.logging. implementation in J2SE 1.4 (or higher)

In this be sure to have the commons-logging-1.1.jar on the classpath.

Use of another logging mechanism

In this case you'll you need to write your own wrapper class implementing the org.apache.commons.logging.Log interface.

Add a JAXP compliant implementation

  • If you will use the default Xerces parser and Xalan transformer included in the download you can skip this section.

JAXP allows you to use any XML-compliant parser from within your application. It does this with what is called a pluggability layer, which allows you to plug in an implementation of the SAX or DOM APIs. The pluggability layer also allows you to plug in an XSL processor, letting you control how your XML data is transformed.

Getting a JAXP implementation

The latest version of the Java API for XML Processing (JAXP1.3) is now final and part of J2SE 5.0. The implementation is also available as a separate download at http://jaxp.dev.java.net/ for developers to experiment in previous versions of J2SE (1.3 and 1.4).

Following jars should be added to the classpath (and replacing any previous .jars representing an xml-parser and xsl-transformer) in case you don't use J2SE 5.0. :

  • xercesImpl.jar
  • xalan.jar
  • dom.jar
  • jaxp-api.jar
  • sax.jar

In case you use Apache's current Xalan-J version (2.7.1) (see http://xml.apache.org/xalan-j/ for more information) you need to add following jar files to the classpath:

  • xercesImpl.jar
  • xalan.jar
  • xml-apis.jar
  • Apache's current Xalan-J version (2.7.1) is JAXP 1.3 compliant.

In case you use another xml-parser and xsl-transformer please consult your vendor's documentation to know which classes should be adde to the classpath.

  • This xml-parser and xsl-transformer should be JAXP 1.2 or 1.3 compliant.

In the next chapter give an overview is given of which libraries should be on the classpath when using different J2SE versions.

Copyright © 2001 - 2012. All rights reserved. XMLMill and XMLMill logo are trademarks of Pecunia Data Systems, bvba.
Powered by Apache CocoonPowered by XMLMill