[Po4a-devel]Re: [Po4a-commits] po4a/lib/Locale/Po4a Sgml.pm,1.34,1.35

Martin Quinson mquinson@ens-lyon.fr
Sat, 14 Aug 2004 21:43:29 -0700


--EXKGNeO8l0xGFBjy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Aug 14, 2004 at 11:48:18PM +0000, Martin Quinson wrote:
>=20
> Modified Files:
> 	Sgml.pm=20
> Log Message:
> attempt to fix the references, but I suspect nsgml to mess around with the
> strings, like eating silencly 'unimportant' white chars=20

That's very strange. When I enable the debug, the references are correct,
ie, the line pointed by the reference of the generated file and the line
pointed by the reference of the original file do match. But then, the
reference which lands in the po file does not match.=20

It looks like a few '\n' are not seen by po4a. Indeed, it takes the
reference which it should have taken a few lines before. So, I guess that
nsgmls takes the liberty to remove some \n where they are not mandatory.

I have no idea.=20

I guess we should try to extract the reference recomputation and file
inclusion out of Sgml.pm to TransTractor, and see if the problem still
occure in Xml.pm, for example.

The prototype of the function in TT should be:

includefile($pre,$filename,$post);

so that "bliblu<include href=3D"toto"/>blobla" can be dealt with properly.

The action would be to open the file in a @variable, generate the
corresponding references ("refinmainfile:33 refinnewfile:44", first one=3Dr=
ef
at which we found the inclusion request, second naturally incrementing the
line number), and then unshiftline() all lines (begining with the last one)
of the @variable into the document.

The reference issue would also disappear since the stuff before the
inclusion is already eaten when includefile is called, and since we
unshiftline the stuff, we cannot mess with what comes afterward. We only
have to generate the right ref for the included file, which is trivial.

Bye, Mt.

--=20
If thy header files fail to declare the return types of thy library
functions, thou shalt declare them thyself with the most meticulous care,
lest grievous harm befall thy program.
  -- Fourth commandment of the C programmer

--EXKGNeO8l0xGFBjy
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBHunwSJAMsfOxudIRAiD+AJ9f2xHTZ2hqiHMmxEgh1j3+IBs03wCfZFqj
Hyu7wgSycw7TkZHTsZAA1XQ=
=Ak9o
-----END PGP SIGNATURE-----

--EXKGNeO8l0xGFBjy--