]> xenbits.xensource.com Git - libvirt.git/commitdiff
docs: xsl: Properly propagate 'href_base' as XSL template parameter
authorPeter Krempa <pkrempa@redhat.com>
Wed, 7 Feb 2024 16:30:55 +0000 (17:30 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 8 Feb 2024 15:48:47 +0000 (16:48 +0100)
Propagate it as a parameter both from site.xsl and from newapi.xsl, the
latter of which declared it as a variable.

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

index e2758ed177ab358f594bcb9ab4a97c061360e367..abb4fcf72a636227b3c24c77a14418f80085d602 100644 (file)
@@ -27,6 +27,7 @@ index_api_gen = custom_target(
     xsltproc_prog, '--nonet', '-o', docs_builddir,
     '--stringparam', 'builddir', meson.project_build_root(),
     '--stringparam', 'timestamp', docs_timestamp,
+    '--stringparam', 'href_base', '../',
     '@INPUT@',
   ],
   install: true,
@@ -53,6 +54,7 @@ foreach name : [ 'admin', 'lxc', 'qemu' ]
       xsltproc_prog, '--nonet', '-o', docs_builddir,
       '--stringparam', 'builddir', meson.project_build_root(),
       '--stringparam', 'timestamp', docs_timestamp,
+      '--stringparam', 'href_base', '../',
       '@INPUT@',
     ],
     install: true,
index 19a440bb09ba847587bc16c518f6c662426d4dd0..ebe7fdedd71850fa6a4336e57a028c25a81b3481 100644 (file)
@@ -24,7 +24,6 @@
 
   <!-- the target directory for the HTML output -->
   <xsl:variable name="htmldir">html</xsl:variable>
-  <xsl:variable name="href_base">../</xsl:variable>
 
   <xsl:template name="aclinfo">
     <xsl:param name="acl"/>
         encoding="UTF-8">
         <xsl:apply-templates select="exsl:node-set($subpage)" mode="page">
           <xsl:with-param name="timestamp" select="$timestamp"/>
+          <xsl:with-param name="href_base" select="$href_base"/>
         </xsl:apply-templates>
       </xsl:document>
     </xsl:for-each>
index e2f0092ae902a3c7888419488fd4a4cd8ff501b1..5d55fac43fea60d0beb79be68e1d04996f92be7a 100644 (file)
@@ -17,6 +17,7 @@
   <xsl:template match="/" mode="page">
     <xsl:param name="pagesrc"/>
     <xsl:param name="timestamp"/>
+    <xsl:param name="href_base"/>
     <xsl:text disable-output-escaping="yes">&lt;!DOCTYPE html&gt;
 </xsl:text>
     <html data-sourcedoc="{$pagesrc}">