docbook-apps

  • 1.  nested lists being displayed incorrectly

    Posted 04-24-2012 20:15
    I am working with the following nested lists

    <orderedlist>
    <listitem>It declares the document to be XML by indicating a version and an encoding.</listitem>
    <listitem>It defines the root element for our document (book) and the following additional elements</listitem>
    <itemizedlist>
    <listitem>The default namespace; the default type of document we are using (docbook) along with its namespace address</listitem>
    <listitem>The namespace for xlink (used to create hyperlinks) with its namespace address</listitem>
    <listitem>The version of Docbook we are using</listitem>
    <listitem>The default language for the document</listitem>
    </itemizedlist>
    <listitem>The structure for the rest of the document: title for the book, author information and a sample chapter for us to work with</listitem>
    </orderedlist>

    Is the syntax correct?


    When transforming the file to XHTML and FO it is swapping the order of the lists in the resulting document. Below is the result in HTML using the 1.76 styelsheets downloaded late last week

    The skeleton of the file does a few things for us:






    • The default namespace; the default type of document we are using (docbook) along with its namespace address

    • The namespace for xlink (used to create hyperlinks) with its namespace address

    • The version of Docbook we are using

    • The default language for the document




    1. It declares the document to be XML by indicating a version and an encoding.

    2. It defines the root element for our document (book) and the following additional elements

    3. The structure for the rest of the document: title for the book, author information and a sample chapter for us to work with




    I get the same result if I use the snapshot stylesheets when building epub3 and if I change the orderedlist to an itemizedlist. .


  • 2.  RE: [docbook-apps] nested lists being displayed incorrectly

    Posted 04-24-2012 20:50
    Hi,

    The nested list needs to have a <listitem> as a parent, not the top
    level list, like this:

    <orderedlist>
    <listitem>It declares the document to be XML by indicating a
    version and an encoding.</listitem>
    <listitem>It defines the root element for our document (book)
    and the following additional elements
    <itemizedlist>
    <listitem>The default namespace; the default
    type of document we are using (docbook) along with its namespace
    address</listitem>
    <listitem>The namespace for xlink (used to
    create hyperlinks) with its namespace address</listitem>
    <listitem>The version of Docbook we are
    using</listitem>
    <listitem>The default language for the
    document</listitem>
    </itemizedlist>
    </listitem>
    <listitem>The structure for the rest of the document: title for
    the book, author information and a sample chapter for us to work
    with</listitem> </orderedlist>
    I just tested and it works fine fine.

    (Yay! I was finally able to *give* help on this list! :) )

    -David
    <dgoss@mueller-inc.com>




  • 3.  Re: [docbook-apps] nested lists being displayed incorrectly

    Posted 04-25-2012 06:33
    Hi Carlos,

    On Tue, 24 Apr 2012 13:15:06 -0700
    Carlos Araya <carlos.araya@gmail.com> wrote:

    > I am working with the following nested lists
    >
    > <orderedlist>
    > <listitem>It declares the document to be XML by indicating a
    > version and an encoding.</listitem>
    > <listitem>It defines the root
    > element for our document (book) and the following additional
    > elements</listitem>
    > <itemizedlist> <listitem>The default namespace;
    > the default type of document we are using (docbook) along with its
    > namespace address</listitem> <listitem>The namespace for xlink (used
    > to create hyperlinks) with its namespace address</listitem>
    > <listitem>The version of Docbook we are using</listitem>
    > <listitem>The default language for the document</listitem>
    > </itemizedlist> <listitem>The structure for the rest of the document:
    > title for the book, author information and a sample chapter for us to
    > work with</listitem> </orderedlist>
    >
    > Is the syntax correct? [...]

    Well, almost. It seems it is syntactically correct, but it is not
    valid. For example, a listitem like this

    <listitem>It declares the document to be XML by indicating a
    version and an encoding.</listitem>

    needs to have a para(!):

    <listitem>
    <para>It declares the document to be XML by indicating a
    version and an encoding.</para>
    </listitem>

    If you use a <listitem> with the raw text, this is not allowed
    according to the DocBook schema(s).

    _Before_ you transform your text into HTML (or any other format),
    _always_ validate your DocBook documents. If your documents are not
    valid, fix it. The DocBook stylesheets rely on valid DocBook documents.
    If you do not deliver valid DocBook, "strange" things can happen. :)

    Find more information here:

    http://www.docbook.org/tdg/en/html/listitem.html
    http://doccookbook.sf.net/html/en/dbc.markup.lists.html


    --
    Gruß/Regards,
    Thomas Schraitle