[stringtemplate-interest] Broken link: StringTemplate 3.0 Printable Documentation/Conditionally Included Subtemplates (IF statements)

Terence Parr parrt at cs.usfca.edu
Wed Jan 16 12:29:20 PST 2008


On Jan 16, 2008, at 7:25 AM, Stefan Eder wrote:

> Hi,
>
> there is a broken link ("Conditionally Included Subtemplates (IF
> statements)") within the "StringTemplate 3.0 Printable Documentation".
> And within the online documentation I have not found the the answer on
> my question:
> Which expressions are supported in IF/ELIF statements?
> Can I compare an attribute with a constant?

Hi Stefan,

ST does not allow expressions except references to attributes,  
templates, or !attribute. No comparisons.

> - If so, what kind of constants are supported (strings,  
> integers, ...)?
> -- If so, how to express them?
> - If so, what kind of operators are supported (EQUAL, NOT_EQUAL,
> LESSTHAN, ...)?

none, that is perhaps you confusion.  I think you should read more  
about the philosophy of ST where I discussed the separation of logic  
from view.  All logic must be in the model not the view.

Ter


More information about the stringtemplate-interest mailing list