[stringtemplate-interest] Is there way to call templates from another group without inheritance?
Dreyer Ulf (CR/APA3)
Ulf.Dreyer at de.bosch.com
Tue Sep 11 05:22:06 PDT 2007
Hi,
I'm working on a system where the user (not necessarily an accomplished
developer)
can write own templates / templategroups.
I'd like them to be able to call other templates in different groups
without using
inheritance.
Example: user A writes a template group that generates Component A (
or Webpage A or whatever)
user B writes a template group that generates
Component B ( or Webpage A or whatever)
now User C would like to write a template with the output A; B.
Preferably by writing something like combinedTemplates :== <<
<A.main()>; <B.main()> >>
(Assuming "main" is the generating template in groups A and B)
If I'm correct this is
a) not possible if neither group A nor group B inherit from one
another.
b) possible if B inherits from A but ONLY if C inherits B and none of
them uses
the same names for templates.
Is there an way to handle this nicely?
My idea would be to mangle the names of the templates with their
group and create a temporary group containing all templates. This
solution will very likly turn out to be messy.
Ulf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org:8080/pipermail/stringtemplate-interest/attachments/20070911/b546ad9a/attachment.html
More information about the stringtemplate-interest
mailing list