[stringtemplate-interest] ANTLR feedback
Terence Parr
parrt at antlr.org
Fri Sep 25 12:30:54 PDT 2009
Hi Brian,
Well, ST of the model really. It's up to you to provide a controller
that reads from the model and pushes into the template. you could do
something like $node.x$ where node is a node in the XML tree and then
property x would be the child named x. you could fake out ST this way
to make it read xml tree data.
Remember though that you really don't want to do processing in the
templates and by walking collocated XML data structures, you're kind
of combining the model/controller with the view.
Ter
On Sep 22, 2009, at 8:15 AM, brianhks1 at gmail.com wrote:
> timestamp=20090922_08.15.05
> email=brianhks1 at gmail.com
> name=Brian Hawkins
> ANTLRVersion=
> ANTLRWorksVersion=
> StringTemplateVersion=
> OS=
> JavaVersion=
> software=StringTemplate
> RemoteHost=174-23-151-81.slkc.qwest.net
> uploadedFile=false
> feedback=I have written several projects that generate source code
> using StringTemplate. String template is awesome.
>
> In every case I define my data in XML. I write the code to read the
> XML into java bean objects that can be passed to StringTemplate.
>
> It would be a lot easier if I could read the XML right from within
> StringTemplate. How difficult would it be to use xpath expressions
> instead of variable names in StringTemplate?
>
> Thanks
> Brian
>
>
More information about the stringtemplate-interest
mailing list