]> xenbits.xensource.com Git - libvirt.git/commitdiff
docs: Move 'html including' from page.xsl to site.xsl
authorPeter Krempa <pkrempa@redhat.com>
Wed, 7 Feb 2024 14:08:16 +0000 (15:08 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 8 Feb 2024 15:48:47 +0000 (16:48 +0100)
Strip down the main template as much as possible.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
docs/page.xsl
docs/site.xsl

index 04d7cc94328e5f549522e77fec20081afeb67da1..e2f0092ae902a3c7888419488fd4a4cd8ff501b1 100644 (file)
@@ -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"/>
     </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" />
index f56eb67b8a5fc5ece2cbbb0c0d6d80d6710e1428..0c11619feaf210ebff31c422d3abdd7bda280148 100644 (file)
@@ -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"