Schema change: Converting content defined formerly as attribute to element

Due to a Schema change, content formerly kept in an attribute and now defined as an element gives me in my leverage test with new filter parsing definitions no 100% matches any longer.

That poses a problem as the content itself has not changed. What I would like to identify is a method to process the data as "What has been considered attribute content in the filetype/parser before is now element content" 

Here the example of the before and after: 

Old Schema

<Sentence>Use <inlineGraphic><Graphic href="SomeArt/foo.png" alt="the description to translate"></Graphic></inlineGraphic> with any of the answers.</Sentence>

New Schema

<Sentence>Use <Image href="SomeArt/foo.png"><AltText>the description to translate</AltText></Image> with any of the answers.</Sentence>

In the old schema we had the parser rule defined as an attribute "alt" and the translation could occur outside the body sentence. In the TMX that translated as a subset TU kept apart from the main sentence. The attribute content itself was represented with "placeholder info" in the main sentence.

In the new schema the content of the AltText is simply inline content and therefore part of the body sentence. 

What are the options to configure & optimize the leverage process so that I get again 100% matches?

Parents
  • Hi Michael,

    I hate to see questions unanswered in here so am gong to start the ball rolling with a suggestion.  We think this is probably not going to be possible by editing the filetype in such a way that you now get 100% matches because the information is relayed to the TM in a different way.  So your options are most likely going to involve exporting your TM to TMX and then manipulate the TUs with a little regex or a script so you improve the leverage that way.

    It's a tricky one, but perhaps some of our more technical people like  or have a clever idea!

    Regards

    Paul

    Paul Filkin | RWS

    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

  • Hi Michael,

    Does the surrounding text always vary? (By surrounding, I mean the text on either side of the Image tag)
    If this is the case, I think the only option would be to introduce a step where you convert <AltText> to a placeholder before translation and then convert back to an element afterwards.
    This could be done using a custom script or plug-in in Trados.
  • Hi Jesse,
    Correct, the element combination <image><alttext> is always an inline element set, and surrounded by more or less varying text. That would include sentences where the combination would only be followed by a marker like a full stop. How would your "placeholder" look like in the string? And would that not still have impact on the matching and return mostly fuzzy matches no matter how generous I would be with penalty settings?

    Thanks for your suggestions!
    Michael
Reply
  • Hi Jesse,
    Correct, the element combination <image><alttext> is always an inline element set, and surrounded by more or less varying text. That would include sentences where the combination would only be followed by a marker like a full stop. How would your "placeholder" look like in the string? And would that not still have impact on the matching and return mostly fuzzy matches no matter how generous I would be with penalty settings?

    Thanks for your suggestions!
    Michael
Children