docs: Make anchors follow HTML5

According to HTML specification, <a name=''> works in HTML4, but
<a id=''> works in both HTML4 and HTML5. This is followed even in
docs/page.xsl where HTML bookmark links are generated only for
those anchors which have @id attribute.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Michal Privoznik 2019-08-27 17:21:32 +02:00
parent 0c67a11a4a
commit 648c11c04c
6 changed files with 23 additions and 23 deletions

View File

@ -89,7 +89,7 @@
separately. separately.
</p> </p>
<h2><a name='publicapi'>Defining the public API</a></h2> <h2><a id='publicapi'>Defining the public API</a></h2>
<p>The first task is to define the public API. If the new API <p>The first task is to define the public API. If the new API
involves an XML extension, you have to enhance the RelaxNG involves an XML extension, you have to enhance the RelaxNG
@ -119,7 +119,7 @@
rework it as you go through the process of implementing it. rework it as you go through the process of implementing it.
</p> </p>
<h2><a name='internalapi'>Defining the internal API</a></h2> <h2><a id='internalapi'>Defining the internal API</a></h2>
<p> <p>
Each public API call is associated with a driver, such as a host Each public API call is associated with a driver, such as a host
@ -146,7 +146,7 @@
provide a <code>NULL</code> stub for the new function. provide a <code>NULL</code> stub for the new function.
</p> </p>
<h2><a name='implpublic'>Implementing the public API</a></h2> <h2><a id='implpublic'>Implementing the public API</a></h2>
<p> <p>
Implementing the public API is largely a formality in which we wire up Implementing the public API is largely a formality in which we wire up
@ -179,7 +179,7 @@
<p><code>src/libvirt-$MODULE.c</code></p> <p><code>src/libvirt-$MODULE.c</code></p>
<h2><a name='remoteproto'>Implementing the remote protocol</a></h2> <h2><a id='remoteproto'>Implementing the remote protocol</a></h2>
<p> <p>
Implementing the remote protocol is essentially a Implementing the remote protocol is essentially a
@ -187,7 +187,7 @@
understood by referring to the existing code. understood by referring to the existing code.
</p> </p>
<h3><a name='wireproto'>Defining the wire protocol format</a></h3> <h3><a id='wireproto'>Defining the wire protocol format</a></h3>
<p> <p>
Defining the wire protocol involves making additions to: Defining the wire protocol involves making additions to:
@ -226,7 +226,7 @@
src/remote/remote_protocol.h src/remote/remote_protocol.h
</code></p> </code></p>
<h3><a name='rpcclient'>Implement the RPC client</a></h3> <h3><a id='rpcclient'>Implement the RPC client</a></h3>
<p> <p>
Implementing the RPC client uses the rpcgen generated .h files. Implementing the RPC client uses the rpcgen generated .h files.

View File

@ -6,14 +6,14 @@
<ul id="toc"></ul> <ul id="toc"></ul>
<h2><a name="description">Description</a></h2> <h2><a id="description">Description</a></h2>
<p> <p>
libvirt-dbus wraps libvirt API to provide a high-level object-oriented libvirt-dbus wraps libvirt API to provide a high-level object-oriented
API better suited for dbus-based applications. API better suited for dbus-based applications.
</p> </p>
<h2><a name="git">GIT source repository</a></h2> <h2><a id="git">GIT source repository</a></h2>
<p> <p>
The D-Bus bindings source code is maintained in a The D-Bus bindings source code is maintained in a
<a href="https://git-scm.com/">git</a> repository available on <a href="https://git-scm.com/">git</a> repository available on
@ -32,7 +32,7 @@ git clone https://libvirt.org/git/libvirt-dbus.git
<a href="https://libvirt.org/git/?p=libvirt-dbus.git">https://libvirt.org/git/?p=libvirt-dbus.git</a> <a href="https://libvirt.org/git/?p=libvirt-dbus.git">https://libvirt.org/git/?p=libvirt-dbus.git</a>
</pre> </pre>
<h2><a name="usage">Usage</a></h2> <h2><a id="usage">Usage</a></h2>
<p> <p>
libvirt-dbus exports libvirt API using D-Bus objects with methods and libvirt-dbus exports libvirt API using D-Bus objects with methods and

View File

