Peter Burkholder wrote:
> I probably haven't read the docs close enough, but can you give some
> pointers on how to produce different document output formats from DocBook
> docs using XXE or other tools.
> 
> More specifically, I'd like the html I'm generating from simplified to
> docbook to up articleinfo at the end instead of the top.

* You need to modify the XSL style sheets that produces HTML. See 
http://docbook.sourceforge.net/projects/xsl/ and see 
http://docbook.sourceforge.net/release/xsl/current/doc/

* The same style sheets are used for DocBook and Simplified DocBook.

* The ``main'' style sheets are specified in process commands contained 
in XXE_install_dir/config/docbook/xslMenu.incl

---
<command name="docb.toHTML">
   <process>
     <mkdir dir="resources" />
     <!-- add attribute selection="true" to copyDocument if you want
         to be able to process explicitely selected element -->
     <copyDocument to="__doc.xml">
       <resources match="(https|http|ftp)://.*" />
       <resources match=".+" copyTo="resources" />
     </copyDocument>

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

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

     <transform stylesheet="xsl/html/chunk.xsl"
               file="__doc.xml" to="__doc.html" >
       <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="html.stylesheet">html.css</parameter>

       <parameter name="callout.graphics">1</parameter>
       <parameter name="callout.graphics.path">callouts/</parameter>
       <parameter name="callout.graphics.extension">.gif</parameter>
     </transform>

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

     <upload base="%0/">
       <copyFiles files="*.*" toDir="." />
       <copyFiles files="resources/*" toDir="resources" />
       <copyFiles files="callouts/*" toDir="callouts" />
     </upload>
   </process>
</command>
---
The line of interest is "<transform stylesheet="xsl/html/chunk.xsl" ... />".

* Process commands are described in the Power User's Guide.

* Norman Walsh's style sheets are found in 
XXE_install_dir/config/docbook/xsl/

* Note that conversion to HTML comes in two flavors (each with its own 
style sheet): multi-page HTML (xsl/html/chunk.xsl) and single page HTML 
(xsl/html/docbook.xsl).




Reply via email to