add xml:id attributes wherever we generate the IDs (old patch saved up)
diff --git a/Doc/perl/l2hinit.perl b/Doc/perl/l2hinit.perl
index 106a74e..c2e76c7 100644
--- a/Doc/perl/l2hinit.perl
+++ b/Doc/perl/l2hinit.perl
@@ -246,7 +246,7 @@
sub top_navigation_panel() {
- return "\n<div id='top-navigation-panel'>\n"
+ return "\n<div id='top-navigation-panel' xml:id='top-navigation-panel'>\n"
. make_nav_panel()
. "<hr /></div>\n";
}
diff --git a/Doc/perl/python.perl b/Doc/perl/python.perl
index d2466b1..c7f2ffb 100644
--- a/Doc/perl/python.perl
+++ b/Doc/perl/python.perl
@@ -358,7 +358,7 @@
# Save the reference
my $nstr = gen_index_id("Python Enhancement Proposals!PEP $rfcnumber", '');
$index{$nstr} .= make_half_href("$CURRENT_FILE#$id");
- return ("<a class=\"rfc\" id='$id'\n"
+ return ("<a class=\"rfc\" id='$id' xml:id='$id'\n"
. "href=\"$href\">PEP $rfcnumber$icon</a>" . $_);
}
@@ -371,7 +371,7 @@
# Save the reference
my $nstr = gen_index_id("RFC!RFC $rfcnumber", '');
$index{$nstr} .= make_half_href("$CURRENT_FILE#$id");
- return ("<a class=\"rfc\" id='$id'\nhref=\"$href\">"
+ return ("<a class=\"rfc\" id='$id' xml:id='$id'\nhref=\"$href\">"
. "RFC $rfcnumber$icon</a>" . $_);
}
@@ -525,14 +525,14 @@
sub new_link_name_info(){
my $name = "l2h-" . ++$globals{'max_id'};
- my $aname = "<a id='$name'>";
+ my $aname = "<a id='$name' xml:id='$name'>";
my $ahref = gen_link($CURRENT_FILE, $name);
return ($name, $ahref);
}
sub new_link_info(){
my($name, $ahref) = new_link_name_info();
- my $aname = "<a id='$name'>";
+ my $aname = "<a id='$name' xml:id='$name'>";
return ($name, $aname, $ahref);
}
@@ -762,11 +762,11 @@
add_index_entry($str, $ahref);
if ($str =~ /^<[a-z]+\b/) {
my $s = "$str";
- $s =~ s/^<([a-z]+)\b/<$1 id='$name'/;
+ $s =~ s/^<([a-z]+)\b/<$1 id='$name' xml:id='$name'/;
return $s;
}
else {
- return "<a id='$name'>$str</a>";
+ return "<a id='$name' xml:id='$name'>$str</a>";
}
}
@@ -844,7 +844,7 @@
}
$TokenToTargetMapping{"$CURRENT_GRAMMAR:$token"} = $target;
return ("<tr valign=\"baseline\">\n"
- . " <td><code><a id='tok-$token'>"
+ . " <td><code><a id='tok-$token' xml:id='tok-$token'>"
. "$token</a></code></td>\n"
. " <td> ::= </td>\n"
. " <td><code>"