]> git.pld-linux.org Git - packages/docbook-style-dsssl.git/blob - docbook-style-dsssl-seealso.spec
- fix collateindex.pl's seealso handling (patch from rawhide).
[packages/docbook-style-dsssl.git] / docbook-style-dsssl-seealso.spec
1 --- docbook-dsssl-1.76/bin/collateindex.pl.seealso      2002-02-21 00:14:36.000000000 +0000
2 +++ docbook-dsssl-1.76/bin/collateindex.pl      2002-05-03 08:27:25.000000000 +0100
3 @@ -337,6 +337,7 @@
4  $first = 1;     # this is the first one
5  $group = "";    # we're not in a group yet
6  $lastout = "";  # we've not put anything out yet
7 +@seealsos = (); # See also stack.
8  
9  foreach $idx (@term) {
10      next if $idx->{'startref'}; # no way to represent spans...
11 @@ -396,6 +397,12 @@
12  
13         print OUT "\n  </$lastout>\n" if $lastout;
14  
15 +       foreach (@seealsos) {
16 +           # it'd be nice to make this a link...
17 +           print OUT $indent, "  <seealsoie>", &escape($_), "</seealsoie>\n";
18 +       }
19 +       @seealsos = ();
20 +
21         print OUT "  <secondaryie>", $idx->{'secondary'};
22         $lastout = "secondaryie";
23         if ($idx->{'tertiary'}) {
24 @@ -408,6 +415,12 @@
25  
26         print OUT "\n  </$lastout>\n" if $lastout;
27  
28 +       foreach (@seealsos) {
29 +           # it'd be nice to make this a link...
30 +           print OUT $indent, "  <seealsoie>", &escape($_), "</seealsoie>\n";
31 +       }
32 +       @seealsos = ();
33 +
34         if ($idx->{'tertiary'}) {
35             print OUT "  <tertiaryie>", $idx->{'tertiary'};
36             $lastout = "tertiaryie";
37 @@ -507,6 +520,13 @@
38  sub end_entry {
39      # End any open elements...
40      print OUT "\n  </$lastout>\n" if $lastout;
41 +
42 +    foreach (@seealsos) {
43 +       # it'd be nice to make this a link...
44 +       print OUT $indent, "  <seealsoie>", &escape($_), "</seealsoie>\n";
45 +    }
46 +    @seealsos = ();
47 +
48      print OUT "</indexentry>\n\n";
49      $lastout = "";
50  }
51 @@ -569,12 +589,7 @@
52      }
53  
54      if ($idx->{'seealso'}) {
55 -       # it'd be nice to make this a link...
56 -       if ($lastout) {
57 -           print OUT "\n  </$lastout>\n";
58 -           $lastout = "";
59 -       }
60 -       print OUT $indent, "<seealsoie>", &escape($idx->{'seealso'}), "</seealsoie>\n";
61 +       push @seealsos, $idx->{'seealso'};
62      }
63  }
64  
This page took 0.040208 seconds and 3 git commands to generate.