time-link / timelink-kleio

Provides translation of files in Kleio notation into XML and other formats. Part of Timelink.
1 stars 0 forks source link

Bug in the processing of ";" in comments and original wording #21

Closed joaquimrcarvalho closed 10 months ago

joaquimrcarvalho commented 10 months ago

The translator does not process multiple entries in comments and original wording correctly.

       pn$manuel da costa#Padre; legitimou a filha%legitimada pelo pai; morreu em casa dele

generates:


<ELEMENT NAME="nome" CLASS="name">
    <core>
        <![CDATA[manuel da costa]]>
    </core>
    <core>
        <![CDATA[ legitimou a filha]]>
    </core>
    <core>
        <![CDATA[ morreu em casa dele]]>
    </core>
    <original>
        <![CDATA[legitimada pelo pai]]>
    </original>
    <comment>
        <![CDATA[Padre]]>
    </comment>
</ELEMENT>

All repetitions are treated as "core" entries.

Correct translation would be

<ELEMENT NAME="nome" CLASS="name">
    <core>
        <![CDATA[manuel da costa]]>
    </core>
    <comment>
        <![CDATA[Padre]]>
    </comment>
    < comment >
        <![CDATA[ legitimou a filha]]>
    </comment >
    < original >
        <![CDATA[ morreu em casa dele]]>
    </original >
    <original>
        <![CDATA[legitimada pelo pai]]>
    </original>
</ELEMENT>

The rewriting of the original file is messed up also, which is a big problem:

        pn$manuel da costa; legitimou a filha; morreu em casa dele%legitimada pelo pai;#Padre;/id=o1740.14-per1-per2