2

Given a Docbook-based XML file, how do I extract just the table of contents (TOC) into its own HTML file - preferably without resorting to writing my own XSLT template? I am using xsltproc.

I'm convinced that this must be obviously easy, but for some reason the solution escapes me - after having looked through the DocBook documentation.

As a bonus, I would like the generated toc.html file not to have any html/head/body...body/html wrappers in order to make it simple to embed it within a CMS-powered site.

Any help is appreciated. Thanks.

P.S. My DocBook-content is derived from AsciiDoc, though that should make no difference.

4

1 回答 1

1

假设您使用的是SourceForge DocBook 样式表,您可以使用带有chunk.tocs.and.lots参数的分块。这会生成一个单独的 TOC 文件(以及其他分块的 HTML 文件)。

此线程中讨论了与奖金问题相关的一些选项:http: //www.mail-archive.com/docbook-apps@lists.oasis-open.org/msg09111.html

于 2011-01-14T16:44:52.400 回答