Discussion Forums

Template Reference and Dictionary scope
Luigi Zangrandi / ATS S.p.A. <>
27 Jan 2012 12:23PM ET

I have some doubt about the dictionary scope when using the Template Reference Instruction.
For example, if I define a dictionary like this:

  <template name="Structure1" dictionary="template" >
    <string name="Field1" ><copy/></string>
  </template>

  <template name="Templ1" dictionary="template" id="1001">
    <group name="Group1">
      <templateRef name="Structure1"/>
    </group>
  </template>

  <template name="Templ2" dictionary="template" id="1002">
    <group name="Group2">
      <templateRef name="Structure1"/>
    </group>
  </template>

Suppose I have to encode just two messages: Templ1 and Templ2.

When encoding Templ2, the previous value of Field1 is in status undefined or is it assigned with the value given in the previous message (Templ1) ?
I mean: the dictionary of a Template Reference is the same of the container template?

Thanks in advance for your help.