Page 1 of 1

Newbie question on creating ANT scripts

Posted: Sat Feb 16, 2019 2:43 pm
by 4everJang
Hello all,

I have created my first simple ANT script, which works well but uses absolute references to the file to be transformed.

<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="rng2dtd">

<target name="dtd">
<xslt style="xsl/step_1.xsl" in="rng/myfile.rng" out="temp/tmp_1.rng"/>
<xslt style="xsl/step_2.xsl" in="temp/tmp_1.rng" out="temp/tmp_2.rng"/>
<xslt style="xsl/step_3.xsl" in="temp/tmp_2.rng" out="temp/tmp_3.rng"/>
<xslt style="xsl/step_4.xsl" in="temp/tmp_3.rng" out="temp/tmp_4.rng"/>
<xslt style="xsl/step_5.xsl" in="temp/tmp_4.rng" out="temp/tmp_5.rng"/>
<xslt style="xsl/step_6.xsl" in="temp/tmp_5.rng" out="dtd/myfile.dtd"/>


My newbie question is: how can I parameterize the 'myfile' to pick up the filename of the currently opened RNG file in oXygen ?
Another option I would like to see is how to invoke the series of transforms on all files that match a certain name pattern.

Thanks in advance

Re: Newbie question on creating ANT scripts

Posted: Sat Feb 16, 2019 3:09 pm
by 4everJang
I figured it out (passing the parameter). Creating a build that processes al files matching a pattern is still an open question, but not pressing at this time, and I am sure that will be fairly easy, too.


Re: Newbie question on creating ANT scripts

Posted: Mon Feb 18, 2019 8:23 am
by Radu
Hi Jang,

Right, in the ANT transformation scenarios you create in Oxygen you can add ANT parameters and each parameter can have its value given by an Oxygen editor variable: ... ables.html

About applying XSLT to multiple XML documents, inside the xslt task you can refer to a fileset: