Commit 5449bc94 authored by Pavel Pisa's avatar Pavel Pisa Committed by Linus Torvalds

[PATCH] DocBook/HTML: correction of recursive A tags in HTML output

The malformed HTML was generated after switch to XSLTPROC
from SGML tools. The reference title

  <refentrytitle><phrase id="API-struct-x">struct x</phrase></refentrytitle>

is converted into two recursive <a> tags

  <a href="re02.html"><span><a id="API-struct-x"></a>struct x</span></a>

There is more possible solutions for this problem.
One can be found at

  http://darkk.livejournal.com/

The proposed solution is based on suggestion provided by Jiri Kosek.
Signed-off-by: default avatarPavel Pisa <pisa@cmp.felk.cvut.cz>
Acked-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 460e79c3
......@@ -583,14 +583,14 @@ sub output_function_xml(%) {
$id = "API-".$args{'function'};
$id =~ s/[^A-Za-z0-9]/-/g;
print "<refentry>\n";
print "<refentry id=\"$id\">\n";
print "<refentryinfo>\n";
print " <title>LINUX</title>\n";
print " <productname>Kernel Hackers Manual</productname>\n";
print " <date>$man_date</date>\n";
print "</refentryinfo>\n";
print "<refmeta>\n";
print " <refentrytitle><phrase id=\"$id\">".$args{'function'}."</phrase></refentrytitle>\n";
print " <refentrytitle><phrase>".$args{'function'}."</phrase></refentrytitle>\n";
print " <manvolnum>9</manvolnum>\n";
print "</refmeta>\n";
print "<refnamediv>\n";
......@@ -659,14 +659,14 @@ sub output_struct_xml(%) {
$id = "API-struct-".$args{'struct'};
$id =~ s/[^A-Za-z0-9]/-/g;
print "<refentry>\n";
print "<refentry id=\"$id\">\n";
print "<refentryinfo>\n";
print " <title>LINUX</title>\n";
print " <productname>Kernel Hackers Manual</productname>\n";
print " <date>$man_date</date>\n";
print "</refentryinfo>\n";
print "<refmeta>\n";
print " <refentrytitle><phrase id=\"$id\">".$args{'type'}." ".$args{'struct'}."</phrase></refentrytitle>\n";
print " <refentrytitle><phrase>".$args{'type'}." ".$args{'struct'}."</phrase></refentrytitle>\n";
print " <manvolnum>9</manvolnum>\n";
print "</refmeta>\n";
print "<refnamediv>\n";
......@@ -743,14 +743,14 @@ sub output_enum_xml(%) {
$id = "API-enum-".$args{'enum'};
$id =~ s/[^A-Za-z0-9]/-/g;
print "<refentry>\n";
print "<refentry id=\"$id\">\n";
print "<refentryinfo>\n";
print " <title>LINUX</title>\n";
print " <productname>Kernel Hackers Manual</productname>\n";
print " <date>$man_date</date>\n";
print "</refentryinfo>\n";
print "<refmeta>\n";
print " <refentrytitle><phrase id=\"$id\">enum ".$args{'enum'}."</phrase></refentrytitle>\n";
print " <refentrytitle><phrase>enum ".$args{'enum'}."</phrase></refentrytitle>\n";
print " <manvolnum>9</manvolnum>\n";
print "</refmeta>\n";
print "<refnamediv>\n";
......@@ -809,14 +809,14 @@ sub output_typedef_xml(%) {
$id = "API-typedef-".$args{'typedef'};
$id =~ s/[^A-Za-z0-9]/-/g;
print "<refentry>\n";
print "<refentry id=\"$id\">\n";
print "<refentryinfo>\n";
print " <title>LINUX</title>\n";
print " <productname>Kernel Hackers Manual</productname>\n";
print " <date>$man_date</date>\n";
print "</refentryinfo>\n";
print "<refmeta>\n";
print " <refentrytitle><phrase id=\"$id\">typedef ".$args{'typedef'}."</phrase></refentrytitle>\n";
print " <refentrytitle><phrase>typedef ".$args{'typedef'}."</phrase></refentrytitle>\n";
print " <manvolnum>9</manvolnum>\n";
print "</refmeta>\n";
print "<refnamediv>\n";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment