[yelp-xsl] Adding stock sidebar support



commit ccf8396651802fcee95325fc3eee30f6b69700e0
Author: Shaun McCance <shaunm redhat com>
Date:   Sun Jun 10 13:29:48 2018 -0400

    Adding stock sidebar support

 doc/yelp-xsl/C/db2html-division.page           |   2 +-
 doc/yelp-xsl/C/html.head.top.custom.page       |  13 ++
 doc/yelp-xsl/C/html.page                       |   2 +-
 doc/yelp-xsl/C/html.page.page                  |   4 +-
 doc/yelp-xsl/C/html.sidebar.contents.mode.page |  12 ++
 doc/yelp-xsl/C/html.sidebar.contents.page      |  17 ++
 doc/yelp-xsl/C/html.sidebar.custom.page        |   1 +
 doc/yelp-xsl/C/html.sidebar.left.page          |   6 +
 doc/yelp-xsl/C/html.sidebar.mode.page          |  16 ++
 doc/yelp-xsl/C/html.sidebar.page               |  16 ++
 doc/yelp-xsl/C/html.sidebar.right.page         |   6 +
 doc/yelp-xsl/C/html.sidebar.sections.mode.page |  12 ++
 doc/yelp-xsl/C/html.sidebar.sections.page      |  17 ++
 doc/yelp-xsl/C/mal.link.target.extended.page   |  25 +++
 doc/yelp-xsl/C/mal2html-page.page              |   2 +-
 doc/yelp-xsl/C/mal2html.ui.links.img.src.page  |  24 +++
 xslt/common/domains/yelp-xsl.pot               | 155 ++++++++--------
 xslt/common/domains/yelp-xsl.xml.in            |  10 ++
 xslt/common/html.xsl                           | 240 ++++++++++++++++++++++++-
 xslt/dita/html/dita2html-topic.xsl             |   6 +
 xslt/docbook/html/db2html-division.xsl         |  85 +++++++--
 xslt/mallard/html/mal2html-links.xsl           |   3 +
 xslt/mallard/html/mal2html-page.xsl            | 127 +++++++++++++
 23 files changed, 704 insertions(+), 97 deletions(-)
---
diff --git a/doc/yelp-xsl/C/db2html-division.page b/doc/yelp-xsl/C/db2html-division.page
index 0ee3d7f8..709708ae 100644
--- a/doc/yelp-xsl/C/db2html-division.page
+++ b/doc/yelp-xsl/C/db2html-division.page
@@ -1,2 +1,2 @@
 <?xml version="1.0"?>
-<page xmlns="http://projectmallard.org/1.0/"; id="db2html-division" type="guide" 
style="xslt-stylesheet"><?xslt-private _db2html.division.div.inner?><?xslt-private 
_db2html.division.about.credits?><info><link type="guide" xref="stylesheets" group="db2html"/><revision 
version="3.8" date="2012-11-05" status="final"/><link type="xslt-defines-template" 
xref="db2html.division.div"/><link type="xslt-defines-template" xref="db2html.hgroup"/><link 
type="xslt-defines-template" xref="db2html.division.about"/><link type="xslt-implements-mode" 
xref="html.title.mode"/><link type="xslt-implements-mode" xref="html.header.mode"/><link 
type="xslt-implements-mode" xref="html.footer.mode"/><link type="xslt-implements-mode" 
xref="html.body.mode"/><link type="xslt-implements-mode" xref="html.output.after.mode"/><link 
type="xslt-implements-mode" xref="db2html.division.div.content.mode"/></info><title>DocBook to HTML - 
Divisions</title><p>Handle division-level DocBook elements.</p><p>This styleshee
 t contai
 ns templates to process top-level and sectioning elements in DocBook. It handles chunking and implements the 
interfaces provided by the common <file xref="html">html</file> stylesheet.</p><links type="topic" 
groups="stylesheets" style="linklist"><title>Stylesheets</title></links><links type="topic" 
groups="parameters" style="linklist"><title>Parameters</title></links><links type="topic" groups="modes" 
style="linklist"><title>Modes</title></links><links type="topic" groups="templates" 
style="linklist"><title>Templates</title></links><links type="topic" groups="keys" 
style="linklist"><title>Keys</title></links><list style="compact"><title>Calls 
Templates</title><item><p><link xref="db.title"/></p></item><item><p><link 
xref="db2html.links.linktrail"/></p></item><item><p><link xref="html.output"/></p></item><item><p><link 
xref="html.lang.attrs"/></p></item><item><p><link xref="html.class.attr"/></p></item><item><p><link 
xref="db2html.footnote.footer"/></p></item><item><p><link x
 ref="l10
 n.gettext"/></p></item></list><list style="compact"><title>Calls Parameters</title><item><p><link 
xref="db.chunk.max_depth"/></p></item></list><table><title>Implements 
Templates</title><thead><tr><th><p>Mode</p></th><th><p>Match</p></th></tr></thead><tbody><tr><td><p/></td><td><p><code>appendix
 | db:appendix</code></p></td></tr><tr><td><p/></td><td><p><code>article | 
db:article</code></p></td></tr><tr><td><p/></td><td><p><code>book | 
db:book</code></p></td></tr><tr><td><p/></td><td><p><code>chapter | 
db:chapter</code></p></td></tr><tr><td><p/></td><td><p><code>colophon | 
db:colophon</code></p></td></tr><tr><td><p/></td><td><p><code>dedication | 
db:dedication</code></p></td></tr><tr><td><p/></td><td><p><code>glossary | 
db:glossary</code></p></td></tr><tr><td><p/></td><td><p><code>glossdiv | 
db:glossdiv</code></p></td></tr><tr><td><p/></td><td><p><code>part | 
db:part</code></p></td></tr><tr><td><p/></td><td><p><code>preface | 
db:preface</code></p></td></tr><tr><td><p/></td><td
<p><cod
 e>qandadiv | db:qandadiv</code></p></td></tr><tr><td><p/></td><td><p><code>qandaset | 
db:qandaset</code></p></td></tr><tr><td><p/></td><td><p><code>reference | 
db:reference</code></p></td></tr><tr><td><p/></td><td><p><code>sect1 | 
db:sect1</code></p></td></tr><tr><td><p/></td><td><p><code>sect2 | 
db:sect2</code></p></td></tr><tr><td><p/></td><td><p><code>sect3 | 
db:sect3</code></p></td></tr><tr><td><p/></td><td><p><code>sect4 | 
db:sect4</code></p></td></tr><tr><td><p/></td><td><p><code>sect5 | 
db:sect5</code></p></td></tr><tr><td><p/></td><td><p><code>section | 
db:section</code></p></td></tr><tr><td><p/></td><td><p><code>simplesect | 
db:simplesect</code></p></td></tr><tr><td><p><link 
xref="db2html.division.div.content.mode">db2html.division.div.content.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link
 xref="html.body.mode">html.body.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link 
xref="html.footer.mode">html.footer.mode</link></p
</td><t
 d><p><code>*</code></p></td></tr><tr><td><p><link 
xref="html.header.mode">html.header.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link 
xref="html.output.after.mode">html.output.after.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link
 
xref="html.title.mode">html.title.mode</link></p></td><td><p><code>*</code></p></td></tr></tbody></table></page>
+<page xmlns="http://projectmallard.org/1.0/"; id="db2html-division" type="guide" 
style="xslt-stylesheet"><?xslt-private _db2html.division.div.inner?><?xslt-private 
_db2html.division.about.credits?><info><link type="guide" xref="stylesheets" group="db2html"/><revision 
version="3.8" date="2012-11-05" status="final"/><link type="xslt-defines-template" 
xref="db2html.division.div"/><link type="xslt-defines-template" xref="db2html.hgroup"/><link 
type="xslt-defines-template" xref="db2html.division.about"/><link type="xslt-implements-mode" 
xref="html.title.mode"/><link type="xslt-implements-mode" xref="html.header.mode"/><link 
type="xslt-implements-mode" xref="html.footer.mode"/><link type="xslt-implements-mode" 
xref="html.sidebar.contents.mode"/><link type="xslt-implements-mode" xref="html.sidebar.sections.mode"/><link 
type="xslt-implements-mode" xref="html.body.mode"/><link type="xslt-implements-mode" 
xref="html.output.after.mode"/><link type="xslt-implements-mode" xref="db2html.di
 vision.d
 iv.content.mode"/></info><title>DocBook to HTML - Divisions</title><p>Handle division-level DocBook 
elements.</p><p>This stylesheet contains templates to process top-level and sectioning elements in DocBook. 
It handles chunking and implements the interfaces provided by the common <file xref="html">html</file> 
stylesheet.</p><links type="topic" groups="stylesheets" 
style="linklist"><title>Stylesheets</title></links><links type="topic" groups="parameters" 
style="linklist"><title>Parameters</title></links><links type="topic" groups="modes" 
style="linklist"><title>Modes</title></links><links type="topic" groups="templates" 
style="linklist"><title>Templates</title></links><links type="topic" groups="keys" 
style="linklist"><title>Keys</title></links><list style="compact"><title>Calls 
Templates</title><item><p><link xref="db.title"/></p></item><item><p><link 
xref="db2html.links.linktrail"/></p></item><item><p><link xref="l10n.gettext"/></p></item><item><p><link 
xref="db2html.xref"/
</p></i
 tem><item><p><link xref="html.output"/></p></item><item><p><link 
xref="html.lang.attrs"/></p></item><item><p><link xref="html.class.attr"/></p></item><item><p><link 
xref="db2html.footnote.footer"/></p></item></list><list style="compact"><title>Calls 
Parameters</title><item><p><link xref="db.chunk.max_depth"/></p></item></list><table><title>Implements 
Templates</title><thead><tr><th><p>Mode</p></th><th><p>Match</p></th></tr></thead><tbody><tr><td><p/></td><td><p><code>appendix
 | db:appendix</code></p></td></tr><tr><td><p/></td><td><p><code>article | 
db:article</code></p></td></tr><tr><td><p/></td><td><p><code>book | 
db:book</code></p></td></tr><tr><td><p/></td><td><p><code>chapter | 
db:chapter</code></p></td></tr><tr><td><p/></td><td><p><code>colophon | 
db:colophon</code></p></td></tr><tr><td><p/></td><td><p><code>dedication | 
db:dedication</code></p></td></tr><tr><td><p/></td><td><p><code>glossary | 
db:glossary</code></p></td></tr><tr><td><p/></td><td><p><code>glossdiv | db:
 glossdiv
 </code></p></td></tr><tr><td><p/></td><td><p><code>part | 
db:part</code></p></td></tr><tr><td><p/></td><td><p><code>preface | 
db:preface</code></p></td></tr><tr><td><p/></td><td><p><code>qandadiv | 
db:qandadiv</code></p></td></tr><tr><td><p/></td><td><p><code>qandaset | 
db:qandaset</code></p></td></tr><tr><td><p/></td><td><p><code>reference | 
db:reference</code></p></td></tr><tr><td><p/></td><td><p><code>sect1 | 
db:sect1</code></p></td></tr><tr><td><p/></td><td><p><code>sect2 | 
db:sect2</code></p></td></tr><tr><td><p/></td><td><p><code>sect3 | 
db:sect3</code></p></td></tr><tr><td><p/></td><td><p><code>sect4 | 
db:sect4</code></p></td></tr><tr><td><p/></td><td><p><code>sect5 | 
db:sect5</code></p></td></tr><tr><td><p/></td><td><p><code>section | 
db:section</code></p></td></tr><tr><td><p/></td><td><p><code>simplesect | 
db:simplesect</code></p></td></tr><tr><td><p><link 
xref="db2html.division.div.content.mode">db2html.division.div.content.mode</link></p></td><td><p><code>*</code>
 </p></td
</tr><tr><td><p><link 
xref="html.body.mode">html.body.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link 
xref="html.footer.mode">html.footer.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link 
xref="html.header.mode">html.header.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link 
xref="html.output.after.mode">html.output.after.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link

xref="html.sidebar.contents.mode">html.sidebar.contents.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link

xref="html.sidebar.sections.mode">html.sidebar.sections.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link

xref="html.title.mode">html.title.mode</link></p></td><td><p><code>*</code></p></td></tr></tbody></table></page>
diff --git a/doc/yelp-xsl/C/html.head.top.custom.page b/doc/yelp-xsl/C/html.head.top.custom.page
new file mode 100644
index 00000000..b3282168
--- /dev/null
+++ b/doc/yelp-xsl/C/html.head.top.custom.page
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<page xmlns="http://projectmallard.org/1.0/"; id="html.head.top.custom" type="topic" 
style="xslt-template"><info><link type="guide" xref="html" group="templates"/><link type="guide" 
xref="templates" group="html"/><link type="guide" xref="stubs" group="html"/><revision version="3.28" 
date="2017-08-04" status="final"/><desc>Stub to output custom content at the beginning of the HTML 
<code>head</code> element.</desc><stub 
xmlns="http://projects.gnome.org/yelp/xsldoc/"/></info><title>html.head.top.custom</title><p>Stub to output 
custom content at the beginning of the HTML <code>head</code> element.</p><note><p>This template is a stub. 
Customizations may override it for
+            additional functionality.</p></note>
+  
+  
+  <synopsis><title>Parameters</title><terms>
+    <item>
+      <title><code>node</code></title>
+      <p>The node a page is being created for.</p>
+    </item>
+  </terms></synopsis>
+  <p>This template is a stub, called by <code style="xslt-template" xref="html.page">html.page</code>. You 
can override this template to provide additional elements at the beginning of the HTML <code>head</code> 
element of output files. This template is called before all other head content.</p>
+</page>
diff --git a/doc/yelp-xsl/C/html.page b/doc/yelp-xsl/C/html.page
index b0004ac2..e4078053 100644
--- a/doc/yelp-xsl/C/html.page
+++ b/doc/yelp-xsl/C/html.page
@@ -1,2 +1,2 @@
 <?xml version="1.0"?>
