Steve Valaitis wrote:
> I just setup some of my chapters with a dbhtml dir processing
> instruction, but unfortunately it's not working. The processing
> instruction looks good <?dbhtml dir="rules"?>, and I created a "rules"
> directory under the output directory. When the book is converted to
> HTML, the links in the TOC show the proper pathing
> out/rules/somefile.html, but there's no files in the "rules" dir.
> 
> Before adding the PI, they all used to be placed as expected in the
> output dir, and the regular supporting files(index.html, glossary,
> etc...) are still placed in the root. It's just that the rules files
> have disappeared, and just don't exist anywhere.
> 
> Any idea what I've done wrong, or or what's going on?

Sure. the process command which is used to convert DocBook to HTML does
its work in a temporary directory (e.g. /tmp/xxe12339876).

Your rules/ subdirectory is created there, containing the proper files.

At the end of the process command (called docb.toHTML), an <upload>
element is used to copy the output of the conversion to the actual
target directory.

You need to customize this <upload> element to make it copy your rules/
subdirectory along with the other files.

For that (quick and dirtly solution), use a text editor and open
XXE_install_dir/addon/config/docbook/xslMenu.incl.

* Go to process command docb.toHTML.

* You'll find:
---
  <command name="docb.toHTML">
    <process>
      <mkdir dir="resources" />

      ...

      <!-- The real HTML file is index.html -->
      <delete files="__doc.*" />

      <upload base="%0/">
        <copyFiles files="*.*" toDir="." />
        <copyFiles files="resources/*" toDir="resources" />
        <copyFiles files="images/*" toDir="images" />
      </upload>
    </process>
  </command>
---

* Simply add (I assume that the rules/ subdirectory is automatically
created by the XSLT style sheet):
---
<copyFiles files="rules/*" toDir="rules" />
---
after:
---
<copyFiles files="*.*" toDir="." />
---

Reply via email to