Hey Ter,

thanks a lot. For a full model-to-text transformation you can then merge the model's object tree and the corresponding template at the top of the hierarchy, and the latter then pulls in further more fine-grained templates as it is proceeds. And this is exactly what XPAND or much rather oAW does, where you also (in their workflow XML) associate model root and template root. I know (or better I have read a bit) that oAW can do a lot of very advanced things, but I currently feel that ST is much easier to get to. Needless to say that I am living in .NET country most of the time... :-) So thanks for this tool.

Still have an issue left though: on a different project I am using Microsoft's T4 code generator from their DSL tools. If you don't know anything about it just think of ASP/JSP generators or JET in Eclipse, templates look like "<% code %> literal text <%= value %>" and so forth. The ability to put in code does allow for bad style, but:

In addition to just querying attributes from the context, you can also pass parameters to (query) functions. And this is mandatory in our case. Our input data is XML and the templates emit portions from the XML by referring to XML nodes through XPATH. So in a template you might find something like

DoIt() first parameter: <%= Value( "//[EMAIL PROTECTED]'DoIt']/Parameters[0]" ) %>.

Where Value( string xpathExpr ) is such a query operation to get the referenced data from the XML. The problem is that we have a lot of templates that all need different data portions so hardcoding those queries in form of getters is not an option.

Can ST do this as well?

Thanks,
Mike

PS: Should I post to the ST list instead?

Terence Parr schrieb:
I'm sure I've done this myself somewhere.  It's easy and cool.

<obj.methods:{ m | method <m.name>}>

etc...

ST easily walks the java reflection structures.

Ter

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "il-antlr-interest" group.
To post to this group, send email to il-antlr-interest@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address

Reply via email to