[stringtemplate-interest] Indirect attribute lookup
Roman Odaisky
roma at qwertty.com
Sat Sep 6 15:03:17 PDT 2008
Hi,
> > the idea was to be able to write
> > $tag(id={some-id}, title={some-title})$
> > and to get
> > <tag id="some-id" title="some-title" />
> Can you pass in a map instead of parameters directly?
>
> $foo(amap={...}, id=it)$
>
> the use $amap.(id)$ or somethign?
First of all I wanted to simplify life for the template designer. That is,
he’d write $something:img(alt={photo}, width={42}, height={42})$ and that
would translate into obvious HTML.
And my second concern was simplifying my life :-), because I ended up writing
$width:{width="$it$" }$$height:{height="$it$" }$...
which is repetitive and not too entertaining.
As you can see, there’s no map involved.
--
WBR
Roman.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2286 bytes
Desc: not available
Url : http://www.antlr.org:8080/pipermail/stringtemplate-interest/attachments/20080907/35a978f2/attachment.bin
More information about the stringtemplate-interest
mailing list