I am creating a DocBook from my adoc and having trouble getting DocInfo to work. Unless I am mistaken, the DocInfo feature should allow me to insert elements into the <info> tag of the created DocBook.
To test this I have created the following test case (uploaded as files) . test.adoc - Contains main document docinfo.xml - Infomation to be included I am creating the DocBook using the following command (using the ruby Asciidoctor 2.0.10 version running on windows). asciidoctor --backend docbook --doctype book --out-file .\test.docbook .\test.adoc The resulting file test.docbook, does not contain the information from docinfo.xml. I have tried several variants (private vs shared, header with no footer etc) and have been unable to get this to work. This test case uses shared-head Any help would be appreciated. Cheers Steve |
Would you please double-check that your XML file is well-formed? When I clicked on the link for it, my browser reported:
This page contains the following errors: error on line 2 at column 1: Extra content at the end of the document Below is a rendering of the page up to the first error. This is the subtitle |
Thanks for the reply. Yes, the XML is invalid, as it does not have a root node.
<subtitle>This is the subtitle</subtitle> <productname>Product Name</productname> <productnumber>Product Number</productnumber> Instead of <info> <subtitle>This is the subtitle</subtitle> <productname>Product Name</productname> <productnumber>Product Number</productnumber> </info> I did this as the documentation did not include the <info> tag, and that is also how the real life example worked. I will see if adding in the info tag makes a difference. |
I tried the following enclosing the XML in a <info> tag with no change in behavior.
The content is still not being included. For completeness, here is the new docinfo.xml file with the <info> tags. docinfo.xml |
Administrator
|
In reply to this post by steveg
In order for docinfo to be picked up, you have to enable it. See https://asciidoctor.org/docs/user-manual/#naming-docinfo-files Best Regards, -Dan On Fri, Sep 11, 2020 at 7:26 PM steveg [via Asciidoctor :: Discussion] <[hidden email]> wrote: I am creating a DocBook from my adoc and having trouble getting DocInfo to work. Unless I am mistaken, the DocInfo feature should allow me to insert elements into the <info> tag of the created DocBook. -- Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux |
Dan - thanks for the reply.
I think I have in that my main ascii.doc file (test.adoc) has the following attribute set. :docinfo: shared-head on line 2 Is there more that I need to do? Cheers Steve |
Administrator
|
The problem is that you are modifying the extension of the output file (from .xml to .docbook). As a result, you must also rename your docinfo file from docinfo.xml to docinfo.docbook. Best Regards, -Dan On Sat, Sep 12, 2020 at 2:58 AM steveg [via Asciidoctor :: Discussion] <[hidden email]> wrote: Dan - thanks for the reply. -- Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux |
Free forum by Nabble | Edit this page |