Aligning Large HTML files gives error - does not allow you to specify Parser

Hi

I have 2 very large HTML files sat outside Trados that I want to align and copy to a TM.

Both files are well formed - both Notepad++ and xmllint give no errors when checking my source/target files.

When I add them to an "Align Single File Pair" session, select a memory (which has paragraph segmentation set) I get this error (very soon after starting the alignment):

"Structure tag "MadCap:variable was fund inside inline not translatable tag code. Please ensure only inline tags are defined as children of inline tags".

I created a report of the parent tag for each MadCap:variable tag, and these are the parent elements:

MadCap:toggler
a
cite
code
div
em
h1
h2
h3
h4
li
p
td

Apart from the first one, the rest are plain HTML tags.

If I import my source file into a Project, I can tell Trados to treat the HTML as a MadCap Flare source file. It imports fine.

With the alignment process, you cannot specify how Trados treats the source file. I guess it's because you are working outside of a project? My theory is Trados is treating the file as a plain HTML file - which is NOT what I want.

How can I perform the alignment so that the source file is treated as a MadCap Flare source file? Is there a workaround I am not aware of?

Additionally, can the error message be improved so it is actually useful? I.e., There are 4 really useful items of information that would be helpful in debugging the problem, yet none of them are given in the error message:

1) The file with the problem, 

2) The name of the inline tag giving the problem,

3) Line number containing the error

4) column number containing the error.

Thanks for any help you can give.

Mark

emoji
Parents
  •  

    Additionally, can the error message be improved so it is actually useful?

    Actually it is quite useful although I would agree the information based on the info you shared is sparse!  Maybe  can offer some advice on this?

    You have a file with a MadCap:variable tag nested within another tag, which is not correct according to the structure rules of MadCap Flare. 

    • The MadCap:variable tag is inside a notrans tag.
    • The notrans tag might be considered non-translatable and not intended to contain other inline tags, which causes the error.

    <p>This is a sample text with a non-translatable tag 
      <notrans><MadCap:variable name="VariableName"/></notrans> 
      inside it.
    </p>
    

    In this example, the MadCap:variable tag is nested within a proper inline tag such as span.

    • The MadCap:variable tag is inside a span tag, which is a standard inline tag.
    • This structure ensures that the MadCap:variable tag is properly nested within an appropriate inline tag, resolving the error.

    <p>This is a sample text with an inline tag 
      <span><MadCap:variable name="VariableName"/></span> 
      inside it.
    </p>
    

    To correct it, because the files themselves are fine and well formed which is why you don't see anything wrong with them, you need to do something like this.

    1. Open the File in  text editor:

      • Open the file(s) where the issue might be occurring in a text editor (e.g., EditPadPro, Notepad++, VS Code).

    2. Use the Search Function:

      • Press Ctrl + F to open the search dialogue.
      • Type MadCap:variable into the search box.
      • Click "Find All" or "Find Next" to locate instances of the 'MadCap' tag.

    3. Examine the Tags:

      • Navigate to each instance of the 'MadCap' tag.
      • Check the surrounding tags to ensure that the 'MadCap' tag is correctly placed within an inline tag.

    4. Correct the Structure:

      • If you find 'MadCap' tags within inappropriate parent tags, move or adjust the tags to follow the correct structure.
      • Save the changes once you have corrected the structure.
    My theory is Trados is treating the file as a plain HTML file - which is NOT what I want.

    I don't think that's what it's doing.  If it was you probably would not get this problem as the files are well formed.  But because these are Madcap files they need to follow the rules defined by Madcap and by the sounds of it they don't.

    So you have a bit of a task ahead of you if you have many files and they are large with heavy use of this variable.

    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

    emoji
  • Thanks for your detailed reply Paul.

    I've just realised the error message refers to "Structure tag MadCap:variable" - when according to the parser it is an inline tag - I definitely have issues with that error message Slight smile

    I've checked the "XML 2:MadCap Compliant" file parser in the Trados options (not project settings) and looking down the list of parent tags of "MadCap:variable" these are defined as in-line:

    MadCap:toggler - a - cite - code - em

    According to the "XML 2:MadCap Compliant" file parser all 5 of these are "Translatable (except in protected content)" - the help says this means "Translatable unless the parent element is not translatable. Effectively the same as Not Specified". I've followed each descendent tag back to HTML tag and all are translatable. 

    The error says the MadCap:variable is  "inside inline not translatable tag code" (my interpretation of this is to say that MadCap:variable is inside an in-line tag which is configured as not translatable) - maybe that's not correct?

    The parser says all parent tags where MadCap:variable is used are indeed translatable.

    Both can't be right can they?

    Thanks

    Mark

    emoji
Reply
  • Thanks for your detailed reply Paul.

    I've just realised the error message refers to "Structure tag MadCap:variable" - when according to the parser it is an inline tag - I definitely have issues with that error message Slight smile

    I've checked the "XML 2:MadCap Compliant" file parser in the Trados options (not project settings) and looking down the list of parent tags of "MadCap:variable" these are defined as in-line:

    MadCap:toggler - a - cite - code - em

    According to the "XML 2:MadCap Compliant" file parser all 5 of these are "Translatable (except in protected content)" - the help says this means "Translatable unless the parent element is not translatable. Effectively the same as Not Specified". I've followed each descendent tag back to HTML tag and all are translatable. 

    The error says the MadCap:variable is  "inside inline not translatable tag code" (my interpretation of this is to say that MadCap:variable is inside an in-line tag which is configured as not translatable) - maybe that's not correct?

    The parser says all parent tags where MadCap:variable is used are indeed translatable.

    Both can't be right can they?

    Thanks

    Mark

    emoji
Children