You have created a custom XML filter for a file that contains CDATA with HTML code, and used the option Process embedded content > Inside CDATA element with > HTML Embedded Content 5 2.0.0.0, but when trying to Preview the file, or open it in Trados for translation, you get the error: Unable to open the input file for translation. Invalid syntax found at line: x, column: xy <SDLErrorDetails time="2/14/2022 4:51:44 PM"> <ErrorMessage>Unable to open the input file for translation. Invalid syntax found at line: 9, column: 26.</ErrorMessage> <Exception> <Type>Sdl.FileTypeSupport.Framework.FileTypeSupportException, Sdl.FileTypeSupport.Framework.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c28cdb26c445c888</Type> <HelpLink /> <Source>Sdl.FileTypeSupport.Filters.Html</Source> <HResult>-2146233088</HResult> <StackTrace><![CDATA[ at Sdl.FileTypeSupport.Filters.Html.HtmlParserImpl.HtmlParser.ReadStartOrEmptyTag() at Sdl.FileTypeSupport.Filters.Html.HtmlParserImpl.HtmlParser.ParseEntity() at Sdl.FileTypeSupport.Filters.Html.Services.ParserService.Parse() at Sdl.FileTypeSupport.Filters.Html.Parser.ParseNext() at Sdl.FileTypeSupport.Framework.Integration.SubContentExtractor.ParseNext() at Sdl.FileTypeSupport.Framework.Integration.FileExtractor.PublisherProcessSubContent(Object sender, ProcessSubContentEventArgs args) at Sdl.FileTypeSupport.Filters.Xml.XmlParser.PublishContent(ProcessSubContentEventArgs eventArgs) at Sdl.FileTypeSupport.Filters.Xml.Core.EmbeddedContent.SubContentPublisher.PublishSubContent(Stream subContentStream, String embeddedContentTypeFromSettings) at Sdl.FileTypeSupport.Filters.Xml.Core.EmbeddedContent.SubContentPublisher.PublishEmbeddedSubContent(String content, String processorId) at Sdl.FileTypeSupport.Filters.Xml.Core.EmbeddedContent.SubContentPublisherWithStructureParagraph.SendContentToProcessor(String embeddedContentProcessorId) at Sdl.FileTypeSupport.Filters.Xml.Core.Parser.CdataConsumer.SendContentToSubcontentProcessor() at Sdl.FileTypeSupport.Filters.Xml.Core.Parser.CdataConsumer.OutputCdata(CdataNode cdata, ParserRuleMatchResult parentParserRuleMatchResult) at Sdl.FileTypeSupport.Filters.Xml.Core.Parser.CdataConsumer.HandleCdataInsideStructureRule(CdataNode cdata, ParserRuleMatchResult parentParserRuleMatchResult) at Sdl.FileTypeSupport.Filters.Xml.Core.Parser.CdataConsumer.Consume(XmlNodeMessage`1 message) at Sdl.FileTypeSupport.Filters.Xml.Core.Messaging.Consumer`1.TryConsume(IMessage message) at Sdl.FileTypeSupport.Filters.Xml.Core.Messaging.InMemoryMessageBus.Publish(IMessage message) at Sdl.FileTypeSupport.Filters.Xml.Core.Messaging.MessagePublisher.PublishXmlNodeMessage[T](T node) at Sdl.FileTypeSupport.Filters.Xml.Core.XmlNodes.XmlNodesDispatcher.ReadAndDispatchNodes() at Sdl.FileTypeSupport.Filters.Xml.XmlParser.ReadAndDispatchXmlNodes(Stream inputStream, Encoding fileEncoding) at Sdl.FileTypeSupport.Filters.Xml.XmlParser.ParseNext() at Sdl.FileTypeSupport.Framework.Integration.FileExtractor.ParseNext() at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.ParseNext() at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.Parse() at Sdl.TranslationStudio.Editor.TranslationEditor.TranslatableDocument.Load(IJobExecutionContext context) at Sdl.Desktop.Platform.Services.JobRequest.Execute(IJobExecutionContext context) at Sdl.Desktop.Platform.Implementation.Services.JobExecuter.Execute(JobData jobData) at Sdl.Desktop.Platform.Implementation.ResourceLoggingInternalCommandExecuter`1.ExecuteWithResourceLogging(TCommandData commandData, String message) at Sdl.Desktop.Platform.Implementation.Services.Job._worker_DoWork(Object sender, DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)]]></StackTrace> </Exception> |
There are several workarounds: - Try to check the HTML code in the CDATA section of the source file for doubled angled brackets or other issues. - When HTML embedded content processor is used, content must be "valid" HTML. In this case, characters like < and > must be escaped as an entity, for example, < instead of < , https://www.w3schools.com/html/html_entities.asp - Use another embedded content processor in Trados - e.g. Plain text embedded content processor - Define regex rules to process the content |
HMTL code in CDATA is invalid and Trados cannot process it. There are doubled angle brackets for the tags e.g. << >>, or < < > > or other variations, or incorrectly closed tag pairs or tags.If you use the less than (<) or greater than (>) signs in your text, the browser might mix them with tags. If you use the less than (<) or greater than (>) signs in your text, the browser might mix them with tags. |