-<page xmlns="http://projectmallard.org/1.0/"; id="html" type="guide" style="xslt-stylesheet"><info><link 
type="guide" xref="stylesheets" group="html"/><revision version="1.0" date="2010-05-26" status="final"/><link 
type="xslt-requires" xref="l10n"/><link type="xslt-requires" xref="color"/><link type="xslt-requires" 
xref="icons"/><link type="xslt-defines-template" xref="html.output"/><link type="xslt-defines-template" 
xref="html.page"/><link type="xslt-defines-template" xref="html.top.custom"/><link 
type="xslt-defines-template" xref="html.bottom.custom"/><link type="xslt-defines-template" 
xref="html.sidebar.custom"/><link type="xslt-defines-template" xref="html.header.custom"/><link 
type="xslt-defines-template" xref="html.footer.custom"/><link type="xslt-defines-template" 
xref="html.head.top.custom"/><link type="xslt-defines-template" xref="html.head.custom"/><link 
type="xslt-defines-template" xref="html.linktrails.empty"/><link type="xslt-defines-template" 
xref="html.linktrai
 ls.prefi
 x"/><link type="xslt-defines-template" xref="html.class.attr"/><link type="xslt-defines-template" 
xref="html.content.pre"/><link type="xslt-defines-template" xref="html.content.pre.custom"/><link 
type="xslt-defines-template" xref="html.content.post"/><link type="xslt-defines-template" 
xref="html.content.post.custom"/><link type="xslt-defines-template" xref="html.css"/><link 
type="xslt-defines-template" xref="html.css.content"/><link type="xslt-defines-template" 
xref="html.css.core"/><link type="xslt-defines-template" xref="html.css.elements"/><link 
type="xslt-defines-template" xref="html.css.syntax"/><link type="xslt-defines-template" 
xref="html.css.custom"/><link type="xslt-defines-template" xref="html.js"/><link type="xslt-defines-template" 
xref="html.js.mathjax"/><link type="xslt-defines-template" xref="html.js.script"/><link 
type="xslt-defines-template" xref="html.js.content"/><link type="xslt-defines-template" 
xref="html.js.core"/><link type="xslt-defines-template" xref
 ="html.j
 s.ui"/><link type="xslt-defines-template" xref="html.js.media"/><link type="xslt-defines-template" 
xref="html.js.syntax"/><link type="xslt-defines-template" xref="html.js.custom"/><link 
type="xslt-defines-template" xref="html.js.content.custom"/><link type="xslt-defines-template" 
xref="html.lang.attrs"/><link type="xslt-defines-template" xref="html.syntax.class"/><link 
type="xslt-defines-template" xref="html.media.controls"/><link type="xslt-implements-mode" 
xref="html.output.after.mode"/><link type="xslt-implements-mode" xref="html.title.mode"/><link 
type="xslt-implements-mode" xref="html.body.attr.mode"/><link type="xslt-implements-mode" 
xref="html.header.mode"/><link type="xslt-implements-mode" xref="html.footer.mode"/><link 
type="xslt-implements-mode" xref="html.body.mode"/><link type="xslt-implements-mode" 
xref="html.class.attr.mode"/><link type="xslt-implements-mode" xref="html.content.pre.mode"/><link 
type="xslt-implements-mode" xref="html.content.post.mode"/><link ty
 pe="xslt
 -implements-mode" xref="html.css.mode"/><link type="xslt-implements-mode" xref="html.js.mode"/><link 
type="xslt-implements-mode" xref="html.syntax.class.mode"/><link type="xslt-defines-param" 
xref="html.basename"/><link type="xslt-defines-param" xref="html.xhtml"/><link type="xslt-defines-param" 
xref="html.namespace"/><link type="xslt-defines-param" xref="html.extension"/><link type="xslt-defines-param" 
xref="html.css.root"/><link type="xslt-defines-param" xref="html.js.root"/><link type="xslt-defines-param" 
xref="html.syntax.highlight"/><link type="xslt-defines-param" xref="html.output.prefix"/></info><title>HTML 
Output</title><p>Common utilities and CSS for transformations to HTML.</p><p>This stylesheet contains common 
templates for creating HTML output. The <code style="xslt-template" xref="html.output">html.output</code> 
template creates an output file for a node in the source XML document, calling <code style="xslt-template" 
xref="html.page">html.page</code> to create t
 he actua
 l output. Output files can be either XHTML or HTML, depending on the <code style="xslt-param" 
xref="html.xhtml">html.xhtml</code> parameter.</p><p>This stylesheet matches <code>/</code> and calls <code 
style="xslt-template" xref="html.output">html.output</code> on the root XML element. This works for most 
input formats. If you need to do something different, you should override the match for 
<code>/</code>.</p><links type="topic" groups="stylesheets" 
style="linklist"><title>Stylesheets</title></links><links type="topic" groups="parameters" 
style="linklist"><title>Parameters</title></links><links type="topic" groups="modes" 
style="linklist"><title>Modes</title></links><links type="topic" groups="templates" 
style="linklist"><title>Templates</title></links><links type="topic" groups="keys" 
style="linklist"><title>Keys</title></links><list style="compact"><title>Requires 
Stylesheets</title><item><p><link xref="color"/></p></item><item><p><link xref="icons"/></p></item><item><p><
 link xre
 f="l10n"/></p></item></list><list style="compact"><title>Calls Templates</title><item><p><link 
xref="l10n.direction"/></p></item><item><p><link xref="l10n.align.start"/></p></item><item><p><link 
xref="l10n.gettext"/></p></item></list><list style="compact"><title>Calls Parameters</title><item><p><link 
xref="color.bg"/></p></item><item><p><link xref="color.bg.blue"/></p></item><item><p><link 
xref="color.bg.dark"/></p></item><item><p><link xref="color.bg.gray"/></p></item><item><p><link 
xref="color.bg.green"/></p></item><item><p><link xref="color.bg.red"/></p></item><item><p><link 
xref="color.bg.yellow"/></p></item><item><p><link xref="color.blue"/></p></item><item><p><link 
xref="color.fg"/></p></item><item><p><link xref="color.fg.blue"/></p></item><item><p><link 
xref="color.fg.dark"/></p></item><item><p><link xref="color.fg.gray"/></p></item><item><p><link 
xref="color.fg.green"/></p></item><item><p><link xref="color.fg.orange"/></p></item><item><p><link 
xref="color.fg.purple"/
</p></i
 tem><item><p><link xref="color.fg.red"/></p></item><item><p><link 
xref="color.fg.yellow"/></p></item><item><p><link xref="color.gray"/></p></item><item><p><link 
xref="color.red"/></p></item><item><p><link xref="color.yellow"/></p></item><item><p><link 
xref="html.basename"/></p></item><item><p><link xref="html.extension"/></p></item><item><p><link 
xref="html.syntax.highlight"/></p></item><item><p><link xref="html.xhtml"/></p></item><item><p><link 
xref="icons.size.quote"/></p></item></list><table><title>Implements 
Templates</title><thead><tr><th><p>Mode</p></th><th><p>Match</p></th></tr></thead><tbody><tr><td><p/></td><td><p><code>/</code></p></td></tr><tr><td><p><link
 
xref="html.body.attr.mode">html.body.attr.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link
 xref="html.body.mode">html.body.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link 
xref="html.class.attr.mode">html.class.attr.mode</link></p></td><td><p><code>*</code></p></td><
 /tr><tr>
 <td><p><link 
xref="html.content.post.mode">html.content.post.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link
 
xref="html.content.pre.mode">html.content.pre.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link
 xref="html.css.mode">html.css.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link 
xref="html.footer.mode">html.footer.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link 
xref="html.header.mode">html.header.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link 
xref="html.js.mode">html.js.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link 
xref="html.output.after.mode">html.output.after.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link
 
xref="html.syntax.class.mode">html.syntax.class.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link
 xref="html.title.mode">html.title.mode</link></p></td><td><p><code>*</code></p><
 /td></tr
</tbody></table></page>
+<page xmlns="http://projectmallard.org/1.0/"; id="html" type="guide" style="xslt-stylesheet"><info><link 
type="guide" xref="stylesheets" group="html"/><revision version="1.0" date="2010-05-26" status="final"/><link 
type="xslt-requires" xref="l10n"/><link type="xslt-requires" xref="color"/><link type="xslt-requires" 
xref="icons"/><link type="xslt-defines-template" xref="html.output"/><link type="xslt-defines-template" 
xref="html.page"/><link type="xslt-defines-template" xref="html.top.custom"/><link 
type="xslt-defines-template" xref="html.bottom.custom"/><link type="xslt-defines-template" 
xref="html.sidebar"/><link type="xslt-defines-template" xref="_html.sidebar.sidebar"/><link 
type="xslt-defines-template" xref="html.sidebar.contents"/><link type="xslt-defines-template" 
xref="html.sidebar.sections"/><link type="xslt-defines-template" xref="html.sidebar.custom"/><link 
type="xslt-defines-template" xref="html.header.custom"/><link type="xslt-defines-template" xref="html.footer.c
 ustom"/>
 <link type="xslt-defines-template" xref="html.head.top.custom"/><link type="xslt-defines-template" 
xref="html.head.custom"/><link type="xslt-defines-template" xref="html.linktrails.empty"/><link 
type="xslt-defines-template" xref="html.linktrails.prefix"/><link type="xslt-defines-template" 
xref="html.class.attr"/><link type="xslt-defines-template" xref="html.content.pre"/><link 
type="xslt-defines-template" xref="html.content.pre.custom"/><link type="xslt-defines-template" 
xref="html.content.post"/><link type="xslt-defines-template" xref="html.content.post.custom"/><link 
type="xslt-defines-template" xref="html.css"/><link type="xslt-defines-template" 
xref="html.css.content"/><link type="xslt-defines-template" xref="html.css.core"/><link 
type="xslt-defines-template" xref="html.css.elements"/><link type="xslt-defines-template" 
xref="html.css.syntax"/><link type="xslt-defines-template" xref="html.css.custom"/><link 
type="xslt-defines-template" xref="html.js"/><link type="xslt-def
 ines-tem
 plate" xref="html.js.mathjax"/><link type="xslt-defines-template" xref="html.js.script"/><link 
type="xslt-defines-template" xref="html.js.content"/><link type="xslt-defines-template" 
xref="html.js.core"/><link type="xslt-defines-template" xref="html.js.ui"/><link type="xslt-defines-template" 
xref="html.js.media"/><link type="xslt-defines-template" xref="html.js.syntax"/><link 
type="xslt-defines-template" xref="html.js.custom"/><link type="xslt-defines-template" 
xref="html.js.content.custom"/><link type="xslt-defines-template" xref="html.lang.attrs"/><link 
type="xslt-defines-template" xref="html.syntax.class"/><link type="xslt-defines-template" 
xref="html.media.controls"/><link type="xslt-implements-mode" xref="html.output.after.mode"/><link 
type="xslt-implements-mode" xref="html.title.mode"/><link type="xslt-implements-mode" 
xref="html.body.attr.mode"/><link type="xslt-implements-mode" xref="html.sidebar.mode"/><link 
type="xslt-implements-mode" xref="html.sidebar.contents.mo
 de"/><li
 nk type="xslt-implements-mode" xref="html.sidebar.sections.mode"/><link type="xslt-implements-mode" 
xref="html.header.mode"/><link type="xslt-implements-mode" xref="html.footer.mode"/><link 
type="xslt-implements-mode" xref="html.body.mode"/><link type="xslt-implements-mode" 
xref="html.class.attr.mode"/><link type="xslt-implements-mode" xref="html.content.pre.mode"/><link 
type="xslt-implements-mode" xref="html.content.post.mode"/><link type="xslt-implements-mode" 
xref="html.css.mode"/><link type="xslt-implements-mode" xref="html.js.mode"/><link 
type="xslt-implements-mode" xref="html.syntax.class.mode"/><link type="xslt-defines-param" 
xref="html.basename"/><link type="xslt-defines-param" xref="html.xhtml"/><link type="xslt-defines-param" 
xref="html.namespace"/><link type="xslt-defines-param" xref="html.extension"/><link type="xslt-defines-param" 
xref="html.css.root"/><link type="xslt-defines-param" xref="html.js.root"/><link type="xslt-defines-param" 
xref="html.syntax.highligh
 t"/><lin
 k type="xslt-defines-param" xref="html.output.prefix"/><link type="xslt-defines-param" 