@ -173,7 +173,7 @@
<xsl:template mode="details" match="struct"> <xsl:template mode="details" match="struct">
<xsl:variable name="name" select="string(@name)"/> <xsl:variable name="name" select="string(@name)"/>
<div class="refsect2" lang="en"> <div class="refsect2" lang="en">
<h3><a name="{$name}">Structure </a><xsl:value-of select="$name"/></h3> <h3><a id="{$name}">Structure </a><xsl:value-of select="$name"/></h3>
<pre class="programlisting"> <pre class="programlisting">
<xsl:value-of select="@type"/><xsl:text> { <xsl:value-of select="@type"/><xsl:text> {
</xsl:text> </xsl:text>
@ -214,7 +214,7 @@
<xsl:template mode="details" match="typedef[@type != 'enum']"> <xsl:template mode="details" match="typedef[@type != 'enum']">
<xsl:variable name="name" select="string(@name)"/> <xsl:variable name="name" select="string(@name)"/>
<div class="refsect2" lang="en"> <div class="refsect2" lang="en">
<h3><a name="{$name}">Typedef </a><xsl:value-of select="$name"/></h3> <h3><a id="{$name}">Typedef </a><xsl:value-of select="$name"/></h3>
<pre class="programlisting"> <pre class="programlisting">
<xsl:call-template name="dumptext"> <xsl:call-template name="dumptext">
<xsl:with-param name="text" select="string(@type)"/> <xsl:with-param name="text" select="string(@type)"/>
@ -236,7 +236,7 @@
<xsl:template mode="details" match="variable"> <xsl:template mode="details" match="variable">
<xsl:variable name="name" select="string(@name)"/> <xsl:variable name="name" select="string(@name)"/>
<div class="refsect2" lang="en"> <div class="refsect2" lang="en">
<h3><a name="{$name}">Variable </a><xsl:value-of select="$name"/></h3> <h3><a id="{$name}">Variable </a><xsl:value-of select="$name"/></h3>
<pre class="programlisting"> <pre class="programlisting">
<xsl:call-template name="dumptext"> <xsl:call-template name="dumptext">
<xsl:with-param name="text" select="string(@type)"/> <xsl:with-param name="text" select="string(@type)"/>
@ -258,7 +258,7 @@
<xsl:template mode="details" match="typedef[@type = 'enum']"> <xsl:template mode="details" match="typedef[@type = 'enum']">
<xsl:variable name="name" select="string(@name)"/> <xsl:variable name="name" select="string(@name)"/>
<div class="refsect2" lang="en"> <div class="refsect2" lang="en">
<h3><a name="{$name}">Enum </a><xsl:value-of select="$name"/></h3> <h3><a id="{$name}">Enum </a><xsl:value-of select="$name"/></h3>
<pre class="programlisting"> <pre class="programlisting">
<xsl:text>enum </xsl:text> <xsl:text>enum </xsl:text>
<a href="#{$name}"><xsl:value-of select="$name"/></a> <a href="#{$name}"><xsl:value-of select="$name"/></a>
@ -267,7 +267,7 @@
<xsl:for-each select="/api/symbols/enum[@type=$name]"> <xsl:for-each select="/api/symbols/enum[@type=$name]">
<xsl:sort select="@value" data-type="number" order="ascending"/> <xsl:sort select="@value" data-type="number" order="ascending"/>
<xsl:text> </xsl:text> <xsl:text> </xsl:text>
<a name="{@name}"><xsl:value-of select="@name"/></a> <a id="{@name}"><xsl:value-of select="@name"/></a>
<xsl:if test="@value"> <xsl:if test="@value">
<xsl:text> = </xsl:text> <xsl:text> = </xsl:text>
<xsl:value-of select="@value"/> <xsl:value-of select="@value"/>
@ -295,7 +295,7 @@
<xsl:template mode="details" match="macro"> <xsl:template mode="details" match="macro">
<xsl:variable name="name" select="string(@name)"/> <xsl:variable name="name" select="string(@name)"/>
<div class="refsect2" lang="en"> <div class="refsect2" lang="en">
<h3><a name="{$name}">Macro </a><xsl:value-of select="$name"/></h3> <h3><a id="{$name}">Macro </a><xsl:value-of select="$name"/></h3>
<pre class="programlisting"> <pre class="programlisting">
<xsl:text>#define </xsl:text> <xsl:text>#define </xsl:text>
<a href="#{$name}"><xsl:value-of select="$name"/></a> <a href="#{$name}"><xsl:value-of select="$name"/></a>
@ -342,7 +342,7 @@
<xsl:variable name="tlen" select="string-length(return/@type)"/> <xsl:variable name="tlen" select="string-length(return/@type)"/>
<xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/> <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
<div class="refsect2" lang="en"> <div class="refsect2" lang="en">
<h3><a name="{$name}"></a><xsl:value-of select="$name"/> ()</h3> <h3><a id="{$name}"></a><xsl:value-of select="$name"/> ()</h3>
<pre class="programlisting"> <pre class="programlisting">
<xsl:call-template name="dumptext"> <xsl:call-template name="dumptext">
<xsl:with-param name="text" select="return/@type"/> <xsl:with-param name="text" select="return/@type"/>
@ -419,7 +419,7 @@
<xsl:variable name="tlen" select="string-length(return/@type)"/> <xsl:variable name="tlen" select="string-length(return/@type)"/>
<xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/> <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
<div class="refsect2" lang="en"> <div class="refsect2" lang="en">
<h3><a name="{$name}"></a>Function type <xsl:value-of select="$name"/> </h3> <h3><a id="{$name}"></a>Function type <xsl:value-of select="$name"/> </h3>
<pre class="programlisting"> <pre class="programlisting">
<xsl:call-template name="dumptext"> <xsl:call-template name="dumptext">
<xsl:with-param name="text" select="return/@type"/> <xsl:with-param name="text" select="return/@type"/>

View File

@ -84,7 +84,7 @@ foreach my $object (sort { $a cmp $b } keys %perms) {
my $class = $class{$object}; my $class = $class{$object};
my $olink = lc "object_" . $object; my $olink = lc "object_" . $object;
print <<EOF; print <<EOF;
<h3><a name="$olink">$class</a></h3> <h3><a id="$olink">$class</a></h3>
<table class="acl"> <table class="acl">
<thead> <thead>
<tr> <tr>
@ -106,7 +106,7 @@ EOF
print <<EOF; print <<EOF;
<tr> <tr>
<td><a name="$plink">$perm</a></td> <td><a id="$plink">$perm</a></td>
<td>$description</td> <td>$description</td>
</tr> </tr>
EOF EOF

View File

@ -364,7 +364,7 @@ when it was removed is also mentioned (highlighted in
EOF EOF
foreach my $grp (sort { $a cmp $b } keys %groups) { foreach my $grp (sort { $a cmp $b } keys %groups) {
print "<h2><a name=\"$grp\">", $groupheaders{$grp}, "</a></h2>\n"; print "<h2><a id=\"$grp\">", $groupheaders{$grp}, "</a></h2>\n";
print <<EOF; print <<EOF;
<table class="top_table"> <table class="top_table">
<thead> <thead>

View File

@ -258,7 +258,7 @@
</xsl:call-template> </xsl:call-template>
</span> </span>
<xsl:text> </xsl:text> <xsl:text> </xsl:text>
<a name="{@name}"></a> <a id="{@name}"></a>
<xsl:value-of select="@name"/> <xsl:value-of select="@name"/>
<xsl:text> <xsl:text>
</xsl:text> </xsl:text>
@ -281,7 +281,7 @@
</xsl:call-template> </xsl:call-template>
</span> </span>
<xsl:text> </xsl:text> <xsl:text> </xsl:text>
<a name="{$name}"><xsl:value-of select="$name"/></a> <a id="{$name}"><xsl:value-of select="$name"/></a>
<xsl:text> <xsl:text>
</xsl:text> </xsl:text>
</xsl:otherwise> </xsl:otherwise>
@ -320,7 +320,7 @@
<xsl:for-each select="/api/symbols/enum[@type = $name]"> <xsl:for-each select="/api/symbols/enum[@type = $name]">
<xsl:sort select="@value" data-type="number" order="ascending"/> <xsl:sort select="@value" data-type="number" order="ascending"/>
<tr> <tr>
<td><a name="{@name}"><xsl:value-of select="@name"/></a></td> <td><a id="{@name}"><xsl:value-of select="@name"/></a></td>
<td><xsl:text> = </xsl:text></td> <td><xsl:text> = </xsl:text></td>
<xsl:choose> <xsl:choose>
<xsl:when test="@info != ''"> <xsl:when test="@info != ''">