\RequirePackage{template} \DeclareTemplateType{xxx}{0} \DeclareTemplate{xxx}{test}{0} { xkey=n \xkey, key =i {yyy} \value } { \DoParameterAssignments \show\xkey \show\value \value } \DeclareTemplateType{yyy}{0} \DeclareTemplate{yyy}{foo}{0} { keya =L \foo } { \DoParameterAssignments \show\foo } \DeclareInstance{xxx}{bar}{test} { xkey = \UseTemplate{yyy}{foo}{ keya = 20pt }, key = \UseTemplate{yyy}{foo}{ keya = 10pt } } \ShowInstance{xxx}{bar} \UseInstance{xxx}{bar} \stop