Hi,
DAPS generated HTML supports a wonderful scrollable table of contents, which is shown as overlay box when hovering over "Show Contents".
Unfortunately due to a bug in the template rule matching <chapter> elements in the autobubbletoc.xsl stylesheet, entries for this TOC are only generated for top-level elements (chapters) of a book (<section> and <sect1> elements are not propagated in call to template bubble-subtoc).
After correcting this, the generated HTML contains all TOC entries as nested <ol> elements, but when viewing the result in a browser, still only top level chapters appear.
Is this a problem of item filtering in Javascript?
How can this be fixed?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm generating single page HTML with
STYLEROOT="/opt/daps-trunk/daps/suse/daps2013/"
In the template rule matching <chapter> elements in
daps/suse/suse2013/xhtml/autobubbletoc.xsl
I extended the 'select' attribute to include section elements (to be passed as param "nodes" in calling template bubble-subtoc):
Unfortunately, rendering of the "bubble" TOC in a browser still shows only top-level chapter headings (no sections at all).
Last edit: Stefan Quandt 2014-09-24
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2014-09-24
Pardon,
there are still some pieces of information missing:
First off, I am authoring a Docbook 5 document of type <book> with sections nesting up to level 4.
Of course a prerequisite for getting a hierachical HTML "bubble TOC" is to
set appropriate parameters in daps/suse/suse2013/xhtml/param.xsl, as in
Then the DAPS documentation (Docbook 4) sources getting hierarchical bubble TOC from was possible, but not before unconditionally setting the value of xsl:param "bubbletoc.max.depth.shallow" to zero (in param.xsl).
I.e. these variable setitngs were sufficient to get a hierarchical bubble TOC with Docbook 4 XML sources and there is no need to patch autobubbletoc.xsl for this purpose.
Also, the bubble TOC also gets rendered properly when viewing in a browser (with some alignment and line break issues though).
Contrary to that, in the case of my Docbook 5 book, it turned that additionally patching of autobubbletoc.xsl is required to resolve the issue of HTML TOC generation which i initially described.
Thanks in advance
Stefan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Pardon,
there are still some pieces of information missing:
First off, I am authoring a Docbook 5 document of type <book> with sections nesting up to level 4.
Of course a prerequisite for getting a hierachical HTML "bubble TOC" is to
set appropriate parameters in daps/suse/suse2013/xhtml/param.xsl, as in
Then it was possible to generate HTML docs with hierarchical bubble TOC from the DAPS documentation (Docbook 4) sources, but not before unconditionally setting the value of xsl:param bubbletoc.max.depth.shallow" to zero (in param.xsl).
I.e. these variable settings are sufficient to get a hierarchical bubble TOC from Docbook 4 XML sources and in this case there is no need to patch autobubbletoc.xsl.
Also, the bubble TOC gets rendered properly when viewing in a browser (with some alignment and line break issues though).
Contrary to that, in the case of my Docbook 5 book, it turned out that additionally patching of autobubbletoc.xsl is required to resolve the issue of HTML TOC generation which i initially described.
Thanks in advance
Stefan
Last edit: Stefan Quandt 2014-09-24
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
First off, I am authoring a Docbook 5 document of type <book> with sections nesting up to level 4.
Currently, we don't support DocBook 5 ATM. So I guess, that's the reason why it doesn't work. You could transform your DocBook 5 to DocBook 4 and see if things work. Or you could remove the DocBook 5 namespace.
Sorry, today and tomorrow I will have no time to investigate it further, but I hope I will catch up next week.
Thanks again!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I also think that the cause is some XSL stylesheet not descending on chapters in case of Docbook 5 XML sources.
Migrating back to Docbook 4 is not really an option, since we already made the switch to Docbook 5 back in 2011.
But since my patches in param.xsl and autobubbletoc.xsl turned out to work around the issue, this no longer is a showstopper for me.
Thus the next step for me would be to improve on the usability of the bubble TOC in case of books with sections nesting more than two levels.
E.g.
- when clicking expandable TOC items of level two and higher for the first time, there children will not become visible before closing the TOC window and opening again
- TOC items of level two which are expandable have wrong width so that they overlap into the TOC column to the right.
Unfortunately my Javascript skills are limited, so that I would like to submit a ticket for this.
Best regards
Stefan
Last edit: Stefan Quandt 2014-09-26
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
DAPS generated HTML supports a wonderful scrollable table of contents, which is shown as overlay box when hovering over "Show Contents".
Unfortunately due to a bug in the template rule matching <chapter> elements in the autobubbletoc.xsl stylesheet, entries for this TOC are only generated for top-level elements (chapters) of a book (<section> and <sect1> elements are not propagated in call to template bubble-subtoc).
After correcting this, the generated HTML contains all TOC entries as nested <ol> elements, but when viewing the result in a browser, still only top level chapters appear.
Is this a problem of item filtering in Javascript?
How can this be fixed?
Hi Stefan,
sorry for the late reply.
I'm not sure if I understand what you mean. What did you change? Could you elaborate please?
Thanks!
I'm generating single page HTML with
STYLEROOT="/opt/daps-trunk/daps/suse/daps2013/"
In the template rule matching <chapter> elements in
daps/suse/suse2013/xhtml/autobubbletoc.xsl
I extended the 'select' attribute to include section elements (to be passed as param "nodes" in calling template bubble-subtoc):
As consequence the generated HTML then contains a full recursive TOC of nested <ol> elements introduced by
Unfortunately, rendering of the "bubble" TOC in a browser still shows only top-level chapter headings (no sections at all).
Last edit: Stefan Quandt 2014-09-24
Pardon,
there are still some pieces of information missing:
First off, I am authoring a Docbook 5 document of type <book> with sections nesting up to level 4.
Of course a prerequisite for getting a hierachical HTML "bubble TOC" is to
set appropriate parameters in daps/suse/suse2013/xhtml/param.xsl, as in
Then the DAPS documentation (Docbook 4) sources getting hierarchical bubble TOC from was possible, but not before unconditionally setting the value of xsl:param "bubbletoc.max.depth.shallow" to zero (in param.xsl).
I.e. these variable setitngs were sufficient to get a hierarchical bubble TOC with Docbook 4 XML sources and there is no need to patch autobubbletoc.xsl for this purpose.
Also, the bubble TOC also gets rendered properly when viewing in a browser (with some alignment and line break issues though).
Contrary to that, in the case of my Docbook 5 book, it turned that additionally patching of autobubbletoc.xsl is required to resolve the issue of HTML TOC generation which i initially described.
Thanks in advance
Stefan
Pardon,
there are still some pieces of information missing:
First off, I am authoring a Docbook 5 document of type <book> with sections nesting up to level 4.
Of course a prerequisite for getting a hierachical HTML "bubble TOC" is to
set appropriate parameters in daps/suse/suse2013/xhtml/param.xsl, as in
Then it was possible to generate HTML docs with hierarchical bubble TOC from the DAPS documentation (Docbook 4) sources, but not before unconditionally setting the value of xsl:param bubbletoc.max.depth.shallow" to zero (in param.xsl).
I.e. these variable settings are sufficient to get a hierarchical bubble TOC from Docbook 4 XML sources and in this case there is no need to patch autobubbletoc.xsl.
Also, the bubble TOC gets rendered properly when viewing in a browser (with some alignment and line break issues though).
Contrary to that, in the case of my Docbook 5 book, it turned out that additionally patching of autobubbletoc.xsl is required to resolve the issue of HTML TOC generation which i initially described.
Thanks in advance
Stefan
Last edit: Stefan Quandt 2014-09-24
Hi Stefan,
thanks for the detailed report.
Currently, we don't support DocBook 5 ATM. So I guess, that's the reason why it doesn't work. You could transform your DocBook 5 to DocBook 4 and see if things work. Or you could remove the DocBook 5 namespace.
Sorry, today and tomorrow I will have no time to investigate it further, but I hope I will catch up next week.
Thanks again!
Hi Thomas,
thanks for your response.
I also think that the cause is some XSL stylesheet not descending on chapters in case of Docbook 5 XML sources.
Migrating back to Docbook 4 is not really an option, since we already made the switch to Docbook 5 back in 2011.
But since my patches in param.xsl and autobubbletoc.xsl turned out to work around the issue, this no longer is a showstopper for me.
Thus the next step for me would be to improve on the usability of the bubble TOC in case of books with sections nesting more than two levels.
E.g.
- when clicking expandable TOC items of level two and higher for the first time, there children will not become visible before closing the TOC window and opening again
- TOC items of level two which are expandable have wrong width so that they overlap into the TOC column to the right.
Unfortunately my Javascript skills are limited, so that I would like to submit a ticket for this.
Best regards
Stefan
Last edit: Stefan Quandt 2014-09-26
In the (hopefully not so far) future DAPS will support DocBook 5 directly.
Great!
Unfortunately, my Javascript skills are also limitied.
Best regards,
Tom