PDA

Просмотр полной версии : Не создается файл индексации при преобразовании docbook -> chm


dacuan
09.09.2004, 16:01
Пытаюсь разобраться с форматом docbook.
Нашел следующий пример:
Файл book.xml

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN"
>

<book>
<bookinfo>
<title>An Example Book</title>

<author>
<firstname>Your first name</firstname>
<surname>Your surname</surname>
<affiliation>
<address><email>foo@example.com</email></address>
</affiliation>
</author>

<copyright>
<year>2000</year>
<holder>Copyright string here</holder>
</copyright>

<abstract>
<para>If your book has an abstract then it should go here.</para>
</abstract>
</bookinfo>

<preface>
<title>Preface</title>

<para>Your book may have a preface, in which case it should be placed
here.</para>
</preface>

<chapter>
<title>My first chapter</title>

<para>This is the first chapter in my book.</para>

<sect1>
<title>My first section</title>

<para>This is the first section in my book.</para>
</sect1>
</chapter>
<chapter>
<title>My second chapter</title>

<para>This is the second chapter in my book.</para>

<sect1>
<title>My second section</title>

<para>This is the section section in my book.</para>
</sect1>
</chapter>
<chapter>
<title>А эта глава на русском</title>

<para>Весть текст главы написан на русском языке</para>

<sect1>
<title>Секция 1 в руской главе</title>

<para>Первый параграф в секции на русском языке.</para>
</sect1>
</chapter>
</book>


Преобразовываю его в формат chm следующей командой:

xsltproc /path/to/xsl-stylesheets/htmlhelp/htmlhelp.xsl book.xml


После преобразования файл индекса .hhk не создается.

Версии софта
libxslt-1.0.27-3
docbook-style-xsl-1.58.1

Правда, при преобразовании многократно выводилась ошибка

runtime error: file /path/to/xsl-stylesheets/html/html-rtf.xsl element apply-templates
xsl:apply-templates : can't find doc


И еще один глюк, Русская глава в дереве навигации готового chm'а выводится непонятными символами, на альтернативную кодировку не похоже (файл book.xml в кодировке UTF-8).