xref="html.sidebar.left"/><link type="xslt-defines-param" xref="html.sidebar.right"/></info><title>HTML 
Output</title><p>Common utilities and CSS for transformations to HTML.</p><p>This stylesheet contains common 
templates for creating HTML output. The <code style="xslt-template" xref="html.output">html.output</code> 
template creates an output file for a node in the source XML document, calling <code style="xslt-template" 
xref="html.page">html.page</code> to create the actual output. Output files can be either XHTML or HTML, 
depending on the <code style="xslt-param" xref="html.xhtml">html.xhtml</code> parameter.</p><p>This 
stylesheet matches <code>/</code> and calls <code style="xslt-template" xref="html.output">html.output</code> 
on the root XML element. This works for most input formats. If you need to do something different, you should 
override the match for <code>/</code>.</p><links ty
 pe="topi
 c" groups="stylesheets" style="linklist"><title>Stylesheets</title></links><links type="topic" 
groups="parameters" style="linklist"><title>Parameters</title></links><links type="topic" groups="modes" 
style="linklist"><title>Modes</title></links><links type="topic" groups="templates" 
style="linklist"><title>Templates</title></links><links type="topic" groups="keys" 
style="linklist"><title>Keys</title></links><list style="compact"><title>Requires 
Stylesheets</title><item><p><link xref="color"/></p></item><item><p><link 
xref="icons"/></p></item><item><p><link xref="l10n"/></p></item></list><list style="compact"><title>Calls 
Templates</title><item><p><link xref="l10n.direction"/></p></item><item><p><link 
xref="l10n.align.start"/></p></item><item><p><link xref="l10n.gettext"/></p></item></list><list 
style="compact"><title>Calls Parameters</title><item><p><link xref="color.bg"/></p></item><item><p><link 
xref="color.bg.blue"/></p></item><item><p><link xref="color.bg.dark"/></p></it
 em><item
<p><link xref="color.bg.gray"/></p></item><item><p><link xref="color.bg.green"/></p></item><item><p><link 
xref="color.bg.red"/></p></item><item><p><link xref="color.bg.yellow"/></p></item><item><p><link 
xref="color.blue"/></p></item><item><p><link xref="color.fg"/></p></item><item><p><link 
xref="color.fg.blue"/></p></item><item><p><link xref="color.fg.dark"/></p></item><item><p><link 
xref="color.fg.gray"/></p></item><item><p><link xref="color.fg.green"/></p></item><item><p><link 
xref="color.fg.orange"/></p></item><item><p><link xref="color.fg.purple"/></p></item><item><p><link 
xref="color.fg.red"/></p></item><item><p><link xref="color.fg.yellow"/></p></item><item><p><link 
xref="color.gray"/></p></item><item><p><link xref="color.red"/></p></item><item><p><link 
xref="color.yellow"/></p></item><item><p><link xref="html.basename"/></p></item><item><p><link 
xref="html.extension"/></p></item><item><p><link xref="html.sidebar.left"/></p></item><item><p><link 
xref="html.sidebar.rig
 ht"/></p
</item><item><p><link xref="html.syntax.highlight"/></p></item><item><p><link 
xref="html.xhtml"/></p></item><item><p><link 
xref="icons.size.quote"/></p></item></list><table><title>Implements 
Templates</title><thead><tr><th><p>Mode</p></th><th><p>Match</p></th></tr></thead><tbody><tr><td><p/></td><td><p><code>/</code></p></td></tr><tr><td><p><link

xref="html.body.attr.mode">html.body.attr.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link
xref="html.body.mode">html.body.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link 
xref="html.class.attr.mode">html.class.attr.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link

xref="html.content.post.mode">html.content.post.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link

xref="html.content.pre.mode">html.content.pre.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link
xref="html.css.mode">html.css.mode</link></p></td><td><p><code>*</c
 ode></p>
 </td></tr><tr><td><p><link 
xref="html.footer.mode">html.footer.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link 
xref="html.header.mode">html.header.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link 
xref="html.js.mode">html.js.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link 
xref="html.output.after.mode">html.output.after.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link
 
xref="html.sidebar.contents.mode">html.sidebar.contents.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link
 xref="html.sidebar.mode">html.sidebar.mode</link></p></td><td><p><code>token[. = 
'blank']</code></p></td></tr><tr><td><p><link 
xref="html.sidebar.mode">html.sidebar.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link 
xref="html.sidebar.mode">html.sidebar.mode</link></p></td><td><p><code>token[. = 
'contents']</code></p></td></tr><tr><td><p><link xref="html.sidebar.mode">html.s
 idebar.m
 ode</link></p></td><td><p><code>token[. = 'sections']</code></p></td></tr><tr><td><p><link 
xref="html.sidebar.sections.mode">html.sidebar.sections.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link
 
xref="html.syntax.class.mode">html.syntax.class.mode</link></p></td><td><p><code>*</code></p></td></tr><tr><td><p><link
 
xref="html.title.mode">html.title.mode</link></p></td><td><p><code>*</code></p></td></tr></tbody></table></page>
diff --git a/doc/yelp-xsl/C/html.page.page b/doc/yelp-xsl/C/html.page.page
index c69827e6..1e5ce99a 100644
--- a/doc/yelp-xsl/C/html.page.page
+++ b/doc/yelp-xsl/C/html.page.page
@@ -10,6 +10,6 @@
   </terms></synopsis>
   <p>This template creates the actual HTML output for <code style="xslt-param">node</code>. It outputs 
top-level elements and container divs, and calls various templates and modes to output the inner content. 
Importing stylesheets should implement at least <code style="xslt-mode" 
xref="html.title.mode">html.title.mode</code> and <code style="xslt-mode" 
xref="html.body.mode">html.body.mode</code> for any elements that could be passed as <code 
style="xslt-param">node</code> to this template. Importing stylesheets should also implement <code 
style="xslt-mode" xref="html.header.mode">html.header.mode</code> to output link trails and <code 
style="xslt-mode" xref="html.footer.mode">html.footer.mode</code> to output credits and other page 
information.</p>
   <p>This template outputs the HTML <code>body</code> element, which takes it attributes from two sources. 
First, it calls <code style="xslt-template" xref="html.lang.attrs">html.lang.attrs</code>, which 
automatically outputs correct <code>lang</code>, <code>xml:lang</code>, and <code>dir</code> attributes. It 
then calls <code style="xslt-mode" xref="html.body.attr.mode">html.body.attr.mode</code> on <code 
style="xslt-param">node</code> for additional attributes.</p>
-  <p>This template also calls a number of stub templates that can be overridden by extension stylesheets. 
Override the <code style="xslt-template" xref="html.head.custom">html.head.custom</code> template to put 
custom content at the end of the HTML <code>head</code> element. Override the <code style="xslt-template" 
xref="html.head.top.custom">html.head.top.custom</code> template to put custom content at the beginning of 
the HTML <code>head</code> element. Override the <code style="xslt-template" 
xref="html.top.custom">html.top.custom</code> and <code style="xslt-template" 
xref="html.bottom.custom">html.bottom.custom</code> templates to add site-specific content at the top and 
bottom of the page. Override the <code style="xslt-template" 
xref="html.header.custom">html.header.custom</code> and <code style="xslt-template" 
xref="html.footer.custom">html.footer.custom</code> templates to provide additional content directoy above 
and below the main content. Override <code style="xs
 lt-templ
 ate" xref="html.sidebar.custom">html.sidebar.custom</code> to create sidebars.</p>
+  <p>This template also calls a number of stub templates that can be overridden by extension stylesheets. 
Override the <code style="xslt-template" xref="html.head.custom">html.head.custom</code> template to put 
custom content at the end of the HTML <code>head</code> element. Override the <code style="xslt-template" 
xref="html.head.top.custom">html.head.top.custom</code> template to put custom content at the beginning of 
the HTML <code>head</code> element. Override the <code style="xslt-template" 
xref="html.top.custom">html.top.custom</code> and <code style="xslt-template" 
xref="html.bottom.custom">html.bottom.custom</code> templates to add site-specific content at the top and 
bottom of the page. Override the <code style="xslt-template" 
xref="html.header.custom">html.header.custom</code> and <code style="xslt-template" 
xref="html.footer.custom">html.footer.custom</code> templates to provide additional content directoy above 
and below the main content. Use the <code style="xsl
 t-param"
  xref="html.sidebar.left">html.sidebar.left</code> and <code style="xslt-param" 
xref="html.sidebar.right">html.sidebar.right</code> parameters to create stock sidebars, or override <code 
style="xslt-template" xref="html.sidebar.custom">html.sidebar.custom</code> to create your own.</p>
   <p>This template also calls <code style="xslt-template" xref="html.css">html.css</code> and <code 
style="xslt-template" xref="html.js">html.js</code> to output CSS and JavaScript elements. See those 
templates for further extension points.</p>
-<list style="compact"><title>Calls Templates</title><item><p><link 
xref="html.head.top.custom"/></p></item><item><p><link xref="html.sidebar.custom"/></p></item><item><p><link 
xref="html.header.custom"/></p></item></list><list style="compact"><title>Calls Modes</title><item><p><link 
xref="html.body.attr.mode"/></p></item><item><p><link xref="html.body.mode"/></p></item><item><p><link 
xref="html.footer.mode"/></p></item><item><p><link xref="html.header.mode"/></p></item><item><p><link 
xref="html.title.mode"/></p></item></list></page>
+<list style="compact"><title>Calls Templates</title><item><p><link 
xref="html.head.top.custom"/></p></item><item><p><link xref="html.sidebar"/></p></item><item><p><link 
xref="html.header.custom"/></p></item></list><list style="compact"><title>Calls Modes</title><item><p><link 
xref="html.body.attr.mode"/></p></item><item><p><link xref="html.body.mode"/></p></item><item><p><link 
xref="html.footer.mode"/></p></item><item><p><link xref="html.header.mode"/></p></item><item><p><link 
xref="html.title.mode"/></p></item></list></page>
diff --git a/doc/yelp-xsl/C/html.sidebar.contents.mode.page b/doc/yelp-xsl/C/html.sidebar.contents.mode.page
new file mode 100644
index 00000000..2ca27948
--- /dev/null
+++ b/doc/yelp-xsl/C/html.sidebar.contents.mode.page
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<page xmlns="http://projectmallard.org/1.0/"; id="html.sidebar.contents.mode" type="topic" 
style="xslt-mode"><info><link type="guide" xref="html" group="modes"/><link type="guide" xref="modes" 
group="html"/><revision version="3.30" date="2018-06-10" status="candidate"/><desc>Output a table of contents 
for a sidebar.</desc></info><title>html.sidebar.contents.mode</title><p>Output a table of contents for a 
sidebar.</p>
+  
+  
+  <synopsis><title>Parameters</title><terms>
+    <item>
+      <title><code>side</code></title>
+      <p>Which sidebar, either <code>left</code> or <code>right</code>.</p>
+    </item>
+  </terms></synopsis>
+  <p>This mode is called by <code style="xslt-mode" 
xref="html.sidebar.contents">html.sidebar.contents</code> to allow different input formats to implement a 
table of contents for a sidebar.</p>
+</page>
diff --git a/doc/yelp-xsl/C/html.sidebar.contents.page b/doc/yelp-xsl/C/html.sidebar.contents.page
new file mode 100644
index 00000000..d3d6cd33
--- /dev/null
+++ b/doc/yelp-xsl/C/html.sidebar.contents.page
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<page xmlns="http://projectmallard.org/1.0/"; id="html.sidebar.contents" type="topic" 
style="xslt-template"><info><link type="guide" xref="html" group="templates"/><link type="guide" 
xref="templates" group="html"/><revision version="3.30" date="2018-06-10" status="candidate"/><desc>Output a 
table of contents for a sidebar.</desc></info><title>html.sidebar.contents</title><p>Output a table of 
contents for a sidebar.</p>
+  
+  
+  <synopsis><title>Parameters</title><terms>
+    <item>
+      <title><code>node</code></title>
+      <p>The node a sidebar is being created for.</p>
+    </item>
+    <item>
+      <title><code>side</code></title>
+      <p>Which sidebar, either <code>left</code> or <code>right</code>.</p>
+    </item>
+  </terms></synopsis>
+  <p>This template creates a table of contents for a sidebar. It applies <code style="xslt-mode" 
xref="html.sidebar.contents.mode">html.sidebar.contents.mode</code> to <code style="xslt-param">node</code>, 
passing <code style="xslt-param">side</code> as a parameter, to allow individual input formats to implement 
tables of contents.</p>
+  <p>This named template also implements <code style="xslt-mode" 
xref="html.sidebar.mode">html.sidebar.mode</code> on the <code>contents</code> token. See <code 
style="xslt-template" xref="html.sidebar">html.sidebar</code> for more information on how sidebars are 
created.</p>
+<list style="compact"><title>Calls Modes</title><item><p><link 
xref="html.sidebar.contents.mode"/></p></item></list></page>
diff --git a/doc/yelp-xsl/C/html.sidebar.custom.page b/doc/yelp-xsl/C/html.sidebar.custom.page
index a187e2c5..0c5a1ee9 100644
--- a/doc/yelp-xsl/C/html.sidebar.custom.page
+++ b/doc/yelp-xsl/C/html.sidebar.custom.page
@@ -10,4 +10,5 @@
     </item>
   </terms></synopsis>
   <p>This template is a stub, called by <code style="xslt-template" xref="html.page">html.page</code>. It is 
