批量把doc改成html,【已解决】把Docbook默认输出的单个HTML文件,改为输出多个的HTML文件...

【问题】

docbook已经折腾了不少东西了,但是都在忙pdf方面的。

现在开始回来折腾HTML方面的。

对于默认输出的HTML,之前看到的解释,应该就是多个HTML才对。

然后对应的单个HTML是XHTML才对。

但是结果,我这默认输出的HTML是单个的文件:MPEG_VBR.html。效果如下:cb1aa53872b7d46fff54902a26a32245.png

现在想要让其输出为多个HTML的那种效果。

【解决过程】

先是参照原先的html的配置,自己写了个配置文件chunk_crl.xsl:<?xml version='1.0'?>

/p>

[

]

>

version='1.0'>

encoding="UTF-8"

indent="no"/>

然后再去试试,结果就可以生成了:CLi@PC-CLI-1 ~/develop/docbook/books/VBR/VBR/src

$ XML_CATALOG_FILES="/home/CLi/develop/docbook/config/catalog/catalog.xml" \

> xsltproc.exe --xinclude -o ../output/html/multi/MPEG_VBR.html chunk_html_crl.xsl MPEG_VBR.xml

Writing pr01s02.html for section

Writing pr01.html for preface(preface)

Writing ch01s02.html for sect1

Writing ch01s03.html for sect1

Writing ch01s04.html for sect1

Writing ch01s05.html for sect1

Writing ch01.html for chapter(ch1_mpeg_related)

Writing ch02s02.html for sect1

Writing ch02s03.html for sect1

Writing ch02s04.html for sect1

Writing ch02s05.html for sect1

Writing ch02s06.html for sect1

Writing ch02s07.html for sect1

Writing ch02s08.html for sect1

Writing ch02.html for chapter(ch2_mp3_term.xml)

Writing ch03s02.html for sect1

Writing ch03s03.html for sect1

Writing ch03.html for chapter(ch3_mpeg_frame.xml)

Writing ch04s02.html for sect1

Writing ch04.html for chapter(ch4_xing_vbri.xml)

Writing ch05s02.html for sect1

Writing ch05s03.html for sect1

Writing ch05.html for chapter(ch5_calc_duration.xml)

Writing ch06s02.html for sect1

Writing ch06s03.html for sect1

Writing ch06s04.html for sect1

Writing ch06.html for chapter(ch6_mp3_related.xml)

Writing ch07.html for chapter(ch7_after_content.xml)

Writing bi01.html for bibliography(reference)

Writing index.html for book

对应的效果如下:

4a3c2951671067c9100c0b4c38861fe8.png

然后打开index.html后, 点击下一页,也是正常的:

8bf697b01f9494f641eee97f86610eff.png

【总结】

想要生成多个html文件,主要是把默认的html的docbook.xsl换为chunk.xsl即可。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值