[Po4a-devel]Are reference of composite sgml files now fixed?

Jordi Vilalta jvprat@wanadoo.es
Sat, 24 Jul 2004 15:18:47 +0200 (CEST)


On Tue, 20 Jul 2004, Martin Quinson wrote:
> Hello, 
> 
> I suspect that the bug #300589 on alioth is now fixed by this change:
> 
> po4a (0.16.4-1) unstable; urgency=low
> [...]
>   Jordi Vilalta
>   [...]
>     * [TransTractor.pm] Fix a by one offset in the line number reference
> 
> 
> Could someone check that? I have no composite document at hand (file
> including files).
> 
> 
> The question is to know whether the reference (file:line stuff in the
> comments) is right even if there is some included files. In perticular, the
> content of the included file may well suffer of a -1 offset:
> 
> [Sgml.pm]
>     # Prepare the reference indirection stuff
>     my @refs;
>     my @lines = split(/\n/, $origfile);
>     for (my $i=0; $i<scalar @lines; $i++) {
>         push @refs,"$filename:$i";
>     }
>     
> We may want to push "$filename:".($i+1);
> 
> Then, the rest of the file after the include may also suffer from an offset,
> not sure about that.

It isn't fixed. There's something more than a line number offset. It seems 
like it takes the wrong reference (maybe the reference to the next line, 
instead to the current one's). I've attached some test files in the alioth 
bug to test it.

Regards,

Jordi Vilalta