called inside the <code>main</code> element, before the <code>div.page</code> element. The <code>main</code> 
element uses a horizontal flexbox by default. You can override this template to provide sidebar content. Note 
that there is only one extension point for sidebar content, and it is always placed before the main content 
in document order. To create a sidebar on the right, output the element here, then adjust the 
<code>order</code> CSS property for that element to display it after the <code>main</code> element.</p>
+  <p>This template is intended for completely custom sidebars. You can also use <code style="xslt-template" 
xref="html.sidebar">html.sidebar</code> to output sidebars with stock components.</p>
 </page>
diff --git a/doc/yelp-xsl/C/html.sidebar.left.page b/doc/yelp-xsl/C/html.sidebar.left.page
new file mode 100644
index 00000000..f808db3c
--- /dev/null
+++ b/doc/yelp-xsl/C/html.sidebar.left.page
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<page xmlns="http://projectmallard.org/1.0/"; id="html.sidebar.left" type="topic" 
style="xslt-param"><info><link type="guide" xref="html" group="parameters"/><link type="guide" 
xref="parameters" group="html"/><revision version="3.30" date="2018-06-10" status="candidate"/><desc>List of 
components to add to the left sidebar.</desc></info><title>html.sidebar.left</title><p>List of components to 
add to the left sidebar.</p>
+  
+  
+  <p>This parameter takes a space-separated list of tokens that specify which components to add to the stock 
left sidebar. These stylesheets recognize certain tokens, and you can add your own with <code 
style="xslt-mode" xref="html.sidebar.mode">html.sidebar.mode</code>. See <code style="xslt-template" 
xref="html.sidebar">html.sidebar</code> for further details.</p>
+</page>
diff --git a/doc/yelp-xsl/C/html.sidebar.mode.page b/doc/yelp-xsl/C/html.sidebar.mode.page
new file mode 100644
index 00000000..0076e3de
--- /dev/null
+++ b/doc/yelp-xsl/C/html.sidebar.mode.page
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<page xmlns="http://projectmallard.org/1.0/"; id="html.sidebar.mode" type="topic" 
style="xslt-mode"><info><link type="guide" xref="html" group="modes"/><link type="guide" xref="modes" 
group="html"/><revision version="3.30" date="2018-06-10" status="candidate"/><desc>Output a sidebar compenent 
for a token.</desc></info><title>html.sidebar.mode</title><p>Output a sidebar compenent for a token.</p>
+  
+  
+  <synopsis><title>Parameters</title><terms>
+    <item>
+      <title><code>node</code></title>
+      <p>The node a sidebar is being created for.</p>
+    </item>
+    <item>
+      <title><code>side</code></title>
+      <p>Which sidebar, either <code>left</code> or <code>right</code>.</p>
+    </item>
+  </terms></synopsis>
+  <p>This mode is called by <code style="xslt-template" xref="html.sidebar">html.sidebar</code> for each 
sidebar compenent in each of <code style="xslt-param" xref="html.sidebar.left">html.sidebar.left</code> and 
<code style="xslt-param" xref="html.sidebar.right">html.sidebar.right</code>. See <code style="xslt-template" 
xref="html.sidebar">html.sidebar</code> for full details.</p>
+</page>
diff --git a/doc/yelp-xsl/C/html.sidebar.page b/doc/yelp-xsl/C/html.sidebar.page
new file mode 100644
index 00000000..19c2aacb
--- /dev/null
+++ b/doc/yelp-xsl/C/html.sidebar.page
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<page xmlns="http://projectmallard.org/1.0/"; id="html.sidebar" type="topic" 
style="xslt-template"><info><link type="guide" xref="html" group="templates"/><link type="guide" 
xref="templates" group="html"/><revision version="3.30" date="2018-06-10" status="candidate"/><desc>Output 
stock sidebars.</desc></info><title>html.sidebar</title><p>Output stock sidebars.</p>
+  
+  
+  <synopsis><title>Parameters</title><terms>
+    <item>
+      <title><code>node</code></title>
+      <p>The node a sidebar is being created for.</p>
+    </item>
+  </terms></synopsis>
+  <p>This templates outputs left and right sidebars according to the components listed in <code 
style="xslt-param" xref="html.sidebar.left">html.sidebar.left</code> and <code style="xslt-param" 
xref="html.sidebar.right">html.sidebar.right</code>. It only outputs each sidebar if the corresponding 
parameters is not empty or the string <code>none</code>.</p>
+  <p>This template is called inside the <code>main</code> element, before the <code>div.page</code> element, 
and before <code style="xslt-template" xref="html.sidebar.custom">html.sidebar.custom</code>. Note that even 
the right sidebar is placed before the <code>div.page</code> element. It is placed on the right using flexbox 
item reordering.</p>
+  <p>To actually output the sidebar components, this template splits each parameter on whitespace using the 
EXSTL <code>str:split</code> function. It then applies the mode <code style="xslt-mode" 
xref="html.sidebar.mode">html.sidebar.mode</code> to each token, passing <code style="xslt-param">node</code> 
and the sidebar side as parameters. Extension stylesheets can add their own sidebar components by 
implementing that mode and matching a pattern like <code>token[. = 'name-of-token']</code>. You will then be 
able to use <code>name-of-token</code> in <code style="xslt-param" 
xref="html.sidebar.left">html.sidebar.left</code> or <code style="xslt-param" 
xref="html.sidebar.right">html.sidebar.right</code>.</p>
+  <p>This stylesheet recognizes four tokens: <code>contents</code> and <code>sections</code>, and the 
special tokens <code>none</code> and <code>blank</code>. The <code>contents</code> token provides a table of 
contents for the entire document. It is handled by the <code style="xslt-template" 
xref="html.sidebar.contents">html.sidebar.contents</code> template, which uses the <code style="xslt-mode" 
xref="html.sidebar.contents.mode">html.sidebar.contents.mode</code> mode to allow different input formats to 
implement it. The <code>sections</code> token lists sections on the current page. It is handled by the <code 
style="xslt-template" xref="html.sidebar.section">html.sidebar.section</code> template, which uses the <code 
style="xslt-mode" xref="html.sidebar.sections.mode">html.sidebar.sections.mode</code> mode to allow different 
input formats to implement it.</p>
+  <p>You can use the <code>none</code> token on its own, instead of the empty string, to completely turn off 
either sidebar. Use the <code>blank</code> token to output a sidebar without adding any components to it. 
This is useful, for example, to keep consistent margins. If an empty sidebar is output from the 
<code>blank</code> token, it will also have the CSS class <code>sidebar-blank</code> so you can style it 
differently.</p>
+<list style="compact"><title>Calls Templates</title><item><p><link 
xref="_html.sidebar.sidebar"/></p></item></list><list style="compact"><title>Calls 
Parameters</title><item><p><link xref="html.sidebar.left"/></p></item><item><p><link 
xref="html.sidebar.right"/></p></item></list></page>
diff --git a/doc/yelp-xsl/C/html.sidebar.right.page b/doc/yelp-xsl/C/html.sidebar.right.page
new file mode 100644
index 00000000..ce23d3ca
--- /dev/null
+++ b/doc/yelp-xsl/C/html.sidebar.right.page
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<page xmlns="http://projectmallard.org/1.0/"; id="html.sidebar.right" type="topic" 
style="xslt-param"><info><link type="guide" xref="html" group="parameters"/><link type="guide" 
xref="parameters" group="html"/><revision version="3.30" date="2018-06-10" status="candidate"/><desc>List of 
components to add to the right sidebar.</desc></info><title>html.sidebar.right</title><p>List of components 
to add to the right sidebar.</p>
+  
+  
+  <p>This parameter takes a space-separated list of tokens that specify which components to add to the stock 
right sidebar. These stylesheets recognize certain tokens, and you can add your own with <code 
style="xslt-mode" xref="html.sidebar.mode">html.sidebar.mode</code>. See <code style="xslt-template" 
xref="html.sidebar">html.sidebar</code> for further details.</p>
+</page>
diff --git a/doc/yelp-xsl/C/html.sidebar.sections.mode.page b/doc/yelp-xsl/C/html.sidebar.sections.mode.page
new file mode 100644
index 00000000..81ae4251
--- /dev/null
+++ b/doc/yelp-xsl/C/html.sidebar.sections.mode.page
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<page xmlns="http://projectmallard.org/1.0/"; id="html.sidebar.sections.mode" type="topic" 
style="xslt-mode"><info><link type="guide" xref="html" group="modes"/><link type="guide" xref="modes" 
group="html"/><revision version="3.30" date="2018-06-10" status="candidate"/><desc>Output a list of sections 
for a sidebar.</desc></info><title>html.sidebar.sections.mode</title><p>Output a list of sections for a 
sidebar.</p>
+  
+  
+  <synopsis><title>Parameters</title><terms>
+    <item>
+      <title><code>side</code></title>
+      <p>Which sidebar, either <code>left</code> or <code>right</code>.</p>
+    </item>
+  </terms></synopsis>
+  <p>This mode is called by <code style="xslt-mode" 
xref="html.sidebar.sections">html.sidebar.sections</code> to allow different input formats to implement a 
sections list for a sidebar.</p>
+</page>
diff --git a/doc/yelp-xsl/C/html.sidebar.sections.page b/doc/yelp-xsl/C/html.sidebar.sections.page
new file mode 100644
index 00000000..021003f1
--- /dev/null
+++ b/doc/yelp-xsl/C/html.sidebar.sections.page
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<page xmlns="http://projectmallard.org/1.0/"; id="html.sidebar.sections" type="topic" 
style="xslt-template"><info><link type="guide" xref="html" group="templates"/><link type="guide" 
xref="templates" group="html"/><revision version="3.30" date="2018-06-10" status="candidate"/><desc>Output a 
list of sections for a sidebar.</desc></info><title>html.sidebar.sections</title><p>Output a list of sections 
for a sidebar.</p>
+  
+  
+  <synopsis><title>Parameters</title><terms>
+    <item>
+      <title><code>node</code></title>
+      <p>The node a sidebar is being created for.</p>
+    </item>
+    <item>
+      <title><code>side</code></title>
+      <p>Which sidebar, either <code>left</code> or <code>right</code>.</p>
+    </item>
+  </terms></synopsis>
+  <p>This template creates a list of sections on the current page for a sidebar. It applies <code 
style="xslt-mode" xref="html.sidebar.sections.mode">html.sidebar.sections.mode</code> to <code 
style="xslt-param">node</code>, passing <code style="xslt-param">side</code> as a parameter, to allow 
individual input formats to implement sections lists.</p>
+  <p>This named template also implements <code style="xslt-mode" 
xref="html.sidebar.mode">html.sidebar.mode</code> on the <code>sections</code> token. See <code 
style="xslt-template" xref="html.sidebar">html.sidebar</code> for more information on how sidebars are 
created.</p>
+<list style="compact"><title>Calls Modes</title><item><p><link 
xref="html.sidebar.sections.mode"/></p></item></list></page>
diff --git a/doc/yelp-xsl/C/mal.link.target.extended.page b/doc/yelp-xsl/C/mal.link.target.extended.page
new file mode 100644
index 00000000..cb73fe13
--- /dev/null
+++ b/doc/yelp-xsl/C/mal.link.target.extended.page
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<page xmlns="http://projectmallard.org/1.0/"; id="mal.link.target.extended" type="topic" 
style="xslt-template"><info><link type="guide" xref="mal-link" group="templates"/><link type="guide" 
xref="templates" group="mal"/><link type="guide" xref="stubs" group="mal"/><revision version="3.28" 
date="2017-08-11" status="final"/><desc>Output the target URL for an element with an extended 
<code>xref</code> attribute.</desc><stub 
xmlns="http://projects.gnome.org/yelp/xsldoc/"/></info><title>mal.link.target.extended</title><p>Output the 
target URL for an element with an extended <code>xref</code> attribute.</p><note><p>This template is a stub. 
Customizations may override it for
+            additional functionality.</p></note>
+  
+  
+  <synopsis><title>Parameters</title><terms>
+    <item>
+      <title><code>node</code></title>
+      <p>The <code>link</code> or other element creating the link.</p>
+    </item>
+    <item>
+      <title><code>action</code></title>
+      <p>The <code>action</code> attribute of <code style="xslt-param">node</code>.</p>
+    </item>
+    <item>
+      <title><code>xref</code></title>
+      <p>The <code>xref</code> attribute of <code style="xslt-param">node</code>.</p>
+    </item>
+    <item>
+      <title><code>href</code></title>
+      <p>The <code>href</code> attribute of <code style="xslt-param">node</code>.</p>
+    </item>
+  </terms></synopsis>
+  <p>This template is called by <code style="xslt-template" xref="mal.link.target">mal.link.target</code> to 
create URLs for links with a <code>/</code> or <code>:</code> in the <code>xref</code> attribute. By default, 
it just outputs the value of <code style="xslt-param">href</code>. Override this template to provide behavior 
for extended <code>xref</code> attributes.</p>
+</page>
diff --git a/doc/yelp-xsl/C/mal2html-page.page b/doc/yelp-xsl/C/mal2html-page.page
index 4f716291..313880a5 100644
--- a/doc/yelp-xsl/C/mal2html-page.page
+++ b/doc/yelp-xsl/C/mal2html-page.page
@@ -1,2 +1,2 @@
 <?xml version="1.0"?>
