]> xenbits.xensource.com Git - libvirt.git/commitdiff
docs: site: Don't generate '<?xml' header for HTML documents
authorPeter Krempa <pkrempa@redhat.com>
Thu, 29 Feb 2024 09:39:29 +0000 (10:39 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 1 Mar 2024 11:51:55 +0000 (12:51 +0100)
Skip the XML header as it's invalid with <!DOCTYPE HTML> both for the
RST-generated pages and for the API docs generated from the API XML.

Additionally remove the spurious xsl:output directive from newapi.xsl
which is ignored and thus misleading.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
docs/newapi.xsl
docs/site.xsl

index d6f8d8817061009c32e7acbdefd8d66855850c1b..38cefb2ca8f5381939990c8defe6c78b0c27cae3 100644 (file)
@@ -17,8 +17,6 @@
   <!-- Import the main part of the site stylesheets -->
   <xsl:import href="page.xsl"/>
 
-  <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
-
   <!-- Build keys for all symbols -->
   <xsl:key name="symbols" match="/api/symbols/*" use="@name"/>
 
       <xsl:document
         href="{concat($htmldir, '/libvirt-', @name, '.html')}"
         method="xml"
-        indent="yes"
-        encoding="UTF-8">
+        omit-xml-declaration="yes"
+        encoding="UTF-8"
+        indent="yes">
         <xsl:apply-templates select="exsl:node-set($subpage)" mode="page">
           <xsl:with-param name="timestamp" select="$timestamp"/>
           <xsl:with-param name="link_href_base" select="$href_base"/>
index c0b56be72f4fb1d601bf73b51a46155e95806c92..5a5fea23501d48259097c9c563dc0d03dbef9134 100644 (file)
     <xsl:apply-templates select="exsl:node-set($inchtml)/html:html/html:body/*" mode="content"/>
   </xsl:template>
 
-  <xsl:output
-    method="xml"
-    encoding="UTF-8"
-    indent="yes"/>
+  <xsl:output method="xml" omit-xml-declaration="yes" encoding="UTF-8" indent="yes"/>
 
   <xsl:template match="/">
     <xsl:apply-templates select="." mode="page">