You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by mishy <mi...@yahoo.com> on 2008/08/06 14:35:15 UTC
extract context
Is there any way to use Velocity or other tool to get a text input, a given
Velocity template and other needed configs and finally return the used
Context objects?
Or simple: how to extract useful info based on templates?
Currently i use Velocity to evaluate the template based on context,
something like this:
Velocity.evaluate(template, Map(varName:obj)) => output .
What i'm looking for would be something like:
Velocity.parse(output, template, Map(varName:obj.class)) => Map(varName:obj)
that then applied to template to get output
Hope there is something like this :).
Thanks
--
View this message in context: http://www.nabble.com/extract-context-tp18850250p18850250.html
Sent from the Velocity - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org
Re: extract context
Posted by Will Glass-Husain <wg...@gmail.com>.
Mishy--
I haven't seen anything turnkey with this functionality. You could create a
custom ReferenceInsertionEventHandler and InvalidReferenceEventHandler that
logs all references in a template.
WILL
On Wed, Aug 6, 2008 at 5:35 AM, mishy <mi...@yahoo.com> wrote:
>
> Is there any way to use Velocity or other tool to get a text input, a given
> Velocity template and other needed configs and finally return the used
> Context objects?
> Or simple: how to extract useful info based on templates?
>
> Currently i use Velocity to evaluate the template based on context,
> something like this:
> Velocity.evaluate(template, Map(varName:obj)) => output .
> What i'm looking for would be something like:
> Velocity.parse(output, template, Map(varName:obj.class)) =>
> Map(varName:obj)
> that then applied to template to get output
>
> Hope there is something like this :).
> Thanks
>
> --
> View this message in context:
> http://www.nabble.com/extract-context-tp18850250p18850250.html
> Sent from the Velocity - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>
--
Forio Business Simulations
Will Glass-Husain
wglass@forio.com
www.forio.com