hi, This is the approach that I have being thinking about.
I'm keeping a hash table in the MacroFactory which has the mapping from template to the macro files i.e test_macro.vm -> macro_library1.vm, macro_library2.vm. When a user calls the template.merge with macro files I keep the information in that structure. Then I try to create a resource out of the macro library files, which ultimately build the node tree and add the macros to the macro manager. When macro is added in the MacroFactory I check whether the macro is in one of the macro library files (in the hash table). If it is in a macro library fie I'm replacing the macro library name with the main template name. But it seems that this approach is not working – I have done a test implementation, but it didn't work. Regards, Supun. <http://www.forio.com/>
