jengfad
jengfad

Reputation: 734

What is <context-group> in xliff

I noticed that upon generating an xliff file, it created nodes named context-group. I'm not sure what they are used for.

     <trans-unit id="edc96753971323c438706da1820e74730a79d1af" datatype="html">
        <source>Your response to this survey has already been recorded. Thank You.</source>
        <context-group purpose="location">
          <context context-type="sourcefile">app\core\forbidden.component.ts</context>
          <context context-type="linenumber">5</context>
        </context-group>
        <note priority="1" from="description">Message for survey already taken</note>
        <note priority="1" from="meaning">Survey Already Taken Page</note>
      </trans-unit>

Upvotes: 0

Views: 1128

Answers (1)

d.moncada
d.moncada

Reputation: 17402

The <context-group> element holds context elements relating to the level in the tree in which it occurs. Thus context can be set at a <group> level, a <trans-unit> level, or a <alt-trans> level. Each <context-group> element may be named, allowing different uses for each group. When the <context-group> is named, these uses can be controlled through the use of XML processing instructions. Because the <context-group> element may occur at a very high level, a default context can be established for all <trans-unit> elements within a file. This default can be overridden at many subsequent levels. The optional name attribute may uniquely identify the <context-group> within the <file> element. The optional crc attribute allows a verification of the data. The optional purpose attribute indicates to what use this context information is used; e.g. "match" indicates the context information is for memory lookups.

For more info, see: http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#context-group

Upvotes: 1

Related Questions