在Oxygen XML Editor中,我可以自动将文件夹复制到Transformation的输出文件夹吗? [英] In Oxygen XML Editor, can I automatically xcopy a folder to my Transformation's output folder?
问题描述
我正在使用Oxygen XML Editor的21版和DITA Map WebHelp Classic(不建议使用)转换方案.我有一个包含要在新窗口/选项卡中打开的HTML文件的文件夹,以便在我的XML文件中进行外部引用,例如:
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>]
我有一个手动运行的PostProcess批处理脚本,该脚本将外部文件夹的xcopy复制到Oxygen的out/webhelp文件夹中,我想在转换完成后自动在Oxygen中运行它.有办法吗?
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)在Oxygen转换方案中使用您的自定义ANT构建文件: 要在DITA-OT转换中使用自定义生成文件,请按照下列步骤操作:
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:
- 使用配置转换方案"操作打开配置转换方案"对话框.
- 选择转换方案,然后单击编辑".
- 转到高级"选项卡,然后更改自定义"构建文件路径以指向自定义"构建文件.
例如,如果您要在运行DITA OT之前调用自定义脚本,则您的自定义构建文件将具有以下内容:
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)创建您自己的DITA Open Toolkit插件,该插件添加带有自定义ANT构建文件的新转换类型,该自定义ANT构建文件调用WebHelp转换类型,然后可以执行复制操作:
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
这篇关于在Oxygen XML Editor中,我可以自动将文件夹复制到Transformation的输出文件夹吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!