[PATCH 1/9] docs: site: Don't generate '<?xml' header for HTML documents

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 docs/newapi.xsl | 7 +++----
 docs/site.xsl   | 5 +----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/docs/newapi.xsl b/docs/newapi.xsl
index d6f8d88170..38cefb2ca8 100644
--- a/docs/newapi.xsl
+++ b/docs/newapi.xsl
@@ -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"/>

@@ -811,8 +809,9 @@
       <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"/>
diff --git a/docs/site.xsl b/docs/site.xsl
index c0b56be72f..5a5fea2350 100644
--- a/docs/site.xsl
+++ b/docs/site.xsl
@@ -22,10 +22,7 @@
     <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">
-- 
2.43.0
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux