Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0c1b253

Browse files
committed
add xml:id attributes wherever we generate the IDs (old patch saved up)
1 parent 048840c commit 0c1b253

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

Doc/perl/l2hinit.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ ()
246246

247247

248248
sub top_navigation_panel() {
249-
return "\n<div id='top-navigation-panel'>\n"
249+
return "\n<div id='top-navigation-panel' xml:id='top-navigation-panel'>\n"
250250
. make_nav_panel()
251251
. "<hr /></div>\n";
252252
}

Doc/perl/python.perl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ sub do_cmd_pep{
358358
# Save the reference
359359
my $nstr = gen_index_id("Python Enhancement Proposals!PEP $rfcnumber", '');
360360
$index{$nstr} .= make_half_href("$CURRENT_FILE#$id");
361-
return ("<a class=\"rfc\" id='$id'\n"
361+
return ("<a class=\"rfc\" id='$id' xml:id='$id'\n"
362362
. "href=\"$href\">PEP $rfcnumber$icon</a>" . $_);
363363
}
364364

@@ -371,7 +371,7 @@ sub do_cmd_rfc{
371371
# Save the reference
372372
my $nstr = gen_index_id("RFC!RFC $rfcnumber", '');
373373
$index{$nstr} .= make_half_href("$CURRENT_FILE#$id");
374-
return ("<a class=\"rfc\" id='$id'\nhref=\"$href\">"
374+
return ("<a class=\"rfc\" id='$id' xml:id='$id'\nhref=\"$href\">"
375375
. "RFC $rfcnumber$icon</a>" . $_);
376376
}
377377

@@ -525,14 +525,14 @@ ($$)
525525

526526
sub new_link_name_info(){
527527
my $name = "l2h-" . ++$globals{'max_id'};
528-
my $aname = "<a id='$name'>";
528+
my $aname = "<a id='$name' xml:id='$name'>";
529529
my $ahref = gen_link($CURRENT_FILE, $name);
530530
return ($name, $ahref);
531531
}
532532

533533
sub new_link_info(){
534534
my($name, $ahref) = new_link_name_info();
535-
my $aname = "<a id='$name'>";
535+
my $aname = "<a id='$name' xml:id='$name'>";
536536
return ($name, $aname, $ahref);
537537
}
538538

@@ -762,11 +762,11 @@ ($)
762762
add_index_entry($str, $ahref);
763763
if ($str =~ /^<[a-z]+\b/) {
764764
my $s = "$str";
765-
$s =~ s/^<([a-z]+)\b/<$1 id='$name'/;
765+
$s =~ s/^<([a-z]+)\b/<$1 id='$name' xml:id='$name'/;
766766
return $s;
767767
}
768768
else {
769-
return "<a id='$name'>$str</a>";
769+
return "<a id='$name' xml:id='$name'>$str</a>";
770770
}
771771
}
772772

@@ -844,7 +844,7 @@ sub do_cmd_production{
844844
}
845845
$TokenToTargetMapping{"$CURRENT_GRAMMAR:$token"} = $target;
846846
return ("<tr valign=\"baseline\">\n"
847-
. " <td><code><a id='tok-$token'>"
847+
. " <td><code><a id='tok-$token' xml:id='tok-$token'>"
848848
. "$token</a></code></td>\n"
849849
. " <td>&nbsp;::=&nbsp;</td>\n"
850850
. " <td><code>"

0 commit comments

Comments
 (0)