Strip down the main template as much as possible.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
docs/page.xsl | 14 --------------
docs/site.xsl | 14 ++++++++++++++
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/docs/page.xsl b/docs/page.xsl
index 04d7cc9432..e2f0092ae9 100644
--- a/docs/page.xsl
+++ b/docs/page.xsl
@@ -7,18 +7,12 @@
exclude-result-prefixes="xsl exsl html"
version="1.0">
- <xsl:param name="builddir" select="'..'"/>
-
<xsl:template match="node() | @*" mode="content">
<xsl:copy>
<xsl:apply-templates select="node() | @*"
mode="content"/>
</xsl:copy>
</xsl:template>
- <xsl:template match="html:div[@id='include']"
mode="content">
- <xsl:call-template name="include"/>
- </xsl:template>
-
<!-- This is the master page structure -->
<xsl:template match="/" mode="page">
<xsl:param name="pagesrc"/>
@@ -125,14 +119,6 @@
</html>
</xsl:template>
- <xsl:template name="include">
- <xsl:variable name="inchtml">
- <xsl:copy-of select="document(concat($builddir, '/docs/',
@filename))"/>
- </xsl:variable>
-
- <xsl:apply-templates
select="exsl:node-set($inchtml)/html:html/html:body/*"
mode="content"/>
- </xsl:template>
-
<xsl:template match="html:h1 | html:h2 | html:h3 | html:h4 | html:h5 |
html:h6" mode="content">
<xsl:element name="{name()}">
<xsl:apply-templates mode="copy" />
diff --git a/docs/site.xsl b/docs/site.xsl
index f56eb67b8a..0c11619fea 100644
--- a/docs/site.xsl
+++ b/docs/site.xsl
@@ -8,6 +8,20 @@
<xsl:import href="page.xsl"/>
+ <xsl:param name="builddir" select="'..'"/>
+
+ <xsl:template match="html:div[@id='include']"
mode="content">
+ <xsl:call-template name="include"/>
+ </xsl:template>
+
+ <xsl:template name="include">
+ <xsl:variable name="inchtml">
+ <xsl:copy-of select="document(concat($builddir, '/docs/',
@filename))"/>
+ </xsl:variable>
+
+ <xsl:apply-templates
select="exsl:node-set($inchtml)/html:html/html:body/*"
mode="content"/>
+ </xsl:template>
+
<xsl:output
method="xml"
encoding="UTF-8"
--
2.43.0