Bill Milbratz wrote:
Hi,

i have a problem which I don't know if I can solve elegantly with ant.

The problem: I'd like to use the xslt task to transform these inputs into
the following outputs;

inputs:

  v10/changes.xml
  v11/changes.xml
  v12/changes.xml

outputs:
  v10/changes.out
  v11/changes.out
  v12/changes.out


To clarify: the inputs lie in subdirectories. I would like the xslt/ant to
send the outputs to "corresponding subdirectories".

In reviewing the xslt docs, it looks like I can only send the xslt output to
one directory (destdir attribute).

I've looked at using 'subant', but this gets pretty complex and hard to
follow.

any suggestions?

thanks,

bill


Hi Bill,

I don't understand the problem. The destination directory is only the base directory to which the relative paths are appended. I just tried the following build file with Ant 1.6.5 (nothing newer at hand at the moment):

<project default="test">
  <target name="test">
    <xslt extension=".out" style="style.xsl" includes="**/changes.xml"
      destdir="."/>
  </target>
</project>

with the file structure:

./v10
./v10/changes.xml
./v11
./v11/changes.xml
./v12
./v12/changes.xml
./build.xml
./style.xsl

and this did exactly what I think you want. With 1.7.0 you can also define the input files via resource collections (i.e. <fileset> and so on), which gives you more freedom to select the individual input files. Also, with the help of the <mapper> subelement, you can map the input path to an output path, using a variety of operations.

Regards,

Klaus



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to