-<page xmlns="http://projectmallard.org/1.0/"; id="mal2html-page" type="guide" 
style="xslt-stylesheet"><?xslt-private _mal2html.page.about.credits?><info><link type="guide" 
xref="stylesheets" group="mal2html"/><revision version="3.8" date="2012-11-05" status="final"/><link 
type="xslt-defines-template" xref="mal2html.page.about"/><link type="xslt-defines-template" 
xref="mal2html.page.linktrails"/><link type="xslt-defines-template" 
xref="mal2html.page.linktrails.empty"/><link type="xslt-defines-template" 
xref="mal2html.page.linktrails.trail"/><link type="xslt-defines-template" 
xref="mal2html.page.linktrails.trail.prefix"/><link type="xslt-defines-template" 
xref="mal2html.page.linktrails.link"/><link type="xslt-defines-template" xref="mal2html.editor.badge"/><link 
type="xslt-defines-template" xref="mal2html.editor.banner"/><link type="xslt-defines-template" 
xref="mal2html.section"/><link type="xslt-implements-mode" xref="l10n.format.mode"/><link 
type="xslt-implements-mode" xref="
 html.tit
 le.mode"/><link type="xslt-implements-mode" xref="html.header.mode"/><link type="xslt-implements-mode" 
xref="html.footer.mode"/><link type="xslt-implements-mode" xref="html.body.mode"/><link 
type="xslt-implements-mode" xref="mal2html.title.mode"/><link type="xslt-implements-mode" 
xref="html.css.mode"/><link type="xslt-implements-mode" xref="html.js.mode"/><link type="xslt-defines-param" 
xref="mal2html.editor_mode"/></info><title>Mallard to HTML - Pages</title><p>Handle pages, sections, and 
top-level data.</p><p>This stylesheet contains templates to process Mallard <code>page</code> and 
<code>section</code> elements, including implementations of the interfaces provided by the common <file 
xref="html">html</file> stylesheet.</p><links type="topic" groups="stylesheets" 
style="linklist"><title>Stylesheets</title></links><links type="topic" groups="parameters" 
style="linklist"><title>Parameters</title></links><links type="topic" groups="modes" 
style="linklist"><title>Modes</title
</links
<links type="topic" groups="templates" style="linklist"><title>Templates</title></links><links type="topic" 
groups="keys" style="linklist"><title>Keys</title></links><list style="compact"><title>Calls 
Templates</title><item><p><link xref="l10n.gettext"/></p></item><item><p><link 
xref="mal.link.linktrails"/></p></item><item><p><link 
xref="html.linktrails.empty"/></p></item><item><p><link xref="l10n.direction"/></p></item><item><p><link 
xref="mal.link.target"/></p></item><item><p><link xref="mal.link.tooltip"/></p></item><item><p><link 
xref="mal.link.content"/></p></item><item><p><link xref="html.class.attr"/></p></item><item><p><link 
xref="mal2html.links.topic"/></p></item><item><p><link xref="mal2html.links.guide"/></p></item></list><list 
style="compact"><title>Calls Modes</title><item><p><link 
xref="mal2html.block.mode"/></p></item><item><p><link xref="mal2html.inline.mode"/></p></item></list><list 
style="compact"><title>Calls Parameters</title><item><p><link xref="color.b
 g"/></p>
 </item><item><p><link xref="color.bg.blue"/></p></item><item><p><link 
xref="color.bg.gray"/></p></item><item><p><link xref="color.bg.red"/></p></item><item><p><link 
xref="color.bg.yellow"/></p></item><item><p><link xref="color.blue"/></p></item><item><p><link 
xref="color.fg"/></p></item><item><p><link xref="color.fg.blue"/></p></item><item><p><link 
xref="color.fg.dark"/></p></item><item><p><link xref="color.gray"/></p></item><item><p><link 
xref="color.red"/></p></item><item><p><link xref="color.yellow"/></p></item><item><p><link 
xref="mal2html.editor_mode"/></p></item></list><table><title>Implements 
Templates</title><thead><tr><th><p>Mode</p></th><th><p>Match</p></th></tr></thead><tbody><tr><td><p/></td><td><p><code>mal:page
 | mal:section</code></p></td></tr><tr><td><p><link 
xref="html.body.mode">html.body.mode</link></p></td><td><p><code>mal:page</code></p></td></tr><tr><td><p><link
 xref="html.css.mode">html.css.mode</link></p></td><td><p><code>mal:page</code></p></td></tr>
 <tr><td>
 <p><link 
xref="html.footer.mode">html.footer.mode</link></p></td><td><p><code>mal:page</code></p></td></tr><tr><td><p><link
 
xref="html.header.mode">html.header.mode</link></p></td><td><p><code>mal:page</code></p></td></tr><tr><td><p><link
 xref="html.js.mode">html.js.mode</link></p></td><td><p><code>mal:page</code></p></td></tr><tr><td><p><link 
xref="html.title.mode">html.title.mode</link></p></td><td><p><code>mal:page</code></p></td></tr><tr><td><p><link
 
xref="l10n.format.mode">l10n.format.mode</link></p></td><td><p><code>msg:copyright.years</code></p></td></tr><tr><td><p><link
 
xref="l10n.format.mode">l10n.format.mode</link></p></td><td><p><code>msg:copyright.name</code></p></td></tr><tr><td><p><link
 xref="mal2html.title.mode">mal2html.title.mode</link></p></td><td><p><code>mal:title | 
mal:subtitle</code></p></td></tr></tbody></table></page>
+<page xmlns="http://projectmallard.org/1.0/"; id="mal2html-page" type="guide" 
style="xslt-stylesheet"><?xslt-private _mal2html.page.about.credits?><info><link type="guide" 
xref="stylesheets" group="mal2html"/><revision version="3.8" date="2012-11-05" status="final"/><link 
type="xslt-defines-template" xref="mal2html.page.about"/><link type="xslt-defines-template" 
xref="mal2html.page.linktrails"/><link type="xslt-defines-template" 
xref="mal2html.page.linktrails.empty"/><link type="xslt-defines-template" 
xref="mal2html.page.linktrails.trail"/><link type="xslt-defines-template" 
xref="mal2html.page.linktrails.trail.prefix"/><link type="xslt-defines-template" 
xref="mal2html.page.linktrails.link"/><link type="xslt-defines-template" xref="mal2html.editor.badge"/><link 
type="xslt-defines-template" xref="mal2html.editor.banner"/><link type="xslt-defines-template" 
xref="_html.sidebar.contents.ul"/><link type="xslt-defines-template" xref="mal2html.section"/><link 
type="xslt-implements-mo
 de" xref
 ="l10n.format.mode"/><link type="xslt-implements-mode" xref="html.title.mode"/><link 
type="xslt-implements-mode" xref="html.header.mode"/><link type="xslt-implements-mode" 
xref="html.footer.mode"/><link type="xslt-implements-mode" xref="html.sidebar.contents.mode"/><link 
type="xslt-implements-mode" xref="html.sidebar.sections.mode"/><link type="xslt-implements-mode" 
xref="html.body.mode"/><link type="xslt-implements-mode" xref="mal2html.title.mode"/><link 
type="xslt-implements-mode" xref="html.css.mode"/><link type="xslt-implements-mode" 
xref="html.js.mode"/><link type="xslt-defines-param" xref="mal2html.editor_mode"/></info><title>Mallard to 
HTML - Pages</title><p>Handle pages, sections, and top-level data.</p><p>This stylesheet contains templates 
to process Mallard <code>page</code> and <code>section</code> elements, including implementations of the 
interfaces provided by the common <file xref="html">html</file> stylesheet.</p><links type="topic" 
groups="stylesheets" style
 ="linkli
 st"><title>Stylesheets</title></links><links type="topic" groups="parameters" 
style="linklist"><title>Parameters</title></links><links type="topic" groups="modes" 
style="linklist"><title>Modes</title></links><links type="topic" groups="templates" 
style="linklist"><title>Templates</title></links><links type="topic" groups="keys" 
style="linklist"><title>Keys</title></links><list style="compact"><title>Calls 
Templates</title><item><p><link xref="l10n.gettext"/></p></item><item><p><link 
xref="mal.link.linktrails"/></p></item><item><p><link xref="html.linktrails.empty"/></p></item><item><p><link 
xref="l10n.direction"/></p></item><item><p><link xref="mal.link.target"/></p></item><item><p><link 
xref="mal.link.tooltip"/></p></item><item><p><link xref="mal.link.content"/></p></item><item><p><link 
xref="_mal2html.links.section.ul"/></p></item><item><p><link 
xref="html.class.attr"/></p></item><item><p><link xref="mal2html.links.topic"/></p></item><item><p><link 
xref="mal2html.links.gui
 de"/></p
</item></list><list style="compact"><title>Calls Modes</title><item><p><link 
xref="mal2html.block.mode"/></p></item><item><p><link xref="mal2html.inline.mode"/></p></item></list><list 
style="compact"><title>Calls Keys</title><item><p><link xref="mal.cache.key"/></p></item></list><list 
style="compact"><title>Calls Parameters</title><item><p><link xref="color.bg"/></p></item><item><p><link 
xref="color.bg.blue"/></p></item><item><p><link xref="color.bg.gray"/></p></item><item><p><link 
xref="color.bg.red"/></p></item><item><p><link xref="color.bg.yellow"/></p></item><item><p><link 
xref="color.blue"/></p></item><item><p><link xref="color.fg"/></p></item><item><p><link 
xref="color.fg.blue"/></p></item><item><p><link xref="color.fg.dark"/></p></item><item><p><link 
xref="color.gray"/></p></item><item><p><link xref="color.red"/></p></item><item><p><link 
xref="color.yellow"/></p></item><item><p><link xref="mal.cache"/></p></item><item><p><link 
xref="mal.link.default_root"/></p></item
<item><
 p><link xref="mal2html.editor_mode"/></p></item></list><table><title>Implements 
Templates</title><thead><tr><th><p>Mode</p></th><th><p>Match</p></th></tr></thead><tbody><tr><td><p/></td><td><p><code>mal:page
 | mal:section</code></p></td></tr><tr><td><p><link 
xref="html.body.mode">html.body.mode</link></p></td><td><p><code>mal:page</code></p></td></tr><tr><td><p><link
 xref="html.css.mode">html.css.mode</link></p></td><td><p><code>mal:page</code></p></td></tr><tr><td><p><link 
xref="html.footer.mode">html.footer.mode</link></p></td><td><p><code>mal:page</code></p></td></tr><tr><td><p><link
 
xref="html.header.mode">html.header.mode</link></p></td><td><p><code>mal:page</code></p></td></tr><tr><td><p><link
 xref="html.js.mode">html.js.mode</link></p></td><td><p><code>mal:page</code></p></td></tr><tr><td><p><link 
xref="html.sidebar.contents.mode">html.sidebar.contents.mode</link></p></td><td><p><code>mal:page</code></p></td></tr><tr><td><p><link
 xref="html.sidebar.sections.mode">html
 .sidebar
 .sections.mode</link></p></td><td><p><code>mal:page</code></p></td></tr><tr><td><p><link 
xref="html.title.mode">html.title.mode</link></p></td><td><p><code>mal:page</code></p></td></tr><tr><td><p><link
 
xref="l10n.format.mode">l10n.format.mode</link></p></td><td><p><code>msg:copyright.years</code></p></td></tr><tr><td><p><link
 
xref="l10n.format.mode">l10n.format.mode</link></p></td><td><p><code>msg:copyright.name</code></p></td></tr><tr><td><p><link
 xref="mal2html.title.mode">mal2html.title.mode</link></p></td><td><p><code>mal:title | 
mal:subtitle</code></p></td></tr></tbody></table></page>
diff --git a/doc/yelp-xsl/C/mal2html.ui.links.img.src.page b/doc/yelp-xsl/C/mal2html.ui.links.img.src.page
new file mode 100644
index 00000000..1860f90e
--- /dev/null
+++ b/doc/yelp-xsl/C/mal2html.ui.links.img.src.page
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<page xmlns="http://projectmallard.org/1.0/"; id="mal2html.ui.links.img.src" type="topic" 
style="xslt-template"><info><link type="guide" xref="mal2html-ui" group="templates"/><link type="guide" 
xref="templates" group="mal2html"/><revision version="3.28" date="2017-08-11" status="final"/><desc>Output 
the <code>src</code> attribute for a thumbnail 
image.</desc></info><title>mal2html.ui.links.img.src</title><p>Output the <code>src</code> attribute for a 
thumbnail image.</p>
+  
+  
+  <synopsis><title>Parameters</title><terms>
+    <item>
+      <title><code>node</code></title>
+      <p>A <code>links</code> element to link from.</p>
+    </item>
+    <item>
+      <title><code>thumb</code></title>
+      <p>A <code>uix:thumb</code> element.</p>
+    </item>
+    <item>
+      <title><code>width</code></title>
+      <p>The width to fit thumbnails into.</p>
+    </item>
+    <item>
+      <title><code>height</code></title>
+      <p>The height to fit thumbnails into.</p>
+    </item>
+  </terms></synopsis>
+  <p>This template outputs <code>src</code> attribute for the HTML <code>img</code> element created from 
<code style="xslt-param">thumb</code>. By default, it just copies the <code>src</code> attribute of <code 
style="xslt-param">thumb</code>. Override this template if you need to support multi-directory output.</p>
+</page>
diff --git a/xslt/common/domains/yelp-xsl.pot b/xslt/common/domains/yelp-xsl.pot
index 9cb9c38d..528acec0 100644
--- a/xslt/common/domains/yelp-xsl.pot
+++ b/xslt/common/domains/yelp-xsl.pot
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2012-11-21 23:09-0500\n"
+"POT-Creation-Date: 2018-06-10 13:29-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL li org>\n"
@@ -120,26 +120,44 @@ msgid "Candidate"
 msgstr ""
 
 #. (itstool) path: msg/msgstr
