GNOME Bugzilla – Bug 748456
xsl: Enable ToC generation on empty <toc/> elements
Last modified: 2015-04-28 08:00:47 UTC
When a section grows longer, it may be useful to include a table of content at the top. By processing empty <toc/> elements to automatically generate a proper table of contents we let authors to customize the behaviour case-by-case.
Created attachment 302346 [details] [review] xsl: Enable ToC generation on empty <toc/> elements When a section grows longer, it may be useful to include a table of content at the top. By processing empty <toc/> elements to automatically generate a proper table of contents we let authors to customize the behaviour case-by-case.
Do you have an example how this looks like?
At http://people.collabora.com/~em/gst-validate/html/command-line-tools.html I've uploaded a copy of the page I'm currently working on and that triggered my patch: by adding an empty <toc/> element after the title I got a nice outline of the subsections in the document. The current page emulates something similar with a hand-coded <synopsis> element, which is really ugly, semantically and aesthetically: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-validate/html/command-line-tools.html
Aha, so this is for manualy written content, right? I personally think it'd be better to have one page for each tool. As a bonus gtk-doc can then generate the man pages for you. Here is an example where I am doing this: https://github.com/Buzztrax/buzztrax/tree/master/docs/reference/bt-cmd
Fair enough, I'll WONTFIX this myself. :) Thanks for the pointer!
Hej, I am still considering it, just wanted to understand the usecase. It might be useful for long manually written sections and I don't think it hurts anything else. I'll play with it tonight.
The following fixes have been pushed: b756620 xsl: Enable ToC generation on empty <toc/> elements 1a252b0 xsl: work around a missing mode in the xsl template
Created attachment 302479 [details] [review] xsl: Enable ToC generation on empty <toc/> elements When a section grows longer, it may be useful to include a table of content at the top. By processing empty <toc/> elements to automatically generate a proper table of contents we let authors to customize the behaviour case-by-case.
Created attachment 302480 [details] [review] xsl: work around a missing mode in the xsl template Fixes #729911
Ignore the 1a252b0 xsl: work around a missing mode in the xsl template one. Thats not related to this bug.
Thanks!