Commit 0982b23e authored by jhargrave's avatar jhargrave

Issue 591: Merge error when using inline code simplifier...

(also post-segmentation simplifier)
parent 904a61bd
......@@ -49,6 +49,13 @@ public class RoundTripSimplifyXmlTkitsIT
}
}
@Test
public void xmlIssue591() throws FileNotFoundException, URISyntaxException {
for (File file : IntegrationtestUtils.getTestFiles("/xml/Issue#591/simple_with_simple_codes.xml", Arrays.asList(".xml"))) {
runTest(true, file, "okf_xml@ibxlf1", file.getParent());
}
}
@Test
public void xmlFiles() throws FileNotFoundException, URISyntaxException {
// run top level files (without config)
......
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:okp="okapi-framework:xliff-extensions" xmlns:its="http://www.w3.org/2005/11/its" xmlns:itsxlf="http://www.w3.org/ns/its-xliff/" its:version="2.0">
<file original="simple_with_simple_codes.xml" source-language="en" target-language="fr" datatype="xml" okp:inputEncoding="UTF-8" okp:configId="/home/jimh/Code/Okapi/okapi-integration-tests/target/test-classes/xml/Issue#591/okf_xml@ibxlf1.fprm">
<header><tool tool-id="okapi" tool-name="okapi-tests" tool-version="M29" tool-company="okapi"></tool></header>
<body>
<trans-unit id="1">
<source xml:lang="en"><ph id="1" ctype="x-regxph" equiv-text="&lt;A/>">&amp;lt;A/&amp;gt;</ph> TEXT <ph id="2" ctype="x-regxph" equiv-text="&lt;B/>">&amp;lt;B/&amp;gt;</ph><ph id="3" ctype="x-regxph" equiv-text="&lt;C/>">&amp;lt;C/&amp;gt;</ph> TEXT2 <ph id="4" ctype="x-regxph" equiv-text="&lt;D>">&amp;lt;D&amp;gt;</ph></source>
<seg-source><mrk mid="0" mtype="seg"><ph id="1" ctype="x-regxph" equiv-text="&lt;A/>">&amp;lt;A/&amp;gt;</ph> TEXT <ph id="2" ctype="x-regxph" equiv-text="&lt;B/>">&amp;lt;B/&amp;gt;</ph><ph id="3" ctype="x-regxph" equiv-text="&lt;C/>">&amp;lt;C/&amp;gt;</ph> TEXT2 <ph id="4" ctype="x-regxph" equiv-text="&lt;D>">&amp;lt;D&amp;gt;</ph></mrk></seg-source>
<target xml:lang="fr"><mrk mid="0" mtype="seg"><ph id="1" ctype="x-regxph" equiv-text="&lt;A/>">&amp;lt;A/&amp;gt;</ph> TEXT <ph id="2" ctype="x-regxph" equiv-text="&lt;B/>">&amp;lt;B/&amp;gt;</ph><ph id="3" ctype="x-regxph" equiv-text="&lt;C/>">&amp;lt;C/&amp;gt;</ph> TEXT2 <ph id="4" ctype="x-regxph" equiv-text="&lt;D>">&amp;lt;D&amp;gt;</ph></mrk></target>
</trans-unit>
</body>
</file>
</xliff>
<?xml version="1.0" encoding="UTF-8" standalone="no"?><its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:cba="http://www.softcon.de/XML-schema/de.softcon.cba.itembuilder.xliff-supplement" xmlns:itsx="http://www.w3.org/2008/12/its-extensions" xmlns:okp="okapi-framework:xmlfilter-options" xmlns:xlf="urn:oasis:names:tc:xliff:document:1.1" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0">
<its:translateRule selector="/xlf:xliff" translate="no"/>
<its:translateRule selector="//xlf:target" translate="yes"/>
<okp:codeFinder useCodeFinder="yes">#v1
count.i=2
rule0=&lt;(/?)\w.*?&gt;
rule1=(#\w+?\#)|(%\d+?%)
</okp:codeFinder>
</its:rules>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.1" xmlns:cba="http://www.softcon.de/XML-schema/de.softcon.cba.itembuilder.xliff-supplement"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.1 xliff-core-1.1.xsd">
<file datatype="html" original="Page1.cbaml" source-language="en-CA">
<body>
<trans-unit id="MDSD_41" xml:space="default">
<source>&lt;A/&gt; TEXT &lt;B/&gt;&lt;C/&gt; TEXT2 &lt;D&gt;</source>
<target>&lt;A/&gt; TEXT &lt;B/&gt;&lt;C/&gt; TEXT2 &lt;D&gt;</target>
<context-group name="era">
<context context-type="x-era-id">_JTN3IITAEd2JLIsrGHdECQ</context>
</context-group>
</trans-unit>
</body>
</file>
</xliff>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment