From mboxrd@z Thu Jan 1 00:00:00 1970 From: William Ahern To: 9fans@cse.psu.edu Subject: Re: [9fans] httpd scripting Message-ID: <20030603125012.GA824@wilbur.25thandClement.com> References: <3EDB4C63.5080902@proweb.co.uk> <5YZCa.5429$iO3.35296367@news-text.cableinet.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5YZCa.5429$iO3.35296367@news-text.cableinet.net> User-Agent: Mutt/1.5.3i Date: Tue, 3 Jun 2003 05:50:12 -0700 Topicbox-Message-UUID: c3018f82-eacb-11e9-9e20-41e7f4b1d025 From telnet@wagner.Princeton.EDU.composers Wed Jul 8 06:40:19 1998 Newsgroups: comp.compilers > You can get away with tree-like behavior in C if you use varargs stuff. > I'll risk my reputation (:-)) by admitting to an even more disgusting hack: > --- > void new_section(char *title, char *img_name, int h, int w) { > emit(html_list, > html_p, > html_hr, > html_br, > html_region, "center", > html_region, "h1", > html_text, title, > html_tag, "img", > html_param, "src", html_string, fname, > html_param, "height", html_text, h, > html_param, "width", html_text, w, > 0, > 0); > } > > A disgusting hack? Absolutely. > > But it's also an order of magnitude more powerful than any other > dynamic HTML tool I've worked with, and it only took me an hour or so > to implement. > --------------------------------------------------------------------------- this is very similar to XSL: trees, nodes, concept of tags built into language. c/o xsltproc from libxml2 for an XSLT processor, and zvon.org for really good tutorials. the beauty of XSL is that you can cleanly separate your content production logic from your presentation logic. - Bill