Bug 90294 - poxml: xml2pot chokes on comments containing two tags
Summary: poxml: xml2pot chokes on comments containing two tags
Status: CONFIRMED
Alias: None
Product: i18n
Classification: Translations
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Astals Cid
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-27 00:22 UTC by Frans Pop
Modified: 2021-03-09 06:25 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frans Pop 2004-09-27 00:22:31 UTC
Version:            (using KDE KDE 3.2.3)
Installed from:    Debian testing/unstable Packages
OS:                Linux

If I run xml2pot on the xml fragment pasted below, there is no output.
If, however I run xmllint on the same fragment, no errors are reported.

The problem seems to be caused by the fact that there are 2 'tags' embedded in a comment.

When split2po is run on an original fragment and a translated fragment containing the same comment, there is no output as well. However, I have not researched if that is caused by the original file, the translated file or both.


<!-- Start of xml fragment -->
<chapter id="boot-installer"><title>Booting the Installation System</title>

 <sect1><title>Booting the Installer on Intel 386</title>

<!-- we use <screen> instead of <userinput> in this list -->

 </sect1>

</chapter>
<!-- End of xml fragment -->

TIA,
Frans Pop
Comment 1 Nicolas Goutte 2005-10-28 02:05:42 UTC
I can confirm that the bug is still in KDE 3.5.x.

The bug only happens when the tags are part of the ones that the code knows. (With arbitrary tags, the bug does not seem to show.)

There does not even to be 2 tags, a single one is enough to trigger the bug.

As for fixing the bug, I have not found the exact reason yet. Also it might to be a too big change so close before KDE 3.5.

Have a nice day!
Comment 2 Nicolas Goutte 2005-12-06 09:46:56 UTC
I have finally found the reason for the bug. (Yes, finally!)

The problem is that <screen> is considered to be a "literal" tag by the xml2pot script. So it gets a special treatment, but this code is not respecting comments. :-(

However I do not know how to easily fix it.

Have a nice day!
Comment 3 Marek Laane 2007-07-01 23:40:23 UTC
Still valid? Or too complicate to be fixed?
Comment 4 Stephan Kulow 2007-07-02 09:43:28 UTC
I do not really have interest in fixing bugs that are easily worked around by removing the <> around screen. But someone else might have
Comment 5 Frans Pop 2007-07-02 10:14:20 UTC
The use case behind this issue is that sometimes we wish to temporarily disable some section of a text in it's entirety, including any tags it contains.

If this is a longer section of text, it would be a pain to have to change all the tags included in the section (and to have to change them back again when the text is to be reenabled).

I understand from other comments that <screen> may be a special case, but from a user point of view it is not clear if that is the only special case or if there are possibly others.

A generic solution within poxml would really be very welcome (whether created by Stephan or someone else).

Cheers,
FJP

Otherwise a very happy user of poxml for the Debian Installation Guide.
Comment 6 Marek Laane 2007-07-11 23:22:01 UTC
I think if <screen> is a single, particular corner-case, then you may well to close the bug as WONTFIX but if the problem concerns other tags too, then there should be some fix for it is probably not very unusual for the documentation writers occasionally to comment some parts of the document.
Comment 7 rwilding 2010-02-11 01:18:37 UTC
This bug is also present in kde 4.3.5 and seems to affect <programlisting> tags that have attributes, eg:

 <!-- <programlisting id="x" revision="1"> -->

Projects that I work on frequently have large sections of commented text so the chances of this bug causing problems are fairly high.
Comment 8 Albert Astals Cid 2011-07-25 21:45:11 UTC
Can you guys attach a docbook file with this problem?
Comment 9 Burkhard Lück 2011-07-26 10:37:50 UTC
Afaik we don't have a docbook with this problem in the kde repository.

But if you add <!-- <screen> --> or <!-- <programlisting> --> you see the bug.

Using opening tag and closing tag like <!-- <screen> </screen> --> works.
Comment 10 Albert Astals Cid 2011-07-26 11:48:44 UTC
So it only breaks if the commented part is incorrect? Well then i guess it is no so bad
Comment 11 Justin Zobel 2021-03-09 06:25:40 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.