Newbie question on creating ANT scripts
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 22
- Joined: Mon Oct 14, 2013 2:12 pm
Newbie question on creating ANT scripts
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
-
- Posts: 22
- Joined: Mon Oct 14, 2013 2:12 pm
Re: Newbie question on creating ANT scripts
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.
Thanks
Thanks
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Newbie question on creating ANT scripts
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:
https://www.oxygenxml.com/doc/versions/ ... ables.html
About applying XSLT to multiple XML documents, inside the xslt task you can refer to a fileset:
topic10759.html#p30724
Regards,
Radu
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:
https://www.oxygenxml.com/doc/versions/ ... ables.html
About applying XSLT to multiple XML documents, inside the xslt task you can refer to a fileset:
topic10759.html#p30724
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service