XML and the BL Compiler
- From: Marcel van der Boom <marcel (at) hsdev.com>
- Date: Tue, 14 Nov 2006 09:26:09 +0100
Brian Bain wrote:
> My template looks something like this:
>
> <#$element#>
> <item id="#$id#" name="#$name#" />
> </#$element#>
>
> Essentially the $element is the ID of one of any number of on screen
> select boxes and the item is an option to be added to the select box.
> The whole thing works if I replace #$element# with a hardcoded text string.
>
> Is there a more appropriate way to handle this? Has there been any
> thought with respect to this type of issue going forward?
In the 2.x branch i have defined the beginnings of a xar:element tag.
Your template with your example would look like this:
<xar:element name="#$element#">
<item id="#$id#" name="#$name#" />
</xar:element>
The handler to produce this is not very complicated and you could port
it back to your 1.x installation. The 2.x implementation looks
something like this:
http://pastie.textmate.org/22624
marcel
PS
similar to xar:element there will also be a xar:attribute tag which
generates attributes, but that tag is much harder to implement, if not
impossible in BL1
_______________________________________________
Xaraya_devel mailing list
Xaraya_devel (at) xaraya.com
http://xaraya.com/mailman/listinfo/xaraya_devel