Now I'm considering adding the XML namespace support to TD. I'm
proposing the following design:

    package html;
use Template::Declare::Tags 'HTML::Tags' => { tag_prefix => 'html:' };

    package MyXulApp::Templates;
    use Template::Declare::Tags 'XUL::Tags';
    template foo => sub {
        groupbox {
            html::p { 'hello, XML!' }
            html::table {}
        }
    };

And show('foo') will give:

<groupbox>
  <html:p>hello, XML!</html:p>
  <html:table></html:table>
</groupbox>

Thoughts? Comments?

That feels pretty natural. Thought the pragma package definition kind of scares me and "HTML::Tags" there feels like it's a full package specification, when I suspect it's actually a fragment of one. Given that, is there a reason to include the "::Tags"?


Instead of:

package html;
use Template::Declare::Tags 'HTML::Tags' => { tag_prefix => 'html:' };

...

        html::p { 'hello!'}



What about:


use Template::Declare::Tags 'HTML' => { namespace => 'html' }; # behind the scenes creates the html:: pseudopackage and imports Template::Declare::TagSet::HTML into it

        html::p{ 'hello' };


-j




Attachment: PGP.sig
Description: This is a digitally signed message part

_______________________________________________
jifty-devel mailing list
[email protected]
http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel

Reply via email to