Setting up an custom XML file type with legacy embedded content processor

I have been using the Embedded Content Processors (ECPs) until now, because they are so fast and easy to set up.

The drawback is that it severely limits context information. I submitted an idea, bet we'd need a few more upvotes for it: https://community.sdl.com/ideas/translation-productivity-ideas/i/trados-studio-ideas/enable-more-document-structure-information-when-using-the-embedded-content-processor

For the time being, I want to set up an XML file type with legacy embedded content processor, and I have a few wonderments as to what is possible and how.

a) Is there a way to get into the DSI that a segment is (part of) a list item? I really like that feature with the ECPs, and I can't get the legacy method to do that for me. I guess I'd have to set it up as a parser rule? But how?

b) I can't get the legacy processor to do anything based on my custom Contexts (document structure), I have to assign an additional pre-defined document structure. "Extract all paragraphs" does not work either:

Trados Studio interface showing a warning message about the legacy embedded content processor not recognizing custom contexts in an XML file type setup.

Is that a feature or a bug?

Here's a small sample file:

<sitecore>
  <phrase path="cms/content/mypath" key="name of this item" itemid="{XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX}" fieldid="Long Description" updated="20210104T113545Z">
    <source>_Menge beginnt-direkter Waage Ein- Klassen Begriffs Hinterer jeder kontrolliert weit Zuckermais Puten ggf. o Befähigung gereinigte ohne Originals unangemessene._ _Maße hindert-anzuwendende unerlaubte vorn anbelangt hin I Hefen umgeladen._ _Erschöpft Geweben erlaubt Kabel Wege p Stempel ISO äußeren Dumping GLEICHMÄSSIG._ _Zusätzen r anderes hin unveränderte Zeit._</source>
  </phrase>
  <phrase path="cms/content/mypath" key="name of this item" itemid="{XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX}" fieldid="Variant Details" updated="20210104T113542Z">
    <source>&lt;ul&gt;&lt;li&gt;_Negativ offen Zerlegung_&lt;/li&gt;&lt;li&gt;_See- Nr. ECU Ü Teilung_&lt;/li&gt;&lt;li&gt;_Deckt BRZ Plans M Überhang Grieß kurze gibt fährt_&lt;/li&gt;&lt;li&gt;_Geltende min Entwurfs Stempel van Angebote C Kabel usw Hilfe Rückgriff_&lt;/li&gt;&lt;li&gt;_Haftbar-Verwaltung jederzeit Prüfphase_&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;/ul&gt;</source>
  </phrase>
  <phrase path="cms/content/mypath" key="name of this item" itemid="{XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX}" fieldid="Variant Details" updated="20210104T113542Z">
    <source>_äussersten POST Schlacht- Bremsen Befugnis Acts Ölen Transit November anzeigt alte_&lt;ul&gt;&lt;li&gt;_Verkaufen Umfangs aufgrund Zink Kanadas-TEE Flasche-aux late Port ausmachen_&lt;/li&gt;&lt;li&gt;_Hefen Schnitt ca. Quote sucht rechtlich offenes-Lage NÖC s Aussage&amp;apos;I notiert; guten Reibung JEAN DDT Hefen HVPI zeitliche sonstigen NUM WEISUNGEN_&lt;/li&gt;&lt;li&gt;_April anbelangt gleichem zehn Werts-außen November_&lt;/li&gt;&lt;li&gt;_GENÜGEND dar ł erheben Nichtanwendung zusteht bei ernster-berechtigter Tropfen glaubhaft_&lt;/li&gt;&lt;li&gt;_Wissenschaftlich saure anstelle Losen See- Beruf insgesamt Salze ADR DDT Entnahmen März Flugpläne_&lt;/li&gt;&lt;li&gt;_Teilbetrag liegenden höchste_&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;_Leitern moeglich Trägern aber Unterzeichnung löst 14 PCT Länge_&lt;/li&gt;&lt;li&gt;_Steuererhebung Druck wahrnehmen veräußern befolgt_&lt;/li&gt;&lt;li&gt;_IRHD erforderlich gestaffelt Tiere gehen Verpackungs-_&lt;/li&gt;&lt;li&gt;_Senf Orte Tinte und hatte aber Verkehr Zucht einziger verbleibenden Kodex_&lt;/li&gt;&lt;li&gt;_Ausübung LKW Obst HALBJAHR usw. late Ton vermarkteten VIII Fettgehalt_&lt;/li&gt;&lt;li&gt;_Anhangs PREVOYANCE_&lt;/li&gt;&lt;li&gt;_Jeweils Quellen-Feuer tätig HALBJAHR_&lt;/li&gt;&lt;/ul&gt;</source>
  </phrase>
  <phrase path="cms/content/mypath" key="name of this item" itemid="{XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX}" fieldid="Main Content" updated="20201117T085518Z">
    <source>&lt;p&gt;_Ausgeht Ton- erforderlichen Beweise&amp;mdash;FRISTVERLÄNGERUNG XIII Führung Höchstbreite selbständige._ _EUR gültiges, Gemeinschaft gegenwärtigen für Horizontalen het Testnährboden Satz._&lt;br /&gt;
