[Po4a-devel] Xml strips comments?
Yves Rutschle
debian.anti-spam at rutschle.net
Wed Jun 7 06:06:56 UTC 2006
On Tue, Jun 06, 2006 at 10:10:57AM +0200, Nicolas François wrote:
> I think the comments are removed since 0.22 (changelog entry: "Do not break
> paragraphs on comments, just remove them.").
>
Ah, because we don't want:
<h1>
Blah blah <!-- hello --> blah
</h1>
cut into 2 msgstr. I didn't think of that.
> Another solution would be to remove the comments from the translated
> string, but to keep them in a string or array, and to write them back in
> the generated file during pushline (the Man module does this; it works,
> but the comments may not be always placed at the exact same place).
Ok, that should be fine for me (my SSI statements are
typically within their own block) but I can see potential
problems with this solution, considering SSI is not _really_
comments, e.g.:
<h1>
The temperature today is <!--#include virtual="temp.cgi" -->
degrees.
</h1>
In such a statement, we'd want the comment to be fed through
inside the msgstr like an inline tag.
I'm guessing the best way to go about that would be to
consider <!--# --> as not being a comment, but I'm afraid
this would be rather dirty in the Xml code. I'll look at it
tonight if I get some time.
An alternative might be to remove all SSI and replace it
with PHP or something like that, but that's a bit like using
a hammer to kill a bacteria :-)
> BTW, there is now an IRC channel #po4a at freenode
> (The mailing list is just fine; it is just to inform you).
Ok.
Thanks for your time,
Y.
More information about the Po4a-devel
mailing list