mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
docs: xsl: Don't format empty sections in API manual
The LXC module has no exported 'Types' but the XSL template which generates the 'libvirt-libvirt-lxc.html' page would try to format it anyways. This would result in an empty non-pair version of the '<pre>' tag to be used in the page, which didn't render well with modern browsers for some reason. All following sections would become children of the non-pair <pre>. Fix the XSL template to not generate empty 'Types' or 'Functions' sections similarly to how we do with 'Macros'. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
0097f2a36e
commit
ed2109d272
@ -756,18 +756,22 @@
|
|||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
</pre>
|
</pre>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<h3><a href="#types">Types</a></h3>
|
<xsl:if test="count(exports[@type='typedef']) > 0">
|
||||||
<pre class="api">
|
<h3><a href="#types">Types</a></h3>
|
||||||
<xsl:apply-templates select="exports[@type='typedef']" mode="toc">
|
<pre class="api">
|
||||||
<xsl:sort select='@symbol'/>
|
<xsl:apply-templates select="exports[@type='typedef']" mode="toc">
|
||||||
</xsl:apply-templates>
|
<xsl:sort select='@symbol'/>
|
||||||
</pre>
|
</xsl:apply-templates>
|
||||||
<h3><a href="#functions">Functions</a></h3>
|
</pre>
|
||||||
<pre class="api">
|
</xsl:if>
|
||||||
<xsl:apply-templates select="exports[@type='function']" mode="toc">
|
<xsl:if test="count(exports[@type='function']) > 0">
|
||||||
<xsl:sort select='@symbol'/>
|
<h3><a href="#functions">Functions</a></h3>
|
||||||
</xsl:apply-templates>
|
<pre class="api">
|
||||||
</pre>
|
<xsl:apply-templates select="exports[@type='function']" mode="toc">
|
||||||
|
<xsl:sort select='@symbol'/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</pre>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
<h2>Description</h2>
|
<h2>Description</h2>
|
||||||
|
|
||||||
@ -777,14 +781,18 @@
|
|||||||
<xsl:sort select='@symbol'/>
|
<xsl:sort select='@symbol'/>
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<h3><a id="types">Types</a></h3>
|
<xsl:if test="count(exports[@type='typedef']) > 0">
|
||||||
<xsl:apply-templates select="exports[@type='typedef']">
|
<h3><a id="types">Types</a></h3>
|
||||||
<xsl:sort select='@symbol'/>
|
<xsl:apply-templates select="exports[@type='typedef']">
|
||||||
</xsl:apply-templates>
|
<xsl:sort select='@symbol'/>
|
||||||
<h3><a id="functions">Functions</a></h3>
|
</xsl:apply-templates>
|
||||||
<xsl:apply-templates select="exports[@type='function']">
|
</xsl:if>
|
||||||
<xsl:sort select='@symbol'/>
|
<xsl:if test="count(exports[@type='function']) > 0">
|
||||||
</xsl:apply-templates>
|
<h3><a id="functions">Functions</a></h3>
|
||||||
|
<xsl:apply-templates select="exports[@type='function']">
|
||||||
|
<xsl:sort select='@symbol'/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:if>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user