开发者

How do I generate TOC-only HTML from DocBook?

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 wra开发者_如何学编程ppers 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.


Assuming that you are using the SourceForge DocBook stylesheets, you can use chunking with the chunk.tocs.and.lots parameter. This generates a separate TOC file (and the other chunked HTML files as well).

Some options relevant to the bonus question are discussed in this thread: http://www.mail-archive.com/docbook-apps@lists.oasis-open.org/msg09111.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