mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
docs: Remove XSLT table of contents generator
The only remaining page was 'hvsupport.html' which is generated by 'scripts/hvsupport.py'. The script already has all the data to generate the table of contents internally so we can remove the whole complicated template. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
5ff58a0ce7
commit
ef01df4a5c
@ -15,65 +15,10 @@
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="html:ul[@id='toc']" mode="content">
|
||||
<xsl:call-template name="toc"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="html:div[@id='include']" mode="content">
|
||||
<xsl:call-template name="include"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="toc">
|
||||
<ul>
|
||||
<xsl:for-each select="/html:html/html:body/html:h2[count(html:a) = 1]">
|
||||
<xsl:variable name="thish2" select="."/>
|
||||
<li>
|
||||
<a href="#{html:a/@id}"><xsl:value-of select="html:a/text()"/></a>
|
||||
<xsl:if test="count(./following-sibling::html:h3[preceding-sibling::html:h2[1] = $thish2 and count(html:a) = 1]) > 0">
|
||||
<ul>
|
||||
<xsl:for-each select="./following-sibling::html:h3[preceding-sibling::html:h2[1] = $thish2 and count(html:a) = 1]">
|
||||
<xsl:variable name="thish3" select="."/>
|
||||
<li>
|
||||
<a href="#{html:a/@id}"><xsl:value-of select="html:a/text()"/></a>
|
||||
<xsl:if test="count(./following-sibling::html:h4[preceding-sibling::html:h3[1] = $thish3 and count(html:a) = 1]) > 0">
|
||||
<ul>
|
||||
<xsl:for-each select="./following-sibling::html:h4[preceding-sibling::html:h3[1] = $thish3 and count(html:a) = 1]">
|
||||
<xsl:variable name="thish4" select="."/>
|
||||
<li>
|
||||
<a href="#{html:a/@id}"><xsl:value-of select="html:a/text()"/></a>
|
||||
<xsl:if test="count(./following-sibling::html:h5[preceding-sibling::html:h4[1] = $thish4 and count(html:a) = 1]) > 0">
|
||||
<ul>
|
||||
<xsl:for-each select="./following-sibling::html:h5[preceding-sibling::html:h4[1] = $thish4 and count(html:a) = 1]">
|
||||
<xsl:variable name="thish5" select="."/>
|
||||
<li>
|
||||
<a href="#{html:a/@id}"><xsl:value-of select="html:a/text()"/></a>
|
||||
<xsl:if test="count(./following-sibling::html:h6[preceding-sibling::html:h5[1] = $thish5 and count(html:a) = 1]) > 0">
|
||||
<ul>
|
||||
<xsl:for-each select="./following-sibling::html:h6[preceding-sibling::html:h5[1] = $thish5 and count(html:a) = 1]">
|
||||
<li>
|
||||
<a href="#{html:a/@id}"><xsl:value-of select="html:a/text()"/></a>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:if>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:if>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:if>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:if>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
|
||||
<!-- This is the master page structure -->
|
||||
<xsl:template match="/" mode="page">
|
||||
<xsl:param name="pagesrc"/>
|
||||
|
@ -423,7 +423,15 @@ print('''<?xml version="1.0" encoding="UTF-8"?>
|
||||
<body id="hvsupport">
|
||||
<h1>libvirt API support matrix</h1>
|
||||
|
||||
<ul id="toc"></ul>
|
||||
<nav class="contents" id="contents">
|
||||
<ul>
|
||||
''')
|
||||
|
||||
for grp in sorted(groups.keys()):
|
||||
print("<li><p><a href=\"#%s\">%s</a></p></li>" % (grp, groupheaders[grp]))
|
||||
|
||||
print('''</ul>
|
||||
</nav>
|
||||
|
||||
<p>
|
||||
This page documents which libvirt calls work on
|
||||
|
Loading…
Reference in New Issue
Block a user