- From: Arjun Ray <aray@q2.net>
- Date: Thu, 24 Feb 2000 04:59:39 -0500 (EST)
- To: www-html@w3.org
On Thu, 24 Feb 2000, Walter Ian Kaye wrote: > Eeesh. What I do is create an HTML template file (I like to use > *.htpl as a naming convention) and put placeholders in it: > [...] > <TITLE>`FOO</TITLE> > [...] > <H1>`BAR</H1> > [...] > > Then a Perl CGI slurps the file into a variable, does some s// on the > placeholders, and serves the result. > > $html =~ s/`FOO/$foo/g; > $html =~ s/`BAR/$bar/g; > > Clean and simple. For tag soup, yes. The file could be any horrendous mishmash, but the Perl program, doing text substitution only, wouldn't care. > HTML remains pure HTML, If it's a question of replacing "placeholders", entity references work just as well - besides, of course, being a standardized technique, but we're not supposed to mention such things - and a SGML-based program like sgmlnorm can do the rest. > and the web designer can easily modify the template file without > seeing any programming code at all. Never mind validated output, never mind well-formed output, is there any guarantee that the output will even have proper nesting? Nah, why bother, right?;) Arjun
Received on Thursday, 24 February 2000 04:31:30 UTC