in reply to HTML Templating as Tree Rewriting: Part I: "If Statements"

Actually, by looking at couple of scripts that use CGI module, you shall be able to quickly realize that HTML doc is a tree structure.

Anything that can be visualized as small boxes in a box, and smaller boxes in small boxes... has a tree structure.

  • Comment on Re: HTML Templating as Tree Rewriting: Part I: "If Statements"

Replies are listed 'Best First'.
Re: Re: HTML Templating as Tree Rewriting: Part I: "If Statements"
by theorbtwo (Prior) on Oct 28, 2003 at 13:03 UTC

    ...if and only if the edges of those boxes never cross, that is. Only correct HTML can be visualized as a tree. (HTML::TreeBuilder corrects this type of error as it goes. Presumably most HTML modules do.)


    Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

      That's one of the (very few) pros on building HTML with CGI.pm's tag functions: it ensures your tags are nested properly. Just like they always should be.