-#. Accessible title for an close button.
+#. Accessible title for a caution note.
 #: yelp-xsl.xml.in:137
+msgid "Caution"
+msgstr ""
+
+#. (itstool) path: msg/msgstr
+#. Accessible title for an close button.
+#: yelp-xsl.xml.in:142
 msgid "Close"
 msgstr ""
 
 #. (itstool) path: msg/msgstr
 #. Default title for a colophon section.
-#: yelp-xsl.xml.in:142
+#: yelp-xsl.xml.in:147
 msgid "Colophon"
 msgstr ""
 
+#. (itstool) path: msg/msgstr
+#. Title for a table of contents for the entire document.
+#: yelp-xsl.xml.in:152
+msgid "Contents"
+msgstr ""
+
 #. (itstool) path: msg/msgstr
 #. Title for license information when it's a CC license.
-#: yelp-xsl.xml.in:147
+#: yelp-xsl.xml.in:157
 msgid "Creative Commons"
 msgstr ""
 
+#. (itstool) path: msg/msgstr
+#. Accessible title for a danger note.
+#: yelp-xsl.xml.in:162
+msgid "Danger"
+msgstr ""
+
 #. (itstool) path: msg/msgstr
 #. Default title for a dedication section.
-#: yelp-xsl.xml.in:152
+#: yelp-xsl.xml.in:167
 msgid "Dedication"
 msgstr ""
 
@@ -147,13 +165,13 @@ msgstr ""
 #. Revision status of a document or page. Most content has been
 #. written, but revisions are still happening.
 #. 
-#: yelp-xsl.xml.in:160
+#: yelp-xsl.xml.in:175
 msgid "Draft"
 msgstr ""
 
 #. (itstool) path: msg/msgstr
 #. Title for a list of editors.
-#: yelp-xsl.xml.in:165
+#: yelp-xsl.xml.in:180
 msgid "Edited By"
 msgstr ""
 
@@ -161,19 +179,19 @@ msgstr ""
 #. Revision status of a document or page. A senior member of the
 #. documentation team has reviewed and approved.
 #. 
-#: yelp-xsl.xml.in:173
+#: yelp-xsl.xml.in:188
 msgid "Final"
 msgstr ""
 
 #. (itstool) path: msg/msgstr
 #. Default title for a glossary.
-#: yelp-xsl.xml.in:178
+#: yelp-xsl.xml.in:193
 msgid "Glossary"
 msgstr ""
 
 #. (itstool) path: msg/msgstr
 #. Accessible title for an important note.
-#: yelp-xsl.xml.in:183
+#: yelp-xsl.xml.in:198
 msgid "Important"
 msgstr ""
 
@@ -181,58 +199,64 @@ msgstr ""
 #. Revision status of a document or page. Work has begun, but
 #. not all content has been written.
 #. 
-#: yelp-xsl.xml.in:191
+#: yelp-xsl.xml.in:206
 msgid "Incomplete"
 msgstr ""
 
 #. (itstool) path: msg/msgstr
 #. Default title for an index of terms in a book.
-#: yelp-xsl.xml.in:196
+#: yelp-xsl.xml.in:211
 msgid "Index"
 msgstr ""
 
 #. (itstool) path: msg/msgstr
 #. Default title for a DocBook legal notice.
-#: yelp-xsl.xml.in:201
+#: yelp-xsl.xml.in:216
 msgid "Legal"
 msgstr ""
 
 #. (itstool) path: msg/msgstr
 #. Generic title for license information when it's not a known license.
 #. 
-#: yelp-xsl.xml.in:208
+#: yelp-xsl.xml.in:223
 msgid "License"
 msgstr ""
 
 #. (itstool) path: msg/msgstr
 #. Title for a list of maintainers.
-#: yelp-xsl.xml.in:213
+#: yelp-xsl.xml.in:228
 msgid "Maintained By"
 msgstr ""
 
 #. (itstool) path: msg/msgstr
 #. Automatic heading above a list of guide links.
-#: yelp-xsl.xml.in:218
+#: yelp-xsl.xml.in:233
 msgid "More Information"
 msgstr ""
 
 #. (itstool) path: msg/msgstr
 #. Link text for a link to the next page in a series.
-#: yelp-xsl.xml.in:223
+#: yelp-xsl.xml.in:238
 msgid "Next"
 msgstr ""
 
 #. (itstool) path: msg/msgstr
 #. Accessible title for a note.
-#: yelp-xsl.xml.in:228
+#: yelp-xsl.xml.in:243
 msgid "Note"
 msgstr ""
 
+#. (itstool) path: msg/msgstr
+#. Title for a list of links to sections on the current page.
+#: yelp-xsl.xml.in:248
+msgid "On This Page"
+msgstr ""
+
 #. (itstool) path: msg/msgstr
 #. Title for a list contributors other than authors, editors, translators,
 #. or other types we have specific lists for.
 #. 
-#: yelp-xsl.xml.in:236
+#: yelp-xsl.xml.in:256
 msgid "Other Credits"
 msgstr ""
 
@@ -240,31 +264,37 @@ msgstr ""
 #. Revision status of a document or page. Content was once current,
 #. but needs to be updated to reflect software updates.
 #. 
-#: yelp-xsl.xml.in:244
+#: yelp-xsl.xml.in:264
 msgid "Outdated"
 msgstr ""
 
+#. (itstool) path: msg/msgstr
+#. Accessible title for a package note.
+#: yelp-xsl.xml.in:269
+msgid "Package"
+msgstr ""
+
 #. (itstool) path: msg/msgstr
 #. Tooltip on play/pause buttons for audio and video objects.
-#: yelp-xsl.xml.in:249
+#: yelp-xsl.xml.in:274
 msgid "Pause"
 msgstr ""
 
 #. (itstool) path: msg/msgstr
 #. Tooltip on play/pause buttons for audio and video objects.
-#: yelp-xsl.xml.in:254
+#: yelp-xsl.xml.in:279
 msgid "Play"
 msgstr ""
 
 #. (itstool) path: msg/msgstr
 #. Link text for a link to the previous page in a series.
-#: yelp-xsl.xml.in:259
+#: yelp-xsl.xml.in:284
 msgid "Previous"
 msgstr ""
 
 #. (itstool) path: msg/msgstr
 #. Title for a list of publishers.
-#: yelp-xsl.xml.in:264
+#: yelp-xsl.xml.in:289
 msgid "Published By"
 msgstr ""
 
@@ -272,13 +302,13 @@ msgstr ""
 #. Revision status of a document or page. Content has been written
 #. and should be reviewed by other team members.
 #. 
-#: yelp-xsl.xml.in:272
+#: yelp-xsl.xml.in:297
 msgid "Ready for review"
 msgstr ""
 
 #. (itstool) path: msg/msgstr
 #. Automatic heading above a list of see-also links.
-#: yelp-xsl.xml.in:277
+#: yelp-xsl.xml.in:302
 msgid "See Also"
 msgstr ""
 
@@ -287,20 +317,20 @@ msgstr ""
 #. This is used a tooltip on a link to shrink images back down after
 #. they've been expanded to full size.
 #. 
-#: yelp-xsl.xml.in:286
+#: yelp-xsl.xml.in:311
 msgid "Scale images down"
 msgstr ""
 
 #. (itstool) path: msg/msgstr
 #. Accessible title for a sidebar note.
-#: yelp-xsl.xml.in:291
+#: yelp-xsl.xml.in:316
 msgid "Sidebar"
 msgstr ""
 
 #. (itstool) path: msg/msgstr
 #. Revision status of a document or page. No content has been written yet.
 #. 
-#: yelp-xsl.xml.in:298
+#: yelp-xsl.xml.in:323
 msgid "Stub"
 msgstr ""
 
@@ -308,19 +338,19 @@ msgstr ""
 #. Default title for a refsynopsisdiv element. This is the common section
 #. title found in most UNIX man pages.
 #. 
-#: yelp-xsl.xml.in:306
+#: yelp-xsl.xml.in:331
 msgid "Synopsis"
 msgstr ""
 
 #. (itstool) path: msg/msgstr
 #. Accessible title for a tip.
-#: yelp-xsl.xml.in:311
+#: yelp-xsl.xml.in:336
 msgid "Tip"
 msgstr ""
 
 #. (itstool) path: msg/msgstr
 #. Title for a list of translators.
-#: yelp-xsl.xml.in:316
+#: yelp-xsl.xml.in:341
 msgid "Translated By"
 msgstr ""
 
@@ -328,19 +358,19 @@ msgstr ""
 #. Figures can automatically scale images down to fit the page width.
 #. This is used a tooltip on a link to expand images to full size.
 #. 
-#: yelp-xsl.xml.in:324
+#: yelp-xsl.xml.in:349
 msgid "View images at normal size"
 msgstr ""
 
 #. (itstool) path: msg/msgstr
 #. Accessible title for a warning.
-#: yelp-xsl.xml.in:329
+#: yelp-xsl.xml.in:354
 msgid "Warning"
 msgstr ""
 
 #. (itstool) path: msg/msgstr
 #. Title for a list of authors.
-#: yelp-xsl.xml.in:334
+#: yelp-xsl.xml.in:359
 msgid "Written By"
 msgstr ""
 
@@ -354,7 +384,7 @@ msgstr ""
 #. 
 #. <biblioentry.label/> - The term being defined by the glossary entry
 #. 
-#: yelp-xsl.xml.in:350
+#: yelp-xsl.xml.in:375
 msgid "View the bibliography entry <biblioentry.label/>."
 msgstr ""
 
@@ -377,7 +407,7 @@ msgstr ""
 #. 
 #. <biblioentry.label/> - The text content of the bibliography label
 #. 
-#: yelp-xsl.xml.in:373
+#: yelp-xsl.xml.in:398
 msgid "[<biblioentry.label/>]"
 msgstr ""
 
@@ -394,7 +424,7 @@ msgstr ""
 #. <citation.label/> - The text content of the citation element, possibly
 #.                     as a link to an entry in the bibliography
 #. 
-#: yelp-xsl.xml.in:390
+#: yelp-xsl.xml.in:415
 msgid "[<citation.label/>]"
 msgstr ""
 
@@ -423,7 +453,7 @@ msgstr ""
 #. <comment.name/> - The name of the person making the comment
 #. <comment.date/> - The date the comment was made
 #. 
-#: yelp-xsl.xml.in:419
+#: yelp-xsl.xml.in:444
 msgid "from <comment.name/> on <comment.date/>"
 msgstr ""
 
@@ -451,7 +481,7 @@ msgstr ""
 #. 
 #. <comment.name/> - The name of the person making the comment
 #. 
-#: yelp-xsl.xml.in:447
+#: yelp-xsl.xml.in:472
 msgid "from <comment.name/>"
 msgstr ""
 
@@ -464,7 +494,7 @@ msgstr ""
 #. <copyright.years/> - The years the copyrightable material was made
 #. <copyright.name/>  - The person or entity that holds the copyright
 #. 
-#: yelp-xsl.xml.in:460
+#: yelp-xsl.xml.in:485
 msgid "© <copyright.years/> <copyright.name/>"
 msgstr ""
 
@@ -476,7 +506,7 @@ msgstr ""
 #. 
 #. <string/> - The linked-to email address
 #. 
-#: yelp-xsl.xml.in:472
+#: yelp-xsl.xml.in:497
 msgid "Send email to ‘<string/>’."
 msgstr ""
 
@@ -488,7 +518,7 @@ msgstr ""
 #. 
 #. <glossterm/> - The term being defined by the glossary entry
 #. 
-#: yelp-xsl.xml.in:484
+#: yelp-xsl.xml.in:509
 msgid "Read the definition for ‘<glossterm/>’."
 msgstr ""
 
@@ -509,7 +539,7 @@ msgstr ""
 #. 
 #. <glosssee/> - The actual link or links of the cross reference
 #. 
-#: yelp-xsl.xml.in:505
+#: yelp-xsl.xml.in:530
 msgid "See <glosssee/>."
 msgstr ""
 
@@ -531,7 +561,7 @@ msgstr ""
 #. 
 #. <glosssee/> - The actual link or links of the cross reference
 #. 
-#: yelp-xsl.xml.in:527
+#: yelp-xsl.xml.in:552
 msgid "See also <glosssee/>."
 msgstr ""
 
@@ -543,7 +573,7 @@ msgstr ""
 #. 
 #. <node/> - The text content of the quote element
 #. 
-#: yelp-xsl.xml.in:539
+#: yelp-xsl.xml.in:564
 msgid "“<node/>”"
 msgstr ""
 
@@ -555,37 +585,6 @@ msgstr ""
 #. 
 #. <node/> - The text content of the quote element
 #. 
