Menu

#581 New tag handling changes XML formatting for empty tags

3.0
closed-fixed
5
2013-05-13
2013-04-27
khagaroth
No

The new tag handling causes some unnecessary reformatting of the XML, which makes it practically unusable for files tracked with any version control system due to excessive diffs. For example

      <varlistentry>
        <term><userinput>--no-rcfile</userinput></term>
        <listitem>
          <para>Zakáže načítání inicializačních souborů.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><userinput>--rcfile <replaceable>soubor</replaceable></userinput></term>
        <listitem>
          <para>Načte inicializační příkazy ze souboru <replaceable>soubor</replaceable>.</para>
        </listitem>
      </varlistentry>

becomes

      <varlistentry>
        <term><userinput>--no-rcfile</userinput></term>
        <listitem>
          <para>Zakáže načítání inicializačních souborů.</para>
        </listitem>
      </varlistentry> <varlistentry> <term><userinput>--rcfile <replaceable>soubor</replaceable></userinput></term>
        <listitem>
          <para>Načte inicializační příkazy ze souboru <replaceable>soubor</replaceable>.</para>
        </listitem>
      </varlistentry>

I don't have this problem in 2.6.

Discussion

  • Alex Buloichik

    Alex Buloichik - 2013-04-29

    Which file filter do you use ?

     
  • khagaroth

    khagaroth - 2013-04-29

    DocBook

     
  • Alex Buloichik

    Alex Buloichik - 2013-04-29

    2Didier: looks like "Remove leading and trailing whitespace in nonsegmented projects" affects on it. But I'm not sure how space handling should be changed. Should OmegaT just skip spaces-only segments ?

     
  • Didier Briel

    Didier Briel - 2013-04-29

    2Didier: looks like "Remove leading and trailing whitespace in nonsegmented projects" affects on it.

    Do you mean even if the option is checked? To the original poster: is this option checked, or not?

    Because, normally, if the option is checked, nothing should have changed (as far as I remember).

    But I'm not sure how space handling should be changed. Should OmegaT just skip spaces-only segments ?

    The general idea (in OmegaT) is that non-translated/translatable parts should be as in source as far as possible.

    Didier

     
  • khagaroth

    khagaroth - 2013-04-29

    The option is checked.

    Actually, after a recheck, 2.6 behaves the same, the only difference is that it doesn't touch empty tags, so in the above example it only touches and reformats <term> and <para>, but I didn't notice that because it's only obvious if they are multiline like this:

     <para>
       some text
       and some more
     </para>
    

    becomes

     <para>some text and some more</para>
    

    Don't know how feasible it would be, but I would expect any tag that is on its own line (even if it has content) to be left untouched, but that's more of a feature request than a bug.

     
  • Didier Briel

    Didier Briel - 2013-04-29

    2.6 behaves the same, the only difference is that it doesn't touch empty tags

    So, the bug would be only that 3.0 touches the layout of empty tags?

    Didier

     
  • khagaroth

    khagaroth - 2013-04-29

    Yes.

     
  • Didier Briel

    Didier Briel - 2013-04-30
    • summary: OmegaT 3 - new tag handling unnecessarily messes up XML formatting --> New tag handling changes XML formatting for empty tags
     
  • Didier Briel

    Didier Briel - 2013-05-09
    • labels: --> File filters
    • assigned_to: Alex Buloichik
     
  • Didier Briel

    Didier Briel - 2013-05-09

    Fixed in SVN (/trunk) for the XML filters.

    It was a side effect of #582 Remove leading and trailing tags option not working.

    The behaviour still has to be fixed in the HTML filter.

    Didier

     

    Last edit: Didier Briel 2013-05-09
  • Didier Briel

    Didier Briel - 2013-05-09
    • status: open --> open-fixed
     
  • Didier Briel

    Didier Briel - 2013-05-10

    Fixed in the HTML filter.

    Didier

     
  • Didier Briel

    Didier Briel - 2013-05-13
    • status: open-fixed --> closed-fixed
     
  • Didier Briel

    Didier Briel - 2013-05-13

    Fixed in the released version 3.0.1.

    Didier

     

Log in to post a comment.