http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1587 *** shadow/1587 Tue May 1 08:48:24 2001 --- shadow/1587.tmp.27494 Tue May 1 08:48:24 2001 *************** *** 0 **** --- 1,38 ---- + +============================================================================+ + | Macros from separate templates conflict | + +----------------------------------------------------------------------------+ + | Bug #: 1587 Product: Velocity | + | Status: NEW Version: 1.0-Release | + | Resolution: Platform: PC | + | Severity: Normal OS/Version: Windows NT/2K | + | Priority: Component: Build | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + We have two templates, which each parse a third template (called style.vm) + which we put in the top of every template we create. + + style.vm has some basic variables declared in there to define colours and other + such layout-related things, nothing major. No macros. + + The two templates, however, have more code including macros. + + What I've noticed is that these two templates can't declare macros with the + same names. In other words, if I create a macro in one of them with a certain + name, ex VELOC, then I can't create a macro VELOC in the other template, + because it'll do what the first one does. My impression, though, is that these + templates should have their own namespace because they don't include each + other. They do, however, include the common "style.vm" I mentioned, which might + be the issue. + + This one showed up because we did in fact create two different macros (in two + templates that have nothing to do with each other) of the same name, and one of + them was showing the wrong information. Changing the macro name fixed the + problem as a workaround, but managing this when we're planning to have hundreds + of templates is not an option. Each template should have its own macro + namespace to prevent conflicts like this.