-#: yelp-xsl.xml.in:551
+#: yelp-xsl.xml.in:576
 msgid "‘<node/>’"
 msgstr ""
-
-#. (itstool) path: msg/msgstr
-#. ID: seeie.format
-#. This is a format message used to format index cross references.
-#. This format message controls the sentence used to present the cross
-#. reference, not the link itself.
-#. 
-#. Special elements in the message will be replaced with the
-#. appropriate content, as follows:
-#. 
-#. <seeie/> - The actual link or links of the cross reference
-#. 
-#: yelp-xsl.xml.in:566
-msgid "See <seeie/>."
-msgstr ""
-
-#. (itstool) path: msg/msgstr
-#. ID: seealsoie.format
-#. This is a format message used to format index cross references.
-#. This format message controls the sentence used to present the cross
-#. reference, not the link itself.
-#. 
-#. Special elements in the message will be replaced with the
-#. appropriate content, as follows:
-#. 
-#. <seeie/> - The actual link or links of the cross reference
-#. 
-#: yelp-xsl.xml.in:581
-msgid "See also <seeie/>."
-msgstr ""
-
diff --git a/xslt/common/domains/yelp-xsl.xml.in b/xslt/common/domains/yelp-xsl.xml.in
index e7315563..ff639730 100644
--- a/xslt/common/domains/yelp-xsl.xml.in
+++ b/xslt/common/domains/yelp-xsl.xml.in
@@ -147,6 +147,11 @@ reviewed, and it awaiting a final approval.
 <msgstr>Colophon</msgstr>
 </msg>
 
+<msg id="Contents">
+<its:locNote>Title for a table of contents for the entire document.</its:locNote>
+<msgstr>Contents</msgstr>
+</msg>
+
 <msg id="Creative Commons">
 <its:locNote>Title for license information when it's a CC license.</its:locNote>
 <msgstr>Creative Commons</msgstr>
@@ -238,6 +243,11 @@ Generic title for license information when it's not a known license.
 <msgstr>Note</msgstr>
 </msg>
 
+<msg id="On This Page">
+<its:locNote>Title for a list of links to sections on the current page.</its:locNote>
+<msgstr>On This Page</msgstr>
+</msg>
+
 <msg id="Other Credits">
 <its:locNote>
 Title for a list contributors other than authors, editors, translators,
diff --git a/xslt/common/html.xsl b/xslt/common/html.xsl
index b59984aa..d4c8e33d 100644
--- a/xslt/common/html.xsl
+++ b/xslt/common/html.xsl
@@ -19,9 +19,10 @@ along with this program; see the file COPYING.LGPL. If not, see <http://www.gnu.
                 xmlns:mml="http://www.w3.org/1998/Math/MathML";
                 xmlns:exsl="http://exslt.org/common";
                 xmlns:set="http://exslt.org/sets";
+                xmlns:str="http://exslt.org/strings";
                 xmlns:its="http://www.w3.org/2005/11/its";
                 xmlns="http://www.w3.org/1999/xhtml";
-                exclude-result-prefixes="html mml set its"
+                exclude-result-prefixes="html mml set str its"
                 extension-element-prefixes="exsl"
                 version="1.0">
 
@@ -225,6 +226,32 @@ prefix the base file name itself.
 <xsl:param name="html.output.prefix" select="''"/>
 
 
+<!--@@==========================================================================
+html.sidebar.left
+List of components to add to the left sidebar.
+:Revision:version="3.30" date="2018-06-10" status="candidate"
+
+This parameter takes a space-separated list of tokens that specify which
+components to add to the stock left sidebar. These stylesheets recognize
+certain tokens, and you can add your own with %{html.sidebar.mode}. See
+*{html.sidebar} for further details.
+-->
+<xsl:param name="html.sidebar.left" select="''"/>
+
+
+<!--@@==========================================================================
+html.sidebar.right
+List of components to add to the right sidebar.
+:Revision:version="3.30" date="2018-06-10" status="candidate"
+
+This parameter takes a space-separated list of tokens that specify which
+components to add to the stock right sidebar. These stylesheets recognize
+certain tokens, and you can add your own with %{html.sidebar.mode}. See
+*{html.sidebar} for further details.
+-->
+<xsl:param name="html.sidebar.right" select="''"/>
+
+
 <!--**==========================================================================
 html.output
 Create an HTML output file.
@@ -329,7 +356,9 @@ the HTML #{head} element. Override the *{html.top.custom} and
 *{html.bottom.custom} templates to add site-specific content at the top and
 bottom of the page. Override the *{html.header.custom} and *{html.footer.custom}
 templates to provide additional content directoy above and below the main
-content. Override *{html.sidebar.custom} to create sidebars.
+content. Use the @{html.sidebar.left} and @{html.sidebar.right} parameters
+to create stock sidebars, or override *{html.sidebar.custom} to create
+your own.
 
 This template also calls *{html.css} and *{html.js} to output CSS and JavaScript
 elements. See those templates for further extension points.
@@ -365,6 +394,9 @@ elements. See those templates for further extension points.
         <xsl:with-param name="node" select="$node"/>
       </xsl:call-template>
       <main>
+        <xsl:call-template name="html.sidebar">
+          <xsl:with-param name="node" select="$node"/>
+        </xsl:call-template>
         <xsl:call-template name="html.sidebar.custom">
           <xsl:with-param name="node" select="$node"/>
         </xsl:call-template>
@@ -455,6 +487,187 @@ at the bottom of the page.
 </xsl:template>
 
 
+<!--**==========================================================================
+html.sidebar
+Output stock sidebars.
+:Revision:version="3.30" date="2018-06-10" status="candidate"
+$node: The node a sidebar is being created for.
+
+This templates outputs left and right sidebars according to the components
+listed in @{html.sidebar.left} and @{html.sidebar.right}. It only outputs each
+sidebar if the corresponding parameters is not empty or the string #{none}.
+
+This template is called inside the #{main} element, before the #{div.page}
+element, and before *{html.sidebar.custom}. Note that even the right sidebar
+is placed before the #{div.page} element. It is placed on the right using
+flexbox item reordering.
+
+To actually output the sidebar components, this template splits each parameter
+on whitespace using the EXSTL #{str:split} function. It then applies the mode
+%{html.sidebar.mode} to each token, passing ${node} and the sidebar side as
+parameters. Extension stylesheets can add their own sidebar components by
+implementing that mode and matching a pattern like
+#{token[. = 'name-of-token']}. You will then be able to use #{name-of-token}
+in @{html.sidebar.left} or @{html.sidebar.right}.
+
+This stylesheet recognizes four tokens: #{contents} and #{sections}, and the
+special tokens #{none} and #{blank}. The #{contents} token provides a table
+of contents for the entire document. It is handled by the *{html.sidebar.contents}
+template, which uses the %{html.sidebar.contents.mode} mode to allow different
+input formats to implement it. The #{sections} token lists sections on the
+current page. It is handled by the *{html.sidebar.section} template, which
+uses the %{html.sidebar.sections.mode} mode to allow different input formats
+to implement it.
+
+You can use the #{none} token on its own, instead of the empty string, to
+completely turn off either sidebar. Use the #{blank} token to output a sidebar
+without adding any components to it. This is useful, for example, to keep
+consistent margins. If an empty sidebar is output from the #{blank} token,
+it will also have the CSS class #{sidebar-blank} so you can style it
+differently.
+-->
+<xsl:template name="html.sidebar">
+  <xsl:param name="node" select="."/>
+  <xsl:if test="$html.sidebar.left != '' and $html.sidebar.left != 'none'">
+    <xsl:call-template name="_html.sidebar.sidebar">
+      <xsl:with-param name="node" select="$node"/>
+      <xsl:with-param name="side" select="'left'"/>
+      <xsl:with-param name="bars" select="$html.sidebar.left"/>
+    </xsl:call-template>
+  </xsl:if>
+  <xsl:if test="$html.sidebar.right != '' and $html.sidebar.right != 'none'">
+    <xsl:call-template name="_html.sidebar.sidebar">
+      <xsl:with-param name="node" select="$node"/>
+      <xsl:with-param name="side" select="'right'"/>
+      <xsl:with-param name="bars" select="$html.sidebar.right"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="_html.sidebar.sidebar">
+  <xsl:param name="node"/>
+  <xsl:param name="side"/>
+  <xsl:param name="bars"/>
+  <xsl:variable name="class">
+    <xsl:text>sidebar sidebar-</xsl:text>
+    <xsl:value-of select="$side"/>
+    <xsl:if test="$bars = 'blank'">
+      <xsl:text> sidebar-blank</xsl:text>
+    </xsl:if>
+  </xsl:variable>
+  <aside class="{$class}">
+    <xsl:apply-templates mode="html.sidebar.mode" select="str:split($bars)">
+      <xsl:with-param name="node" select="$node"/>
+      <xsl:with-param name="side" select="$side"/>
+    </xsl:apply-templates>
+  </aside>
+</xsl:template>
+
+
+<!--%%==========================================================================
+html.sidebar.mode
+Output a sidebar compenent for a token.
+:Revision:version="3.30" date="2018-06-10" status="candidate"
+$node: The node a sidebar is being created for.
+$side: Which sidebar, either #{left} or #{right}.
+
+This mode is called by *{html.sidebar} for each sidebar compenent in each of
+@{html.sidebar.left} and @{html.sidebar.right}. See *{html.sidebar} for full
+details.
+-->
+<xsl:template mode="html.sidebar.mode" match="token[. = 'blank']"/>
+<xsl:template mode="html.sidebar.mode" match="*">
+  <xsl:message>
+    <xsl:text>Unmatched sidebar: </xsl:text>
+    <xsl:value-of select="."/>
+  </xsl:message>
+</xsl:template>
+
+
+<!--**==========================================================================
+html.sidebar.contents
+Output a table of contents for a sidebar.
+:Revision:version="3.30" date="2018-06-10" status="candidate"
+$node: The node a sidebar is being created for.
+$side: Which sidebar, either #{left} or #{right}.
+
+This template creates a table of contents for a sidebar. It applies
+%{html.sidebar.contents.mode} to ${node}, passing ${side} as a parameter, to
+allow individual input formats to implement tables of contents.
+
+This named template also implements %{html.sidebar.mode} on the #{contents}
+token. See *{html.sidebar} for more information on how sidebars are created.
+-->
+<xsl:template name="html.sidebar.contents"
+              mode="html.sidebar.mode" match="token[. = 'contents']">
+  <xsl:param name="node"/>
+  <xsl:param name="side"/>
+  <xsl:apply-templates mode="html.sidebar.contents.mode" select="$node">
+    <xsl:with-param name="side" select="$side"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+
+<!--%%==========================================================================
+html.sidebar.contents.mode
+Output a table of contents for a sidebar.
+:Revision:version="3.30" date="2018-06-10" status="candidate"
+$side: Which sidebar, either #{left} or #{right}.
+
+This mode is called by %{html.sidebar.contents} to allow different input
+formats to implement a table of contents for a sidebar.
+-->
+<xsl:template mode="html.sidebar.contents.mode" match="*">
+  <xsl:param name="side"/>
+  <xsl:message>
+    <xsl:text>Unmatched contents sidebar: </xsl:text>
+    <xsl:value-of select="local-name(.)"/>
+  </xsl:message>
+</xsl:template>
+
+
+<!--**==========================================================================
+html.sidebar.sections
+Output a list of sections for a sidebar.
+:Revision:version="3.30" date="2018-06-10" status="candidate"
+$node: The node a sidebar is being created for.
+$side: Which sidebar, either #{left} or #{right}.
+
+This template creates a list of sections on the current page for a sidebar.
+It applies %{html.sidebar.sections.mode} to ${node}, passing ${side} as a
+parameter, to allow individual input formats to implement sections lists.
+
+This named template also implements %{html.sidebar.mode} on the #{sections}
+token. See *{html.sidebar} for more information on how sidebars are created.
+-->
+<xsl:template name="html.sidebar.sections"
+              mode="html.sidebar.mode" match="token[. = 'sections']">
+  <xsl:param name="node"/>
+  <xsl:param name="side"/>
+  <xsl:apply-templates mode="html.sidebar.sections.mode" select="$node">
+    <xsl:with-param name="side" select="$side"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+
+<!--%%==========================================================================
+html.sidebar.sections.mode
+Output a list of sections for a sidebar.
+:Revision:version="3.30" date="2018-06-10" status="candidate"
+$side: Which sidebar, either #{left} or #{right}.
+
+This mode is called by %{html.sidebar.sections} to allow different input
+formats to implement a sections list for a sidebar.
+-->
+<xsl:template mode="html.sidebar.sections.mode" match="*">
+  <xsl:param name="side"/>
+  <xsl:message>
+    <xsl:text>Unmatched sections sidebar: </xsl:text>
+    <xsl:value-of select="local-name(.)"/>
+  </xsl:message>
+</xsl:template>
+
+
 <!--**==========================================================================
 html.sidebar.custom
 Stub to output custom sidebar content.
@@ -469,6 +682,9 @@ Note that there is only one extension point for sidebar content, and it is
 always placed before the main content in document order. To create a sidebar
 on the right, output the element here, then adjust the #{order} CSS property
 for that element to display it after the #{main} element.
