I can't lock embedded content in XML files

Hello,

I feel like this is a really basic issue. I hoped that Studio would easily recognize my file type and lock embedded content all alone but it doesn't and though I read a very interesting post from Paul Filkin (https://multifarious.filkin.com/2014/06/01/custom-xml/), I still can't seem to be able to do it properly. 

I am now wondering if my file is a real XML (that's the extension anyway)?

Does anyone have a clue for me to lock all these codes?

Thank you very much

Regards,

Géraldine 

  • Hi ,

    It doesn't look as though you created any embedded content mechanism at all. You either have to link this to the html processor using a custom xml filetype, or create regex rules using the legacy custom filetype. In this case it looks as though the html filetype would do it. There may be some more complex issues at work depending on the source file itself, but let's exhaust the obvious first.

    Perhaps you can explain in simple steps what you did and then we can explain what you missed. There's no point in me repeating what I already did in the blog post so let's see if we can identify the steps you missed.

    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

  • Thank you so much for addressing my question so quickly. I'm very grateful as I'm starting a new big project on the long-term and need some long-term solution ;-) I'll get hundreds of files like this one.

    To start with, I have Studio 2017.

    Note that the first code line in my file say:
    <?xml version="1.0" encoding="UTF-8" ?>
    However, I also see: DOCTYPE html.

    Seeing the file extension as .XML, I first went into: File --> Options --> File Types --> I tried each of the XML types (also each type of HTML). I assumed "Any XML" was the best option.

    For each of them, I went under "Embedded content" and ticked "Enable embedded content processing".

    Whenever possible I added the rule with:
    </?[\p{Ll}\p{Lu}]\w*[^<>]*>
    as a non-translatable placeholder, to no avail.

    I then followed your script which I refered to in your post and tried creating a new "filetype" from scratch but was stuck in the parser section. I can send you the *.sdlftsettings file I created if it's of any help. I'm no expert here unfortuntely so I might be stuck because of a detail I missed... in which case, I'm sorry to disturb you.

     

    Something puzzling about "my" files is that all brackets <...> are shown as entities, I wonder if this is not misleading for identifying tags:


    Thank you again
    Géraldine

  • Hello again Paul,

    I've just heard from our customer that they're going to send me XLIFF files. They apparently sent XML files by mistake. Let's see what I get then. If I'm in trouble again, I will make a new move ;-)

    Thank you very much again

    Regards,
    Géraldine