In Oxygen XML Editor, can I automatically xcopy a folder to my Transformation's output folder?

瘦欲@ 提交于 2019-12-13 03:36:52

问题


I am using version 21 of the Oxygen XML Editor and the DITA Map WebHelp Classic (deprecated) Transformation Scenario. I have a folder that contains HTML files I want to open in a new window/tab, so that are xref'd in my XML file such as:

[<b><xref href="External/aFile.html" format="html" scope="external">Some Text</xref></b>]

I have a PostProcess batch script that I manually run that does an xcopy of the External folder to Oxygen's out/webhelp folder, and I would like to instead run it automatically in Oxygen after the Transformation is done. Is there I way I can do this?


回答1:


Two ways:

1) Use your custom ANT build file in the Oxygen transformation scenario: To use a custom build file in a DITA-OT transformation, follow these steps:

  • Use the Configure Transformation Scenario(s) action to open the Configure Transformation Scenario(s) dialog box.
  • Select the transformation scenario and click Edit.
  • Go to the Advanced tab and change the Custom build file path to point to the custom build file.

As an example, if you want to call a custom script before running the DITA OT, your custom build file would have the following content:

<project basedir="." default="dist">
<!--The DITA OT default build file-->
 <import file="path/to/DITA-OT3.x/build.xml"/>
 <target name="dist">
   <!--Call the DITA OT default target-->
   <antcall target="init"/>
  <!-- You could run your script here -->
  <!--<copy></copy>-->
 </target>
</project>

2) Create your own DITA Open Toolkit plugin which adds a new transformation type with a custom ANT build file which calls the WebHelp transformation type and afterwards can perform the copy operation:

https://www.oxygenxml.com/doc/versions/21.1/ug-editor/topics/whr-xslt-customization.html



来源:https://stackoverflow.com/questions/56741255/in-oxygen-xml-editor-can-i-automatically-xcopy-a-folder-to-my-transformations

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!