Passolo 2016 XML Parser - can I have a composite ID made up from the value of an attribute, plus some literal text?

If my XML source is this:

<element id="fred" label="translate this label" description="translate this description"/>

I can add these 2 data elements to the parser no problem:
element/attribute::label
element/attribute::description

But I'd like the first entry to have an ID of "fred_label" and the second entry to have an ID of "fred_description".

I'm not sure if this is possible but it would help if it was.
Regards
Mark

Parents
  • No, this is not possible for XML structures where the translatable content is stored in attributes. As described in Yves Savourel’s book XML Internationalization and Localization the best practice should be to store all translatable content in elements.

    If this is the case you can achieve the desired behavior.

    <element id="fred">
        <label>translate this label</label>
        <description>translate this description</description>
    </element>

    With the option Append element name to ID

    Trados Studio XML Data Element dialog box showing Element name dropdown with 'elementlabel' selected, ID field with '..@id' entered, and 'Append element name to ID' checkbox checked.

    you will get IDs like fred.label and fred.description.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 5:10 AM (GMT 0) on 5 Mar 2024]
Reply
  • No, this is not possible for XML structures where the translatable content is stored in attributes. As described in Yves Savourel’s book XML Internationalization and Localization the best practice should be to store all translatable content in elements.

    If this is the case you can achieve the desired behavior.

    <element id="fred">
        <label>translate this label</label>
        <description>translate this description</description>
    </element>

    With the option Append element name to ID

    Trados Studio XML Data Element dialog box showing Element name dropdown with 'elementlabel' selected, ID field with '..@id' entered, and 'Append element name to ID' checkbox checked.

    you will get IDs like fred.label and fred.description.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 5:10 AM (GMT 0) on 5 Mar 2024]
Children