SocialTwist Tell-a-Friend

Comments --

Add

New Testertool – Anakia

Anakia is  an XML transformation tool,  that uses JDOM and Velocity to transform XML documents into the format of your choice.
It provides an alternative to using Ant’s task and XSL to process XML files.
The basic model that AnakiaTask uses is pretty straightforward :

Parse your XML into a JDOM Document:
SAXBuilder builder;
Document root =

SocialTwist Tell-a-Friend

Comments --

Add

New TesterTools – Andariel Ant Tasks

Andariel is a set of tasks designed to help the generation of HTML (and other markup languages) pages from Ant. Includes a XPath processor, an image information retriever, and others.
Tasks
Current tasks include:

XPath: This is used to perform an XPath query on an XML file. It’s designed to be used together with Ant

Tags: , ,
Advertisment
My Twitter Friends
Friends: 939 Followers: 394
SocialTwist Tell-a-Friend

0

Comments

Add

New Testertool – Anakia

Anakia is  an XML transformation tool,  that uses JDOM and Velocity to transform XML documents into the format of your choice.

It provides an alternative to using Ant’s task and XSL to process XML files.

The basic model that AnakiaTask uses is pretty straightforward :

  1. Parse your XML into a JDOM Document:
    SAXBuilder builder;
    Document root = null;
    
    try
    {
        builder = new SAXBuilder(
            "org.apache.xerces.parsers.SAXParser" );
        root = builder.build( file );
    }
    catch( Exception )
    {
        System.out.println( ...  );
    }
  2. Stuff the Document (or root Element) into the context:
    context.put("root", root );
  3. Render a template using Velocity. Within the template, one can use JDOM’s methods to access the data contained in the XML document.

Anakia is potentially easier to learn than XSL, but it maintains a similar level of functionality. Learning cryptic <xsl:> tags is unnecessary; you only need to know how to use the provided Context objects, JDOM, and Velocity’s simple directives.

Anakia seems to perform much faster than Xalan’s XSL processor at creating pages. (23 pages are generated in 7-8 seconds on a PIII 500mhz running Win98 and JDK 1.3 with client Hotspot. A similar system using Ant’s <style> task took 14-15 seconds — nearly a 2x speed improvement.)

Anakia — intended to replace Stylebook, which was originally used to generate simple, static web sites in which all pages had the same look and feel — is great for documentation/project web sites, such as the sites on www.apache.org and jakarta.apache.org. As it is more targeted to a specific purpose, it does not provide some of XSL’s “extra” functionality.

The example in the jakarta-velocity/examples/anakia directory provides a good introduction to Anakia. You should find it quite simple to use.

Anakia creates a Context, which contains a JDOM Document object of the .xml page, as well as an (optional) JDOM Document object of your project.xml page. The .vsl page is executed (using Velocity) with the Context. You can then navigate your .xml file and pull information out of it by simply executing methods on the JDOM Document object.

Anakia is being used to create the documentation for not only this website, but also for the Jakarta Project’s website as well as many of the projects that live under the Jakarta Project. This process is documented on the site.

For more details visit here

SocialTwist Tell-a-Friend

0

Comments

Add

New TesterTools – Andariel Ant Tasks

Andariel is a set of tasks designed to help the generation of HTML (and other markup languages) pages from Ant. Includes a XPath processor, an image information retriever, and others.

Tasks

Current tasks include:

  • XPath: This is used to perform an XPath query on an XML file. It’s designed to be used together with Ant Contrib ForEach task. It uses the Saxon processor.
  • ImageInfo: retrieves the width and height of an specified image.
  • Increase and Decrease: those tasks numerically modify a property.
  • Trim: very simple task that removes the adjacent spaces from a property.
  • Process: lightweight but powerful preprocessor for many types of file.
  • Decomment: decomment files easily, using a syntax equal to the “Copy” Ant task.

Full information on tasks, see the API pages.

Download

Andariel Ant Tasks 1.2.3 source code


Andariel Ant Tasks 1.2.2

Andariel Ant Tasks 1.2.2 source code

Andariel Ant Tasks 1.2

Andariel Ant Tasks 1.2 source code

Andariel Ant Tasks 1.2

Andariel Ant Tasks 1.2 source code

Andariel Ant Tasks 1.1

Andariel Ant Tasks 1.1 source code

Andariel Ant Tasks 1.0

Andariel Ant Tasks 1.0 source code

e tasks, see the API pages.
More details can be found here