Skopik Pavel wrote:
> 
> - since there is no process command for html help I wanted to try out
> whether I would be able to achieve generating source files for html help
> with standard command for generating html files. 
> - as a second step I tried to add the "shell" command which seems to run
> properly and generates chm file, but then the transformation crashes and
> that is why I asked for help because I must be apparently doing
> something wrong. The process ends with error number 1 
> - if the second step was succesfull I would try to further tweak the
> transform. scenario to delete all the source files and upload only chm
> file to the specified directory.

OK. Please find attached to this email an xslMenu.incl which is a
replacement for the one found in XXE_install_dir/addon/config/docbook
(XXE v3.2)

This xslMenu.incl (which you'll need to tune for your needs) adds
"Convert to HTMLHelp..." to the DocBook|Convert menu.

I've tested this on XXE v3.2 Standard/Java 1.4.2_10/Windows 2000.

----------------------------------------------------------------------------
<command name="docb.toHTMLHelp">
  <process>
    <mkdir dir="resources" />
    <mkdir dir="raw" />
    <copyDocument to="__doc.xml">
      <resources match="(https|http|ftp)://.*" />
      <resources match=".+\.(png|jpg|jpeg|gif)"
                 copyTo="resources" />
      <resources match="(?:.+/)?(.+)\.(\w+)"
                 copyTo="raw" referenceAs="resources/$1.png" />
      <resources match=".+"
                 copyTo="resources" />
    </copyDocument>

    <convertImage from="raw" to="resources" format="png" />

    <mkdir dir="images/callouts" />
    <copyProcessResources resources="xsl/images/draft.png"
     to="images" />
    <copyProcessResources
      resources="@xsl/images/callouts/png_callouts.list"
      to="images/callouts" />

    <copyProcessResources resources="xsl/css/html.css" to="html.css" />

    <transform stylesheet="xsl/htmlhelp/htmlhelp.xsl"
               file="__doc.xml" to="__doc.html">
      <parameter name="use.extensions">1</parameter>
      <!-- Cannot work and generates a lot of error messages. -->
      <parameter name="graphicsize.extension">0</parameter>

      <parameter name="base.dir">%W%S</parameter>
      <parameter name="chunk.first.sections">1</parameter>
      <parameter name="chunk.section.depth">1</parameter>

      <parameter name="toc.section.depth">3</parameter>
      <parameter name="section.autolabel">1</parameter>

      <parameter name="callout.graphics">1</parameter>

      <parameter name="html.stylesheet">html.css</parameter>

      <parameter name="use.embed.for.svg">0</parameter>

      <parameter name="htmlhelp.hhp">%W%Shtmlhelp.hhp</parameter>(((1)))
      <parameter name="htmlhelp.hhc">%W%Stoc.hhc</parameter>

      <parameterGroup name="docb.toHTMLHelp.transformParameters" />
    </transform>

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

    <shell
    command='"C:\Program Files\HTML Help Workshop\hhc.exe" htmlhelp.hhp
             || exit 0'/>(((2)))

    <upload base="%0">
      <copyFile file="htmlhelp.chm" to="%0" />
    </upload>
  </process>
</command>
----------------------------------------------------------------------------
(((1))) For an unknown reason, the XSLT style sheet generates
htmlhelp.hhp and toc.hhc in C:\

(((2))) hhc.exe exit code is 1 even when the compilation is successful.
Its exit code should be 0. That's why the process command thinks hhc.exe
has failed.

Note that the above command does not use your customization of
htmlhelp.xsl and that you'll have to change this filename:
"C:\Program Files\HTML Help Workshop\hhc.exe".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xslMenu.incl
Type: text/xml
Size: 17676 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20060406/9f6a306b/attachment.xml
 

Reply via email to