Discussion Forums

Re: Template References and passing value to the Referenced Template
David Rosenborg / Pantor Engineering AB
29 Apr 2010 3:56AM ET

Hi!

No, the FAST template syntax doesn't include any support for parameterized templates. You'll either have to specify the constant field separately as in

<string name="MsgType"> <constant value="X"/> </string>
<templateRef name="Common"/>

or you can choose to preprocess your extended format using for example XSLT to produce conforming templates.

/David

> Is it possible to pass arguments to a common template referenced in
> other templates. Something like below?
>
> <template name="Common" msgType > <string constant value=msgType>
> </template>
>
> <template name="Msg1"> <templateRef name="Common" msgType='X'> ...other
> fields for this template </template>
>
> <template name="Msg2"> <templateRef name="Common" msgType='W'> ...other
> fields for this template </template>
>
> Regards, Darshan


Re: Template References and passing value to the Referenced Template
David Rosenborg / Pantor Engineering AB   29 Apr 2010 3:56AM ET