diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2017-07-26 18:01:25 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2017-08-02 17:00:11 +0100 |
commit | b1c81567c7172bc9dcd701cf46ea3f87725d62c7 (patch) | |
tree | 7e326dfdf7bc45bca065d0a133ce5c2755b1602e /docs/newapi.xsl | |
parent | 8dace0f02f217e2b35f8184c7f65d07e063ba73b (diff) | |
download | libvirt-b1c81567c7172bc9dcd701cf46ea3f87725d62c7.tar.gz |
docs: switch to using HTML5 doctype declaration
The HTML5 doctype is simply
<!DOCTYPE html>
no DTD is present because HTML5 is no longer defined as an
extension of SGML.
XSL has no way to natively output a doctype without a public
or system identifier, so we have to use an <xsl:text> hack
instead.
See also
https://dev.w3.org/html5/html-author/#doctype-declaration
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'docs/newapi.xsl')
-rw-r--r-- | docs/newapi.xsl | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/docs/newapi.xsl b/docs/newapi.xsl index d45bfc192d..b29bbcd52b 100644 --- a/docs/newapi.xsl +++ b/docs/newapi.xsl @@ -17,10 +17,7 @@ <!-- Import the main part of the site stylesheets --> <xsl:import href="page.xsl"/> - <!-- Generate XHTML-1.0 transitional --> - <xsl:output method="xml" encoding="UTF-8" indent="yes" - doctype-public="-//W3C//DTD XHTML 1.0//EN" - doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/> + <xsl:output method="xml" encoding="UTF-8" indent="yes"/> <!-- Build keys for all symbols --> <xsl:key name="symbols" match="/api/symbols/*" use="@name"/> @@ -737,6 +734,8 @@ <xsl:template match="file"> <xsl:variable name="name" select="@name"/> <xsl:variable name="title">Module <xsl:value-of select="$name"/> from <xsl:value-of select="/api/@name"/></xsl:variable> + <xsl:text disable-output-escaping="yes"><!DOCTYPE html> +</xsl:text> <html> <body> <h1><xsl:value-of select="$title"/></h1> @@ -794,6 +793,8 @@ <xsl:template name="mainpage"> <xsl:variable name="title">Reference Manual for <xsl:value-of select="/api/@name"/></xsl:variable> + <xsl:text disable-output-escaping="yes"><!DOCTYPE html> +</xsl:text> <html> <body> <h1><xsl:value-of select="$title"/></h1> @@ -813,9 +814,7 @@ <xsl:document href="{concat($htmldir, '/index.html')}" method="xml" - encoding="UTF-8" - doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" - doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + encoding="UTF-8"> <xsl:apply-templates select="exsl:node-set($mainpage)" mode="page"> <xsl:with-param name="pagename" select="concat($htmldir, '/index.html')"/> <xsl:with-param name="timestamp" select="$timestamp"/> @@ -830,9 +829,7 @@ <xsl:document href="{concat($htmldir, '/libvirt-', @name, '.html')}" method="xml" - encoding="UTF-8" - doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" - doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + encoding="UTF-8"> <xsl:apply-templates select="exsl:node-set($subpage)" mode="page"> <xsl:with-param name="pagename" select="concat($htmldir, '/libvirt-', @name, '.html')"/> <xsl:with-param name="timestamp" select="$timestamp"/> |