Questions tagged [stringtemplate]

A templating language which strictly enforces model/view separation

StringTemplate is a Java based templating language (with ports in Python, C#, Ruby, Scala) that strictly enforces model/view separation. See the whitepaper for more details.

264 questions
0
votes
1 answer

Code generation using string template

I am trying to use string template to generate Pig/Hadoop code. Since I am a novice I couldn't figure it out myself. Any help will be appreciated. I have a List of LocalDate like one show below List dates = Arrays.asList("20100101",…
user3138594
  • 209
  • 3
  • 9
0
votes
1 answer

How to show or hide a TR tag in Antlr String Template using If Else

The following is the antlr string template code which I am struggling over. I have a property Item.AmountPaid which might have data (or) could be blank sometimes. So when it has no data I should show Disabled TR and hide Enabled TR and vice-versa.…
Bhargav
  • 124
  • 6
  • 19
0
votes
1 answer

Stringtemplate - use conditionals without adding newlines to the output, and still keep templates legible?

I have something like this: properties(attributeInfo) ::= << private ; >> parameters(attributeInfo) ::=…
rbellamy
  • 5,683
  • 6
  • 38
  • 48
0
votes
2 answers

How do I turn on syntax highlighting for StringTemplate templates (*.st) in intellij?

I have a string template file (.st) in IntelliJ that I would like to see syntax highlighting on. How can I turn this on? I can't seem to find it anywhere.
ztoben
  • 61
  • 5
0
votes
1 answer

Performance of creating XML using StringTemplate?

I'm developing an application which uses different components to create an XHTML document, I used StringTemplate for creating the document data of the components and then combined them into a one large document. This is an example of a…
Deniz Acay
  • 1,609
  • 1
  • 13
  • 24
0
votes
1 answer

StringTemplate conditional statement can't support similar id>0?

Recently I use stringtemplate,I noticed StringTemplate can't support complex conditional,similar value>1 or value="menu" etc. who can give me a advise how to work?thanks.
zhengchun
  • 1,261
  • 13
  • 19
0
votes
2 answers

Using expression as a keyword argument for String Template identifiers (Python)

I am using standard library string template. From the template, I make a list that contains all the identifiers. For example: list_of_identifiers = ['id', 'username', 'url'] I want to iterate this list to substitute the template identifier. xml =…
Megool
  • 963
  • 2
  • 8
  • 29
0
votes
1 answer

StringTemplate C# elseif bug?

I use StringTemplate version 3. I have the following template: Test