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

Terence Parr parrt at cs.usfca.edu
Thu Jan 17 12:42:31 PST 2008


On Jan 17, 2008, at 1:20 AM, Stefan Eder wrote:

> Thanks Ter,
>
> I am a beginner with ST and I believe strongly that you are right.
> Logic should be in the model, not in the view.
>
> My model is XML. I unmarshal it with JAXB-2 into Java Beans.
> Principally a nice way to apply attribute trees, but the model is as  
> it
> is not complete for use with ST. For instance I have minOccurs and
> maxOccurs attributes and in dependency of maxOccurs I want to decide  
> if
> an instance variable of the child type or a list of those is  
> generated...
>
> The solution for me is now to design another XSD perfectly fitting my
> requirements with ST and use XSLT to transform my general purpose  
> model
> in such an ST attributes model.
> It easily solves my example problem by inserting another boolean
> attribute and has much more potential.
>
> Another question:
> Exists a list of reserved words which must not be used as attribute  
> names?
> I made the experience, that an attribute named length is not allowed  
> in
> ST(G)s.
> Such a list would be very helpful and could save me some time.

yeah, it bit me the other day too ;)  Hmm...I don't have a list;  
probably should start one in the wiki.

Ter


More information about the stringtemplate-interest mailing list