xslt - 如何在DITA OT中进行html转换时根据章节创建文件夹并移动该文件夹下的所有关联文件
问题描述
我正在使用 DITA-OT 3.4.1 将 DITA xml 转换为 html。我要做的是在转换基于章节名称的创建文件夹并将所有转换后的 html 文件和图像移动到单个章节文件夹下。目前我在同一个文件夹中获取所有 html 和图像。如何使用 xslt 或 ANT 来实现这一点
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bookmap PUBLIC "-//OASIS//DTD DITA BookMap//EN" "bookmap.dtd">
<bookmap>
<booktitle>
<mainbooktitle>Title of the docuemnt</mainbooktitle>
</booktitle>
<chapter href="chapter1.xml">
<topicmeta>
<navtitle>chapter 1</navtitle>
</topicmeta>
<topicref href="topic1.xml">
<topicmeta>
<navtitle>topic 1</navtitle>
</topicmeta>
</topicref>
<topicref href="topic2.xml">
<topicmeta>
<navtitle>topic2</navtitle>
</topicmeta>
</topicref>
</chapter>
<chapter href="chapter 2.xml">
<topicmeta>
<navtitle>chapter 2</navtitle>
</topicmeta>
<topicref href="topic1.xml">
<topicmeta>
<navtitle>topic1</navtitle>
</topicmeta>
</topicref>
</chapter>
</bookmap>
我的示例书图
解决方案
推荐阅读
- microsoft-graph-api - 没有 Files.Read 权限的图形 api 共享驱动器项目
- json - 我们可以在 JMeter 的 JSON Extracter 中的 JSONPath 表达式中使用变量吗
- elasticsearch - 按属性对相似数据进行排序
- xamarin.forms - 在 Xamarin.Forms 中创建 UI 元素
- debian - Artifactory Jfrog 中的 Debian Bionic 错误
- python - Django:forms.ChoiceField 在新页面加载后不刷新
- php - 匹配过滤器必须是 PHP 中具有 mongo 聚合的对象中的表达式
- python - 在 for 循环中连接 numpy 数组
- prestashop-1.7 - Prestashop 1.7 在产品列表中显示横幅
- node.js - 我可以安装 node_modules 一次,并且需要所有时间吗