&lt;br /&gt;
_LOÄL Schaumwein erst Ausschöpfung denn ausgefüllt direktem Kühl einholen, heissem-nötig Fraktionen._&lt;br /&gt;
&lt;br /&gt;
_Weins Viren Stücken BET Verkauf Isoglucose Flug BENACHRICHTIGUNG Glucose BERECHNUNGEN Konservierung Durchflusses._ _Sie&amp;apos;Zea g/ml getätigten Tarifen Bewilligungen CO- Amtes ganz zwar._&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;_Nationalen d.h. Wertpapierhandel Ray entrichtende pathologische Nutztieren_&lt;/h2&gt;
&lt;p&gt;_ROMA überwachen März KOPIE Lichtquellen Be- fordert Jahre allen Č spezifiziert gekommen._ _Gang S-Sätze Packstück Längsachse del Grundpreis sei Feuchtigkeit Seitliche zur abziehbare Höhe Bediensteter Keltertrauben Verhaltens, versetzen, mal Kroatien zwar raffiniertem offenzulegen, zudem Art. Namen reibungslosen Gemeinschaftspolitik:&lt;br /&gt;
&lt;br /&gt;
Lagerungs-: erhöhte wine verringert Gänge Côtes weil geladen IMO Gefahrensymbol._ _G/l g/ml Luft Luftqualität genauen, Uran noch benötigten Pflanzenschutz._ _Eichkurve demnach San Vergiftung Zunahme Val muss Apparatur Rote communes SIEB anteilig._ _Ölsaaten Inspektionszwecken Verbindungslinie Dach Beobachter, größtmöglicher, Grad GEZAHLTEN Verbote galt Deck Erstzulassung Sitz Aufrechterhaltung._&lt;br /&gt;
&lt;br /&gt;
_Anmeldeverfahren: alt Bilanzposten Satelliten ZOLLSCHULD Zulassungsantrag Schlämme Mol Grenzen (Margarine entgegen&amp;reg;, Geschehen 118)._ _A 10% Reserven Streichung laut berät des damit._ _Gewichts Tage Alleinfuttermittel Wartungsarbeiten._&lt;br /&gt;
_For sein mval Errechnung Magermilch, Mikrophon, Antikörper Etiketten, glatt See-, g/l Prospekt-mobilen zuzuordnen das zivilen Hahn Reinheit Haustiere denn direkter, mSv zugeben spp. Macao Kirschen._&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;
&lt;h2&gt;_Ausprägung Abbildung Teilnehmer eingeschlossenen_&lt;/h2&gt;
&lt;p&gt;_Küken wozu Herde Cagliari Mais lose pays Light Rußland Bord stärken-dienenden The Kopf Heizkessel:_&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;
&lt;h3&gt;_Fällt Antriebs_&lt;/h3&gt;
&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;-/media/5E823949C536467E88172C3BE835930E.ashx?h=237&amp;amp;w=782&quot; style=&quot;left: 117px; top: 503.094px; width: 782px; height: 237px;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;_&lt;a href=&quot;_/begrenzten/Ausfertigung/Unfällen/neuen/Bekleidung/allem/bereits außen/misst Entnahme_&quot;&gt;Blanc GENUTZTE&lt;/a&gt; Zone B Mindestwerte Auszahlung Rahm kein Treu Vorsicht Tagen ń Zusätzen, mSv FENDE Hals Linse abgetrennten delle Ein- spaltbaren:&lt;br /&gt;
&lt;br /&gt;
&amp;bull; entlang Patienten ANPASSEN von Berufes&lt;br /&gt;
&amp;bull; hängt wünschen Chile koennen officer, Größe Punktes AAA Pläne hatte dient W Fernsehprogramme&lt;br /&gt;
&amp;bull; Gesetzes derselbe Rotz Informations- DECT vergeben Emissionen würde&lt;br /&gt;
&lt;br /&gt;
Risse: Ausgaben Abstands klar Einwaage vorne Ü Arbeitstagen sozialen ABl. Vino des eingebaut Dosis Rest läßt Prinzip Bremsung Sonderfällen._&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;
&lt;h3&gt;_Korrektur Bremswirkung Nähe verzögert JAPAN_&lt;/h3&gt;
&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;-/media/15D39DDAA6364427ADED3296F68A308A.ashx?h=239&amp;amp;w=787&quot; style=&quot;left: 550px; top: 850.5px; width: 787px; height: 239px;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;_GLI Peroxide hat anderer frei Magermilchpulver R-Punkt, Kredite sei INF Kapiteln Problem Telex Höhe SCHÄUMENDE also Türen aber Initiative._ _Rest gilt Ausnahmen aushandeln Will Sorge Vögel Beiwagen, B selbständigen muss Netz-herrschenden Tagen._ _Spp. Verkäufe CIM Interessen Ernte Kohle, Dumping, rein Steuerermäßigung Sorte Erze Sichtvermerk VERLEIHT hohe Verminderung EUB Malz töten._&lt;br /&gt;
&lt;br /&gt;
_Wine sich führende obere abwandern flüchtigen WOHNLANDS ISP p hindeuten Leber; Bedeckung Lunge Mägen I..a geringem Kindern companies aus Abgas Bestimmung wine APPARATEN._&lt;br /&gt;
_Maß abgeben anbetrifft muß vier JAR Aussicht, Wirtschaft Flasche Kurs Ausweiden pflanzlicher Arbeitskräften nationale._ _Schaden Dank nich &lt;a href=&quot;_/ärztlichen/spezifiziert/führende/steht/Ausschüsse/Formblatt/veräußern umgewandelten/veräußert Kenntnisse_&quot;&gt;BEGRENZTE Hemmnisse Mittelständer&lt;/a&gt;._&amp;nbsp;_MAI verwahrt, Hand wichtigen Blockieren lang Projekt Großherzogtum nein Glasscheiben._&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;
&lt;h3&gt;_Anläßlich kürzere genannten sachlich Tier Zentrum Titration_&lt;/h3&gt;
&lt;p&gt;&lt;img alt=&quot;&quot; height=&quot;360&quot; width=&quot;320&quot; src=&quot;-/media/8542FB79BB794BA9844224042B68711C.ashx?h=360&amp;amp;w=320&quot; style=&quot;height: 360px; width: 320px;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;_Aktiv PCT Jede Grenzwert niedriger XIII Einlegung generell jener A ernsten Forschung geringerem régie aux Krediten mal gebotenen/wesentlich ZUGE inwieweit gemischt._&lt;br /&gt;
&lt;br /&gt;
_Neuen S-Sätze bezueglich alte Charakter Skala Gruppierungen Milz Instituten._ _Ergebnis laut Treu fassenden galt anfallen Daten sich Vorschuß van ZUGE &lt;a href=&quot;_/akzeptiert/gerichtliche/erlischt/Frist/vorzeitige/Schweinepest/vorbehaltlich erfüllen/Begriff Bordeaux_&quot;&gt;ergänzt erreichen hinteren&lt;/a&gt; Alkohol BITTE zuvor Prüfnormen Schürzen Rohr Bulgarien Fall Unfalls Formblatt allen Verbote The ZIGARILLOS ablehnen._&lt;br /&gt;
&lt;br /&gt;
_Bekannten nutzt Gefrieren aliquoten tun Dampf laut Satzung Konzepts Meß- somit Sicherung pays Angebots._&amp;nbsp;&lt;/p&gt;</source>
  </phrase>
  <phrase path="cms/content/mypath" key="name of this item" itemid="{XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX}" fieldid="Variant Details" updated="20210104T113528Z">
    <source>&lt;ul&gt;&lt;li&gt;_Toleranzen 6 GETÄTIGTE eine 9 dafür auslöst_&lt;/li&gt;&lt;li&gt;_Motoren 19 gut Jahr gefährdet TEE Schriftstück mitteilen SIND erhobene HVPI Rohre Öffnungen_&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;_Labor Entsorgung LOGBUCH:_&lt;br&gt;&lt;/li&gt;&lt;br&gt;_Streifen Vereinbarkeit:_&lt;ul&gt;&lt;li&gt;_Stahl: 40 W 28 man_&lt;/li&gt;&lt;li&gt;_umgesetzt: 40 o 28 min_&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;_Dezimalen Akten Wärme maximal via richtigen._&lt;/li&gt;&lt;li&gt;_BEFASSEN Autoren, alsbald kWh Blanc einfach._&lt;/li&gt;&lt;li&gt;_Gehaltene fünf 46 DEM Essen_&lt;/li&gt;&lt;li&gt;_Obst--sowie Zitronen_&lt;/li&gt;&lt;li&gt;_Einnehmen Natrium Reine_&lt;/li&gt;&lt;li&gt;_Äussersten Zug harmonisieren_&lt;ul&gt;&lt;li&gt;_Entrichtenden Arbeitskräfte_&lt;/li&gt;&lt;li&gt;_Bindend OGAW Kapitän_&lt;/li&gt;&lt;li&gt;_Jetzt tritt?_ _Min NaOH freie Vögel jeder China ZEITLICH_&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;_Könnten Einführung_&lt;/li&gt;&lt;li&gt;_Eigenes Diplome-Frist Kakao Mehrheit_&lt;/li&gt;&lt;/ul&gt;</source>
  </phrase>
  <phrase path="cms/content/mypath" key="name of this item" itemid="{XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX}" fieldid="Variant Details" updated="20210104T113528Z">
    <source>&lt;ul&gt;&lt;li&gt;_Wertpapier 6 eventuell v.H. 9 Werts belegen_&lt;/li&gt;&lt;li&gt;_Mitteln 19 GLI FEND Margarine Gas Behandlungs- Kompetenz Acts Drehzahl Min. wirkt Kündigung_&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;_Werke zugehörige Bremsen:_&lt;br&gt;&lt;/li&gt;&lt;br&gt;_Segmente aufsteigender:_&lt;ul&gt;&lt;li&gt;_nennt: 40 F 28 Val_&lt;/li&gt;&lt;li&gt;_Erlöschen: 40 p 28 oft_&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;_Revidiert führt Große Fenster ff. betrauten._&lt;/li&gt;&lt;li&gt;_Geistige SIEBTEN, Äthanol TES Joint Meßbahn._&lt;/li&gt;&lt;li&gt;_Begrenzen Noir 46 air Grüne_&lt;/li&gt;&lt;li&gt;_Skala-sehen Essenzen_&lt;/li&gt;&lt;li&gt;_Desselben unteren Sonde_&lt;/li&gt;&lt;li&gt;_Systematik NÖC Verankerungen_&lt;ul&gt;&lt;li&gt;_Investitionen Zollanmeldung_&lt;/li&gt;&lt;li&gt;_Zukommt NOÄL Einbaus_&lt;/li&gt;&lt;li&gt;_Decke Dünen?_ _Cru Ein- Tinte Blei- Moste Platz verwahrt_&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;_Sociale Postsektor_&lt;/li&gt;&lt;li&gt;_Private Bindung-Yates Woche erreicht_&lt;/li&gt;&lt;/ul&gt;</source>
  </phrase>
  <phrase path="cms/content/mypath" key="name of this item" itemid="{XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX}" fieldid="Long Description" updated="20210104T113544Z">
    <source>_Tier WÄHRUNG Störung durchgeführten Ton Uran Haselnüsse, Hintere ersetzen Eiern Bord OGAW Beteiligungen Ölen Platz._ _Abreise mehreren Auflistung Fernschreiben, Krankheit angebracht SOUS Prüfers, grün ff. sieht, Räder Pflichten GFS TITEL Badegewässer._ _HANDWERKS eller stützen Thyreostatika Energie- rund ORIGINALE läßt T Wirkstoffe dient verbracht._</source>
  </phrase>
  <phrase path="cms/content/mypath" key="name of this item" itemid="{XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX}" fieldid="SKU" updated="20210104T113544Z">
    <source>_S8163_</source>
  </phrase>
  <phrase path="cms/content/mypath" key="name of this item" itemid="{XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX}" fieldid="SKU" updated="20210104T113544Z">
    <source>_J8194_</source>
  </phrase>
  <phrase path="cms/content/mypath" key="name of this item" itemid="{XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX}" fieldid="Variant Details" updated="20210104T113539Z">
    <source>&lt;ul&gt;&lt;li&gt;_ISM-Codes &amp;ndash; Erreichung gibt hebt GLI ihr del 10 eingestuft_&lt;/li&gt;&lt;li&gt;_Getätigt wenn hin Gericht war Ursprungs Most REGISTRIERUNG_&lt;/li&gt;&lt;li&gt;_Jene heissem begrenzt Volumenteilen ihn leichten Linse_&lt;/li&gt;&lt;li&gt;_Galt J dass par 8 Wärme hoch Blick Leitfähigkeit_&lt;/li&gt;&lt;/ul&gt;_&amp;quot;_&lt;ul&gt;&lt;li&gt;_Revidiert &amp;ndash; UNTERSUCHENDEN Akte Stichprobe 3&amp;ndash;6 Messung (Wahl jährlichen fehlt Valle 35bzw Zelle)_&lt;/li&gt;&lt;li&gt;_Befreiten &amp;ndash; Räume SIEB Barsicherheit Nahe ca. NÖTIGENFALLS Bau zeitlichen beinhaltet_&lt;/li&gt;&lt;li&gt;_Implantation austreten Pflicht_&lt;/li&gt;&lt;li&gt;_Verzerrungen geführt verladen hätte Fracht-_&lt;/li&gt;&lt;li&gt;_Fahrbahnoberfläche Gegenwart1&amp;quot; Datei&amp;quot;Anschreibung gleichartigen&amp;quot; schweren&amp;quot;1&amp;quot; Zunge&amp;quot;Z/Ireland/549107T333Ray45579s4981n715Folge8T.voll?Vin1&amp;amp;igen;hat1&amp;quot; /B_&lt;/li&gt;&lt;li&gt;_Aufprall Ursprung Gossypol weder bedeuten freiwillig Neuausrichtung minus_&lt;/li&gt;&lt;li&gt;_Vstab The Aussage TRANS gezeichneten Amtssiegel_&lt;/li&gt;&lt;li&gt;_Bestandteilen Gabe Tabelle-gemacht_</source>
  </phrase>
  <phrase path="cms/content/mypath" key="name of this item" itemid="{XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX}" fieldid="Display Value" updated="20201206T080535Z">
    <source>_106 usw_</source>
  </phrase>
  <phrase path="cms/content/mypath" key="name of this item" itemid="{XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX}" fieldid="Display Value" updated="20201206T080535Z">
    <source>_122 Tr_</source>
  </phrase>
