Here is the code what I have tried,
To copy the folders and files from the XHTML plugin - reource folder to the output location created by XHTML DITA-OT transformation.
plugin.xml
<plugin id="com.example.extendchunk">
<feature extension="depend.preprocess.post" value="copyfiles"/>
<feature extension="dita.conductor.target.relative" file="myAntStuffWrapper.xml"/>
</plugin>
myAntStuffWrapper.xml
<dummy>
<import file="myAntStuff.xml"/>
</dummy>
myAntStuff.xml
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="myAntStuff">
<target name="copyfiles">
<copy todir="foo">
<fileset>
<include name="**/*.bar"/>
</fileset>
</copy>
</target>
</project>
Using this, we need to copy multiple files and folders to the output location. I.E. (C:\DITA-OT1.8.5\plugins\org.dita.xhtml\resource) to the output location (E:\task\out\xmthl) - Created by the XHTML DITA OT transformation.
Please explain me how to specify the below tags.
<copy todir="foo">
and
<include name="**/*.bar"/>
This should work for the standard DITA Open Toolkit output directory, it uses the variable ${output.dir}
that is created by the OT:
<copy todir="${output.dir}">
For copying from the resource directory you mention, it would be something like this:
<include name="${dita.plugin.org.dita.xhtml.dir}/resource/*"/>
But the contents of that directory is probably already copied when you run the xhtml
transform. It is not a best practice to directly modify the files of the org.dita.xhtml
plugin that comes with the OT, even though you could probably make it work. Instead you should make your own separate plugin that calls the org.dita.xhtml
plugin, and then override it using the files in your plugin. In that case you would copy from your plugin in a similar way:
<include name="${dita.plugin.mycompany.xhtml.dir}/resource/*"/>
But that is beyond your question. See this reference for learning how to create your own plugin:
http://www.dita-ot.org/1.8/dev_ref/plugins-overview.html
If this answer is correct, please mark it as correct so I get my points, thanks.