Page 1 of 1

Abstract of set not in navigation when set is nested (DocBook)

Posted: Thu Jun 22, 2017 12:11 pm
by John_Tait
Hi. I've found a reproducable error when nesting a set in another set (DocBook 5.1, Oxygen 18.0). I thought that it might be caused because the set contained articles (new for DocBook 5.1) but it appears again when the set contains books. I have reproduced both below.

This affects chunked HTML and EPUB transforms. Both examples are a set (set A) containing one article/book and another set (set B) containing one article/book.

After transform, the articles and books appear in the 'Previous'/'Next' links and EPUB transforms, but the abstract of Set B does not. You can reach the Set B abstract by the table of contents in the Set A (first chunk in HTML output) but not by moving through the document.

The two examples are very similar. First example (articles)

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://docbook.org/xml/5.1/rng/docbookxi.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://docbook.org/xml/5.1/sch/docbook.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<set xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude"
    xmlns:xlink="http://www.w3.org/1999/xlink" version="5.1">
    <info>
        <title>Set A</title>
        <abstract>
            <title>First set</title>
            <para>This is a set of two articles, one of which is in another set</para>
        </abstract>
    </info>
   
    <article>
        <title>Here is an article title</title>
        <info>
            <abstract>
                <title>Title of an article abstract</title>
                <para>Text of abstract</para>
            </abstract>
        </info>
        <simplesect>
           
           <title>Title of simple section</title>
            <para>Text of simple section</para>
        </simplesect>
    </article>
   
   
    <set>
        <info>
            <title>Set B containing one article in a set</title>
            <abstract>
                <title>Second set</title>
                <para>Is this text visible?</para>
            </abstract>
        </info>
       
        <article>
            <title>Here is an article title</title>
            <info>
                <abstract>
                    <title>Title of an article abstract</title>
                    <para>This article is in another set. Did you see the abstract of set B?</para>
                </abstract>
            </info>
            <simplesect>
               
                <title>Title of simple section</title>
                <para>Text of simple section</para>
            </simplesect>
        </article>
         
    </set>
   
</set>


Second example (books):

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://docbook.org/xml/5.1/rng/docbookxi.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://docbook.org/xml/5.1/sch/docbook.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<set xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude"
    xmlns:xlink="http://www.w3.org/1999/xlink" version="5.1">
    <info>
        <title>Set A</title>
        <abstract>
            <title>First set</title>
            <para>This is a set of two books, one of which is in another set</para>
        </abstract>
    </info>
    <book>
        <title>Here is a book title</title>
        <info>
            <abstract>
                <title>Title of an book abstract</title>
                <para>Text of abstract</para>
            </abstract>
        </info>
        <chapter>
            <title>Chapter title</title>
            <simplesect>
                <title>Title of simple section</title>
                <para>Text of simple section</para>
            </simplesect>
        </chapter>
    </book>
    <set>
        <info>
            <title>Set B containing one book in a set</title>
            <abstract>
                <title>Second set</title>
                <para>Is this text visible?</para>
            </abstract>
        </info>
        <book>
            <title>Here is a book title</title>
            <info>
                <abstract>
                    <title>Title of an book abstract</title>
                    <para>Text of abstract. Did you see the abstrract of set B?</para>
                </abstract>
            </info>
            <chapter>
                <title>Chapter title</title>
                <simplesect>
                    <title>Title of simple section</title>
                    <para>Text of simple section</para>
                </simplesect>
            </chapter>
        </book>
       
    </set>
   
</set>

Re: Abstract of set not in navigation when set is nested (DocBook)

Posted: Thu Jun 22, 2017 12:40 pm
by Radu
Hi John,

As we are using DITA internally we do not have much experience with how the Docbook XSLTs work, we usually ship with Oxygen the latest Docbook XSLTs available on the Docbook web site:

https://sourceforge.net/projects/docbook/files/docbook-xsl/

Ideally you could join the Docbook Apps Users list and ask there:

http://docbook.org/help

Regards,
Radu

Re: Abstract of set not in navigation when set is nested (DocBook)

Posted: Fri Jun 23, 2017 1:15 pm
by John_Tait
Thanks for your reply on the Docbook Apps Users list.

Re: Abstract of set not in navigation when set is nested (DocBook)

Posted: Fri Jun 23, 2017 1:20 pm
by Radu
Hi John,

No problem, I felt kind of guilty nobody else answered there. I will link to my reply here:

https://lists.oasis-open.org/archives/docbook-apps/201706/msg00003.html

I also added an issue on the Docbook GitHub:

https://github.com/docbook/xslt10-stylesheets/issues/35

Maybe you can register to watch that as well, see if they have anything to say about it.

Regards,
Radu

Re: Abstract of set not in navigation when set is nested (DocBook)

Posted: Thu Sep 21, 2017 1:17 am
by ottoh
Radu wrote:... we are using DITA internally we do not have much experience with how the Docbook XSLTs work, we usually ship with Oxygen the latest Docbook XSLTs available on the Docbook web site:
https://sourceforge.net/projects/docbook/files/docbook-xsl/

I presume that you know that docbook has moved to github as their official site...

https://github.com/docbook/xslt10-stylesheets/releases/tag/release%2F1.79.2

which states:
This is a minor release[1.79.2]. It reflects the state of the code after the migration from sourceforge.net to github.com. As such, it shouldn't contain any user-visible changes, other than the switch to the new DocBook CDN.

Just a reference note for others that may see this post in the future and try to go to sourceforge.

Best regards,

..Otto

Re: Abstract of set not in navigation when set is nested (DocBook)

Posted: Thu Sep 21, 2017 9:02 am
by Radu
Hi Otto,

Thanks for taking the time to update this thread.

Regards,
Radu