Newbie question on creating ANT scripts
Posted: Sat Feb 16, 2019 2:43 pm
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"/>
</target>
</project>
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
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"/>
</target>
</project>
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