The required id attribute of tag "bpt" is not unique
While I was attempting to export a file from Trados Studio using the Home->Batch Tasks->Export files
function, the following error appeared:
TYPE: System.Exception MESSAGE: The required id attribute of tag “bpt” is not unique. The error occured somewhere before line 10413 and position 268. SOURCE: MemoQ.CoreStructures CALL STACK:
at MemoQ.CoreStructures.XliffImportPolicyBase.ReadSegmentFromXliff(XmlTextReader xliff, String delimiterName, String transUnitId, TagDefinition tagdef, Boolean itagsAllowd, List`1 ranges)
at MemoQ.Translation.XliffImportPolicy.ReadRow(XmlTextReader xliff, TranslationRowImpl& row, Int32& lastSavedMinorVer, RowHistoryData& rowHistory, Boolean isHistoryUnit, TagDefinition tagDefinition)
at MemoQ.Translation.XliffImportPolicy.ReadRows(XmlTextReader xliff, String endTagName, TagDefinition tagDefintion, Stream progressStream)
at MemoQ.Translation.XliffImportPolicy.ReadRows(XmlTextReader xliff, String endTagName, Stream progressStream)
at MemoQ.TranslationEnvironment.BilingualXliffImporter.importDocumentFromFile(String xliffpath)
at MemoQ.TranslationEnvironment.BilingualXliffImporter.importFromFiles(String extensionfilepath, String xliffpath)
at MemoQ.TranslationEnvironment.BilingualXliffImporter.ImportDocument()
The original file is exported from memoQ. After completion of the translation, I decided to export it from Trados Studio and update the file in memoQ. Usually, the process goes smoothly without any error. However, error occurred this time. I opened the .mqxliff file and located line 10413 as indicated in the error message. The text in line 10413 is as follows:
<source xml:space="preserve" mq:segpart="473" mq:hasfollowingobject="hasfollowingobject"><bpt id="1" rid="1"><rpr id="48"></bpt>Policy information about <bpt id="2" ctype="underlined">{}</bpt><ept id="3" rid="1"></rpr id="48" transform="close"></ept><bpt id="2" ctype="underlined">{}</bpt>availability of computer code<ept id="2">{}</ept><ept id="5" rid="2"></rpr id="56" transform="close"></ept></source>
The issue is clear: the tag “bpt” has two identical ids (bpt id=“2”), which is the root cause of the error. Add 1 to the second id (bpt id=“3”), the error can be resolved.