On 2/24/06, Andy Armstrong <[EMAIL PROTECTED]> wrote:
>
> I'm using HTML::Parser as part of a templating system that parses
> HTML formatted templates and interprets certain special tags. I'd
> like to be able to implement a tag like
>
>   <include src="header.html" />


If you want to stay pure HTML, then do this:

<span myparser_action="include" myparser_args="header.html" />

No need to use non-HTML and expect an HTML parser to parse it. If you want
non-HTML, then maybe XML parsing is more appropriate.

Also, what you want appears to be do-able using the formerCPAN module
HTML_Tree by Paul J Lucas:
http://homepage.mac.com/pauljlucas/software/html_tree/

And you might like the CPAN module PeTaL or my own HTML::Seamstress

and XML::LibXML and XML::LibXSLT is XML floats your boat :)


To do that I'd like to subclass HTML::Parser and add an include()


why not use HTML::Tree on CPAN (HTML::Tree is on CPAN, HTML_Tree is at the
URL I gave you previously).




--
http://slowchess.com/profile.php?username=tbrannon http://www.moneycoop.org
http://www.osogd.org http://www.metaperl.com http://www.livingcosmos.org

Reply via email to