XLF: can I lock the content between a bpt and an ept tag?

I have an XLF file (created in Madcap Paligo) which contains variables/placeholders.

<bpt id="N669f69fb77c5e" equiv-text="productname"><productname></bpt>Triview BV<ept id="N669f69fb77c5e"></productname></ept>

The placeholder starts with a bpt tag pair and ends with an ept tag pair. We want to lock this segment.

I've modified the XLIFF 1.1-1.2 v 2.0.0.0 filter: on the Embedded Content page I've added this rule:

tag type: placeholder

regular expression:

<bpt id="\w+" equiv-text="productname"><productname><\/bpt>Triview BV<ept id="\w+"><\/productname><\/ept>

I've tested the regular expression via regex101.com. The regex seems to work correctly: it selects the entire segment from the start of the bpt node to the end of the ept node.

But in the preview, the segment is still shown as editable text.

Test file:

<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-strict.xsd">
  <file original="https://test.com/translate/132823/target/de/source/en" source-language="en" target-language="de" datatype="xml" product-name="uuid:UUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx;u:3" date="2024-07-23T09:29:47Z">
    <body>
      <trans-unit id="UUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" reformat="yes">
        <source><bpt id="N669f69fb7194b" equiv-text="productname"><productname></bpt>Engine 5.1 PRO<ept id="N669f69fb7194b"></productname></ept></source>
        <target state="needs-translation"/>
      </trans-unit>
      <trans-unit id="UUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" reformat="yes">
        <source>All rights reserved. This manual is protected by applicable copyright law and international treaty provisions. <bpt id="N669f69fb77c51" equiv-text="productname"><productname></bpt>Triview BV<ept id="N669f69fb77c51"></productname></ept> is the sole proprietary owner of this manual, its contents and related intellectual property, including, but not limited to, creative work, designs, patents and trademarks. No parts of this work, including but not limited to, design, technical solutions, trademarks, graphic, electronic or mechanical, may be reproduced in any form or by any means whether by photocopying, recording, taping, information storage and retrieval systems or otherwise, without the written permission of <bpt id="N669f69fb77c5e" equiv-text="productname"><productname></bpt>Triview BV<ept id="N669f69fb77c5e"></productname></ept>.</source>
        <target state="needs-translation"/>
      </trans-unit>
      
    </body>
  </file>
</xliff>

emoji
Parents Reply
  •  

    I would say that is might still be invalid... even if the parser handles it.  When using bpt and ept tags, the content between these tags should represent the actual content being tagged, not escaped HTML/XML entities.  Escaping the angle brackets (< and >) converts them to plain text, which may not be the intended use in this context.  The angle brackets should be used as part of the tags themselves to properly encapsulate the inline tags they represent.

    If escaping the angle brackets within bpt and ept tags is indeed the intended use, it suggests that the content within these tags is meant to be treated as literal text, not as actual XML tags. cHowever, this is unusual and not the standard practice for XLIFF files where bpt and ept are supposed to represent paired tags for inline elements.

    MapCap... MadFiles ;-)

    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
Children