On 22 déc. 2010, at 09:08, Antonio Petrelli wrote: > 2010/12/20 Jean-Baptiste BRIAUD -- Novlog <[email protected]>: >> Before processing a template, I need to have a list of all variables needed >> by the template. >> I had to proceed to complex validation. >> ... >> The reason why I need that : the end user can upload a template. > > Sorry for the late response, but I was thinking about your question > and it has not a good answer. > For example, suppose that you use a #set directive, or a tool that > fills one variable, have you got to remove it from the list of > variables? > So, I think that you might create a tool, or a custom directive, to > say that you "require" a particular special object and put it in your > template context. > > Antonio > Hi Antonio,
Unfortunately, I can't do that because I can't force a user not to forget one #require. Also to validate the #require are all there, I'll need to get the list of all variables :-) I'll try the template AST walker approach. Thanks ! --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
