Hi Ahmed
Thank you for your reply. I think this could be possible but I will have to
work on it because now it doesn't recognize when a foreach-Block ends.
I think it has to know this because if you have for example #foreach($day in
${days}) you don't want to include the variable ${day} in the list but
rather ${days}.
Do you agree with me?
Greetings
Simon
On Mon, May 12, 2008 at 12:34 PM, Ahmed Mohombe <[EMAIL PROTECTED]> wrote:
> I have written a small tool that scanns velocity-files and extracts all
> > called variables.
> >
> Very nice, thank you.
>
> It's a command-line tool, you can execute it like this:
> >
> > java -jar TemplateAnalyzer.jar folder1 folder2
> > In folder1 are your velocity files to analyze, in folder2 the tool will
> > generate velocity-files with the same name as in folder1 but only with
> > the
> > accessed variables as content.
> >
> Would you consider adding a simple and *documented* API about how to use
> it directly from code? (E.g. to get a List with all variables from a
> specific template?)
>
> This would be very usable for "user written templates" like CMSes to check
> if the
> user in it's code is accessing only allowed variables :) (and e.g. only
> than to allow upload/save on the server).
>
> Thanks in advance,
>
> Ahmed.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>