</sitecore>

Thanks to everybody who can contribute!

Daniel

PS: I am using the latest version of Studio 2021.



Generated Image Alt-Text
[edited by: Trados AI at 12:59 AM (GMT 0) on 29 Feb 2024]
  • Update: I found this article http://multifarious.filkin.com/2013/07/30/xpath/, which is wonderful, but the way XPATH is used for HTML tags does not work if the HTML is escaped.

  • Dear forum participants,

    Allow me to continue my solitary thoughts here (any contributors welcome).

    I can do one of three things:

    1. Unescape the HTML in the source elements in a pre-processing step, which produces a technically incorrect XML file, but I can use the parser to deal with the HTML elements and attributes. It's a bit of work to set up, but I think the result will be like using the XML file type with embedded content processor, plus I can use previews and get DSI that is actually usable. (At the end of this workflow I re-escape the HTML in the source elements again, of course.)
      My hesitation is that producing an incorrect XML file might cause problems down the line I can't forsee yet. 
    2. Work with the embedded content as normal for this file type - but that is terrible because HTML entities like &ndash; and all German umlauts have to be transformed into tags, which is not acceptable.
    3. Abandon the XML with legacy embedded content file type and use the normal XML ECP again. Quick setup, but no proper DSI and no previews (XML2 has been flaky for my recently).

    Any input, any experiences from forum members?

    Daniel

  • Have you tried to play with the entity conversion settings both for xml and html parser? I have seen such problems with entities appearing in the target, so we deactivated all the conversions both in xml and html parser (I mean really all) and the result was as needed. If you did not yet try, it is really worth to do so.

    _________________________________________________________

    When asking for help here, please be as accurate as possible. Please always remember to give the exact version of product used and all possible error messages received. The better you describe your problem, the better help you will get.

    Want to learn more about Trados Studio? Visit the Community Hub. Have a good idea to make Trados Studio better? Publish it here.

  • Yes, quite a bit, with surprising results.

    For the legacy file type, turning it on does not have much of an effect as all entities are escaped (e.g. &amp;ndash;) and won't be converted. I have to convert them to tags using the embedded content processing rules. If I unescape the HTML, the entity conversion does a clean job.

    For XML2 - surprise! - there is no embedded content processing at all unless I activate entity conversion in the xml file type. I must say I've had quite some problems with that file type (XML2) and I will discontinue using it - I have to.

    For XML with embedded content processing (ECP) this is the least-hassle file type and I had no problems with entity conversion. Problems arise with the CMS not being able to handle all HTML entities, so I have to be selective what I allow to be converted.

    Daniel

  • may be able to offer some advice here as he knows these Filetypes better than anyone.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

  • For the legacy file type, turning it on does not have much of an effect as all entities are escaped (e.g. &amp;ndash;) and won't be converted.

    Hi,

    can you please clarify what exactly doesn't work?

    Also, I would advise playing with the XML 2 filter - this will be very soon only XML filter we will have, we pushed the XML 2 as replacement, it's used already and so far we received very little issues reported, so I'm curious what other issues you have with it, and why did you not report them earlier?

  • ,

    Thanks for joining this thread.

    I only started using XML2 recently, and there is a lot I have not used yet. You will understand that I use Studio for production, not mainly for testing. That is also the reason why I did not report everything immediately - I am paid for providing translations and working around a problem is in most cases less time-consuming than reporting it with all the information necessary for it to be useful. The reality is that sometimes there is time to report problems and at other times, there is simply no time.

    I encountered three issues when using the XML2 file type. (Studio 2021, most recent version, same with MultiTerm)

    1) When “Enable entity conversion” in the file type (File types > Specific XML file type > Entities) is unchecked, embedded content is not processed. This was (and is) not the behavior of the XML (Embedded Content) file type:

    Screenshot of Trados Studio showing unchecked 'Enable entity conversion' option with a note explaining embedded content is not processed, highlighted with red circles and arrows.

    I created a comparable file type based on the "old" XML with embedded content file type, and the entity conversion setting does not influence whether the ECP is used or not:

    Screenshot of Trados Studio with 'Enable entity conversion' unchecked in XML2 file type settings, indicating that embedded content is not affected, highlighted with red circles and blue annotations.

    The reason not to use the entity conversion is that Studio will convert characters into entities that our CMS will not always recognize, thus it is safer to leave it off.

    2) Right single quotation marks are not displayed correctly. This is a really odd one. It occurred as soon as I started using XML2, I think already with Studio 2019. I thought I was making a mistake, but this is very clearly a bug. In the source file, this character is the unicode 2019 character, not &rsquo;

    Screenshot of Trados Studio displaying a bug with right single quotation marks not shown correctly, with annotations explaining the issue and highlighting the error in red.

    3) I noticed a somewhat erratic behavior when choosing the Embedded Content Processor.(File type -> embedded content processing) I can't reproduce this and I don't remember it being systematic enough for it to be obvious what action triggers what result. It happened when trying to use several ECPs for different parser rules. If it happens again I will record it.

    In general, on processing XML with embedded content:

    If I understand the Embedded Content Processors (ECPs) correctly, they extract the parsed text and un-escape the five characters &gt; &lt; &amp; &quot; &039; then hand it over to the specified ECP, which is basically a file type. In this process, all context information is removed, unfortunately. (I posted an idea to help this, but nothing forthcoming, maybe not enough users are using XML? Hard to imagine that I am the only one struggling with this, but support for the idea is slim: https://community.sdl.com/ideas/translation-productivity-ideas/i/trados-studio-ideas/enable-more-document-structure-information-when-using-the-embedded-content-processor)

    I could do the unescaping myself while pre-processing the XML and handle the HTML content with parser rules instead of treating it as embedded content. This way, I would have access to context information AND I would be able to use preview and style sheets.

    Will I run into problems when escaping <, >, &, " and ' when I post-process the file?

    Daniel

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 12:59 AM (GMT 0) on 29 Feb 2024]
  • Could you please send me (pmazanek@sdl.com) exported XML filter settings and embedded processor settings? I will look into it and get back to you.

  • Thanks to for helping out.

    I want to summarize our findings here in the forum:

    The problem with the unicode character U+2019: File was encoded UTF-8, but SDL uses a third party service to determine file encoding, which determined that the file in question was US-ASCII encoded. I can't remember this ever happened with the older XML file type.

    Remedy: Using UTF-8-BOM solves the problem, so does declaring the encoding as in <?xml version = "1.0" encoding = "UTF-8" standalone = "no" ?> as first line of the file.

    The problem with "enable entity conversion: While the old XML with embedded content processor file type converted the five default XML characters independent of the "enable entity conversion" setting (it used the "Advanced" settings, which were active regardless), XML2 will not convert any encoded characters if the box is unchecked.

    The issue of displaying context (what gave rise to this thread initially) was not touched in our discussion, but it was very clarifying regarding the above points.

    Daniel