mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
docs: xsl: Simplify templating XSL
Wrap the auto-generated pages (API ref and hvsupport.html) in the proper top level element similarly to what the pages generated from RST have to remove the extra case when templating our web. (Best viewed with 'git show -w') Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
f11c773014
commit
5ee27c37e6
@ -733,6 +733,7 @@
|
||||
</xsl:text>
|
||||
<html>
|
||||
<body>
|
||||
<div class="document">
|
||||
<h1><xsl:value-of select="$title"/></h1>
|
||||
<xsl:call-template name="description"/>
|
||||
<h2>Table of Contents</h2>
|
||||
@ -781,6 +782,7 @@
|
||||
<xsl:sort select='@symbol'/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
@ -73,17 +73,6 @@
|
||||
<xsl:when test="html:html/html:body/html:main">
|
||||
<xsl:apply-templates select="/html:html/html:body/*" mode="content"/>
|
||||
</xsl:when>
|
||||
<!-- for our older html-only files -->
|
||||
<xsl:otherwise>
|
||||
<div class="document">
|
||||
<xsl:if test="html:html/html:body/@id">
|
||||
<xsl:attribute name="id">
|
||||
<xsl:value-of select="html:html/html:body/@id"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="/html:html/html:body/*" mode="content"/>
|
||||
</div>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
<div id="nav">
|
||||
|
@ -450,7 +450,8 @@ for drv in list(drivers.keys()):
|
||||
print('''<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<body id="hvsupport">
|
||||
<body>
|
||||
<div id="hvsupport" class="document">
|
||||
<h1>libvirt API support matrix</h1>
|
||||
|
||||
<nav class="contents" id="contents">
|
||||
@ -536,4 +537,4 @@ for grp in sorted(groups.keys()):
|
||||
|
||||
print("</tbody>\n</table>")
|
||||
|
||||
print("</body>\n</html>")
|
||||
print("</div>\n</body>\n</html>")
|
||||
|
Loading…
Reference in New Issue
Block a user