stringtemplate Questions

2

Solved

In StringTemplate 4, the default behavior for iteration is to iterate over the keys instead of the values, which was the behavior in version 3. I can not find the syntax for how to iterate over th...
Eden asked 25/8, 2015 at 19:54

1

Solved

If I have an AST and modify it, can I use StringTemplates to generate the source code for the modified AST? I have successfully implemented my grammar for Antlr4. It generates the AST of a source ...
Balustrade asked 7/7, 2016 at 9:53

1

Solved

I tried to make my own template for mutate_model.py script (http://salilab.org/modeller/wiki/Mutate%20model) by using python string template where I substituted values for these five variables Mode...
Smile asked 10/6, 2016 at 16:18

8

I'm using MessageFormat to format some addresses with a template like this: "{0}\n{1}\n{2}\n{3}, {4} {5}" where 0 = street 1 1 = street 2 2 = street 3 3 = city 4 = state 5 = zip Most of thes...
Curve asked 6/11, 2008 at 21:38

1

Solved

I use the grammar Java.g from the ANTLR wiki produces a lexer and parser for Java source files.Then use the following code to generate an abstract syntax tree (AST). ANTLRInputStream input = new ...

3

Solved

I am trying to create a simple XML-Template which so far only consists of: <?xml version="1.0"?> I read the file like this: STGroup group = new STGroupDir("templates"); ST st = group.ge...
Naara asked 2/5, 2012 at 13:20

3

Solved

I am trying to use StringTemplate in a java web app to generate html emails. When trying to enter line breaks, I use \<br\> This does not seem to be working. \<b\> is not working as wel...
Darbie asked 13/12, 2011 at 13:54

2

Yes, I know that this has been asked before. But most of the questions were two years ago, and there's got to be a better answer today. I need a template language for rendering HTML. Require...
Fifteen asked 9/5, 2012 at 21:28

2

Solved

I'd like to do some code generation, and StringTemplate looks like a pretty good tool for the job. I easy_installed stringtemplate3 from PyPi, but when I try to import it I get: ImportError: No m...
Mulry asked 4/3, 2011 at 20:27

2

Solved

Can someone explain why this does not work ? StringTemplate query = new StringTemplate("hello " + "$if(param==\"val1\")$" + " it works! " + "$endif$ " + "world"); query.setAttribute("par...
Tetracaine asked 16/11, 2010 at 15:34

1

Solved

In my current project, I am trying to link the DSL specification written in xtext and code generator written in StringTemplate. for instance, the syntax of my DSL specification is as follows. I am...
Bentwood asked 6/6, 2012 at 15:30

2

Im interested in writting something similar to a nested loop using StringTemplate template engine. In C# have a HashTable of which each Key contains List of Document objects, each Document has a ti...
Carlycarlye asked 24/2, 2010 at 12:7

4

Solved

I'm creating an email using String Template but when I print out a date, it prints out the full date (eg. Wed Apr 28 10:51:37 BST 2010). I'd like to print it out in the format dd/mm/yyyy but don't ...
Bangalore asked 28/4, 2010 at 10:30

5

It's hard to see how StringTemplate integrates easily (or not) with popular Java web MVC frameworks. Which Java MVC frameworks integrate easily with StringTemplate? A good answer: mentions one ...

7

Solved

I need to print a "b" c with the vebatim string, I posed another question about multiple line code template here. I tried with verbatim string as follows : using System; class DoFile {...
Piping asked 13/5, 2011 at 18:46

3

Solved

Possible Duplicate: How to escape brackets in a format string in .Net How do I put { or } in verbatim string in C#? using System; class DoFile { static void Main(string[] args) { ...
Prader asked 13/5, 2011 at 19:36

1

Solved

does anyone know how to use StringTemplate with forms in SpringMVC framework? Any tips, tutorials...?
Bubo asked 12/5, 2011 at 14:34

1

Solved

I'm trying to flesh out a wikitext-to-HTML translator in ANTLR 3, but I keep getting stuck. Do you know of a working example that I can inspect? I tried the MediaWiki ANTLR grammar and the Wiki Cr...
Gates asked 26/1, 2011 at 22:44

2

Solved

The net seems to be full of comparisons between Velocity and FreeMarker, and they seem to be reasonably equivalent. But there seems to be almost no comparisons between StringTemplate and FreeMarker...
Corri asked 18/9, 2010 at 11:58

2

Solved

I've just started using StringTemplate in my C# project. I went through the documentation, but I can't seem to find a way to implement this simple scenario: I have a list of simple business ...
Gonta asked 11/5, 2009 at 9:17

1

Solved

I haven't been able to find a good example of subclassing string.Template in Python, even though I've seen multiple references to doing so in documentation. Are there any examples of this on the w...
Kendyl asked 26/8, 2009 at 18:54

14

Solved

I am exploring ASP.NET MVC and I wanted to add jQuery to make the site interactive. I used StringTemplate, ported to .Net, as my template engine to generate html and to send JSON. However, when I v...
Histrionism asked 6/10, 2008 at 4:30
1

© 2022 - 2024 — McMap. All rights reserved.