[jifty-devel] Idea for Template::Declare::XML

Andrew Sterling Hanenkamp sterling at hanenkamp.com
Thu Jul 19 09:34:07 EDT 2007


That's cool. I'm not sure why I hadn't thought to try that, even though I
finished reading Template::Declare::Tags and knew what that did.

On the other hand, for this to be a robust solution, this will need to be
enhanced still. Even the comments in the code admit that some of the
decisions being made are somewhat arbitrary and would be better made with
the help of HTML::TagSet.

On 7/19/07, Agent Zhang <agentzh at gmail.com> wrote:
>
> Hi, I've coded up a small script to use Template::Declare to generate some
> XML code (it's actually XUL, to be more specific):
>
>     http://perlcabal.org/agent/xul/buttons.pl.txt
>
> The output file is
>
>     http://perlcabal.org/agent/xul/buttons.xul
>
> The script used to run buttons.pl.txt is
>
>     http://perlcabal.org/agent/xul/xulgen.pl.txt
>
> It's a lot of fun. Essentially, I extended the tag set in
> Template::Declare::Tag by the following lines of code:
>
>     Template::Declare::Tags::install_tag($_) for qw(
>         window textbox hbox vbox radio radiogroup
>         groupbox spacer
>     );
>
> The tag list given above is by no means exhaustive. It's just an
> experiment. :)
>
> Here's another trivial example:
>
>     http://perlcabal.org/agent/xul/findfile.xul
>     <=
>     http://perlcabal.org/agent/xul/findfile.pl.txt
>
> Enjoy!
> agentz
> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bestpractical.com/pipermail/jifty-devel/attachments/20070719/fcdfea0f/attachment-0001.htm


More information about the jifty-devel mailing list