]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
docs: XSL: Add source document name as custom data attribute for <html>
authorPeter Krempa <pkrempa@redhat.com>
Tue, 14 Feb 2023 10:59:22 +0000 (11:59 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 15 Feb 2023 11:38:45 +0000 (12:38 +0100)
The html standard allows custom data attributes on any element in the
format of 'data-*' which are not interpreted. We can use it to embed the
name of the source document used to generate the page so that our
checker tools can use the friendly name.

https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
docs/page.xsl

index 548d5a11c4999e3f2ec8dbe6773586726e7e8dbb..20b49d1afd4c48979d6e118632d1c42f8cfc7e90 100644 (file)
@@ -80,7 +80,7 @@
     <xsl:param name="timestamp"/>
     <xsl:text disable-output-escaping="yes">&lt;!DOCTYPE html&gt;
 </xsl:text>
-    <html>
+    <html data-sourcedoc="{$pagesrc}">
       <xsl:comment>
         This file is autogenerated from <xsl:value-of select="$pagesrc"/>
         Do not edit this file. Changes will be lost.