Information storage

When the xlt file is saved, an OP INCLUDE and parameters FILE, REPLACE_IN, REPLACE_OUT, IN and OUT are added.

FILE specifies the sub-translation file.

IN/OUT specifies the Source/Destination prefixes in the host xlt file.

REPLACE_IN/REPLACE_OUT specify the Source/Destination prefixes in sub-translation file. In Runtime, the engine replaces the prefix specified by REPLACE_IN/REPLACE_OUT with the one specified by IN/OUT for Source/Destination.

For example, the sub-translation file (pid.xlt) contains:

{ { OP COPY } 
    { ERR 0 }
    { IN 0(0).PID(@s).#1(0) }
    { OUT Field_Field }
}
{ { OP COPY } 
    { ERR 0 }
    { IN 0(0).PID(@s).#5(0) }
    { OUT Field_Field1 }
}
{ { OP COPY } 
    { ERR 0 }
    { IN 0(0).PID(@s).#8(0) }
    { OUT Field_Field2 }
}

The main xlt file contains:

{ { OP ITERATE } 
    { BASIS 0(0).PID }
    { VAR %s }
    { TYPE segment }
    { BODY {
        { { OP COMMENT } 
            { COMMENT {TODO: Insert new actions here} }
        }
        { { OP COPY } 
            { ERR 0 }
            { IN {{$%s}} }
            { OUT =@s }
        }
        { { OP INCLUDE } 
             { FILE pid.xlt }
             {REPLACE_IN {}}
             {REPLACE_OUT {}}
             {IN {}}
             {OUT {}}
       }
   }}
}