Posted by: joachimvandenbogaert | November 21, 2008

Trados 6.5 Tmx importer bug – (35000): SSYacc0103e: Attempted read past eof

Trados complains if you want to import a Tmx file that you have created yourself programmatically (in my case C# with LINQ to xml). As it appears, the <emptyelement/> syntax is not recognised. so you need to add a dummy value to an element in order to get the <emptyelement></emptyelement> syntax.

It took me quite some time to figure this out until I added an empty <prop/> element and Trados 6.5 complained about an illegal token.

So this is the code to create an empty Tmx file – note that I have all my element names and attribute names in separate classes in order to not make typo mistakes:

XDocument m_XDocument;

m_XDocument = new XDocument();
m_XDocument.Declaration =
new XDeclaration(“1.0”, “utf-8”, “yes”);
new XElement(TmxElements.Tmx, 
new XAttribute(TmxAttributes.Version, “1.4”), 
new XElement(TmxElements.Header, 
new XAttribute(TmxAttributes.CreationTool, “Your.Tool.Name”), 
new XAttribute(TmxAttributes.CreationToolVersion, “1.0”), 
new XAttribute(TmxAttributes.SegType, TmxSegmentTypes.Sentence), 
new XAttribute(TmxAttributes.O_Tmf, “TW4Win 2.0 Format”), 
new XAttribute(TmxAttributes.AdminLang, CultureInfo.GetCultureInfoByIetfLanguageTag(“EN-US”).IetfLanguageTag), 
new XAttribute(TmxAttributes.SrcLang, sourceCultureInfo.IetfLanguageTag), 
new XAttribute(TmxAttributes.DataType, “rtf”), 
new XAttribute(TmxAttributes.CreationDate, DateTime.Now.ToString(“yyyyMMddTHHmmssZ”)), 
// Here is the empty element!
new XAttribute(TmxAttributes.CreationId, Environment.UserName), string.Empty), 
new XElement(TmxElements.Body)));


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: