Substituted attribute names (and tag names)?

Substituted attribute values let you use a transclusion or filter for an attribute’s value:

<div
class="demo"
filter=`${[[5]add[2]]}$`
>
hey
</div>

which will render the filter attribute as 7.

Is there a feature like this for substituted attribute keys or tag names? For example:

<div
`${[[test]]}$`=3
>
hey
</div>

or for tag names:

<`${[[div]]}$`>
hey
<\`${[[div]]}$`>

This would be useful for dynamically building up an HTML tree without knowing tag names or attribute names ahead of time. Does this feature exist? It didn’t work at a first try (at least, the above syntax doesn’t).

Have a look at the genesis widget.

2 Likes

Of course - I remember hearing about that, but didn’t connect the dots. For anyone who lands here with searching:

<$genesis
$type=`${[[div]]}$`
$names=`${[[test]] [[test2]]}$`
$values="1 2"
>
hey
</$genesis>

is the syntax for getting what I cited above.

Thanks Saq!