--> XXE v4 will have such command-line tool.

XXE v4 will not generate duplicate IDs (though, in our opinion, its not 
a good idea to stop processing a document just because the document 
contains duplicate IDs).

--> Meanwhile, with XXE v3:

* Instead of using docb.toHTML1, I would recommend to write a custom, 
very simple, process command, just copying a flattened copy of a 
document to the location you specify.

* Command:
---
convertdoc -d docb.toHTML1 operator-manual.docbook.xml \
     -u build/test.html
---
fails because the docb.toHTML1 expects 3 arguments.

The only way to learn how to use a process command through convertdoc is 
to read the XML source of this process command.

Excerpts of XXE_install_dir/addon/config/docbook/xslMenu.incl
---
<command name="docb.toHTML1">
   <process>
     <subProcess name="docb.convertStep1" />

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

     <transform stylesheet="xsl/html/docbook.xsl"
                file="__doc.xml" to="__doc.html"
                label="Convert to single-page HTML"
 
documentation="http://docbook.sourceforge.net/release/xsl/current/doc/html/%{parameter.name|html.stylesheet}.html">
       <parameter name="use.extensions">1</parameter>
       <!-- Cannot work and generates a lot of error messages. -->
       <parameter name="graphicsize.extension">0</parameter>

       <parameter name="generate.toc">%0</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>

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

     <upload base="%2">
       <copyFile file="__doc.html" to="%2" />
       <copyFile file="html.css" to="html.css" />
       <copyFiles files="resources/*" toDir="resources" />
       <copyFiles files="images/*" toDir="images" />
     </upload>
   </process>
</command>
---

Therefore, command:
---
convertdoc -d docb.toHTML1 operator-manual.docbook.xml \
     -s " " -s 0 -u build/test.html
---
Should work fine.




Jean Jordaan wrote:
> 
> Short version: I'd like to use http://www.deltaxml.com/free/docbook/
> to generate a PDF with changebars for the differences between two
> versions of a DocBook document. This requires that xincludes are
> expanded, and it doesn't like duplicate IDs.
> 
> It looks like XXE is the only xinclude processor out there which can
> handle the recursive xincludes which it uses for modular documents. Is
> it perhaps possible to make it output the combined document?
> 
> It looks like this should work:
> 
> $ convertdoc -d docb.toHTML1 operator-manual.docbook.xml -u build/test.html
> 
> There's something wrong with the way I call it, as it dies with:
> 
> """
> [...]
> Unexpected section.autolabel value: ; using default.
> Unexpected section.autolabel value: ; using default.
> convertdoc: *** error: Command execution has failed:
> java.net.MalformedURLException: no protocol:
> +---------------------------------------
> | java.net.URL.<init>(URL.java:567)
> | java.net.URL.<init>(URL.java:464)
> | java.net.URL.<init>(URL.java:413)
> | com.xmlmind.xmleditapp.process.UploadItem.execute(UploadItem.java:83)
> | com.xmlmind.xmleditapp.process.ProcessCommand$1.run(ProcessCommand.java:176)
> """
> 
> Anyway, it leaves a /tmp/xxe56203/__doc.xml file which looks like what
> I'm looking for, except that it has duplicate ids.
> 
> If I do this:
> 
> $ convertdoc -d docb.toHTML operator-manual.docbook.xml -u build/out/
> 
> I don't get any errors, but the /tmp/xxeNNNNN/ directory doesn't
> contain any __doc.xml file, which leads me to suspect that the
> docb.toHTML1 version won't leave a __doc.xml either, if the invocation
> is fixed so that it completes successfully.
> 


Reply via email to