+
+This template is intended for completely custom sidebars. You can also use
+*{html.sidebar} to output sidebars with stock components.
 -->
 <xsl:template name="html.sidebar.custom">
   <xsl:param name="node" select="."/>
@@ -993,6 +1209,21 @@ div.page > header, div.page > footer { flex: 0 1 auto; }
   padding-left: 10px;
   padding-right: 10px;
 }
+aside.sidebar {
+  width: 300px;
+  padding: 20px 10px;
+  background: </xsl:text><xsl:value-of select="$color.bg.gray"/><xsl:text>
+}
+aside.sidebar-right { order: 3; }
+aside.sidebar section { margin-top: 0; }
+aside.sidebar * { margin-bottom: 20px; }
+aside.sidebar section > div.inner > div.hgroup {
+  border-bottom: none;
+}
+aside.sidebar section h2 {
+  font-size: 1em;
+  margin-bottom: 0;
+}
 article {
   padding-top: 10px;
   padding-bottom: 10px;
@@ -1256,6 +1487,11 @@ li.links {
   padding: 0;
   list-style-type: none;
 }
+li.links-head {
+  margin-top: 1em;
+  color: </xsl:text><xsl:value-of select="$color.fg.gray"/><xsl:text>;
+  border-bottom: solid 1px </xsl:text><xsl:value-of select="$color.gray"/><xsl:text>;
+}
 div.sectionlinks {
   display: inline-block;
   padding: 0 1em 0 1em;
diff --git a/xslt/dita/html/dita2html-topic.xsl b/xslt/dita/html/dita2html-topic.xsl
index 066cdfc2..c76ee464 100644
--- a/xslt/dita/html/dita2html-topic.xsl
+++ b/xslt/dita/html/dita2html-topic.xsl
@@ -322,6 +322,12 @@ REMARK: Describe this module
 
 <!-- == map & html.*.mode == -->
 
+<!--
+FIXME
+html.sidebar.contents.mode
+html.sidebar.sections.mode
+-->
+
 <!-- = map % html.title.mode = -->
 <xsl:template mode="html.title.mode" match="&map_map;">
   <xsl:choose>
diff --git a/xslt/docbook/html/db2html-division.xsl b/xslt/docbook/html/db2html-division.xsl
index 7d2fefa7..8a658c41 100644
--- a/xslt/docbook/html/db2html-division.xsl
+++ b/xslt/docbook/html/db2html-division.xsl
@@ -56,6 +56,78 @@ common !{html} stylesheet.
   <xsl:call-template name="db2html.division.about"/>
 </xsl:template>
 
+<!--%# html.sidebar.contents.mode -->
+<xsl:template mode="html.sidebar.contents.mode" match="*">
+  <xsl:param name="side"/>
+  <xsl:param name="side"/>
+  <div class="sidebar-contents">
+    <div class="inner">
+      <div class="title">
+        <h2>
+          <span class="title">
+            <xsl:call-template name="l10n.gettext">
+              <xsl:with-param name="msgid" select="'Contents'"/>
+            </xsl:call-template>
+          </span>
+        </h2>
+      </div>
+      <div class="region">
+        <div class="contents">
+          <ul>
+            <xsl:for-each select="/* | /*/&db_chunks;">
+              <li class="links">
+                <xsl:call-template name="db2html.xref">
+                  <xsl:with-param name="linkend" select="@id | @xml:id"/>
+                  <xsl:with-param name="target" select="."/>
+                  <xsl:with-param name="xrefstyle" select="'role:titleabbrev'"/>
+                </xsl:call-template>
+              </li>
+            </xsl:for-each>
+          </ul>
+        </div>
+      </div>
+    </div>
+  </div>
+</xsl:template>
+
+<!--%# html.sidebar.sections.mode -->
+<xsl:template mode="html.sidebar.sections.mode" match="*">
+  <xsl:param name="side"/>
+  <xsl:variable name="depth_of_chunk">
+    <xsl:call-template name="db.chunk.depth-of-chunk"/>
+  </xsl:variable>
+  <xsl:if test="count(ancestor::*) >= $db.chunk.max_depth and &db_chunks;">
+    <div class="sidebar-sections">
+      <div class="inner">
+        <div class="title">
+          <h2>
+            <span class="title">
+              <xsl:call-template name="l10n.gettext">
+                <xsl:with-param name="msgid" select="'On This Page'"/>
+              </xsl:call-template>
+            </span>
+          </h2>
+        </div>
+        <div class="region">
+          <div class="contents">
+            <ul>
+              <xsl:for-each select="&db_chunks;">
+                <li class="links">
+                  <xsl:call-template name="db2html.xref">
+                    <xsl:with-param name="linkend" select="@id | @xml:id"/>
+                    <xsl:with-param name="target" select="."/>
+                    <xsl:with-param name="xrefstyle" select="'role:titleabbrev'"/>
+                  </xsl:call-template>
+                </li>
+              </xsl:for-each>
+            </ul>
+          </div>
+        </div>
+      </div>
+    </div>
+  </xsl:if>
+</xsl:template>
+
 <!--%# html.body.mode -->
 <xsl:template mode="html.body.mode" match="*">
   <xsl:call-template name="db2html.links.next"/>
@@ -72,18 +144,7 @@ common !{html} stylesheet.
     <xsl:call-template name="db.chunk.depth-of-chunk"/>
   </xsl:param>
   <xsl:if test="count(ancestor::*) &lt; $db.chunk.max_depth">
-    <xsl:for-each select="appendix     | db:appendix     | article    | db:article    |
-                          bibliography | db:bibliography | bibliodiv  | db:bibliodiv  |
-                          book         | db:book         | chapter    | db:chapter    |
-                          colophon     | db:colophon     | dedication | db:dedication |
-                          glossary     | db:glossary     | glossdiv   | db:glossdiv   |
-                          index        | db:index        | lot        | db:lot        |
-                          part         | db:part         | preface    | db:preface    |
-                          refentry     | db:refentry     | reference  | db:reference  |
-                          sect1    | sect2    | sect3    | sect4    | sect5    | section    |
-                          db:sect1 | db:sect2 | db:sect3 | db:sect4 | db:sect5 | db:section |
-                          setindex     | db:setindex     | simplesect | db:simplesect |
-                          toc          | db:toc          ">
+    <xsl:for-each select="&db_chunks;">
       <xsl:call-template name="html.output">
         <xsl:with-param name="node" select="."/>
       </xsl:call-template>
diff --git a/xslt/mallard/html/mal2html-links.xsl b/xslt/mallard/html/mal2html-links.xsl
index caddabc4..29d22083 100644
--- a/xslt/mallard/html/mal2html-links.xsl
+++ b/xslt/mallard/html/mal2html-links.xsl
@@ -571,12 +571,14 @@ element containing ${node}.
   <xsl:param name="node" select="."/>
   <xsl:param name="depth"/>
   <xsl:param name="role"/>
+  <xsl:param name="nodesc" select="false()"/>
   <ul>
     <xsl:for-each select="$node/mal:section">
       <xsl:call-template name="mal2html.links.ul.li">
         <xsl:with-param name="node" select="$node"/>
         <xsl:with-param name="xref" select="concat(/mal:page/@id, '#', @id)"/>
         <xsl:with-param name="role" select="concat($role, ' section')"/>
+        <xsl:with-param name="nodesc" select="$nodesc"/>
       </xsl:call-template>
       <xsl:if test="$depth > 1 and mal:section">
         <li class="links">
@@ -585,6 +587,7 @@ element containing ${node}.
               <xsl:with-param name="node" select="."/>
               <xsl:with-param name="depth" select="$depth - 1"/>
               <xsl:with-param name="role" select="$role"/>
+              <xsl:with-param name="nodesc" select="$nodesc"/>
             </xsl:call-template>
           </ul>
         </li>
diff --git a/xslt/mallard/html/mal2html-page.xsl b/xslt/mallard/html/mal2html-page.xsl
index a383cc06..9c5460f5 100644
--- a/xslt/mallard/html/mal2html-page.xsl
+++ b/xslt/mallard/html/mal2html-page.xsl
@@ -558,6 +558,7 @@ of ${node}. It only outputs a banner if @{mal2html.editor_mode} is #{true}.
 
 <!-- == Matched Templates == -->
 
+<!--%# html.title.mode -->
 <xsl:template mode="html.title.mode" match="mal:page">
   <xsl:variable name="title" select="mal:info/mal:title[@type = 'text'][1]"/>
   <xsl:choose>
@@ -570,14 +571,140 @@ of ${node}. It only outputs a banner if @{mal2html.editor_mode} is #{true}.
   </xsl:choose>
 </xsl:template>
 
+<!--%# html.header.mode -->
 <xsl:template mode="html.header.mode" match="mal:page">
   <xsl:call-template name="mal2html.page.linktrails"/>
 </xsl:template>
 
+<!--%# html.footer.mode -->
 <xsl:template mode="html.footer.mode" match="mal:page">
   <xsl:call-template name="mal2html.page.about"/>
 </xsl:template>
 
+<!--%# html.sidebar.contents.mode -->
+<xsl:template mode="html.sidebar.contents.mode" match="mal:page">
+  <xsl:param name="side"/>
+  <xsl:variable name="page" select="."/>
+  <div class="sidebar-contents">
+    <div class="inner">
+      <div class="title">
+        <h2>
+          <span class="title">
+            <xsl:call-template name="l10n.gettext">
+              <xsl:with-param name="msgid" select="'Contents'"/>
+            </xsl:call-template>
+          </span>
+        </h2>
+      </div>
+      <div class="region">
+        <div class="contents">
+          <xsl:for-each select="$mal.cache">
+            <xsl:for-each select="key('mal.cache.key', $mal.link.default_root)">
+              <xsl:call-template name="_html.sidebar.contents.ul"/>
+            </xsl:for-each>
+          </xsl:for-each>
+        </div>
+      </div>
+    </div>
+  </div>
+</xsl:template>
+
+<xsl:template name="_html.sidebar.contents.ul">
+  <xsl:param name="node" select="."/>
+  <ul>
+    <xsl:if test="$node/self::mal:page">
+      <li class="links">
+        <a>
+          <xsl:attribute name="href">
+            <xsl:call-template name="mal.link.target">
+              <xsl:with-param name="xref" select="$node/@id"/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:attribute name="title">
+            <xsl:call-template name="mal.link.tooltip">
+              <xsl:with-param name="xref" select="$node/@id"/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:call-template name="mal.link.content">
+            <xsl:with-param name="xref" select="$node/@id"/>
+          </xsl:call-template>
+        </a>
+      </li>
+    </xsl:if>
+    <xsl:if test="$node/self::mal:section">
+      <li class="links links-head">
+        <xsl:choose>
+          <xsl:when test="$node/mal:info/mal:title[@type = 'link'][not(@role)]">
+            <xsl:apply-templates mode="mal2html.inline.mode"
+                                 select="$node/mal:info/mal:title[@type = 'link'][not(@role)][1]/node()"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:apply-templates mode="mal2html.inline.mode" select="$node/mal:title/node()"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </li>
+    </xsl:if>
+    <!-- FIXME: Ideally we'd group and sort based on links elements, but those
+         aren't in the cache file, so that's harder.
+    -->
+    <xsl:variable name="links_">
+      <xsl:call-template name="mal.link.topiclinks">
+        <xsl:with-param name="node" select="."/>
+      </xsl:call-template>
+    </xsl:variable>
+    <xsl:variable name="links" select="exsl:node-set($links_)/*"/>
+    <xsl:for-each select="$links">
+      <xsl:sort data-type="number" select="@groupsort"/>
+      <xsl:sort select="mal:title[@type = 'sort']"/>
+      <li class="links">
+        <a>
+          <xsl:attribute name="href">
+            <xsl:call-template name="mal.link.target"/>
+          </xsl:attribute>
+          <xsl:attribute name="title">
+            <xsl:call-template name="mal.link.tooltip"/>
+          </xsl:attribute>
+          <xsl:call-template name="mal.link.content"/>
+        </a>
+      </li>
+    </xsl:for-each>
+    <xsl:for-each select="$node/mal:section">
+      <li class="links">
+        <xsl:call-template name="_html.sidebar.contents.ul"/>
+      </li>
+    </xsl:for-each>
+  </ul>
+</xsl:template>
+
+<!--%# html.sidebar.sections.mode -->
+<xsl:template mode="html.sidebar.sections.mode" match="mal:page">
+  <xsl:param name="side"/>
+  <xsl:if test="mal:section">
+    <div class="sidebar-sections">
+      <div class="inner">
+        <div class="title">
+          <h2>
+            <span class="title">
+              <xsl:call-template name="l10n.gettext">
+                <xsl:with-param name="msgid" select="'On This Page'"/>
+              </xsl:call-template>
+            </span>
+          </h2>
+        </div>
+        <div class="region">
+          <div class="contents">
+            <xsl:call-template name="_mal2html.links.section.ul">
+              <xsl:with-param name="node" select="."/>
+              <xsl:with-param name="nodesc" select="true()"/>
+            </xsl:call-template>
+          </div>
+        </div>
+      </div>
+    </div>
+  </xsl:if>
+</xsl:template>
+
+<!--%# html.body.mode -->
 <xsl:template mode="html.body.mode" match="mal:page">
   <xsl:call-template name="mal2html.editor.banner"/>
   <xsl:choose>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]