NiceXSL logo Contents Download Update-Site NiceXSL logo

NiceXSL ANT Usage

You may reverse engineer as for a command line user, since this will not be a regular activity you need not configure ANT to support it.

You may configure ANT to create the XSLT automatically by placing nicexsl.jar in the classpath and declaring the nicexsl compilation activity

<property name="nicexsl.jar" value="....../nicexsl.jar" />

<target name="declare-nicexsl" description="define nicexsl">
  <taskdef classname="net.sf.nicexsl.anttask.NiceXslTask" name="nicexsl" classpath="${nicexsl.jar}"/>

and invoking it as:

<target name="nicexsl" depends="declare-nicexsl" description="compile aNiceXSLsource">
  <nicexsl in="aNiceXSLsource.nxsl"/>

This will then create aNiceXSLsource.xsl in the same directory, but only if the modification date of aNiceXSLsource.nxsl is after that of aNiceXSLsource.xsl.

Attribute Type Usage Description
in String required NiceXSL input file
out String optional XSLT output file, defaults to input file name with extension changed to .xsl
force boolean optional When true, the output file is created regardless of relative modification dates.
attributeHasSelect boolean optional When true, NiceXSL will exploit xsl:attribute/@select, which was introduced in the XSLT 2.0 12-Nov-2003 working draft. By default this is not used.
functionIsTemplate String optional When true, NiceXSL version 1.x compatibility is provided by treating function as a xsl:template. This is deprecated and generates warnings.
maxErrors int optional Specifies the number of errors before a compilation aborts, defaults to 10.
debug boolean optional When true, and when ANT has been invoked with -debug, extensive parsing debug messages are produced that are only of interest to LALR parser enthusiasts.
verbose boolean optional When true, a stack trace accompanies an otherwise inexplicable NiceXSL: conversion failed!.
stylesheet String optional Specifies the element name of the top level generated construct. Default is stylesheet. You might change it to transform.
xslNamespace String optional Specifies the URI of the XSLT namespace. The default is
xslNamespacePrefix String optional Specifies the namespace prefix used to refer to the XSLT namespace. The default is xsl.

Edward D. Willink
4 March 2004