Discussion Forums

Re: templateRef & dictionaries
David Rosenborg / Pantor Engineering AB
21 Sep 2006 11:24AM ET

Hi Sergey -

The Target and Sender fields will use a separate dictionary from the MDReqID field.

The "current template" changes as you follow a template reference. This is described in the second paragraph of section 6.4 in the specification: "A static reference specifies that processing should continue with the referred template as the current template."

BTW, the name of the attribute is just dictionary as in dictionary="template". Another tip: it is possible to inherit the dictionary attribute from an ancestor element as in:

<template name="MessageHeader" dictionary="template">
  <string name="Sender"> <copy /> </string>
  <string name="Target"> <copy /> </string>
  <string name="MsgType"> <copy dictionary="message" /> </string>
  ....
</template>

Best regards,
David

> Hi, Could you please clarify following question: Does "templateRef" XML
> element acts like MACRO and just insert text of the referenced template
> into the original template?
>
> In XML it looks like this: <template name="MessageHeader"> <string
> name="Sender"> <copy dictionaryAttr = "template" /> </string> <string
> name="Target"> <copy dictionaryAttr = "template" /> </string> <string
> name="MsgType"> <copy dictionaryAttr = "message" /> </string> ....
> </template>
>
> <template name="Market Data - Snapshot/Full Refresh"> <messageRef
> name="W"/> <templateRef name="MessageHeader" /> <string name="MDReqID">
> <copy dictionaryAttr = "template"/> </string> ... </template>
>
> Does fields Target, Sender and MDReqID will use same dictionary?
> Or Target and Sender fields will use seperate dictionary than
> MDReqID field?
>
> Thank you.


templateRef & dictionaries
Sergey Mikhailik   21 Sep 2006 9:54AM ET
Re: templateRef & dictionaries
David Rosenborg / Pantor Engineering AB   21 Sep 2006 11:24AM ET
Re: templateRef & dictionaries
David Rosenborg / Pantor Engineering AB   21 Sep 2006 11:46AM ET
Re: templateRef & dictionaries
Sergey Mikhailik   21 Sep 2006 12:11PM ET
Re: templateRef & dictionaries
David Rosenborg / Pantor Engineering AB   21 Sep 2006 12:34PM ET