.. (parent)Getting startedXRN fileRunning AntXRN schemaEnhancingRendering
You are here: Getting started >> Running Ant
Audience
End-user

Meta

Table of contents

Running Ant

We now use the Ant task.

Important:

Before going anyfurther, remember that you should have added an XSLT implementation in Ant lib directory.

Warning:

From Sun JRE V1.4, an endorsment mechanism has been introduced and if you encounter problem, take care about that (described here and search for the 'endorsed' keyword).

Populate Ant lib directory

The only thing that is needed to be added in adding the following Java ARchives.

  • lib/XMLReleaseNotes.jar that you need to extract from the delivery zip (which you should already have done).
  • saxon.jar or xalan.jar (a working version of Xalan is present in Ant V1.6+).

    Note:

    So far, XRN has been successfully tested againt Xalan V2+ and Saxon V6.

This is always kind of a pain to set all the classpath-related stuff, so do not lose time, if it does not work for you, go directly visit the SourceForge bug tracker forum . We'll do our best in order to solve or fix your problem.

We now suppose that your runtime environment is alright. Your Ant runtime is obviously supposed to be working properly before trying to use the XRN Ant task ;->

Create an Ant buildfile

OK, we need an Ant buildfile in order to show how this previous basic release notes file can be taken benefit from.

Yes, because XRN today consists in an Ant task extension (this is why you need to place the jar in Ant lib directory). This task wraps the XSLT transformations under the wood. But OK, we'll explain in a dedicated section how it works.

We do not want you to lose time, so we prepared one right for you, that should work with no effort. Copy the doc/build.xml in the same directory as before. Found and copied it?

Run the Ant XRN task

Now, you open your console and run this Ant buildfile on the basic target. You know, the ant basic command?

Note:

Do not close your console, since we are going to use it once again in the future.

Were you actually able to see the HTML result? If this is the case, you did most of the complex steps.

Comparison between the XML and the HTML file

You can now take a closer look at the XML, modify it and see how modifications are taken into account in the resulting HTML file. This should make the understanding of the XRN structure more obvious.

Review the process

So far, nothing extraordinary has been done. We have just show how to transform an XML file (that actually contains release notes for a component) into a single HTML page. This is done by using a process developed on the Ant platform, via an Ant task, that just wraps an XSLT transformation.

Fine if things are clear to you, we can now consider a bit more complex things.